Closed drichmond closed 2 years ago
@tommydcjung I forgot to add ci_ to this. How do I make it run without changing the branch? I've forgotten the steps
Is this bug going to be fixed in verilator? I see that the benefits of verilator compatibility could outweight the minor and temporary sacrifice in code quality, but this seems like a simple bug that can be fixed in verilator that can benefit greater open source community in general.
Approved, but I'm going to leave the ultimate burden to decide if it's okay on Michael
The answer is I don't know. Both Dan and I thought there was an issue filed in Verilator, but we can't find it.
The answer is I don't know. Both Dan and I thought there was an issue filed in Verilator, but we can't find it.
We should file a new one, but latency will be weeks at earliest. So I would suggest to commit the workaround in the meantime
This is the relevant Verilator issue: https://github.com/verilator/verilator/issues/1501
I've filed an issue in manycore, Dan has posted it there, and I'm now subscribed to any updates on the issue.
I am merging this for now, but will undo/redo when I get a notification that it is fixed.
@tommydcjung Is that sufficient?
This issue was created 3 years ago, and hasn't made any progress since then... It was probably de-prioritized because Dan said it's not a show stopper..
And indeed it wasn’t
Besides I think the measures taken are sufficient, but I would just give them a friendly reminder about the issue on verilator-side.
OK, I switched to macros that are specific to verilator for the time being. VCS behavior remains unchanged. @tommydcjung OK with you?
OK, I switched to macros that are specific to verilator for the time being. VCS behavior remains unchanged. @tommydcjung OK with you?
OK with me. thanks
This seems like a simple fix, but I want to make sure we're all on board because it has some subtle (and annoying) implications.
There are two changes. First, because Verilator doesn't correctly handle parameter-controlled instantiation of modules, our methodology for disabling/enabling the profilers doesn't work in Verilator. Instead, we need to "clock gate" them like so:
I added a comment explaining this. Also, I used && because I'm worried that someone (or more likely some tool) will use some value that isn't strictly 1 (e.g. "yes"). Using && gets around this.
The second change is the instance name of
bsg_nonsynth_manycore_testbench
in spmd_testbench.v. I switched it fromtb
, totestbench
because we want to reference the parameters (above) from bsg_nonsynth_manycore_testbench.v, not the top level.I realize this might be the most controversial change and I agree it's annoying. We typically use this instantiation path in other tools (e.g. saif analysis). I changed the SAIF header string in the path to reflect this but I realize that there are other scripts that may depend on
tb
, nottestbench
. In replicant, we actually depend ontestbench
, and my impression was that there was more instances to change there than in manycore (hopefully just the one above?)This seemed like the shortest path, but I'm willing to be convinced that it will break some other part of the flow and find a better way to handle it.