When teaching computer architecture, why are universities using obscure CPUs?
academia.stackexchange.com
academia.stackexchange.com
LEGv8 was developed as part of the semi-standard textbook in Computer architectures which is the David Patterson's one.
The problem of course is that this ISA is completely fictional and code written for it cannot be ran anywhere.
Fortunately ARM themselves have developed and made available a web-based simulator of the LEGv8 ISA.
Unfortunately the project is basically abandoned, has critical bugs that impede even the simplest of operations and nobody knows how to develop on it.
That is why for my bachelor's thesis I managed to get it up and running again and added the necessary functionalities to make it the first simulator to run every instruction of the LEGv8 ISA [0].
I am trying to get it merged with the official one so that students and teachers can easily find it and finally use it in their courses, so if any of you uses that textbook in your teaching or you can pull a few internal strings at ARM maybe this could interest you.
I got a lot of mileage out of that class. The knowledge easily translates to other ISAs I’ve encountered in my career.
https://www.arl.wustl.edu/~jon.turner/cse/260/lec/washu2-1.p...
The job here is to teach you the concepts involved in CPU architecture and using the most general purpose architectures possible that have been developed over millions of person hours to cover every task possible would be a very inefficient way to do this.
So the ridiculous fees that correlate to average wages of the profession you graduate into is just a weird coincidence?
See how fun it is when you assume how it is in your country is the same in all the other countries in the world?
So in your country where the government pays the fees (I’m going to assume that is what you mean by “no fees” as I imagine academics are paid in this country), they do so because they care so much about the wellbeing of academia… or do you think the higher income graduates earn plays a role in increased taxation? Or do you live in a country without income tax?
Funny how people want to attack what you say, rather than refute your actual point: Universities (today) are corporate training grounds.
Is there a prestigious university that corporates do not value degrees from highly?
I agree that University courses shouldn't purely be vocational training; there's value to personal growth and pure academia that doesn't have a 1-1 overlap with the corporate world.
That said I certainly appreciate that my time at University has been largely applicable at work. Doing both where possible is likely a valuable goal.
Arguably these legal systems are the conceptual basis for our modern law system because they are used pedagogically in this way.
"New" governments had a habit of writing up founding documents that focus on the "new stuff" and waving in "all the old stuff" that doesn' conflict with the "new stuff" via a few throwaway phrasings.
I have worked as a programmer for years and at work have had absolutely zero times I have needed to know x86-64 commands like ADD, JMP, MOV etc.
Actually it is good I learned about other processors since once on a personal project, I compiled C code but it ran different on little endian and big endian chips. If I hadn't learned about other architectures I would have been more perplexed.
As someone else said, law schools teach about Roman law and other forms of law not immediately vocationally valuable. Also - I learned something about non-standard computer architecture as an undergrad, and many people go on to become programmers with a BSCS, lawyers typically go on to get a JD after doing undergrad.
I'm sorry, I thought we were talking about computer architecture?
Barring concerted effort, a U.S. law student will not leave school with detailed knowledge of any particular jurisdiction.
Then graduates take the bar, where they are more or less quizzed on 18th century English common law, because most states use a bar exam that is not specific to each state’s law.
Oh c'mon. By the reverse stupid logic corporations aren't educational centers to train newbies on x86 either.
General/abstract is fine and one day one time some how some way make contact with practical too.
Avoiding dumb extremes might be why MIT has a good reputation in stem. It's practical built on solid (often abstract) fundamentals
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.
Restricting teaching with it or charging students the high corporate fees are just going to backfire in the long run. People will learn with whatever is cheap or free .
Davinci Resolve is getting more popular, because it's "free" and Adobe is a buggy piece of shit. Blender got popular, because learning at home, with any other software was way too expensive.
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.
Going from transistors to C is like petrol to driving.
Do you want to learn how a car works by building some 2024 safety and tech enabled car?
Or would you rather start with something that resembles a 60s Beetle but with even less bells and whistles?
Sometimes less is more, and it can be freeing to know that your code compiles to a CPU with just a dozen or so instructions.
It’s the same reason most universities don’t teach git, UNIX, and other industry tools. Sometimes computer science is best seen in its purest form. Same with computer engineering.
I'm curious if GP (or anyone else) has been in the position of hiring entry level and finding someone who they felt didn't work out because the new hire was incapable of learning tools. Or the new hire eventually taught themselves?
I had a lot of fun spending most of my time in that class writing an entire development stack for that architecture: assembler, simulator, debugger, and eventually a very barebones forth!
It was invented so that nobody taking the test would be at an advantage or disadvantage depending on platforms they had experience with, so the exams could just test pure understanding of the concepts.
But standardized exams being what they are, so many people started studied this specific ISA that eventually it made its way all the way to the US in the form of a few Tandy pocket computers sold at Radio Shack.
Exhaustive article about the history and the ISA here: http://oldvcr.blogspot.com/2024/02/cap-x-and-comp-x-how-tand...
We looked at some popular RISC and CISC architectures, even looked at Itanium [1] as it was the hot new thing at the time. The professor didn't necessarily hate Intel, just the x86 architecture.
It would have been fine if x86 ceased to exist after 80486 or 80586, yet it has persevered and has continued to cause trouble with an incessant stream of extensions supplanting the previous generations, or expanding or «enhancing» them: MMX, then SSE (plus a further extension to the extension courtesy of amd64), SSE2, SSE3, SSSE3, then AVX, AVX2 and AVX512, and now AVX10 that is an overhaul of all previous extensions.
With a little bit of the design thinking and future proofing in mind, that hairy abominable mess could have been replaced with a single, scalable vector extension that would have not required a complete code rewrite over the next 30 years. Yet, MBA's over at Intel continued to milk the already ailing cow.
Whereas each of the MMX, SSE and AVX extensions was effectively a new instruction set, AND each had its own register set – 64, 128, 256 and 512 bit registers. Later generations (i.e. AVX2 and AVX-512) are better thought out, but, e.g. MMX – I do not think anyone uses it today, yet it is present in the silicon as the dead space.
Prior art existed long before – Cray had vector instructions first, so it is not like Intel had to invent them from scratch.
It is still a common belief Intel created the Itanium to fool the proprietary unix vendors into thinking they can stop developing their own RISC CPU, but as soon as it happened, Intel gave up on Itanium as well. Solaris lasted a little bit longer only because Sun gave up early on Itanium.
Contrariwise, although I think some of amd's choices in the initial design of amd64 have hurt its longevity—they could have made more breaks from 32-bit x86, although it is understandable why they didn't at the time—intel has been very careful and has done an extremely good job of playing the hand it's been dealt.
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.
This sounds like fun little project to learn risk v with. It's on my to do list with a million other things.
(And a moment of silence for SPARC and OpenSPARC T1/T2 in particular - full 64-bit CPUs that were used in production.)
However, RISC-V shares most of the implementation benefits of MIPS, is unencumbered by IP issues, and seems to be steadily improving in terms of software and hardware support.
The fact that you can easily see MIPS's 16 bit and (most of) 26 bit immediates in a hex editor is one low-key advantage (for teaching) that MIPS has over RISC-V.
But overall RISC-V is a much better teaching ISA. One great thing about is that there is a core version of the RISC-V spec that only has 47 instructions and essentially nothing else. There is no Memory Paging or Privileged Supervisor mode, and you can skip implementing proper exceptions to make the design even simpler.
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.
While I have seen many claims that the 8086 has more than 20 thousand instructions that is very silly. By the same criteria any RISC with fixed 32 bit instructions would have 4 billion of them.
I actually think this was probably better than learning with real-world languages?
I believe it taught me to be a computer programmer. Not a Java guy or a C guy or a whatever guy. I think that was super valuable.
For assembly language we learned VAX assembly, which was already hilariously outdated, but again very valuable. It had a very beginner friendly instruction set, much more friendly than x86 which would have been the other realistic choice at the time.
Despite being somewhat obscure, it has the advantage that it is easy to understand while also being real. We had a board where you could hook into the address and data busses, since the memory and busses were external. Also, it has a simple bus, as opposed to an ARM chip with AHB, APB, etc, and no pipelining.
The CPU arch course was with a different teacher and on a made up CPU though. It wasn't even a full CPU we were just learning modules and what they do. Kind of a more advanced (and less palatable) version of the book "but how do it know" (which btw is a great read for the neophyte like me).
Still, picking something simple makes lot of sense as pedagogical tool. x86 is outright mess and ARM is probably going to that direction on long term as well. So something more locked down and fully explainable is the better choice. If students want to do assembly they then can pick what they need.
The times I've had to write assembly in industry, it has only once been on a mainstream, modern ISA. More often than it is on something that would have never been taught in university (MSP430, PIC18 or other microcontrollers). The theory and concepts I learned in college made those easier to pick up.
It had a RISC (Reduced Instruction Set Computer) ISA (Instruction Set Architecture) which at the time was considered academic but not popular in real world computers since CISC (Complex Instruction Set Computer) ISA like amd64 was all the rage but since Apple Silicon and its RISC-based (ARM) architecture that notion has been turned on its head. And the upcoming Qualcomm ARM laptop chip is also following the trend on high performing RISC architecture chips.
The ARM comeback has made RISC popular again for uses beyond mobile phones and academia.
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. We want something with a large screen and keyboard.
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.
Some platforms are not great pedagogically, but are taught because they are used in industry, like x86.
ARM manages to be ok at both.
I don't see a point in learning with other architectures.
Being a microcontroller you got a bunch of things that today need full development boards right on the chip (ADC, RAM, etc).
https://people.inf.ethz.ch/wirth/ProjectOberon/RISC5.Update....
At just 40 instructions, it is well-suited for education.
And: http://visual6502.org/JSSim/index.html
(HN law mandates at least one 6502 post per week. Preferably more.)
And lest we forget (not 6502, not commercial, but some TTL): https://www.homebrewcpuring.org/ringhome.html
I feel in addition to other valid comments like IP, smaller scope, etc. the simpler instruction set may have something to do with how the newer instruction sets hold your hand a lot. I always thought the point of architecture was to have to learn how things like half-adders, shift registers, and all those work and if the instruction set does it all for you, what's the point?