summaryrefslogtreecommitdiff
path: root/manual/APPNOTE_011_Design_Investigation
diff options
context:
space:
mode:
Diffstat (limited to 'manual/APPNOTE_011_Design_Investigation')
-rw-r--r--manual/APPNOTE_011_Design_Investigation/.gitignore1
-rw-r--r--manual/APPNOTE_011_Design_Investigation/make.sh4
-rw-r--r--manual/APPNOTE_011_Design_Investigation/splice.v9
3 files changed, 13 insertions, 1 deletions
diff --git a/manual/APPNOTE_011_Design_Investigation/.gitignore b/manual/APPNOTE_011_Design_Investigation/.gitignore
index 6d396bb3..b6fb3068 100644
--- a/manual/APPNOTE_011_Design_Investigation/.gitignore
+++ b/manual/APPNOTE_011_Design_Investigation/.gitignore
@@ -1,3 +1,4 @@
example_00.dot
example_01.dot
example_02.dot
+splice.dot
diff --git a/manual/APPNOTE_011_Design_Investigation/make.sh b/manual/APPNOTE_011_Design_Investigation/make.sh
index 31820695..60c6c6be 100644
--- a/manual/APPNOTE_011_Design_Investigation/make.sh
+++ b/manual/APPNOTE_011_Design_Investigation/make.sh
@@ -1,6 +1,8 @@
#!/bin/bash
../../yosys example.ys
-sed -i '/^label=/ d;' example_*.dot
+../../yosys -p 'proc; opt; show -format dot -prefix splice' splice.v
+sed -i '/^label=/ d;' example_*.dot splice.dot
dot -Tpdf -o example_00.pdf example_00.dot
dot -Tpdf -o example_01.pdf example_01.dot
dot -Tpdf -o example_02.pdf example_02.dot
+dot -Tpdf -o splice.pdf splice.dot
diff --git a/manual/APPNOTE_011_Design_Investigation/splice.v b/manual/APPNOTE_011_Design_Investigation/splice.v
new file mode 100644
index 00000000..b6796c51
--- /dev/null
+++ b/manual/APPNOTE_011_Design_Investigation/splice.v
@@ -0,0 +1,9 @@
+module splice_demo(a, b, c, d, e, f, x, y);
+
+input [1:0] a, b, c, d, e, f;
+output [1:0] x = {a[0], a[1]};
+
+output [11:0] y;
+assign {y[11:4], y[1:0], y[3:2]} = {a, b, -{c, d}, ~{e, f}};
+
+endmodule