Skip to content

Commit

Permalink
Fix bug with typespecs declared in package (chipsalliance#2097)
Browse files Browse the repository at this point in the history
Co-authored-by: Krzysztof Bieganski <[email protected]>
  • Loading branch information
alaindargelas and Krzysztof Bieganski authored Oct 27, 2023
1 parent 2884d27 commit 01111c5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/formal/passlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ simple:OneReplicate/dut.v
simple:OneStruct/dut.sv
simple:OneSysFunc/dut.v
simple:PackageCast/dut.v
simple:PackageLogicTypespec/dut.sv
simple:PackedArray/top.sv
simple:PackedArrayPort/top.sv
simple:ParameterColonReference/top.sv
Expand Down
2 changes: 2 additions & 0 deletions tests/simple_tests/PackageLogicTypespec/Makefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
TEST_FILES := $(TEST_DIR)/dut.sv
TOP_MODULE := dut
9 changes: 9 additions & 0 deletions tests/simple_tests/PackageLogicTypespec/dut.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package my_pkg;

typedef logic [31:0] my_type_t;

endpackage

module dut (input wire clk, input my_pkg::my_type_t my_in, output logic [31:0] my_out);
assign my_out = my_in;
endmodule
6 changes: 6 additions & 0 deletions tests/simple_tests/PackageLogicTypespec/yosys_script.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source ../yosys_common.tcl

prep -top \\dut
write_verilog
write_verilog yosys.sv
sim -clock clk -rstlen 10 -vcd dump.vcd

0 comments on commit 01111c5

Please sign in to comment.