Set up the ROM
| Address | in | Address: location accessed in memory |
|---|---|---|
| Data | out | Data: value loaded from address |
No rows match.
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.
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.
| # | A | D |
|---|---|---|
| 0x0 | 0x11 | |
| 0x1 | 0x22 | |
| 0x2 | 0x33 | |
| 0x3 | 0x44 | |
| 0x4 | 0x55 | |
| 0x5 | 0x66 | |
| 0x6 | 0x77 | |
| 0x7 | 0x88 | |
| 0x8 | 0x99 | |
| 0x9 | 0xaa | |
| 0xa | 0xbb | |
| 0xb | 0xcc | |
| 0xc | 0xdd | |
| 0xd | 0xee | |
| 0xe | 0xff | |
| 0xf | 0x0 |
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
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 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
4*aa 2*bb cc
Result: 4*aa 2*bb cc gave aa aa aa aa bb bb cc.
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 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 plain
1122334455667788
Result: Loaded the 8 bytes.
When loading fails
11 22 33 44
Hex file header not recognized0x11 0x22 0x33
Hex file header not recognizedv2.0 raw
11 22 zz 44
Line 2: "zz" is not valid hex data.v2.0 raw
100 22
(no message)Other messages are on the error list.
Version differences
| Feature | 2.7.1 | 5.0.0 |
|---|---|---|
| Default ROM ports | 2.7.1: yes3 ports | 5.0.0: yes2 ports (F23) |
| Image formats | 2.7.1: partialv2.0 raw only, per its error strings | 5.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.