Sun Nov 20 06:48:16 PM CET 2022

master
Alessandro Mauri 2 years ago
parent 52f73405e0
commit ca3cbd6b22
  1. 761
      alu.dig
  2. 6
      main.dig
  3. 134
      multiply-add.dig
  4. 110
      signed_mul.dig
  5. 72
      sreg.dig

File diff suppressed because it is too large Load Diff

@ -31,7 +31,7 @@
<visualElement>
<elementName>decode.dig</elementName>
<elementAttributes/>
<pos x="100" y="300"/>
<pos x="240" y="580"/>
</visualElement>
<visualElement>
<elementName>RAMSinglePort</elementName>
@ -98,6 +98,10 @@
<p1 x="80" y="580"/>
<p2 x="100" y="580"/>
</wire>
<wire>
<p1 x="160" y="580"/>
<p2 x="240" y="580"/>
</wire>
<wire>
<p1 x="20" y="660"/>
<p2 x="40" y="660"/>

@ -8,10 +8,10 @@
<elementAttributes>
<entry>
<string>Label</string>
<string>S</string>
<string>S_a</string>
</entry>
</elementAttributes>
<pos x="1120" y="280"/>
<pos x="1120" y="260"/>
</visualElement>
<visualElement>
<elementName>In</elementName>
@ -25,7 +25,7 @@
<int>32</int>
</entry>
</elementAttributes>
<pos x="1120" y="320"/>
<pos x="1120" y="300"/>
</visualElement>
<visualElement>
<elementName>In</elementName>
@ -39,7 +39,7 @@
<int>32</int>
</entry>
</elementAttributes>
<pos x="1120" y="360"/>
<pos x="1120" y="340"/>
</visualElement>
<visualElement>
<elementName>Splitter</elementName>
@ -53,7 +53,7 @@
<string>32,32</string>
</entry>
</elementAttributes>
<pos x="1600" y="300"/>
<pos x="1600" y="320"/>
</visualElement>
<visualElement>
<elementName>Out</elementName>
@ -67,7 +67,7 @@
<int>32</int>
</entry>
</elementAttributes>
<pos x="1680" y="280"/>
<pos x="1680" y="300"/>
</visualElement>
<visualElement>
<elementName>Out</elementName>
@ -81,7 +81,7 @@
<int>32</int>
</entry>
</elementAttributes>
<pos x="1680" y="340"/>
<pos x="1680" y="360"/>
</visualElement>
<visualElement>
<elementName>Add</elementName>
@ -91,7 +91,7 @@
<int>64</int>
</entry>
</elementAttributes>
<pos x="1420" y="300"/>
<pos x="1420" y="320"/>
</visualElement>
<visualElement>
<elementName>In</elementName>
@ -105,7 +105,7 @@
<int>32</int>
</entry>
</elementAttributes>
<pos x="1120" y="400"/>
<pos x="1120" y="440"/>
</visualElement>
<visualElement>
<elementName>BitExtender</elementName>
@ -119,7 +119,7 @@
<int>64</int>
</entry>
</elementAttributes>
<pos x="1220" y="400"/>
<pos x="1220" y="440"/>
</visualElement>
<visualElement>
<elementName>In</elementName>
@ -129,7 +129,7 @@
<string>C_i</string>
</entry>
</elementAttributes>
<pos x="1120" y="440"/>
<pos x="1120" y="480"/>
</visualElement>
<visualElement>
<elementName>Out</elementName>
@ -139,114 +139,128 @@
<string>C_o</string>
</entry>
</elementAttributes>
<pos x="1680" y="400"/>
<pos x="1680" y="420"/>
</visualElement>
<visualElement>
<elementName>signed_mul.dig</elementName>
<elementAttributes/>
<pos x="1260" y="280"/>
</visualElement>
<visualElement>
<elementName>In</elementName>
<elementAttributes>
<entry>
<string>Label</string>
<string>S_b</string>
</entry>
</elementAttributes>
<pos x="1120" y="380"/>
</visualElement>
</visualElements>
<wires>
<wire>
<p1 x="1620" y="320"/>
<p2 x="1660" y="320"/>
<p1 x="1320" y="320"/>
<p2 x="1420" y="320"/>
</wire>
<wire>
<p1 x="1360" y="320"/>
<p2 x="1420" y="320"/>
<p1 x="1620" y="320"/>
<p2 x="1660" y="320"/>
</wire>
<wire>
<p1 x="1480" y="320"/>
<p2 x="1580" y="320"/>
<p2 x="1600" y="320"/>
</wire>
<wire>
<p1 x="1120" y="320"/>
<p2 x="1180" y="320"/>
<p1 x="1120" y="480"/>
<p2 x="1400" y="480"/>
</wire>
<wire>
<p1 x="1200" y="320"/>
<p2 x="1260" y="320"/>
<p1 x="1620" y="340"/>
<p2 x="1660" y="340"/>
</wire>
<wire>
<p1 x="1580" y="400"/>
<p2 x="1680" y="400"/>
<p1 x="1360" y="340"/>
<p2 x="1420" y="340"/>
</wire>
<wire>
<p1 x="1280" y="400"/>
<p2 x="1360" y="400"/>
<p1 x="1480" y="340"/>
<p2 x="1580" y="340"/>
</wire>
<wire>
<p1 x="1120" y="400"/>
<p2 x="1220" y="400"/>
<p1 x="1120" y="340"/>
<p2 x="1260" y="340"/>
</wire>
<wire>
<p1 x="1660" y="340"/>
<p2 x="1680" y="340"/>
<p1 x="1580" y="420"/>
<p2 x="1680" y="420"/>
</wire>
<wire>
<p1 x="1400" y="340"/>
<p2 x="1420" y="340"/>
<p1 x="1120" y="260"/>
<p2 x="1160" y="260"/>
</wire>
<wire>
<p1 x="1660" y="280"/>
<p2 x="1680" y="280"/>
<p1 x="1280" y="440"/>
<p2 x="1360" y="440"/>
</wire>
<wire>
<p1 x="1120" y="280"/>
<p2 x="1260" y="280"/>
<p1 x="1120" y="440"/>
<p2 x="1220" y="440"/>
</wire>
<wire>
<p1 x="1120" y="360"/>
<p2 x="1200" y="360"/>
<p1 x="1660" y="360"/>
<p2 x="1680" y="360"/>
</wire>
<wire>
<p1 x="1120" y="440"/>
<p2 x="1400" y="440"/>
<p1 x="1400" y="360"/>
<p2 x="1420" y="360"/>
</wire>
<wire>
<p1 x="1620" y="300"/>
<p2 x="1660" y="300"/>
<p1 x="1160" y="360"/>
<p2 x="1260" y="360"/>
</wire>
<wire>
<p1 x="1480" y="300"/>
<p2 x="1600" y="300"/>
<p1 x="1160" y="280"/>
<p2 x="1260" y="280"/>
</wire>
<wire>
<p1 x="1320" y="300"/>
<p2 x="1420" y="300"/>
<p1 x="1660" y="300"/>
<p2 x="1680" y="300"/>
</wire>
<wire>
<p1 x="1180" y="300"/>
<p1 x="1120" y="300"/>
<p2 x="1260" y="300"/>
</wire>
<wire>
<p1 x="1360" y="320"/>
<p2 x="1360" y="400"/>
<p1 x="1120" y="380"/>
<p2 x="1160" y="380"/>
</wire>
<wire>
<p1 x="1200" y="320"/>
<p2 x="1200" y="360"/>
<p1 x="1360" y="340"/>
<p2 x="1360" y="440"/>
</wire>
<wire>
<p1 x="1400" y="340"/>
<p2 x="1400" y="440"/>
<p1 x="1400" y="360"/>
<p2 x="1400" y="480"/>
</wire>
<wire>
<p1 x="1580" y="320"/>
<p2 x="1580" y="400"/>
<p1 x="1160" y="260"/>
<p2 x="1160" y="280"/>
</wire>
<wire>
<p1 x="1660" y="280"/>
<p2 x="1660" y="300"/>
<p1 x="1160" y="360"/>
<p2 x="1160" y="380"/>
</wire>
<wire>
<p1 x="1660" y="320"/>
<p2 x="1660" y="340"/>
<p1 x="1580" y="340"/>
<p2 x="1580" y="420"/>
</wire>
<wire>
<p1 x="1180" y="300"/>
<p2 x="1180" y="320"/>
<p1 x="1660" y="300"/>
<p2 x="1660" y="320"/>
</wire>
<wire>
<p1 x="1660" y="340"/>
<p2 x="1660" y="360"/>
</wire>
</wires>
<measurementOrdering/>

