Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
Serializer: only serialize smem RUW if non-default (#2597)
Browse files Browse the repository at this point in the history
This will make it easier to compile circuits with
older compiler versions.
  • Loading branch information
ekiwi authored Jan 25, 2023
1 parent 82af22f commit 84a7db5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/scala/firrtl/ir/Serializer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,10 @@ object Serializer {
case firrtl.CDefMemory(info, name, tpe, size, seq, readUnderWrite) =>
if (seq) b ++= "smem " else b ++= "cmem "
b ++= name; b ++= " : "; s(tpe); b ++= " ["; b ++= size.toString(); b += ']'
b += ' '; b ++= readUnderWrite.toString; s(info)
if (readUnderWrite != ReadUnderWrite.Undefined) { // undefined is the default
b += ' '; b ++= readUnderWrite.toString
}
s(info)
case firrtl.CDefMPort(info, name, _, mem, exps, direction) =>
b ++= direction.serialize; b ++= " mport "; b ++= name; b ++= " = "; b ++= mem
b += '['; s(exps.head); b ++= "], "; s(exps(1)); s(info)
Expand Down

0 comments on commit 84a7db5

Please sign in to comment.