summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjjsuperpower <jjs29356@gmail.com>2022-06-24 10:25:37 -0500
committerjjsuperpower <jjs29356@gmail.com>2022-06-24 10:25:37 -0500
commita850fe384b0fc44cec226137bfce3f7259027896 (patch)
tree212d0b2266dc33732aaf1143b7a2dd9e91f3fea8
parent74d4c111a16c955a0a8a60a6bdc32a27242c9e5b (diff)
testing multilevel convert
-rw-r--r--hdl/testing/top.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/hdl/testing/top.py b/hdl/testing/top.py
new file mode 100644
index 0000000..55c5714
--- /dev/null
+++ b/hdl/testing/top.py
@@ -0,0 +1,28 @@
+from myhdl import *
+from constants import GEN_VERILOG
+from shift_reg import ShiftReg
+
+logic = ShiftReg.logic
+
+
+@block
+def top(clk, reset, in0, out0):
+
+ n0 = Signal(modbv(0)[8:])
+
+
+ sr0 = logic(clk=clk, reset=reset, in0=in0, out0=n0)
+ sr1 = logic(clk=clk, reset=reset, in0=n0[7], out0=out0)
+
+ return sr0, sr1
+
+def convert():
+ reset = ResetSignal(0, 0, True)
+ clk = Signal(bool(0))
+ in0 = Signal(bool(0))
+ out0 = Signal(modbv(0)[8:])
+
+ inst = top(reset=reset, clk=clk, in0=in0, out0=out0)
+ inst.convert(hdl='Verilog', path=GEN_VERILOG)
+
+convert() \ No newline at end of file