Update beh_ib_func.scala

This commit is contained in:
Junaid Ahmed 2020-09-22 16:15:11 +05:00 committed by GitHub
parent ccdab1e35c
commit 33a6ca89b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,8 @@ import chisel3.util.HasBlackBoxResource
import chisel3.withClock import chisel3.withClock
object beh_ib_func { object beh_ib_func {
// use this for rvdffsc = > io.out := RegEnable(io.din & repl(io.din.getWidth, io.clear), 0.U, io.en)
// use this for rvdffs = > io.out := RegEnable(io.din, 0.U, io.en)
def repl(b:Int, a:UInt) = VecInit.tabulate(b)(i => a).reduce(Cat(_,_)) def repl(b:Int, a:UInt) = VecInit.tabulate(b)(i => a).reduce(Cat(_,_))
def rvsyncss(din:UInt) = RegNext(RegNext(din,0.U),0.U) def rvsyncss(din:UInt) = RegNext(RegNext(din,0.U),0.U)