aboutsummaryrefslogtreecommitdiffstats
path: root/generic/viaduct/example/example_map.v
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-12-30 13:18:34 +0000
committergatecat <gatecat@ds0.me>2022-01-04 20:19:29 +0000
commite88bd34c02272ecdad6295123941d9040fa4f043 (patch)
tree2ff879a3a856d19f61cc0c0875e7a3aa7fba7ac1 /generic/viaduct/example/example_map.v
parent089ca8258e6f4dc93f8d39594c1109a8578cdc98 (diff)
downloadnextpnr-e88bd34c02272ecdad6295123941d9040fa4f043.tar.gz
nextpnr-e88bd34c02272ecdad6295123941d9040fa4f043.tar.bz2
nextpnr-e88bd34c02272ecdad6295123941d9040fa4f043.zip
Viaduct API for a hybrid between generic and full-custom arch
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'generic/viaduct/example/example_map.v')
-rw-r--r--generic/viaduct/example/example_map.v12
1 files changed, 12 insertions, 0 deletions
diff --git a/generic/viaduct/example/example_map.v b/generic/viaduct/example/example_map.v
new file mode 100644
index 00000000..f701f0ed
--- /dev/null
+++ b/generic/viaduct/example/example_map.v
@@ -0,0 +1,12 @@
+module \$lut (A, Y);
+ parameter WIDTH = 0;
+ parameter LUT = 0;
+ input [WIDTH-1:0] A;
+ output Y;
+
+ localparam rep = 1<<(4-WIDTH);
+
+ LUT4 #(.INIT({rep{LUT}})) _TECHMAP_REPLACE_ (.I(A), .F(Y));
+endmodule
+
+module \$_DFF_P_ (input D, C, output Q); DFF _TECHMAP_REPLACE_ (.D(D), .Q(Q), .CLK(C)); endmodule