Trouble implementing memory chip

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Trouble implementing memory chip

AndyGeo
This post was updated on .
It's been a while since I completed chapter 3 and the RAM chips but I went back to refresh.

Those chips were built of 4 or 8 smaller chips so a DMux 4 or 8 way worked. With the MSB xx or xxx used respectively to pinpoint the particular address.

Whats throwing me here is that this chip isn't built like those exactly.

I used a DMux and the first bit of address as sel. Up until the keyboard is needed in the test file it matches the compare file. But I'm not too sure how to use the keyboard chip and to interpret the differing addresses.



Reply | Threaded
Open this post in threaded view
|

Re: Trouble implementing memory chip

cadet1620
Administrator
There are a couple of approaches to decoding the address, but begin by looking at the top two bits of the address.
[14][13]selects
00RAM16
01RAM16
10Screen
11Keyboard
You can treat the Keyboard as if it were a memory part without address or load inputs.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Trouble implementing memory chip

AndyGeo
Thanks Mark that helped me a ton! I see it now, the 13th and 14th bits we can deduce if the number falls within the bands. I had struggled with how the address system worked. I went through my chapter 3 memory chips and even though they passed I was using the first 2 or 3 bits rather than the MSB's in the DMux's.

Reply | Threaded
Open this post in threaded view
|

Re: Trouble implementing memory chip

Mikey2520
In reply to this post by cadet1620
 
cadet1620 wrote
There are a couple of approaches to decoding the address, but begin by looking at the top two bits of the address.
[14][13]selects
00RAM16
01RAM16
10Screen
11Keyboard
You can treat the Keyboard as if it were a memory part without address or load inputs.

--Mark
Hi, the chart you is also a part of my best approach now, but it would cause problem if it is implemented directly, because it enables the keyboard register to load whatever's inputted in the whole chip while an address that starts with "11" is selected. Although invalid address greater than 24576 (that is 11+fourteen 0s) should not be selected, comparing input address to keyboard address bit by bit gives the whole chip a lot more robustness.
Reply | Threaded
Open this post in threaded view
|

Re: Trouble implementing memory chip

mdparker
In reply to this post by cadet1620
I get that we need some way to decide which part of memory to load. I don't understand why it needs to be the top two bits or why the first two both refer to the RAM16. Thanks for any help!
Reply | Threaded
Open this post in threaded view
|

Re: Trouble implementing memory chip

cadet1620
Administrator
Figure 5.7 shows that the RAM is addresses 0-16383, the Screen is 16384-24575, and the Keyboard is 24576.

In binary:
RAM       0000 0000 0000 0000 - 0011 1111 1111 1111
Screen    0100 0000 0000 0000 - 0101 1111 1111 1111
Keyboard  0110 0000 0000 0000
Notice that all RAM addresses have the form 00XX XXXX XXXX XXXX (where X means "don't care"),
all Screen addresses are 010X XXXX XXXX XXXX, and
the Keyboard is 011X XXXX XXXX XXXX.

Ignore bit 15 since Memory's address is only 15 bits wide. Look at bits 14 and 13:
RAM addresses start 0X,
Screen addresses start 10, and
Keyboard address starts 11.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Trouble implementing memory chip

salar
This post was updated on .
Nevermind, figured it out.

Aboslutely did not make the logical jump from decimal/hex representation to binary.