summaryrefslogtreecommitdiff
path: root/hdl/core
diff options
context:
space:
mode:
Diffstat (limited to 'hdl/core')
-rw-r--r--hdl/core/alu.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/hdl/core/alu.py b/hdl/core/alu.py
index 8693ba7..789c26e 100644
--- a/hdl/core/alu.py
+++ b/hdl/core/alu.py
@@ -1,4 +1,3 @@
-from cmath import exp
from amaranth import *
from amaranth.sim import Simulator, Settle, Delay
from enum import Enum, unique
@@ -94,12 +93,12 @@ class ALU(Elaboratable):
with m.Case(AluOpCodes.lright.value):
tmp2 = Signal(33)
- m.d.comb += tmp2.eq(Cat(0, self.in1) >> self.in2[0:5])
+ m.d.comb += tmp2.eq(Cat(0, self.in1) >> self.in2)
m.d.comb += self.tmp.eq(Cat(tmp2[1:33], tmp2[0])) # move shifted bit to carry bit
with m.Case(AluOpCodes.aright.value):
tmp2 = Signal(33)
- m.d.comb += tmp2.eq(Cat(0, self.in1).as_signed() >> self.in2[0:5])
+ m.d.comb += tmp2.eq(Cat(0, self.in1).as_signed() >> self.in2)
m.d.comb += self.tmp.eq(Cat(tmp2[1:33], tmp2[0])) # move shifted bit to carry bit
with m.Case(AluOpCodes.multul.value):