mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-14 15:26:52 -04:00
improves the layout of the Dadda multiplier
This commit is contained in:
parent
ec08edbcda
commit
909b7bf09b
352
src/main/dig/combinatorial/Dadda-inc.dig
Normal file
352
src/main/dig/combinatorial/Dadda-inc.dig
Normal file
@ -0,0 +1,352 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<circuit>
|
||||||
|
<version>1</version>
|
||||||
|
<attributes/>
|
||||||
|
<visualElements>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>And</elementName>
|
||||||
|
<elementAttributes/>
|
||||||
|
<pos x="-260" y="140"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>And</elementName>
|
||||||
|
<elementAttributes/>
|
||||||
|
<pos x="-260" y="200"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>And</elementName>
|
||||||
|
<elementAttributes/>
|
||||||
|
<pos x="-260" y="260"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>And</elementName>
|
||||||
|
<elementAttributes/>
|
||||||
|
<pos x="-260" y="320"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>And</elementName>
|
||||||
|
<elementAttributes/>
|
||||||
|
<pos x="-260" y="380"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>And</elementName>
|
||||||
|
<elementAttributes/>
|
||||||
|
<pos x="-260" y="440"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>And</elementName>
|
||||||
|
<elementAttributes/>
|
||||||
|
<pos x="-260" y="500"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>And</elementName>
|
||||||
|
<elementAttributes/>
|
||||||
|
<pos x="-260" y="560"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>Splitter</elementName>
|
||||||
|
<elementAttributes>
|
||||||
|
<entry>
|
||||||
|
<string>mirror</string>
|
||||||
|
<boolean>true</boolean>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<string>rotation</string>
|
||||||
|
<rotation rotation="3"/>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<string>Input Splitting</string>
|
||||||
|
<string>8</string>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<string>Output Splitting</string>
|
||||||
|
<string>7-7,6-6,5-5,4-4,3-3,2-2,1-1,0-0</string>
|
||||||
|
</entry>
|
||||||
|
</elementAttributes>
|
||||||
|
<pos x="-440" y="80"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>In</elementName>
|
||||||
|
<elementAttributes>
|
||||||
|
<entry>
|
||||||
|
<string>Label</string>
|
||||||
|
<string>B</string>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<string>Bits</string>
|
||||||
|
<int>8</int>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<string>intFormat</string>
|
||||||
|
<intFormat>dec</intFormat>
|
||||||
|
</entry>
|
||||||
|
</elementAttributes>
|
||||||
|
<pos x="-520" y="60"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>In</elementName>
|
||||||
|
<elementAttributes>
|
||||||
|
<entry>
|
||||||
|
<string>Label</string>
|
||||||
|
<string>A_n</string>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<string>intFormat</string>
|
||||||
|
<intFormat>dec</intFormat>
|
||||||
|
</entry>
|
||||||
|
</elementAttributes>
|
||||||
|
<pos x="-520" y="600"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>Out</elementName>
|
||||||
|
<elementAttributes>
|
||||||
|
<entry>
|
||||||
|
<string>Label</string>
|
||||||
|
<string>P_0</string>
|
||||||
|
</entry>
|
||||||
|
</elementAttributes>
|
||||||
|
<pos x="-180" y="160"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>Out</elementName>
|
||||||
|
<elementAttributes>
|
||||||
|
<entry>
|
||||||
|
<string>Label</string>
|
||||||
|
<string>P_1</string>
|
||||||
|
</entry>
|
||||||
|
</elementAttributes>
|
||||||
|
<pos x="-180" y="220"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>Out</elementName>
|
||||||
|
<elementAttributes>
|
||||||
|
<entry>
|
||||||
|
<string>Label</string>
|
||||||
|
<string>P_2</string>
|
||||||
|
</entry>
|
||||||
|
</elementAttributes>
|
||||||
|
<pos x="-180" y="280"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>Out</elementName>
|
||||||
|
<elementAttributes>
|
||||||
|
<entry>
|
||||||
|
<string>Label</string>
|
||||||
|
<string>P_3</string>
|
||||||
|
</entry>
|
||||||
|
</elementAttributes>
|
||||||
|
<pos x="-180" y="340"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>Out</elementName>
|
||||||
|
<elementAttributes>
|
||||||
|
<entry>
|
||||||
|
<string>Label</string>
|
||||||
|
<string>P_4</string>
|
||||||
|
</entry>
|
||||||
|
</elementAttributes>
|
||||||
|
<pos x="-180" y="400"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>Out</elementName>
|
||||||
|
<elementAttributes>
|
||||||
|
<entry>
|
||||||
|
<string>Label</string>
|
||||||
|
<string>P_5</string>
|
||||||
|
</entry>
|
||||||
|
</elementAttributes>
|
||||||
|
<pos x="-180" y="460"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>Out</elementName>
|
||||||
|
<elementAttributes>
|
||||||
|
<entry>
|
||||||
|
<string>Label</string>
|
||||||
|
<string>P_6</string>
|
||||||
|
</entry>
|
||||||
|
</elementAttributes>
|
||||||
|
<pos x="-180" y="520"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>Out</elementName>
|
||||||
|
<elementAttributes>
|
||||||
|
<entry>
|
||||||
|
<string>Label</string>
|
||||||
|
<string>P_7</string>
|
||||||
|
</entry>
|
||||||
|
</elementAttributes>
|
||||||
|
<pos x="-180" y="580"/>
|
||||||
|
</visualElement>
|
||||||
|
</visualElements>
|
||||||
|
<wires>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-360" y="320"/>
|
||||||
|
<p2 x="-260" y="320"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-340" y="260"/>
|
||||||
|
<p2 x="-260" y="260"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-200" y="580"/>
|
||||||
|
<p2 x="-180" y="580"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-200" y="520"/>
|
||||||
|
<p2 x="-180" y="520"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-320" y="200"/>
|
||||||
|
<p2 x="-260" y="200"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-300" y="140"/>
|
||||||
|
<p2 x="-260" y="140"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-200" y="460"/>
|
||||||
|
<p2 x="-180" y="460"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-200" y="400"/>
|
||||||
|
<p2 x="-180" y="400"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-200" y="340"/>
|
||||||
|
<p2 x="-180" y="340"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-200" y="280"/>
|
||||||
|
<p2 x="-180" y="280"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-520" y="600"/>
|
||||||
|
<p2 x="-280" y="600"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-280" y="600"/>
|
||||||
|
<p2 x="-260" y="600"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-280" y="540"/>
|
||||||
|
<p2 x="-260" y="540"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-200" y="220"/>
|
||||||
|
<p2 x="-180" y="220"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-200" y="160"/>
|
||||||
|
<p2 x="-180" y="160"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-280" y="480"/>
|
||||||
|
<p2 x="-260" y="480"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-280" y="420"/>
|
||||||
|
<p2 x="-260" y="420"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-280" y="360"/>
|
||||||
|
<p2 x="-260" y="360"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-280" y="300"/>
|
||||||
|
<p2 x="-260" y="300"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-440" y="560"/>
|
||||||
|
<p2 x="-260" y="560"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-280" y="240"/>
|
||||||
|
<p2 x="-260" y="240"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-280" y="180"/>
|
||||||
|
<p2 x="-260" y="180"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-420" y="500"/>
|
||||||
|
<p2 x="-260" y="500"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-400" y="440"/>
|
||||||
|
<p2 x="-260" y="440"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-520" y="60"/>
|
||||||
|
<p2 x="-440" y="60"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-380" y="380"/>
|
||||||
|
<p2 x="-260" y="380"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-340" y="100"/>
|
||||||
|
<p2 x="-340" y="260"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-420" y="100"/>
|
||||||
|
<p2 x="-420" y="500"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-280" y="180"/>
|
||||||
|
<p2 x="-280" y="240"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-280" y="480"/>
|
||||||
|
<p2 x="-280" y="540"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-280" y="300"/>
|
||||||
|
<p2 x="-280" y="360"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-280" y="420"/>
|
||||||
|
<p2 x="-280" y="480"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-280" y="540"/>
|
||||||
|
<p2 x="-280" y="600"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-280" y="240"/>
|
||||||
|
<p2 x="-280" y="300"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-280" y="360"/>
|
||||||
|
<p2 x="-280" y="420"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-360" y="100"/>
|
||||||
|
<p2 x="-360" y="320"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-440" y="100"/>
|
||||||
|
<p2 x="-440" y="560"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-440" y="60"/>
|
||||||
|
<p2 x="-440" y="80"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-300" y="100"/>
|
||||||
|
<p2 x="-300" y="140"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-380" y="100"/>
|
||||||
|
<p2 x="-380" y="380"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-320" y="100"/>
|
||||||
|
<p2 x="-320" y="200"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="-400" y="100"/>
|
||||||
|
<p2 x="-400" y="440"/>
|
||||||
|
</wire>
|
||||||
|
</wires>
|
||||||
|
<measurementOrdering/>
|
||||||
|
</circuit>
|
File diff suppressed because it is too large
Load Diff
@ -33,7 +33,7 @@ public class TestExamples extends TestCase {
|
|||||||
*/
|
*/
|
||||||
public void testDistExamples() throws Exception {
|
public void testDistExamples() throws Exception {
|
||||||
File examples = new File(Resources.getRoot().getParentFile().getParentFile(), "/main/dig");
|
File examples = new File(Resources.getRoot().getParentFile().getParentFile(), "/main/dig");
|
||||||
assertEquals(300, new FileScanner(this::check).scan(examples));
|
assertEquals(301, new FileScanner(this::check).scan(examples));
|
||||||
assertEquals(196, testCasesInFiles);
|
assertEquals(196, testCasesInFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user