mirror of
https://github.com/annoyatron255/yosys4gal.git
synced 2024-12-22 18:52:23 +00:00
Add tiny_xor testcase and convince ABC to work right
This commit is contained in:
parent
dcacb44cce
commit
3489b97b16
|
@ -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
6
testcases/tiny_xor.pcf
Normal 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
8
testcases/tiny_xor.v
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
module tiny_xor (A, Y);
|
||||||
|
|
||||||
|
input [4:0] A;
|
||||||
|
output Y;
|
||||||
|
|
||||||
|
assign Y = ^A;
|
||||||
|
|
||||||
|
endmodule
|
Loading…
Reference in a new issue