The-OpenROAD-Project / The-OpenROAD-Project/OpenSTA

`VerilogWriter::writeAssigns()` omitted `assign` statement when a feed-through net name matches output port name

Open
#315 2 comments 0 reactions 1 assignee View on GitHub

@dsengupta0628 is already working on this.

Since Mar 24, 2026.

Dominant language
Verilog
Stars
619
Forks
270
Avg merge
5d 15h
Merged PRs (30d)
4

Description

VerilogWriter::writeAssigns(const Instance *inst) assumes that a feed-through net name should match its input port name.

  • If a feed-through net name matches its input port name, assign statement is correctly generated when write_verilog command is exectued because the net name is different to its output port name.
Case 1.
(input term name:  IN)  -->  (feed-through wire name: IN)  --> (output term name: OUT)

[ Verilog output by write_verilog command ]

module sub (IN, OUT);
  input IN;
  output OUT;
  assign OUT = IN;             // Correct
endmodule
  • But if a feed-through net name matches its output port name, assign statement is not generated.
Case 2.
(input term name:  IN)  -->  (feed-through wire name: OUT)  --> (output term name: OUT)

[ Verilog output by write_verilog command ]

module sub (IN, OUT);
  input IN;
  output OUT;
                         // ERROR. assign statement is missing
endmodule

It would be nice if VerilogWriter::writeAssigns() can generate the assign statement correctly even if the feed-through net name is the same as the output term name.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.