fixed 74161, 74162

This commit is contained in:
hneemann 2017-09-02 14:05:04 +02:00
parent d2acb459a9
commit 93ffe743df
4 changed files with 219 additions and 145 deletions

View File

@ -50,7 +50,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>9</int>
<string>9</string>
</entry>
<entry>
<string>Default</string>
@ -82,7 +82,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>1</int>
<string>1</string>
</entry>
<entry>
<string>Default</string>
@ -104,7 +104,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>2</int>
<string>2</string>
</entry>
</elementAttributes>
<pos x="320" y="340"/>
@ -118,7 +118,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>15</int>
<string>15</string>
</entry>
</elementAttributes>
<pos x="760" y="480"/>
@ -137,7 +137,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>10</int>
<string>10</string>
</entry>
</elementAttributes>
<pos x="320" y="500"/>
@ -151,7 +151,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>7</int>
<string>7</string>
</entry>
</elementAttributes>
<pos x="320" y="420"/>
@ -190,10 +190,10 @@
</entry>
<entry>
<string>pinNumber</string>
<int>3</int>
<string>3</string>
</entry>
</elementAttributes>
<pos x="160" y="160"/>
<pos x="160" y="140"/>
</visualElement>
<visualElement>
<elementName>Splitter</elementName>
@ -207,7 +207,7 @@
<string>4</string>
</entry>
</elementAttributes>
<pos x="300" y="160"/>
<pos x="300" y="140"/>
</visualElement>
<visualElement>
<elementName>In</elementName>
@ -218,10 +218,10 @@
</entry>
<entry>
<string>pinNumber</string>
<int>4</int>
<string>4</string>
</entry>
</elementAttributes>
<pos x="280" y="180"/>
<pos x="280" y="160"/>
</visualElement>
<visualElement>
<elementName>In</elementName>
@ -232,10 +232,10 @@
</entry>
<entry>
<string>pinNumber</string>
<int>5</int>
<string>5</string>
</entry>
</elementAttributes>
<pos x="160" y="200"/>
<pos x="160" y="180"/>
</visualElement>
<visualElement>
<elementName>In</elementName>
@ -246,10 +246,10 @@
</entry>
<entry>
<string>pinNumber</string>
<int>6</int>
<string>6</string>
</entry>
</elementAttributes>
<pos x="280" y="220"/>
<pos x="280" y="200"/>
</visualElement>
<visualElement>
<elementName>Splitter</elementName>
@ -274,7 +274,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>14</int>
<string>14</string>
</entry>
</elementAttributes>
<pos x="760" y="140"/>
@ -288,7 +288,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>13</int>
<string>13</string>
</entry>
</elementAttributes>
<pos x="900" y="160"/>
@ -302,7 +302,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>12</int>
<string>12</string>
</entry>
</elementAttributes>
<pos x="760" y="180"/>
@ -316,7 +316,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>11</int>
<string>11</string>
</entry>
</elementAttributes>
<pos x="900" y="200"/>
@ -355,7 +355,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>16</int>
<string>16</string>
</entry>
<entry>
<string>InDefault</string>
@ -373,28 +373,28 @@
</entry>
<entry>
<string>pinNumber</string>
<int>8</int>
<string>8</string>
</entry>
</elementAttributes>
<pos x="320" y="620"/>
</visualElement>
</visualElements>
<wires>
<wire>
<p1 x="320" y="160"/>
<p2 x="460" y="160"/>
</wire>
<wire>
<p1 x="560" y="160"/>
<p2 x="620" y="160"/>
</wire>
<wire>
<p1 x="160" y="160"/>
<p1 x="740" y="160"/>
<p2 x="900" y="160"/>
</wire>
<wire>
<p1 x="280" y="160"/>
<p2 x="300" y="160"/>
</wire>
<wire>
<p1 x="740" y="160"/>
<p2 x="900" y="160"/>
<p1 x="360" y="160"/>
<p2 x="460" y="160"/>
</wire>
<wire>
<p1 x="660" y="480"/>
@ -402,10 +402,6 @@
</wire>
<wire>
<p1 x="360" y="100"/>
<p2 x="500" y="100"/>
</wire>
<wire>
<p1 x="500" y="100"/>
<p2 x="700" y="100"/>
</wire>
<wire>
@ -424,10 +420,6 @@
<p1 x="440" y="200"/>
<p2 x="460" y="200"/>
</wire>
<wire>
<p1 x="160" y="200"/>
<p2 x="300" y="200"/>
</wire>
<wire>
<p1 x="600" y="200"/>
<p2 x="620" y="200"/>
@ -437,12 +429,16 @@
<p2 x="900" y="200"/>
</wire>
<wire>
<p1 x="460" y="460"/>
<p2 x="600" y="460"/>
<p1 x="280" y="200"/>
<p2 x="300" y="200"/>
</wire>
<wire>
<p1 x="340" y="460"/>
<p2 x="360" y="460"/>
<p1 x="320" y="140"/>
<p2 x="520" y="140"/>
</wire>
<wire>
<p1 x="160" y="140"/>
<p2 x="300" y="140"/>
</wire>
<wire>
<p1 x="680" y="140"/>
@ -452,10 +448,6 @@
<p1 x="740" y="140"/>
<p2 x="760" y="140"/>
</wire>
<wire>
<p1 x="500" y="140"/>
<p2 x="520" y="140"/>
</wire>
<wire>
<p1 x="600" y="140"/>
<p2 x="620" y="140"/>
@ -464,9 +456,17 @@
<p1 x="700" y="140"/>
<p2 x="720" y="140"/>
</wire>
<wire>
<p1 x="460" y="460"/>
<p2 x="600" y="460"/>
</wire>
<wire>
<p1 x="340" y="460"/>
<p2 x="360" y="460"/>
</wire>
<wire>
<p1 x="320" y="300"/>
<p2 x="480" y="300"/>
<p2 x="540" y="300"/>
</wire>
<wire>
<p1 x="320" y="620"/>
@ -477,12 +477,8 @@
<p2 x="380" y="240"/>
</wire>
<wire>
<p1 x="320" y="500"/>
<p2 x="340" y="500"/>
</wire>
<wire>
<p1 x="340" y="500"/>
<p2 x="600" y="500"/>
<p1 x="160" y="180"/>
<p2 x="300" y="180"/>
</wire>
<wire>
<p1 x="740" y="180"/>
@ -497,8 +493,12 @@
<p2 x="520" y="180"/>
</wire>
<wire>
<p1 x="280" y="180"/>
<p2 x="300" y="180"/>
<p1 x="320" y="500"/>
<p2 x="340" y="500"/>
</wire>
<wire>
<p1 x="340" y="500"/>
<p2 x="600" y="500"/>
</wire>
<wire>
<p1 x="320" y="340"/>
@ -506,7 +506,7 @@
</wire>
<wire>
<p1 x="420" y="440"/>
<p2 x="540" y="440"/>
<p2 x="480" y="440"/>
</wire>
<wire>
<p1 x="340" y="600"/>
@ -520,22 +520,14 @@
<p1 x="440" y="220"/>
<p2 x="460" y="220"/>
</wire>
<wire>
<p1 x="280" y="220"/>
<p2 x="300" y="220"/>
</wire>
<wire>
<p1 x="480" y="200"/>
<p2 x="480" y="300"/>
<p2 x="480" y="440"/>
</wire>
<wire>
<p1 x="580" y="180"/>
<p2 x="580" y="340"/>
</wire>
<wire>
<p1 x="500" y="100"/>
<p2 x="500" y="140"/>
</wire>
<wire>
<p1 x="340" y="460"/>
<p2 x="340" y="500"/>
@ -546,12 +538,16 @@
</wire>
<wire>
<p1 x="360" y="100"/>
<p2 x="360" y="200"/>
<p2 x="360" y="160"/>
</wire>
<wire>
<p1 x="360" y="240"/>
<p2 x="360" y="260"/>
</wire>
<wire>
<p1 x="360" y="160"/>
<p2 x="360" y="200"/>
</wire>
<wire>
<p1 x="600" y="260"/>
<p2 x="600" y="280"/>
@ -561,12 +557,12 @@
<p2 x="600" y="220"/>
</wire>
<wire>
<p1 x="700" y="100"/>
<p2 x="700" y="140"/>
<p1 x="540" y="180"/>
<p2 x="540" y="300"/>
</wire>
<wire>
<p1 x="540" y="180"/>
<p2 x="540" y="440"/>
<p1 x="700" y="100"/>
<p2 x="700" y="140"/>
</wire>
<wire>
<p1 x="460" y="220"/>

