fixed a bug in the EPROMs

This commit is contained in:
hneemann 2019-06-10 17:45:35 +02:00
parent c287c42913
commit 46f964c2b8
6 changed files with 110 additions and 13 deletions

View File

@ -42,7 +42,7 @@ DATA Polling for End of Write Detection not implemented!</string>
</entry>
<entry>
<string>Data</string>
<data size="131072">55,56,aa,55,d5,80,0,0,3</data>
<data>55,56,aa,55,d5,80,0,0,3</data>
</entry>
<entry>
<string>inverterConfig</string>
@ -370,7 +370,18 @@ DATA Polling for End of Write Detection not implemented!</string>
</visualElement>
<visualElement>
<elementName>NOr</elementName>
<elementAttributes/>
<elementAttributes>
<entry>
<string>inverterConfig</string>
<inverterConfig>
<string>In_2</string>
</inverterConfig>
</entry>
<entry>
<string>Inputs</string>
<int>3</int>
</entry>
</elementAttributes>
<pos x="820" y="20"/>
</visualElement>
<visualElement>
@ -699,6 +710,10 @@ DATA Polling for End of Write Detection not implemented!</string>
<p1 x="500" y="40"/>
<p2 x="540" y="40"/>
</wire>
<wire>
<p1 x="760" y="40"/>
<p2 x="800" y="40"/>
</wire>
<wire>
<p1 x="500" y="520"/>
<p2 x="540" y="520"/>
@ -805,6 +820,10 @@ DATA Polling for End of Write Detection not implemented!</string>
</wire>
<wire>
<p1 x="760" y="-60"/>
<p2 x="760" y="40"/>
</wire>
<wire>
<p1 x="760" y="40"/>
<p2 x="760" y="60"/>
</wire>
<wire>

View File

@ -42,7 +42,7 @@ DATA Polling for End of Write Detection not implemented!</string>
</entry>
<entry>
<string>Data</string>
<data size="2048">55,56,aa,55,d5,80,0,0,3</data>
<data>55,56,aa,55,d5,80,0,0,3</data>
</entry>
<entry>
<string>inverterConfig</string>
@ -542,7 +542,18 @@ DATA Polling for End of Write Detection not implemented!</string>
</visualElement>
<visualElement>
<elementName>NOr</elementName>
<elementAttributes/>
<elementAttributes>
<entry>
<string>inverterConfig</string>
<inverterConfig>
<string>In_2</string>
</inverterConfig>
</entry>
<entry>
<string>Inputs</string>
<int>3</int>
</entry>
</elementAttributes>
<pos x="820" y="60"/>
</visualElement>
</visualElements>
@ -607,6 +618,10 @@ DATA Polling for End of Write Detection not implemented!</string>
<p1 x="900" y="80"/>
<p2 x="920" y="80"/>
</wire>
<wire>
<p1 x="760" y="80"/>
<p2 x="800" y="80"/>
</wire>
<wire>
<p1 x="960" y="-20"/>
<p2 x="1000" y="-20"/>
@ -697,6 +712,10 @@ DATA Polling for End of Write Detection not implemented!</string>
</wire>
<wire>
<p1 x="760" y="-120"/>
<p2 x="760" y="80"/>
</wire>
<wire>
<p1 x="760" y="80"/>
<p2 x="760" y="100"/>
</wire>
<wire>

View File

@ -42,7 +42,7 @@ DATA Polling for End of Write Detection not implemented!</string>
</entry>
<entry>
<string>Data</string>
<data>0</data>
<data></data>
</entry>
<entry>
<string>inverterConfig</string>
@ -370,7 +370,18 @@ DATA Polling for End of Write Detection not implemented!</string>
</visualElement>
<visualElement>
<elementName>NOr</elementName>
<elementAttributes/>
<elementAttributes>
<entry>
<string>inverterConfig</string>
<inverterConfig>
<string>In_2</string>
</inverterConfig>
</entry>
<entry>
<string>Inputs</string>
<int>3</int>
</entry>
</elementAttributes>
<pos x="820" y="-40"/>
</visualElement>
<visualElement>
@ -716,6 +727,10 @@ end loop</dataString>
<p1 x="900" y="-20"/>
<p2 x="920" y="-20"/>
</wire>
<wire>
<p1 x="760" y="-20"/>
<p2 x="800" y="-20"/>
</wire>
<wire>
<p1 x="480" y="-180"/>
<p2 x="520" y="-180"/>
@ -786,6 +801,10 @@ end loop</dataString>
</wire>
<wire>
<p1 x="760" y="-120"/>
<p2 x="760" y="-20"/>
</wire>
<wire>
<p1 x="760" y="-20"/>
<p2 x="760" y="0"/>
</wire>
<wire>

