diff options
| author | Yuchen Pei <me@ypei.me> | 2018-01-20 15:41:49 +0100 | 
|---|---|---|
| committer | Yuchen Pei <me@ypei.me> | 2018-01-20 15:41:49 +0100 | 
| commit | d3a0cc3a8ba6dfeb64d3faeffdeb6845b60e5840 (patch) | |
| tree | d58df9ec2480e2a9ec6240f9c797f83d1a0b1056 /chips/Computer.hdl | |
| parent | 3571f998b28fbc8d9250ba04c983935f10a16c15 (diff) | |
rearranged the dir for github
- removed tools and pdfs
- rearranged the projects dirs
- added md files
- other minor changes
Diffstat (limited to 'chips/Computer.hdl')
| -rw-r--r-- | chips/Computer.hdl | 26 | 
1 files changed, 26 insertions, 0 deletions
| diff --git a/chips/Computer.hdl b/chips/Computer.hdl new file mode 100644 index 0000000..fdda8e3 --- /dev/null +++ b/chips/Computer.hdl @@ -0,0 +1,26 @@ +// 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/05/Computer.hdl
 +
 +/**
 + * The HACK computer, including CPU, ROM and RAM.
 + * When reset is 0, the program stored in the computer's ROM executes.
 + * When reset is 1, the execution of the program restarts. 
 + * Thus, to start a program's execution, reset must be pushed "up" (1)
 + * and "down" (0). From this point onward the user is at the mercy of 
 + * the software. In particular, depending on the program's code, the 
 + * screen may show some output and the user may be able to interact 
 + * with the computer via the keyboard.
 + */
 +
 +CHIP Computer {
 +
 +    IN reset;
 +
 +    PARTS:
 +    // Put your code here:
 +    CPU(reset=reset, instruction=instruction, inM=inM, writeM=writeM, outM=outM, addressM=addressM, pc=pc);
 +    Memory(in=outM, address=addressM, load=writeM, out=inM);
 +    ROM32K(address=pc, out=instruction);
 +}
 | 