View File

@ -64,7 +64,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>9</int>
<string>9</string>
</entry>
<entry>
<string>Default</string>
@ -96,7 +96,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>1</int>
<string>1</string>
</entry>
<entry>
<string>Default</string>
@ -118,7 +118,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>2</int>
<string>2</string>
</entry>
</elementAttributes>
<pos x="240" y="340"/>
@ -132,7 +132,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>15</int>
<string>15</string>
</entry>
</elementAttributes>
<pos x="920" y="440"/>
@ -151,7 +151,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>10</int>
<string>10</string>
</entry>
</elementAttributes>
<pos x="240" y="460"/>
@ -165,7 +165,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>7</int>
<string>7</string>
</entry>
</elementAttributes>
<pos x="240" y="380"/>
@ -218,10 +218,10 @@
</entry>
<entry>
<string>pinNumber</string>
<int>3</int>
<string>3</string>
</entry>
</elementAttributes>
<pos x="80" y="160"/>
<pos x="80" y="140"/>
</visualElement>
<visualElement>
<elementName>Comparator</elementName>
@ -294,7 +294,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>14</int>
<string>14</string>
</entry>
</elementAttributes>
<pos x="920" y="140"/>
@ -308,7 +308,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>13</int>
<string>13</string>
</entry>
</elementAttributes>
<pos x="1060" y="160"/>
@ -322,7 +322,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>12</int>
<string>12</string>
</entry>
</elementAttributes>
<pos x="920" y="180"/>
@ -336,7 +336,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>11</int>
<string>11</string>
</entry>
</elementAttributes>
<pos x="1060" y="200"/>
@ -353,7 +353,7 @@
<string>4</string>
</entry>
</elementAttributes>
<pos x="220" y="160"/>
<pos x="220" y="140"/>
</visualElement>
<visualElement>
<elementName>In</elementName>
@ -364,10 +364,10 @@
</entry>
<entry>
<string>pinNumber</string>
<int>4</int>
<string>4</string>
</entry>
</elementAttributes>
<pos x="200" y="180"/>
<pos x="200" y="160"/>
</visualElement>
<visualElement>
<elementName>In</elementName>
@ -378,10 +378,10 @@
</entry>
<entry>
<string>pinNumber</string>
<int>5</int>
<string>5</string>
</entry>
</elementAttributes>
<pos x="80" y="200"/>
<pos x="80" y="180"/>
</visualElement>
<visualElement>
<elementName>In</elementName>
@ -392,10 +392,10 @@
</entry>
<entry>
<string>pinNumber</string>
<int>6</int>
<string>6</string>
</entry>
</elementAttributes>
<pos x="200" y="220"/>
<pos x="200" y="200"/>
</visualElement>
<visualElement>
<elementName>PowerSupply</elementName>
@ -411,7 +411,7 @@
</entry>
<entry>
<string>pinNumber</string>
<int>16</int>
<string>16</string>
</entry>
<entry>
<string>InDefault</string>
@ -429,17 +429,54 @@
</entry>
<entry>
<string>pinNumber</string>
<int>8</int>
<string>8</string>
</entry>
</elementAttributes>
<pos x="240" y="580"/>
</visualElement>
<visualElement>
<elementName>Testcase</elementName>
<elementAttributes>
<entry>
<string>Testdata</string>
<testData>
<dataString>CLK ~CLR ~LD ENT ENP D C B A QD QC QB QA
# load
loop(i,4)
loop(n,16)
C 1 0 bits(2,i) bits(4,n) bits(4,n)
end loop
end loop
# reset
loop(i,8)
loop(n,16)
C 1 0 0 0 bits(4,n) bits(4,n)
C 0 bits(3,i) bits(4,n) bits(4,0)
end loop
end loop
# count
loop(n,16)
C 1 1 1 1 bits(4,0) bits(4,(n+1)%10)
end loop
# hold
loop(n,16)
C 1 0 0 0 bits(4,n) bits(4,n)
C 1 1 0 0 bits(4,n) bits(4,n)
C 1 1 1 0 bits(4,n) bits(4,n)
C 1 1 0 1 bits(4,n) bits(4,n)
end loop
</dataString>
</testData>
</entry>
</elementAttributes>
<pos x="720" y="580"/>
</visualElement>
</visualElements>
<wires>
<wire>
<p1 x="240" y="160"/>
<p2 x="560" y="160"/>
</wire>
<wire>
<p1 x="740" y="160"/>
<p2 x="760" y="160"/>
@ -453,9 +490,17 @@
<p2 x="1060" y="160"/>
</wire>
<wire>
<p1 x="80" y="160"/>
<p1 x="200" y="160"/>
<p2 x="220" y="160"/>
</wire>
<wire>
<p1 x="280" y="160"/>
<p2 x="380" y="160"/>
</wire>
<wire>
<p1 x="380" y="160"/>
<p2 x="560" y="160"/>
</wire>
<wire>
<p1 x="260" y="420"/>
<p2 x="280" y="420"/>
@ -466,16 +511,8 @@
</wire>
<wire>
<p1 x="280" y="100"/>
<p2 x="380" y="100"/>
</wire>
<wire>
<p1 x="600" y="100"/>
<p2 x="840" y="100"/>
</wire>
<wire>
<p1 x="380" y="100"/>
<p2 x="600" y="100"/>
</wire>
<wire>
<p1 x="380" y="260"/>
<p2 x="400" y="260"/>
@ -505,9 +542,17 @@
<p2 x="1060" y="200"/>
</wire>
<wire>
<p1 x="80" y="200"/>
<p1 x="200" y="200"/>
<p2 x="220" y="200"/>
</wire>
<wire>
<p1 x="240" y="140"/>
<p2 x="620" y="140"/>
</wire>
<wire>
<p1 x="80" y="140"/>
<p2 x="220" y="140"/>
</wire>
<wire>
<p1 x="720" y="140"/>
<p2 x="760" y="140"/>
@ -516,10 +561,6 @@
<p1 x="820" y="140"/>
<p2 x="840" y="140"/>
</wire>
<wire>
<p1 x="600" y="140"/>
<p2 x="620" y="140"/>
</wire>
<wire>
<p1 x="900" y="140"/>
<p2 x="920" y="140"/>
@ -538,7 +579,7 @@
</wire>
<wire>
<p1 x="240" y="300"/>
<p2 x="580" y="300"/>
<p2 x="640" y="300"/>
</wire>
<wire>
<p1 x="380" y="240"/>
@ -546,12 +587,16 @@
</wire>
<wire>
<p1 x="340" y="400"/>
<p2 x="640" y="400"/>
<p2 x="580" y="400"/>
</wire>
<wire>
<p1 x="260" y="560"/>
<p2 x="280" y="560"/>
</wire>
<wire>
<p1 x="80" y="180"/>
<p2 x="220" y="180"/>
</wire>
<wire>
<p1 x="360" y="180"/>
<p2 x="500" y="180"/>
@ -568,10 +613,6 @@
<p1 x="900" y="180"/>
<p2 x="920" y="180"/>
</wire>
<wire>
<p1 x="200" y="180"/>
<p2 x="220" y="180"/>
</wire>
<wire>
<p1 x="240" y="340"/>
<p2 x="740" y="340"/>
@ -592,10 +633,6 @@
<p1 x="480" y="220"/>
<p2 x="500" y="220"/>
</wire>
<wire>
<p1 x="200" y="220"/>
<p2 x="220" y="220"/>
</wire>
<wire>
<p1 x="240" y="380"/>
<p2 x="280" y="380"/>
@ -606,7 +643,11 @@
</wire>
<wire>
<p1 x="640" y="180"/>
<p2 x="640" y="400"/>
<p2 x="640" y="300"/>
</wire>
<wire>
<p1 x="580" y="200"/>
<p2 x="580" y="400"/>
</wire>
<wire>
<p1 x="260" y="420"/>
@ -616,18 +657,10 @@
<p1 x="260" y="560"/>
<p2 x="260" y="580"/>
</wire>
<wire>
<p1 x="580" y="200"/>
<p2 x="580" y="300"/>
</wire>
<wire>
<p1 x="740" y="160"/>
<p2 x="740" y="340"/>
</wire>
<wire>
<p1 x="600" y="100"/>
<p2 x="600" y="140"/>
</wire>
<wire>
<p1 x="600" y="260"/>
<p2 x="600" y="420"/>
@ -638,12 +671,16 @@
</wire>
<wire>
<p1 x="280" y="100"/>
<p2 x="280" y="180"/>
<p2 x="280" y="160"/>
</wire>
<wire>
<p1 x="280" y="220"/>
<p2 x="280" y="240"/>
</wire>
<wire>
<p1 x="280" y="160"/>
<p2 x="280" y="180"/>
</wire>
<wire>
<p1 x="520" y="220"/>
<p2 x="520" y="260"/>
@ -653,7 +690,7 @@
<p2 x="700" y="180"/>
</wire>
<wire>
<p1 x="380" y="100"/>
<p1 x="380" y="160"/>
<p2 x="380" y="240"/>
</wire>
</wires>

