Frustrating to address individual bits

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

Frustrating to address individual bits

Jonathan Katz
Unless I am missing something, there seems to be no "clean and easy" way to access the high-order bits of 'address' when building the Memory chip. I ended up doing a hack to get it to work, but I wonder what was intended.

I am not going to suggest that you re-design HDL to allow bit-addressing. A simple fix would be to have students build a "split" chip in one of the earlier chapters that simply sets out=in, but thereby allows addressing individual bits on the output bus.
Reply | Threaded
Open this post in threaded view
|

Re: Frustrating to address individual bits

Warren Toomey
I just checked my version of Memory.hdl. I've got things like:

   IN  ...... address[15];

   SomeChip(..... .... ..., address=address[0..13], .....);

Not sure if this helps you in any way.

Also, this reminds me that I asked Noam and Shimon this question:

  In Memory.hdl, project 05, it says: Access to address>0x6000 is invalid.
  However, the Memory chip does not output a valid/invalid bit, so it cannot
  indicate if an access has been invalid. I understand the sentiment here, but
  perhaps it would be wise to also state that Memory.hdl can output any bit
  pattern on out[16] for invalid input addresses.

Noam wrote back: Our convention in the book was to never to specify what
happens on invalid input.

What it means is that you are free to wire up the Memory chip to do whatever
you want for adresses above 0x6000. This freedom can help to make the design
of the Memory chip somewhat easier.
Reply | Threaded
Open this post in threaded view
|

Re: Frustrating to address individual bits

Jonathan Katz
You are right; I must have misread Section A.5.3 when it talks about addressing individual bits. (For what it's worth, that is one section of the book that could use a re-write for clarity.)

My apologies to N&S!