mirror of
https://github.com/YosysHQ/yosys.git
synced 2026-08-22 14:17:27 +02:00
gate2lut: new techlib, for converting Yosys gates to FPGA LUTs.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
*.log
|
||||
@@ -0,0 +1,13 @@
|
||||
design -save preopt
|
||||
|
||||
simplemap
|
||||
techmap -map +/gate2lut.v -D LUT_WIDTH=4
|
||||
select -assert-count 1 t:$lut
|
||||
design -stash postopt
|
||||
|
||||
design -copy-from preopt -as preopt top
|
||||
design -copy-from postopt -as postopt top
|
||||
equiv_make preopt postopt equiv
|
||||
prep -flatten -top equiv
|
||||
equiv_induct
|
||||
equiv_status -assert
|
||||
@@ -0,0 +1,5 @@
|
||||
module top(...);
|
||||
input a, b;
|
||||
output y;
|
||||
assign y = a&b;
|
||||
endmodule
|
||||
@@ -0,0 +1,5 @@
|
||||
module top(...);
|
||||
input a, b, s;
|
||||
output y;
|
||||
assign y = s?a:b;
|
||||
endmodule
|
||||
@@ -0,0 +1,5 @@
|
||||
module top(...);
|
||||
input a;
|
||||
output y;
|
||||
assign y = ~a;
|
||||
endmodule
|
||||
@@ -0,0 +1,5 @@
|
||||
module top(...);
|
||||
input a, b;
|
||||
output y;
|
||||
assign y = a|b;
|
||||
endmodule
|
||||
@@ -0,0 +1,5 @@
|
||||
module top(...);
|
||||
input a, b;
|
||||
output y;
|
||||
assign y = a^b;
|
||||
endmodule
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
for x in *.v; do
|
||||
echo "Running $x.."
|
||||
../../yosys -q -s check_map.ys -l ${x%.v}.log $x
|
||||
done
|
||||
Reference in New Issue
Block a user