Sun, 5 Dec 2021, 21:30 Re: Questions
A student found an error in the textbook. Although I will not be testing you on it on the final exam, I want you to have the correct information. Therefore I am sharing his email and my response with all of you. A student writes: > Professor, > > I had the following questions with the LC-3: > > I know that ALU stands for Arithmetic and Logic Unit. I was wondering > however what the 'K' stands for in ALUK. The K stands for Kontrol. You say "control" is spelled with a "C." That is true, but computer designers have been using K instead of C since long before I came along, so I thought I would honor that designation. > I know that bit 15 of the MCR is the RUN latch. But other than this does > the MCR have any other use? Yes, the other bits of the MCR are available for other purposes that the operating system and hardware can take advantage of. But those purposes are well beyond EE306. > I also had a question with Figure C.6 c (the ACV logic on page 709). ACV > should be one if PSR[15] == 1 AND Ive put a privileged address on the bus. > Now consider that I feed x3000 in the ACV logic circuit shown on page 709 > and I'm running with user privilege. Clearly bit 15 and bit 14 are 0s and > hence the OR gate will output 1. Since PSR[15] = 1 then a value of 1 will > be stored in ACV. However x3000 is not a privileged address. Hence I can > get an ACV even though my address is in user space. Wow! I am embarrassed. Yes, x3000 should not cause an ACV violation if the process is running with user privilege (PSR[15]=1). The logic in Figure C.6(d) is flawed. The AND gate that has inputs NOT(BUS[15]) and NOT(BUS[14]) should be replaced by two 3-input AND gates, whose outputs are input to a 2-input OR gate. The inputs to one of the 3-input AND gates are NOT(BUS[15]), NOT(BUS[14]), and NOT(BUS[13]). The inputs to the other 3-input AND gate are NOT(BUS[15]), NOT(BUS[14]), and NOT(BUS[12]). > Thank You. > > Yours sincerely, > <<name withheld to protect the student who gets my sincere thank you>> Thank you. Yale Patt