Skip to content

Commit

Permalink
Test more variants
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Dec 11, 2019
1 parent 33f3c9e commit 6bdb418
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 6 deletions.
6 changes: 6 additions & 0 deletions tests/test_verilog/gold/test_int_literal_mod0.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module mod0 #(parameter KRATOS_INSTANCE_ID = 32'h0)
(
input I
);

endmodule // mod
6 changes: 6 additions & 0 deletions tests/test_verilog/gold/test_int_literal_mod1.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module mod1 #(parameter KRATOS_INSTANCE_ID = 'h1)
(
input I
);

endmodule // mod
6 changes: 6 additions & 0 deletions tests/test_verilog/gold/test_int_literal_mod2.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module mod2 #(parameter KRATOS_INSTANCE_ID = 24'd2)
(
input I
);

endmodule // mod
6 changes: 6 additions & 0 deletions tests/test_verilog/gold/test_int_literal_mod3.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module mod3 #(parameter KRATOS_INSTANCE_ID = 16'b1)
(
input I
);

endmodule // mod
6 changes: 6 additions & 0 deletions tests/test_verilog/gold/test_int_literal_mod4.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module mod4 #(parameter KRATOS_INSTANCE_ID = 13'o7)
(
input I
);

endmodule // mod
6 changes: 6 additions & 0 deletions tests/test_verilog/gold/test_int_literal_mod5.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module mod5 #(parameter KRATOS_INSTANCE_ID = 17)
(
input I
);

endmodule // mod
6 changes: 0 additions & 6 deletions tests/test_verilog/gold/test_int_literal_top.v

This file was deleted.

6 changes: 6 additions & 0 deletions tests/test_verilog/test_from_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,12 @@ def test_int_literal():

mods = m.DefineFromVerilog(verilog)

for mod in mods:
m.compile(f"build/test_int_literal_{mod.name}", mod, output="verilog")
assert m.testing.check_files_equal(
__file__, f"build/test_int_literal_{mod.name}.v",
f"gold/test_int_literal_{mod.name}.v")

class Top(m.Circuit):
IO = ["I", m.In(m.Bit)]
@classmethod
Expand Down

0 comments on commit 6bdb418

Please sign in to comment.