minor layout changes

This commit is contained in:
hneemann 2021-01-07 20:05:37 +01:00
parent 01b064a0be
commit bc3b330d88

View File

@ -35,34 +35,32 @@
direction:=&quot;left&quot;;</string> direction:=&quot;left&quot;;</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:=&quot;&quot;;
circuit:=&quot;&quot;;
if (args.direction=&quot;right&quot;) { if (args.direction=&quot;right&quot;) {
circuit=&quot;shift-fixed-right-inc.dig&quot;; shiftCircuit=&quot;shift-fixed-right-inc.dig&quot;;
} else { } else {
if (args.direction=&quot;arith&quot;) { if (args.direction=&quot;arith&quot;) {
circuit=&quot;shift-fixed-arith-right-inc.dig&quot;; shiftCircuit=&quot;shift-fixed-arith-right-inc.dig&quot;;
} else { } else {
if (args.direction=&quot;left&quot;) { if (args.direction=&quot;left&quot;) {
circuit=&quot;shift-fixed-left-inc.dig&quot;; shiftCircuit=&quot;shift-fixed-left-inc.dig&quot;;
} else { } else {
panic(&quot;only \&quot;left\&quot;, \&quot;right\&quot; or \&quot;arith\&quot; is allowed as direction, not \&quot;&quot;+args.direction+&quot;\&quot;!&quot;); panic(&quot;only \&quot;left\&quot;, \&quot;right\&quot; or \&quot;arith\&quot; is allowed as direction, not \&quot;&quot;+args.direction+&quot;\&quot;!&quot;);
} }
} }
} }
sh:=bitsNeededFor(args.dataBits)-1;
for (i:=0;i&lt;sh;i++) { for (i:=0;i&lt;sh;i++) {
x:= i*5+2; x:= i*5+2;
s:=addComponent(circuit,x,0); s:=addComponent(shiftCircuit,x,0);
s.shift:=1&lt;&lt;i; s.shift:=1&lt;&lt;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=&quot;Out&quot;;</string> o.Label=&quot;Out&quot;;</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.&apos;Output Splitting&apos;=&quot;1*&quot;+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>