diff options
author | Frederick Yin <fkfd@fkfd.me> | 2022-08-16 11:54:23 +0800 |
---|---|---|
committer | Frederick Yin <fkfd@fkfd.me> | 2022-08-16 11:54:23 +0800 |
commit | 9542deeb483a00b6fabed7574720926ce97d7511 (patch) | |
tree | 0f2c1f72c03dd4693fd59df67544d2a4dddc5494 /projects/03/b | |
parent | 9c0cb1d1c32724fc95ac9548e4f8d873d3adaccc (diff) |
Projects, 01-06 completed
Diffstat (limited to 'projects/03/b')
-rw-r--r-- | projects/03/b/RAM16K.cmp | 320 | ||||
-rw-r--r-- | projects/03/b/RAM16K.hdl | 24 | ||||
-rw-r--r-- | projects/03/b/RAM16K.out | 320 | ||||
-rw-r--r-- | projects/03/b/RAM16K.tst | 1026 | ||||
-rw-r--r-- | projects/03/b/RAM4K.cmp | 320 | ||||
-rw-r--r-- | projects/03/b/RAM4K.hdl | 28 | ||||
-rw-r--r-- | projects/03/b/RAM4K.out | 0 | ||||
-rw-r--r-- | projects/03/b/RAM4K.tst | 1026 | ||||
-rw-r--r-- | projects/03/b/RAM512.cmp | 320 | ||||
-rw-r--r-- | projects/03/b/RAM512.hdl | 28 | ||||
-rw-r--r-- | projects/03/b/RAM512.out | 320 | ||||
-rw-r--r-- | projects/03/b/RAM512.tst | 1027 |
12 files changed, 4759 insertions, 0 deletions
diff --git a/projects/03/b/RAM16K.cmp b/projects/03/b/RAM16K.cmp new file mode 100644 index 0000000..a1ad9db --- /dev/null +++ b/projects/03/b/RAM16K.cmp @@ -0,0 +1,320 @@ +| 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+ | 4321 | 0 | 0 | 0 |
+| 3 | 4321 | 0 | 0 | 0 |
+| 3+ | 4321 | 1 | 4321 | 0 |
+| 4 | 4321 | 1 | 4321 | 4321 |
+| 4+ | 4321 | 0 | 0 | 0 |
+| 5 | 4321 | 0 | 0 | 0 |
+| 5+ | 12345 | 0 | 12345 | 0 |
+| 6 | 12345 | 0 | 12345 | 0 |
+| 6+ | 12345 | 1 | 12345 | 0 |
+| 7 | 12345 | 1 | 12345 | 12345 |
+| 7+ | 12345 | 0 | 12345 | 12345 |
+| 8 | 12345 | 0 | 12345 | 12345 |
+| 8 | 12345 | 0 | 4321 | 4321 |
+| 8+ | 16383 | 0 | 4321 | 4321 |
+| 9 | 16383 | 0 | 4321 | 4321 |
+| 9+ | 16383 | 1 | 16383 | 0 |
+| 10 | 16383 | 1 | 16383 | 16383 |
+| 10+ | 16383 | 0 | 16383 | 16383 |
+| 11 | 16383 | 0 | 16383 | 16383 |
+| 11 | 16383 | 0 | 12345 | 12345 |
+| 11 | 16383 | 0 | 16383 | 16383 |
+| 11+ | 16383 | 0 | 10920 | 0 |
+| 12 | 16383 | 0 | 10920 | 0 |
+| 12 | 16383 | 0 | 10921 | 0 |
+| 12 | 16383 | 0 | 10922 | 0 |
+| 12 | 16383 | 0 | 10923 | 0 |
+| 12 | 16383 | 0 | 10924 | 0 |
+| 12 | 16383 | 0 | 10925 | 0 |
+| 12 | 16383 | 0 | 10926 | 0 |
+| 12 | 16383 | 0 | 10927 | 0 |
+| 12+ | 21845 | 1 | 10920 | 0 |
+| 13 | 21845 | 1 | 10920 | 21845 |
+| 13+ | 21845 | 1 | 10921 | 0 |
+| 14 | 21845 | 1 | 10921 | 21845 |
+| 14+ | 21845 | 1 | 10922 | 0 |
+| 15 | 21845 | 1 | 10922 | 21845 |
+| 15+ | 21845 | 1 | 10923 | 0 |
+| 16 | 21845 | 1 | 10923 | 21845 |
+| 16+ | 21845 | 1 | 10924 | 0 |
+| 17 | 21845 | 1 | 10924 | 21845 |
+| 17+ | 21845 | 1 | 10925 | 0 |
+| 18 | 21845 | 1 | 10925 | 21845 |
+| 18+ | 21845 | 1 | 10926 | 0 |
+| 19 | 21845 | 1 | 10926 | 21845 |
+| 19+ | 21845 | 1 | 10927 | 0 |
+| 20 | 21845 | 1 | 10927 | 21845 |
+| 20+ | 21845 | 0 | 10920 | 21845 |
+| 21 | 21845 | 0 | 10920 | 21845 |
+| 21 | 21845 | 0 | 10921 | 21845 |
+| 21 | 21845 | 0 | 10922 | 21845 |
+| 21 | 21845 | 0 | 10923 | 21845 |
+| 21 | 21845 | 0 | 10924 | 21845 |
+| 21 | 21845 | 0 | 10925 | 21845 |
+| 21 | 21845 | 0 | 10926 | 21845 |
+| 21 | 21845 | 0 | 10927 | 21845 |
+| 21+ | -21846 | 1 | 10920 | 21845 |
+| 22 | -21846 | 1 | 10920 | -21846 |
+| 22+ | -21846 | 0 | 10920 | -21846 |
+| 23 | -21846 | 0 | 10920 | -21846 |
+| 23 | -21846 | 0 | 10921 | 21845 |
+| 23 | -21846 | 0 | 10922 | 21845 |
+| 23 | -21846 | 0 | 10923 | 21845 |
+| 23 | -21846 | 0 | 10924 | 21845 |
+| 23 | -21846 | 0 | 10925 | 21845 |
+| 23 | -21846 | 0 | 10926 | 21845 |
+| 23 | -21846 | 0 | 10927 | 21845 |
+| 23+ | 21845 | 1 | 10920 | -21846 |
+| 24 | 21845 | 1 | 10920 | 21845 |
+| 24+ | -21846 | 1 | 10921 | 21845 |
+| 25 | -21846 | 1 | 10921 | -21846 |
+| 25+ | -21846 | 0 | 10920 | 21845 |
+| 26 | -21846 | 0 | 10920 | 21845 |
+| 26 | -21846 | 0 | 10921 | -21846 |
+| 26 | -21846 | 0 | 10922 | 21845 |
+| 26 | -21846 | 0 | 10923 | 21845 |
+| 26 | -21846 | 0 | 10924 | 21845 |
+| 26 | -21846 | 0 | 10925 | 21845 |
+| 26 | -21846 | 0 | 10926 | 21845 |
+| 26 | -21846 | 0 | 10927 | 21845 |
+| 26+ | 21845 | 1 | 10921 | -21846 |
+| 27 | 21845 | 1 | 10921 | 21845 |
+| 27+ | -21846 | 1 | 10922 | 21845 |
+| 28 | -21846 | 1 | 10922 | -21846 |
+| 28+ | -21846 | 0 | 10920 | 21845 |
+| 29 | -21846 | 0 | 10920 | 21845 |
+| 29 | -21846 | 0 | 10921 | 21845 |
+| 29 | -21846 | 0 | 10922 | -21846 |
+| 29 | -21846 | 0 | 10923 | 21845 |
+| 29 | -21846 | 0 | 10924 | 21845 |
+| 29 | -21846 | 0 | 10925 | 21845 |
+| 29 | -21846 | 0 | 10926 | 21845 |
+| 29 | -21846 | 0 | 10927 | 21845 |
+| 29+ | 21845 | 1 | 10922 | -21846 |
+| 30 | 21845 | 1 | 10922 | 21845 |
+| 30+ | -21846 | 1 | 10923 | 21845 |
+| 31 | -21846 | 1 | 10923 | -21846 |
+| 31+ | -21846 | 0 | 10920 | 21845 |
+| 32 | -21846 | 0 | 10920 | 21845 |
+| 32 | -21846 | 0 | 10921 | 21845 |
+| 32 | -21846 | 0 | 10922 | 21845 |
+| 32 | -21846 | 0 | 10923 | -21846 |
+| 32 | -21846 | 0 | 10924 | 21845 |
+| 32 | -21846 | 0 | 10925 | 21845 |
+| 32 | -21846 | 0 | 10926 | 21845 |
+| 32 | -21846 | 0 | 10927 | 21845 |
+| 32+ | 21845 | 1 | 10923 | -21846 |
+| 33 | 21845 | 1 | 10923 | 21845 |
+| 33+ | -21846 | 1 | 10924 | 21845 |
+| 34 | -21846 | 1 | 10924 | -21846 |
+| 34+ | -21846 | 0 | 10920 | 21845 |
+| 35 | -21846 | 0 | 10920 | 21845 |
+| 35 | -21846 | 0 | 10921 | 21845 |
+| 35 | -21846 | 0 | 10922 | 21845 |
+| 35 | -21846 | 0 | 10923 | 21845 |
+| 35 | -21846 | 0 | 10924 | -21846 |
+| 35 | -21846 | 0 | 10925 | 21845 |
+| 35 | -21846 | 0 | 10926 | 21845 |
+| 35 | -21846 | 0 | 10927 | 21845 |
+| 35+ | 21845 | 1 | 10924 | -21846 |
+| 36 | 21845 | 1 | 10924 | 21845 |
+| 36+ | -21846 | 1 | 10925 | 21845 |
+| 37 | -21846 | 1 | 10925 | -21846 |
+| 37+ | -21846 | 0 | 10920 | 21845 |
+| 38 | -21846 | 0 | 10920 | 21845 |
+| 38 | -21846 | 0 | 10921 | 21845 |
+| 38 | -21846 | 0 | 10922 | 21845 |
+| 38 | -21846 | 0 | 10923 | 21845 |
+| 38 | -21846 | 0 | 10924 | 21845 |
+| 38 | -21846 | 0 | 10925 | -21846 |
+| 38 | -21846 | 0 | 10926 | 21845 |
+| 38 | -21846 | 0 | 10927 | 21845 |
+| 38+ | 21845 | 1 | 10925 | -21846 |
+| 39 | 21845 | 1 | 10925 | 21845 |
+| 39+ | -21846 | 1 | 10926 | 21845 |
+| 40 | -21846 | 1 | 10926 | -21846 |
+| 40+ | -21846 | 0 | 10920 | 21845 |
+| 41 | -21846 | 0 | 10920 | 21845 |
+| 41 | -21846 | 0 | 10921 | 21845 |
+| 41 | -21846 | 0 | 10922 | 21845 |
+| 41 | -21846 | 0 | 10923 | 21845 |
+| 41 | -21846 | 0 | 10924 | 21845 |
+| 41 | -21846 | 0 | 10925 | 21845 |
+| 41 | -21846 | 0 | 10926 | -21846 |
+| 41 | -21846 | 0 | 10927 | 21845 |
+| 41+ | 21845 | 1 | 10926 | -21846 |
+| 42 | 21845 | 1 | 10926 | 21845 |
+| 42+ | -21846 | 1 | 10927 | 21845 |
+| 43 | -21846 | 1 | 10927 | -21846 |
+| 43+ | -21846 | 0 | 10920 | 21845 |
+| 44 | -21846 | 0 | 10920 | 21845 |
+| 44 | -21846 | 0 | 10921 | 21845 |
+| 44 | -21846 | 0 | 10922 | 21845 |
+| 44 | -21846 | 0 | 10923 | 21845 |
+| 44 | -21846 | 0 | 10924 | 21845 |
+| 44 | -21846 | 0 | 10925 | 21845 |
+| 44 | -21846 | 0 | 10926 | 21845 |
+| 44 | -21846 | 0 | 10927 | -21846 |
+| 44+ | 21845 | 1 | 10927 | -21846 |
+| 45 | 21845 | 1 | 10927 | 21845 |
+| 45+ | 21845 | 0 | 10920 | 21845 |
+| 46 | 21845 | 0 | 10920 | 21845 |
+| 46 | 21845 | 0 | 10921 | 21845 |
+| 46 | 21845 | 0 | 10922 | 21845 |
+| 46 | 21845 | 0 | 10923 | 21845 |
+| 46 | 21845 | 0 | 10924 | 21845 |
+| 46 | 21845 | 0 | 10925 | 21845 |
+| 46 | 21845 | 0 | 10926 | 21845 |
+| 46 | 21845 | 0 | 10927 | 21845 |
+| 46+ | 21845 | 0 | 1365 | 0 |
+| 47 | 21845 | 0 | 1365 | 0 |
+| 47 | 21845 | 0 | 3413 | 0 |
+| 47 | 21845 | 0 | 5461 | 0 |
+| 47 | 21845 | 0 | 7509 | 0 |
+| 47 | 21845 | 0 | 9557 | 0 |
+| 47 | 21845 | 0 | 11605 | 0 |
+| 47 | 21845 | 0 | 13653 | 0 |
+| 47 | 21845 | 0 | 15701 | 0 |
+| 47+ | 21845 | 1 | 1365 | 0 |
+| 48 | 21845 | 1 | 1365 | 21845 |
+| 48+ | 21845 | 1 | 3413 | 0 |
+| 49 | 21845 | 1 | 3413 | 21845 |
+| 49+ | 21845 | 1 | 5461 | 0 |
+| 50 | 21845 | 1 | 5461 | 21845 |
+| 50+ | 21845 | 1 | 7509 | 0 |
+| 51 | 21845 | 1 | 7509 | 21845 |
+| 51+ | 21845 | 1 | 9557 | 0 |
+| 52 | 21845 | 1 | 9557 | 21845 |
+| 52+ | 21845 | 1 | 11605 | 0 |
+| 53 | 21845 | 1 | 11605 | 21845 |
+| 53+ | 21845 | 1 | 13653 | 0 |
+| 54 | 21845 | 1 | 13653 | 21845 |
+| 54+ | 21845 | 1 | 15701 | 0 |
+| 55 | 21845 | 1 | 15701 | 21845 |
+| 55+ | 21845 | 0 | 1365 | 21845 |
+| 56 | 21845 | 0 | 1365 | 21845 |
+| 56 | 21845 | 0 | 3413 | 21845 |
+| 56 | 21845 | 0 | 5461 | 21845 |
+| 56 | 21845 | 0 | 7509 | 21845 |
+| 56 | 21845 | 0 | 9557 | 21845 |
+| 56 | 21845 | 0 | 11605 | 21845 |
+| 56 | 21845 | 0 | 13653 | 21845 |
+| 56 | 21845 | 0 | 15701 | 21845 |
+| 56+ | -21846 | 1 | 1365 | 21845 |
+| 57 | -21846 | 1 | 1365 | -21846 |
+| 57+ | -21846 | 0 | 1365 | -21846 |
+| 58 | -21846 | 0 | 1365 | -21846 |
+| 58 | -21846 | 0 | 3413 | 21845 |
+| 58 | -21846 | 0 | 5461 | 21845 |
+| 58 | -21846 | 0 | 7509 | 21845 |
+| 58 | -21846 | 0 | 9557 | 21845 |
+| 58 | -21846 | 0 | 11605 | 21845 |
+| 58 | -21846 | 0 | 13653 | 21845 |
+| 58 | -21846 | 0 | 15701 | 21845 |
+| 58+ | 21845 | 1 | 1365 | -21846 |
+| 59 | 21845 | 1 | 1365 | 21845 |
+| 59+ | -21846 | 1 | 3413 | 21845 |
+| 60 | -21846 | 1 | 3413 | -21846 |
+| 60+ | -21846 | 0 | 1365 | 21845 |
+| 61 | -21846 | 0 | 1365 | 21845 |
+| 61 | -21846 | 0 | 3413 | -21846 |
+| 61 | -21846 | 0 | 5461 | 21845 |
+| 61 | -21846 | 0 | 7509 | 21845 |
+| 61 | -21846 | 0 | 9557 | 21845 |
+| 61 | -21846 | 0 | 11605 | 21845 |
+| 61 | -21846 | 0 | 13653 | 21845 |
+| 61 | -21846 | 0 | 15701 | 21845 |
+| 61+ | 21845 | 1 | 3413 | -21846 |
+| 62 | 21845 | 1 | 3413 | 21845 |
+| 62+ | -21846 | 1 | 5461 | 21845 |
+| 63 | -21846 | 1 | 5461 | -21846 |
+| 63+ | -21846 | 0 | 1365 | 21845 |
+| 64 | -21846 | 0 | 1365 | 21845 |
+| 64 | -21846 | 0 | 3413 | 21845 |
+| 64 | -21846 | 0 | 5461 | -21846 |
+| 64 | -21846 | 0 | 7509 | 21845 |
+| 64 | -21846 | 0 | 9557 | 21845 |
+| 64 | -21846 | 0 | 11605 | 21845 |
+| 64 | -21846 | 0 | 13653 | 21845 |
+| 64 | -21846 | 0 | 15701 | 21845 |
+| 64+ | 21845 | 1 | 5461 | -21846 |
+| 65 | 21845 | 1 | 5461 | 21845 |
+| 65+ | -21846 | 1 | 7509 | 21845 |
+| 66 | -21846 | 1 | 7509 | -21846 |
+| 66+ | -21846 | 0 | 1365 | 21845 |
+| 67 | -21846 | 0 | 1365 | 21845 |
+| 67 | -21846 | 0 | 3413 | 21845 |
+| 67 | -21846 | 0 | 5461 | 21845 |
+| 67 | -21846 | 0 | 7509 | -21846 |
+| 67 | -21846 | 0 | 9557 | 21845 |
+| 67 | -21846 | 0 | 11605 | 21845 |
+| 67 | -21846 | 0 | 13653 | 21845 |
+| 67 | -21846 | 0 | 15701 | 21845 |
+| 67+ | 21845 | 1 | 7509 | -21846 |
+| 68 | 21845 | 1 | 7509 | 21845 |
+| 68+ | -21846 | 1 | 9557 | 21845 |
+| 69 | -21846 | 1 | 9557 | -21846 |
+| 69+ | -21846 | 0 | 1365 | 21845 |
+| 70 | -21846 | 0 | 1365 | 21845 |
+| 70 | -21846 | 0 | 3413 | 21845 |
+| 70 | -21846 | 0 | 5461 | 21845 |
+| 70 | -21846 | 0 | 7509 | 21845 |
+| 70 | -21846 | 0 | 9557 | -21846 |
+| 70 | -21846 | 0 | 11605 | 21845 |
+| 70 | -21846 | 0 | 13653 | 21845 |
+| 70 | -21846 | 0 | 15701 | 21845 |
+| 70+ | 21845 | 1 | 9557 | -21846 |
+| 71 | 21845 | 1 | 9557 | 21845 |
+| 71+ | -21846 | 1 | 11605 | 21845 |
+| 72 | -21846 | 1 | 11605 | -21846 |
+| 72+ | -21846 | 0 | 1365 | 21845 |
+| 73 | -21846 | 0 | 1365 | 21845 |
+| 73 | -21846 | 0 | 3413 | 21845 |
+| 73 | -21846 | 0 | 5461 | 21845 |
+| 73 | -21846 | 0 | 7509 | 21845 |
+| 73 | -21846 | 0 | 9557 | 21845 |
+| 73 | -21846 | 0 | 11605 | -21846 |
+| 73 | -21846 | 0 | 13653 | 21845 |
+| 73 | -21846 | 0 | 15701 | 21845 |
+| 73+ | 21845 | 1 | 11605 | -21846 |
+| 74 | 21845 | 1 | 11605 | 21845 |
+| 74+ | -21846 | 1 | 13653 | 21845 |
+| 75 | -21846 | 1 | 13653 | -21846 |
+| 75+ | -21846 | 0 | 1365 | 21845 |
+| 76 | -21846 | 0 | 1365 | 21845 |
+| 76 | -21846 | 0 | 3413 | 21845 |
+| 76 | -21846 | 0 | 5461 | 21845 |
+| 76 | -21846 | 0 | 7509 | 21845 |
+| 76 | -21846 | 0 | 9557 | 21845 |
+| 76 | -21846 | 0 | 11605 | 21845 |
+| 76 | -21846 | 0 | 13653 | -21846 |
+| 76 | -21846 | 0 | 15701 | 21845 |
+| 76+ | 21845 | 1 | 13653 | -21846 |
+| 77 | 21845 | 1 | 13653 | 21845 |
+| 77+ | -21846 | 1 | 15701 | 21845 |
+| 78 | -21846 | 1 | 15701 | -21846 |
+| 78+ | -21846 | 0 | 1365 | 21845 |
+| 79 | -21846 | 0 | 1365 | 21845 |
+| 79 | -21846 | 0 | 3413 | 21845 |
+| 79 | -21846 | 0 | 5461 | 21845 |
+| 79 | -21846 | 0 | 7509 | 21845 |
+| 79 | -21846 | 0 | 9557 | 21845 |
+| 79 | -21846 | 0 | 11605 | 21845 |
+| 79 | -21846 | 0 | 13653 | 21845 |
+| 79 | -21846 | 0 | 15701 | -21846 |
+| 79+ | 21845 | 1 | 15701 | -21846 |
+| 80 | 21845 | 1 | 15701 | 21845 |
+| 80+ | 21845 | 0 | 1365 | 21845 |
+| 81 | 21845 | 0 | 1365 | 21845 |
+| 81 | 21845 | 0 | 3413 | 21845 |
+| 81 | 21845 | 0 | 5461 | 21845 |
+| 81 | 21845 | 0 | 7509 | 21845 |
+| 81 | 21845 | 0 | 9557 | 21845 |
+| 81 | 21845 | 0 | 11605 | 21845 |
+| 81 | 21845 | 0 | 13653 | 21845 |
+| 81 | 21845 | 0 | 15701 | 21845 |
diff --git a/projects/03/b/RAM16K.hdl b/projects/03/b/RAM16K.hdl new file mode 100644 index 0000000..f981555 --- /dev/null +++ b/projects/03/b/RAM16K.hdl @@ -0,0 +1,24 @@ +// This file is part of www.nand2tetris.org
+// and the book "The Elements of Computing Systems"
+// by Nisan and Schocken, MIT Press.
+// File name: projects/03/b/RAM16K.hdl
+
+/**
+ * Memory of 16K registers, each 16 bit-wide. Out holds the value
+ * stored at the memory location specified by address. If load==1, then
+ * the in value is loaded into the memory location specified by address
+ * (the loaded value will be emitted to out from the next time step onward).
+ */
+
+CHIP RAM16K {
+ IN in[16], load, address[14];
+ OUT out[16];
+
+ PARTS:
+ DMux4Way(in=load, sel=address[12..13], a=l0, b=l1, c=l2, d=l3);
+ RAM4K(in=in, load=l0, address=address[0..11], out=o0);
+ RAM4K(in=in, load=l1, address=address[0..11], out=o1);
+ RAM4K(in=in, load=l2, address=address[0..11], out=o2);
+ RAM4K(in=in, load=l3, address=address[0..11], out=o3);
+ Mux4Way16(a=o0, b=o1, c=o2, d=o3, sel=address[12..13], out=out);
+}
diff --git a/projects/03/b/RAM16K.out b/projects/03/b/RAM16K.out new file mode 100644 index 0000000..2caabe9 --- /dev/null +++ b/projects/03/b/RAM16K.out @@ -0,0 +1,320 @@ +| 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+ | 4321 | 0 | 0 | 0 | +| 3 | 4321 | 0 | 0 | 0 | +| 3+ | 4321 | 1 | 4321 | 0 | +| 4 | 4321 | 1 | 4321 | 4321 | +| 4+ | 4321 | 0 | 0 | 0 | +| 5 | 4321 | 0 | 0 | 0 | +| 5+ | 12345 | 0 | 12345 | 0 | +| 6 | 12345 | 0 | 12345 | 0 | +| 6+ | 12345 | 1 | 12345 | 0 | +| 7 | 12345 | 1 | 12345 | 12345 | +| 7+ | 12345 | 0 | 12345 | 12345 | +| 8 | 12345 | 0 | 12345 | 12345 | +| 8 | 12345 | 0 | 4321 | 4321 | +| 8+ | 16383 | 0 | 4321 | 4321 | +| 9 | 16383 | 0 | 4321 | 4321 | +| 9+ | 16383 | 1 | 16383 | 0 | +| 10 | 16383 | 1 | 16383 | 16383 | +| 10+ | 16383 | 0 | 16383 | 16383 | +| 11 | 16383 | 0 | 16383 | 16383 | +| 11 | 16383 | 0 | 12345 | 12345 | +| 11 | 16383 | 0 | 16383 | 16383 | +| 11+ | 16383 | 0 | 10920 | 0 | +| 12 | 16383 | 0 | 10920 | 0 | +| 12 | 16383 | 0 | 10921 | 0 | +| 12 | 16383 | 0 | 10922 | 0 | +| 12 | 16383 | 0 | 10923 | 0 | +| 12 | 16383 | 0 | 10924 | 0 | +| 12 | 16383 | 0 | 10925 | 0 | +| 12 | 16383 | 0 | 10926 | 0 | +| 12 | 16383 | 0 | 10927 | 0 | +| 12+ | 21845 | 1 | 10920 | 0 | +| 13 | 21845 | 1 | 10920 | 21845 | +| 13+ | 21845 | 1 | 10921 | 0 | +| 14 | 21845 | 1 | 10921 | 21845 | +| 14+ | 21845 | 1 | 10922 | 0 | +| 15 | 21845 | 1 | 10922 | 21845 | +| 15+ | 21845 | 1 | 10923 | 0 | +| 16 | 21845 | 1 | 10923 | 21845 | +| 16+ | 21845 | 1 | 10924 | 0 | +| 17 | 21845 | 1 | 10924 | 21845 | +| 17+ | 21845 | 1 | 10925 | 0 | +| 18 | 21845 | 1 | 10925 | 21845 | +| 18+ | 21845 | 1 | 10926 | 0 | +| 19 | 21845 | 1 | 10926 | 21845 | +| 19+ | 21845 | 1 | 10927 | 0 | +| 20 | 21845 | 1 | 10927 | 21845 | +| 20+ | 21845 | 0 | 10920 | 21845 | +| 21 | 21845 | 0 | 10920 | 21845 | +| 21 | 21845 | 0 | 10921 | 21845 | +| 21 | 21845 | 0 | 10922 | 21845 | +| 21 | 21845 | 0 | 10923 | 21845 | +| 21 | 21845 | 0 | 10924 | 21845 | +| 21 | 21845 | 0 | 10925 | 21845 | +| 21 | 21845 | 0 | 10926 | 21845 | +| 21 | 21845 | 0 | 10927 | 21845 | +| 21+ | -21846 | 1 | 10920 | 21845 | +| 22 | -21846 | 1 | 10920 | -21846 | +| 22+ | -21846 | 0 | 10920 | -21846 | +| 23 | -21846 | 0 | 10920 | -21846 | +| 23 | -21846 | 0 | 10921 | 21845 | +| 23 | -21846 | 0 | 10922 | 21845 | +| 23 | -21846 | 0 | 10923 | 21845 | +| 23 | -21846 | 0 | 10924 | 21845 | +| 23 | -21846 | 0 | 10925 | 21845 | +| 23 | -21846 | 0 | 10926 | 21845 | +| 23 | -21846 | 0 | 10927 | 21845 | +| 23+ | 21845 | 1 | 10920 | -21846 | +| 24 | 21845 | 1 | 10920 | 21845 | +| 24+ | -21846 | 1 | 10921 | 21845 | +| 25 | -21846 | 1 | 10921 | -21846 | +| 25+ | -21846 | 0 | 10920 | 21845 | +| 26 | -21846 | 0 | 10920 | 21845 | +| 26 | -21846 | 0 | 10921 | -21846 | +| 26 | -21846 | 0 | 10922 | 21845 | +| 26 | -21846 | 0 | 10923 | 21845 | +| 26 | -21846 | 0 | 10924 | 21845 | +| 26 | -21846 | 0 | 10925 | 21845 | +| 26 | -21846 | 0 | 10926 | 21845 | +| 26 | -21846 | 0 | 10927 | 21845 | +| 26+ | 21845 | 1 | 10921 | -21846 | +| 27 | 21845 | 1 | 10921 | 21845 | +| 27+ | -21846 | 1 | 10922 | 21845 | +| 28 | -21846 | 1 | 10922 | -21846 | +| 28+ | -21846 | 0 | 10920 | 21845 | +| 29 | -21846 | 0 | 10920 | 21845 | +| 29 | -21846 | 0 | 10921 | 21845 | +| 29 | -21846 | 0 | 10922 | -21846 | +| 29 | -21846 | 0 | 10923 | 21845 | +| 29 | -21846 | 0 | 10924 | 21845 | +| 29 | -21846 | 0 | 10925 | 21845 | +| 29 | -21846 | 0 | 10926 | 21845 | +| 29 | -21846 | 0 | 10927 | 21845 | +| 29+ | 21845 | 1 | 10922 | -21846 | +| 30 | 21845 | 1 | 10922 | 21845 | +| 30+ | -21846 | 1 | 10923 | 21845 | +| 31 | -21846 | 1 | 10923 | -21846 | +| 31+ | -21846 | 0 | 10920 | 21845 | +| 32 | -21846 | 0 | 10920 | 21845 | +| 32 | -21846 | 0 | 10921 | 21845 | +| 32 | -21846 | 0 | 10922 | 21845 | +| 32 | -21846 | 0 | 10923 | -21846 | +| 32 | -21846 | 0 | 10924 | 21845 | +| 32 | -21846 | 0 | 10925 | 21845 | +| 32 | -21846 | 0 | 10926 | 21845 | +| 32 | -21846 | 0 | 10927 | 21845 | +| 32+ | 21845 | 1 | 10923 | -21846 | +| 33 | 21845 | 1 | 10923 | 21845 | +| 33+ | -21846 | 1 | 10924 | 21845 | +| 34 | -21846 | 1 | 10924 | -21846 | +| 34+ | -21846 | 0 | 10920 | 21845 | +| 35 | -21846 | 0 | 10920 | 21845 | +| 35 | -21846 | 0 | 10921 | 21845 | +| 35 | -21846 | 0 | 10922 | 21845 | +| 35 | -21846 | 0 | 10923 | 21845 | +| 35 | -21846 | 0 | 10924 | -21846 | +| 35 | -21846 | 0 | 10925 | 21845 | +| 35 | -21846 | 0 | 10926 | 21845 | +| 35 | -21846 | 0 | 10927 | 21845 | +| 35+ | 21845 | 1 | 10924 | -21846 | +| 36 | 21845 | 1 | 10924 | 21845 | +| 36+ | -21846 | 1 | 10925 | 21845 | +| 37 | -21846 | 1 | 10925 | -21846 | +| 37+ | -21846 | 0 | 10920 | 21845 | +| 38 | -21846 | 0 | 10920 | 21845 | +| 38 | -21846 | 0 | 10921 | 21845 | +| 38 | -21846 | 0 | 10922 | 21845 | +| 38 | -21846 | 0 | 10923 | 21845 | +| 38 | -21846 | 0 | 10924 | 21845 | +| 38 | -21846 | 0 | 10925 | -21846 | +| 38 | -21846 | 0 | 10926 | 21845 | +| 38 | -21846 | 0 | 10927 | 21845 | +| 38+ | 21845 | 1 | 10925 | -21846 | +| 39 | 21845 | 1 | 10925 | 21845 | +| 39+ | -21846 | 1 | 10926 | 21845 | +| 40 | -21846 | 1 | 10926 | -21846 | +| 40+ | -21846 | 0 | 10920 | 21845 | +| 41 | -21846 | 0 | 10920 | 21845 | +| 41 | -21846 | 0 | 10921 | 21845 | +| 41 | -21846 | 0 | 10922 | 21845 | +| 41 | -21846 | 0 | 10923 | 21845 | +| 41 | -21846 | 0 | 10924 | 21845 | +| 41 | -21846 | 0 | 10925 | 21845 | +| 41 | -21846 | 0 | 10926 | -21846 | +| 41 | -21846 | 0 | 10927 | 21845 | +| 41+ | 21845 | 1 | 10926 | -21846 | +| 42 | 21845 | 1 | 10926 | 21845 | +| 42+ | -21846 | 1 | 10927 | 21845 | +| 43 | -21846 | 1 | 10927 | -21846 | +| 43+ | -21846 | 0 | 10920 | 21845 | +| 44 | -21846 | 0 | 10920 | 21845 | +| 44 | -21846 | 0 | 10921 | 21845 | +| 44 | -21846 | 0 | 10922 | 21845 | +| 44 | -21846 | 0 | 10923 | 21845 | +| 44 | -21846 | 0 | 10924 | 21845 | +| 44 | -21846 | 0 | 10925 | 21845 | +| 44 | -21846 | 0 | 10926 | 21845 | +| 44 | -21846 | 0 | 10927 | -21846 | +| 44+ | 21845 | 1 | 10927 | -21846 | +| 45 | 21845 | 1 | 10927 | 21845 | +| 45+ | 21845 | 0 | 10920 | 21845 | +| 46 | 21845 | 0 | 10920 | 21845 | +| 46 | 21845 | 0 | 10921 | 21845 | +| 46 | 21845 | 0 | 10922 | 21845 | +| 46 | 21845 | 0 | 10923 | 21845 | +| 46 | 21845 | 0 | 10924 | 21845 | +| 46 | 21845 | 0 | 10925 | 21845 | +| 46 | 21845 | 0 | 10926 | 21845 | +| 46 | 21845 | 0 | 10927 | 21845 | +| 46+ | 21845 | 0 | 1365 | 0 | +| 47 | 21845 | 0 | 1365 | 0 | +| 47 | 21845 | 0 | 3413 | 0 | +| 47 | 21845 | 0 | 5461 | 0 | +| 47 | 21845 | 0 | 7509 | 0 | +| 47 | 21845 | 0 | 9557 | 0 | +| 47 | 21845 | 0 | 11605 | 0 | +| 47 | 21845 | 0 | 13653 | 0 | +| 47 | 21845 | 0 | 15701 | 0 | +| 47+ | 21845 | 1 | 1365 | 0 | +| 48 | 21845 | 1 | 1365 | 21845 | +| 48+ | 21845 | 1 | 3413 | 0 | +| 49 | 21845 | 1 | 3413 | 21845 | +| 49+ | 21845 | 1 | 5461 | 0 | +| 50 | 21845 | 1 | 5461 | 21845 | +| 50+ | 21845 | 1 | 7509 | 0 | +| 51 | 21845 | 1 | 7509 | 21845 | +| 51+ | 21845 | 1 | 9557 | 0 | +| 52 | 21845 | 1 | 9557 | 21845 | +| 52+ | 21845 | 1 | 11605 | 0 | +| 53 | 21845 | 1 | 11605 | 21845 | +| 53+ | 21845 | 1 | 13653 | 0 | +| 54 | 21845 | 1 | 13653 | 21845 | +| 54+ | 21845 | 1 | 15701 | 0 | +| 55 | 21845 | 1 | 15701 | 21845 | +| 55+ | 21845 | 0 | 1365 | 21845 | +| 56 | 21845 | 0 | 1365 | 21845 | +| 56 | 21845 | 0 | 3413 | 21845 | +| 56 | 21845 | 0 | 5461 | 21845 | +| 56 | 21845 | 0 | 7509 | 21845 | +| 56 | 21845 | 0 | 9557 | 21845 | +| 56 | 21845 | 0 | 11605 | 21845 | +| 56 | 21845 | 0 | 13653 | 21845 | +| 56 | 21845 | 0 | 15701 | 21845 | +| 56+ | -21846 | 1 | 1365 | 21845 | +| 57 | -21846 | 1 | 1365 | -21846 | +| 57+ | -21846 | 0 | 1365 | -21846 | +| 58 | -21846 | 0 | 1365 | -21846 | +| 58 | -21846 | 0 | 3413 | 21845 | +| 58 | -21846 | 0 | 5461 | 21845 | +| 58 | -21846 | 0 | 7509 | 21845 | +| 58 | -21846 | 0 | 9557 | 21845 | +| 58 | -21846 | 0 | 11605 | 21845 | +| 58 | -21846 | 0 | 13653 | 21845 | +| 58 | -21846 | 0 | 15701 | 21845 | +| 58+ | 21845 | 1 | 1365 | -21846 | +| 59 | 21845 | 1 | 1365 | 21845 | +| 59+ | -21846 | 1 | 3413 | 21845 | +| 60 | -21846 | 1 | 3413 | -21846 | +| 60+ | -21846 | 0 | 1365 | 21845 | +| 61 | -21846 | 0 | 1365 | 21845 | +| 61 | -21846 | 0 | 3413 | -21846 | +| 61 | -21846 | 0 | 5461 | 21845 | +| 61 | -21846 | 0 | 7509 | 21845 | +| 61 | -21846 | 0 | 9557 | 21845 | +| 61 | -21846 | 0 | 11605 | 21845 | +| 61 | -21846 | 0 | 13653 | 21845 | +| 61 | -21846 | 0 | 15701 | 21845 | +| 61+ | 21845 | 1 | 3413 | -21846 | +| 62 | 21845 | 1 | 3413 | 21845 | +| 62+ | -21846 | 1 | 5461 | 21845 | +| 63 | -21846 | 1 | 5461 | -21846 | +| 63+ | -21846 | 0 | 1365 | 21845 | +| 64 | -21846 | 0 | 1365 | 21845 | +| 64 | -21846 | 0 | 3413 | 21845 | +| 64 | -21846 | 0 | 5461 | -21846 | +| 64 | -21846 | 0 | 7509 | 21845 | +| 64 | -21846 | 0 | 9557 | 21845 | +| 64 | -21846 | 0 | 11605 | 21845 | +| 64 | -21846 | 0 | 13653 | 21845 | +| 64 | -21846 | 0 | 15701 | 21845 | +| 64+ | 21845 | 1 | 5461 | -21846 | +| 65 | 21845 | 1 | 5461 | 21845 | +| 65+ | -21846 | 1 | 7509 | 21845 | +| 66 | -21846 | 1 | 7509 | -21846 | +| 66+ | -21846 | 0 | 1365 | 21845 | +| 67 | -21846 | 0 | 1365 | 21845 | +| 67 | -21846 | 0 | 3413 | 21845 | +| 67 | -21846 | 0 | 5461 | 21845 | +| 67 | -21846 | 0 | 7509 | -21846 | +| 67 | -21846 | 0 | 9557 | 21845 | +| 67 | -21846 | 0 | 11605 | 21845 | +| 67 | -21846 | 0 | 13653 | 21845 | +| 67 | -21846 | 0 | 15701 | 21845 | +| 67+ | 21845 | 1 | 7509 | -21846 | +| 68 | 21845 | 1 | 7509 | 21845 | +| 68+ | -21846 | 1 | 9557 | 21845 | +| 69 | -21846 | 1 | 9557 | -21846 | +| 69+ | -21846 | 0 | 1365 | 21845 | +| 70 | -21846 | 0 | 1365 | 21845 | +| 70 | -21846 | 0 | 3413 | 21845 | +| 70 | -21846 | 0 | 5461 | 21845 | +| 70 | -21846 | 0 | 7509 | 21845 | +| 70 | -21846 | 0 | 9557 | -21846 | +| 70 | -21846 | 0 | 11605 | 21845 | +| 70 | -21846 | 0 | 13653 | 21845 | +| 70 | -21846 | 0 | 15701 | 21845 | +| 70+ | 21845 | 1 | 9557 | -21846 | +| 71 | 21845 | 1 | 9557 | 21845 | +| 71+ | -21846 | 1 | 11605 | 21845 | +| 72 | -21846 | 1 | 11605 | -21846 | +| 72+ | -21846 | 0 | 1365 | 21845 | +| 73 | -21846 | 0 | 1365 | 21845 | +| 73 | -21846 | 0 | 3413 | 21845 | +| 73 | -21846 | 0 | 5461 | 21845 | +| 73 | -21846 | 0 | 7509 | 21845 | +| 73 | -21846 | 0 | 9557 | 21845 | +| 73 | -21846 | 0 | 11605 | -21846 | +| 73 | -21846 | 0 | 13653 | 21845 | +| 73 | -21846 | 0 | 15701 | 21845 | +| 73+ | 21845 | 1 | 11605 | -21846 | +| 74 | 21845 | 1 | 11605 | 21845 | +| 74+ | -21846 | 1 | 13653 | 21845 | +| 75 | -21846 | 1 | 13653 | -21846 | +| 75+ | -21846 | 0 | 1365 | 21845 | +| 76 | -21846 | 0 | 1365 | 21845 | +| 76 | -21846 | 0 | 3413 | 21845 | +| 76 | -21846 | 0 | 5461 | 21845 | +| 76 | -21846 | 0 | 7509 | 21845 | +| 76 | -21846 | 0 | 9557 | 21845 | +| 76 | -21846 | 0 | 11605 | 21845 | +| 76 | -21846 | 0 | 13653 | -21846 | +| 76 | -21846 | 0 | 15701 | 21845 | +| 76+ | 21845 | 1 | 13653 | -21846 | +| 77 | 21845 | 1 | 13653 | 21845 | +| 77+ | -21846 | 1 | 15701 | 21845 | +| 78 | -21846 | 1 | 15701 | -21846 | +| 78+ | -21846 | 0 | 1365 | 21845 | +| 79 | -21846 | 0 | 1365 | 21845 | +| 79 | -21846 | 0 | 3413 | 21845 | +| 79 | -21846 | 0 | 5461 | 21845 | +| 79 | -21846 | 0 | 7509 | 21845 | +| 79 | -21846 | 0 | 9557 | 21845 | +| 79 | -21846 | 0 | 11605 | 21845 | +| 79 | -21846 | 0 | 13653 | 21845 | +| 79 | -21846 | 0 | 15701 | -21846 | +| 79+ | 21845 | 1 | 15701 | -21846 | +| 80 | 21845 | 1 | 15701 | 21845 | +| 80+ | 21845 | 0 | 1365 | 21845 | +| 81 | 21845 | 0 | 1365 | 21845 | +| 81 | 21845 | 0 | 3413 | 21845 | +| 81 | 21845 | 0 | 5461 | 21845 | +| 81 | 21845 | 0 | 7509 | 21845 | +| 81 | 21845 | 0 | 9557 | 21845 | +| 81 | 21845 | 0 | 11605 | 21845 | +| 81 | 21845 | 0 | 13653 | 21845 | +| 81 | 21845 | 0 | 15701 | 21845 | diff --git a/projects/03/b/RAM16K.tst b/projects/03/b/RAM16K.tst new file mode 100644 index 0000000..e556ad4 --- /dev/null +++ b/projects/03/b/RAM16K.tst @@ -0,0 +1,1026 @@ +// This file is part of www.nand2tetris.org
+// and the book "The Elements of Computing Systems"
+// by Nisan and Schocken, MIT Press.
+// File name: projects/03/b/RAM16K.tst
+
+load RAM16K.hdl,
+output-file RAM16K.out,
+compare-to RAM16K.cmp,
+output-list time%S1.4.1 in%D1.6.1 load%B2.1.2 address%D2.5.2 out%D1.6.1;
+
+set in 0,
+set load 0,
+set address 0,
+tick,
+output;
+tock,
+output;
+
+set load 1,
+tick,
+output;
+tock,
+output;
+
+set in 4321,
+set load 0,
+tick,
+output;
+tock,
+output;
+
+set load 1,
+set address 4321,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address 0,
+tick,
+output;
+tock,
+output;
+
+set in 12345,
+set address 12345,
+tick,
+output;
+tock,
+output;
+
+set load 1,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+tick,
+output;
+tock,
+output;
+
+set address 4321,
+eval,
+output;
+
+set in 16383,
+tick,
+output;
+tock,
+output;
+
+set load 1,
+set address 16383,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+tick,
+output;
+tock,
+output;
+
+set address 12345,
+eval,
+output;
+
+set address 16383,
+eval,
+output;
+
+
+set load 0,
+set address %B10101010101000,
+tick,
+output;
+tock,
+output;
+set address %B10101010101001,
+eval,
+output;
+set address %B10101010101010,
+eval,
+output;
+set address %B10101010101011,
+eval,
+output;
+set address %B10101010101100,
+eval,
+output;
+set address %B10101010101101,
+eval,
+output;
+set address %B10101010101110,
+eval,
+output;
+set address %B10101010101111,
+eval,
+output;
+
+set load 1,
+set in %B0101010101010101,
+set address %B10101010101000,
+tick,
+output;
+tock,
+output;
+set address %B10101010101001,
+tick,
+output,
+tock,
+output;
+set address %B10101010101010,
+tick,
+output,
+tock,
+output;
+set address %B10101010101011,
+tick,
+output,
+tock,
+output;
+set address %B10101010101100,
+tick,
+output,
+tock,
+output;
+set address %B10101010101101,
+tick,
+output,
+tock,
+output;
+set address %B10101010101110,
+tick,
+output,
+tock,
+output;
+set address %B10101010101111,
+tick,
+output,
+tock,
+output;
+
+set load 0,
+set address %B10101010101000,
+tick,
+output;
+tock,
+output;
+set address %B10101010101001,
+eval,
+output;
+set address %B10101010101010,
+eval,
+output;
+set address %B10101010101011,
+eval,
+output;
+set address %B10101010101100,
+eval,
+output;
+set address %B10101010101101,
+eval,
+output;
+set address %B10101010101110,
+eval,
+output;
+set address %B10101010101111,
+eval,
+output;
+
+set load 1,
+set address %B10101010101000,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B10101010101000,
+tick,
+output;
+tock,
+output;
+set address %B10101010101001,
+eval,
+output;
+set address %B10101010101010,
+eval,
+output;
+set address %B10101010101011,
+eval,
+output;
+set address %B10101010101100,
+eval,
+output;
+set address %B10101010101101,
+eval,
+output;
+set address %B10101010101110,
+eval,
+output;
+set address %B10101010101111,
+eval,
+output;
+
+set load 1,
+set address %B10101010101000,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B10101010101001,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B10101010101000,
+tick,
+output;
+tock,
+output;
+set address %B10101010101001,
+eval,
+output;
+set address %B10101010101010,
+eval,
+output;
+set address %B10101010101011,
+eval,
+output;
+set address %B10101010101100,
+eval,
+output;
+set address %B10101010101101,
+eval,
+output;
+set address %B10101010101110,
+eval,
+output;
+set address %B10101010101111,
+eval,
+output;
+
+set load 1,
+set address %B10101010101001,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B10101010101010,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B10101010101000,
+tick,
+output;
+tock,
+output;
+set address %B10101010101001,
+eval,
+output;
+set address %B10101010101010,
+eval,
+output;
+set address %B10101010101011,
+eval,
+output;
+set address %B10101010101100,
+eval,
+output;
+set address %B10101010101101,
+eval,
+output;
+set address %B10101010101110,
+eval,
+output;
+set address %B10101010101111,
+eval,
+output;
+
+set load 1,
+set address %B10101010101010,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B10101010101011,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B10101010101000,
+tick,
+output;
+tock,
+output;
+set address %B10101010101001,
+eval,
+output;
+set address %B10101010101010,
+eval,
+output;
+set address %B10101010101011,
+eval,
+output;
+set address %B10101010101100,
+eval,
+output;
+set address %B10101010101101,
+eval,
+output;
+set address %B10101010101110,
+eval,
+output;
+set address %B10101010101111,
+eval,
+output;
+
+set load 1,
+set address %B10101010101011,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B10101010101100,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B10101010101000,
+tick,
+output;
+tock,
+output;
+set address %B10101010101001,
+eval,
+output;
+set address %B10101010101010,
+eval,
+output;
+set address %B10101010101011,
+eval,
+output;
+set address %B10101010101100,
+eval,
+output;
+set address %B10101010101101,
+eval,
+output;
+set address %B10101010101110,
+eval,
+output;
+set address %B10101010101111,
+eval,
+output;
+
+set load 1,
+set address %B10101010101100,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B10101010101101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B10101010101000,
+tick,
+output;
+tock,
+output;
+set address %B10101010101001,
+eval,
+output;
+set address %B10101010101010,
+eval,
+output;
+set address %B10101010101011,
+eval,
+output;
+set address %B10101010101100,
+eval,
+output;
+set address %B10101010101101,
+eval,
+output;
+set address %B10101010101110,
+eval,
+output;
+set address %B10101010101111,
+eval,
+output;
+
+set load 1,
+set address %B10101010101101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B10101010101110,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B10101010101000,
+tick,
+output;
+tock,
+output;
+set address %B10101010101001,
+eval,
+output;
+set address %B10101010101010,
+eval,
+output;
+set address %B10101010101011,
+eval,
+output;
+set address %B10101010101100,
+eval,
+output;
+set address %B10101010101101,
+eval,
+output;
+set address %B10101010101110,
+eval,
+output;
+set address %B10101010101111,
+eval,
+output;
+
+set load 1,
+set address %B10101010101110,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B10101010101111,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B10101010101000,
+tick,
+output;
+tock,
+output;
+set address %B10101010101001,
+eval,
+output;
+set address %B10101010101010,
+eval,
+output;
+set address %B10101010101011,
+eval,
+output;
+set address %B10101010101100,
+eval,
+output;
+set address %B10101010101101,
+eval,
+output;
+set address %B10101010101110,
+eval,
+output;
+set address %B10101010101111,
+eval,
+output;
+
+set load 1,
+set address %B10101010101111,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+
+set load 0,
+set address %B10101010101000,
+tick,
+output;
+tock,
+output;
+set address %B10101010101001,
+eval,
+output;
+set address %B10101010101010,
+eval,
+output;
+set address %B10101010101011,
+eval,
+output;
+set address %B10101010101100,
+eval,
+output;
+set address %B10101010101101,
+eval,
+output;
+set address %B10101010101110,
+eval,
+output;
+set address %B10101010101111,
+eval,
+output;
+
+
+set load 0,
+set address %B00010101010101,
+tick,
+output;
+tock,
+output;
+set address %B00110101010101,
+eval,
+output;
+set address %B01010101010101,
+eval,
+output;
+set address %B01110101010101,
+eval,
+output;
+set address %B10010101010101,
+eval,
+output;
+set address %B10110101010101,
+eval,
+output;
+set address %B11010101010101,
+eval,
+output;
+set address %B11110101010101,
+eval,
+output;
+
+set load 1,
+set in %B0101010101010101,
+set address %B00010101010101,
+tick,
+output;
+tock,
+output;
+set address %B00110101010101,
+tick,
+output,
+tock,
+output;
+set address %B01010101010101,
+tick,
+output,
+tock,
+output;
+set address %B01110101010101,
+tick,
+output,
+tock,
+output;
+set address %B10010101010101,
+tick,
+output,
+tock,
+output;
+set address %B10110101010101,
+tick,
+output,
+tock,
+output;
+set address %B11010101010101,
+tick,
+output,
+tock,
+output;
+set address %B11110101010101,
+tick,
+output,
+tock,
+output;
+
+set load 0,
+set address %B00010101010101,
+tick,
+output;
+tock,
+output;
+set address %B00110101010101,
+eval,
+output;
+set address %B01010101010101,
+eval,
+output;
+set address %B01110101010101,
+eval,
+output;
+set address %B10010101010101,
+eval,
+output;
+set address %B10110101010101,
+eval,
+output;
+set address %B11010101010101,
+eval,
+output;
+set address %B11110101010101,
+eval,
+output;
+
+set load 1,
+set address %B00010101010101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B00010101010101,
+tick,
+output;
+tock,
+output;
+set address %B00110101010101,
+eval,
+output;
+set address %B01010101010101,
+eval,
+output;
+set address %B01110101010101,
+eval,
+output;
+set address %B10010101010101,
+eval,
+output;
+set address %B10110101010101,
+eval,
+output;
+set address %B11010101010101,
+eval,
+output;
+set address %B11110101010101,
+eval,
+output;
+
+set load 1,
+set address %B00010101010101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B00110101010101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B00010101010101,
+tick,
+output;
+tock,
+output;
+set address %B00110101010101,
+eval,
+output;
+set address %B01010101010101,
+eval,
+output;
+set address %B01110101010101,
+eval,
+output;
+set address %B10010101010101,
+eval,
+output;
+set address %B10110101010101,
+eval,
+output;
+set address %B11010101010101,
+eval,
+output;
+set address %B11110101010101,
+eval,
+output;
+
+set load 1,
+set address %B00110101010101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B01010101010101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B00010101010101,
+tick,
+output;
+tock,
+output;
+set address %B00110101010101,
+eval,
+output;
+set address %B01010101010101,
+eval,
+output;
+set address %B01110101010101,
+eval,
+output;
+set address %B10010101010101,
+eval,
+output;
+set address %B10110101010101,
+eval,
+output;
+set address %B11010101010101,
+eval,
+output;
+set address %B11110101010101,
+eval,
+output;
+
+set load 1,
+set address %B01010101010101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B01110101010101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B00010101010101,
+tick,
+output;
+tock,
+output;
+set address %B00110101010101,
+eval,
+output;
+set address %B01010101010101,
+eval,
+output;
+set address %B01110101010101,
+eval,
+output;
+set address %B10010101010101,
+eval,
+output;
+set address %B10110101010101,
+eval,
+output;
+set address %B11010101010101,
+eval,
+output;
+set address %B11110101010101,
+eval,
+output;
+
+set load 1,
+set address %B01110101010101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B10010101010101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B00010101010101,
+tick,
+output;
+tock,
+output;
+set address %B00110101010101,
+eval,
+output;
+set address %B01010101010101,
+eval,
+output;
+set address %B01110101010101,
+eval,
+output;
+set address %B10010101010101,
+eval,
+output;
+set address %B10110101010101,
+eval,
+output;
+set address %B11010101010101,
+eval,
+output;
+set address %B11110101010101,
+eval,
+output;
+
+set load 1,
+set address %B10010101010101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B10110101010101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B00010101010101,
+tick,
+output;
+tock,
+output;
+set address %B00110101010101,
+eval,
+output;
+set address %B01010101010101,
+eval,
+output;
+set address %B01110101010101,
+eval,
+output;
+set address %B10010101010101,
+eval,
+output;
+set address %B10110101010101,
+eval,
+output;
+set address %B11010101010101,
+eval,
+output;
+set address %B11110101010101,
+eval,
+output;
+
+set load 1,
+set address %B10110101010101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B11010101010101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B00010101010101,
+tick,
+output;
+tock,
+output;
+set address %B00110101010101,
+eval,
+output;
+set address %B01010101010101,
+eval,
+output;
+set address %B01110101010101,
+eval,
+output;
+set address %B10010101010101,
+eval,
+output;
+set address %B10110101010101,
+eval,
+output;
+set address %B11010101010101,
+eval,
+output;
+set address %B11110101010101,
+eval,
+output;
+
+set load 1,
+set address %B11010101010101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B11110101010101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B00010101010101,
+tick,
+output;
+tock,
+output;
+set address %B00110101010101,
+eval,
+output;
+set address %B01010101010101,
+eval,
+output;
+set address %B01110101010101,
+eval,
+output;
+set address %B10010101010101,
+eval,
+output;
+set address %B10110101010101,
+eval,
+output;
+set address %B11010101010101,
+eval,
+output;
+set address %B11110101010101,
+eval,
+output;
+
+set load 1,
+set address %B11110101010101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+
+set load 0,
+set address %B00010101010101,
+tick,
+output;
+tock,
+output;
+set address %B00110101010101,
+eval,
+output;
+set address %B01010101010101,
+eval,
+output;
+set address %B01110101010101,
+eval,
+output;
+set address %B10010101010101,
+eval,
+output;
+set address %B10110101010101,
+eval,
+output;
+set address %B11010101010101,
+eval,
+output;
+set address %B11110101010101,
+eval,
+output;
diff --git a/projects/03/b/RAM4K.cmp b/projects/03/b/RAM4K.cmp new file mode 100644 index 0000000..a614796 --- /dev/null +++ b/projects/03/b/RAM4K.cmp @@ -0,0 +1,320 @@ +| 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+ | 1111 | 0 | 0 | 0 |
+| 3 | 1111 | 0 | 0 | 0 |
+| 3+ | 1111 | 1 | 1111 | 0 |
+| 4 | 1111 | 1 | 1111 | 1111 |
+| 4+ | 1111 | 0 | 0 | 0 |
+| 5 | 1111 | 0 | 0 | 0 |
+| 5+ | 3513 | 0 | 3513 | 0 |
+| 6 | 3513 | 0 | 3513 | 0 |
+| 6+ | 3513 | 1 | 3513 | 0 |
+| 7 | 3513 | 1 | 3513 | 3513 |
+| 7+ | 3513 | 0 | 3513 | 3513 |
+| 8 | 3513 | 0 | 3513 | 3513 |
+| 8 | 3513 | 0 | 1111 | 1111 |
+| 8+ | 4095 | 0 | 1111 | 1111 |
+| 9 | 4095 | 0 | 1111 | 1111 |
+| 9+ | 4095 | 1 | 4095 | 0 |
+| 10 | 4095 | 1 | 4095 | 4095 |
+| 10+ | 4095 | 0 | 4095 | 4095 |
+| 11 | 4095 | 0 | 4095 | 4095 |
+| 11 | 4095 | 0 | 3513 | 3513 |
+| 11 | 4095 | 0 | 4095 | 4095 |
+| 11+ | 4095 | 0 | 2728 | 0 |
+| 12 | 4095 | 0 | 2728 | 0 |
+| 12 | 4095 | 0 | 2729 | 0 |
+| 12 | 4095 | 0 | 2730 | 0 |
+| 12 | 4095 | 0 | 2731 | 0 |
+| 12 | 4095 | 0 | 2732 | 0 |
+| 12 | 4095 | 0 | 2733 | 0 |
+| 12 | 4095 | 0 | 2734 | 0 |
+| 12 | 4095 | 0 | 2735 | 0 |
+| 12+ | 21845 | 1 | 2728 | 0 |
+| 13 | 21845 | 1 | 2728 | 21845 |
+| 13+ | 21845 | 1 | 2729 | 0 |
+| 14 | 21845 | 1 | 2729 | 21845 |
+| 14+ | 21845 | 1 | 2730 | 0 |
+| 15 | 21845 | 1 | 2730 | 21845 |
+| 15+ | 21845 | 1 | 2731 | 0 |
+| 16 | 21845 | 1 | 2731 | 21845 |
+| 16+ | 21845 | 1 | 2732 | 0 |
+| 17 | 21845 | 1 | 2732 | 21845 |
+| 17+ | 21845 | 1 | 2733 | 0 |
+| 18 | 21845 | 1 | 2733 | 21845 |
+| 18+ | 21845 | 1 | 2734 | 0 |
+| 19 | 21845 | 1 | 2734 | 21845 |
+| 19+ | 21845 | 1 | 2735 | 0 |
+| 20 | 21845 | 1 | 2735 | 21845 |
+| 20+ | 21845 | 0 | 2728 | 21845 |
+| 21 | 21845 | 0 | 2728 | 21845 |
+| 21 | 21845 | 0 | 2729 | 21845 |
+| 21 | 21845 | 0 | 2730 | 21845 |
+| 21 | 21845 | 0 | 2731 | 21845 |
+| 21 | 21845 | 0 | 2732 | 21845 |
+| 21 | 21845 | 0 | 2733 | 21845 |
+| 21 | 21845 | 0 | 2734 | 21845 |
+| 21 | 21845 | 0 | 2735 | 21845 |
+| 21+ | -21846 | 1 | 2728 | 21845 |
+| 22 | -21846 | 1 | 2728 | -21846 |
+| 22+ | -21846 | 0 | 2728 | -21846 |
+| 23 | -21846 | 0 | 2728 | -21846 |
+| 23 | -21846 | 0 | 2729 | 21845 |
+| 23 | -21846 | 0 | 2730 | 21845 |
+| 23 | -21846 | 0 | 2731 | 21845 |
+| 23 | -21846 | 0 | 2732 | 21845 |
+| 23 | -21846 | 0 | 2733 | 21845 |
+| 23 | -21846 | 0 | 2734 | 21845 |
+| 23 | -21846 | 0 | 2735 | 21845 |
+| 23+ | 21845 | 1 | 2728 | -21846 |
+| 24 | 21845 | 1 | 2728 | 21845 |
+| 24+ | -21846 | 1 | 2729 | 21845 |
+| 25 | -21846 | 1 | 2729 | -21846 |
+| 25+ | -21846 | 0 | 2728 | 21845 |
+| 26 | -21846 | 0 | 2728 | 21845 |
+| 26 | -21846 | 0 | 2729 | -21846 |
+| 26 | -21846 | 0 | 2730 | 21845 |
+| 26 | -21846 | 0 | 2731 | 21845 |
+| 26 | -21846 | 0 | 2732 | 21845 |
+| 26 | -21846 | 0 | 2733 | 21845 |
+| 26 | -21846 | 0 | 2734 | 21845 |
+| 26 | -21846 | 0 | 2735 | 21845 |
+| 26+ | 21845 | 1 | 2729 | -21846 |
+| 27 | 21845 | 1 | 2729 | 21845 |
+| 27+ | -21846 | 1 | 2730 | 21845 |
+| 28 | -21846 | 1 | 2730 | -21846 |
+| 28+ | -21846 | 0 | 2728 | 21845 |
+| 29 | -21846 | 0 | 2728 | 21845 |
+| 29 | -21846 | 0 | 2729 | 21845 |
+| 29 | -21846 | 0 | 2730 | -21846 |
+| 29 | -21846 | 0 | 2731 | 21845 |
+| 29 | -21846 | 0 | 2732 | 21845 |
+| 29 | -21846 | 0 | 2733 | 21845 |
+| 29 | -21846 | 0 | 2734 | 21845 |
+| 29 | -21846 | 0 | 2735 | 21845 |
+| 29+ | 21845 | 1 | 2730 | -21846 |
+| 30 | 21845 | 1 | 2730 | 21845 |
+| 30+ | -21846 | 1 | 2731 | 21845 |
+| 31 | -21846 | 1 | 2731 | -21846 |
+| 31+ | -21846 | 0 | 2728 | 21845 |
+| 32 | -21846 | 0 | 2728 | 21845 |
+| 32 | -21846 | 0 | 2729 | 21845 |
+| 32 | -21846 | 0 | 2730 | 21845 |
+| 32 | -21846 | 0 | 2731 | -21846 |
+| 32 | -21846 | 0 | 2732 | 21845 |
+| 32 | -21846 | 0 | 2733 | 21845 |
+| 32 | -21846 | 0 | 2734 | 21845 |
+| 32 | -21846 | 0 | 2735 | 21845 |
+| 32+ | 21845 | 1 | 2731 | -21846 |
+| 33 | 21845 | 1 | 2731 | 21845 |
+| 33+ | -21846 | 1 | 2732 | 21845 |
+| 34 | -21846 | 1 | 2732 | -21846 |
+| 34+ | -21846 | 0 | 2728 | 21845 |
+| 35 | -21846 | 0 | 2728 | 21845 |
+| 35 | -21846 | 0 | 2729 | 21845 |
+| 35 | -21846 | 0 | 2730 | 21845 |
+| 35 | -21846 | 0 | 2731 | 21845 |
+| 35 | -21846 | 0 | 2732 | -21846 |
+| 35 | -21846 | 0 | 2733 | 21845 |
+| 35 | -21846 | 0 | 2734 | 21845 |
+| 35 | -21846 | 0 | 2735 | 21845 |
+| 35+ | 21845 | 1 | 2732 | -21846 |
+| 36 | 21845 | 1 | 2732 | 21845 |
+| 36+ | -21846 | 1 | 2733 | 21845 |
+| 37 | -21846 | 1 | 2733 | -21846 |
+| 37+ | -21846 | 0 | 2728 | 21845 |
+| 38 | -21846 | 0 | 2728 | 21845 |
+| 38 | -21846 | 0 | 2729 | 21845 |
+| 38 | -21846 | 0 | 2730 | 21845 |
+| 38 | -21846 | 0 | 2731 | 21845 |
+| 38 | -21846 | 0 | 2732 | 21845 |
+| 38 | -21846 | 0 | 2733 | -21846 |
+| 38 | -21846 | 0 | 2734 | 21845 |
+| 38 | -21846 | 0 | 2735 | 21845 |
+| 38+ | 21845 | 1 | 2733 | -21846 |
+| 39 | 21845 | 1 | 2733 | 21845 |
+| 39+ | -21846 | 1 | 2734 | 21845 |
+| 40 | -21846 | 1 | 2734 | -21846 |
+| 40+ | -21846 | 0 | 2728 | 21845 |
+| 41 | -21846 | 0 | 2728 | 21845 |
+| 41 | -21846 | 0 | 2729 | 21845 |
+| 41 | -21846 | 0 | 2730 | 21845 |
+| 41 | -21846 | 0 | 2731 | 21845 |
+| 41 | -21846 | 0 | 2732 | 21845 |
+| 41 | -21846 | 0 | 2733 | 21845 |
+| 41 | -21846 | 0 | 2734 | -21846 |
+| 41 | -21846 | 0 | 2735 | 21845 |
+| 41+ | 21845 | 1 | 2734 | -21846 |
+| 42 | 21845 | 1 | 2734 | 21845 |
+| 42+ | -21846 | 1 | 2735 | 21845 |
+| 43 | -21846 | 1 | 2735 | -21846 |
+| 43+ | -21846 | 0 | 2728 | 21845 |
+| 44 | -21846 | 0 | 2728 | 21845 |
+| 44 | -21846 | 0 | 2729 | 21845 |
+| 44 | -21846 | 0 | 2730 | 21845 |
+| 44 | -21846 | 0 | 2731 | 21845 |
+| 44 | -21846 | 0 | 2732 | 21845 |
+| 44 | -21846 | 0 | 2733 | 21845 |
+| 44 | -21846 | 0 | 2734 | 21845 |
+| 44 | -21846 | 0 | 2735 | -21846 |
+| 44+ | 21845 | 1 | 2735 | -21846 |
+| 45 | 21845 | 1 | 2735 | 21845 |
+| 45+ | 21845 | 0 | 2728 | 21845 |
+| 46 | 21845 | 0 | 2728 | 21845 |
+| 46 | 21845 | 0 | 2729 | 21845 |
+| 46 | 21845 | 0 | 2730 | 21845 |
+| 46 | 21845 | 0 | 2731 | 21845 |
+| 46 | 21845 | 0 | 2732 | 21845 |
+| 46 | 21845 | 0 | 2733 | 21845 |
+| 46 | 21845 | 0 | 2734 | 21845 |
+| 46 | 21845 | 0 | 2735 | 21845 |
+| 46+ | 21845 | 0 | 341 | 0 |
+| 47 | 21845 | 0 | 341 | 0 |
+| 47 | 21845 | 0 | 853 | 0 |
+| 47 | 21845 | 0 | 1365 | 0 |
+| 47 | 21845 | 0 | 1877 | 0 |
+| 47 | 21845 | 0 | 2389 | 0 |
+| 47 | 21845 | 0 | 2901 | 0 |
+| 47 | 21845 | 0 | 3413 | 0 |
+| 47 | 21845 | 0 | 3925 | 0 |
+| 47+ | 21845 | 1 | 341 | 0 |
+| 48 | 21845 | 1 | 341 | 21845 |
+| 48+ | 21845 | 1 | 853 | 0 |
+| 49 | 21845 | 1 | 853 | 21845 |
+| 49+ | 21845 | 1 | 1365 | 0 |
+| 50 | 21845 | 1 | 1365 | 21845 |
+| 50+ | 21845 | 1 | 1877 | 0 |
+| 51 | 21845 | 1 | 1877 | 21845 |
+| 51+ | 21845 | 1 | 2389 | 0 |
+| 52 | 21845 | 1 | 2389 | 21845 |
+| 52+ | 21845 | 1 | 2901 | 0 |
+| 53 | 21845 | 1 | 2901 | 21845 |
+| 53+ | 21845 | 1 | 3413 | 0 |
+| 54 | 21845 | 1 | 3413 | 21845 |
+| 54+ | 21845 | 1 | 3925 | 0 |
+| 55 | 21845 | 1 | 3925 | 21845 |
+| 55+ | 21845 | 0 | 341 | 21845 |
+| 56 | 21845 | 0 | 341 | 21845 |
+| 56 | 21845 | 0 | 853 | 21845 |
+| 56 | 21845 | 0 | 1365 | 21845 |
+| 56 | 21845 | 0 | 1877 | 21845 |
+| 56 | 21845 | 0 | 2389 | 21845 |
+| 56 | 21845 | 0 | 2901 | 21845 |
+| 56 | 21845 | 0 | 3413 | 21845 |
+| 56 | 21845 | 0 | 3925 | 21845 |
+| 56+ | -21846 | 1 | 341 | 21845 |
+| 57 | -21846 | 1 | 341 | -21846 |
+| 57+ | -21846 | 0 | 341 | -21846 |
+| 58 | -21846 | 0 | 341 | -21846 |
+| 58 | -21846 | 0 | 853 | 21845 |
+| 58 | -21846 | 0 | 1365 | 21845 |
+| 58 | -21846 | 0 | 1877 | 21845 |
+| 58 | -21846 | 0 | 2389 | 21845 |
+| 58 | -21846 | 0 | 2901 | 21845 |
+| 58 | -21846 | 0 | 3413 | 21845 |
+| 58 | -21846 | 0 | 3925 | 21845 |
+| 58+ | 21845 | 1 | 341 | -21846 |
+| 59 | 21845 | 1 | 341 | 21845 |
+| 59+ | -21846 | 1 | 853 | 21845 |
+| 60 | -21846 | 1 | 853 | -21846 |
+| 60+ | -21846 | 0 | 341 | 21845 |
+| 61 | -21846 | 0 | 341 | 21845 |
+| 61 | -21846 | 0 | 853 | -21846 |
+| 61 | -21846 | 0 | 1365 | 21845 |
+| 61 | -21846 | 0 | 1877 | 21845 |
+| 61 | -21846 | 0 | 2389 | 21845 |
+| 61 | -21846 | 0 | 2901 | 21845 |
+| 61 | -21846 | 0 | 3413 | 21845 |
+| 61 | -21846 | 0 | 3925 | 21845 |
+| 61+ | 21845 | 1 | 853 | -21846 |
+| 62 | 21845 | 1 | 853 | 21845 |
+| 62+ | -21846 | 1 | 1365 | 21845 |
+| 63 | -21846 | 1 | 1365 | -21846 |
+| 63+ | -21846 | 0 | 341 | 21845 |
+| 64 | -21846 | 0 | 341 | 21845 |
+| 64 | -21846 | 0 | 853 | 21845 |
+| 64 | -21846 | 0 | 1365 | -21846 |
+| 64 | -21846 | 0 | 1877 | 21845 |
+| 64 | -21846 | 0 | 2389 | 21845 |
+| 64 | -21846 | 0 | 2901 | 21845 |
+| 64 | -21846 | 0 | 3413 | 21845 |
+| 64 | -21846 | 0 | 3925 | 21845 |
+| 64+ | 21845 | 1 | 1365 | -21846 |
+| 65 | 21845 | 1 | 1365 | 21845 |
+| 65+ | -21846 | 1 | 1877 | 21845 |
+| 66 | -21846 | 1 | 1877 | -21846 |
+| 66+ | -21846 | 0 | 341 | 21845 |
+| 67 | -21846 | 0 | 341 | 21845 |
+| 67 | -21846 | 0 | 853 | 21845 |
+| 67 | -21846 | 0 | 1365 | 21845 |
+| 67 | -21846 | 0 | 1877 | -21846 |
+| 67 | -21846 | 0 | 2389 | 21845 |
+| 67 | -21846 | 0 | 2901 | 21845 |
+| 67 | -21846 | 0 | 3413 | 21845 |
+| 67 | -21846 | 0 | 3925 | 21845 |
+| 67+ | 21845 | 1 | 1877 | -21846 |
+| 68 | 21845 | 1 | 1877 | 21845 |
+| 68+ | -21846 | 1 | 2389 | 21845 |
+| 69 | -21846 | 1 | 2389 | -21846 |
+| 69+ | -21846 | 0 | 341 | 21845 |
+| 70 | -21846 | 0 | 341 | 21845 |
+| 70 | -21846 | 0 | 853 | 21845 |
+| 70 | -21846 | 0 | 1365 | 21845 |
+| 70 | -21846 | 0 | 1877 | 21845 |
+| 70 | -21846 | 0 | 2389 | -21846 |
+| 70 | -21846 | 0 | 2901 | 21845 |
+| 70 | -21846 | 0 | 3413 | 21845 |
+| 70 | -21846 | 0 | 3925 | 21845 |
+| 70+ | 21845 | 1 | 2389 | -21846 |
+| 71 | 21845 | 1 | 2389 | 21845 |
+| 71+ | -21846 | 1 | 2901 | 21845 |
+| 72 | -21846 | 1 | 2901 | -21846 |
+| 72+ | -21846 | 0 | 341 | 21845 |
+| 73 | -21846 | 0 | 341 | 21845 |
+| 73 | -21846 | 0 | 853 | 21845 |
+| 73 | -21846 | 0 | 1365 | 21845 |
+| 73 | -21846 | 0 | 1877 | 21845 |
+| 73 | -21846 | 0 | 2389 | 21845 |
+| 73 | -21846 | 0 | 2901 | -21846 |
+| 73 | -21846 | 0 | 3413 | 21845 |
+| 73 | -21846 | 0 | 3925 | 21845 |
+| 73+ | 21845 | 1 | 2901 | -21846 |
+| 74 | 21845 | 1 | 2901 | 21845 |
+| 74+ | -21846 | 1 | 3413 | 21845 |
+| 75 | -21846 | 1 | 3413 | -21846 |
+| 75+ | -21846 | 0 | 341 | 21845 |
+| 76 | -21846 | 0 | 341 | 21845 |
+| 76 | -21846 | 0 | 853 | 21845 |
+| 76 | -21846 | 0 | 1365 | 21845 |
+| 76 | -21846 | 0 | 1877 | 21845 |
+| 76 | -21846 | 0 | 2389 | 21845 |
+| 76 | -21846 | 0 | 2901 | 21845 |
+| 76 | -21846 | 0 | 3413 | -21846 |
+| 76 | -21846 | 0 | 3925 | 21845 |
+| 76+ | 21845 | 1 | 3413 | -21846 |
+| 77 | 21845 | 1 | 3413 | 21845 |
+| 77+ | -21846 | 1 | 3925 | 21845 |
+| 78 | -21846 | 1 | 3925 | -21846 |
+| 78+ | -21846 | 0 | 341 | 21845 |
+| 79 | -21846 | 0 | 341 | 21845 |
+| 79 | -21846 | 0 | 853 | 21845 |
+| 79 | -21846 | 0 | 1365 | 21845 |
+| 79 | -21846 | 0 | 1877 | 21845 |
+| 79 | -21846 | 0 | 2389 | 21845 |
+| 79 | -21846 | 0 | 2901 | 21845 |
+| 79 | -21846 | 0 | 3413 | 21845 |
+| 79 | -21846 | 0 | 3925 | -21846 |
+| 79+ | 21845 | 1 | 3925 | -21846 |
+| 80 | 21845 | 1 | 3925 | 21845 |
+| 80+ | 21845 | 0 | 341 | 21845 |
+| 81 | 21845 | 0 | 341 | 21845 |
+| 81 | 21845 | 0 | 853 | 21845 |
+| 81 | 21845 | 0 | 1365 | 21845 |
+| 81 | 21845 | 0 | 1877 | 21845 |
+| 81 | 21845 | 0 | 2389 | 21845 |
+| 81 | 21845 | 0 | 2901 | 21845 |
+| 81 | 21845 | 0 | 3413 | 21845 |
+| 81 | 21845 | 0 | 3925 | 21845 |
diff --git a/projects/03/b/RAM4K.hdl b/projects/03/b/RAM4K.hdl new file mode 100644 index 0000000..36b9ec6 --- /dev/null +++ b/projects/03/b/RAM4K.hdl @@ -0,0 +1,28 @@ +// This file is part of www.nand2tetris.org
+// and the book "The Elements of Computing Systems"
+// by Nisan and Schocken, MIT Press.
+// File name: projects/03/b/RAM4K.hdl
+
+/**
+ * Memory of 4K registers, each 16 bit-wide. Out holds the value
+ * stored at the memory location specified by address. If load==1, then
+ * the in value is loaded into the memory location specified by address
+ * (the loaded value will be emitted to out from the next time step onward).
+ */
+
+CHIP RAM4K {
+ IN in[16], load, address[12];
+ OUT out[16];
+
+ PARTS:
+ DMux8Way(in=load, sel=address[9..11], a=l0, b=l1, c=l2, d=l3, e=l4, f=l5, g=l6, h=l7);
+ RAM512(in=in, load=l0, address=address[0..8], out=o0);
+ RAM512(in=in, load=l1, address=address[0..8], out=o1);
+ RAM512(in=in, load=l2, address=address[0..8], out=o2);
+ RAM512(in=in, load=l3, address=address[0..8], out=o3);
+ RAM512(in=in, load=l4, address=address[0..8], out=o4);
+ RAM512(in=in, load=l5, address=address[0..8], out=o5);
+ RAM512(in=in, load=l6, address=address[0..8], out=o6);
+ RAM512(in=in, load=l7, address=address[0..8], out=o7);
+ Mux8Way16(a=o0, b=o1, c=o2, d=o3, e=o4, f=o5, g=o6, h=o7, sel=address[9..11], out=out);
+}
diff --git a/projects/03/b/RAM4K.out b/projects/03/b/RAM4K.out new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/projects/03/b/RAM4K.out diff --git a/projects/03/b/RAM4K.tst b/projects/03/b/RAM4K.tst new file mode 100644 index 0000000..7a5aa12 --- /dev/null +++ b/projects/03/b/RAM4K.tst @@ -0,0 +1,1026 @@ +// This file is part of www.nand2tetris.org
+// and the book "The Elements of Computing Systems"
+// by Nisan and Schocken, MIT Press.
+// File name: projects/03/b/RAM4K.tst
+
+load RAM4K.hdl,
+output-file RAM4K.out,
+compare-to RAM4K.cmp,
+output-list time%S1.4.1 in%D1.6.1 load%B2.1.2 address%D2.4.2 out%D1.6.1;
+
+set in 0,
+set load 0,
+set address 0,
+tick,
+output;
+tock,
+output;
+
+set load 1,
+tick,
+output;
+tock,
+output;
+
+set in 1111,
+set load 0,
+tick,
+output;
+tock,
+output;
+
+set load 1,
+set address 1111,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address 0,
+tick,
+output;
+tock,
+output;
+
+set in 3513,
+set address 3513,
+tick,
+output;
+tock,
+output;
+
+set load 1,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+tick,
+output;
+tock,
+output;
+
+set address 1111,
+eval,
+output;
+
+set in 4095,
+tick,
+output;
+tock,
+output;
+
+set load 1,
+set address 4095,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+tick,
+output;
+tock,
+output;
+
+set address 3513,
+eval,
+output;
+
+set address 4095,
+eval,
+output;
+
+
+set load 0,
+set address %B101010101000,
+tick,
+output;
+tock,
+output;
+set address %B101010101001,
+eval,
+output;
+set address %B101010101010,
+eval,
+output;
+set address %B101010101011,
+eval,
+output;
+set address %B101010101100,
+eval,
+output;
+set address %B101010101101,
+eval,
+output;
+set address %B101010101110,
+eval,
+output;
+set address %B101010101111,
+eval,
+output;
+
+set load 1,
+set in %B0101010101010101,
+set address %B101010101000,
+tick,
+output;
+tock,
+output;
+set address %B101010101001,
+tick,
+output,
+tock,
+output;
+set address %B101010101010,
+tick,
+output,
+tock,
+output;
+set address %B101010101011,
+tick,
+output,
+tock,
+output;
+set address %B101010101100,
+tick,
+output,
+tock,
+output;
+set address %B101010101101,
+tick,
+output,
+tock,
+output;
+set address %B101010101110,
+tick,
+output,
+tock,
+output;
+set address %B101010101111,
+tick,
+output,
+tock,
+output;
+
+set load 0,
+set address %B101010101000,
+tick,
+output;
+tock,
+output;
+set address %B101010101001,
+eval,
+output;
+set address %B101010101010,
+eval,
+output;
+set address %B101010101011,
+eval,
+output;
+set address %B101010101100,
+eval,
+output;
+set address %B101010101101,
+eval,
+output;
+set address %B101010101110,
+eval,
+output;
+set address %B101010101111,
+eval,
+output;
+
+set load 1,
+set address %B101010101000,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B101010101000,
+tick,
+output;
+tock,
+output;
+set address %B101010101001,
+eval,
+output;
+set address %B101010101010,
+eval,
+output;
+set address %B101010101011,
+eval,
+output;
+set address %B101010101100,
+eval,
+output;
+set address %B101010101101,
+eval,
+output;
+set address %B101010101110,
+eval,
+output;
+set address %B101010101111,
+eval,
+output;
+
+set load 1,
+set address %B101010101000,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B101010101001,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B101010101000,
+tick,
+output;
+tock,
+output;
+set address %B101010101001,
+eval,
+output;
+set address %B101010101010,
+eval,
+output;
+set address %B101010101011,
+eval,
+output;
+set address %B101010101100,
+eval,
+output;
+set address %B101010101101,
+eval,
+output;
+set address %B101010101110,
+eval,
+output;
+set address %B101010101111,
+eval,
+output;
+
+set load 1,
+set address %B101010101001,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B101010101010,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B101010101000,
+tick,
+output;
+tock,
+output;
+set address %B101010101001,
+eval,
+output;
+set address %B101010101010,
+eval,
+output;
+set address %B101010101011,
+eval,
+output;
+set address %B101010101100,
+eval,
+output;
+set address %B101010101101,
+eval,
+output;
+set address %B101010101110,
+eval,
+output;
+set address %B101010101111,
+eval,
+output;
+
+set load 1,
+set address %B101010101010,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B101010101011,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B101010101000,
+tick,
+output;
+tock,
+output;
+set address %B101010101001,
+eval,
+output;
+set address %B101010101010,
+eval,
+output;
+set address %B101010101011,
+eval,
+output;
+set address %B101010101100,
+eval,
+output;
+set address %B101010101101,
+eval,
+output;
+set address %B101010101110,
+eval,
+output;
+set address %B101010101111,
+eval,
+output;
+
+set load 1,
+set address %B101010101011,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B101010101100,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B101010101000,
+tick,
+output;
+tock,
+output;
+set address %B101010101001,
+eval,
+output;
+set address %B101010101010,
+eval,
+output;
+set address %B101010101011,
+eval,
+output;
+set address %B101010101100,
+eval,
+output;
+set address %B101010101101,
+eval,
+output;
+set address %B101010101110,
+eval,
+output;
+set address %B101010101111,
+eval,
+output;
+
+set load 1,
+set address %B101010101100,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B101010101101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B101010101000,
+tick,
+output;
+tock,
+output;
+set address %B101010101001,
+eval,
+output;
+set address %B101010101010,
+eval,
+output;
+set address %B101010101011,
+eval,
+output;
+set address %B101010101100,
+eval,
+output;
+set address %B101010101101,
+eval,
+output;
+set address %B101010101110,
+eval,
+output;
+set address %B101010101111,
+eval,
+output;
+
+set load 1,
+set address %B101010101101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B101010101110,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B101010101000,
+tick,
+output;
+tock,
+output;
+set address %B101010101001,
+eval,
+output;
+set address %B101010101010,
+eval,
+output;
+set address %B101010101011,
+eval,
+output;
+set address %B101010101100,
+eval,
+output;
+set address %B101010101101,
+eval,
+output;
+set address %B101010101110,
+eval,
+output;
+set address %B101010101111,
+eval,
+output;
+
+set load 1,
+set address %B101010101110,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B101010101111,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B101010101000,
+tick,
+output;
+tock,
+output;
+set address %B101010101001,
+eval,
+output;
+set address %B101010101010,
+eval,
+output;
+set address %B101010101011,
+eval,
+output;
+set address %B101010101100,
+eval,
+output;
+set address %B101010101101,
+eval,
+output;
+set address %B101010101110,
+eval,
+output;
+set address %B101010101111,
+eval,
+output;
+
+set load 1,
+set address %B101010101111,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+
+set load 0,
+set address %B101010101000,
+tick,
+output;
+tock,
+output;
+set address %B101010101001,
+eval,
+output;
+set address %B101010101010,
+eval,
+output;
+set address %B101010101011,
+eval,
+output;
+set address %B101010101100,
+eval,
+output;
+set address %B101010101101,
+eval,
+output;
+set address %B101010101110,
+eval,
+output;
+set address %B101010101111,
+eval,
+output;
+
+
+set load 0,
+set address %B000101010101,
+tick,
+output;
+tock,
+output;
+set address %B001101010101,
+eval,
+output;
+set address %B010101010101,
+eval,
+output;
+set address %B011101010101,
+eval,
+output;
+set address %B100101010101,
+eval,
+output;
+set address %B101101010101,
+eval,
+output;
+set address %B110101010101,
+eval,
+output;
+set address %B111101010101,
+eval,
+output;
+
+set load 1,
+set in %B0101010101010101,
+set address %B000101010101,
+tick,
+output;
+tock,
+output;
+set address %B001101010101,
+tick,
+output,
+tock,
+output;
+set address %B010101010101,
+tick,
+output,
+tock,
+output;
+set address %B011101010101,
+tick,
+output,
+tock,
+output;
+set address %B100101010101,
+tick,
+output,
+tock,
+output;
+set address %B101101010101,
+tick,
+output,
+tock,
+output;
+set address %B110101010101,
+tick,
+output,
+tock,
+output;
+set address %B111101010101,
+tick,
+output,
+tock,
+output;
+
+set load 0,
+set address %B000101010101,
+tick,
+output;
+tock,
+output;
+set address %B001101010101,
+eval,
+output;
+set address %B010101010101,
+eval,
+output;
+set address %B011101010101,
+eval,
+output;
+set address %B100101010101,
+eval,
+output;
+set address %B101101010101,
+eval,
+output;
+set address %B110101010101,
+eval,
+output;
+set address %B111101010101,
+eval,
+output;
+
+set load 1,
+set address %B000101010101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B000101010101,
+tick,
+output;
+tock,
+output;
+set address %B001101010101,
+eval,
+output;
+set address %B010101010101,
+eval,
+output;
+set address %B011101010101,
+eval,
+output;
+set address %B100101010101,
+eval,
+output;
+set address %B101101010101,
+eval,
+output;
+set address %B110101010101,
+eval,
+output;
+set address %B111101010101,
+eval,
+output;
+
+set load 1,
+set address %B000101010101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B001101010101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B000101010101,
+tick,
+output;
+tock,
+output;
+set address %B001101010101,
+eval,
+output;
+set address %B010101010101,
+eval,
+output;
+set address %B011101010101,
+eval,
+output;
+set address %B100101010101,
+eval,
+output;
+set address %B101101010101,
+eval,
+output;
+set address %B110101010101,
+eval,
+output;
+set address %B111101010101,
+eval,
+output;
+
+set load 1,
+set address %B001101010101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B010101010101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B000101010101,
+tick,
+output;
+tock,
+output;
+set address %B001101010101,
+eval,
+output;
+set address %B010101010101,
+eval,
+output;
+set address %B011101010101,
+eval,
+output;
+set address %B100101010101,
+eval,
+output;
+set address %B101101010101,
+eval,
+output;
+set address %B110101010101,
+eval,
+output;
+set address %B111101010101,
+eval,
+output;
+
+set load 1,
+set address %B010101010101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B011101010101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B000101010101,
+tick,
+output;
+tock,
+output;
+set address %B001101010101,
+eval,
+output;
+set address %B010101010101,
+eval,
+output;
+set address %B011101010101,
+eval,
+output;
+set address %B100101010101,
+eval,
+output;
+set address %B101101010101,
+eval,
+output;
+set address %B110101010101,
+eval,
+output;
+set address %B111101010101,
+eval,
+output;
+
+set load 1,
+set address %B011101010101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B100101010101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B000101010101,
+tick,
+output;
+tock,
+output;
+set address %B001101010101,
+eval,
+output;
+set address %B010101010101,
+eval,
+output;
+set address %B011101010101,
+eval,
+output;
+set address %B100101010101,
+eval,
+output;
+set address %B101101010101,
+eval,
+output;
+set address %B110101010101,
+eval,
+output;
+set address %B111101010101,
+eval,
+output;
+
+set load 1,
+set address %B100101010101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B101101010101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B000101010101,
+tick,
+output;
+tock,
+output;
+set address %B001101010101,
+eval,
+output;
+set address %B010101010101,
+eval,
+output;
+set address %B011101010101,
+eval,
+output;
+set address %B100101010101,
+eval,
+output;
+set address %B101101010101,
+eval,
+output;
+set address %B110101010101,
+eval,
+output;
+set address %B111101010101,
+eval,
+output;
+
+set load 1,
+set address %B101101010101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B110101010101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B000101010101,
+tick,
+output;
+tock,
+output;
+set address %B001101010101,
+eval,
+output;
+set address %B010101010101,
+eval,
+output;
+set address %B011101010101,
+eval,
+output;
+set address %B100101010101,
+eval,
+output;
+set address %B101101010101,
+eval,
+output;
+set address %B110101010101,
+eval,
+output;
+set address %B111101010101,
+eval,
+output;
+
+set load 1,
+set address %B110101010101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B111101010101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B000101010101,
+tick,
+output;
+tock,
+output;
+set address %B001101010101,
+eval,
+output;
+set address %B010101010101,
+eval,
+output;
+set address %B011101010101,
+eval,
+output;
+set address %B100101010101,
+eval,
+output;
+set address %B101101010101,
+eval,
+output;
+set address %B110101010101,
+eval,
+output;
+set address %B111101010101,
+eval,
+output;
+
+set load 1,
+set address %B111101010101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+
+set load 0,
+set address %B000101010101,
+tick,
+output;
+tock,
+output;
+set address %B001101010101,
+eval,
+output;
+set address %B010101010101,
+eval,
+output;
+set address %B011101010101,
+eval,
+output;
+set address %B100101010101,
+eval,
+output;
+set address %B101101010101,
+eval,
+output;
+set address %B110101010101,
+eval,
+output;
+set address %B111101010101,
+eval,
+output;
diff --git a/projects/03/b/RAM512.cmp b/projects/03/b/RAM512.cmp new file mode 100644 index 0000000..6f756ca --- /dev/null +++ b/projects/03/b/RAM512.cmp @@ -0,0 +1,320 @@ +| 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+ | 13099 | 0 | 0 | 0 |
+| 3 | 13099 | 0 | 0 | 0 |
+| 3+ | 13099 | 1 | 130 | 0 |
+| 4 | 13099 | 1 | 130 | 13099 |
+| 4+ | 13099 | 0 | 0 | 0 |
+| 5 | 13099 | 0 | 0 | 0 |
+| 5+ | 4729 | 0 | 472 | 0 |
+| 6 | 4729 | 0 | 472 | 0 |
+| 6+ | 4729 | 1 | 472 | 0 |
+| 7 | 4729 | 1 | 472 | 4729 |
+| 7+ | 4729 | 0 | 472 | 4729 |
+| 8 | 4729 | 0 | 472 | 4729 |
+| 8 | 4729 | 0 | 130 | 13099 |
+| 8+ | 5119 | 0 | 130 | 13099 |
+| 9 | 5119 | 0 | 130 | 13099 |
+| 9+ | 5119 | 1 | 511 | 0 |
+| 10 | 5119 | 1 | 511 | 5119 |
+| 10+ | 5119 | 0 | 511 | 5119 |
+| 11 | 5119 | 0 | 511 | 5119 |
+| 11 | 5119 | 0 | 472 | 4729 |
+| 11 | 5119 | 0 | 511 | 5119 |
+| 11+ | 5119 | 0 | 168 | 0 |
+| 12 | 5119 | 0 | 168 | 0 |
+| 12 | 5119 | 0 | 169 | 0 |
+| 12 | 5119 | 0 | 170 | 0 |
+| 12 | 5119 | 0 | 171 | 0 |
+| 12 | 5119 | 0 | 172 | 0 |
+| 12 | 5119 | 0 | 173 | 0 |
+| 12 | 5119 | 0 | 174 | 0 |
+| 12 | 5119 | 0 | 175 | 0 |
+| 12+ | 21845 | 1 | 168 | 0 |
+| 13 | 21845 | 1 | 168 | 21845 |
+| 13+ | 21845 | 1 | 169 | 0 |
+| 14 | 21845 | 1 | 169 | 21845 |
+| 14+ | 21845 | 1 | 170 | 0 |
+| 15 | 21845 | 1 | 170 | 21845 |
+| 15+ | 21845 | 1 | 171 | 0 |
+| 16 | 21845 | 1 | 171 | 21845 |
+| 16+ | 21845 | 1 | 172 | 0 |
+| 17 | 21845 | 1 | 172 | 21845 |
+| 17+ | 21845 | 1 | 173 | 0 |
+| 18 | 21845 | 1 | 173 | 21845 |
+| 18+ | 21845 | 1 | 174 | 0 |
+| 19 | 21845 | 1 | 174 | 21845 |
+| 19+ | 21845 | 1 | 175 | 0 |
+| 20 | 21845 | 1 | 175 | 21845 |
+| 20+ | 21845 | 0 | 168 | 21845 |
+| 21 | 21845 | 0 | 168 | 21845 |
+| 21 | 21845 | 0 | 169 | 21845 |
+| 21 | 21845 | 0 | 170 | 21845 |
+| 21 | 21845 | 0 | 171 | 21845 |
+| 21 | 21845 | 0 | 172 | 21845 |
+| 21 | 21845 | 0 | 173 | 21845 |
+| 21 | 21845 | 0 | 174 | 21845 |
+| 21 | 21845 | 0 | 175 | 21845 |
+| 21+ | -21846 | 1 | 168 | 21845 |
+| 22 | -21846 | 1 | 168 | -21846 |
+| 22+ | -21846 | 0 | 168 | -21846 |
+| 23 | -21846 | 0 | 168 | -21846 |
+| 23 | -21846 | 0 | 169 | 21845 |
+| 23 | -21846 | 0 | 170 | 21845 |
+| 23 | -21846 | 0 | 171 | 21845 |
+| 23 | -21846 | 0 | 172 | 21845 |
+| 23 | -21846 | 0 | 173 | 21845 |
+| 23 | -21846 | 0 | 174 | 21845 |
+| 23 | -21846 | 0 | 175 | 21845 |
+| 23+ | 21845 | 1 | 168 | -21846 |
+| 24 | 21845 | 1 | 168 | 21845 |
+| 24+ | -21846 | 1 | 169 | 21845 |
+| 25 | -21846 | 1 | 169 | -21846 |
+| 25+ | -21846 | 0 | 168 | 21845 |
+| 26 | -21846 | 0 | 168 | 21845 |
+| 26 | -21846 | 0 | 169 | -21846 |
+| 26 | -21846 | 0 | 170 | 21845 |
+| 26 | -21846 | 0 | 171 | 21845 |
+| 26 | -21846 | 0 | 172 | 21845 |
+| 26 | -21846 | 0 | 173 | 21845 |
+| 26 | -21846 | 0 | 174 | 21845 |
+| 26 | -21846 | 0 | 175 | 21845 |
+| 26+ | 21845 | 1 | 169 | -21846 |
+| 27 | 21845 | 1 | 169 | 21845 |
+| 27+ | -21846 | 1 | 170 | 21845 |
+| 28 | -21846 | 1 | 170 | -21846 |
+| 28+ | -21846 | 0 | 168 | 21845 |
+| 29 | -21846 | 0 | 168 | 21845 |
+| 29 | -21846 | 0 | 169 | 21845 |
+| 29 | -21846 | 0 | 170 | -21846 |
+| 29 | -21846 | 0 | 171 | 21845 |
+| 29 | -21846 | 0 | 172 | 21845 |
+| 29 | -21846 | 0 | 173 | 21845 |
+| 29 | -21846 | 0 | 174 | 21845 |
+| 29 | -21846 | 0 | 175 | 21845 |
+| 29+ | 21845 | 1 | 170 | -21846 |
+| 30 | 21845 | 1 | 170 | 21845 |
+| 30+ | -21846 | 1 | 171 | 21845 |
+| 31 | -21846 | 1 | 171 | -21846 |
+| 31+ | -21846 | 0 | 168 | 21845 |
+| 32 | -21846 | 0 | 168 | 21845 |
+| 32 | -21846 | 0 | 169 | 21845 |
+| 32 | -21846 | 0 | 170 | 21845 |
+| 32 | -21846 | 0 | 171 | -21846 |
+| 32 | -21846 | 0 | 172 | 21845 |
+| 32 | -21846 | 0 | 173 | 21845 |
+| 32 | -21846 | 0 | 174 | 21845 |
+| 32 | -21846 | 0 | 175 | 21845 |
+| 32+ | 21845 | 1 | 171 | -21846 |
+| 33 | 21845 | 1 | 171 | 21845 |
+| 33+ | -21846 | 1 | 172 | 21845 |
+| 34 | -21846 | 1 | 172 | -21846 |
+| 34+ | -21846 | 0 | 168 | 21845 |
+| 35 | -21846 | 0 | 168 | 21845 |
+| 35 | -21846 | 0 | 169 | 21845 |
+| 35 | -21846 | 0 | 170 | 21845 |
+| 35 | -21846 | 0 | 171 | 21845 |
+| 35 | -21846 | 0 | 172 | -21846 |
+| 35 | -21846 | 0 | 173 | 21845 |
+| 35 | -21846 | 0 | 174 | 21845 |
+| 35 | -21846 | 0 | 175 | 21845 |
+| 35+ | 21845 | 1 | 172 | -21846 |
+| 36 | 21845 | 1 | 172 | 21845 |
+| 36+ | -21846 | 1 | 173 | 21845 |
+| 37 | -21846 | 1 | 173 | -21846 |
+| 37+ | -21846 | 0 | 168 | 21845 |
+| 38 | -21846 | 0 | 168 | 21845 |
+| 38 | -21846 | 0 | 169 | 21845 |
+| 38 | -21846 | 0 | 170 | 21845 |
+| 38 | -21846 | 0 | 171 | 21845 |
+| 38 | -21846 | 0 | 172 | 21845 |
+| 38 | -21846 | 0 | 173 | -21846 |
+| 38 | -21846 | 0 | 174 | 21845 |
+| 38 | -21846 | 0 | 175 | 21845 |
+| 38+ | 21845 | 1 | 173 | -21846 |
+| 39 | 21845 | 1 | 173 | 21845 |
+| 39+ | -21846 | 1 | 174 | 21845 |
+| 40 | -21846 | 1 | 174 | -21846 |
+| 40+ | -21846 | 0 | 168 | 21845 |
+| 41 | -21846 | 0 | 168 | 21845 |
+| 41 | -21846 | 0 | 169 | 21845 |
+| 41 | -21846 | 0 | 170 | 21845 |
+| 41 | -21846 | 0 | 171 | 21845 |
+| 41 | -21846 | 0 | 172 | 21845 |
+| 41 | -21846 | 0 | 173 | 21845 |
+| 41 | -21846 | 0 | 174 | -21846 |
+| 41 | -21846 | 0 | 175 | 21845 |
+| 41+ | 21845 | 1 | 174 | -21846 |
+| 42 | 21845 | 1 | 174 | 21845 |
+| 42+ | -21846 | 1 | 175 | 21845 |
+| 43 | -21846 | 1 | 175 | -21846 |
+| 43+ | -21846 | 0 | 168 | 21845 |
+| 44 | -21846 | 0 | 168 | 21845 |
+| 44 | -21846 | 0 | 169 | 21845 |
+| 44 | -21846 | 0 | 170 | 21845 |
+| 44 | -21846 | 0 | 171 | 21845 |
+| 44 | -21846 | 0 | 172 | 21845 |
+| 44 | -21846 | 0 | 173 | 21845 |
+| 44 | -21846 | 0 | 174 | 21845 |
+| 44 | -21846 | 0 | 175 | -21846 |
+| 44+ | 21845 | 1 | 175 | -21846 |
+| 45 | 21845 | 1 | 175 | 21845 |
+| 45+ | 21845 | 0 | 168 | 21845 |
+| 46 | 21845 | 0 | 168 | 21845 |
+| 46 | 21845 | 0 | 169 | 21845 |
+| 46 | 21845 | 0 | 170 | 21845 |
+| 46 | 21845 | 0 | 171 | 21845 |
+| 46 | 21845 | 0 | 172 | 21845 |
+| 46 | 21845 | 0 | 173 | 21845 |
+| 46 | 21845 | 0 | 174 | 21845 |
+| 46 | 21845 | 0 | 175 | 21845 |
+| 46+ | 21845 | 0 | 42 | 0 |
+| 47 | 21845 | 0 | 42 | 0 |
+| 47 | 21845 | 0 | 106 | 0 |
+| 47 | 21845 | 0 | 170 | 21845 |
+| 47 | 21845 | 0 | 234 | 0 |
+| 47 | 21845 | 0 | 298 | 0 |
+| 47 | 21845 | 0 | 362 | 0 |
+| 47 | 21845 | 0 | 426 | 0 |
+| 47 | 21845 | 0 | 490 | 0 |
+| 47+ | 21845 | 1 | 42 | 0 |
+| 48 | 21845 | 1 | 42 | 21845 |
+| 48+ | 21845 | 1 | 106 | 0 |
+| 49 | 21845 | 1 | 106 | 21845 |
+| 49+ | 21845 | 1 | 170 | 21845 |
+| 50 | 21845 | 1 | 170 | 21845 |
+| 50+ | 21845 | 1 | 234 | 0 |
+| 51 | 21845 | 1 | 234 | 21845 |
+| 51+ | 21845 | 1 | 298 | 0 |
+| 52 | 21845 | 1 | 298 | 21845 |
+| 52+ | 21845 | 1 | 362 | 0 |
+| 53 | 21845 | 1 | 362 | 21845 |
+| 53+ | 21845 | 1 | 426 | 0 |
+| 54 | 21845 | 1 | 426 | 21845 |
+| 54+ | 21845 | 1 | 490 | 0 |
+| 55 | 21845 | 1 | 490 | 21845 |
+| 55+ | 21845 | 0 | 42 | 21845 |
+| 56 | 21845 | 0 | 42 | 21845 |
+| 56 | 21845 | 0 | 106 | 21845 |
+| 56 | 21845 | 0 | 170 | 21845 |
+| 56 | 21845 | 0 | 234 | 21845 |
+| 56 | 21845 | 0 | 298 | 21845 |
+| 56 | 21845 | 0 | 362 | 21845 |
+| 56 | 21845 | 0 | 426 | 21845 |
+| 56 | 21845 | 0 | 490 | 21845 |
+| 56+ | -21846 | 1 | 42 | 21845 |
+| 57 | -21846 | 1 | 42 | -21846 |
+| 57+ | -21846 | 0 | 42 | -21846 |
+| 58 | -21846 | 0 | 42 | -21846 |
+| 58 | -21846 | 0 | 106 | 21845 |
+| 58 | -21846 | 0 | 170 | 21845 |
+| 58 | -21846 | 0 | 234 | 21845 |
+| 58 | -21846 | 0 | 298 | 21845 |
+| 58 | -21846 | 0 | 362 | 21845 |
+| 58 | -21846 | 0 | 426 | 21845 |
+| 58 | -21846 | 0 | 490 | 21845 |
+| 58+ | 21845 | 1 | 42 | -21846 |
+| 59 | 21845 | 1 | 42 | 21845 |
+| 59+ | -21846 | 1 | 106 | 21845 |
+| 60 | -21846 | 1 | 106 | -21846 |
+| 60+ | -21846 | 0 | 42 | 21845 |
+| 61 | -21846 | 0 | 42 | 21845 |
+| 61 | -21846 | 0 | 106 | -21846 |
+| 61 | -21846 | 0 | 170 | 21845 |
+| 61 | -21846 | 0 | 234 | 21845 |
+| 61 | -21846 | 0 | 298 | 21845 |
+| 61 | -21846 | 0 | 362 | 21845 |
+| 61 | -21846 | 0 | 426 | 21845 |
+| 61 | -21846 | 0 | 490 | 21845 |
+| 61+ | 21845 | 1 | 106 | -21846 |
+| 62 | 21845 | 1 | 106 | 21845 |
+| 62+ | -21846 | 1 | 170 | 21845 |
+| 63 | -21846 | 1 | 170 | -21846 |
+| 63+ | -21846 | 0 | 42 | 21845 |
+| 64 | -21846 | 0 | 42 | 21845 |
+| 64 | -21846 | 0 | 106 | 21845 |
+| 64 | -21846 | 0 | 170 | -21846 |
+| 64 | -21846 | 0 | 234 | 21845 |
+| 64 | -21846 | 0 | 298 | 21845 |
+| 64 | -21846 | 0 | 362 | 21845 |
+| 64 | -21846 | 0 | 426 | 21845 |
+| 64 | -21846 | 0 | 490 | 21845 |
+| 64+ | 21845 | 1 | 170 | -21846 |
+| 65 | 21845 | 1 | 170 | 21845 |
+| 65+ | -21846 | 1 | 234 | 21845 |
+| 66 | -21846 | 1 | 234 | -21846 |
+| 66+ | -21846 | 0 | 42 | 21845 |
+| 67 | -21846 | 0 | 42 | 21845 |
+| 67 | -21846 | 0 | 106 | 21845 |
+| 67 | -21846 | 0 | 170 | 21845 |
+| 67 | -21846 | 0 | 234 | -21846 |
+| 67 | -21846 | 0 | 298 | 21845 |
+| 67 | -21846 | 0 | 362 | 21845 |
+| 67 | -21846 | 0 | 426 | 21845 |
+| 67 | -21846 | 0 | 490 | 21845 |
+| 67+ | 21845 | 1 | 234 | -21846 |
+| 68 | 21845 | 1 | 234 | 21845 |
+| 68+ | -21846 | 1 | 298 | 21845 |
+| 69 | -21846 | 1 | 298 | -21846 |
+| 69+ | -21846 | 0 | 42 | 21845 |
+| 70 | -21846 | 0 | 42 | 21845 |
+| 70 | -21846 | 0 | 106 | 21845 |
+| 70 | -21846 | 0 | 170 | 21845 |
+| 70 | -21846 | 0 | 234 | 21845 |
+| 70 | -21846 | 0 | 298 | -21846 |
+| 70 | -21846 | 0 | 362 | 21845 |
+| 70 | -21846 | 0 | 426 | 21845 |
+| 70 | -21846 | 0 | 490 | 21845 |
+| 70+ | 21845 | 1 | 298 | -21846 |
+| 71 | 21845 | 1 | 298 | 21845 |
+| 71+ | -21846 | 1 | 362 | 21845 |
+| 72 | -21846 | 1 | 362 | -21846 |
+| 72+ | -21846 | 0 | 42 | 21845 |
+| 73 | -21846 | 0 | 42 | 21845 |
+| 73 | -21846 | 0 | 106 | 21845 |
+| 73 | -21846 | 0 | 170 | 21845 |
+| 73 | -21846 | 0 | 234 | 21845 |
+| 73 | -21846 | 0 | 298 | 21845 |
+| 73 | -21846 | 0 | 362 | -21846 |
+| 73 | -21846 | 0 | 426 | 21845 |
+| 73 | -21846 | 0 | 490 | 21845 |
+| 73+ | 21845 | 1 | 362 | -21846 |
+| 74 | 21845 | 1 | 362 | 21845 |
+| 74+ | -21846 | 1 | 426 | 21845 |
+| 75 | -21846 | 1 | 426 | -21846 |
+| 75+ | -21846 | 0 | 42 | 21845 |
+| 76 | -21846 | 0 | 42 | 21845 |
+| 76 | -21846 | 0 | 106 | 21845 |
+| 76 | -21846 | 0 | 170 | 21845 |
+| 76 | -21846 | 0 | 234 | 21845 |
+| 76 | -21846 | 0 | 298 | 21845 |
+| 76 | -21846 | 0 | 362 | 21845 |
+| 76 | -21846 | 0 | 426 | -21846 |
+| 76 | -21846 | 0 | 490 | 21845 |
+| 76+ | 21845 | 1 | 426 | -21846 |
+| 77 | 21845 | 1 | 426 | 21845 |
+| 77+ | -21846 | 1 | 490 | 21845 |
+| 78 | -21846 | 1 | 490 | -21846 |
+| 78+ | -21846 | 0 | 42 | 21845 |
+| 79 | -21846 | 0 | 42 | 21845 |
+| 79 | -21846 | 0 | 106 | 21845 |
+| 79 | -21846 | 0 | 170 | 21845 |
+| 79 | -21846 | 0 | 234 | 21845 |
+| 79 | -21846 | 0 | 298 | 21845 |
+| 79 | -21846 | 0 | 362 | 21845 |
+| 79 | -21846 | 0 | 426 | 21845 |
+| 79 | -21846 | 0 | 490 | -21846 |
+| 79+ | 21845 | 1 | 490 | -21846 |
+| 80 | 21845 | 1 | 490 | 21845 |
+| 80+ | 21845 | 0 | 42 | 21845 |
+| 81 | 21845 | 0 | 42 | 21845 |
+| 81 | 21845 | 0 | 106 | 21845 |
+| 81 | 21845 | 0 | 170 | 21845 |
+| 81 | 21845 | 0 | 234 | 21845 |
+| 81 | 21845 | 0 | 298 | 21845 |
+| 81 | 21845 | 0 | 362 | 21845 |
+| 81 | 21845 | 0 | 426 | 21845 |
+| 81 | 21845 | 0 | 490 | 21845 |
diff --git a/projects/03/b/RAM512.hdl b/projects/03/b/RAM512.hdl new file mode 100644 index 0000000..821ad6d --- /dev/null +++ b/projects/03/b/RAM512.hdl @@ -0,0 +1,28 @@ +// This file is part of the materials accompanying the book
+// "The Elements of Computing Systems" by Nisan and Schocken,
+// MIT Press. Book site: www.idc.ac.il/tecs
+// File name: projects/03/b/RAM512.hdl
+
+/**
+ * Memory of 512 registers, each 16 bit-wide. Out holds the value
+ * stored at the memory location specified by address. If load==1, then
+ * the in value is loaded into the memory location specified by address
+ * (the loaded value will be emitted to out from the next time step onward).
+ */
+
+CHIP RAM512 {
+ IN in[16], load, address[9];
+ OUT out[16];
+
+ PARTS:
+ DMux8Way(in=load, sel=address[6..8], a=l0, b=l1, c=l2, d=l3, e=l4, f=l5, g=l6, h=l7);
+ RAM64(in=in, load=l0, address=address[0..5], out=o0);
+ RAM64(in=in, load=l1, address=address[0..5], out=o1);
+ RAM64(in=in, load=l2, address=address[0..5], out=o2);
+ RAM64(in=in, load=l3, address=address[0..5], out=o3);
+ RAM64(in=in, load=l4, address=address[0..5], out=o4);
+ RAM64(in=in, load=l5, address=address[0..5], out=o5);
+ RAM64(in=in, load=l6, address=address[0..5], out=o6);
+ RAM64(in=in, load=l7, address=address[0..5], out=o7);
+ Mux8Way16(a=o0, b=o1, c=o2, d=o3, e=o4, f=o5, g=o6, h=o7, sel=address[6..8], out=out);
+}
diff --git a/projects/03/b/RAM512.out b/projects/03/b/RAM512.out new file mode 100644 index 0000000..b947117 --- /dev/null +++ b/projects/03/b/RAM512.out @@ -0,0 +1,320 @@ +| 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+ | 13099 | 0 | 0 | 0 | +| 3 | 13099 | 0 | 0 | 0 | +| 3+ | 13099 | 1 | 130 | 0 | +| 4 | 13099 | 1 | 130 | 13099 | +| 4+ | 13099 | 0 | 0 | 0 | +| 5 | 13099 | 0 | 0 | 0 | +| 5+ | 4729 | 0 | 472 | 0 | +| 6 | 4729 | 0 | 472 | 0 | +| 6+ | 4729 | 1 | 472 | 0 | +| 7 | 4729 | 1 | 472 | 4729 | +| 7+ | 4729 | 0 | 472 | 4729 | +| 8 | 4729 | 0 | 472 | 4729 | +| 8 | 4729 | 0 | 130 | 13099 | +| 8+ | 5119 | 0 | 130 | 13099 | +| 9 | 5119 | 0 | 130 | 13099 | +| 9+ | 5119 | 1 | 511 | 0 | +| 10 | 5119 | 1 | 511 | 5119 | +| 10+ | 5119 | 0 | 511 | 5119 | +| 11 | 5119 | 0 | 511 | 5119 | +| 11 | 5119 | 0 | 472 | 4729 | +| 11 | 5119 | 0 | 511 | 5119 | +| 11+ | 5119 | 0 | 168 | 0 | +| 12 | 5119 | 0 | 168 | 0 | +| 12 | 5119 | 0 | 169 | 0 | +| 12 | 5119 | 0 | 170 | 0 | +| 12 | 5119 | 0 | 171 | 0 | +| 12 | 5119 | 0 | 172 | 0 | +| 12 | 5119 | 0 | 173 | 0 | +| 12 | 5119 | 0 | 174 | 0 | +| 12 | 5119 | 0 | 175 | 0 | +| 12+ | 21845 | 1 | 168 | 0 | +| 13 | 21845 | 1 | 168 | 21845 | +| 13+ | 21845 | 1 | 169 | 0 | +| 14 | 21845 | 1 | 169 | 21845 | +| 14+ | 21845 | 1 | 170 | 0 | +| 15 | 21845 | 1 | 170 | 21845 | +| 15+ | 21845 | 1 | 171 | 0 | +| 16 | 21845 | 1 | 171 | 21845 | +| 16+ | 21845 | 1 | 172 | 0 | +| 17 | 21845 | 1 | 172 | 21845 | +| 17+ | 21845 | 1 | 173 | 0 | +| 18 | 21845 | 1 | 173 | 21845 | +| 18+ | 21845 | 1 | 174 | 0 | +| 19 | 21845 | 1 | 174 | 21845 | +| 19+ | 21845 | 1 | 175 | 0 | +| 20 | 21845 | 1 | 175 | 21845 | +| 20+ | 21845 | 0 | 168 | 21845 | +| 21 | 21845 | 0 | 168 | 21845 | +| 21 | 21845 | 0 | 169 | 21845 | +| 21 | 21845 | 0 | 170 | 21845 | +| 21 | 21845 | 0 | 171 | 21845 | +| 21 | 21845 | 0 | 172 | 21845 | +| 21 | 21845 | 0 | 173 | 21845 | +| 21 | 21845 | 0 | 174 | 21845 | +| 21 | 21845 | 0 | 175 | 21845 | +| 21+ | -21846 | 1 | 168 | 21845 | +| 22 | -21846 | 1 | 168 | -21846 | +| 22+ | -21846 | 0 | 168 | -21846 | +| 23 | -21846 | 0 | 168 | -21846 | +| 23 | -21846 | 0 | 169 | 21845 | +| 23 | -21846 | 0 | 170 | 21845 | +| 23 | -21846 | 0 | 171 | 21845 | +| 23 | -21846 | 0 | 172 | 21845 | +| 23 | -21846 | 0 | 173 | 21845 | +| 23 | -21846 | 0 | 174 | 21845 | +| 23 | -21846 | 0 | 175 | 21845 | +| 23+ | 21845 | 1 | 168 | -21846 | +| 24 | 21845 | 1 | 168 | 21845 | +| 24+ | -21846 | 1 | 169 | 21845 | +| 25 | -21846 | 1 | 169 | -21846 | +| 25+ | -21846 | 0 | 168 | 21845 | +| 26 | -21846 | 0 | 168 | 21845 | +| 26 | -21846 | 0 | 169 | -21846 | +| 26 | -21846 | 0 | 170 | 21845 | +| 26 | -21846 | 0 | 171 | 21845 | +| 26 | -21846 | 0 | 172 | 21845 | +| 26 | -21846 | 0 | 173 | 21845 | +| 26 | -21846 | 0 | 174 | 21845 | +| 26 | -21846 | 0 | 175 | 21845 | +| 26+ | 21845 | 1 | 169 | -21846 | +| 27 | 21845 | 1 | 169 | 21845 | +| 27+ | -21846 | 1 | 170 | 21845 | +| 28 | -21846 | 1 | 170 | -21846 | +| 28+ | -21846 | 0 | 168 | 21845 | +| 29 | -21846 | 0 | 168 | 21845 | +| 29 | -21846 | 0 | 169 | 21845 | +| 29 | -21846 | 0 | 170 | -21846 | +| 29 | -21846 | 0 | 171 | 21845 | +| 29 | -21846 | 0 | 172 | 21845 | +| 29 | -21846 | 0 | 173 | 21845 | +| 29 | -21846 | 0 | 174 | 21845 | +| 29 | -21846 | 0 | 175 | 21845 | +| 29+ | 21845 | 1 | 170 | -21846 | +| 30 | 21845 | 1 | 170 | 21845 | +| 30+ | -21846 | 1 | 171 | 21845 | +| 31 | -21846 | 1 | 171 | -21846 | +| 31+ | -21846 | 0 | 168 | 21845 | +| 32 | -21846 | 0 | 168 | 21845 | +| 32 | -21846 | 0 | 169 | 21845 | +| 32 | -21846 | 0 | 170 | 21845 | +| 32 | -21846 | 0 | 171 | -21846 | +| 32 | -21846 | 0 | 172 | 21845 | +| 32 | -21846 | 0 | 173 | 21845 | +| 32 | -21846 | 0 | 174 | 21845 | +| 32 | -21846 | 0 | 175 | 21845 | +| 32+ | 21845 | 1 | 171 | -21846 | +| 33 | 21845 | 1 | 171 | 21845 | +| 33+ | -21846 | 1 | 172 | 21845 | +| 34 | -21846 | 1 | 172 | -21846 | +| 34+ | -21846 | 0 | 168 | 21845 | +| 35 | -21846 | 0 | 168 | 21845 | +| 35 | -21846 | 0 | 169 | 21845 | +| 35 | -21846 | 0 | 170 | 21845 | +| 35 | -21846 | 0 | 171 | 21845 | +| 35 | -21846 | 0 | 172 | -21846 | +| 35 | -21846 | 0 | 173 | 21845 | +| 35 | -21846 | 0 | 174 | 21845 | +| 35 | -21846 | 0 | 175 | 21845 | +| 35+ | 21845 | 1 | 172 | -21846 | +| 36 | 21845 | 1 | 172 | 21845 | +| 36+ | -21846 | 1 | 173 | 21845 | +| 37 | -21846 | 1 | 173 | -21846 | +| 37+ | -21846 | 0 | 168 | 21845 | +| 38 | -21846 | 0 | 168 | 21845 | +| 38 | -21846 | 0 | 169 | 21845 | +| 38 | -21846 | 0 | 170 | 21845 | +| 38 | -21846 | 0 | 171 | 21845 | +| 38 | -21846 | 0 | 172 | 21845 | +| 38 | -21846 | 0 | 173 | -21846 | +| 38 | -21846 | 0 | 174 | 21845 | +| 38 | -21846 | 0 | 175 | 21845 | +| 38+ | 21845 | 1 | 173 | -21846 | +| 39 | 21845 | 1 | 173 | 21845 | +| 39+ | -21846 | 1 | 174 | 21845 | +| 40 | -21846 | 1 | 174 | -21846 | +| 40+ | -21846 | 0 | 168 | 21845 | +| 41 | -21846 | 0 | 168 | 21845 | +| 41 | -21846 | 0 | 169 | 21845 | +| 41 | -21846 | 0 | 170 | 21845 | +| 41 | -21846 | 0 | 171 | 21845 | +| 41 | -21846 | 0 | 172 | 21845 | +| 41 | -21846 | 0 | 173 | 21845 | +| 41 | -21846 | 0 | 174 | -21846 | +| 41 | -21846 | 0 | 175 | 21845 | +| 41+ | 21845 | 1 | 174 | -21846 | +| 42 | 21845 | 1 | 174 | 21845 | +| 42+ | -21846 | 1 | 175 | 21845 | +| 43 | -21846 | 1 | 175 | -21846 | +| 43+ | -21846 | 0 | 168 | 21845 | +| 44 | -21846 | 0 | 168 | 21845 | +| 44 | -21846 | 0 | 169 | 21845 | +| 44 | -21846 | 0 | 170 | 21845 | +| 44 | -21846 | 0 | 171 | 21845 | +| 44 | -21846 | 0 | 172 | 21845 | +| 44 | -21846 | 0 | 173 | 21845 | +| 44 | -21846 | 0 | 174 | 21845 | +| 44 | -21846 | 0 | 175 | -21846 | +| 44+ | 21845 | 1 | 175 | -21846 | +| 45 | 21845 | 1 | 175 | 21845 | +| 45+ | 21845 | 0 | 168 | 21845 | +| 46 | 21845 | 0 | 168 | 21845 | +| 46 | 21845 | 0 | 169 | 21845 | +| 46 | 21845 | 0 | 170 | 21845 | +| 46 | 21845 | 0 | 171 | 21845 | +| 46 | 21845 | 0 | 172 | 21845 | +| 46 | 21845 | 0 | 173 | 21845 | +| 46 | 21845 | 0 | 174 | 21845 | +| 46 | 21845 | 0 | 175 | 21845 | +| 46+ | 21845 | 0 | 42 | 0 | +| 47 | 21845 | 0 | 42 | 0 | +| 47 | 21845 | 0 | 106 | 0 | +| 47 | 21845 | 0 | 170 | 21845 | +| 47 | 21845 | 0 | 234 | 0 | +| 47 | 21845 | 0 | 298 | 0 | +| 47 | 21845 | 0 | 362 | 0 | +| 47 | 21845 | 0 | 426 | 0 | +| 47 | 21845 | 0 | 490 | 0 | +| 47+ | 21845 | 1 | 42 | 0 | +| 48 | 21845 | 1 | 42 | 21845 | +| 48+ | 21845 | 1 | 106 | 0 | +| 49 | 21845 | 1 | 106 | 21845 | +| 49+ | 21845 | 1 | 170 | 21845 | +| 50 | 21845 | 1 | 170 | 21845 | +| 50+ | 21845 | 1 | 234 | 0 | +| 51 | 21845 | 1 | 234 | 21845 | +| 51+ | 21845 | 1 | 298 | 0 | +| 52 | 21845 | 1 | 298 | 21845 | +| 52+ | 21845 | 1 | 362 | 0 | +| 53 | 21845 | 1 | 362 | 21845 | +| 53+ | 21845 | 1 | 426 | 0 | +| 54 | 21845 | 1 | 426 | 21845 | +| 54+ | 21845 | 1 | 490 | 0 | +| 55 | 21845 | 1 | 490 | 21845 | +| 55+ | 21845 | 0 | 42 | 21845 | +| 56 | 21845 | 0 | 42 | 21845 | +| 56 | 21845 | 0 | 106 | 21845 | +| 56 | 21845 | 0 | 170 | 21845 | +| 56 | 21845 | 0 | 234 | 21845 | +| 56 | 21845 | 0 | 298 | 21845 | +| 56 | 21845 | 0 | 362 | 21845 | +| 56 | 21845 | 0 | 426 | 21845 | +| 56 | 21845 | 0 | 490 | 21845 | +| 56+ | -21846 | 1 | 42 | 21845 | +| 57 | -21846 | 1 | 42 | -21846 | +| 57+ | -21846 | 0 | 42 | -21846 | +| 58 | -21846 | 0 | 42 | -21846 | +| 58 | -21846 | 0 | 106 | 21845 | +| 58 | -21846 | 0 | 170 | 21845 | +| 58 | -21846 | 0 | 234 | 21845 | +| 58 | -21846 | 0 | 298 | 21845 | +| 58 | -21846 | 0 | 362 | 21845 | +| 58 | -21846 | 0 | 426 | 21845 | +| 58 | -21846 | 0 | 490 | 21845 | +| 58+ | 21845 | 1 | 42 | -21846 | +| 59 | 21845 | 1 | 42 | 21845 | +| 59+ | -21846 | 1 | 106 | 21845 | +| 60 | -21846 | 1 | 106 | -21846 | +| 60+ | -21846 | 0 | 42 | 21845 | +| 61 | -21846 | 0 | 42 | 21845 | +| 61 | -21846 | 0 | 106 | -21846 | +| 61 | -21846 | 0 | 170 | 21845 | +| 61 | -21846 | 0 | 234 | 21845 | +| 61 | -21846 | 0 | 298 | 21845 | +| 61 | -21846 | 0 | 362 | 21845 | +| 61 | -21846 | 0 | 426 | 21845 | +| 61 | -21846 | 0 | 490 | 21845 | +| 61+ | 21845 | 1 | 106 | -21846 | +| 62 | 21845 | 1 | 106 | 21845 | +| 62+ | -21846 | 1 | 170 | 21845 | +| 63 | -21846 | 1 | 170 | -21846 | +| 63+ | -21846 | 0 | 42 | 21845 | +| 64 | -21846 | 0 | 42 | 21845 | +| 64 | -21846 | 0 | 106 | 21845 | +| 64 | -21846 | 0 | 170 | -21846 | +| 64 | -21846 | 0 | 234 | 21845 | +| 64 | -21846 | 0 | 298 | 21845 | +| 64 | -21846 | 0 | 362 | 21845 | +| 64 | -21846 | 0 | 426 | 21845 | +| 64 | -21846 | 0 | 490 | 21845 | +| 64+ | 21845 | 1 | 170 | -21846 | +| 65 | 21845 | 1 | 170 | 21845 | +| 65+ | -21846 | 1 | 234 | 21845 | +| 66 | -21846 | 1 | 234 | -21846 | +| 66+ | -21846 | 0 | 42 | 21845 | +| 67 | -21846 | 0 | 42 | 21845 | +| 67 | -21846 | 0 | 106 | 21845 | +| 67 | -21846 | 0 | 170 | 21845 | +| 67 | -21846 | 0 | 234 | -21846 | +| 67 | -21846 | 0 | 298 | 21845 | +| 67 | -21846 | 0 | 362 | 21845 | +| 67 | -21846 | 0 | 426 | 21845 | +| 67 | -21846 | 0 | 490 | 21845 | +| 67+ | 21845 | 1 | 234 | -21846 | +| 68 | 21845 | 1 | 234 | 21845 | +| 68+ | -21846 | 1 | 298 | 21845 | +| 69 | -21846 | 1 | 298 | -21846 | +| 69+ | -21846 | 0 | 42 | 21845 | +| 70 | -21846 | 0 | 42 | 21845 | +| 70 | -21846 | 0 | 106 | 21845 | +| 70 | -21846 | 0 | 170 | 21845 | +| 70 | -21846 | 0 | 234 | 21845 | +| 70 | -21846 | 0 | 298 | -21846 | +| 70 | -21846 | 0 | 362 | 21845 | +| 70 | -21846 | 0 | 426 | 21845 | +| 70 | -21846 | 0 | 490 | 21845 | +| 70+ | 21845 | 1 | 298 | -21846 | +| 71 | 21845 | 1 | 298 | 21845 | +| 71+ | -21846 | 1 | 362 | 21845 | +| 72 | -21846 | 1 | 362 | -21846 | +| 72+ | -21846 | 0 | 42 | 21845 | +| 73 | -21846 | 0 | 42 | 21845 | +| 73 | -21846 | 0 | 106 | 21845 | +| 73 | -21846 | 0 | 170 | 21845 | +| 73 | -21846 | 0 | 234 | 21845 | +| 73 | -21846 | 0 | 298 | 21845 | +| 73 | -21846 | 0 | 362 | -21846 | +| 73 | -21846 | 0 | 426 | 21845 | +| 73 | -21846 | 0 | 490 | 21845 | +| 73+ | 21845 | 1 | 362 | -21846 | +| 74 | 21845 | 1 | 362 | 21845 | +| 74+ | -21846 | 1 | 426 | 21845 | +| 75 | -21846 | 1 | 426 | -21846 | +| 75+ | -21846 | 0 | 42 | 21845 | +| 76 | -21846 | 0 | 42 | 21845 | +| 76 | -21846 | 0 | 106 | 21845 | +| 76 | -21846 | 0 | 170 | 21845 | +| 76 | -21846 | 0 | 234 | 21845 | +| 76 | -21846 | 0 | 298 | 21845 | +| 76 | -21846 | 0 | 362 | 21845 | +| 76 | -21846 | 0 | 426 | -21846 | +| 76 | -21846 | 0 | 490 | 21845 | +| 76+ | 21845 | 1 | 426 | -21846 | +| 77 | 21845 | 1 | 426 | 21845 | +| 77+ | -21846 | 1 | 490 | 21845 | +| 78 | -21846 | 1 | 490 | -21846 | +| 78+ | -21846 | 0 | 42 | 21845 | +| 79 | -21846 | 0 | 42 | 21845 | +| 79 | -21846 | 0 | 106 | 21845 | +| 79 | -21846 | 0 | 170 | 21845 | +| 79 | -21846 | 0 | 234 | 21845 | +| 79 | -21846 | 0 | 298 | 21845 | +| 79 | -21846 | 0 | 362 | 21845 | +| 79 | -21846 | 0 | 426 | 21845 | +| 79 | -21846 | 0 | 490 | -21846 | +| 79+ | 21845 | 1 | 490 | -21846 | +| 80 | 21845 | 1 | 490 | 21845 | +| 80+ | 21845 | 0 | 42 | 21845 | +| 81 | 21845 | 0 | 42 | 21845 | +| 81 | 21845 | 0 | 106 | 21845 | +| 81 | 21845 | 0 | 170 | 21845 | +| 81 | 21845 | 0 | 234 | 21845 | +| 81 | 21845 | 0 | 298 | 21845 | +| 81 | 21845 | 0 | 362 | 21845 | +| 81 | 21845 | 0 | 426 | 21845 | +| 81 | 21845 | 0 | 490 | 21845 | diff --git a/projects/03/b/RAM512.tst b/projects/03/b/RAM512.tst new file mode 100644 index 0000000..4ec6fc2 --- /dev/null +++ b/projects/03/b/RAM512.tst @@ -0,0 +1,1027 @@ +// This file is part of www.nand2tetris.org
+// and the book "The Elements of Computing Systems"
+// by Nisan and Schocken, MIT Press.
+// File name: projects/03/b/RAM512.tst
+
+load RAM512.hdl,
+output-file RAM512.out,
+compare-to RAM512.cmp,
+output-list time%S1.4.1 in%D1.6.1 load%B2.1.2 address%D2.3.2 out%D1.6.1;
+
+set in 0,
+set load 0,
+set address 0,
+tick,
+output;
+tock,
+output;
+
+set load 1,
+tick,
+output;
+tock,
+output;
+
+set in 13099,
+set load 0,
+tick,
+output;
+tock,
+output;
+
+set load 1,
+set address 130,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address 0,
+tick,
+output;
+tock,
+output;
+
+set in 4729,
+set address 472,
+tick,
+output;
+tock,
+output;
+
+set load 1,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+tick,
+output;
+tock,
+output;
+
+set address 130,
+eval,
+output;
+
+set in 5119,
+tick,
+output;
+tock,
+output;
+
+set load 1,
+set address 511,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+tick,
+output;
+tock,
+output;
+
+set address 472,
+eval,
+output;
+
+set address 511,
+eval,
+output;
+
+
+set load 0,
+set address %B010101000,
+tick,
+output;
+tock,
+output;
+set address %B010101001,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B010101011,
+eval,
+output;
+set address %B010101100,
+eval,
+output;
+set address %B010101101,
+eval,
+output;
+set address %B010101110,
+eval,
+output;
+set address %B010101111,
+eval,
+output;
+
+set load 1,
+set in %B0101010101010101,
+set address %B010101000,
+tick,
+output;
+tock,
+output;
+set address %B010101001,
+tick,
+output,
+tock,
+output;
+set address %B010101010,
+tick,
+output,
+tock,
+output;
+set address %B010101011,
+tick,
+output,
+tock,
+output;
+set address %B010101100,
+tick,
+output,
+tock,
+output;
+set address %B010101101,
+tick,
+output,
+tock,
+output;
+set address %B010101110,
+tick,
+output,
+tock,
+output;
+set address %B010101111,
+tick,
+output,
+tock,
+output;
+
+set load 0,
+set address %B010101000,
+tick,
+output;
+tock,
+output;
+set address %B010101001,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B010101011,
+eval,
+output;
+set address %B010101100,
+eval,
+output;
+set address %B010101101,
+eval,
+output;
+set address %B010101110,
+eval,
+output;
+set address %B010101111,
+eval,
+output;
+
+set load 1,
+set address %B010101000,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B010101000,
+tick,
+output;
+tock,
+output;
+set address %B010101001,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B010101011,
+eval,
+output;
+set address %B010101100,
+eval,
+output;
+set address %B010101101,
+eval,
+output;
+set address %B010101110,
+eval,
+output;
+set address %B010101111,
+eval,
+output;
+
+set load 1,
+set address %B010101000,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B010101001,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B010101000,
+tick,
+output;
+tock,
+output;
+set address %B010101001,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B010101011,
+eval,
+output;
+set address %B010101100,
+eval,
+output;
+set address %B010101101,
+eval,
+output;
+set address %B010101110,
+eval,
+output;
+set address %B010101111,
+eval,
+output;
+
+set load 1,
+set address %B010101001,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B010101010,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B010101000,
+tick,
+output;
+tock,
+output;
+set address %B010101001,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B010101011,
+eval,
+output;
+set address %B010101100,
+eval,
+output;
+set address %B010101101,
+eval,
+output;
+set address %B010101110,
+eval,
+output;
+set address %B010101111,
+eval,
+output;
+
+set load 1,
+set address %B010101010,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B010101011,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B010101000,
+tick,
+output;
+tock,
+output;
+set address %B010101001,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B010101011,
+eval,
+output;
+set address %B010101100,
+eval,
+output;
+set address %B010101101,
+eval,
+output;
+set address %B010101110,
+eval,
+output;
+set address %B010101111,
+eval,
+output;
+
+set load 1,
+set address %B010101011,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B010101100,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B010101000,
+tick,
+output;
+tock,
+output;
+set address %B010101001,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B010101011,
+eval,
+output;
+set address %B010101100,
+eval,
+output;
+set address %B010101101,
+eval,
+output;
+set address %B010101110,
+eval,
+output;
+set address %B010101111,
+eval,
+output;
+
+set load 1,
+set address %B010101100,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B010101101,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B010101000,
+tick,
+output;
+tock,
+output;
+set address %B010101001,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B010101011,
+eval,
+output;
+set address %B010101100,
+eval,
+output;
+set address %B010101101,
+eval,
+output;
+set address %B010101110,
+eval,
+output;
+set address %B010101111,
+eval,
+output;
+
+set load 1,
+set address %B010101101,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B010101110,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B010101000,
+tick,
+output;
+tock,
+output;
+set address %B010101001,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B010101011,
+eval,
+output;
+set address %B010101100,
+eval,
+output;
+set address %B010101101,
+eval,
+output;
+set address %B010101110,
+eval,
+output;
+set address %B010101111,
+eval,
+output;
+
+set load 1,
+set address %B010101110,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B010101111,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B010101000,
+tick,
+output;
+tock,
+output;
+set address %B010101001,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B010101011,
+eval,
+output;
+set address %B010101100,
+eval,
+output;
+set address %B010101101,
+eval,
+output;
+set address %B010101110,
+eval,
+output;
+set address %B010101111,
+eval,
+output;
+
+set load 1,
+set address %B010101111,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+
+set load 0,
+set address %B010101000,
+tick,
+output;
+tock,
+output;
+set address %B010101001,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B010101011,
+eval,
+output;
+set address %B010101100,
+eval,
+output;
+set address %B010101101,
+eval,
+output;
+set address %B010101110,
+eval,
+output;
+set address %B010101111,
+eval,
+output;
+
+
+set load 0,
+set address %B000101010,
+tick,
+output;
+tock,
+output;
+set address %B001101010,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B011101010,
+eval,
+output;
+set address %B100101010,
+eval,
+output;
+set address %B101101010,
+eval,
+output;
+set address %B110101010,
+eval,
+output;
+set address %B111101010,
+eval,
+output;
+
+set load 1,
+set in %B0101010101010101,
+set address %B000101010,
+tick,
+output;
+tock,
+output;
+set address %B001101010,
+tick,
+output,
+tock,
+output;
+set address %B010101010,
+tick,
+output,
+tock,
+output;
+set address %B011101010,
+tick,
+output,
+tock,
+output;
+set address %B100101010,
+tick,
+output,
+tock,
+output;
+set address %B101101010,
+tick,
+output,
+tock,
+output;
+set address %B110101010,
+tick,
+output,
+tock,
+output;
+set address %B111101010,
+tick,
+output,
+tock,
+output;
+
+set load 0,
+set address %B000101010,
+tick,
+output;
+tock,
+output;
+set address %B001101010,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B011101010,
+eval,
+output;
+set address %B100101010,
+eval,
+output;
+set address %B101101010,
+eval,
+output;
+set address %B110101010,
+eval,
+output;
+set address %B111101010,
+eval,
+output;
+
+set load 1,
+set address %B000101010,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B000101010,
+tick,
+output;
+tock,
+output;
+set address %B001101010,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B011101010,
+eval,
+output;
+set address %B100101010,
+eval,
+output;
+set address %B101101010,
+eval,
+output;
+set address %B110101010,
+eval,
+output;
+set address %B111101010,
+eval,
+output;
+
+set load 1,
+set address %B000101010,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B001101010,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B000101010,
+tick,
+output;
+tock,
+output;
+set address %B001101010,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B011101010,
+eval,
+output;
+set address %B100101010,
+eval,
+output;
+set address %B101101010,
+eval,
+output;
+set address %B110101010,
+eval,
+output;
+set address %B111101010,
+eval,
+output;
+
+set load 1,
+set address %B001101010,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B010101010,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B000101010,
+tick,
+output;
+tock,
+output;
+set address %B001101010,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B011101010,
+eval,
+output;
+set address %B100101010,
+eval,
+output;
+set address %B101101010,
+eval,
+output;
+set address %B110101010,
+eval,
+output;
+set address %B111101010,
+eval,
+output;
+
+set load 1,
+set address %B010101010,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B011101010,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B000101010,
+tick,
+output;
+tock,
+output;
+set address %B001101010,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B011101010,
+eval,
+output;
+set address %B100101010,
+eval,
+output;
+set address %B101101010,
+eval,
+output;
+set address %B110101010,
+eval,
+output;
+set address %B111101010,
+eval,
+output;
+
+set load 1,
+set address %B011101010,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B100101010,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B000101010,
+tick,
+output;
+tock,
+output;
+set address %B001101010,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B011101010,
+eval,
+output;
+set address %B100101010,
+eval,
+output;
+set address %B101101010,
+eval,
+output;
+set address %B110101010,
+eval,
+output;
+set address %B111101010,
+eval,
+output;
+
+set load 1,
+set address %B100101010,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B101101010,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B000101010,
+tick,
+output;
+tock,
+output;
+set address %B001101010,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B011101010,
+eval,
+output;
+set address %B100101010,
+eval,
+output;
+set address %B101101010,
+eval,
+output;
+set address %B110101010,
+eval,
+output;
+set address %B111101010,
+eval,
+output;
+
+set load 1,
+set address %B101101010,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B110101010,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B000101010,
+tick,
+output;
+tock,
+output;
+set address %B001101010,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B011101010,
+eval,
+output;
+set address %B100101010,
+eval,
+output;
+set address %B101101010,
+eval,
+output;
+set address %B110101010,
+eval,
+output;
+set address %B111101010,
+eval,
+output;
+
+set load 1,
+set address %B110101010,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+set address %B111101010,
+set in %B1010101010101010,
+tick,
+output;
+tock,
+output;
+
+set load 0,
+set address %B000101010,
+tick,
+output;
+tock,
+output;
+set address %B001101010,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B011101010,
+eval,
+output;
+set address %B100101010,
+eval,
+output;
+set address %B101101010,
+eval,
+output;
+set address %B110101010,
+eval,
+output;
+set address %B111101010,
+eval,
+output;
+
+set load 1,
+set address %B111101010,
+set in %B0101010101010101,
+tick,
+output,
+tock,
+output;
+
+set load 0,
+set address %B000101010,
+tick,
+output;
+tock,
+output;
+set address %B001101010,
+eval,
+output;
+set address %B010101010,
+eval,
+output;
+set address %B011101010,
+eval,
+output;
+set address %B100101010,
+eval,
+output;
+set address %B101101010,
+eval,
+output;
+set address %B110101010,
+eval,
+output;
+set address %B111101010,
+eval,
+output;
+
|