Building your own CPU

Gregow

Member
Oct 11, 2014
34
4
71
I want to try building my own CPU. Has anyone here done this?

The idea is to build something that can be programmed, with proper keyboard input and display output. I basically want to take this project from circuit to rudimentary OS that can execute simple programs. Instead of going nuts hooking wires to a breadboard I would like to make the design in software and transfer it to a printed circuit board (seems fairly cheap if you can make do with a simple PCB).

Anyhow, my first question is if you can recommend any good resources (sites/videos/books/etc) and if you know of any good designs that would be suitable for my purposes?

And second, can you recommend any good software for designing the CPU and transferring the circuitry to a PCB? I've looked at LogiSim which seems like just the kind of software I want, but I'm unsure as to how the designs can be converted to schematics for a PCB.
 
  • Like
Reactions: Thebobo

Red Squirrel

No Lifer
May 24, 2003
67,201
12,029
126
www.anyf.ca
I always been intrigued by this idea. You could probably build it out in blocks and have PCBs made for that. Like logic gates and stuff that plug into each other.

Some people have even done it in Minecraft with redstone. That's kinda mind blowing.

Suppose you could also use microcontrollers for some glue logic, but I guess that would be kinda cheating.
 
  • Like
Reactions: amd6502

sdifox

No Lifer
Sep 30, 2005
94,694
14,939
126
I'm not going to build an 8088 processor.

There are tons of examples of home-brew computers. Here's one example:
https://youtu.be/HyznrdDSSGM

Again, serious discussions only.


Home brew computer is very different from home brew cpu. You want you make a home built computer with existing chips, sure.

http://diptrace.com/diptrace-software/pcb-layout/

Open source
http://kicad-pcb.org/

Diy photo etching is the only affordable way to make your mb. And two layer tops. No pcb shop is going to wash one big board for you.
 
Last edited:

Gregow

Member
Oct 11, 2014
34
4
71
There's not really a fundamental difference between using TTL IC's or building a bunch of NAND gates.

Problem with KiCAD and Diptrace is that they can't simulate the logic, which means I have to do a lot of extra work if I can't transfer the schematics from the logic simulator.

The online quotes for simple PCB's are in no way prohibitively expensive.
 

Gregow

Member
Oct 11, 2014
34
4
71
I always been intrigued by this idea. You could probably build it out in blocks and have PCBs made for that. Like logic gates and stuff that plug into each other.

Some people have even done it in Minecraft with redstone. That's kinda mind blowing.

Suppose you could also use microcontrollers for some glue logic, but I guess that would be kinda cheating.
Yes, say something like the SAP design Ben Eater is using, but print the circuitry instead of manually doing the wiring on a breadboard. That could also allow for more complex designs without going completely mad.

Microcontrollers or FPGA's could be used, but I want to build it from logic gates to a working computer.
 

sdifox

No Lifer
Sep 30, 2005
94,694
14,939
126
There's not really a fundamental difference between using TTL IC's or building a bunch of NAND gates.

Problem with KiCAD and Diptrace is that they can't simulate the logic, which means I have to do a lot of extra work if I can't transfer the schematics from the logic simulator.

The online quotes for simple PCB's are in no way prohibitively expensive.


There is a huge difference between using ttl and using transistors. The trace length is in multiplea on the ttl side. Your mb cost goes higher since it is about surface area.
You want to build it using ttl chips, then you should just acid wash your own board. One off board from pcb shops are expensive since the setup fee is the expensive part.

Even if you design your own cpu, who is going to build the chip for you?

Those are tracing software, noy logoc simulators.

Cedar or Logosim if you want to do logic simulation.
 

Gregow

Member
Oct 11, 2014
34
4
71
There is a huge difference between using ttl and using transistors. The trace length is in multiplea on the ttl side. Your mb cost goes higher since it is about surface area.
You want to build it using ttl chips, then you should just acid wash your own board. One off board from pcb shops are expensive since the setup fee is the expensive part.
That's not a fundamental difference. You are still building the logic even though IC's contain more logic in a smaller package.
Well, the online quotes from the PCB shops are reasonable. Later problem though, as there are alternatives like etching and 3D printing.

Even if you design your own cpu, who is going to build the chip for you?
I'm not going to build a chip.

Those are tracing software, noy logoc simulators.

Cedar or Logosim if you want to do logic simulation.
I know, that's why I'm asking about software that can transfer the design to schematics for making a PCB.
 

sdifox

No Lifer
Sep 30, 2005
94,694
14,939
126
74109.gif


That gives you 2 jk flip flop, which you can consider as 2 bit of memory. Notice number of pin needed for each bit. Now you need to route these pins to places. Avoiding crossing gets exponentially more difficult as you add more chips to the equation. A simple two layer board will allow you to do simple crossing, but you lose the common power plane in that area of the board.
If you use two chips then you are using up a lot of surface area.

That is one of the reasons why diy computers tend to be on breadboard and jumper cables, cuz trace crossing is not an issue.

All these things add to complexity or bigger surface area or both.
 

SKORPI0

Lifer
Jan 18, 2000
18,396
2,306
136
I want to try building my own CPU

