0
\$\begingroup\$

I am new to electronics, I program from time to time and i know the basics of the logic gates. I have used logisim in the past and I was just wondering if someone could tell me about a good online class i can take or a good site to learn more. Thank you in advance

\$\endgroup\$
4
  • 2
    \$\begingroup\$ I suggest that instead of that you get a very basic micro-controller - I found the 8-bit Microchip PICs brilliant in their design, documentation and application notes - and program it in assembler. (1) It's ready made and you can get it working immediately. (2) They have a small instruction set that's easy to learn but very powerful. (3) You will learn how to move data from the accumulator to registers, etc. (4) It's very cheap and there is a vast amount of support. (5) You can build something useful. At least it will give you a very good understanding of basic architecture. \$\endgroup\$
    – Transistor
    May 7 '16 at 18:59
  • 2
    \$\begingroup\$ I apologise, but sadly your question is 'off-topic' because it is likely to be opinion based. Please read the help center to understand the sort of questions this site answers. Further, a web search might give answers. So it will likely get closed. \$\endgroup\$
    – gbulmer
    May 7 '16 at 19:07
  • \$\begingroup\$ MIT's closest course to this, 6.004, typically mixes theory and practical implementation of a CPU and has its lecture and lab notes online at ocw.mit.edu/courses/… They may change which years's version is posted, and it tends to use a different mix of simulation and/or hardware depending on who is teaching. \$\endgroup\$ May 7 '16 at 19:13
  • \$\begingroup\$ This topic is way off scale in terms of a "cover all the basic's" answer. The CPU has a 'state machine' at its core, which drives a 'pipeline', which is the micro-code needed to drive all the other sections. This is where any answer becomes 'fuzzy', as the section options are up to the designer. @transistor has great suggestions. \$\endgroup\$
    – user105652
    May 7 '16 at 22:42
4
\$\begingroup\$

I don't know about online classes, but I can tell you what I did when I designed my first CPU. So there are three steps:

  • Get a good Digital Design / Computer Architecture book. I strongly recommend the "Digital Design and Computer Architecture" from Harris and Harris, and also "Computer Organisation and Design" from Patterson and Hennessy (2nd edition). Of course there are tons of other books, but these are generally accepted as very good ones.
  • Learn an HDL (Hardware Description Language). I prefer VHDL, but you can also try Verilog
  • Design your processor on paper. Begin with a relatively small instruction set, and then you can add functionality or upgrade it (pipeline stages, FPU, etc.)

After you design your ISA and your architecture, you can start implementing it on the HDL you like. Then you can "download" it on an FPGA evaluation board and see your CPU running.

\$\endgroup\$
1
\$\begingroup\$

I agree with @transistor's comment.

Programming at assembler level might be a much quicker and more effective way to learn initially than trying to start at designing a CPU.

I think designing a CPU would be quite a lot of work to get it to do anything meaningful, and without proper test cases or use cases, the design might be rubbish but there'd be no way to tell. To get the thing to do anything meaningful, it'll also need memory and peripherals.

To put the scale of the task into context, simple 32bit embedded-style CPUs are over 2000 gates. (Based on recent RISC-V comparisons, I'll try to find the link) I believe that might be without a bus interface, or important peripherals like a communication mechanism or any timers. IIRC the size of the 32bit ALU and registers makes a difference, but a usable 8bit CPU is unlikely to be a lot smaller.

Learning to program at assembler first would be necessary anyway, as you will likely want to test your CPU design, so it isn't a waste of energy.

I'd recommend program in C and assembler with ATmega, maybe even an Arduino as they are quite cheap and quite well documented. They important value of ATmega for me is the relationship between C and assembler is good enough that you can write in C and understand the assembler code relatively easily.

Further, ATmega was designed to be a good target for C in embedded systems, and C/C++ are still the favourite high-level language for embedded development. So you would be learning about a relatively modern architecture designed for a high-level language, rather than assembler programming.

Finally, it is not cluttered with lots of mechanisms designed to support full operating systems like Linux, so there is much less to learn.

A key question is what is it you want to do with your CPU?

However, your question is likely to get opinion-based answers, which is not a good ee.se fit.

\$\endgroup\$
1
\$\begingroup\$

I can recommend this online coursework. You make a 1 bit ALU, then a 4 bit ALU and then an 8-bit ALU. Download Quartus II from Altera and start making a multiplexer, an adder, a decoder and put it together as an ALU and you got a 4 or 8 bit system that can perform your operations. If you get an FPGA you can even execute your own code in your own custom CPU. FPGA is a good way to learn but you can also simulate everything in a program like Qsys in Quartus II. enter image description here

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.