forked from YosysHQ/yosys
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from thiskappaisgrey/thiskappaisgrey/lakeroad-b…
…ackend-tests Add a new test for the not cell.
- Loading branch information
Showing
4 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
read_verilog -sv <<EOF | ||
module test(input [2:0] a, output [2:0] out); | ||
// assign out = ~ a; | ||
always_comb begin | ||
case (a) | ||
2'b01: out = 2'b10; | ||
2'b00: out = 2'b10; | ||
2'b10: out = 2'b00; | ||
2'b11: out = 2'b01; | ||
default: out = 2'b01; | ||
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 | ||
# Writing the verilog first with "-noattr" doesn't cause infinite loop | ||
# write_verilog -noattr simple-mux.v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |