Fri, 25 Nov 2011, 01:26
Now that the 4th program is done and there is a lull before the final charge, some students find it useful to try to satisfy curiosity. > Dr. Patt, > > I've been curious about the location of the KBSR and KBDR since we were > first introduced to them. I've asked a couple TAs this question, but > wasn't able to get an answer. I've been waiting for a good break in > the course to ask, rather than mix this with the mass amounts of email > I'm sure you get during programming assignments and leading up to tests. They can be anywhere the designers want them to be. One such place for the KBSR and KBDR could be on a card that is located in the same cabinet with the cpu, memory chips, etc. > My understanding is that we require a total of 10 bits to acquire data > from the keyboard. 1 for the status, 1 for interrupt control, and 8 for > the hex value of the input character. When I asked the question, > we hadn't discussed interrupts leaving only 9 bits. Either way, each > register contains 16 bits. Unless I'm missing some of the picture, > we could utilize one register to handle the process. Sure, provided we knew that 10 bits is what we need in all cases. Even if the KBSR only needs bits[15:14], what about other device status registers. Is it possible that some may need all 16 bits? Answer:Yes. Thus would it be better to allocate 16 bits/each, and not have to worry about the details of each, or better to conserve and only allocate the number of bits required by each device register. Since the specification does not cost you anything (i.e., if you need just bits[15:14], you design the circuits with only two flipflops, even though the specification specifies 16. If not clear, you are welcome to ask about it during the free for all on Wednesday. > As the LC3 stands, > we essentially use 4, leaving the register after both the KBSR and KBDR > out of discussion in class. Is there an architectural reason to have > the register following each unused? Or, was that simply a choice made that > could have just as easily been made to utilize FE00 and FE01 instead? > > Thanks in advance, > <<name withheld to protect one who has been curious about KBSR for awhile>> Good scrutiny of the assignment of addresses to device registers. I could have used successive addresses. The reason I did not do that has nothing to do with EE 306. BUT, since you asked: As I mentioned in class, unlike the LC-3 and its 16 bit addressability of memory, most memory is byte addressable (8 bits). I decided on 16 bits because it makes life easier in certain ways in EE 306. However I knew that I was going to extend the LC-3 to an ISA that specifies memory addressability as 8 bits, for later courses, and wanted to prepare for that. If you take 460N, you will study the LC-3b, where the b stands for 8 bit (one byte) addressability. With the LC-3b, xFFE0 and xFFE1 for one device register, xFFE2 and xFFE3 another. I wanted be able to use addresses xFFE0 and xFFE2 for the keyboard device registers in the LC-3b also, and the best way (I felt) to do that was to leave xFFE1, xFFE3, etc. unassigned. Does that help? Enjoy the rest of your long weekend. To the rest of you, none of the above will be on the final exam. Yale Patt