verilator / verilator

Verilator open-source SystemVerilog simulator and lint system
https://verilator.org
GNU Lesser General Public License v3.0
2.55k stars 609 forks source link

Support for asap7 Verilog for post-synthesis simulation #5242

Closed oharboe closed 4 months ago

oharboe commented 4 months ago

I would like to run post-synthesis simulation for asap7 so that I can feed a .vcd file to OpenSTA and get power numbers based on that simulation

However, I get an error.

To reproduce:

Unzip post-synthesis-error.zip

Run:

verilator --lint-only --top-module MockArrayTestbench asap7sc7p5t_AO_RVT_TT_201020.v asap7sc7p5t_SEQ_RVT_TT_220101.v MockArrayFinal.v MockArrayElementFinal.v MockArrayTestbench.sv

Output:

%Error: asap7sc7p5t_SEQ_RVT_TT_220101.v:50:19: syntax error, unexpected '(', expecting IDENTIFIER or randomize
   50 |  altos_dff_sr_err (xcr_0, delayed_CLK, int_fwire_d, int_fwire_s, int_fwire_r);
      |                   ^
%Error: asap7sc7p5t_SEQ_RVT_TT_220101.v:532:16: syntax error, unexpected '(', expecting IDENTIFIER or randomize
  532 |  altos_dff_err (xcr_0, delayed_CLK, int_fwire_d);
      |                ^
%Error: asap7sc7p5t_SEQ_RVT_TT_220101.v:562:16: syntax error, unexpected '(', expecting IDENTIFIER or randomize
  562 |  altos_dff_err (xcr_0, delayed_CLK, int_fwire_d);
      |                ^
%Error: asap7sc7p5t_SEQ_RVT_TT_220101.v:592:16: syntax error, unexpected '(', expecting IDENTIFIER or randomize
  592 |  altos_dff_err (xcr_0, delayed_CLK, int_fwire_d);
[deleted]
Verilator 5.026 2024-06-15 rev v5.026

Trying:

Verilator 5.027 devel rev v5.026-26-gb66fdd742

Ah...

gets further and runs into errors that I have to fix in my example...

%Warning-PINMISSING: MockArrayTestbench.sv:262:13: Cell has missing pin: 'reset'
  262 |   MockArray postSynthesis (  
      |             ^~~~~~~~~~~~~
                     ... For warning description see https://verilator.org/warn/PINMISSING?v=5.027
                     ... Use "/* verilator lint_off PINMISSING */" and lint_on around source to disable this message.
%Error: MockArrayElementFinal.v:2133:2: Cannot find file containing module: 'NAND2x1_ASAP7_75t_R'
 2133 |  NAND2x1_ASAP7_75t_R _0769_ (.A(_0319_),
      |  ^~~~~~~~~~~~~~~~~~~
oharboe commented 4 months ago

Rubberduck debugging worked. :-) Decided to create the issue and close it. Google might see it and give an answer to anyone else running into this...