From 3489b97b1675f08b52dd15428f63d0ce251795e6 Mon Sep 17 00:00:00 2001 From: annoyatron255 Date: Sun, 5 May 2024 03:20:30 -0500 Subject: [PATCH] Add tiny_xor testcase and convince ABC to work right --- synth_gal.tcl | 6 ++++-- testcases/tiny_xor.pcf | 6 ++++++ testcases/tiny_xor.v | 8 ++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 testcases/tiny_xor.pcf create mode 100644 testcases/tiny_xor.v diff --git a/synth_gal.tcl b/synth_gal.tcl index 6e027e0..b4e4a65 100755 --- a/synth_gal.tcl +++ b/synth_gal.tcl @@ -18,7 +18,7 @@ set target [expr {$argc == 2 ? [lindex $argv 1] : "GAL16V8"}] if {$target == "GAL16V8"} { set num_max_products 7 } elseif {$target == "GAL22V10"} { - set num_max_products 11 + set num_max_products 16 } else { puts "Invalid target chip: GAL16V8 and GAL22V10 available" exit @@ -58,7 +58,9 @@ if {$num_regs > 0} { set num_inputs_regs [expr $num_inputs_regs - 1] } #techmap #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 clean -purge diff --git a/testcases/tiny_xor.pcf b/testcases/tiny_xor.pcf new file mode 100644 index 0000000..f0445ff --- /dev/null +++ b/testcases/tiny_xor.pcf @@ -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 diff --git a/testcases/tiny_xor.v b/testcases/tiny_xor.v new file mode 100644 index 0000000..bd60f20 --- /dev/null +++ b/testcases/tiny_xor.v @@ -0,0 +1,8 @@ +module tiny_xor (A, Y); + +input [4:0] A; +output Y; + +assign Y = ^A; + +endmodule