When RAM is used in Command-line verification mode, the first read returns all zeros. After the first clock tick it will return the actual contents. The Rom part works correctly. Here is a test circuit:
Where the first collumn is the address the second is the ROM with the same data and the thrid is the RAM (in asyncronous mode). As you can see the first access is all zeros. The problem goes away after the first clock tick, though a RAM in asynchronous mode shouldn't be sensitive to the clock.
I would like to add multiple attachemnts, hrmmm.... Well anyway if you run a command line like this:
java -jar /usr/share/logisim/logisim.jar RAM_Test.circ -tty table -load RAM_Test_Img, and the image file is something like:
v2.0 raw
a b c d e f
Then you will get:
0000 0000 0000 1010 0000 0000
0000 0001 0000 1011 0000 1011
0000 0010 0000 1100 0000 1100
0000 0011 0000 1101 0000 1101
0000 0100 0000 1110 0000 1110
0000 0101 0000 1111 0000 1111
0000 0110 0000 0000 0000 0000
0000 0111 0000 0000 0000 0000
Where the first collumn is the address the second is the ROM with the same data and the thrid is the RAM (in asyncronous mode). As you can see the first access is all zeros. The problem goes away after the first clock tick, though a RAM in asynchronous mode shouldn't be sensitive to the clock.
You can even simplify the circuit to this:
and when you run:
java -jar /usr/share/logisim/logisim.jar RAM_Test.circ -tty table -load RAM_Test_Img
You will get:
0000 0011 0000 1101 0000 0000
0000 0011 0000 1101 0000 1101
Showing again that before the first clock tick the RAM returns all zeros.
Here is the test circuit.
Last edit: Clif Cox 2017-10-26