mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-09 12:56:02 -04:00
added a 7485 real gate implementation
This commit is contained in:
parent
905c0831b0
commit
6b33d96693
@ -25,7 +25,7 @@
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>10</int>
|
||||
<string>10</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="140"/>
|
||||
@ -39,7 +39,7 @@
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>12</int>
|
||||
<string>12</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="180"/>
|
||||
@ -53,7 +53,7 @@
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>13</int>
|
||||
<string>13</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="220"/>
|
||||
@ -67,7 +67,7 @@
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>15</int>
|
||||
<string>15</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="260"/>
|
||||
@ -81,7 +81,7 @@
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>2</int>
|
||||
<string>2</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="80"/>
|
||||
@ -95,7 +95,7 @@
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>3</int>
|
||||
<string>3</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="0"/>
|
||||
@ -109,7 +109,7 @@
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>4</int>
|
||||
<string>4</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="-80"/>
|
||||
@ -123,7 +123,7 @@
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>9</int>
|
||||
<string>9</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="300"/>
|
||||
@ -137,7 +137,7 @@
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>11</int>
|
||||
<string>11</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="340"/>
|
||||
@ -151,7 +151,7 @@
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>14</int>
|
||||
<string>14</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="380"/>
|
||||
@ -165,7 +165,7 @@
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>1</int>
|
||||
<string>1</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="420"/>
|
||||
@ -194,7 +194,7 @@
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>7</int>
|
||||
<string>7</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="780" y="60"/>
|
||||
@ -208,7 +208,7 @@
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>6</int>
|
||||
<string>6</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="780" y="-20"/>
|
||||
@ -222,25 +222,11 @@
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>5</int>
|
||||
<string>5</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="780" y="-100"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Testcase</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Testdata</string>
|
||||
<testData>
|
||||
<dataString> P<Q_i P=Q_i P>Q_i P_3 P_2 P_1 P_0 Q_3 Q_2 Q_1 Q_0 P<Q P=Q P>Q
|
||||
repeat(256) 0 1 0 bits(4,n>>4) bits(4,n) ((n>>4)<(n&15)) ((n>>4)=(n&15)) ((n>>4)>(n&15))
|
||||
repeat(2<<(3+4)) bits(3,n) bits(4,n>>3) bits(4,n>>3) bits(3,n)</dataString>
|
||||
</testData>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="720" y="340"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Comparator</elementName>
|
||||
<elementAttributes>
|
||||
@ -293,7 +279,7 @@ repeat(2<<(3+4)) bits(3,n) bits(4,n>>3) bits(4,n>>3)
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>16</int>
|
||||
<string>16</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>InDefault</string>
|
||||
@ -311,11 +297,34 @@ repeat(2<<(3+4)) bits(3,n) bits(4,n>>3) bits(4,n>>3)
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>8</int>
|
||||
<string>8</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="520"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Testcase</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Testdata</string>
|
||||
<testData>
|
||||
<dataString> P<Q_i P=Q_i P>Q_i P_3 P_2 P_1 P_0 Q_3 Q_2 Q_1 Q_0 P<Q P=Q P>Q
|
||||
loop(P,16)
|
||||
loop(Q,16)
|
||||
0 1 0 bits(4,P) bits(4,Q) (P<Q) (P=Q) (P>Q)
|
||||
end loop
|
||||
end loop
|
||||
|
||||
loop (i,16)
|
||||
loop (n,8)
|
||||
bits(3,n) bits(4,i) bits(4,i) bits(3,n)
|
||||
end loop
|
||||
end loop</dataString>
|
||||
</testData>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="720" y="420"/>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
|
1415
src/main/dig/lib/74xx/arithmetic/7485Real.dig
Normal file
1415
src/main/dig/lib/74xx/arithmetic/7485Real.dig
Normal file
File diff suppressed because it is too large
Load Diff
@ -33,8 +33,8 @@ public class TestExamples extends TestCase {
|
||||
public void testDistExamples() throws Exception {
|
||||
File examples = new File(Resources.getRoot().getParentFile().getParentFile(), "/main/dig");
|
||||
testCasesInFiles = 0;
|
||||
assertEquals(242, new FileScanner(TestExamples::check).scan(examples));
|
||||
assertEquals(162, testCasesInFiles);
|
||||
assertEquals(243, new FileScanner(TestExamples::check).scan(examples));
|
||||
assertEquals(163, testCasesInFiles);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user