Closed yo96 closed 11 months ago
it would require some deep hacking on the parsing process ... because it is possible for a CL model to use <<= in calculation.
hmm if we have update once would that make this easier?
I can confirm PyMTL now throws the following error when using <<=
instead an @update
block:
E pymtl3.dsl.errors.UpdateBlockWriteError:
E In file /work/global/pp482/clean/pymtl3/pymtl3/stdlib/mem/ROM.py:47 in up_read_rom
E
E 47 s.rdata[i] <<= s.mem[ s.raddr[i] ]
E
E ^^^ In update, only '@=' statements can assign value to signals, not <<=
E (when constructing instance s of class "SequentialROM" in the hierarchy)
E
E Suggestion: Line 47 Fix the '<<=' assignment with '@='
I just used
@s.update
instead of@s.update_ff
for a sequential block and pymtl3 didn't complain. When trying to translate it Verilator gives me this error:We should probably check this during elaboration? I think we check
@s.update_ff
but seems not@s.update