About the memory.hdl

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

About the memory.hdl

vivivo
   I read the book,and somewhere there is 24576=2^14+2^13, I thought there are only one RAM16K, and somewhere  also told that,like photo 5.7. But also i have seen that there should be 2 RAM16K. and the memory chip is consist of 2. The book I read was translated by others ,there always  have some mistake. I don't know why 2 RAM16K,  the address why 24567,. I'm not sure  others know what I mean, sorry.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: About the memory.hdl

cadet1620
Administrator
There is 16K of RAM memory using addresses 0 - 16383.
There is 8K of Screen memory using addresses 16384 - 24575.

The Screen is another type of memory "chip", so that may be the source of confusion in your translation. There are two memory chips in Memory.hdl, one RAM16 and one Screen.

You can read the English version of chapter 5 here: http://www.nand2tetris.org/chapters/chapter%2005.pdf. It might be useful if you have other translation questions.

--Mark



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: About the memory.hdl

vivivo
Thank you!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: About the memory.hdl

vivivo
In reply to this post by cadet1620
Hello, I'm confused about  the Aregister's input and output.As the CPU chip has been built, Aregister's input is ALUout or instruction, ARegister's output out[0..15] maybe data or address? but why out[0..14]=addressM, the out[15] is what? the ALU input is data right? I can't understand how does the AReg work,especially the change of data address the type of input and output.Maybe I‘m not express clear.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: About the memory.hdl

ybakos
The A register is written to in two situations:

- An A instruction
- As the "dest" of a C instruction

So the meaning of the value in A will either be an address or some numeric value relevant to the program itself. (Usually it will be an address, hence the name "A Register.")

Because we only need 15 of the 16 bits to address all of Hack's memory, we can ignore the 16th bit (out[15]) when wiring the A register's output to the address input of Memory.
Loading...