Status: Tags: Links: Nand2Tetris Project 3
RAM8
Notes
- Feed the in value to all the registers simultaneously
- use mux, demux logic to select the right register
- RAM’s adress input consists of:
- A field to select a ram part
- A register within that ram part
Code
|
|
Truth Table
| time | in | load | address | out |
|---|---|---|---|---|
| 0+ | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 0 |
| 1+ | 0 | 1 | 0 | 0 |
| 2 | 0 | 1 | 0 | 0 |
| 2+ | 11111 | 0 | 0 | 0 |
| 3 | 11111 | 0 | 0 | 0 |
| 3+ | 11111 | 1 | 1 | 0 |
| 4 | 11111 | 1 | 1 | 11111 |
| 4+ | 11111 | 0 | 0 | 0 |
| 5 | 11111 | 0 | 0 | 0 |
| 5+ | 3333 | 0 | 3 | 0 |
| 6 | 3333 | 0 | 3 | 0 |
| 6+ | 3333 | 1 | 3 | 0 |
| 7 | 3333 | 1 | 3 | 3333 |
| 7+ | 3333 | 0 | 3 | 3333 |
| 8 | 3333 | 0 | 3 | 3333 |
| 8 | 3333 | 0 | 1 | 11111 |
| 8+ | 7777 | 0 | 1 | 11111 |
| 9 | 7777 | 0 | 1 | 11111 |
| 9+ | 7777 | 1 | 7 | 0 |
References: