Open meheff opened 3 years ago
Just note that this might require changes to the per-stage LEC code. I'm willing to handle it, but it might be worth taking a few minutes to think about how we might lighten the coupling between the two here - really, I think just "publishing" the pattern somewhere (e.g., some format details in a header?) would be 90% of the work.
Does the LEC code key off the name prefixes?
Since we now have registers represented in IR. I wonder if we should do some kind of data flow on the IR and pick out the reg->logic->reg paths from the IR and compare against the net list as the register names will be stable.
We prefix names of signals in pipeline stage with pX_ where X is the pipeline stage. Registers and the combinational logic feeding these registers are prefixed similarly. For example:
A problem with this naming scheme is that you end up with logic which contains mixed prefixes (e.g., "p0" and "p1" in "p1_baz" assignment). Ideally the prefixes should help identify incorrect mixed stage logic.
A better scheme would be to prefix similarly the registers and the combinational logic which use the register values. The above example becomes the code example below. Note the rearranging of logic relative to the pipeline comment delimiters too. Essentially a stage is redefined to be pipeline registers and the uses of those registers, rather than the pipeline register and the logic feeding those registers.