can do without DMux4Way and Mux4Way16
This commit is contained in:
parent
0be22ea1ea
commit
845ed74aeb
@ -35,19 +35,15 @@ CHIP Memory {
|
|||||||
// 10 11111 1111 1111 <- Last SCREEN Register
|
// 10 11111 1111 1111 <- Last SCREEN Register
|
||||||
// 11 00000 0000 0000 <- One Keyboard Register
|
// 11 00000 0000 0000 <- One Keyboard Register
|
||||||
|
|
||||||
DMux4Way(in=load, sel=address[13..14], a=toRAM1,
|
// Keyboard doesn't require load bit
|
||||||
b=toRAM2,
|
DMux(in=load, sel=address[14], a=toRAM, b=toSCR);
|
||||||
c=toScreen,
|
|
||||||
d=notNeeded);
|
|
||||||
|
|
||||||
Or(a=toRAM1, b=toRAM2, out=toRAM);
|
// 14 bit address for RAM (16384 registers)
|
||||||
|
// 13 bit address for SCR (8192 registers)
|
||||||
RAM16K(in=in, load=toRAM, address=address[0..13], out=fromRAM);
|
RAM16K(in=in, load=toRAM, address=address[0..13], out=fromRAM);
|
||||||
Screen(in=in, load=toScreen, address=address[0..12], out=fromScreen);
|
Screen(in=in, load=toSCR, address=address[0..12], out=fromSCR);
|
||||||
Keyboard(out=fromKeyboard);
|
Keyboard(out=fromKBD);
|
||||||
|
|
||||||
Mux4Way16(sel=address[13..14], out=out, a=fromRAM,
|
|
||||||
b=fromRAM,
|
|
||||||
c=fromScreen,
|
|
||||||
d=fromKeyboard);
|
|
||||||
|
|
||||||
|
Mux16(a=fromSCR, b=fromKBD, sel=address[13], out=fromDEV);
|
||||||
|
Mux16(a=fromRAM, b=fromDEV, sel=address[14], out=out);
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,9 @@
|
|||||||
|
|
||||||
| Chip | Count | NANDs | Total |
|
| Chip | Count | NANDs | Total |
|
||||||
|------------|------------|------------|------------|
|
|------------|------------|------------|------------|
|
||||||
|DMux4Way | 1| 15| 15|
|
|DMux | 1| 5| 5|
|
||||||
|Or | 1| 3| 3|
|
|
||||||
|RAM16K | 1| 5324667| 5324667|
|
|RAM16K | 1| 5324667| 5324667|
|
||||||
|Screen | 1| 0| 0|
|
|Screen | 1| 0| 0|
|
||||||
|Keyboard | 1| 0| 0|
|
|Keyboard | 1| 0| 0|
|
||||||
|Mux4Way16 | 1| 384| 384|
|
|Mux16 | 2| 128| 256|
|
||||||
|**Total** ||| **5325069**|
|
|**Total** ||| **5324928**|
|
||||||
|
Loading…
Reference in New Issue
Block a user