mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-19 09:54:49 -04:00
added the ALU to the repo
This commit is contained in:
parent
92c19b7d43
commit
6ad1538b2d
1195
src/main/dig/processor/ALU.dig
Normal file
1195
src/main/dig/processor/ALU.dig
Normal file
File diff suppressed because it is too large
Load Diff
118
src/main/dig/processor/ASR.dig
Normal file
118
src/main/dig/processor/ASR.dig
Normal file
@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Di</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>16</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="180" y="120"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Input Splitting</string>
|
||||
<string>16</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Output Splitting</string>
|
||||
<string>1,14,1</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="210" y="120"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>C</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="320" y="120"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Input Splitting</string>
|
||||
<string>14,1,1</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Output Splitting</string>
|
||||
<string>16</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="270" y="130"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Do</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>16</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="320" y="150"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="220" y="130"/>
|
||||
<p2 x="270" y="130"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="280" y="130"/>
|
||||
<p2 x="310" y="130"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="310" y="150"/>
|
||||
<p2 x="320" y="150"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="250" y="150"/>
|
||||
<p2 x="270" y="150"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="120"/>
|
||||
<p2 x="320" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="180" y="120"/>
|
||||
<p2 x="210" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="140"/>
|
||||
<p2 x="250" y="140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="250" y="140"/>
|
||||
<p2 x="270" y="140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="310" y="130"/>
|
||||
<p2 x="310" y="150"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="250" y="140"/>
|
||||
<p2 x="250" y="150"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
117
src/main/dig/processor/LSL.dig
Normal file
117
src/main/dig/processor/LSL.dig
Normal file
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Di</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>16</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="260" y="150"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Ci</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="260" y="120"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Input Splitting</string>
|
||||
<string>1,15</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Output Splitting</string>
|
||||
<string>16</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="360" y="120"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Input Splitting</string>
|
||||
<string>16</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Output Splitting</string>
|
||||
<string>15,1</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="300" y="130"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Co</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>16</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="120"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Do</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="140"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="270" y="130"/>
|
||||
<p2 x="300" y="130"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="310" y="130"/>
|
||||
<p2 x="360" y="130"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="120"/>
|
||||
<p2 x="360" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="370" y="120"/>
|
||||
<p2 x="400" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="150"/>
|
||||
<p2 x="270" y="150"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="310" y="140"/>
|
||||
<p2 x="400" y="140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="270" y="130"/>
|
||||
<p2 x="270" y="150"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
117
src/main/dig/processor/LSR.dig
Normal file
117
src/main/dig/processor/LSR.dig
Normal file
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Di</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>16</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="260" y="90"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Ci</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="260" y="110"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Input Splitting</string>
|
||||
<string>16</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Output Splitting</string>
|
||||
<string>1,15</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="310" y="90"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Input Splitting</string>
|
||||
<string>15,1</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Output Splitting</string>
|
||||
<string>16</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="370" y="100"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Do</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>16</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="100"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Co</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="70"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="380" y="70"/>
|
||||
<p2 x="400" y="70"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="100"/>
|
||||
<p2 x="370" y="100"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="100"/>
|
||||
<p2 x="400" y="100"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="90"/>
|
||||
<p2 x="310" y="90"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="90"/>
|
||||
<p2 x="380" y="90"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="110"/>
|
||||
<p2 x="370" y="110"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="70"/>
|
||||
<p2 x="380" y="90"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
91
src/main/dig/processor/SWAP.dig
Normal file
91
src/main/dig/processor/SWAP.dig
Normal file
@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Di</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Default</string>
|
||||
<int>16</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="100"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Input Splitting</string>
|
||||
<string>16</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Output Splitting</string>
|
||||
<string>8,8</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="190" y="100"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Input Splitting</string>
|
||||
<string>8,8</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Output Splitting</string>
|
||||
<string>16</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="260" y="110"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Do</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>16</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="310" y="110"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="160" y="100"/>
|
||||
<p2 x="190" y="100"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="200" y="100"/>
|
||||
<p2 x="230" y="100"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="230" y="120"/>
|
||||
<p2 x="260" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="270" y="110"/>
|
||||
<p2 x="310" y="110"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="200" y="110"/>
|
||||
<p2 x="260" y="110"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="230" y="100"/>
|
||||
<p2 x="230" y="120"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
107
src/main/dig/processor/SWAPN.dig
Normal file
107
src/main/dig/processor/SWAPN.dig
Normal file
@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Di</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Default</string>
|
||||
<int>16</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="100"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Input Splitting</string>
|
||||
<string>16</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Output Splitting</string>
|
||||
<string>4,4,4,4</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="190" y="100"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Input Splitting</string>
|
||||
<string>4,4,4,4</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Output Splitting</string>
|
||||
<string>16</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="270" y="110"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Do</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>16</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="310" y="110"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="200" y="130"/>
|
||||
<p2 x="270" y="130"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="100"/>
|
||||
<p2 x="190" y="100"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="200" y="100"/>
|
||||
<p2 x="240" y="100"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="240" y="120"/>
|
||||
<p2 x="270" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="200" y="120"/>
|
||||
<p2 x="230" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="230" y="140"/>
|
||||
<p2 x="270" y="140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="280" y="110"/>
|
||||
<p2 x="310" y="110"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="200" y="110"/>
|
||||
<p2 x="270" y="110"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="240" y="100"/>
|
||||
<p2 x="240" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="230" y="120"/>
|
||||
<p2 x="230" y="140"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
@ -100,7 +100,7 @@ public class LibrarySelector implements ElementNotFoundNotification {
|
||||
private final CircuitComponent circuitComponent;
|
||||
|
||||
public InsertAction(String name, InsertHistory insertHistory, CircuitComponent circuitComponent) {
|
||||
super(name, new VisualElement(name).setShapeFactory(shapeFactory).createIcon(60));
|
||||
super(name, new VisualElement(name).setShapeFactory(shapeFactory).createIcon(75));
|
||||
this.name = name;
|
||||
this.insertHistory = insertHistory;
|
||||
this.circuitComponent = circuitComponent;
|
||||
|
Loading…
x
Reference in New Issue
Block a user