-
Notifications
You must be signed in to change notification settings - Fork 177
Serializer: only serialize smem RUW if non-default #2597
Serializer: only serialize smem RUW if non-default #2597
Conversation
This will make it easier to compile circuits with older compiler versions.
whats the plan to get rid of this in the longer term though? Sorry can someone list out the steps here to getting to the right final state? |
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default according to firrtl spec or ...?
We do not need to do anything. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add a test?
The current tests already cover this mostly. Do you really want a test that ensures that |
We are already testing that the parser can deal with an omitted |
Considering its presence not working with existing releases of firtool is what brought us here, yes 🙂 |
If this is supposed to be optional can someone clarify the firrtl spec that if it is omitted its |
|
what do you mean it's not part of the spec...? Well, can we add it then...? What is this then:
|
CHIRRTL (including |
That is FIRRTL memory which requires eagerly declaring the ports. Chisel (and thus CHIRRTL) mems allow you to declare the ports of a memory separately (and later) than when you declare the memory itself, thus they are separate. |
So are you saying that if we were to add |
This will make it easier to compile circuits with older compiler versions. (cherry picked from commit 84a7db5)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this approach, too. Thanks for the fix. This'll keep CI passing for now.
Yes, considering that was the historic behavior it makes sense to have it as the default for serialization and deserialization purposes. There are many differences between |
This will make it easier to compile circuits with
older compiler versions.