Skip to content

Commit

Permalink
Change the tests to the other format
Browse files Browse the repository at this point in the history
  • Loading branch information
thiskappaisgrey committed Dec 12, 2023
1 parent 5b4860c commit 67b129c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: "$YOSYS" -p 'read_verilog -sv %s; prep -top test; pmuxtree;\
// RUN: proc; opt; memory; opt; techmap; opt; abc; opt; write_lakeroad'
read_verilog -sv <<EOF
module test(input [2:0] a, output [2:0] out);
// assign out = ~ a;
always_comb begin
Expand All @@ -12,4 +11,10 @@ module test(input [2:0] a, output [2:0] out);
endcase
end
endmodule

EOF
# Optimize out the mux to simple gates.
prep -top test; pmuxtree;
proc; opt; memory; opt;
techmap; opt;
abc; opt;
write_lakeroad
15 changes: 15 additions & 0 deletions backends/lakeroad/tests/simple-mux1.ys
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
read_verilog -sv <<EOF
/* This module is generated by using "simple-mux.ys" + "write_verilog -noattr simple-mux.v". Delete this once you find the problem(most likely due to attributes). */
module test(a, out);
wire _0_;
input [2:0] a;
wire [2:0] a;
output [2:0] out;
wire [2:0] out;
assign _0_ = a[0] & a[1];
assign out[1] = ~(a[1] | a[2]);
assign out[0] = a[2] | _0_;
assign out[2] = 1'h0;
endmodule
EOF
write_lakeroad
14 changes: 0 additions & 14 deletions backends/lakeroad/tests/simple-not.sv

This file was deleted.

6 changes: 6 additions & 0 deletions backends/lakeroad/tests/simple-not.ys
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
read_verilog -sv <<EOF
module test(input a, output out);
assign out = ~ a;
endmodule
EOF
write_lakeroad

0 comments on commit 67b129c

Please sign in to comment.