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
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.
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.
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.