This is my Memory Chip and I can't see anything wrong with it. However, the Hardware Stimulator is refusing to run it and when I submit it into the grader output, I am told that I have an 'unspecified sub-bus'. I really need some help - the hardware stimulator also refuses to run anything with RAM16K and Screen, is it because I've made some mistake in the code?
whoa... I think you need to review the Project 5 slides and book pdf's. The CPU chip was the most difficult for me, and this Memory chip was, I think, the second hardest to get my head around. (and it probably helps to do the CPU first, if you haven't already)
I tried to diagram what you've implemented, and I can't tell what its trying to do. (and when you say "works", for your smaller Chip, Copy -- what exactly do you mean by "works"? In what way does it work?)
To start with, let's looks at slide 5 (or 18)...
Notice that the Memory chip has information flowing both to and from the bus(es). That's what the "load" bit is for, to control when to read and when to write. Now see slide 22-25 (will probably make more sense with the video).
Now, let's look at Dia 5.6 on p17 in the book...
Notice the address space is divided into sections
0-16,383 -- addresses the 16K RAM
16,384-24,575 -- addresses the screen
24576 -- addresses the keyboard
It also shows those same values as Hex:
0x0000-0x5FFF: accessing an address in this range results in accessing the RAM.
0x4000-0x5FFF: accessing an address in this range results in accessing the Screen.
0x6000: accessing this address results in accessing the Keyboard. (anything above in invalid)
But I actually find it easier to view these values in binary: