mirror of
https://github.com/hneemann/Digital.git
synced 2025-08-04 02:08:00 -04:00
minor layout changes
This commit is contained in:
parent
01b064a0be
commit
bc3b330d88
@ -35,34 +35,32 @@
|
|||||||
direction:="left";</string>
|
direction:="left";</string>
|
||||||
</entry>
|
</entry>
|
||||||
</elementAttributes>
|
</elementAttributes>
|
||||||
<pos x="-120" y="-160"/>
|
<pos x="-300" y="20"/>
|
||||||
</visualElement>
|
</visualElement>
|
||||||
<visualElement>
|
<visualElement>
|
||||||
<elementName>GenericCode</elementName>
|
<elementName>GenericCode</elementName>
|
||||||
<elementAttributes>
|
<elementAttributes>
|
||||||
<entry>
|
<entry>
|
||||||
<string>generic</string>
|
<string>generic</string>
|
||||||
<string>sh:=bitsNeededFor(args.dataBits)-1;
|
<string>shiftCircuit:="";
|
||||||
|
|
||||||
circuit:="";
|
|
||||||
if (args.direction="right") {
|
if (args.direction="right") {
|
||||||
circuit="shift-fixed-right-inc.dig";
|
shiftCircuit="shift-fixed-right-inc.dig";
|
||||||
} else {
|
} else {
|
||||||
if (args.direction="arith") {
|
if (args.direction="arith") {
|
||||||
circuit="shift-fixed-arith-right-inc.dig";
|
shiftCircuit="shift-fixed-arith-right-inc.dig";
|
||||||
} else {
|
} else {
|
||||||
if (args.direction="left") {
|
if (args.direction="left") {
|
||||||
circuit="shift-fixed-left-inc.dig";
|
shiftCircuit="shift-fixed-left-inc.dig";
|
||||||
} else {
|
} else {
|
||||||
panic("only \"left\", \"right\" or \"arith\" is allowed as direction, not \""+args.direction+"\"!");
|
panic("only \"left\", \"right\" or \"arith\" is allowed as direction, not \""+args.direction+"\"!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sh:=bitsNeededFor(args.dataBits)-1;
|
||||||
for (i:=0;i<sh;i++) {
|
for (i:=0;i<sh;i++) {
|
||||||
x:= i*5+2;
|
x:= i*5+2;
|
||||||
s:=addComponent(circuit,x,0);
|
s:=addComponent(shiftCircuit,x,0);
|
||||||
s.shift:=1<<i;
|
s.shift:=1<<i;
|
||||||
|
|
||||||
addWire(x+3,1,x+5,0);
|
addWire(x+3,1,x+5,0);
|
||||||
@ -77,7 +75,7 @@ o.Bits=args.dataBits;
|
|||||||
o.Label="Out";</string>
|
o.Label="Out";</string>
|
||||||
</entry>
|
</entry>
|
||||||
</elementAttributes>
|
</elementAttributes>
|
||||||
<pos x="-780" y="-40"/>
|
<pos x="-300" y="200"/>
|
||||||
</visualElement>
|
</visualElement>
|
||||||
<visualElement>
|
<visualElement>
|
||||||
<elementName>In</elementName>
|
<elementName>In</elementName>
|
||||||
@ -122,7 +120,7 @@ this.'Output Splitting'="1*"+sh;</string>
|
|||||||
{{de Ein BarrelShifter implementiert durch Bauteilerzeugung.}}</string>
|
{{de Ein BarrelShifter implementiert durch Bauteilerzeugung.}}</string>
|
||||||
</entry>
|
</entry>
|
||||||
</elementAttributes>
|
</elementAttributes>
|
||||||
<pos x="-780" y="-280"/>
|
<pos x="-300" y="-100"/>
|
||||||
</visualElement>
|
</visualElement>
|
||||||
</visualElements>
|
</visualElements>
|
||||||
<wires>
|
<wires>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user