efabless / openlane2

The next generation of OpenLane, rewritten from scratch with a modular architecture
https://openlane2.readthedocs.io/
Apache License 2.0
207 stars 38 forks source link

Verilator doesn't recognize macros #579

Open smunaut opened 1 month ago

smunaut commented 1 month ago

Description

If you include a macro that has liberty file, yosys will parse the liberty file and know about the macro and its ports just fine. But Verilator won't because it doesn't parse liberty files ...

Expected Behavior

No errors.

Environment report

kernel: Linux
kernel_version: 5.10.0-19-cloud-amd64
supported: True
distro: debian
distro_version: 11
python_version: 3.9.2
python_path:
  - /mnt/pdk/tt-local-harden/venv/bin
  - /usr/lib/python39.zip
  - /usr/lib/python3.9
  - /usr/lib/python3.9/lib-dynload
  - /mnt/pdk/tt-local-harden/venv/lib/python3.9/site-packages
tkinter: True
container_info:
  engine: docker
  version: 27.3.1
  conmon: False
  rootless: False
nix_info:
  version_string: nix (Nix) 2.15.1
  channels:
    nixpkgs: https://nixos.org/channels/nixpkgs-unstable
  nix_command: False
  flakes: False

Reproduction material

n/a

Relevant log output

%Error: /home/runner/work/tt09-atari-2600/tt09-atari-2600/src/tt_um_rejunity_atari2600.v:425:3: Cannot find file containing module: 'rom_2600'
      425 |   rom_2600 rom_I (
          |   ^~~~~~~~
    %Error: /home/runner/work/tt09-atari-2600/tt09-atari-2600/src/tt_um_rejunity_atari2600.v:425:3: This may be because there's no search path specified with -I.
      425 |   rom_2600 rom_I (
          |   ^~~~~~~~
            ... Looked in:
                 rom_2600
                 rom_2600.v
                 rom_2600.sv
                 obj_dir/rom_2600
                 obj_dir/rom_2600.v
                 obj_dir/rom_2600.sv
    %Error: Exiting due to 2 error(s)