@ -18,10 +18,10 @@
<elementAttributes>
<entry>
<string>Label</string>
<string>S</string>
<string>S_a</string>
</entry>
</elementAttributes>
<pos x="600" y="560"/>
<pos x="600" y="340"/>
</visualElement>
<visualElement>
<elementName>In</elementName>
@ -147,7 +147,7 @@
<boolean>true</boolean>
</entry>
</elementAttributes>
<pos x="780" y="640"/>
<pos x="960" y="640"/>
</visualElement>
<visualElement>
<elementName>And</elementName>
@ -157,7 +157,7 @@
<boolean>true</boolean>
</entry>
</elementAttributes>
<pos x="900" y="660"/>
<pos x="1100" y="660"/>
</visualElement>
<visualElement>
<elementName>Neg</elementName>
@ -218,6 +218,26 @@
</elementAttributes>
<pos x="1380" y="300"/>
</visualElement>
<visualElement>
<elementName>In</elementName>
<elementAttributes>
<entry>
<string>Label</string>
<string>S_b</string>
</entry>
</elementAttributes>
<pos x="600" y="560"/>
</visualElement>
<visualElement>
<elementName>Or</elementName>
<elementAttributes>
<entry>
<string>wideShape</string>
<boolean>true</boolean>
</entry>
</elementAttributes>
<pos x="680" y="700"/>
</visualElement>
</visualElements>
<wires>
<wire>
@ -241,8 +261,12 @@
<p2 x="1280" y="320"/>
</wire>
<wire>
<p1 x="760" y="640"/>
<p2 x="780" y="640"/>
<p1 x="900" y="320"/>
<p2 x="940" y="320"/>
</wire>
<wire>
<p1 x="900" y="640"/>
<p2 x="960" y="640"/>
</wire>
<wire>
<p1 x="640" y="420"/>
@ -252,25 +276,25 @@
<p1 x="860" y="260"/>
<p2 x="880" y="260"/>
</wire>
<wire>
<p1 x="620" y="740"/>
<p2 x="680" y="740"/>
</wire>
<wire>
<p1 x="640" y="200"/>
<p2 x="880" y="200"/>
</wire>
<wire>
<p1 x="700" y="520"/>
<p2 x="760" y="520"/>
</wire>
<wire>
<p1 x="760" y="520"/>
<p2 x="800" y="520"/>
</wire>
<wire>
<p1 x="740" y="680"/>
<p2 x="780" y="680"/>
<p1 x="1180" y="680"/>
<p2 x="1300" y="680"/>
</wire>
<wire>
<p1 x="980" y="680"/>
<p2 x="1300" y="680"/>
<p1 x="940" y="680"/>
<p2 x="960" y="680"/>
</wire>
<wire>
<p1 x="1240" y="360"/>
@ -282,16 +306,12 @@
</wire>
<wire>
<p1 x="700" y="300"/>
<p2 x="740" y="300"/>
<p2 x="800" y="300"/>
</wire>
<wire>
<p1 x="1320" y="300"/>
<p2 x="1380" y="300"/>
</wire>
<wire>
<p1 x="740" y="300"/>
<p2 x="800" y="300"/>
</wire>
<wire>
<p1 x="640" y="460"/>
<p2 x="780" y="460"/>
@ -302,10 +322,10 @@
</wire>
<wire>
<p1 x="600" y="560"/>
<p2 x="620" y="560"/>
<p2 x="640" y="560"/>
</wire>
<wire>
<p1 x="620" y="560"/>
<p1 x="640" y="560"/>
<p2 x="800" y="560"/>
</wire>
<wire>
@ -325,13 +345,17 @@
<p2 x="880" y="240"/>
</wire>
<wire>
<p1 x="620" y="720"/>
<p1 x="760" y="720"/>
<p2 x="860" y="720"/>
</wire>
<wire>
<p1 x="980" y="340"/>
<p2 x="1040" y="340"/>
</wire>
<wire>
<p1 x="600" y="340"/>
<p2 x="620" y="340"/>
</wire>
<wire>
<p1 x="620" y="340"/>
<p2 x="800" y="340"/>
@ -345,8 +369,8 @@
<p2 x="680" y="500"/>
</wire>
<wire>
<p1 x="860" y="660"/>
<p2 x="900" y="660"/>
<p1 x="1040" y="660"/>
<p2 x="1100" y="660"/>
</wire>
<wire>
<p1 x="600" y="280"/>
@ -378,7 +402,11 @@
</wire>
<wire>
<p1 x="860" y="700"/>
<p2 x="900" y="700"/>
<p2 x="1100" y="700"/>
</wire>
<wire>
<p1 x="640" y="700"/>
<p2 x="680" y="700"/>
</wire>
<wire>
<p1 x="640" y="200"/>
@ -388,6 +416,10 @@
<p1 x="640" y="420"/>
<p2 x="640" y="460"/>
</wire>
<wire>
<p1 x="640" y="560"/>
<p2 x="640" y="700"/>
</wire>
<wire>
<p1 x="640" y="460"/>
<p2 x="640" y="500"/>
@ -404,6 +436,10 @@
<p1 x="900" y="240"/>
<p2 x="900" y="320"/>
</wire>
<wire>
<p1 x="900" y="540"/>
<p2 x="900" y="640"/>
</wire>
<wire>
<p1 x="980" y="340"/>
<p2 x="980" y="440"/>
@ -412,10 +448,6 @@
<p1 x="980" y="220"/>
<p2 x="980" y="300"/>
</wire>
<wire>
<p1 x="740" y="300"/>
<p2 x="740" y="680"/>
</wire>
<wire>
<p1 x="1140" y="280"/>
<p2 x="1140" y="320"/>
@ -432,18 +464,6 @@
<p1 x="1240" y="320"/>
<p2 x="1240" y="360"/>
</wire>
<wire>
<p1 x="760" y="520"/>
<p2 x="760" y="640"/>
</wire>
<wire>
<p1 x="620" y="340"/>
<p2 x="620" y="560"/>
</wire>
<wire>
<p1 x="620" y="560"/>
<p2 x="620" y="720"/>
</wire>
<wire>
<p1 x="860" y="700"/>
<p2 x="860" y="720"/>
@ -452,6 +472,14 @@
<p1 x="860" y="240"/>
<p2 x="860" y="260"/>
</wire>
<wire>
<p1 x="620" y="340"/>
<p2 x="620" y="740"/>
</wire>
<wire>
<p1 x="940" y="320"/>
<p2 x="940" y="680"/>
</wire>
</wires>
<measurementOrdering/>
</circuit>

