Skip to content

Commit

Permalink
Merge branch 'master' into coreir-optional
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Sep 21, 2023
2 parents 19f6133 + 4387b64 commit 23db17a
Show file tree
Hide file tree
Showing 90 changed files with 109 additions and 93 deletions.
1 change: 0 additions & 1 deletion magma/primitives/when.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ def get_when_assert_wire(self, port):
temp = Wire(type(port).undirected_t, flatten=False)(name=name)
for value in port.driving():
_rewire_driven_value_or_values(value, temp.O)
assert not port.driving()
temp.I @= port
self._when_assert_wires[port] = temp.O
return self._when_assert_wires[port]
Expand Down
2 changes: 1 addition & 1 deletion magma/tuple.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def wire(self, o, debug_info):
)
return

if self.keys() != o.keys():
if list(self.keys()) != list(o.keys()):
_logger.error(
WiringLog(f"Cannot wire {{}} (type={type(o)}, "
f"keys={list(self.keys())}) to "
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"staticfg",
"networkx",
"uinspect",
"circt==1.48.1.dev34",
"circt==1.51.1.dev75",
],
python_requires='>=3.6',
long_description=long_description,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/aggregate_constant.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module aggregate_constant(
output struct packed {logic [7:0] x; logic [3:0] y; } y
);
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/aggregate_mux_wrapper.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module aggregate_mux_wrapper(
input struct packed {logic [7:0] x; logic y; } a,
input s,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module aggregate_mux_wrapper(
input struct packed {logic [7:0] x; logic y; } a,
input s,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module aggregate_mux_wrapper(
input [7:0] a_x,
input a_y,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module aggregate_mux_wrapper(
input [7:0] a_x,
input a_y,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module complex_aggregates_nested_array(
input [1:0][2:0][3:0] a,
output [1:0][2:0][3:0] y
Expand Down
4 changes: 2 additions & 2 deletions tests/test_backend/test_mlir/golds/complex_bind.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module complex_bind_asserts(
input struct packed {logic I; } I,
input O,
Expand Down Expand Up @@ -26,7 +26,7 @@ endmodule

// ----- 8< ----- FILE "bindfile.sv" ----- 8< -----

// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
bind complex_bind complex_bind_asserts complex_bind_asserts_inst (
.I (I),
.O (Register_inst0),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module complex_bind_asserts(
input I_I,
O,
Expand Down Expand Up @@ -26,7 +26,7 @@ endmodule

// ----- 8< ----- FILE "bindfile.sv" ----- 8< -----

// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
bind complex_bind complex_bind_asserts complex_bind_asserts_inst (
.I_I (I_I),
.O (Register_inst0),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module complex_inline_verilog(
input [11:0] I,
input CLK,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module complex_inline_verilog2(
input [11:0] I,
input CLK,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/complex_lut.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module LUT(
input [1:0] I,
output struct packed {logic [7:0] x; logic y; }[1:0] O
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_magma_protocol(
input [7:0] I,
output [7:0] O
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module complex_mixed_direction_ports(
input [7:0] a_0_x,
a_1_x,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_mixed_direction_ports(
input [7:0] a_x,
output [7:0] a_y
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module complex_register_wrapper(
input struct packed {logic [7:0] x; logic y; } a,
input [5:0][15:0] b,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module complex_register_wrapper(
input struct packed {logic [7:0] x; logic y; } a,
input [5:0][15:0] b,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module Register(
input struct packed {logic [7:0] x; logic y; } I,
input CE,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module complex_register_wrapper(
input [7:0] a_x,
input a_y,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/complex_undriven.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module complex_undriven(
output struct packed {logic [7:0] x; logic y; } O
);
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/complex_wire.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module complex_wire(
input [7:0] I0,
input I1,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/counter.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module counter(
input CLK,
output [15:0] y
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/feedthrough.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module feedthrough(
input I,
output O
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/multiport_memory.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module multiport_memory(
input [1:0] raddr_0,
raddr_1,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/multiport_memory_re.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module multiport_memory_re(
input [1:0] raddr_0,
raddr_1,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/no_outputs.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module no_outputs(
input I
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module non_power_of_two_mux_wrapper(
input struct packed {logic [7:0] x; logic y; } a,
input [3:0] s,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module non_power_of_two_mux_wrapper(
input struct packed {logic [7:0] x; logic y; } a,
input [3:0] s,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module non_power_of_two_mux_wrapper(
input [7:0] a_x,
input a_y,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/register_array_of_bit.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module register_array_of_bit(
input [3:0] I,
input CLK,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_aggregates_anon_product(
input struct packed {logic [7:0] x; logic [7:0] y; } a,
output struct packed {logic [7:0] x; logic [7:0] y; } y
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_aggregates_anon_product(
input [7:0] a_x,
a_y,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_aggregates_array(
input [7:0][15:0] a,
output [7:0][15:0] y,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_aggregates_bits(
input [15:0] a,
output [15:0] y,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_aggregates_nested_array(
input [7:0][3:0][15:0] a,
output [7:0][3:0][15:0] y
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_aggregates_product(
input struct packed {logic [7:0] x; logic [7:0] y; } a,
output struct packed {logic [7:0] x; logic [7:0] y; } y
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_aggregates_product(
input [7:0] a_x,
a_y,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_aggregates_tuple(
input struct packed {logic [7:0] _0; logic [7:0] _1; } a,
output struct packed {logic [7:0] _0; logic [7:0] _1; } y
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/simple_array_of_bit.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_array_of_bit(
input [7:0] I,
output [7:0] O
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/simple_array_slice.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_array_slice(
input [11:0][7:0] a,
output [3:0][7:0] y
Expand Down
4 changes: 2 additions & 2 deletions tests/test_backend/test_mlir/golds/simple_bind.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_bind_asserts(
input I,
O,
Expand All @@ -25,7 +25,7 @@ endmodule

// ----- 8< ----- FILE "bindfile.sv" ----- 8< -----

// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
bind simple_bind simple_bind_asserts simple_bind_asserts_inst (
.I (I),
.O (Register_inst0),
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/simple_clock_cast.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_clock_cast(
input I,
output O
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/simple_comb.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_comb(
input [15:0] a,
b,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module proj_simple_comb(
input [15:0] a,
b,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/simple_compile_guard.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module COND1_compile_guard(
input port_0,
port_1
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/simple_constant.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_constant(
input [7:0] I,
output [7:0] O
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_coreir_common_lib_mux_n_wrapper(
input [7:0][5:0] I_data,
input [2:0] I_sel,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_custom_verilog_name_custom_name(
input I,
output O
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/simple_decl_external.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
// external module simple_decl

module simple_decl_external(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_disallow_local_variables(
input [1:0] x,
input s,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_disallow_local_variables(
input [1:0] x,
input s,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/simple_div.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_div(
input [15:0] a,
b,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_duplicate_symbols(
input I,
output [1:0] O
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/simple_hierarchy.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_comb(
input [15:0] a,
b,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_mlir/golds/simple_inline_verilog.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_inline_verilog(
input I,
output O
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_inline_verilog2(
input I,
output O
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_length_one_array(
input [0:0][7:0] I,
output [7:0] O
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by CIRCT firtool-1.48.0-34-g7018fb13b
// Generated by CIRCT firtool-1.51.0-75-gbecb4c0ef
module simple_length_one_bits(
input I,
output O
Expand Down
Loading

0 comments on commit 23db17a

Please sign in to comment.