RAM8 implementation trouble

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

RAM8 implementation trouble

Dallas
I am having trouble implementing the RAM8 chip.  I get a comparison failure while running the test script.  I am pretty sure I understand the basic concept of the RAM: the input and address are connected to an 8-way DMux, the outputs from the DMux along with the load value are connected to an array of eight Registers, the outputs from the Registers are connected to an 8-way Mux which determines the final output.

I think my problem might be with my implementation of the DMux8Way chip.  Since this is a single bit input chip and the RAM8 is a 16-bit input, I can't just connect the RAM8 input to the DMux8Way input (to confirm my assumption I tried to do this and received an error that the bus lengths were of unequal lengths).  What I determined from this information is that I need to have sixteen DMux8Way chips in the circuit, each one connected to a single bit from the RAM8 input.  By doing this I end up with 8x16=128 internal pins that I can then connect to the inputs of the eight Register chips.

My first question is a practical one: am I heading down the correct path by implementing sixteen individual DMux8Way chips?  My second question is more hypothetical: if sixteen DMux8Way chips are necessary for this circuit, why didn't we just build a 16-bit DMux8Way chip back in chapter 1?  I specifically remember the text said we wouldn't need a 16-bit DMux8Way chip, but it seems like the RAM8 implementation would be much easier with it.

Any help would be appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: RAM8 implementation trouble

Justin Singer
There's a simpler to approach this problem: the DMux doesn't care at all about the value being loaded into RAM; it's only purpose is to decide which Register gets the value, using the address. Remember that a Register ignores its input if its load flag isn't set.
Reply | Threaded
Open this post in threaded view
|

Re: RAM8 implementation trouble

ybakos
This post was updated on .
In reply to this post by Dallas
@Dallas: here's a tip. Route the load bit with the DMux, not the input.
Reply | Threaded
Open this post in threaded view
|

Re: RAM8 implementation trouble

Dallas
In reply to this post by Dallas
Ah, thanks guys.  Those tips helped brilliantly.  I just needed to see the problem a little differently.