ROM

Library: Memory
Introduced: 2.1.0
Appearance:

Behavior

The ROM component stores up to 4,096 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).

Pins

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.

Attributes

Address Bit Width
The bit width of the address bits. The number of values stored in RAM is 2addrBitWidth.
Data Bit Width
The bit width of each individual value in memory.
Contents
Stores the contents of memory.

Poke Tool Behavior

See poking memory in the User's Guide.

Text Tool Behavior

None.

Menu Tool Behavior

See pop-up menus and files in the User's Guide.

Back to Library Reference