8 ms·
The final for Computer Architeture had us building an 8-bit CPU. It was a multiweek project, starting with designing the instruction set leading up to building
by balls187 7y ago
The final for Computer Architeture had us building an 8-bit CPU. It was a multiweek project, starting with
designing the instruction set leading up to building the CPU in software implementing bubble sort in assembly.
The first and only time I had to do an all nighter (2 actually) in college was due to that project. Two days before the final presentation, the CPU didn't work. After a few clock cycles the memory would contain garbage. I ended up rebuilding it from scratch debugging every step of the way only to find out the 1-bit mux (a primitive supplied with the software) was wired backwards.
0 corresponded to the B input, and 1 selected the A input.
Once I correct that, the CPU worked like a charm, we nailed the final preso, and I slept for 16 hours.
- cobookman 7y agoHad to do the same assignment. I highly recommend doing it. Was the most painful thing I ever did in college, but it taught me so much about how processors work, and how to code in C.
- _han 7y agoIs there a public resource somewhere that describes the assignment/gives some guidelines? I would like to give it a try.
- cweagans 7y agohttps://www.nand2tetris.org/ https://www.nand2tetris.org/ goes through the same process. Highly recommend!
- BanazirGalbasi 7y agoThe game MHRD (MicroHard) offers the same content, but in an interactive environment. I haven't gone much into it yet so I don't know how the end content compares to Nand2Tetris, but a lot of people say they're different methods of teaching almost identical content.
- mtreis86 7y agoIt is very similar in terms of the logic puzzles you need to solve, but the format and tests are different.
- jlangemeier 7y agoIntroduction to Logic Circuits and Logic Design with VHDL: (ISBN: 3319341944) I'm sure each person here is talking about a slightly different assignment, course, and book; but for me (from an EE side of the coin) the person that wrote this book taught our 2 semester course series that starts with basic logic, moves into the circuitry, and then into modeling the entire computer architecture in VHDL on a reasonably inexpensive FPGA (the Altera dev boards are about $100-$200). The book follows that 2 semester series to a tee, and uses the guy's same in course narrative style (minus smacking the whiteboard @ 8 in the morning and us getting yelled at by the french teacher next door). The writer has won multiple teaching awards from IEEE, and is a real gift to the EE community - as you can tell I have 0 complaints.
- fwip 7y agoAnd if you want to learn the next level down, how computer chips work, read Introduction to VLSI Systems, by Conway and Mead.
- jlangemeier 7y agoThat was the next semester - and further down the rabbit hole after that - if you can find a university with a clean room; is actual microchip design, even getting a PNP transistor built from silicon is a damned miracle - out of a class of 15, only 5 of us got one fully working to spec.
- balls187 7y agoWhats kind of cool (to me anyway) is the now FPGA based game machines are making a comeback. Being able to in software define the exact hardware specificaations of older consoles is pretty cool. Where as previously using general purpose RISC or CISC CPUs and have everything emulated as a software application.
- cobookman 7y agoLooks like a student published his code from the labs: https://github.com/erafalovsky/ECE3056-Computer-Architecture- https://github.com/erafalovsky/ECE3056-Computer-Architecture... Course is ECE3056: https://ece3056-sy.ece.gatech.edu/ https://ece3056-sy.ece.gatech.edu/
- nwallin 7y agoI highly recommend Ben Eater's youtube series. https://www.youtube.com/watch?v=HyznrdDSSGM&list=PLowKtXNTBypGqImE405J2565dvjafglHU https://www.youtube.com/watch?v=HyznrdDSSGM&list=PLowKtXNTBy...
- terlisimo 7y agohttps://github.com/MJoergen/nexys4ddr/tree/master/dyoc https://github.com/MJoergen/nexys4ddr/tree/master/dyoc 6502 system from scratch in FPGA https://www.youtube.com/playlist?list=PLqAMlAbd8sIuiuk_yJeqCWWxe7jxWgswj https://www.youtube.com/playlist?list=PLqAMlAbd8sIuiuk_yJeqC... MIT 6.004 Computation Structures
- trillic 7y agoEECS 370 through the University of Michigan has the project specs publicly available[1]. [1] http://www.eecs.umich.edu/courses/eecs370/eecs370.s19/ http://www.eecs.umich.edu/courses/eecs370/eecs370.s19/
- ccozan 7y agoHad almost the same assignement. We were teams of two, and we had to demonstrate that it works by implementing something very simple assembly instructions, we had to design them too. I was in charge of the pipelining and clocking and my colleague took the ALU and the I/O. Testing was job for both, AFAIK. I remember chasing a propagation bug, had to add some delays on some lines to get proper sync. Realy really fun for a semester and a well deserved note at the end of it.
- mountainofdeath 7y agoI had to do something similar although the task was to implement a subset of MIPS instructions and simulated pipelining and out-of-order execution.
- InitialLastName 7y agoOne day I'll die at the hands of a branch delay slot in an OOO system.
- cbanek 7y agoSame thing for one of our computer engineering courses at UIUC. Great course, and while it took a long time to do it, it was a great experience (other than the fact that we had to do it in Mentor Graphics, which would randomly crash and eat your project). We had assembly programs we had to test against, and it was always really interesting debugging your register stalls. I think mine was a 5-stage processor, MIPS style, so we had to worry about all the pipelining. There were also a standard parts library so everyone was trying to compete against each other to get the best instructions per cycle.
- spchampion2 7y agoI had a very similar experience, including a very late night trying to fix a weird integration problem along with my project team. We had spent hours trying to find the issue, but nobody was thinking effectively and we were making stupid decisions. Everyone wanted to keep going, but I insisted that we were not thinking clearly and that sleep would help us better solve the problem. I even promised I would come back first thing in the morning to start debugging again on my own. The team begrudgingly agreed and we walked away for the night. I slept, came back in the morning, and had the problem fixed in like 15 minutes. I learned so much about CPU design from that class, but I also learned how important sleep is to thinking clearly.
- sixothree 7y agoI woke up one day recently and "knew" what a co-worker had done wrong. He pasted steps of his issue with screenshots. Having slept on it I realized he had misspelled a server name. I have no idea how I discovered that or realized that while I was sleeping. But there it was.
- HeWhoLurksLate 7y agorelated Studio C sketch: https://www.youtube.com/watch?v=CxV0Nh10h5s https://www.youtube.com/watch?v=CxV0Nh10h5s I've done that in my high school Visual Basic class- I woke up around 2 AM, knew exactly where I was going wrong, fixed it, and kept going until I'd finished my program. By the time my dad woke up at six, I had written over six hundred lines of code, had about twelve new features, and I was so exhausted I got sick for two days. I'm still proud of that sprint.
- adrianhel 7y agoMy most absurdly productive episodes have been when I've worked through the night. I love the amount of focus I get when there is nothing to distract me!
- 52-6F-62 7y agoI've commented on a similar thing previously— I worked for a while with some older Vietnamese refugees who were largely self-taught electrical engineers. They used to tell me how they'd dream about the circuits in these high-watt lighting ballasts they were fixing. One tale specifically had them trying to find a fix over the course of a week, only to dream up the solution and come in the next morning to repair the gear in minutes. I've definitely dreamed up solutions to software bugs and architecture problems myself. I've never really dug deeply into why, but it's fascinating.
- djhworld 7y agoHello! Really enjoyed your story. While I wasn't up against any deadlines I did have a few of those so-simple-it's-painful fixes when I was doing this project haha
- cjensen 7y agoHas to do that. Implemented a 68000. It was a stupid project. I learned nothing from the project that I had not already learned along the way with simpler toy instructional examples. And yeah, the double all-nighter and having one team member give up 12-hours before the due date was one of the worst experiences in my life.
- dpe82 7y agoIf you'd already "learned it all" why did it require double all-nighters to complete the project while being so difficult a team member even gave up? Did they only give you 3 days to do it?
- aoeusnth1 7y agoI can think of a bunch of reasons: - Things can be challenging without being educational. (OP explicitly says this) - ADHD - High course load / other assignments they might care more about. Your comment presumes knowledge of their situation that you don’t have. Don’t do that.
- cjensen 7y agoThe 68K is a complex and full featured CPU, so there is a lot of tedious detail to be done that has nothing to do with the overall concept of "design a CPU". For example, there are so many instructions that it took a couple of days of time just to write the microcode. Let's use an analogy. Suppose you have a class where they teach using Minix. Tasks like "rewrite the time slice algorithm" or "implement part of a filesystem" can be valuable to understanding how an OS works. But if the final project is "reimplement the Linux kernel from scratch" well then you are going to spend a lot of time on the detail work of what you already understand without actually learning much new. It's a poor use of time. Or in compiler classes. Mess with a module in LLVM is a valid learning experience. Implement a tiny language is super valuable. But "write a C compiler conforming to the C Standard" gets you into a lot of gory details about C, takes an enormous amount of time, and teaches you very little about the theory and practice of compilers and languages.
- urda 7y agoI know that feel. I was tasked with wiring up the even / odd bytes for my team's Microcomputer. After countless hours of wire trimming and breadboarding, I was so afraid to boot up the board. Popped the brick in the wall, got a solid power light, and was presented with my terminal. Huge sigh of relief, I might have just passed out then and there if I didn't have to continue.
- userbinator 7y agoSituations like this show why it's very important to have a complete understanding of the system when debugging --- the more complete your knowledge, the less likely it will be forgotten in panic/frustration and lead you to assume things about the system such as the correctness of certain parts. I've been a TA for a course that did something very similar, and whenever a student came to me with a noticeably vague understanding (usually expressed as "it doesn't work, I've spent days on this and I don't know why"), I would observe him/her debugging it for a few minutes and showing it to me, and almost always I'd spot the problem right away; but instead of pointing it out, I would ask the student to print several copies of the circuit onto paper, then tell him/her to annotate all the signals with their expected values for the few cycles leading up to, including, and after the problematic one. At this point a lot of them would look at me like I was insane, and reply with some variant of "I can't do it" or "we were never taught how to do that" and want to reach for the computer, whereupon I would stop them and show how. Once they figured it out, they would usually reach a point and say "I think this was my problem" --- wanting to go back to the computer again, and again I'd intervene to tell him/her to finish the whole annotation first (because they'd often have more bugs to be discovered.) Once finished, however, I'd let them use the computer again and compare, and then they would always have no problem finding and fixing the original bug, and perhaps several more after that. I believe this is closely related to another phenomenon I've observed, which I call "debugger tunnel-vision", where a human using a tool and trying to debug a system essentially starts to blindly trust parts of it as being correct, because his/her own understanding of the functioning is itself unclear. My insistence on not using the computer and going back to pencil and paper (and brain) is, albeit probably quite "old-school" to some here, I believe an extremely important technique in being able to understand and debug effectively. It's worked not only for low-level hardware courses, but more high-level ones too --- where I tell students struggling with their code to "mentally execute" each step and compare the resultant expected values with those obtained. One of my favourite sayings is: How can you expect to be able to tell a computer what to do, if you yourself don't know how to do it?
- rarecoil 7y ago> At this point a lot of them would look at me like I was insane, and reply with some variant of "I can't do it" or "we were never taught how to do that" and want to reach for the computer, whereupon I would stop them and show how. I wish I would have had such a TA in my university. Instead, I got compressed deadlines and a "you figure it out or you fail" mentality in the majority of my classes. There were lectures and a textbook - if you couldn't sort it out and make it click on your own, alongside all of your other courses, you were SOL.
- godelmachine 7y agoWas it in a Bachelors course or a Masters course?
- balls187 7y agoThis was a undergrad course. Computer Architecture 1 It was required for Computer Engineering majors (my major), but I believe an elective for Electrical Engineering and Computer Science majors.
- smadge 7y agoI had to do something similar for my computer architecture class using the program Logisim (http://www.cburch.com/logisim/ http://www.cburch.com/logisim/)