diff --git a/src/main/dig/generic/barrelShifter/barrelShifter2.dig b/src/main/dig/generic/barrelShifter/barrelShifter2.dig
index 56f4d3c1d..783b8e6fb 100644
--- a/src/main/dig/generic/barrelShifter/barrelShifter2.dig
+++ b/src/main/dig/generic/barrelShifter/barrelShifter2.dig
@@ -35,34 +35,32 @@
direction:="left";
-
+
GenericCode
generic
- sh:=bitsNeededFor(args.dataBits)-1;
-
-circuit:="";
+ shiftCircuit:="";
if (args.direction="right") {
- circuit="shift-fixed-right-inc.dig";
+ shiftCircuit="shift-fixed-right-inc.dig";
} else {
if (args.direction="arith") {
- circuit="shift-fixed-arith-right-inc.dig";
+ shiftCircuit="shift-fixed-arith-right-inc.dig";
} else {
if (args.direction="left") {
- circuit="shift-fixed-left-inc.dig";
+ shiftCircuit="shift-fixed-left-inc.dig";
} else {
panic("only \"left\", \"right\" or \"arith\" is allowed as direction, not \""+args.direction+"\"!");
}
}
}
-
+sh:=bitsNeededFor(args.dataBits)-1;
for (i:=0;i<sh;i++) {
x:= i*5+2;
- s:=addComponent(circuit,x,0);
+ s:=addComponent(shiftCircuit,x,0);
s.shift:=1<<i;
addWire(x+3,1,x+5,0);
@@ -77,7 +75,7 @@ o.Bits=args.dataBits;
o.Label="Out";
-
+
In
@@ -122,7 +120,7 @@ this.'Output Splitting'="1*"+sh;
{{de Ein BarrelShifter implementiert durch Bauteilerzeugung.}}
-
+