我正在尝试获取 reg 的值并将其与内部的数字和 if 语句进行比较
val refill_addr = Reg(UInt(width = paddrBits))
if ( refill_addr > 20000.U)
cacheable := true
else
cacheable := false
但我得到这个错误
[error] /home/a/i-rocket-chip/src/main/scala/rocket/ICache.scala:365:18: type mismatch;
[error] found : chisel3.core.Bool
[error] required: Boolean
[error] if ( refill_addr > 20000.U)
[error] ^
[error] one error found
[error] (Compile / compileIncremental) Compilation failed