Tue, 8 Sep 2020, 17:47


A student writes:

> Dr. Patt, > > Hi Dr. Patt, I hope you had a great Labor Day weekend.

Absolutely, a great Labor Day weekend stuck in my apartment embracing social distancing. :-) But, hopefully, that too will end and we can get back to living. But, I digress..,

> I have a question about Semantic Gaps. > > From my understanding, there is a compilation process to convert High Level > Languages into the ISA, and from there Decode Cycles which then turn that > into Control Signals which the microarchitecture can understand.

Your understanding is correct.

> My question is, which gap is considered to be the Semantic Gap? Does a low > semantic gap entail an ISA which aligns closer to the HLL, or CTL? There > was some confusion during discussion.

I am sorry there was confusion. The semantic gap was defined to reflect how close the ISA was to the high level language constructs. So a small semantic gap is the case when the high level construct is reflected in one or a very few instructions in the ISA. For example, an ISA that has a AOBLEQ instsruction (add one and branch if less than or equal) maps very closely to a "for loop." Ergo, a small semantic gap.

> Finally, are these two options related to CISC and RISC at all?

Yes. When the terms first appeared in the early 1980s, the RISC concept was very clearly that high level constructs were compiled into lots of very simple ISA instructions, each of which required very little logic to produce the necessary control signals. A large semantic gap because the instructions in the ISA were not at all related to high level language constructs. ...which is why the compiler needs to produce lots of ISA instructions to describe the requirements of one high level construct. On the other hand, a CISC (like the VAX or x86 at that time) had instructions that were very close to the high level construct, making the compiler job easier, but requiring the hardware to do the heavy lifting to produce the sequence of control signals that control the data path. I was teaching at Berkeley at the time, and had a junior colleague named Mike Powell. He came up with a brilliant (in my view) interpretation of RISC -- Relegate the Interesting Stuff to the Compiler.

> Thank you so much for your time. I hope these questions are relevant. > > Sincerely, > << name withheld to protect the student caught in the semantic gap >>

My pleasure. Good luck with the rest of the course. Yale Patt