I hope you really know the difference between a CPU (central processing unit) and a computer. ;)

Some answers in this thread.

What would it take to build a cpu from scratch?

Lets say you had unlimited money and motivation, what would it take to build a modern cpu from scratch? Is the knowledge and techniques needed to manufacture a cpu widely available, or are there trade secrets and things you would need to reinvent? What about building something simpler like the Intel 4004, what sort of equipment would be needed?

more threads. Note - CPU. not Computer.
http://www.homebrewcpu.com/
https://forums-archive.eveonline.com/default.aspx?g=posts&t=481438
https://www.reddit.com/r/askscience/comments/2j5n9e/could_you_make_a_cpu_from_scratch/
 
Last edited:

Gregow

Member
Oct 11, 2014
34
4
71
I hope you really know the difference between a CPU (central processing unit) and a computer. ;)

Some answers in this thread.

What would it take to build a cpu from scratch?

Yes, I do. The difference is mostly semantic in this context as it's unlikely to become one self contained unit.

Manufacturing IC's and transistors at home would certainly be glorious, but otherwise the most useful information from that link would be Nand2Tetris. I've looked at the course material and while it's a good resource it's not the approach I'm going to take. HDL is just not as exciting.

Well, considering we're talking storage, RAM and I/O I would say computer. Note how the terms are often used interchangeably. Like, homebrew CPU - homebuilt minicomputer.

Anyway, there were some links there I had not seen before, so thanks for that.
 

Gregow

Member
Oct 11, 2014
34
4
71
74109.gif


That gives you 2 jk flip flop, which you can consider as 2 bit of memory. Notice number of pin needed for each bit. Now you need to route these pins to places. Avoiding crossing gets exponentially more difficult as you add more chips to the equation. A simple two layer board will allow you to do simple crossing, but you lose the common power plane in that area of the board.
If you use two chips then you are using up a lot of surface area.

That is one of the reasons why diy computers tend to be on breadboard and jumper cables, cuz trace crossing is not an issue.

All these things add to complexity or bigger surface area or both.
Yes, wiring will be a challenge no matter how you approach it.
 

sdifox

No Lifer
Sep 30, 2005
94,694
14,939
126
Yes, I do. The difference is mostly semantic in this context as it's unlikely to become one self contained unit.

Manufacturing IC's and transistors at home would certainly be glorious, but otherwise the most useful information from that link would be Nand2Tetris. I've looked at the course material and while it's a good resource it's not the approach I'm going to take. HDL is just not as exciting.


Well, considering we're talking storage, RAM and I/O I would say computer. Note how the terms are often used interchangeably. Like, homebrew CPU - homebuilt minicomputer.

Anyway, there were some links there I had not seen before, so thanks for that.


If you cannot tell the difference between cpu and computer, I am going to say don't start.
 

sdifox

No Lifer
Sep 30, 2005
94,694
14,939
126
Why are you even posting in this thread?

Because I am trying to save you time. You either follow someone's build to the letter and replicate the result, or you put in the time and effort required to learn to actually design something.

Make up your mind and proceed as you wish.
 

Gregow

Member
Oct 11, 2014
34
4
71
No, you are rudely wasting my time. If you have real knowledge, provide it. Snarky comments and <redacted>is not welcome. Find somewhere else to post that. Talk shop or get the redacted.

Insults and profanity are not allowed
Markfw
Anandtech Moderator
 
Last edited by a moderator:

sdifox

No Lifer
Sep 30, 2005
94,694
14,939
126
No, you are rudely wasting my time. If you have real knowledge, provide it. Snarky comments and <redacted> is not welcome. Find somewhere else to post that. Talk shop or get the fuck out.


Go ahead and waste your time then. I tried.
 
Last edited by a moderator:

SKORPI0

Lifer
Jan 18, 2000
18,396
2,306
136
Yes, I do. The difference is mostly semantic in this context as it's unlikely to become one self contained unit.

Note how the terms are often used interchangeably. Like, homebrew CPU - homebuilt minicomputer.
Interchangeable, are you kidding?
Only the misinformed (like you) would not know the differences between a CPU and a COMPUTER (CPU, motherboard, graphics card, memory, PSU, case, cooling system/fans). :rolleyes::rolleyes::rolleyes:

I've already provided a link above to know the differences. Others tried to enlighten you, but your mind is set.

Good Luck, you'll need lots of it.
 
Last edited:

Gregow

Member
Oct 11, 2014
34
4
71
Jolly good, now you can run along and enlighten the guy who built the Magic-1.

Now, if there are people with real knowledge that would be great. I'm particularly interested in finding a good "platform" to start off from. As in, finding good software and workflows with a fair amount of resources to learn from.

This is not a thread for discussing whether it's a pipedream, how many transistors there are in an Intel 8088, distinctions between 'computer' and 'CPU', my "set mind" or you trying to "enlighten" me.

Leave it. I don't care. It's not why I started this thread and it's not on topic. And if that is too difficult to understand, then you surely do not understand this subject.
 

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,100
126
Yeah, it's a pipe dream.

CPU consisted of ALU, control unit, registers, cache, etc. And you need input/output + memory.

Don't know which parts you can build on a PCB?