Live data from Hacker News

When teaching computer architecture, why are universities using obscure CPUs?

academia.stackexchange.com

11–20 of 117 posts

Re: When teaching computer architecture, why are universities using obscure CPUs?

#11
IIRC, I learned computer architecture with a mythical 13 instruction set ISA. The class started with the basics of using flip flops to build registers and memory, program counters, etc. We had to demonstrate the state of every register at a given line in assembly. We had to write our own assembly. Then we learned C and how to translate it into assembly. The dots were connected from logic gates to to a high level stack based programming language.

I got a lot of mileage out of that class. The knowledge easily translates to other ISAs I’ve encountered in my career.

Re: When teaching computer architecture, why are universities using obscure CPUs?

#12
The answers don't really go into what I think is the main issue:

An introductory computer architecture course is generally starting from "here is what a transistor is" and hoping to end with "here is how basic computer games work" (e.g., nand2tetris). And has about 40 hours of instruction to do it.

Assembly is but a small part of the course. The ideal assembly language for such a course is one that is simple, something that you can let the interested student figure out how to implement it themselves with just a little bit of prompting. And frankly, most assembly languages aren't up to that task, even if you're willing to pretend that most of the ISA doesn't exist. x86 has issues with things like ModR/M or two-address instructions. ARM has things like r15-is-actually-the-program-counter-and-kinda-special. RISC-V coalesces most of the jump instructions into one or two instructions that is going to complete teaching subroutines in assembly (and also eschews condition codes).

At the end of the day, the stuff you're covering in introductory computer architecture is very far in almost every detail from how modern computers work, and it will take several courses on top of it to actually reach those details. The most important goal of such a course isn't to teach you how they work, it's to give you the information you need to understand the explanations of how they actually work.

Re: When teaching computer architecture, why are universities using obscure CPUs?

#13

Not all of them do --- MIPS was very common once (now probably being replaced by RISC-V), and I've come across recent (<5 years old) lecture slides from Indian universities where they still use the 8086/88, 8051, 8080/8085/Z80, etc.

We use ARM. Because then we can lean on some things (e.g. the ARMlite simulator) UK schools built for A-levels.

Re: When teaching computer architecture, why are universities using obscure CPUs?

#14
One of the reasons why they used Scheme for MIT's 6.001 is because it was an obscure programming language. At the time, some incoming MIT freshmen were likely to have faffed about with computers in high school or before, learning languages such as BASIC or Pascal. Others would have had little to no computer exposure before entering university. Scheme, being a Lisp and having semantics that were quite different from BASIC, Pascal, or any other language such students were likely to encounter, allowed all students to begin on a more or less equal footing because the programming language used for pedagogy would have been equally unfamiliar to all of them.

Obscure CPUs have the same advantage. Plus with careful choice of architecture, or simply inventing your own, you make pedagogy much simpler because the architecture doesn't have all the complicated bits like branch predictors, register windows, speculative execution, etc. that modern CPUs have and you can focus on the basic, "must-have" components.

Re: When teaching computer architecture, why are universities using obscure CPUs?

#15

Because x86/x64 is horribly CISC. I challenge you to list the instructions a current x64 processor runs in a table. You will get so lost in the extensions it does and does not support that you will give up. Because Apple's M chips have not been on the market long enough for us to adjust, nor are there cheap versions we can pick up for our hardware labs. Because phones are not good for teaching computer architecture.…

> If I were teaching computer architecture, I would use an ARM chip in a Raspberry Pi.

If I were, my students' first CPU would be something like a 6502 -- quite possibly God's perfect CPU architecture. Then move on to something more complicated, RISCy, and 32-bit.

Re: When teaching computer architecture, why are universities using obscure CPUs?

#17
My local university used to teach MIPS, and as of some years ago they’ve switched to RISC-V.

The final assignment at the time I took it was to write a program which compiles a subset of ARM machine code into RISC-V machine code, which was a challenging but so rewarding thing for a younger me to cut my teeth on.

It was a surprisingly modern class too. The in-class material was learning about pipelining, instruction/memory latency, and general CPU concepts, while the assignment and lab material was focused on writing RISC-V assembly and implementing more and more complex programs.

Re: When teaching computer architecture, why are universities using obscure CPUs?

#19
IP issues. As I understand it, Harris and Harris changed their textbook from ARM to RISC-V because of IP issues and ARM's lawyers.

The MIPS architecture was also sabotaged by IP issues.

As a result, architecture students are learning how to use and implement RISC-V. Thanks ARM.

Re: When teaching computer architecture, why are universities using obscure CPUs?

#20
post #17

My local university used to teach MIPS, and as of some years ago they’ve switched to RISC-V. The final assignment at the time I took it was to write a program which compiles a subset of ARM machine code into RISC-V machine code, which was a challenging but so rewarding thing for a younger me to cut my teeth on. It was a surprisingly modern class too. The in-class material was learning about pipelining, instruction/me…

In my best dad voice... Son Im going to need to check your home work.

This sounds like fun little project to learn risk v with. It's on my to do list with a million other things.

Post reply on HN