llvm / llvm/circt

[PyCDE/CAPI] iverilog chokes on automatic logic

Open
#3,696 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

PyCDE
Dominant language
C++
Stars
2.2k
Forks
524
Avg merge
3d 2h
Merged PRs (30d)
46

Description

automatic logic can be circumvented by passing `--lowering-options=disallowLocalVariables` during `--export-verilog`.

For PyCDE, We'd want to be able to - at some point in the stack - to specify this variable. One point could be as a flag at the CAPI level: https://github.com/llvm/circt/blob/bc4c6874fd633f65966697e26ad41dbe9f16e82d/lib/Bindings/Python/CIRCTModule.cpp#L86-L90

As long as it is something which we can set when emitting RTL for `@cocotestbench` PyCDE runs.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lib/Bindings/Python/CIRCTModule.cpp around the cited CAPI flag handling, then trace how --export-verilog lowering options reach RTL emission for PyCDE @cocotestbench runs. Determine an API path for setting disallowLocalVariables and verify that emitted RTL avoids automatic logic when used with iverilog.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.