Skip to content

[Build Fix] Updates for modern Cocotb API and Verilator Linting (macOS) #1

@muditbhargava66

Description

@muditbhargava66

Hi! I recently pulled the repo to build and simulate the design on macOS. I encountered a few build failures due to tool version differences (specifically deprecated Cocotb syntax and stricter Verilator linting).

I have applied the following fixes to get the environment running. I wanted to document them here in case you'd like a PR, or for future users facing similar build issues.

1. Linting Fixes (Verilator)

  • File: src/io_inft.v
    • Issue: Unused signal data_v_early.
    • Fix: Added /* verilator lint_off UNUSEDSIGNAL */ to suppress the warning and allow clean linting.

2. Testbench Fixes (Cocotb Compatibility)

It appears I am running a newer version of Cocotb than originally used, which caused deprecation errors.

  • File: test/Makefile
    • Issue: Variable COCOTB_TEST_MODULES was deprecated/ignored.
    • Fix: Changed to MODULE = test.
  • File: test/test.py
    • Issue 1: Deprecated Clock(..., unit="us").
    • Fix: Updated to Clock(..., units="us").
    • Issue 2: Deprecated BinaryValue.to_unsigned().
    • Fix: Updated to use .integer property.

3. Verification Results:

  • C Reference (make tv): Passed.
  • RTL Lint (make lint): Passed (1 warning fixed).
  • RTL Simulation (make test): Passed 3/4 tests.
    • hash_spec_test : PASS (Matches spec vectors)
    • hash_test : PASS (Randomized testing)
    • slow_output_test : PASS
    • dissable_test : FAIL (Likely due to uninitialized 'X' states during disable check)

Question: Is the dissable_test failure a known sensitivity with specific reset timing, or should I be looking into the reset logic for the X-state propagation?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions