mirror of
https://github.com/hneemann/Digital.git
synced 2025-08-03 17:58:28 -04:00
minor layout changes
This commit is contained in:
parent
01b064a0be
commit
bc3b330d88
@ -35,34 +35,32 @@
|
||||
direction:="left";</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="-120" y="-160"/>
|
||||
<pos x="-300" y="20"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>GenericCode</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>generic</string>
|
||||
<string>sh:=bitsNeededFor(args.dataBits)-1;
|
||||
|
||||
circuit:="";
|
||||
<string>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";</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="-780" y="-40"/>
|
||||
<pos x="-300" y="200"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
@ -122,7 +120,7 @@ this.'Output Splitting'="1*"+sh;</string>
|
||||
{{de Ein BarrelShifter implementiert durch Bauteilerzeugung.}}</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="-780" y="-280"/>
|
||||
<pos x="-300" y="-100"/>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
|
Loading…
x
Reference in New Issue
Block a user