View File

@ -48,7 +48,7 @@ counter, synchronous reset</string>
</entry>
<entry>
<string>pinNumber</string>
<int>14</int>
<string>14</string>
</entry>
</elementAttributes>
<pos x="360" y="420"/>
@ -105,7 +105,7 @@ counter, synchronous reset</string>
</entry>
<entry>
<string>pinNumber</string>
<int>13</int>
<string>13</string>
</entry>
</elementAttributes>
<pos x="640" y="420"/>
@ -162,7 +162,7 @@ counter, synchronous reset</string>
</entry>
<entry>
<string>pinNumber</string>
<int>12</int>
<string>12</string>
</entry>
</elementAttributes>
<pos x="900" y="420"/>
@ -219,7 +219,7 @@ counter, synchronous reset</string>
</entry>
<entry>
<string>pinNumber</string>
<int>11</int>
<string>11</string>
</entry>
</elementAttributes>
<pos x="1160" y="420"/>
@ -282,7 +282,7 @@ counter, synchronous reset</string>
</entry>
<entry>
<string>pinNumber</string>
<int>1</int>
<string>1</string>
</entry>
<entry>
<string>Default</string>
@ -304,7 +304,7 @@ counter, synchronous reset</string>
</entry>
<entry>
<string>pinNumber</string>
<int>9</int>
<string>9</string>
</entry>
<entry>
<string>Default</string>
@ -330,7 +330,7 @@ counter, synchronous reset</string>
</entry>
<entry>
<string>pinNumber</string>
<int>3</int>
<string>3</string>
</entry>
</elementAttributes>
<pos x="200" y="-360"/>
@ -352,7 +352,7 @@ counter, synchronous reset</string>
</entry>
<entry>
<string>pinNumber</string>
<int>4</int>
<string>4</string>
</entry>
</elementAttributes>
<pos x="460" y="-360"/>
@ -374,7 +374,7 @@ counter, synchronous reset</string>
</entry>
<entry>
<string>pinNumber</string>
<int>5</int>
<string>5</string>
</entry>
</elementAttributes>
<pos x="720" y="-360"/>
@ -396,7 +396,7 @@ counter, synchronous reset</string>
</entry>
<entry>
<string>pinNumber</string>
<int>6</int>
<string>6</string>
</entry>
</elementAttributes>
<pos x="980" y="-360"/>
@ -432,7 +432,7 @@ counter, synchronous reset</string>
</entry>
<entry>
<string>pinNumber</string>
<int>15</int>
<string>15</string>
</entry>
</elementAttributes>
<pos x="1340" y="420"/>
@ -450,7 +450,7 @@ counter, synchronous reset</string>
</entry>
<entry>
<string>pinNumber</string>
<int>10</int>
<string>10</string>
</entry>
<entry>
<string>Default</string>
@ -477,7 +477,7 @@ counter, synchronous reset</string>
</entry>
<entry>
<string>pinNumber</string>
<int>7</int>
<string>7</string>
</entry>
<entry>
<string>Default</string>
@ -631,7 +631,7 @@ counter, synchronous reset</string>
</entry>
<entry>
<string>pinNumber</string>
<int>2</int>
<string>2</string>
</entry>
<entry>
<string>Frequency</string>
@ -654,7 +654,7 @@ counter, synchronous reset</string>
</entry>
<entry>
<string>pinNumber</string>
<int>16</int>
<string>16</string>
</entry>
<entry>
<string>InDefault</string>
@ -672,11 +672,52 @@ counter, synchronous reset</string>
</entry>
<entry>
<string>pinNumber</string>
<int>8</int>
<string>8</string>
</entry>
</elementAttributes>
<pos x="-80" y="-400"/>
</visualElement>
<visualElement>
<elementName>Testcase</elementName>
<elementAttributes>
<entry>
<string>Testdata</string>
<testData>
<dataString>CP ~MR ~PE CET CEP D_3 D_2 D_1 D_0 Q_3 Q_2 Q_1 Q_0
# load
loop(i,4)
loop(n,16)
C 1 0 bits(2,i) bits(4,n) bits(4,n)
end loop
end loop
# reset
loop(i,8)
loop(n,16)
C 1 0 0 0 bits(4,n) bits(4,n)
C 0 bits(3,i) bits(4,n) bits(4,0)
end loop
end loop
# count
loop(n,16)
C 1 1 1 1 bits(4,0) bits(4,(n+1)%10)
end loop
# hold
loop(n,16)
C 1 0 0 0 bits(4,n) bits(4,n)
C 1 1 0 0 bits(4,n) bits(4,n)
C 1 1 1 0 bits(4,n) bits(4,n)
C 1 1 0 1 bits(4,n) bits(4,n)
end loop
</dataString>
</testData>
</entry>
</elementAttributes>
<pos x="20" y="440"/>
</visualElement>
</visualElements>
<wires>
<wire>

View File

@ -30,7 +30,7 @@ public class TestExamples extends TestCase {
public void testDistExamples() throws Exception {
File examples = new File(Resources.getRoot().getParentFile().getParentFile(), "/main/dig");
assertEquals(201, new FileScanner(this::check).scan(examples));
assertEquals(105, testCasesInFiles);
assertEquals(107, testCasesInFiles);
}
/**