Lesson 2. 16×4 memory: sixteen rows and picking one
In picturesAfter this lesson you will have real memory: RAM16x4 — 16 words of 4 bits. Set the address and the data on the switches, press WE — the word is written; change the address — the display shows what is stored in that cell. Inside are 16 WORD4 rows from lesson 1 and the DEC16 decoder from the processor kit.
2.1. The idea: pick one row out of sixteen
A 4-bit address is a number from 0 to 15, the row number. The DEC16 decoder turns it into "one lit wire out of sixteen" — the same decoder that picked the instruction in the processor kit. From there the wires r0–r15 do all the work:
- "give": wire
rNgoes straight toRof its row — the selected row opens its "tap", the others give zeros; - "write":
AND(rN, WE)→Wof the row — only the selected row can write, and only whileWEis pressed; - output: for each bit the 16 row outputs meet in a 16-input
OR(4 ×OR4→OR4). The zeros of the rows that aren't selected change nothing — the output is the word of the selected row.
The data D0–D3 goes to all 16 rows at once: only the row with W = 1 writes it anyway.
Just like real static memory: while WE is pressed, writing is going on; change the address only with WE released, otherwise the word will also be written wherever the address has moved to.
2.2. Why reading uses gates and not a shared wire
In real memory chips the row outputs are not collected through OR: all the cells of one bit sit on a shared wire (a "bit line") through switch transistors, and the selected row connects its cell to that wire. That takes fewer parts. It won't work for us:
AND-OR costs more parts, but in it every wire is always driven by exactly one gate — there is nothing to short.
2.3. Building
The same project as in lesson 1: lesson 1's test bench doesn't get in the way (it has its own labels wD, wO). You need WORD4 (lesson 1), DEC16 and OR4 (the processor kit).
Step 1. The RAM16x4 chip
What we build. A decoder, 16 "write" gates (AND), 16 rows and an OR tree.
INPUT PORTS: A0, A1, A2, A3, D0, D1, D2, D3, WE · OUTPUT PORTS: Q0, Q1, Q2, Q3
| Element | Pin | Direction | Label |
|---|---|---|---|
| DEC16 | I0 | in | A0 |
| DEC16 | I1 | in | A1 |
| DEC16 | I2 | in | A2 |
| DEC16 | I3 | in | A3 |
| DEC16 | Y0 | out | r0 |
| DEC16 | Y1 | out | r1 |
| DEC16 | Y2 | out | r2 |
| DEC16 | Y3 | out | r3 |
| DEC16 | Y4 | out | r4 |
| DEC16 | Y5 | out | r5 |
| DEC16 | Y6 | out | r6 |
| DEC16 | Y7 | out | r7 |
| DEC16 | Y8 | out | r8 |
| DEC16 | Y9 | out | r9 |
| DEC16 | Y10 | out | r10 |
| DEC16 | Y11 | out | r11 |
| DEC16 | Y12 | out | r12 |
| DEC16 | Y13 | out | r13 |
| DEC16 | Y14 | out | r14 |
| DEC16 | Y15 | out | r15 |
| AND | I0 | in | r0 |
| AND | I1 | in | WE |
| AND | O0 | out | w0 |
| AND | I0 | in | r1 |
| AND | I1 | in | WE |
| AND | O0 | out | w1 |
| AND | I0 | in | r2 |
| AND | I1 | in | WE |
| AND | O0 | out | w2 |
| AND | I0 | in | r3 |
| AND | I1 | in | WE |
| AND | O0 | out | w3 |
| AND | I0 | in | r4 |
| AND | I1 | in | WE |
| AND | O0 | out | w4 |
| AND | I0 | in | r5 |
| AND | I1 | in | WE |
| AND | O0 | out | w5 |
| AND | I0 | in | r6 |
| AND | I1 | in | WE |
| AND | O0 | out | w6 |
| AND | I0 | in | r7 |
| AND | I1 | in | WE |
| AND | O0 | out | w7 |
| AND | I0 | in | r8 |
| AND | I1 | in | WE |
| AND | O0 | out | w8 |
| AND | I0 | in | r9 |
| AND | I1 | in | WE |
| AND | O0 | out | w9 |
| AND | I0 | in | r10 |
| AND | I1 | in | WE |
| AND | O0 | out | w10 |
| AND | I0 | in | r11 |
| AND | I1 | in | WE |
| AND | O0 | out | w11 |
| AND | I0 | in | r12 |
| AND | I1 | in | WE |
| AND | O0 | out | w12 |
| AND | I0 | in | r13 |
| AND | I1 | in | WE |
| AND | O0 | out | w13 |
| AND | I0 | in | r14 |
| AND | I1 | in | WE |
| AND | O0 | out | w14 |
| AND | I0 | in | r15 |
| AND | I1 | in | WE |
| AND | O0 | out | w15 |
| WORD4 | D0 | in | D0 |
| WORD4 | D1 | in | D1 |
| WORD4 | D2 | in | D2 |
| WORD4 | D3 | in | D3 |
| WORD4 | W | in | w0 |
| WORD4 | R | in | r0 |
| WORD4 | O0 | out | c0_0 |
| WORD4 | O1 | in | c0_1 |
| WORD4 | O2 | in | c0_2 |
| WORD4 | O3 | in | c0_3 |
| WORD4 | D0 | in | D0 |
| WORD4 | D1 | in | D1 |
| WORD4 | D2 | in | D2 |
| WORD4 | D3 | in | D3 |
| WORD4 | W | in | w1 |
| WORD4 | R | in | r1 |
| WORD4 | O0 | out | c1_0 |
| WORD4 | O1 | in | c1_1 |
| WORD4 | O2 | in | c1_2 |
| WORD4 | O3 | in | c1_3 |
| WORD4 | D0 | in | D0 |
| WORD4 | D1 | in | D1 |
| WORD4 | D2 | in | D2 |
| WORD4 | D3 | in | D3 |
| WORD4 | W | in | w2 |
| WORD4 | R | in | r2 |
| WORD4 | O0 | out | c2_0 |
| WORD4 | O1 | in | c2_1 |
| WORD4 | O2 | in | c2_2 |
| WORD4 | O3 | in | c2_3 |
| WORD4 | D0 | in | D0 |
| WORD4 | D1 | in | D1 |
| WORD4 | D2 | in | D2 |
| WORD4 | D3 | in | D3 |
| WORD4 | W | in | w3 |
| WORD4 | R | in | r3 |
| WORD4 | O0 | out | c3_0 |
| WORD4 | O1 | in | c3_1 |
| WORD4 | O2 | in | c3_2 |
| WORD4 | O3 | in | c3_3 |
| WORD4 | D0 | in | D0 |
| WORD4 | D1 | in | D1 |
| WORD4 | D2 | in | D2 |
| WORD4 | D3 | in | D3 |
| WORD4 | W | in | w4 |
| WORD4 | R | in | r4 |
| WORD4 | O0 | out | c4_0 |
| WORD4 | O1 | in | c4_1 |
| WORD4 | O2 | in | c4_2 |
| WORD4 | O3 | in | c4_3 |
| WORD4 | D0 | in | D0 |
| WORD4 | D1 | in | D1 |
| WORD4 | D2 | in | D2 |
| WORD4 | D3 | in | D3 |
| WORD4 | W | in | w5 |
| WORD4 | R | in | r5 |
| WORD4 | O0 | out | c5_0 |
| WORD4 | O1 | in | c5_1 |
| WORD4 | O2 | in | c5_2 |
| WORD4 | O3 | in | c5_3 |
| WORD4 | D0 | in | D0 |
| WORD4 | D1 | in | D1 |
| WORD4 | D2 | in | D2 |
| WORD4 | D3 | in | D3 |
| WORD4 | W | in | w6 |
| WORD4 | R | in | r6 |
| WORD4 | O0 | out | c6_0 |
| WORD4 | O1 | in | c6_1 |
| WORD4 | O2 | in | c6_2 |
| WORD4 | O3 | in | c6_3 |
| WORD4 | D0 | in | D0 |
| WORD4 | D1 | in | D1 |
| WORD4 | D2 | in | D2 |
| WORD4 | D3 | in | D3 |
| WORD4 | W | in | w7 |
| WORD4 | R | in | r7 |
| WORD4 | O0 | out | c7_0 |
| WORD4 | O1 | in | c7_1 |
| WORD4 | O2 | in | c7_2 |
| WORD4 | O3 | in | c7_3 |
| WORD4 | D0 | in | D0 |
| WORD4 | D1 | in | D1 |
| WORD4 | D2 | in | D2 |
| WORD4 | D3 | in | D3 |
| WORD4 | W | in | w8 |
| WORD4 | R | in | r8 |
| WORD4 | O0 | out | c8_0 |
| WORD4 | O1 | in | c8_1 |
| WORD4 | O2 | in | c8_2 |
| WORD4 | O3 | in | c8_3 |
| WORD4 | D0 | in | D0 |
| WORD4 | D1 | in | D1 |
| WORD4 | D2 | in | D2 |
| WORD4 | D3 | in | D3 |
| WORD4 | W | in | w9 |
| WORD4 | R | in | r9 |
| WORD4 | O0 | out | c9_0 |
| WORD4 | O1 | in | c9_1 |
| WORD4 | O2 | in | c9_2 |
| WORD4 | O3 | in | c9_3 |
| WORD4 | D0 | in | D0 |
| WORD4 | D1 | in | D1 |
| WORD4 | D2 | in | D2 |
| WORD4 | D3 | in | D3 |
| WORD4 | W | in | w10 |
| WORD4 | R | in | r10 |
| WORD4 | O0 | out | c10_0 |
| WORD4 | O1 | in | c10_1 |
| WORD4 | O2 | in | c10_2 |
| WORD4 | O3 | in | c10_3 |
| WORD4 | D0 | in | D0 |
| WORD4 | D1 | in | D1 |
| WORD4 | D2 | in | D2 |
| WORD4 | D3 | in | D3 |
| WORD4 | W | in | w11 |
| WORD4 | R | in | r11 |
| WORD4 | O0 | out | c11_0 |
| WORD4 | O1 | in | c11_1 |
| WORD4 | O2 | in | c11_2 |
| WORD4 | O3 | in | c11_3 |
| WORD4 | D0 | in | D0 |
| WORD4 | D1 | in | D1 |
| WORD4 | D2 | in | D2 |
| WORD4 | D3 | in | D3 |
| WORD4 | W | in | w12 |
| WORD4 | R | in | r12 |
| WORD4 | O0 | out | c12_0 |
| WORD4 | O1 | in | c12_1 |
| WORD4 | O2 | in | c12_2 |
| WORD4 | O3 | in | c12_3 |
| WORD4 | D0 | in | D0 |
| WORD4 | D1 | in | D1 |
| WORD4 | D2 | in | D2 |
| WORD4 | D3 | in | D3 |
| WORD4 | W | in | w13 |
| WORD4 | R | in | r13 |
| WORD4 | O0 | out | c13_0 |
| WORD4 | O1 | in | c13_1 |
| WORD4 | O2 | in | c13_2 |
| WORD4 | O3 | in | c13_3 |
| WORD4 | D0 | in | D0 |
| WORD4 | D1 | in | D1 |
| WORD4 | D2 | in | D2 |
| WORD4 | D3 | in | D3 |
| WORD4 | W | in | w14 |
| WORD4 | R | in | r14 |
| WORD4 | O0 | out | c14_0 |
| WORD4 | O1 | in | c14_1 |
| WORD4 | O2 | in | c14_2 |
| WORD4 | O3 | in | c14_3 |
| WORD4 | D0 | in | D0 |
| WORD4 | D1 | in | D1 |
| WORD4 | D2 | in | D2 |
| WORD4 | D3 | in | D3 |
| WORD4 | W | in | w15 |
| WORD4 | R | in | r15 |
| WORD4 | O0 | out | c15_0 |
| WORD4 | O1 | in | c15_1 |
| WORD4 | O2 | in | c15_2 |
| WORD4 | O3 | in | c15_3 |
| OR4 | A | in | c0_0 |
| OR4 | B | in | c1_0 |
| OR4 | C | in | c2_0 |
| OR4 | D | in | c3_0 |
| OR4 | Y | out | g0_0 |
| OR4 | A | in | c4_0 |
| OR4 | B | in | c5_0 |
| OR4 | C | in | c6_0 |
| OR4 | D | in | c7_0 |
| OR4 | Y | out | g1_0 |
| OR4 | A | in | c8_0 |
| OR4 | B | in | c9_0 |
| OR4 | C | in | c10_0 |
| OR4 | D | in | c11_0 |
| OR4 | Y | out | g2_0 |
| OR4 | A | in | c12_0 |
| OR4 | B | in | c13_0 |
| OR4 | C | in | c14_0 |
| OR4 | D | in | c15_0 |
| OR4 | Y | out | g3_0 |
| OR4 | A | in | g0_0 |
| OR4 | B | in | g1_0 |
| OR4 | C | in | g2_0 |
| OR4 | D | in | g3_0 |
| OR4 | Y | out | Q0 |
| OR4 | A | in | c0_1 |
| OR4 | B | in | c1_1 |
| OR4 | C | in | c2_1 |
| OR4 | D | in | c3_1 |
| OR4 | Y | out | g0_1 |
| OR4 | A | in | c4_1 |
| OR4 | B | in | c5_1 |
| OR4 | C | in | c6_1 |
| OR4 | D | in | c7_1 |
| OR4 | Y | out | g1_1 |
| OR4 | A | in | c8_1 |
| OR4 | B | in | c9_1 |
| OR4 | C | in | c10_1 |
| OR4 | D | in | c11_1 |
| OR4 | Y | out | g2_1 |
| OR4 | A | in | c12_1 |
| OR4 | B | in | c13_1 |
| OR4 | C | in | c14_1 |
| OR4 | D | in | c15_1 |
| OR4 | Y | out | g3_1 |
| OR4 | A | in | g0_1 |
| OR4 | B | in | g1_1 |
| OR4 | C | in | g2_1 |
| OR4 | D | in | g3_1 |
| OR4 | Y | out | Q1 |
| OR4 | A | in | c0_2 |
| OR4 | B | in | c1_2 |
| OR4 | C | in | c2_2 |
| OR4 | D | in | c3_2 |
| OR4 | Y | out | g0_2 |
| OR4 | A | in | c4_2 |
| OR4 | B | in | c5_2 |
| OR4 | C | in | c6_2 |
| OR4 | D | in | c7_2 |
| OR4 | Y | out | g1_2 |
| OR4 | A | in | c8_2 |
| OR4 | B | in | c9_2 |
| OR4 | C | in | c10_2 |
| OR4 | D | in | c11_2 |
| OR4 | Y | out | g2_2 |
| OR4 | A | in | c12_2 |
| OR4 | B | in | c13_2 |
| OR4 | C | in | c14_2 |
| OR4 | D | in | c15_2 |
| OR4 | Y | out | g3_2 |
| OR4 | A | in | g0_2 |
| OR4 | B | in | g1_2 |
| OR4 | C | in | g2_2 |
| OR4 | D | in | g3_2 |
| OR4 | Y | out | Q2 |
| OR4 | A | in | c0_3 |
| OR4 | B | in | c1_3 |
| OR4 | C | in | c2_3 |
| OR4 | D | in | c3_3 |
| OR4 | Y | out | g0_3 |
| OR4 | A | in | c4_3 |
| OR4 | B | in | c5_3 |
| OR4 | C | in | c6_3 |
| OR4 | D | in | c7_3 |
| OR4 | Y | out | g1_3 |
| OR4 | A | in | c8_3 |
| OR4 | B | in | c9_3 |
| OR4 | C | in | c10_3 |
| OR4 | D | in | c11_3 |
| OR4 | Y | out | g2_3 |
| OR4 | A | in | c12_3 |
| OR4 | B | in | c13_3 |
| OR4 | C | in | c14_3 |
| OR4 | D | in | c15_3 |
| OR4 | Y | out | g3_3 |
| OR4 | A | in | g0_3 |
| OR4 | B | in | g1_3 |
| OR4 | C | in | g2_3 |
| OR4 | D | in | g3_3 |
| OR4 | Y | out | Q3 |
Select all → Ctrl+G → in the Library double-click the chip name → RAM16x4.
Step 2. The test bench
What we build. Four address switches, four data switches, a WE button and three displays: the address, what we write, what is stored in memory.
| Element | Pin | Direction | Label |
|---|---|---|---|
| power | out | out | VCC |
| ground | out | out | GND |
| input | Out | out | mA0 |
| input | Out | out | mA1 |
| input | Out | out | mA2 |
| input | Out | out | mA3 |
| input | Out | out | mD0 |
| input | Out | out | mD1 |
| input | Out | out | mD2 |
| input | Out | out | mD3 |
| button | out | out | mWE |
| RAM16x4 | A0 | in | mA0 |
| RAM16x4 | A1 | in | mA1 |
| RAM16x4 | A2 | in | mA2 |
| RAM16x4 | A3 | in | mA3 |
| RAM16x4 | D0 | in | mD0 |
| RAM16x4 | D1 | in | mD1 |
| RAM16x4 | D2 | in | mD2 |
| RAM16x4 | D3 | in | mD3 |
| RAM16x4 | WE | in | mWE |
| RAM16x4 | Q0 | out | mQ0 |
| RAM16x4 | Q1 | out | mQ1 |
| RAM16x4 | Q2 | out | mQ2 |
| RAM16x4 | Q3 | out | mQ3 |
Three displays: each one ⚙ — width 4, view HEX; source — bus mA (address), mD (what we write), mQ (what is in memory). Don't group the test bench into a chip.
2.4. Check
The address and the data are binary numbers on the switches, low bit on the right (mA0, mD0).
| # | What you do | Address mA | Data | Display: address / data / memory |
|---|---|---|---|---|
| 1 | address 0000 | 0000 | 0000 | 0 / 0 / empty — nothing written yet |
| 2 | set 1 | 0000 | 0001 | 0 / 1 / empty — only set it |
| 3 | press and release WE | 0000 | 0001 | 0 / 1 / 1 — written |
| 4 | address 0001 | 0001 | 0001 | 1 / 1 / empty |
| 5 | set 2, press and release WE | 0001 | 0010 | 1 / 2 / 2 — written |
| 6 | address 0000 | 0000 | 0010 | 0 / 2 / 1 ← what is in cell 0 |
| 7 | address 0001 | 0001 | 0010 | 1 / 2 / 2 ← what is in cell 1 |
The key one is step 6: the data switches are set to 2, but memory at address 0 shows 1. The memory display shows not the switches but what the cell remembered. You don't need to press anything to read: change the address and you see the contents right away.
Cells that were never written are empty or orange (in Fast — F); that's how it should be. While WE is pressed, the memory display follows the data switches — the latches of the selected row are open.
If not:
| You see | Where to look |
|---|---|
| writing goes into all cells at once | W of the rows: each has its own wN = AND(rN, WE), not a shared WE |
| the wrong cell is read | DEC16: I0–I3 = A0–A3 in order; rN → R of row N |
| one bit is always 0 | the OR tree of that bit: 4 × OR4 → OR4 → QN |
Lesson 2 paste (Cmd+I)
On top of lesson 1.
chip RAM16x4 { portIn(A0) portIn(A1) portIn(A2) portIn(A3) portIn(D0) portIn(D1) portIn(D2) portIn(D3) portIn(WE) portOut(Q0) portOut(Q1) portOut(Q2) portOut(Q3) DEC16(I0=A0, I1=A1, I2=A2, I3=A3, Y0=r0, Y1=r1, Y2=r2, Y3=r3, Y4=r4, Y5=r5, Y6=r6, Y7=r7, Y8=r8, Y9=r9, Y10=r10, Y11=r11, Y12=r12, Y13=r13, Y14=r14, Y15=r15) AND(r0, WE, w0) AND(r1, WE, w1) AND(r2, WE, w2) AND(r3, WE, w3) AND(r4, WE, w4) AND(r5, WE, w5) AND(r6, WE, w6) AND(r7, WE, w7) AND(r8, WE, w8) AND(r9, WE, w9) AND(r10, WE, w10) AND(r11, WE, w11) AND(r12, WE, w12) AND(r13, WE, w13) AND(r14, WE, w14) AND(r15, WE, w15) WORD4(D0=D0, D1=D1, D2=D2, D3=D3, W=w0, R=r0, O0=c0_0, O1=c0_1, O2=c0_2, O3=c0_3) WORD4(D0=D0, D1=D1, D2=D2, D3=D3, W=w1, R=r1, O0=c1_0, O1=c1_1, O2=c1_2, O3=c1_3) WORD4(D0=D0, D1=D1, D2=D2, D3=D3, W=w2, R=r2, O0=c2_0, O1=c2_1, O2=c2_2, O3=c2_3) WORD4(D0=D0, D1=D1, D2=D2, D3=D3, W=w3, R=r3, O0=c3_0, O1=c3_1, O2=c3_2, O3=c3_3) WORD4(D0=D0, D1=D1, D2=D2, D3=D3, W=w4, R=r4, O0=c4_0, O1=c4_1, O2=c4_2, O3=c4_3) WORD4(D0=D0, D1=D1, D2=D2, D3=D3, W=w5, R=r5, O0=c5_0, O1=c5_1, O2=c5_2, O3=c5_3) WORD4(D0=D0, D1=D1, D2=D2, D3=D3, W=w6, R=r6, O0=c6_0, O1=c6_1, O2=c6_2, O3=c6_3) WORD4(D0=D0, D1=D1, D2=D2, D3=D3, W=w7, R=r7, O0=c7_0, O1=c7_1, O2=c7_2, O3=c7_3) WORD4(D0=D0, D1=D1, D2=D2, D3=D3, W=w8, R=r8, O0=c8_0, O1=c8_1, O2=c8_2, O3=c8_3) WORD4(D0=D0, D1=D1, D2=D2, D3=D3, W=w9, R=r9, O0=c9_0, O1=c9_1, O2=c9_2, O3=c9_3) WORD4(D0=D0, D1=D1, D2=D2, D3=D3, W=w10, R=r10, O0=c10_0, O1=c10_1, O2=c10_2, O3=c10_3) WORD4(D0=D0, D1=D1, D2=D2, D3=D3, W=w11, R=r11, O0=c11_0, O1=c11_1, O2=c11_2, O3=c11_3) WORD4(D0=D0, D1=D1, D2=D2, D3=D3, W=w12, R=r12, O0=c12_0, O1=c12_1, O2=c12_2, O3=c12_3) WORD4(D0=D0, D1=D1, D2=D2, D3=D3, W=w13, R=r13, O0=c13_0, O1=c13_1, O2=c13_2, O3=c13_3) WORD4(D0=D0, D1=D1, D2=D2, D3=D3, W=w14, R=r14, O0=c14_0, O1=c14_1, O2=c14_2, O3=c14_3) WORD4(D0=D0, D1=D1, D2=D2, D3=D3, W=w15, R=r15, O0=c15_0, O1=c15_1, O2=c15_2, O3=c15_3) OR4(A=c0_0, B=c1_0, C=c2_0, D=c3_0, Y=g0_0) OR4(A=c4_0, B=c5_0, C=c6_0, D=c7_0, Y=g1_0) OR4(A=c8_0, B=c9_0, C=c10_0, D=c11_0, Y=g2_0) OR4(A=c12_0, B=c13_0, C=c14_0, D=c15_0, Y=g3_0) OR4(A=g0_0, B=g1_0, C=g2_0, D=g3_0, Y=Q0) OR4(A=c0_1, B=c1_1, C=c2_1, D=c3_1, Y=g0_1) OR4(A=c4_1, B=c5_1, C=c6_1, D=c7_1, Y=g1_1) OR4(A=c8_1, B=c9_1, C=c10_1, D=c11_1, Y=g2_1) OR4(A=c12_1, B=c13_1, C=c14_1, D=c15_1, Y=g3_1) OR4(A=g0_1, B=g1_1, C=g2_1, D=g3_1, Y=Q1) OR4(A=c0_2, B=c1_2, C=c2_2, D=c3_2, Y=g0_2) OR4(A=c4_2, B=c5_2, C=c6_2, D=c7_2, Y=g1_2) OR4(A=c8_2, B=c9_2, C=c10_2, D=c11_2, Y=g2_2) OR4(A=c12_2, B=c13_2, C=c14_2, D=c15_2, Y=g3_2) OR4(A=g0_2, B=g1_2, C=g2_2, D=g3_2, Y=Q2) OR4(A=c0_3, B=c1_3, C=c2_3, D=c3_3, Y=g0_3) OR4(A=c4_3, B=c5_3, C=c6_3, D=c7_3, Y=g1_3) OR4(A=c8_3, B=c9_3, C=c10_3, D=c11_3, Y=g2_3) OR4(A=c12_3, B=c13_3, C=c14_3, D=c15_3, Y=g3_3) OR4(A=g0_3, B=g1_3, C=g2_3, D=g3_3, Y=Q3)} power(VCC)ground(GND)input(Out=mA0)input(Out=mA1)input(Out=mA2)input(Out=mA3)input(Out=mD0)input(Out=mD1)input(Out=mD2)input(Out=mD3)button{label="WE", hostKey="KeyW"}(mWE)RAM16x4(A0=mA0, A1=mA1, A2=mA2, A3=mA3, D0=mD0, D1=mD1, D2=mD2, D3=mD3, WE=mWE, Q0=mQ0, Q1=mQ1, Q2=mQ2, Q3=mQ3)display{bits=4, base="HEX", busSource="mA"}()display{bits=4, base="HEX", busSource="mD"}()display{bits=4, base="HEX", busSource="mQ"}()¿No te sale? Algo no funciona →