Use require statement
This commit is contained in:
@@ -176,11 +176,8 @@ class MacroCompilerPass(mems: Option[Seq[Macro]],
|
||||
if (libPort.src.effectiveMaskGran == libPort.src.width) {
|
||||
bits(WRef(mem), low / memPort.src.effectiveMaskGran)
|
||||
} else {
|
||||
if (libPort.src.effectiveMaskGran != 1) {
|
||||
// TODO
|
||||
System.err println "only single-bit mask supported"
|
||||
return None
|
||||
}
|
||||
require(libPort.src.effectiveMaskGran == 1, "only single-bit mask supported for now")
|
||||
|
||||
cat(((low to high) map (i => bits(WRef(mem), i / memPort.src.effectiveMaskGran))).reverse)
|
||||
}
|
||||
case None =>
|
||||
|
||||
@@ -18,9 +18,9 @@ class FirrtlMacroPort(port: MacroPort) {
|
||||
val isWriter = !port.writeEnable.isEmpty && port.readEnable.isEmpty
|
||||
val isReadWriter = !port.writeEnable.isEmpty && !port.readEnable.isEmpty
|
||||
|
||||
val AddrType = UIntType(IntWidth(ceilLog2(port.depth) max 1))
|
||||
val DataType = UIntType(IntWidth(port.width))
|
||||
val MaskType = UIntType(IntWidth(port.width / port.effectiveMaskGran))
|
||||
val addrType = UIntType(IntWidth(ceilLog2(port.depth) max 1))
|
||||
val dataType = UIntType(IntWidth(port.width))
|
||||
val maskType = UIntType(IntWidth(port.width / port.effectiveMaskGran))
|
||||
|
||||
// Bundle representing this macro port.
|
||||
val tpe = BundleType(Seq(
|
||||
|
||||
Reference in New Issue
Block a user