Add tiny_xor testcase and convince ABC to work right

This commit is contained in:
annoyatron255 2024-05-05 03:20:30 -05:00
parent dcacb44cce
commit 3489b97b16
No known key found for this signature in database
GPG key ID: 95283811BE4E93F8
3 changed files with 18 additions and 2 deletions

View file

@ -18,7 +18,7 @@ set target [expr {$argc == 2 ? [lindex $argv 1] : "GAL16V8"}]
if {$target == "GAL16V8"} { if {$target == "GAL16V8"} {
set num_max_products 7 set num_max_products 7
} elseif {$target == "GAL22V10"} { } elseif {$target == "GAL22V10"} {
set num_max_products 11 set num_max_products 16
} else { } else {
puts "Invalid target chip: GAL16V8 and GAL22V10 available" puts "Invalid target chip: GAL16V8 and GAL22V10 available"
exit exit
@ -58,7 +58,9 @@ if {$num_regs > 0} { set num_inputs_regs [expr $num_inputs_regs - 1] }
#techmap #techmap
#select * #select *
abc -sop -I $num_inputs_regs -P $num_max_products #abc -sop -I $num_inputs_regs -P $num_max_products
# Use infinite inputs since ABC is dumb and this usually gets around it (shouldn't cause problems)
abc -sop -I 100000 -P $num_max_products
opt opt
clean -purge clean -purge

6
testcases/tiny_xor.pcf Normal file
View file

@ -0,0 +1,6 @@
set_io A[0] 2
set_io A[1] 3
set_io A[2] 4
set_io A[3] 5
set_io A[4] 6
set_io Y 23

8
testcases/tiny_xor.v Normal file
View file

@ -0,0 +1,8 @@
module tiny_xor (A, Y);
input [4:0] A;
output Y;
assign Y = ^A;
endmodule