Support non-prefixed ports

This commit is contained in:
Edward Wang
2017-07-31 17:03:21 -07:00
committed by edwardcwang
parent a0e817b6fb
commit 513da4eb37

View File

@@ -119,7 +119,7 @@ trait HasSRAMGenerator {
write: Boolean, write: Boolean,
writeEnable: Boolean = false writeEnable: Boolean = false
): MacroPort = { ): MacroPort = {
val realPrefix = prefix + "_" val realPrefix = if (prefix == "") "" else prefix + "_"
MacroPort( MacroPort(
address=PolarizedPort(name=realPrefix + "addr", polarity=ActiveHigh), address=PolarizedPort(name=realPrefix + "addr", polarity=ActiveHigh),