Chose either RAM or ROM (RAM is SRAM - DRAM is not supported by JLS).
Enter the name of the memory element in the Name field. This name must not be the same as the name of any other register or memory element in the circuit.
Set the number of bits in each word by entering a number in the Bits/Word field or using the keypad.
Set the capacity (in words) by entering a number in the Capacity (words) field or using the keypad. A memory must have at least two words.
The values of all words of memory will be zero by default. Some or all words of this memory element can be given non-zero initial values (that are reset every time the circuit is simulated). There are two ways to specify these initial values.
If you choose neither initial memory contents options, this memory element will be initialized to all 0's when simulation begins.
If you have both built-in values and a file name, the file name takes precedence. The simulator will read the file (if possible) and ignore the built-in contents.
If you choose Built In, then a dialog will pop up. Enter the initial contents of whatever words you like. Each line of text will initialize one word of memory. The line contains two numbers, both in base 16 (hexadecimal), separated by one or more spaces/tabs. The first number is the address of the word to be initialized. The second number is the initial value. That same line may contain any other characters (e.g., comments) after the second number as long as whitespace follows the second number. Blank lines and lines whose first non-whitespace character is '#' are ignored.
Click on the OK button to begin placing the memory element, or on Cancel to cancel it.
read The output of a memory element is tri-state, and is enabled whenever both CS and OE are 0. The output value is the word selected by the current address input. The memory access time is the time between a change in any input and a corresponding change in the output. For example, if CS and OE are zero and the address changes, then the output will not change for a time equal to the memory access time. Likewise CS and OE are not both 0, then they both become 0, the output will still be HiZ for the memory access time. Right click on the memory element and select Change Timing to see and/or change the current memory access time).
If the address is greater than the number of words of memory then the output will become HiZ. For example, if you have 12 words of memory and the address is between 12 and 15, then HiZ will be output since there are no words with those addresses.
write Any time an input of a RAM changes there is the possibility of a write. If CS and WE become 0, then a write will be initiated using the current values of the address and data inputs. If CS and WE are already 0 and either the address or data input changes, a write will be initiated. The write will complete after the memory access time. Right click on the memory element and select Change Timing to see and/or change the current memory access time).
If the address is greater than the number of words of memory then nothing will be written to any memory locations.
When simulation stops or is paused, the contents of a memory element can be viewed by right clicking on the element and selecting View Contents. A window will pop up showing the address and value of all words of memory (with a scrollbar). The address will be shown in hexadecimal and decimal. The contents will be shown in hexadecimal, and as an unsigned and signed base 10 integer).
Writes to RAM can also be watched (i.e., traced) during simulation. When watched, a pop-up window will show the address, value and time a write completed. Right click on the element and select Watch Element to make a RAM element watched. Right click on the element and select Un-watch Element to turn watching off.