@ -155,6 +155,42 @@
</elementAttributes>
<pos x="840" y="480"/>
</visualElement>
<visualElement>
<elementName>In</elementName>
<elementAttributes>
<entry>
<string>Label</string>
<string>S_i</string>
</entry>
</elementAttributes>
<pos x="200" y="500"/>
</visualElement>
<visualElement>
<elementName>Out</elementName>
<elementAttributes>
<entry>
<string>Label</string>
<string>S_o</string>
</entry>
</elementAttributes>
<pos x="840" y="520"/>
</visualElement>
<visualElement>
<elementName>Text</elementName>
<elementAttributes>
<entry>
<string>Description</string>
<string>Status Register
Z : Zero flag
C : Carry flag
N : Negative flag (bit 31)
V : Two&apos;s Complement Overflow flag
S : True Sign (V xor N)</string>
</entry>
</elementAttributes>
<pos x="360" y="60"/>
</visualElement>
</visualElements>
<wires>
<wire>
@ -185,6 +221,10 @@
<p1 x="320" y="520"/>
<p2 x="340" y="520"/>
</wire>
<wire>
<p1 x="760" y="520"/>
<p2 x="840" y="520"/>
</wire>
<wire>
<p1 x="200" y="460"/>
<p2 x="260" y="460"/>
@ -257,10 +297,6 @@
<p1 x="200" y="420"/>
<p2 x="240" y="420"/>
</wire>
<wire>
<p1 x="320" y="420"/>
<p2 x="340" y="420"/>
</wire>
<wire>
<p1 x="440" y="420"/>
<p2 x="480" y="420"/>
@ -269,6 +305,10 @@
<p1 x="720" y="420"/>
<p2 x="780" y="420"/>
</wire>
<wire>
<p1 x="280" y="420"/>
<p2 x="340" y="420"/>
</wire>
<wire>
<p1 x="320" y="740"/>
<p2 x="340" y="740"/>
@ -317,6 +357,10 @@
<p1 x="320" y="500"/>
<p2 x="340" y="500"/>
</wire>
<wire>
<p1 x="200" y="500"/>
<p2 x="280" y="500"/>
</wire>
<wire>
<p1 x="320" y="760"/>
<p2 x="340" y="760"/>
@ -329,6 +373,10 @@
<p1 x="800" y="440"/>
<p2 x="840" y="440"/>
</wire>
<wire>
<p1 x="720" y="440"/>
<p2 x="760" y="440"/>
</wire>
<wire>
<p1 x="200" y="380"/>
<p2 x="220" y="380"/>
@ -358,8 +406,8 @@
<p2 x="240" y="420"/>
</wire>
<wire>
<p1 x="320" y="420"/>
<p2 x="320" y="440"/>
<p1 x="320" y="440"/>
<p2 x="320" y="460"/>
</wire>
<wire>
<p1 x="320" y="580"/>
@ -409,10 +457,6 @@
<p1 x="320" y="940"/>
<p2 x="320" y="960"/>
</wire>
<wire>
<p1 x="320" y="440"/>
<p2 x="320" y="460"/>
</wire>
<wire>
<p1 x="320" y="700"/>
<p2 x="320" y="720"/>
@ -481,6 +525,14 @@
<p1 x="820" y="380"/>
<p2 x="820" y="400"/>
</wire>
<wire>
<p1 x="280" y="420"/>
<p2 x="280" y="500"/>
</wire>
<wire>
<p1 x="760" y="440"/>
<p2 x="760" y="520"/>
</wire>
<wire>
<p1 x="220" y="360"/>
<p2 x="220" y="380"/>

Loading…
Cancel
Save