The ROM component stores up to 16,777,216 values (specified in the Address Bit Width attribute), each of which can include up to to 32 bits (specified in the Data Bit Width attribute). A circuit can access the current values in ROM, but it cannot change them. The user can modify individual values interactively via the Poke Tool, or the user can modify the entire contents via the Menu Tool.
Unlike the RAM component, the ROM component's current contents are stored as an attribute of the component. Thus, if a circuit containing a ROM component is used twice, then both ROM components will hold the same values. Also because of this behavior, the current ROM contents are stored in files created by Logisim.
Current values are displayed in the component. Addresses displayed are listed in gray to the left of the display area. Inside, each value is listed using hexadecimal. The value at the currently selected address will be displayed in inverse text (white on black).
- A on west edge (input, bit width matches Address Bit Width attribute)
- Selects which of the values are currently being accessed by the circuit.
- D on east edge (input/output, bit width matches Data Bit Width attribute)
- Outputs the value at the currently selected address at the D pin if sel is 1 or floating. If sel is 0, then D will be floating.
- sel on south edge (input, bit width 1)
- If you have just one ROM module, ignore this input. If you have multiple ROM modules in parallel, you can use this input to enable or disable the entire ROM module, based on whether the value is 1 or 0. In other words, when this is 0, no value is emitted on the D output.
When the component is selected or being added,
the digits '0' through '9' alter its
Address Bit Width attribute
and Alt-0 through Alt-9 alter its
Data Bit Width attribute.
- Address Bit Width
- The bit width of the address bits. The number of values stored in ROM is 2addrBitWidth.
- Data Bit Width
- The bit width of each individual value in memory.
- Stores the contents of memory.
Poke Tool Behavior
See poking memory in the User's Guide.
Text Tool Behavior
Menu Tool Behavior
See pop-up menus and files in the User's Guide.