Menu

Theme

Component reference · Reference · CHECKED ON 5.0.0

ROM in Logisim: put your data in, and make it stay there

Place a ROM from the Memory library, set its address and data widths, then right-click it and choose Edit Contents to type values, or Load Image to read a file. The file must start with a header line such as v2.0 raw followed by hex words separated by spaces; without the header Logisim-evolution 5.0.0 rejects it with Hex file header not recognized (F15). ROM contents are saved inside the .circ file, so they load with it (F12).
FOR
CPU builders and lookup-table labs
CHECKED
11 Nov 2026
Checked against Logisim-evolution 5.0.0 on 1 machines
On this page

Set up the ROM

Default ROM ports (F44). The 2.7.1 default instance has one more port.
AddressinAddress: location accessed in memory
DataoutData: value loaded from address

Set the address and data widths in the Properties panel. A 4-bit address gives 16 words, 8 bits 256, 10 bits 1,024 and 16 bits 65,536. To hold 32-bit words, set the data width to 32: one word per address.

circ-rom-embedded · mainscroll to see all
884bAROMtable8bD
A ROM with a 4-bit address and 8-bit data. Its 16 words are stored inside the file. CC BY 4.0 · SHA-256 32a6ba13744c
Describe this circuit

Components: Input pin A; ROM table; Output pin D.

  • Input pin A connects to ROM table (net A), 8 bits wide.
  • ROM table connects to Output pin D (net D), 8 bits wide.
Every address of the ROM above, read back in 5.0.0.
#AD
0x00x11
0x10x22
0x20x33
0x30x44
0x40x55
0x50x66
0x60x77
0x70x88
0x80x99
0x90xaa
0xa0xbb
0xb0xcc
0xc0xdd
0xd0xee
0xe0xff
0xf0x0

Download circ-rom-embedded.circ.

Three ways to fill it

Type or paste in the hex editor

Right-click the ROM and choose Edit Contents. We did not test what pasting a list of hex values does in 5.0.0.

Load an image file from the menu

Right-click and choose Load Image. The file formats that worked on the command line are below; we did not test the menu dialog or the binary import.

Load from the command line

Terminal
java -jar logisim-evolution-5.0.0-all.jar --tty table circuit.circ --load image.txt

Order matters: the circuit file comes first, then –load (F16). With –tty table, the truth table is computed before memories are loaded, so a ROM driven by an input pin reads all zeros unless the circuit has a halt pin (F13). See command line.

Image file formats that work

Tested by loading each file into a 16-word, 8-bit ROM (F14):

### v2.0 rawWORKS Hex words separated by spaces. A run of equal words can be written 4*aa. F14
file
v2.0 raw
11 22 33 44 55 66 77 88
99 aa bb cc dd ee ff 0

Result: Loaded all 16 words.

### v2.0 raw (run-length)WORKS The same header with count*value groups. F14
file
v2.0 raw
4*aa 2*bb cc

Result: 4*aa 2*bb cc gave aa aa aa aa bb bb cc.

### v3.0 hex words plainWORKS One hex word per entry, in order. F14
file
v3.0 hex words plain
11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 00

Result: Loaded all 16 words.

### v3.0 hex words addressedWORKS Lines that start with a word address and a colon. Gaps become 0. F14
file
v3.0 hex words addressed
0: 11 22 33 44
8: 99 aa

Result: Words at 0 to 3 and 8 to 9; the gap read 0.

### v3.0 hex bytes plainWORKS Bytes written as pairs of digits with no separator. F14
file
v3.0 hex bytes plain
1122334455667788

Result: Loaded the 8 bytes.

### v3.0 hex bytes addressed and endian variantsUNTESTED Not tested.
### Binary and ASCII importsUNTESTED Not tested.

When loading fails

### noheader.txt
file
11 22 33 44
Hex file header not recognized
The memory stays empty (reads 0). Fix: Add a header line such as v2.0 raw. F15
### hex0x.txt
file
0x11 0x22 0x33
Hex file header not recognized
A plain list of 0x values is rejected for the same reason. Fix: Add the header and drop the 0x prefixes. F15
### bad.txt
file
v2.0 raw
11 22 zz 44
Line 2: "zz" is not valid hex data.
That word becomes 0; the rest load. Fix: Fix the token on the line named. F15
### toowide.txt
file
v2.0 raw
100 22
(no message)
100 into an 8-bit ROM is cut to 00 with no warning. Fix: Check widths before you load. F15

Other messages are on the error list.

Version differences

Feature2.7.15.0.0
Default ROM ports2.7.1: yes3 ports5.0.0: yes2 ports (F23)
Image formats2.7.1: partialv2.0 raw only, per its error strings5.0.0: yesraw, words and bytes (F14)

See also RAM and all components.

To see which version made a file and what opens where, read the .circ file page.

Frequently asked questions

How do I put data into a Logisim ROM?

Right-click the ROM and choose Edit Contents to type values, or Load Image to read a file that starts with a header such as v2.0 raw. The contents are saved in the .circ file.

Why does Logisim say Hex file header not recognized?

The first line of the image is not a known header. A plain list such as 0x11 0x22 is rejected and the memory stays empty. Add the header line v2.0 raw.

Do ROM contents stay when I save and reopen?

Yes. In our test 16 words saved in the file read back correctly (F12).

How do I load a ROM from the command line?

Put the circuit first, then the option: --tty table circuit.circ --load image.txt. With --tty table, the circuit needs a halt pin or the ROM reads zeros (F13, F16).

Why does a value come out as 00?

A value wider than the data width is cut off with no warning: 100 into an 8-bit ROM became 00 in our test (F15).

Sources

  1. Memory image loading tests on Logisim-evolution 5.0.0, logisim.dev lab data: test-data/lab1-2026-11-09-linux-local/logs/rom-load-*.txt, memory-images/

Try: , , ,