mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-28 15:32:40 -04:00
parent
17e07b70da
commit
fbcc3d6cf2
@ -0,0 +1,120 @@
|
||||
package de.neemann.digital.core.arithmetic;
|
||||
|
||||
import de.neemann.digital.core.Node;
|
||||
import de.neemann.digital.core.NodeException;
|
||||
import de.neemann.digital.core.ObservableValue;
|
||||
import de.neemann.digital.core.ObservableValues;
|
||||
import de.neemann.digital.core.element.Element;
|
||||
import de.neemann.digital.core.element.ElementAttributes;
|
||||
import de.neemann.digital.core.element.ElementTypeDescription;
|
||||
import de.neemann.digital.core.element.Keys;
|
||||
import static de.neemann.digital.core.element.PinInfo.input;
|
||||
|
||||
/**
|
||||
* A barrelshifter
|
||||
*
|
||||
* @author heintz
|
||||
*/
|
||||
public class BarrelShifter extends Node implements Element {
|
||||
|
||||
/**
|
||||
* The barrelshifter description
|
||||
*/
|
||||
public static final ElementTypeDescription DESCRIPTION = new ElementTypeDescription(BarrelShifter.class, input("in"), input("shift"))
|
||||
.addAttribute(Keys.ROTATE)
|
||||
.addAttribute(Keys.LABEL)
|
||||
.addAttribute(Keys.BITS)
|
||||
.addAttribute(Keys.BARREL_SIGNED)
|
||||
.addAttribute(Keys.DIRECTION)
|
||||
.addAttribute(Keys.BARREL_SHIFTER_MODE);
|
||||
|
||||
private final ObservableValue out;
|
||||
private final int bits;
|
||||
private final int shiftbits;
|
||||
private final BarrelShifterMode mode;
|
||||
private final boolean signed;
|
||||
private final LeftRightFormat direction;
|
||||
|
||||
private ObservableValue in;
|
||||
private ObservableValue shift;
|
||||
private long value;
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param attributes
|
||||
* the attributes
|
||||
*/
|
||||
public BarrelShifter(ElementAttributes attributes) {
|
||||
direction = attributes.get(Keys.DIRECTION);
|
||||
mode = attributes.get(Keys.BARREL_SHIFTER_MODE);
|
||||
bits = attributes.get(Keys.BITS);
|
||||
signed = attributes.get(Keys.BARREL_SIGNED);
|
||||
|
||||
int sbits = 1;
|
||||
while ((1 << sbits) < bits)
|
||||
sbits++;
|
||||
|
||||
if (signed)
|
||||
sbits++;
|
||||
shiftbits = sbits;
|
||||
|
||||
this.out = new ObservableValue("out", bits).setPinDescription(DESCRIPTION);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readInputs() throws NodeException {
|
||||
long inval = in.getValue();
|
||||
long shiftval;
|
||||
|
||||
if (signed) {
|
||||
shiftval = shift.getValueSigned();
|
||||
} else {
|
||||
shiftval = shift.getValue();
|
||||
}
|
||||
|
||||
if (direction == LeftRightFormat.right) {
|
||||
shiftval = -shiftval;
|
||||
}
|
||||
|
||||
value = 0;
|
||||
|
||||
if (shiftval < 0) { // shift or rotate right
|
||||
shiftval = -shiftval;
|
||||
if (mode == BarrelShifterMode.rotate) {
|
||||
shiftval = shiftval % bits;
|
||||
value |= inval << (bits - shiftval);
|
||||
}
|
||||
value |= inval >> shiftval;
|
||||
if ((mode == BarrelShifterMode.arithmetic) && ((inval & (1 << (bits - 1))) != 0)) {
|
||||
int mask = (1 << (bits)) - 1;
|
||||
mask = mask >> shiftval;
|
||||
value |= ~mask;
|
||||
}
|
||||
|
||||
} else { // shift or rotate left
|
||||
if (mode == BarrelShifterMode.rotate) {
|
||||
shiftval = shiftval % bits;
|
||||
value |= inval >> (bits - shiftval);
|
||||
}
|
||||
value |= inval << shiftval;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeOutputs() throws NodeException {
|
||||
out.setValue(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInputs(ObservableValues inputs) throws NodeException {
|
||||
in = inputs.get(0).addObserverToValue(this).checkBits(bits, this, 0);
|
||||
shift = inputs.get(1).addObserverToValue(this).checkBits(shiftbits, this, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ObservableValues getOutputs() {
|
||||
return out.asList();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package de.neemann.digital.core.arithmetic;
|
||||
|
||||
|
||||
import de.neemann.digital.core.ObservableValue;
|
||||
|
||||
/**
|
||||
* @author heintz
|
||||
*/
|
||||
public enum BarrelShifterMode {
|
||||
/**
|
||||
* the default format as defined in {@link ObservableValue#getValueString()}
|
||||
*/
|
||||
normal,
|
||||
/**
|
||||
* rotate
|
||||
*/
|
||||
rotate,
|
||||
/**
|
||||
* arithmetic
|
||||
*/
|
||||
arithmetic;
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package de.neemann.digital.core.arithmetic;
|
||||
|
||||
|
||||
import de.neemann.digital.core.ObservableValue;
|
||||
|
||||
/**
|
||||
* @author heintz
|
||||
*/
|
||||
public enum LeftRightFormat {
|
||||
/**
|
||||
* the default format as defined in {@link ObservableValue#getValueString()}
|
||||
*/
|
||||
left,
|
||||
/**
|
||||
* right
|
||||
*/
|
||||
right;
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
package de.neemann.digital.core.element;
|
||||
|
||||
import de.neemann.digital.analyse.expression.format.FormatToExpression;
|
||||
import de.neemann.digital.core.arithmetic.BarrelShifterMode;
|
||||
import de.neemann.digital.core.arithmetic.LeftRightFormat;
|
||||
import de.neemann.digital.core.io.InValue;
|
||||
import de.neemann.digital.core.io.IntFormat;
|
||||
import de.neemann.digital.core.memory.DataField;
|
||||
@ -300,6 +302,24 @@ public final class Keys {
|
||||
public static final Key<Boolean> RELAY_NORMALLY_CLOSED
|
||||
= new Key<>("relayNormallyClosed", false);
|
||||
|
||||
/**
|
||||
* flag used by a barrelshifter to indicate if data are rotated
|
||||
*/
|
||||
public static final Key<BarrelShifterMode> BARREL_SHIFTER_MODE
|
||||
= new Key.KeyEnum<>("barrelShifterMode", BarrelShifterMode.normal, BarrelShifterMode.values());
|
||||
|
||||
/**
|
||||
* flag used by a barrelshifter to indicate shift direction
|
||||
*/
|
||||
public static final Key<LeftRightFormat> DIRECTION
|
||||
= new Key.KeyEnum<>("direction", LeftRightFormat.left, LeftRightFormat.values());
|
||||
|
||||
/**
|
||||
* flag used by a barrelshifter to indicate if shift value is signed
|
||||
*/
|
||||
public static final Key<Boolean> BARREL_SIGNED
|
||||
= new Key<>("barrelSigned", false);
|
||||
|
||||
/**
|
||||
* Used to indicate if the 7-seg display has a common cathode output
|
||||
*/
|
||||
|
@ -6,6 +6,8 @@ import com.thoughtworks.xstream.io.xml.StaxDriver;
|
||||
import de.neemann.digital.core.ObservableValue;
|
||||
import de.neemann.digital.core.ObservableValues;
|
||||
import de.neemann.digital.core.Observer;
|
||||
import de.neemann.digital.core.arithmetic.BarrelShifterMode;
|
||||
import de.neemann.digital.core.arithmetic.LeftRightFormat;
|
||||
import de.neemann.digital.core.element.ElementAttributes;
|
||||
import de.neemann.digital.core.element.Keys;
|
||||
import de.neemann.digital.core.element.PinDescription;
|
||||
@ -68,6 +70,8 @@ public class Circuit {
|
||||
xStream.alias("wire", Wire.class);
|
||||
xStream.alias("circuit", Circuit.class);
|
||||
xStream.alias("intFormat", IntFormat.class);
|
||||
xStream.alias("barrelShifterMode", BarrelShifterMode.class);
|
||||
xStream.alias("direction", LeftRightFormat.class);
|
||||
xStream.alias("rotation", Rotation.class);
|
||||
xStream.aliasAttribute(Rotation.class, "rotation", "rotation");
|
||||
xStream.alias("language", Language.class);
|
||||
|
@ -119,6 +119,7 @@ public class ElementLibrary implements Iterable<ElementLibrary.ElementContainer>
|
||||
.add(Add.DESCRIPTION)
|
||||
.add(Sub.DESCRIPTION)
|
||||
.add(Mul.DESCRIPTION)
|
||||
.add(BarrelShifter.DESCRIPTION)
|
||||
.add(Comparator.DESCRIPTION)
|
||||
.add(Neg.DESCRIPTION)
|
||||
.add(BitCount.DESCRIPTION))
|
||||
|
@ -2,6 +2,8 @@ package de.neemann.digital.gui.components;
|
||||
|
||||
import de.neemann.digital.analyse.expression.format.FormatToExpression;
|
||||
import de.neemann.digital.core.NodeException;
|
||||
import de.neemann.digital.core.arithmetic.BarrelShifterMode;
|
||||
import de.neemann.digital.core.arithmetic.LeftRightFormat;
|
||||
import de.neemann.digital.core.element.*;
|
||||
import de.neemann.digital.core.io.InValue;
|
||||
import de.neemann.digital.core.io.IntFormat;
|
||||
@ -51,6 +53,8 @@ public final class EditorFactory {
|
||||
add(Boolean.class, BooleanEditor.class);
|
||||
add(DataField.class, DataFieldEditor.class);
|
||||
add(Rotation.class, RotationEditor.class);
|
||||
add(BarrelShifterMode.class, BarrelShifterModeEditor.class);
|
||||
add(LeftRightFormat.class, LeftRightFormatsEditor.class);
|
||||
add(IntFormat.class, IntFormatsEditor.class);
|
||||
add(Language.class, LanguageEditor.class);
|
||||
add(TestCaseDescription.class, TestCaseDesctiptionEditor.class);
|
||||
@ -464,6 +468,18 @@ public final class EditorFactory {
|
||||
}
|
||||
}
|
||||
|
||||
private static final class BarrelShifterModeEditor extends EnumEditor<BarrelShifterMode> {
|
||||
public BarrelShifterModeEditor(BarrelShifterMode value, Key<BarrelShifterMode> key) {
|
||||
super(value, key);
|
||||
}
|
||||
}
|
||||
|
||||
private static final class LeftRightFormatsEditor extends EnumEditor<LeftRightFormat> {
|
||||
public LeftRightFormatsEditor(LeftRightFormat value, Key<LeftRightFormat> key) {
|
||||
super(value, key);
|
||||
}
|
||||
}
|
||||
|
||||
private static class LanguageEditor extends LabelEditor<Language> {
|
||||
private JComboBox comb;
|
||||
|
||||
|
@ -211,6 +211,11 @@ Es können sowohl komplette Takte als auch einzelne Gatter-Veränderungen angeze
|
||||
<string name="elem_Mul_pin_a">Eingang a für Multiplikation.</string>
|
||||
<string name="elem_Mul_pin_b">Eingang b für Multiplikation.</string>
|
||||
<string name="elem_Mul_pin_mul">Ausgang mit dem Ergebnis der Multiplikation.</string>
|
||||
<string name="elem_BarrelShifter">Verschieber</string>
|
||||
<string name="elem_BarrelShifter_tt">Ein Baustein zum Bitschieben. Verschiebt Eingang in den an Eingang shift angegebenen Wert.</string>
|
||||
<string name="elem_BarrelShifter_pin_in">Eingang mit zu verschiebenden Bits.</string>
|
||||
<string name="elem_BarrelShifter_pin_shift">Eingang mit Weite der Verschiebung.</string>
|
||||
<string name="elem_BarrelShifter_pin_out">Ausgang mit dem Ergebnis der Verschiebeoperation.</string>
|
||||
<string name="elem_Multiplexer">Multiplexer</string>
|
||||
<string name="elem_Multiplexer_input">Der {0}. Eingang des Multiplexers.</string>
|
||||
<string name="elem_Multiplexer_output">Ausgeben wird der Wert, der am gewählten Eingang anliegt.</string>
|
||||
@ -608,6 +613,17 @@ Sind evtl. die Namen der Variablen nicht eindeutig?</string>
|
||||
<string name="key_intFormat_dec">Dezimal</string>
|
||||
<string name="key_intFormat_def">Vorgabe</string>
|
||||
<string name="key_intFormat_hex">Hexadezimal</string>
|
||||
<string name="key_barrelSigned">Verschiebeweite hat Vorzeichen</string>
|
||||
<string name="key_barrelSigned_tt">Verschiebeweite verwendet Zweierkomplement</string>
|
||||
<string name="key_barrelShifterMode">Modus</string>
|
||||
<string name="key_barrelShifterMode_tt">Modus des Verschiebung.</string>
|
||||
<string name="key_barrelShifterMode_normal">Normal</string>
|
||||
<string name="key_barrelShifterMode_rotate">Rotation</string>
|
||||
<string name="key_barrelShifterMode_arithmetic">Arithmetisch</string>
|
||||
<string name="key_direction">Richtung</string>
|
||||
<string name="key_direction_tt">Richtungsangabe.</string>
|
||||
<string name="key_direction_left">Links</string>
|
||||
<string name="key_direction_right">Rechts</string>
|
||||
<string name="key_maxStepCount">Maximale Messpunktezahl</string>
|
||||
<string name="key_maxStepCount_tt">Die maximale Anzahl an Messpunkten die gespeichert werden, bevor die ältesten Messungen verworfen werden.</string>
|
||||
<string name="key_microStep">Zeige Einzelgatterschritte</string>
|
||||
|
@ -207,6 +207,11 @@
|
||||
<string name="elem_Mul_pin_a">Input a for multiplication.</string>
|
||||
<string name="elem_Mul_pin_b">Input b for multiplication.</string>
|
||||
<string name="elem_Mul_pin_mul">Output for the result of the multiplication.</string>
|
||||
<string name="elem_BarrelShifter">Shift</string>
|
||||
<string name="elem_BarrelShifter_tt">A component for bit shifting. Shift input in by the value defined from input shift.</string>
|
||||
<string name="elem_BarrelShifter_pin_in">Input with bits to be shifted.</string>
|
||||
<string name="elem_BarrelShifter_pin_shift">Input with shift width.</string>
|
||||
<string name="elem_BarrelShifter_pin_out">Output with shifted value.</string>
|
||||
<string name="elem_Multiplexer">Multiplexer</string>
|
||||
<string name="elem_Multiplexer_input">The {0}. input of the multiplexer.</string>
|
||||
<string name="elem_Multiplexer_output">The value of the selected input.</string>
|
||||
@ -597,7 +602,18 @@ The names of the variables may not be unique.</string>
|
||||
<string name="key_intFormat_bin">bin</string>
|
||||
<string name="key_intFormat_dec">decimal</string>
|
||||
<string name="key_intFormat_def">default</string>
|
||||
<string name="key_intFormat_hex">hex</string>
|
||||
<string name="key_intFormat_hex">hex</string>
|
||||
<string name="key_barrelSigned">shift input has sign</string>
|
||||
<string name="key_barrelSigned_tt">shift input data has two complement format</string>
|
||||
<string name="key_barrelShifterMode">Mode</string>
|
||||
<string name="key_barrelShifterMode_tt">Mode of barrel shifter</string>
|
||||
<string name="key_barrelShifterMode_normal">Normal</string>
|
||||
<string name="key_barrelShifterMode_rotate">Rotate</string>
|
||||
<string name="key_barrelShifterMode_arithmetic">Arithmetic</string>
|
||||
<string name="key_direction">Direction</string>
|
||||
<string name="key_direction_tt">Set direction.</string>
|
||||
<string name="key_direction_left">left</string>
|
||||
<string name="key_direction_right">right</string>
|
||||
<string name="key_maxStepCount">Max number of steps to show</string>
|
||||
<string name="key_maxStepCount_tt">The maximal number of values stored. If the maximum number is reached, the oldest values are discarded.</string>
|
||||
<string name="key_microStep">Show single gate steps</string>
|
||||
|
@ -0,0 +1,157 @@
|
||||
package de.neemann.digital.core.arithmetic;
|
||||
|
||||
import static de.neemann.digital.core.ObservableValues.ovs;
|
||||
|
||||
import de.neemann.digital.TestExecuter;
|
||||
import de.neemann.digital.core.Model;
|
||||
import de.neemann.digital.core.ObservableValue;
|
||||
import de.neemann.digital.core.ObservableValues;
|
||||
import de.neemann.digital.core.element.ElementAttributes;
|
||||
import de.neemann.digital.core.element.Keys;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
/**
|
||||
* Created by heintz on 05.07.17.
|
||||
*/
|
||||
public class BarrelShifterTest extends TestCase {
|
||||
|
||||
public void testNormalUnsignedLeft() throws Exception{
|
||||
TestExecuter bsTest=getTestExecuter( BarrelShifterMode.normal, false, LeftRightFormat.left,6, 3);
|
||||
bsTest.check(0b001100, 0, 0b001100);
|
||||
bsTest.check(0b001100, 1, 0b011000);
|
||||
bsTest.check(0b001100, 2, 0b110000);
|
||||
bsTest.check(0b010001, 2, 0b000100);
|
||||
bsTest.check(0b001100, 3, 0b100000);
|
||||
bsTest.check(0b001100, 5, 0b000000);
|
||||
bsTest.check(0b001100, -1, 0b000000);
|
||||
bsTest.check(0b001100, -4, 0b000000);
|
||||
bsTest.check(0b001100, -5, 0b100000);
|
||||
}
|
||||
|
||||
public void testRotateUnsignedLeft() throws Exception{
|
||||
TestExecuter bsTest =getTestExecuter( BarrelShifterMode.rotate, false, LeftRightFormat.left,6, 3);
|
||||
bsTest.check(0b001100, 0, 0b001100);
|
||||
bsTest.check(0b001100, 1, 0b011000);
|
||||
bsTest.check(0b001100, 2, 0b110000);
|
||||
bsTest.check(0b010001, 2, 0b000101);
|
||||
bsTest.check(0b001100, 3, 0b100001);
|
||||
bsTest.check(0b001100, 5, 0b000110);
|
||||
bsTest.check(0b001100, -1, 0b011000);
|
||||
bsTest.check(0b001100, -4, 0b000011);
|
||||
bsTest.check(0b001100, -5, 0b100001);
|
||||
}
|
||||
|
||||
public void testNormalSignedLeft() throws Exception{
|
||||
TestExecuter bsTest=getTestExecuter( BarrelShifterMode.normal, true , LeftRightFormat.left, 6, 4);
|
||||
bsTest.check(0b001100, 0, 0b001100);
|
||||
bsTest.check(0b001100, 1, 0b011000);
|
||||
bsTest.check(0b001100, 2, 0b110000);
|
||||
bsTest.check(0b010001, 2, 0b000100);
|
||||
bsTest.check(0b001100, 3, 0b100000);
|
||||
bsTest.check(0b001100, 5, 0b000000);
|
||||
bsTest.check(0b001100, -1, 0b000110);
|
||||
bsTest.check(0b001100, -4, 0b000000);
|
||||
bsTest.check(0b001100, -5, 0b000000);
|
||||
}
|
||||
|
||||
public void testRotateSignedLeft() throws Exception{
|
||||
TestExecuter bsTest =getTestExecuter( BarrelShifterMode.rotate, true , LeftRightFormat.left, 6, 4);
|
||||
bsTest.check(0b001100, 0, 0b001100);
|
||||
bsTest.check(0b001100, 1, 0b011000);
|
||||
bsTest.check(0b001100, 2, 0b110000);
|
||||
bsTest.check(0b010001, 2, 0b000101);
|
||||
bsTest.check(0b001100, 3, 0b100001);
|
||||
bsTest.check(0b001100, 5, 0b000110);
|
||||
bsTest.check(0b001100, -1, 0b000110);
|
||||
bsTest.check(0b001100, -4, 0b110000);
|
||||
bsTest.check(0b001100, -5, 0b011000);
|
||||
}
|
||||
|
||||
public void testNormalUnsignedRigth() throws Exception{
|
||||
TestExecuter bsTest =getTestExecuter( BarrelShifterMode.normal, false, LeftRightFormat.right,6, 3);
|
||||
bsTest.check(0b001100, 0, 0b001100);
|
||||
bsTest.check(0b001100, 1, 0b000110);
|
||||
bsTest.check(0b001100, 2, 0b000011);
|
||||
bsTest.check(0b010001, 2, 0b000100);
|
||||
bsTest.check(0b001100, 3, 0b000001);
|
||||
bsTest.check(0b001100, 5, 0b000000);
|
||||
bsTest.check(0b001100, -1, 0b000000);
|
||||
bsTest.check(0b001100, -4, 0b000000);
|
||||
bsTest.check(0b001100, -5, 0b000001);
|
||||
}
|
||||
|
||||
public void testRotateUnsignedRigth() throws Exception{
|
||||
TestExecuter bsTest =getTestExecuter( BarrelShifterMode.rotate, false, LeftRightFormat.right,6, 3);
|
||||
bsTest.check(0b001100, 0, 0b001100);
|
||||
bsTest.check(0b001100, 1, 0b000110);
|
||||
bsTest.check(0b001100, 2, 0b000011);
|
||||
bsTest.check(0b010001, 2, 0b010100);
|
||||
bsTest.check(0b001100, 3, 0b100001);
|
||||
bsTest.check(0b001100, 5, 0b011000);
|
||||
bsTest.check(0b001100, -1, 0b000110);
|
||||
bsTest.check(0b001100, -4, 0b110000);
|
||||
bsTest.check(0b001100, -5, 0b100001);
|
||||
}
|
||||
|
||||
public void testArithmeticUnsignedRigth() throws Exception{
|
||||
TestExecuter bsTest =getTestExecuter( BarrelShifterMode.arithmetic, false, LeftRightFormat.right,6, 3);
|
||||
bsTest.check(0b001100, 0, 0b001100);
|
||||
bsTest.check(0b001100, 1, 0b000110);
|
||||
bsTest.check(0b001100, 2, 0b000011);
|
||||
bsTest.check(0b010001, 2, 0b000100);
|
||||
bsTest.check(0b001100, 3, 0b000001);
|
||||
bsTest.check(0b001100, 5, 0b000000);
|
||||
bsTest.check(0b001100, -1, 0b000000);
|
||||
bsTest.check(0b001100, -4, 0b000000);
|
||||
bsTest.check(0b001100, -5, 0b000001);
|
||||
bsTest.check(0b101000, 0, 0b101000);
|
||||
bsTest.check(0b101000, 1, 0b110100);
|
||||
bsTest.check(0b101000, 2, 0b111010);
|
||||
bsTest.check(0b101000, 3, 0b111101);
|
||||
bsTest.check(0b101000, 5, 0b111111);
|
||||
bsTest.check(0b101000, -1, 0b111111);
|
||||
bsTest.check(0b101000, -4, 0b111110);
|
||||
bsTest.check(0b101000, -5, 0b111101);
|
||||
}
|
||||
|
||||
public void testShiftSizeCalculationTest() throws Exception{
|
||||
getTestExecuter( BarrelShifterMode.rotate, false ,LeftRightFormat.left, 7, 3);
|
||||
getTestExecuter( BarrelShifterMode.rotate, true ,LeftRightFormat.left, 7, 4);
|
||||
getTestExecuter( BarrelShifterMode.rotate, true ,LeftRightFormat.right, 7, 4);
|
||||
getTestExecuter( BarrelShifterMode.rotate, false ,LeftRightFormat.left, 8, 3);
|
||||
getTestExecuter( BarrelShifterMode.rotate, true ,LeftRightFormat.left, 8, 4);
|
||||
getTestExecuter( BarrelShifterMode.rotate, true ,LeftRightFormat.right, 8, 4);
|
||||
getTestExecuter( BarrelShifterMode.rotate, false ,LeftRightFormat.left, 9, 4);
|
||||
getTestExecuter( BarrelShifterMode.rotate, true ,LeftRightFormat.left, 9, 5);
|
||||
getTestExecuter( BarrelShifterMode.rotate, true ,LeftRightFormat.right, 9, 5);
|
||||
getTestExecuter( BarrelShifterMode.rotate, false ,LeftRightFormat.left, 16, 4);
|
||||
getTestExecuter( BarrelShifterMode.rotate, true ,LeftRightFormat.left, 16, 5);
|
||||
getTestExecuter( BarrelShifterMode.rotate, false ,LeftRightFormat.left, 17, 5);
|
||||
getTestExecuter( BarrelShifterMode.rotate, true ,LeftRightFormat.left, 17, 6);
|
||||
getTestExecuter( BarrelShifterMode.rotate, true ,LeftRightFormat.right, 17, 6);
|
||||
}
|
||||
|
||||
private TestExecuter getTestExecuter(BarrelShifterMode mode, boolean signed, LeftRightFormat direction, int valueWidth, int shiftWidth) throws Exception {
|
||||
ObservableValue value = new ObservableValue("value", valueWidth);
|
||||
ObservableValue shift = new ObservableValue("shift", shiftWidth);
|
||||
|
||||
ElementAttributes attributes = new ElementAttributes()
|
||||
.set(Keys.BARREL_SHIFTER_MODE,mode)
|
||||
.set(Keys.BARREL_SIGNED,signed)
|
||||
.set(Keys.DIRECTION,direction)
|
||||
.set(Keys.BITS,valueWidth);
|
||||
|
||||
Model model = new Model();
|
||||
BarrelShifter bs = new BarrelShifter(attributes);
|
||||
|
||||
bs.setInputs(ovs(value, shift));
|
||||
model.add(bs);
|
||||
|
||||
ObservableValues outputs = bs.getOutputs();
|
||||
assertEquals(1, outputs.size());
|
||||
assertEquals(value.getBits(), outputs.get(0).getBits());
|
||||
|
||||
return new TestExecuter(model).setInputs(value, shift).setOutputs(outputs);
|
||||
}
|
||||
|
||||
}
|
@ -39,8 +39,8 @@ public class TestExamples extends TestCase {
|
||||
*/
|
||||
public void testTestExamples() throws Exception {
|
||||
File examples = new File(Resources.getRoot(), "/dig/test");
|
||||
assertEquals(80, new FileScanner(this::check).scan(examples));
|
||||
assertEquals(74, testCasesInFiles);
|
||||
assertEquals(81, new FileScanner(this::check).scan(examples));
|
||||
assertEquals(75, testCasesInFiles);
|
||||
}
|
||||
|
||||
|
||||
|
731
src/test/resources/dig/test/arith/barrelShifterTest.dig
Normal file
731
src/test/resources/dig/test/arith/barrelShifterTest.dig
Normal file
@ -0,0 +1,731 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<attributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>D flip flop based on a SRAM cell.</string>
|
||||
</entry>
|
||||
</attributes>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>BarrelShifter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>U_N_L</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="260" y="-120"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Data</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>InDefault</string>
|
||||
<value v="17" z="false"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="80" y="-160"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Shift</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>3</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>InDefault</string>
|
||||
<value v="2" z="false"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="80" y="-60"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>UNL</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="520" y="-140"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Probe</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Data</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>intFormat</string>
|
||||
<intFormat>bin</intFormat>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="-200"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Probe</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>UNL</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>intFormat</string>
|
||||
<intFormat>bin</intFormat>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="460" y="-200"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>BarrelShifter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>U_R_L</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>datarotate</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>barrelShifterMode</string>
|
||||
<barrelShifterMode>rotate</barrelShifterMode>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="260" y="0"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Signed</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>InDefault</string>
|
||||
<value v="1" z="false"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="80" y="360"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>BarrelShifter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Signed</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>S_R_L</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>datarotate</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>barrelShifterMode</string>
|
||||
<barrelShifterMode>rotate</barrelShifterMode>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>barrelSigned</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="260" y="460"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>URL</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="520" y="20"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>SRL</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="520" y="480"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Input Splitting</string>
|
||||
<string>3,1</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Output Splitting</string>
|
||||
<string>4</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="120" y="280"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Testcase</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Testdata</string>
|
||||
<testData>
|
||||
<dataString>Data Shift Signed UNL URL SNL SRL
|
||||
12 0 0 12 12 12 12
|
||||
12 1 0 24 24 24 24
|
||||
12 2 0 48 48 48 48
|
||||
17 2 0 4 5 4 5
|
||||
12 3 0 32 33 32 33
|
||||
12 3 1 32 33 0 24
|
||||
12 7 1 0 24 6 6
|
||||
</dataString>
|
||||
</testData>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="20" y="-280"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Probe</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>URL</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>intFormat</string>
|
||||
<intFormat>bin</intFormat>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="460" y="-60"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Probe</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>SRL</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>intFormat</string>
|
||||
<intFormat>bin</intFormat>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="460" y="420"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Neg</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>4</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="700"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Probe</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>shift</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="280" y="700"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>BarrelShifter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Signed</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>S_N_R</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>datarotate</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>barrelSigned</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="260" y="580"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>SNR</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="520" y="600"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Probe</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>SNR</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>intFormat</string>
|
||||
<intFormat>bin</intFormat>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="460" y="540"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>BarrelShifter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>U_N_R</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>direction</string>
|
||||
<direction>right</direction>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="260" y="120"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>UNR</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="520" y="140"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Probe</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>UNR</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>intFormat</string>
|
||||
<intFormat>bin</intFormat>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="460" y="80"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>BarrelShifter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Signed</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>S_N_L</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>barrelSigned</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="260" y="360"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>SNL</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="520" y="380"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Probe</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>SNL</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>intFormat</string>
|
||||
<intFormat>bin</intFormat>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="460" y="320"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>BarrelShifter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>U_A_R</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>datarotate</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>barrelShifterMode</string>
|
||||
<barrelShifterMode>arithmetic</barrelShifterMode>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>direction</string>
|
||||
<direction>right</direction>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="260" y="240"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>UAR</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="520" y="260"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Probe</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>UAR</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>intFormat</string>
|
||||
<intFormat>bin</intFormat>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="460" y="200"/>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="220" y="0"/>
|
||||
<p2 x="260" y="0"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="580"/>
|
||||
<p2 x="260" y="580"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="260"/>
|
||||
<p2 x="460" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="260"/>
|
||||
<p2 x="520" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="-140"/>
|
||||
<p2 x="520" y="-140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="140"/>
|
||||
<p2 x="460" y="140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="140"/>
|
||||
<p2 x="520" y="140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="460"/>
|
||||
<p2 x="260" y="460"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="120" y="-80"/>
|
||||
<p2 x="180" y="-80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="180" y="-80"/>
|
||||
<p2 x="260" y="-80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="400"/>
|
||||
<p2 x="260" y="400"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="20"/>
|
||||
<p2 x="460" y="20"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="20"/>
|
||||
<p2 x="520" y="20"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="280"/>
|
||||
<p2 x="160" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="180" y="280"/>
|
||||
<p2 x="260" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="600"/>
|
||||
<p2 x="460" y="600"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="600"/>
|
||||
<p2 x="520" y="600"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="80" y="-160"/>
|
||||
<p2 x="160" y="-160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="-160"/>
|
||||
<p2 x="220" y="-160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="180" y="160"/>
|
||||
<p2 x="260" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="480"/>
|
||||
<p2 x="460" y="480"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="480"/>
|
||||
<p2 x="520" y="480"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="-100"/>
|
||||
<p2 x="460" y="-100"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="80" y="360"/>
|
||||
<p2 x="120" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="360"/>
|
||||
<p2 x="260" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="180" y="40"/>
|
||||
<p2 x="260" y="40"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="620"/>
|
||||
<p2 x="260" y="620"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="240"/>
|
||||
<p2 x="260" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="500"/>
|
||||
<p2 x="260" y="500"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="-120"/>
|
||||
<p2 x="260" y="-120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="120"/>
|
||||
<p2 x="260" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="80" y="-60"/>
|
||||
<p2 x="120" y="-60"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="380"/>
|
||||
<p2 x="460" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="380"/>
|
||||
<p2 x="520" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="700"/>
|
||||
<p2 x="280" y="700"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="-200"/>
|
||||
<p2 x="160" y="-160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="280"/>
|
||||
<p2 x="160" y="400"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="620"/>
|
||||
<p2 x="160" y="700"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="500"/>
|
||||
<p2 x="160" y="620"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="400"/>
|
||||
<p2 x="160" y="500"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="180" y="-80"/>
|
||||
<p2 x="180" y="40"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="180" y="160"/>
|
||||
<p2 x="180" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="180" y="40"/>
|
||||
<p2 x="180" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="120" y="-80"/>
|
||||
<p2 x="120" y="-60"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="120" y="300"/>
|
||||
<p2 x="120" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="120" y="-60"/>
|
||||
<p2 x="120" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="320"/>
|
||||
<p2 x="460" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="420"/>
|
||||
<p2 x="460" y="480"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="-200"/>
|
||||
<p2 x="460" y="-140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="-60"/>
|
||||
<p2 x="460" y="20"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="540"/>
|
||||
<p2 x="460" y="600"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="80"/>
|
||||
<p2 x="460" y="140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="200"/>
|
||||
<p2 x="460" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="-140"/>
|
||||
<p2 x="460" y="-100"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="-160"/>
|
||||
<p2 x="220" y="-120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="360"/>
|
||||
<p2 x="220" y="460"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="240"/>
|
||||
<p2 x="220" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="120"/>
|
||||
<p2 x="220" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="0"/>
|
||||
<p2 x="220" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="-120"/>
|
||||
<p2 x="220" y="0"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="460"/>
|
||||
<p2 x="220" y="580"/>
|
||||
</wire>
|
||||
</wires>
|
||||
<measurementOrdering/>
|
||||
</circuit>
|
Loading…
x
Reference in New Issue
Block a user