10 ms·
When teaching computer architecture, why are universities using obscure CPUs?
- userbinator 3y agoNot 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.
- sheepybloke 3y agoMy university did that switch over in '18. The course originally taught MIPS but shifted to RISC-V, partially though because the book that they taught from was updated from MIPS to RISC-V. I really appreciated the switch, especially as RISC-V becomes more and more relevant.
- wbillingsley 3y agoWe use ARM. Because then we can lean on some things (e.g. the ARMlite simulator) UK schools built for A-levels.
- don-code 3y agoMuch as I also have never understood universities teaching to "teaching" architectures (DLX), or "teaching" languages (Eiffel - luckily removed from our curriculum before I started), at the same time I did not land a job based on having learned "practical" architectures 68k or MIPS either.
- glitchc 3y agoHey I learned Eiffel. It's a nice language. I wish we had pre-conditions and post-conditions in modern procedural language.
- JohnBooty 3y agoA lot of my compsci education was in Pascal, which was not exactly a real-world language (though I guess Delphi had a dedicated niche for many years) 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.
- DerekL 3y agoIn the 1970's and '80's, Pascal actually was commonly used for real work.
- tcherasaro 3y agoI had undergraduate and graduate courses that studied x86 at 2 different universities.
- tekla 3y agoThe goal of Uni is to learn the basics and build upon them. Thats why.
- kristopolous 3y agoBecause you've only got like 12 weeks and the students are 19. Gotta choose wisely
- RecycledEle 3y agoBecause 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. 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.
- bitwize 3y ago> 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.
- RecycledEle 3y agoI can not disagree.
- glitchc 3y agoModern CPUs are too complicated to teach in a semester. Plus, the course is meant to teach how a CPU works at a conceptual level, not train students for x86 assembly programming.
- throwaway2016a 3y agoI had an "Assembly" course in my undergrad that taught x86, we managed in in semester. But it was a separate class from Architecture (and had Architecture I as a pre-requisite). Granted it didn't get into the hyper-optimized / specialized instructions.
- thedougd 3y agoIIRC, 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.
- tdeck 3y agoThat was basically what we did at my school. I have fond memories of writing an assembler in Perl to do the machine code assignment so I wouldn't have to calculate the jumps by hand https://www.arl.wustl.edu/~jon.turner/cse/260/lec/washu2-1.pdf https://www.arl.wustl.edu/~jon.turner/cse/260/lec/washu2-1.p...
- jcranmer 3y agoThe 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.
- bitwize 3y agoOne 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.
- fsmv 3y agoYou can teach 8086 assembly which is still compatible with modern x86 and it only has like 20 instructions. It's lots of fun I made a whole bootable text editor an assembler and an almost finished lisp interpreter too.
- cgh 3y agoYeah we learned x86 assembly at my school too. We had to make a “database” (basically a flat file), complete with a text-based ui.
- vanviegen 3y agoYeah, though the concept of segmented memory access can be confusing and so far hasn't been very useful this century. :-)
- mr_toad 3y ago64kb is a lot when you’re hand coding assembly. You just assemble to a .com file and pretend segments don’t exist.
- vanviegen 3y agoSure, but one of the fun things you'll want to do from assembler is put pixels or characters on the screen. They're memory mapped outside of segment 0, so you'll need to work with segments to do that.
- gizmo686 3y agoI think Linux uses it to implement thread-local storage.
- moonchild 3y agoNo, not really. A couple of features of the architecture and instruction encoding which were historically used for segmentation remain on amd64, and these features are used to implement thread-local storage on every mainstream os targeting the arch, but amd64 is not a segmented architecture in any meaningful sense.
- aeldidi 3y agoMy 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.
- zer00eyz 3y agoIn 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.
- gentleman11 3y agoMIPS is great. You can learn it in great depth and fully understand the whole microprocessor while compacting it into a single class. You can make your own adder and multiplier with logic gates. It’s a scope that you can actually master
- musicale 3y agoI agree. It's a shame that MIPS is mostly dead at this point. (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.
- phire 3y agoRISC-V has slightly more complicated instruction formats, but is otherwise feels a lot like a cleaned up and simplified MIPS. 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.
- 2f0ja 3y agomano machine :)
- floren 3y agoYou haven't lived until you've done the Tomasulo algorithm on paper for a quiz.
- musicale 3y agoIP 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.
- wyldfire 3y agoReally?! You'd think ARM would do backflips to get the curriculum to include their architecture.
- musicale 3y agoThey seem to be improving and do have an "ARM Education Core", but RISC-V has academic momentum at this point.
- Dr4kn 3y agoIt's amazing how a lot of companies just forget how they got so big. If people can learn for cheap or at least very cheaply with your stuff, then they are going to use it when making money. 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.
- cogwheel 3y agoDevelopers developers developers developers
- oalae5niMiel7qu 3y agoThis is also how Linux became the server OS of choice for most companies, while Windows NT remained a niche product only found at a certain kind of company. And before that, easy availability of UNIX to students made it the default OS of any high-end computer throughout the 1980s and well into the 1990s.
- musicale 3y agoPersonally I like Niklaus Wirth's minimal RISC-5 (not to be confused with RISC-V). Wirth's systems were simple enough to understand from top to bottom, and RISC-5 was easy to emulate in software or on an FPGA (I also like Wirth's LoLa language.) https://people.inf.ethz.ch/wirth/ProjectOberon/RISC5.Update.pdf https://people.inf.ethz.ch/wirth/ProjectOberon/RISC5.Update....
- dehrmann 3y agoWe used Sparc, PowerPC, and 68HC12 (or something in that family). They weren't x86, but they weren't obscure, either. What they all have in common is they instruction sets are small enough to be manageable.
- jonhohle 3y agoWe used 68HC11 for our operating system course and had to write a simple multitasking OS that ran on real hardware. I got to use that OS the next semester to run on a car that needed to follow a track, avoid collisions, and a few other things. Being a microcontroller you got a bunch of things that today need full development boards right on the chip (ADC, RAM, etc).
- KingOfCoders 3y agoOT Does anyone know a nice TTL computer with leds to register content that I can buy soldered?
- musicale 3y agoNot what you're looking for I know, but I am reminded of: https://monster6502.com https://monster6502.com And: http://visual6502.org/JSSim/index.html 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 https://www.homebrewcpuring.org/ringhome.html
- KingOfCoders 3y agoWould love a monsterz80.com :-)
- jacknews 3y agoWhen you first learn to fly to be a commercial pilot, why do you start flying silly single-engine cessnas or whatever, wny not hop straight into a 747 cockpit?
- dboreham 3y agoUniversities always teach weird stuff. Part of the tradition.
- rdtsc 3y agoBecause my professor hated the x86 architecture. At least I appreciated the honesty. 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. [1] https://en.wikipedia.org/wiki/Itanium https://en.wikipedia.org/wiki/Itanium
- inkyoto 3y agox86 should be taught as a follow-up course in the following semester as an example of how not to design a CPU architecture, specifically from the long term evolution perspective. 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.
- anonymoushn 3y agoSVE didn't standardize a shuffle usable for processing strings without specializing your code to a specific vector width until October 2022, so it seems a bit unreasonable to expect Intel to have had it in 1997.
- inkyoto 3y agoShuffle is different, it is not a foundational SIMD instruction, it is actually a good example of an extension that can be added later as an add-on that does not require a complete code rewrite. 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.
- mjsir911 3y agoThe culmination of my commmunity college's CS103 class was learning the ins and outs of an ISA called MARIE. only 8 instructions & an editor+simulator written as a java app. 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!
- diebeforei485 3y agoSome architectures are better for pedagogy (learning) while still covering the important concepts. RISC-V or MIPS fit this well. RISC-V is also not patent encumbered so anyone can freely use it. 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.
- xorvoid 3y agoI agree that x86 is a terrible choice, but I think there might be middle-ground found in a simplified RISC-V or ARM.
- snvzz 3y agoRISC-V is definitely simpler than the MIPS I studied back in university. At just 40 instructions, it is well-suited for education.
- Ekaros 3y agoI think in my days one part of course was some imaginary set and one actual course was MIPS. 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.
- jumploops 3y agoLess optimizations, simpler instruction sets, easier to implement. 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?
- DeathArrow 3y agoBut aren't there real architectures that are simple enough? Z80, MOS 6502, Pic, AVR?
- jumploops 3y agoReal hardware handles real trade-offs. For example, there are hundreds of instructions in Z80 to support various quirks of the implementation (like the duplicate register file). 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.
- kelseyfrog 3y agoAnd at the end of the day, students should be trained to teach themselves (including things like Git, and Unix). 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?
- woopsn 3y agoI do remember in my computer architecture class being a little disappointed we only studied educational ISAs, and ran them through emulation rather than "on the metal". Then in my first engineering job after college, I ended up programming mainly the TSK3000A soft processor, for about a year. Then ARM, some other more weird systems, and finally moved up to module/driver development on the server side. Back on x64, in kernel space no less -- but that was the one instruction set in the whole stack I never had to deal with.
- FuckButtons 3y agoBecause x86-64 is a convoluted mess of optimizations, vestigial instructions and crazy microcode shenanigans that’s evolved the last half century?
- Almondsetat 3y agoMany universities use LEGv8 to teach computer architectures, which is a more didactic version of the ARMv8 ISA. 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. [0] https://github.com/simdeistud/LEGv8-Simulator https://github.com/simdeistud/LEGv8-Simulator
- Pet_Ant 3y agoI do find this exciting about RISC-V is that we might have something that is both simple and teachable, and with enough extensions usable. I first learned to program on an obscure Pascal-derivative language, but now you can start with Python, Java, or even C which are both teachable and usable. So it'd be nice if we could teach architecture with something that served as on ramp to marketable skills.
- DeathArrow 3y agoEven Knuth uses the MIX assembly language for his hypothetical MIX CPU in The Art of Computer Programming, and those series of books are higher level than Compute Architecture courses.
- bombcar 3y agoThose books are also older and have outlasted many CPU architectures.
- x86x87 3y agoSimplicity. A real CPU is way more complicated than the toy cpus used.
- rukuu001 3y agoWe used an on-paper PDP-11 :/
- simonbarker87 3y agoUniversities aren’t corporate training grounds. 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.
- onethought 3y ago> Universities aren’t corporate training grounds. So the ridiculous fees that correlate to average wages of the profession you graduate into is just a weird coincidence?
- wjnc 3y agoRent seeking causes that correlation (so there is actually a causal relationship): Some professions require certain university degrees. They pay high wages. Universities found out they can extract a rent on future earnings of potential entrants. So you could actually argue that by requiring the degree the firms not only create the rent extraction, but also de facto agree on the curriculum.
- onethought 3y agoSo universities (in some quite common scenarios) ARE corporate training grounds?
- wjnc 3y agoThat's pretty universal (worldwide) I guess? White collar corporate staff that is predominantly unversity educated. That still doesn't mean the curriculum is or should be corporation directed or focused. I know little about this, but India and South-Korea come to mind where there might be more direct links. UK as perhaps a counterpoint where you can find corporate role with an Oxbridge arts degree, or France.
- GarvielLoken 3y agoThere are no fees for University. 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?
- Divver 3y agoHmm at Berkeley 10-14 years ago during undergrad we used MIPS in both our computer architecture class and compilers class and I wouldn’t call it obscure. Uncommon yes but not obscure. 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.
- ffgjgf1 3y agoIsn’t the RISC vs CISC distinction a but blurry these days with both ARM and x86 adopting a lot of stuff from the other side?
- creshal 3y agoIt's been blurry for over 20 years at this point. ARM has had "cisc-y" complex instructions for almost as long as x86 has been splitting instructions into "risk-y" micro ops.
- Gibbon1 3y agoI think that distinction only makes sense when the hardware executes instructions directly. Like a microcode processor or one that uses jungle logic. But when you decompose optimize and cache the instruction steam on the fly, there is little meaningful difference. Offhand comments from friends more involved in that lead me to think that architecture caught academics flat footed.
- astrange 3y agoCISC/RISC is not a useful distinction and I wouldn't call ARMv8 (at least the 64-bit kind) especially RISC.
- kalleboo 3y agoReminds me of the COMP-X machine and CAP-X assembly language that was invented for Japanese IT exams. 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-tandy-pocket.html http://oldvcr.blogspot.com/2024/02/cap-x-and-comp-x-how-tand...
- bionsystem 3y agoI learned with the 68000 which not only was still a bit relevant and an "industry" chip, it was also simple enough to understand in a few hours assembly courses. 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).
- eviks 3y agoBecause universities are pretty conservative institutions which are to a large extent detached from reality, so there's no incentive for them to improve for such issues
- constantcrying 3y agoThe point is understanding the concepts and ideas behind different architectures. There is little actual value in understanding the depth of x86 and no introductory course will even try to.
- asjo 3y agoIn my day we made (some parts of) a kernel on Motorola 68000-boxes - they were quite main stream at the time.
- stusmall 3y agoIf my college degree was focused only on technologies that were popular at the time, it would be worth significantly less today. Instead it focused on the concepts and theory that are timeless. When picking an architecture to teach on the goal is to get the best one to give the quickest and firmest understanding of these concepts. With that the right answer is more likely to be something obscure, outdated or even fictional. 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.
- jcarrano 3y agoWe started out with the Motorola HC11, I'm guessing because someone used it a lot on the past and no one wants to redo all the course material. We used a simulator called "Wookie". 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.
- throwaway2016a 3y agoAnecdotally, in my architecture class (granted a decade and a half ago) we had to implement a 4-bit microcontroller from scratch. Using an actual bread board, wires, and primitive chips. We implemented those instructions from scratch given binary input switches and a manual clock. It was a simple instruction set (just ADD, SUB, STORE, RETRIEVE, SHIFT, that sort of thing) but we had to learn everything in depth. 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?