Any idea where I could go about learning to do this myself? A few google searches mainly led me to things saying it was impossible.
Here's to the systems programmers – Writing Hello World on a home brew CPU
11–20 of 32 posts
Re: Here's to the systems programmers – Writing Hello World on a home brew CPU
#12Does it do pipelining, branch prediction and (hyper)threading? How is its memory hierarchy (cache levels) organized? Does it support a privileged mode? Does it support hardware page faults? Did you implement floating-point operations? > In order to be able to program it at all, I wrote a very simple compiler (strictly speaking it’s actually an assembler) Does that compiler/assembler run on your hardware?
Re: Here's to the systems programmers – Writing Hello World on a home brew CPU
#13Does it do pipelining, branch prediction and (hyper)threading? How is its memory hierarchy (cache levels) organized? Does it support a privileged mode? Does it support hardware page faults? Did you implement floating-point operations? > In order to be able to program it at all, I wrote a very simple compiler (strictly speaking it’s actually an assembler) Does that compiler/assembler run on your hardware?
In a word: no. Processors this simple don't implement any of the features you mention, including multi-level memory hierarchies, and I doubt the author had any inclination to make the assembler self-hosting.
Re: Here's to the systems programmers – Writing Hello World on a home brew CPU
#14Any idea where I could go about learning to do this myself? A few google searches mainly led me to things saying it was impossible.
I think you'll like this then: http://www.nand2tetris.org/
Re: Here's to the systems programmers – Writing Hello World on a home brew CPU
#15I know that the author was being sarcastic, but really, 4MHz with 32kb of RAM is like state of the art 80's technology. The fact that we are even able to get to this point with protoboards and discrete off-the-shelf logic chips is impressive.
I mean, I learned how to program back in 1988 in a computer not much more powerful than that.
Re: Here's to the systems programmers – Writing Hello World on a home brew CPU
#16I really wish he'd document even the barest scraps of the CPU architecture. Is it microcoded? There's 7400 series like 7402 or 7473, and there's 7400 series like 74154, 74181, etc. "hey kid, I built one of these too, back in the day, and it was damn hard and time consuming, but oh a labor of love. I had no internet, nor any schooling. I read articles in Popular Electronics and I read the TI 7400 series databook. Then…
Re: Here's to the systems programmers – Writing Hello World on a home brew CPU
#17Earlier quoted context omitted.
In a word: no. Processors this simple don't implement any of the features you mention, including multi-level memory hierarchies, and I doubt the author had any inclination to make the assembler self-hosting.
I'm not saying one should expect or demand it in a project like this, but minimalistic pipelining should be doable; both the 6502 ( http://www.6502.org/users/andre/65k/arch.html#pipelining ) and (IIRC) the 8080 started fetching the next instruction before finishing execution of the current one, where possible.
Re: Here's to the systems programmers – Writing Hello World on a home brew CPU
#18Fantastic achievement. Would love to know some more details about the project and hardware design.
Agreed, this is super cool. I've read the book "Code" a few times, so I understand a lot of this stuff in theory, but I sure don't understand the practice. Awesome work.
[1]: https://www.edx.org/course/computation-structures-part-1-dig...
Re: Here's to the systems programmers – Writing Hello World on a home brew CPU
#19I really wish he'd document even the barest scraps of the CPU architecture. Is it microcoded? There's 7400 series like 7402 or 7473, and there's 7400 series like 74154, 74181, etc. "hey kid, I built one of these too, back in the day, and it was damn hard and time consuming, but oh a labor of love. I had no internet, nor any schooling. I read articles in Popular Electronics and I read the TI 7400 series databook. Then…
That reminds me of my favorite project of all time, the 7400 FPGA: http://blog.notdot.net/2012/10/Build-your-own-FPGA
http://www.eecs.berkeley.edu/Pubs/TechRpts/2014/EECS-2014-43...
Re: Here's to the systems programmers – Writing Hello World on a home brew CPU
#20Earlier quoted context omitted.
I think you'll like this then: http://www.nand2tetris.org/
It's a wonderful, in fact an astonishing course. I hope that when they come out with part 2, it really does go all the way to Tetris. The "nand" bit is a slight fudge (they actually start you off with both nand and a flip-flop, which is still amazing), but we can grant them a bit of poetic license on that. But not on the Tetris!