Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linter fails on standard cells #1881

Closed
mattvenn opened this issue Jul 5, 2023 · 2 comments
Closed

linter fails on standard cells #1881

mattvenn opened this issue Jul 5, 2023 · 2 comments
Labels
bug Something isn't working workaround A workaround exists for this issue

Comments

@mattvenn
Copy link
Collaborator

mattvenn commented Jul 5, 2023

Description

with the new linter (which is a great idea btw), it will fail if a design instantiates a standard cell.

Example:

sky130_fd_sc_hd__dlrtp_1 latch[WIDTH-1:0] (
        .Q(data),
        .D(data_in_buf),
        .RESET_B(reset_n),
        .GATE(empty)
    );

Linter fails with this:

%Error: /work/src/latch_fifo.v:50:30: Can't resolve module reference: 'sky130_fd_sc_hd__dlrtp_1'
   50 |     sky130_fd_sc_hd__dlrtp_1 latch[WIDTH-1:0] (

Expected Behavior

should be able to directly instantiate standard cells

Environment report

Kernel: Linux v5.15.0-75-generic
Distribution: ubuntu 20.04
Python: v3.8.10 (OK)
Container Engine: docker v20.10.21 (OK)
OpenLane Git Version: 3bc9d02d0b34ad032921553e512fbe4bebf1d833
pip: INSTALLED
python-venv: INSTALLED
---
PDK Version Verification Status: OK
---
Git Log (Last 3 Commits)

3bc9d02 2023-06-26T07:48:24+03:00 Use OpenROAD mirror of `lemon-graph` (#1873) - Kareem Farid -  (grafted, HEAD, tag: 2023.06.26)
---
Git Remotes

origin  https://github.com/The-OpenROAD-Project/OpenLane.git (fetch)
origin  https://github.com/The-OpenROAD-Project/OpenLane.git (push)

Reproduction material

https://github.com/MichaelBell/tt03-fifo/blob/main/src/latch_fifo.v

Relevant log output

[INFO]: Running linter (Verilator) (log: ../work/runs/wokwi/logs/synthesis/linter.log)...
[ERROR]: 2 errors found by linter
[ERROR]: Step 0 (verilator_lint_check) failed with error:
-code 1 -level 0 -errorcode NONE -errorinfo {
    while executing
"throw_error"
    (procedure "run_verilator" line 60)
    invoked from within
"run_verilator"
    (procedure "run_verilator_step" line 3)
    invoked from within
"run_verilator_step"} -errorline 1
[INFO]: Saving current set of views in '../work/runs/wokwi/results/final'...
@kareefardi
Copy link
Collaborator

kareefardi commented Jul 5, 2023

I am currently working on this. If this is the only standard cell that you are using, you can do something like this

`ifdef LINTER_BBOX_CELL
module sky130_fd_sc_hd__dlrtp_1 (
    Q      ,
    RESET_B,
    D      ,
    GATE
);

    output Q      ;
    input  RESET_B;
    input  D      ;
    input  GATE   ;
endmodule
`endif

Then set LINTER_DEFINES to ["LINTER_BBOX_CELL"]. Let me know if this works for you.

@kareefardi kareefardi added workaround A workaround exists for this issue bug Something isn't working labels Jul 5, 2023
@donn
Copy link
Collaborator

donn commented Sep 20, 2023

Should be fixed by #1929

@donn donn closed this as completed Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working workaround A workaround exists for this issue
Projects
None yet
Development

No branches or pull requests

3 participants