Running a Unix-like OS on a home-built CPU with a home-built C compiler (2020)
fuel.edby.coffee
fuel.edby.coffee
However, some teams put more energy into doing fun such as running games or playing music by connecting a speaker with their CPU.
That reminded me of this Linus Akesson demo, where he himself makes an entire SoC, including a GPU, and the software for it: https://www.linusakesson.net/scene/parallelogram/index.php
My own CPU (EightThirtyTwo) and SoC project (SDRAM, video, sound, interrupts, uart) can be built for ECP5 using Yosys and friends, as well as for a number Altera/Intel FPGAs using the proprietary Quartus.
I have seen professional programmers fail projects much easier than this. How does the University of Tokyo manage to teach their students so well, or do they show up to it better trained/motivated than the average Western student?
It set me up well - I've written a few emulators as a hobbyist.
I'm not into FPGAs but recall a quite long list of interesting projects over there.
It sounds like UTokyo is like MIT. My first test there had material that wasn't in the book and wasn't covered in the lectures. When I asked my instructor about that, he said "Oh. You're supposed to know to do research outside of class," and when I asked my class-mates they said... "Oh. Yeah. My fraternity maintains a file of past tests for each instructor. You can get a good idea for what's going to be on various tests from reviewing the files. And if you don't understand it, you can get a frat brother to tutor you on it."
(As an aside... one of the frats had THE EXACT SAME TEST I had just taken. The prof didn't even change the problems. sigh)
So... my experience with MIT was that it's a place where bright kids go to get taught by upper-classmen and the classes are there only to prove you have some sort of mastery, or at least familiarity, with the material.
At Xmas that year I was bemoaning this fact to a friend from high school. His father was a physics prof at the local state university and overheard my complaints. He offered to give me a place in the lab if I xferred over. I took him up on his offer and wound up with a desk in the undergrad office, an account on the departmental VAX (this was a big thing back in the day) and a key to the physics building and the optics lab. I could drop in to my professor's offices virtually any time and most of them were excellent in explaining the finer points of quantum chromodynamics or math methods. I was recruited to be on the "let's build a super-cheap STM" team and landed a scholarship award for my work. After taking a hiatus to defend democracy I returned and landed a part-time gig at the Superconducting Super-Collider. That year I got my own MicroVAX. (Thank you, congress for all that SSC money.) But, of course, it didn't last. (Curse you, congress for taking all that SSC money away.)
My point may be that smart kids will do well at whatever university they attend. Also, I think I did MUCH better at the local state school than I would have at MIT. (Though I didn't actually graduate w/ a Physics B.S. as I planned. IBM hired me before I graduated and it was a PAIN IN THE ** to matriculate with even a B.A.)
Also. Lori Glaze (NASA director of Planetary Science) was a class-mate of mine, so... you know... it couldn't have been THAT bad of a school.
Now... as a software development manager, the thing that REALLY impressed me was the ability of a group of kids to effectively work together. The United States pumps out a lot of very bright CS grads, and our national mythos of "the rugged individual" helps in some ways, but I'm going to guess most CS students aren't getting a lot of experience in groups larger than 2 or 3 people. When I hire recent grads from US schools, the most important thing we have to teach them is how to play well with others. Sounds like the UTokyo team already learned this lesson.
Why do these students expect to happen when they enter the workforce?
Our students are not less independent or less inteligent than Germans and Swiss. It's our faculty and teaching staff that is often neither able nor willing to implement good teaching practices.
I have often wondered what causes this huge difference in efficacy of teaching between eastern and western Europe. Past influence from the Soviets? Wealth difference? Other cultural influences?
I don't think it is any more. I did my BSc there and didn't have any course where you build CPU architecture of our own.
When I did my degree, it was many years ago, we still had a 5 year degree for licentiate and this was spread between 2nd and 3rd year.
Source: I also don't have a CS degree.
I think it directly relates. University or not, I’m pretty sure you’ll need to study some amount of computer science to do this.
And then slightly related- When I was in college, I was able to deep dive into subjects like higher-limit just intonation and schenkerian analysis (music theory).
So to what you’re saying, I think you’re right. When the parent of my original comment said “fail”, really that’s just “giving up”, whether it be lack of time, lack of interest, or a lack of creative problem solving.
I started my software career as a "that guy who can write FORTRAN" and eventually became interested in more computer-sciencey topics and less interested in particle physics. I wound up learning scheme by reading SICP and algorithm analysis by reading Knuth. I also lucked into a job where I got to talk to Ron Rivest every couple weeks, so probably got more access to him than the average MIT undergraduate.
But mostly... getting a CS degree these days teaches you what to say during interviews. For instance, I stepped a kid through linked lists when I was interviewing for a position at Amazon. He had, of course, never heard of them and confidently informed me that hash-tables were the answer to every computer science interview question (I did not go to work for that team at Amazon.)
As best I can tell, CS programs do a mix of teaching kids useful analytic skills and how to answer questions in interviews. I've hired both CS and non-CS degree holders. CS grads come with a pre-set "context" or "meta-mental-model" for how to solve computing problems. It is often very useful and I don't think you get that with other degree programs.
However... in some corners of the world, that mental model is a detriment. I've had to untrain CS grads and get them to go back to first principals in some cases.
I think the question is... is your organization doing something that would benefit from the contextual meta-model embedded in the CS curriculum at a typical university? Are you using Java? Are you programming server software on a posix-like operating system? How ambiguous are your requirements? And the EE kids get a bit more systems stuff, it seems. Half of the CS kids I've hired couldn't tell me how a larger or smaller cache would affect performance of a particular algorithm. All of the EE kids could. Managing ambiguity of requirements through judicious application of Gemma-esque design patterns seemed second nature to CS grads. The same concepts seemed to flummox EE grads.
We are all victims of our training and the best thing you can say about someone who got an art history degree and then went into programming (assuming they can code) is they learned to analyze, design and implement software w/o the benefit of a conceptual scaffolding provided for them. They COULD be the best coders for certain types of ill-defined problems; they've demonstrated their ability to construct meta-models for evaluating real-world problems (again, assuming they can code.)
My experience of comp sci and of FAANG questions lead me to believe that this is wrong (you do learn linked lists, even if you ignore them) and an outlier (FAANG interviews often have "implement a modified linked list" style questions.
I would expect any Western student at a top school who self-selects into taking OS to be capable of this with the right course structure.
I left a comment above about how I left MIT (which doesn't teach as much as it provides an infrastructure for taking tests students use to demonstrate mastery) for a state school (that actually taught the courses offered and provided students with ample lab opportunities.)
I'm now thinking one of the great benefits from being taught by an actual professor (instead of an upper-classman fraternity brother) is that you get a context that is formed over the lifetime of a research career. I learned equations by reading the textbook. But how they were developed, why they were developed, what equations were used before and why they needed better models? I don't think you're going to get that from your fraternity brother.
So... yes... hopefully the UTokyo team had access to the faculty to direct them towards the most fruitful areas of the academic garden. And yes... I think there are some very good CS students out there in the states that could do the same thing. But as I mentioned above, it's great to hear a tale about smart kids working together as a team.
Design a simple SPARC-like CPU, make it work up to VGA/UART(and PS/2 IIRC?) I/O on an FPGA board, write a compiler for a tiny subset of Java for it, and make your OS work.
This is not a course everyone enrolls in. Generally the top 10% who are competitive enough enroll on it. But kids have done exceptional projects in this course. The creme de la creme students of Japan are in Tokyo U or Kyoto U, so the intellectual pool is generally very good (Tokyo University generally ranks within 40 consistently in CS/EE internationally)
> This is not a course everyone enrolls in.
This is the ticket -- at both the University of Arizona and MIT, I've seen a group of folks graduate with a CS degree after taking OS, compilers, databases, and abstract algebra. Another another group of folks graduated after taking HCI, software engineering, design, and psychology courses. The two groups had some baseline skills (all knew the basic data structures and algorithms), but otherwise appeared quite distinct.
I don't know how to phrase this formally, but I think some statement like the following is true: within-university variance is higher than between-university variance.
(When I was younger, I had strong opinions on which one of these groups were "real" computer scientists. This was a very unfortunate way of thinking that prevented me from talking to folks who I later realized were some of the smartest around. I wish someone had corrected me sooner -- solving a problem with inputs/outputs well-defined enough to apply "rigorous" techniques doesn't make those problems inherently valuable or "harder" than others. God gave all the easy problems to the physicists.)
The thing is, “professional programming” is a very different challenge from a task like this one, and it’s hard to describe either as objectively “easier”. The provision of a clear outcome, resources, guidance, teaching time etc. can go a long way to helping deliver a good outcome - often things professional developers don’t have as much access to.
I’d bet the majority of developers I know (and respect) put on to this project would fail at it without support - similarly, an early-career student would likewise crash and burn if put on to, say, developing a front-end architecture for a modern web app. Horses for courses.
> FPGAs contain an array of programmable logic blocks, and a hierarchy of reconfigurable interconnects allowing blocks to be wired together. Logic blocks can be configured to perform complex combinational functions, or act as simple logic gates like AND and XOR. In most FPGAs, logic blocks also include memory elements, which may be simple flip-flops or more complete blocks of memory.[1] Many FPGAs can be reprogrammed to implement different logic functions, allowing flexible reconfigurable computing as performed in computer software.
The above being from the FPGA Wikipedia page[0].
So yes, it is done “in software”, but FPGAs is fancy hardware that can reprogrammed to act as new hardware on the fly using software. Many are implemented as PCI devices, so they could interact with the rest of the system over the PCI bus.
[0] https://en.m.wikipedia.org/wiki/Field-programmable_gate_arra...
You can see in the UART code for example:
https://github.com/nyuichi/GAIA3/blob/master/hardware/Rx.vhd
file input_file : ft open READ_MODE is input_filename;
read(input_file, c);
data <= std_logic_vector(to_unsigned(character'pos(c), 8));
And so on and so forth, to pump a file on the simulation PC into a VHDL logic array one byte at a time as a simulation of a UART.
Would be pretty funny if the above is the "wrong" repo for the story, but it is at least "an implementation" of the GAIA architecture, if not "the implementation" from the story.
[1]: https://github.com/mit-pdos/xv6-public/blob/eeb7b415dbcb12cc...
[2]: https://github.com/mit-pdos/xv6-public/blob/eeb7b415dbcb12cc...
[3]: https://www.felixcloutier.com/x86/out
[4]: https://stackoverflow.com/questions/3215878/what-are-in-out-...
Design and build my own CPU: Check
Write my own C compiler: Check
Create a UNIX-like OS for the CPU that compiles with the C compiler: Now I have something to bookend my career with.There are many mips cpus out there. It's very popular in China.
Holy shit
Im envy