View File

@ -42,7 +42,7 @@ DATA Polling for End of Write Detection not implemented!</string>
</entry>
<entry>
<string>Data</string>
<data size="65536">55,56,aa,55,d5,80,0,0,3</data>
<data>55,56,aa,55,d5,80,0,0,3</data>
</entry>
<entry>
<string>inverterConfig</string>
@ -370,7 +370,18 @@ DATA Polling for End of Write Detection not implemented!</string>
</visualElement>
<visualElement>
<elementName>NOr</elementName>
<elementAttributes/>
<elementAttributes>
<entry>
<string>inverterConfig</string>
<inverterConfig>
<string>In_2</string>
</inverterConfig>
</entry>
<entry>
<string>Inputs</string>
<int>3</int>
</entry>
</elementAttributes>
<pos x="820" y="-40"/>
</visualElement>
<visualElement>
@ -709,6 +720,10 @@ DATA Polling for End of Write Detection not implemented!</string>
<p1 x="900" y="-20"/>
<p2 x="920" y="-20"/>
</wire>
<wire>
<p1 x="760" y="-20"/>
<p2 x="800" y="-20"/>
</wire>
<wire>
<p1 x="480" y="-180"/>
<p2 x="520" y="-180"/>
@ -783,6 +798,10 @@ DATA Polling for End of Write Detection not implemented!</string>
</wire>
<wire>
<p1 x="760" y="-120"/>
<p2 x="760" y="-20"/>
</wire>
<wire>
<p1 x="760" y="-20"/>
<p2 x="760" y="0"/>
</wire>
<wire>

View File

@ -42,7 +42,7 @@ DATA Polling for End of Write Detection not implemented!</string>
</entry>
<entry>
<string>Data</string>
<data size="8192">55,56,aa,55,d5,80,0,0,3</data>
<data>55,56,aa,55,d5,80,0,0,3</data>
</entry>
<entry>
<string>inverterConfig</string>
@ -370,7 +370,18 @@ DATA Polling for End of Write Detection not implemented!</string>
</visualElement>
<visualElement>
<elementName>NOr</elementName>
<elementAttributes/>
<elementAttributes>
<entry>
<string>inverterConfig</string>
<inverterConfig>
<string>In_2</string>
</inverterConfig>
</entry>
<entry>
<string>Inputs</string>
<int>3</int>
</entry>
</elementAttributes>
<pos x="820" y="-40"/>
</visualElement>
<visualElement>
@ -663,6 +674,10 @@ DATA Polling for End of Write Detection not implemented!</string>
<p1 x="900" y="-20"/>
<p2 x="920" y="-20"/>
</wire>
<wire>
<p1 x="760" y="-20"/>
<p2 x="800" y="-20"/>
</wire>
<wire>
<p1 x="500" y="-180"/>
<p2 x="540" y="-180"/>
@ -729,6 +744,10 @@ DATA Polling for End of Write Detection not implemented!</string>
</wire>
<wire>
<p1 x="760" y="-120"/>
<p2 x="760" y="-20"/>
</wire>
<wire>
<p1 x="760" y="-20"/>
<p2 x="760" y="0"/>
</wire>
<wire>

View File

@ -48,10 +48,11 @@ public class RAMSinglePortSel extends Node implements Element, RAMInterface {
private ObservableValue oeIn;
private ObservableValue dataIn;
private boolean cs;
private int readAddr;
private int writeAddr;
private boolean cs;
private boolean oe;
private boolean we;
private boolean lastWrite;
/**
@ -101,7 +102,8 @@ public class RAMSinglePortSel extends Node implements Element, RAMInterface {
oe = oeIn.getBool();
}
boolean write = cs && weIn.getBool();
we = weIn.getBool();
boolean write = cs && we;
if (write && !lastWrite)
writeAddr = (int) addrIn.getValue();
@ -114,7 +116,7 @@ public class RAMSinglePortSel extends Node implements Element, RAMInterface {
@Override
public void writeOutputs() throws NodeException {
if (cs && oe) {
if (cs && oe && !we) {
dataOut.setValue(memory.getDataWord(readAddr));
} else {
dataOut.setToHighZ();