mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-26 06:22:48 -04:00
Added two cycle CPU with RAM and ROM sharing the same address space.
This commit is contained in:
parent
97cb6bd5f3
commit
1c1a6c3fe9
142
src/main/dig/processor/ClockDiv.dig
Normal file
142
src/main/dig/processor/ClockDiv.dig
Normal file
@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<attributes>
|
||||
<entry>
|
||||
<string>Width</string>
|
||||
<int>5</int>
|
||||
</entry>
|
||||
</attributes>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>Clock</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Clock</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Frequency</string>
|
||||
<int>500000</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="340" y="280"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>T_FF</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="440" y="280"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="380" y="280"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="560" y="240"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="560" y="320"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>C_in</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="660" y="260"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>S_in</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="660" y="300"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>C</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="660" y="340"/>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="360" y="240"/>
|
||||
<p2 x="560" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="520" y="320"/>
|
||||
<p2 x="560" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="260"/>
|
||||
<p2 x="660" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="340"/>
|
||||
<p2 x="660" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="280"/>
|
||||
<p2 x="440" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="280"/>
|
||||
<p2 x="360" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="500" y="280"/>
|
||||
<p2 x="540" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="280"/>
|
||||
<p2 x="380" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="540" y="280"/>
|
||||
<p2 x="560" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="360"/>
|
||||
<p2 x="560" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="500" y="300"/>
|
||||
<p2 x="520" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="540" y="300"/>
|
||||
<p2 x="660" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="520" y="300"/>
|
||||
<p2 x="520" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="240"/>
|
||||
<p2 x="360" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="280"/>
|
||||
<p2 x="360" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="540" y="280"/>
|
||||
<p2 x="540" y="300"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
575
src/main/dig/processor/ControlTwoCycle.dig
Normal file
575
src/main/dig/processor/ControlTwoCycle.dig
Normal file
@ -0,0 +1,575 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<attributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>Leitwerk für einen einfachen Prozessor.
|
||||
Es arbeitet rein kombinatorisch, es handelt sich
|
||||
also um ein einfaches Schaltwerk.
|
||||
Da es vergleichsweise komplex ist (24
|
||||
Ausgangsbits), wird es durch einen
|
||||
entsprechenden ROM-Baustein
|
||||
realisiert, und nicht durch 24 einzelne Schaltnetze.</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Width</string>
|
||||
<int>5</int>
|
||||
</entry>
|
||||
</attributes>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>Der Opcode incl. Immediate Bit</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Op</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>7</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="180" y="160"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Input Splitting</string>
|
||||
<string>7</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Output Splitting</string>
|
||||
<string>6,1</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="220" y="160"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Multiplexer</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="160"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Const</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Value</string>
|
||||
<int>0</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="380" y="200"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>ROM</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Logic</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>24</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Addr Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Data</string>
|
||||
<data size="64">0,200080,4004c0,4044c0,4008c0,4048c0,400cc0,4010c0,4014c0,c4,d4,4004c4,4004d4,4044c4,
|
||||
4044d4,4008c4,4008d4,4048c4,4048d4,400cc4,400cd4,4010c4,4010d4,4014c4,4014d4,402cc0,
|
||||
402cc4,402cd4,400800,400804,400814,4018c0,401cc0,4058c0,405cc0,4020c0,24c0,28c0,20040a,
|
||||
689,200006,20001e,85,95,200406,685,8018,10018,18018,28018,30018,38018,1a4,20,24,20018,
|
||||
240004,24001c,240408,80284,80294,80688,100000,800020</data>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>lastDataFile</string>
|
||||
<string>
|
||||
/home/hneemann/Dokumente/DHBW/Technische_Informatik_II/Systemnahes_Programmieren/java/assembler3/control.dat
|
||||
</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="480" y="180"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Const</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="460" y="220"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>Programm Counter in Register Speichern</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>stPC</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="680" y="320"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Input Splitting</string>
|
||||
<string>24</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Output Splitting</string>
|
||||
<string>1*2,3,1*5,5,3,1*6</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="600" y="200"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>Wert am Datenbus in Register speichern</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>WE</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="860" y="300"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>Aktiviert das Speichern der Konstanten</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>imm</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="420" y="340"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>absoluten Sprung auslösen</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>absJmp</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="860" y="260"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>Selektor für Mux B</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>muxB</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>3</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="680" y="240"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>SourceRegister auf Datenbus legen</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>srcToD</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="860" y="460"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>Selector für Mux A</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>muxA</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="860" y="340"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>ALU auf den Datenbus legen</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>ALUToBus</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="680" y="280"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>Operation der ALU</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>ALUop</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>5</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="680" y="360"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>Wenn gesetzt führt die ALU eine arithmetische Operation aus, so dass die Flags gespeichert werden müssen.</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>storeFlags</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="680" y="480"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>Art des bedingten Sprunges</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Branch</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>3</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="860" y="380"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>Ram speichert Daten vom Datenbus</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>st</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="860" y="220"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>Ram gibt Daten auf den Datenbus</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>ld</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="860" y="180"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Break</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Cycles</string>
|
||||
<int>600000</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Break</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="680" y="440"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>Es wird auf die IO geschrieben</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>ioW</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="680" y="400"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>Es wird IO gelesen</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>ioR</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="860" y="420"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>PullDown</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>24</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="580" y="220"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Or</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="320" y="240"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>ins</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="180" y="240"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="320" y="320"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="260" y="360"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Or</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="680" y="160"/>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="620" y="320"/>
|
||||
<p2 x="680" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="320"/>
|
||||
<p2 x="320" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="240" y="160"/>
|
||||
<p2 x="400" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="180" y="160"/>
|
||||
<p2 x="220" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="640" y="160"/>
|
||||
<p2 x="680" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="480"/>
|
||||
<p2 x="680" y="480"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="260"/>
|
||||
<p2 x="860" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="260"/>
|
||||
<p2 x="420" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="420"/>
|
||||
<p2 x="860" y="420"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="200"/>
|
||||
<p2 x="400" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="540" y="200"/>
|
||||
<p2 x="580" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="200"/>
|
||||
<p2 x="680" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="580" y="200"/>
|
||||
<p2 x="600" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="360"/>
|
||||
<p2 x="680" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="360"/>
|
||||
<p2 x="320" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="360"/>
|
||||
<p2 x="260" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="300"/>
|
||||
<p2 x="860" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="460"/>
|
||||
<p2 x="860" y="460"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="240"/>
|
||||
<p2 x="680" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="180" y="240"/>
|
||||
<p2 x="220" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="240"/>
|
||||
<p2 x="320" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="240"/>
|
||||
<p2 x="300" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="400"/>
|
||||
<p2 x="680" y="400"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="240" y="180"/>
|
||||
<p2 x="260" y="180"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="440" y="180"/>
|
||||
<p2 x="480" y="180"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="740" y="180"/>
|
||||
<p2 x="860" y="180"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="340"/>
|
||||
<p2 x="860" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="340"/>
|
||||
<p2 x="420" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="120"/>
|
||||
<p2 x="640" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="280"/>
|
||||
<p2 x="320" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="280"/>
|
||||
<p2 x="680" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="440"/>
|
||||
<p2 x="680" y="440"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="220"/>
|
||||
<p2 x="480" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="220"/>
|
||||
<p2 x="860" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="380"/>
|
||||
<p2 x="860" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="640" y="120"/>
|
||||
<p2 x="640" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="200"/>
|
||||
<p2 x="420" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="180"/>
|
||||
<p2 x="260" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="280"/>
|
||||
<p2 x="260" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="580" y="200"/>
|
||||
<p2 x="580" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="240"/>
|
||||
<p2 x="220" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="120"/>
|
||||
<p2 x="300" y="240"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
258
src/main/dig/processor/Memory.dig
Normal file
258
src/main/dig/processor/Memory.dig
Normal file
@ -0,0 +1,258 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>RAMSinglePort</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>16</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Addr Bits</string>
|
||||
<int>15</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="640" y="220"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>ROM</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>isProgramMemory</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>16</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Addr Bits</string>
|
||||
<int>15</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Data</string>
|
||||
<data size="32768">140f,20e1,4ce0,20e1,14f7,4cef,6e03,5200,7c00,6ff6,20e1,4ced,2de,20e1,8002,5a0d,3c02,
|
||||
5c16,2001,20e1,4ce0,20e1,15f9,4cef,6ff1,ffff,59d0,8002,5a0d,2002,20e1,4ce0,20e1,8025,
|
||||
12f0,4cef,6fe5,ffff,5b1d,401,2ed,4ede,18e1,4efe,18e2,6a0f</data>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>lastDataFile</string>
|
||||
<string>/home/hneemann/Dokumente/DHBW/Technische_Informatik_II/Systemnahes_Programmieren/asm/fibonacci.hex</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="640" y="120"/>
|
||||
</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="420" y="120"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>D</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>16</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="740" y="140"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>A</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>16</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="360" y="120"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="480" y="140"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="480" y="220"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="480" y="300"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>C</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="360" y="300"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>str</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="360" y="260"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>ld</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="360" y="340"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="540" y="140"/>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="600" y="160"/>
|
||||
<p2 x="640" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="540" y="240"/>
|
||||
<p2 x="640" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="540" y="320"/>
|
||||
<p2 x="620" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="180"/>
|
||||
<p2 x="540" y="180"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="260"/>
|
||||
<p2 x="480" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="700" y="260"/>
|
||||
<p2 x="720" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="340"/>
|
||||
<p2 x="380" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="340"/>
|
||||
<p2 x="480" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="280"/>
|
||||
<p2 x="640" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="440" y="120"/>
|
||||
<p2 x="620" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="120"/>
|
||||
<p2 x="420" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="120"/>
|
||||
<p2 x="640" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="220"/>
|
||||
<p2 x="640" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="220"/>
|
||||
<p2 x="480" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="300"/>
|
||||
<p2 x="640" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="300"/>
|
||||
<p2 x="480" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="300"/>
|
||||
<p2 x="420" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="440" y="140"/>
|
||||
<p2 x="460" y="140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="700" y="140"/>
|
||||
<p2 x="720" y="140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="520" y="140"/>
|
||||
<p2 x="540" y="140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="140"/>
|
||||
<p2 x="480" y="140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="720" y="140"/>
|
||||
<p2 x="740" y="140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="720" y="140"/>
|
||||
<p2 x="720" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="280"/>
|
||||
<p2 x="420" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="180"/>
|
||||
<p2 x="380" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="120"/>
|
||||
<p2 x="620" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="300"/>
|
||||
<p2 x="620" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="140"/>
|
||||
<p2 x="460" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="220"/>
|
||||
<p2 x="460" y="300"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
1350
src/main/dig/processor/ProcessorTwoCycle.dig
Normal file
1350
src/main/dig/processor/ProcessorTwoCycle.dig
Normal file
File diff suppressed because it is too large
Load Diff
@ -28,7 +28,7 @@ public class TestExamples extends TestCase {
|
||||
*/
|
||||
public void testDistExamples() throws Exception {
|
||||
File examples = new File(Resources.getRoot().getParentFile().getParentFile(), "/main/dig");
|
||||
assertEquals(100, new FileScanner(this::check).scan(examples));
|
||||
assertEquals(104, new FileScanner(this::check).scan(examples));
|
||||
assertEquals(52, testCasesInFiles);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user