Skip to content

Commit

Permalink
fix bare input signed declarations for inlined modules
Browse files Browse the repository at this point in the history
  • Loading branch information
zachjs committed Aug 5, 2024
1 parent 2cc1f6e commit 1b27343
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* Fixed `--write path/to/dir/` with directives like `` `default_nettype ``
* Fixed `logic` incorrectly converted to `wire` even when provided to a task or
function output port
* Fixed `input signed` ports of interface-using modules producing invalid
declarations after inlining
* Fixed `` `resetall `` not resetting the `` `default_nettype ``

### Other Enhancements
Expand Down
3 changes: 1 addition & 2 deletions src/Convert/Interface.hs
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,7 @@ inlineInstance global ranges modportBindings items partName
removeDeclDir (Variable _ t x a e) =
Variable Local t' x a e
where t' = case t of
Implicit Unspecified rs ->
IntegerVector TLogic Unspecified rs
Implicit sg rs -> IntegerVector TLogic sg rs
_ -> t
removeDeclDir decl@Net{} =
traverseNetAsVar removeDeclDir decl
Expand Down
14 changes: 14 additions & 0 deletions test/core/interface_input_type.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module top;
intf i();
mod m(i, 1'b1);
initial #1 $display("%b", i.y);
endmodule
module mod(
input intf i,
input signed x
);
initial i.y = x;
endmodule
interface intf;
logic [1:0] y;
endinterface
3 changes: 3 additions & 0 deletions test/core/interface_input_type.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module top;
initial #1 $display("%b", 2'b11);
endmodule

0 comments on commit 1b27343

Please sign in to comment.