summaryrefslogtreecommitdiff
path: root/hdl_lab/hdl/shift_reg.py
diff options
context:
space:
mode:
authorjjsuperpower <jjs29356@gmail.com>2022-06-29 00:28:19 -0500
committerjjsuperpower <jjs29356@gmail.com>2022-06-29 00:28:19 -0500
commitfede3bb0e30f36b0e073fb9a827ab8a48c1608a9 (patch)
tree0147a501864fd63795089e115b95d9a61fc9baaa /hdl_lab/hdl/shift_reg.py
parent7947465eba567b1982e81e38771328d8d1303fce (diff)
fixed shift_reg for export
Diffstat (limited to 'hdl_lab/hdl/shift_reg.py')
-rw-r--r--hdl_lab/hdl/shift_reg.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/hdl_lab/hdl/shift_reg.py b/hdl_lab/hdl/shift_reg.py
index d463a9f..9c1c6be 100644
--- a/hdl_lab/hdl/shift_reg.py
+++ b/hdl_lab/hdl/shift_reg.py
@@ -27,10 +27,10 @@ class ShiftReg(Myhdl_Wrapper):
else:
if not left_right:
out0.next[width:1] = out0[width-1:0]
- out0.next[0] = in0
+ out0.next[1:0] = in0
else:
out0.next[width-1:0] = out0[width:1]
- out0.next[width-1] = in0
+ out0.next[width:width-1] = in0
return shifter
@@ -100,7 +100,7 @@ class ShiftReg(Myhdl_Wrapper):
def export(self):
reset = Signal(False)
clk = Signal(bool(0))
- load = Signal(intbv(0x00)[8:])
+ load = Signal(intbv(0xA5)[8:])
in0 = Signal(bool(0))
out0 = Signal(modbv(int(load))[8:])
left_right = Signal(bool(0))