Live data from Hacker News

Simple CPU

simplecpu.com

21–30 of 65 posts

Re: Simple CPU

#21
post #16

Anyone who cares about this topic is welcome to contribute to https://en.wikibooks.org/wiki/Programmable_Logic/Verilog_for... I started it at the request of some HN users, and I hope it continues to hopefully enlighten some software folks who wonder how the CPU they rely on actually works.

I'll rant for a moment here, because I think this is something that the Simple CPU link has the potential to get right, and that I think is a common pitfall with digital design tutorials. I think one of the pain points that you commonly see with tutorials is the concept that the hard part is the language. As a digital designer, I think that's explicitly not the case: just like teaching functional programming, the syn…

Yes, the two key hurdles to HDL are (in my opinion):

- Being able to think parallel. Software is sequential by default, HDL is parallel by default.

- Understanding what you want to build. If you can't draw what you want, you probably can't write good HDL. There's a reason it's called Hardware Description Language, and not "JS2GATES". In a sense, HDL is really just text-based schematics.

Case in point:

http://www.allaboutcircuits.com/vol_5/chpt_7/8.html

When you think "HDL" you probably think of Verilog or VHDL, but SPICE netlists is also an HDL.

Re: Simple CPU

#23
post #15

It's very similar to Charles Petzold's "CODE" book. An excellent read. http://www.charlespetzold.com/code/

That book made it all snap together for me. It really is fantastic. After reading it, I felt I knew enough to build hardware from first principles, even I'd be slow and terrible at it.

Re: Simple CPU

#24
This is my first real introduction to uber-low level computer science. I managed the following super simple program:

1. 00000000

2. 00000001

3. 00000000

4. 00000001

5. 00000010

6. 00000011

7. 00000011

8. 00001010

9. 00000000

10. 00000001

The CPU jumps to the instruction at #4, which tells it to add the value of #2 to #3. The instructions at #7-#10 reset the instruction pointer to 00000001, so that it'll increment to #4 again. The result is that #3 is continuously incremented up by one.

I've usually preferred to stick to really high level stuff (Like JS/Node.js), but trying this out makes me want to go learn assembly or something!

Re: Simple CPU

#25
post #24

This is my first real introduction to uber-low level computer science. I managed the following super simple program: 1. 00000000 2. 00000001 3. 00000000 4. 00000001 5. 00000010 6. 00000011 7. 00000011 8. 00001010 9. 00000000 10. 00000001 The CPU jumps to the instruction at #4, which tells it to add the value of #2 to #3. The instructions at #7-#10 reset the instruction pointer to 00000001, so that it'll increment to…

This makes it into a bit of a game:

https://microcorruption.com/

Re: Simple CPU

#26
post #12

Very nice. One request: don't introduce the concept of 'nibble' on the first page. It's jargon that no one needs in this general introduction. And it just sounds silly.

I don't know. I heard about nibbles right at the beginning and then promptly forgot them. I even remember thinking that the word was silly. But it set me up for a very nice epiphany the first time I saw bytes written as hex and played a part in my instantly grasping that.

Re: Simple CPU

#27
post #5

Here Feynman explains the basic logic behind building of all of the computers. He is inspiring even if you know more details about the topics he talks about, because he stimulates you to a fresh view. The youtube title is, IMHO, misleading. The lecture is about the basic hardware concepts and not about heuristics, so I think it fits perfectly with the OP. http://www.youtube.com/watch?v=EKWGGDXe5MA Edit: At the start…

Thank you

Re: Simple CPU

#28
post #24

This is my first real introduction to uber-low level computer science. I managed the following super simple program: 1. 00000000 2. 00000001 3. 00000000 4. 00000001 5. 00000010 6. 00000011 7. 00000011 8. 00001010 9. 00000000 10. 00000001 The CPU jumps to the instruction at #4, which tells it to add the value of #2 to #3. The instructions at #7-#10 reset the instruction pointer to 00000001, so that it'll increment to…

This makes it into a bit of a game: https://microcorruption.com/

I feel like there's a few tutorials needed in between writing your first opcodes and passing the first level of microcorruption ;)

Re: Simple CPU

#29

Earlier quoted context omitted.

This makes it into a bit of a game: https://microcorruption.com/

I feel like there's a few tutorials needed in between writing your first opcodes and passing the first level of microcorruption ;)

Nah, the first few levels of microcorruption is actually really really simple.

Re: Simple CPU

#30

Earlier quoted context omitted.

This makes it into a bit of a game: https://microcorruption.com/

I feel like there's a few tutorials needed in between writing your first opcodes and passing the first level of microcorruption ;)

which tutorials?
Post reply on HN