How are processors designed today?

You can talk about almost anything that you want to on this board.

Moderator: Moderators

User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

How are processors designed today?

Post by Drew Sebastino »

This is something I've always kind of wondered, but after seeing the schematics of the Intel 4004, I'm really curious how it could be possible at all. I'm going to take a not-so-wild guess that CPU's are now essentially designed by other CPUs.

http://www.4004.com/assets/4004-lajos-schematics.gif

How do transistors even work, and I don't mean like electrons or whatever in the main part, but just what they do with electrical signals and the prongs. I can't even find a simple explanation, and I can't imagine it exactly being too complicated considering the thing only has 3 prongs. All I ever hear is that it can act as an amplifier or a switch without an "explanation" that doesn't look like a math equation. Again, I can't imagine it being too complicated.
ccovell
Posts: 1041
Joined: Sun Mar 19, 2006 9:44 pm
Location: Japan
Contact:

Re: How are processors designed today?

Post by ccovell »

It's very complicated. It's an intersection of chemistry, physics, and electric theory. Since transistors have 2 inputs and 1 output (in theory), the graph of output to inputs is 2-dimensional... hence transistor "testing" machinery:

https://en.wikipedia.org/wiki/Semicondu ... rve_tracer
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Re: How are processors designed today?

Post by Bregalad »

Espozo wrote:This is something I've always kind of wondered, but after seeing the schematics of the Intel 4004, I'm really curious how it could be possible at all. I'm going to take a not-so-wild guess that CPU's are now essentially designed by other CPUs.
Of course they are. Remember, they can have in the billions of transistors! Do you really expect people to lay out them manually on the die? (although the vast majority of these transistors are used for cache memory and not logic itself)
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: How are processors designed today?

Post by Drew Sebastino »

Yup, that's what I thought. Does anyone know specifically, like what programs are generally being used and what kind of control you have over creating them? I'm handicapped when it comes to this.
ccovell wrote:It's very complicated. It's an intersection of chemistry, physics, and electric theory. Since transistors have 2 inputs and 1 output (in theory), the graph of output to inputs is 2-dimensional... hence transistor "testing" machinery:

https://en.wikipedia.org/wiki/Semicondu ... rve_tracer
I think I heard it to where someone described it as to where there is the main power on one side, one in the middle, and one on the other. The amount of power in the middle one effects how much of the power gets transferred from left to right, and the amount of power on the output can be translated to either a one or a zero.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Re: How are processors designed today?

Post by Bregalad »

Espozo wrote:Yup, that's what I thought. Does anyone know specifically, like what programs are generally being used and what kind of control you have over creating them? I'm handicapped when it comes to this.
The company Cadence makes program to design chips, simulate them, and this sort of things. Licences cost a few dozens of thousand dollars. However Intel and AMD might have their own tools. ARM I don't know, probably they support multiple programs as they licence their cores to a lot of companies. In the end this is private matters, so unless you find someone who works for a particular company, it's hard to know what tools they use internally.
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: How are processors designed today?

Post by rainwarrior »

Espozo wrote:I think I heard it to where someone described it as to where there is the main power on one side, one in the middle, and one on the other. The amount of power in the middle one effects how much of the power gets transferred from left to right, and the amount of power on the output can be translated to either a one or a zero.
Yeah, basically. One signal controls the flow of another, like a valve, or a switch. There's a lot of different types of transistors, and they behave in different ways, but it's generally about one 1-D signal controlling another. For an audio amplifier, you probably want a transistor with a very linear transfer function do minimize distortion, for digital logic you're more concerned with how it behaves at the high and low ends of the curve.

You can make computers with any kind of switch. Mechanical switches, electromagnetic relays, even water has been used to create a computer. Usually we're talking aobut digital logic, but it's also possible to build an analog computer that can make use of the whole transfer function.
User avatar
Khaz
Posts: 314
Joined: Thu Dec 25, 2014 10:26 pm
Location: Canada

Re: How are processors designed today?

Post by Khaz »

rainwarrior wrote:You can make computers with any kind of switch. Mechanical switches, electromagnetic relays, even water has been used to create a computer. Usually we're talking aobut digital logic, but it's also possible to build an analog computer that can make use of the whole transfer function.
I've spent a lot of time trying to think of a way to design an entirely mechanical computer powerful enough to do any level of useful processing.

I know what a monstrosity Konrad Zuse's mechanical computers were, and from my understanding they read in paper tape and were mostly useful for floating-point calculations for bombing raids. But what if we could design a computer that had a mechanical motive force (say a crankshaft), and that could process in the same way a modern computer does? Enough to run, say, DOS (not that there'd be any point in DOS). I think that would be just downright fun to watch, if not educational and even theoretically useful.

I've heard people who talk of solar events in the distant past that were powerful enough to destroy electronic equipment, send surges through telegraph lines, etc... What if we had such a disaster today? What if something simultaneously fries every modern computer on earth?

Sure it's a long shot, but wouldn't it be cool to be somewhat prepared? I was also going to suggest a more physical storage medium too, on account of data on any magnetic surface would be wiped out, but then... That's what DVDs are good for, right? They're just physical pits on a flat surface, right? Hm.

I suppose no catastrophe out there is going to prevent us from using electricity again altogether... So it's really just data storage that's the worry. Unless we have a common-mode failure in a specific type of transistor or capacitor that's in basically every electronic device ever made, such that we can't even run our computers that make more computers and have to start from scratch.

*rambling*
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: How are processors designed today?

Post by rainwarrior »

I also forgot that long before there were mechanical computers we had human based computers too. ;) In the 18th century it was a job title for people that did computations.
Sik
Posts: 1589
Joined: Thu Aug 12, 2010 3:43 am

Re: How are processors designed today?

Post by Sik »

Khaz wrote:I've spent a lot of time trying to think of a way to design an entirely mechanical computer powerful enough to do any level of useful processing.
The difference engine was proven to work (it was eventually built in modern times just to see if it worked), the problem back in the day was that nobody wanted to fund Babbage's project since his stuff had a tendency to never work as intended and people were fed up with his shit by that point.
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: How are processors designed today?

Post by lidnariq »

In the 80s and 90s, one of the standard tools for designing VLSI bits was called MAGIC. I've played with it a bit ... it's kinda fun, like MS paint crossed with 3d printing.

As I understand it, Intel is one of the very few chip designers left who let people do substantial portions of the design still—hence why AMD (who uses almost entirely automated design tools) no longer really competes on anything but price.
RT-55J
Posts: 37
Joined: Fri Aug 21, 2009 3:16 pm

Re: How are processors designed today?

Post by RT-55J »

Espozo wrote:I'm going to take a not-so-wild guess that CPU's are now essentially designed by other CPUs.
That's one way to put it, yes.

Digital hardware design these days is done using hardware description languages (HDLs), like Verilog or VHDL. Using these is like coding in C instead of assembly. You still need to understand in principle what's going on underneath the hood (the fundamentals of digital logic, timing, etc.) if you want to make something good, but it makes things a lot more manageable.

The transistor level schematic you posted of the 4004 may look inscrutable (much like raw machine code in a hex editor), but this block diagram is a lot more illuminating regarding the design process. Each of those boxes represents a different part of the chip (physically), which can be designed independently if proper design methodology is followed (again, much like with software). If one were to reimplement the 4004 in Verilog, it looks like most of those parts would only take a few dozen lines of code at most. (A quick Google search indicates the whole chip would be in the ballpark of 1250 lines of code, with much of it simply being port definitions.)

Someone with more experience, like kevtris, would be able to explain this much more thoroughly and less erroneously than I could.
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: How are processors designed today?

Post by Drew Sebastino »

Just thinking, wouldn't messing with an FPGA processor be no different than designing your own CPU?
rainwarrior wrote:Yeah, basically. One signal controls the flow of another, like a valve, or a switch.
Let's assume that the signals can either be a one or a zero in this case. (I looked up the proper terminology for everything, so get ready.) How does the base effect the emitter, or does this depend on the type of transistor? I mean like could you have it to where it performs different functions like this (not just this though) depending on the type of transistor and the energy going through the emitter and the base?

transistor 1: emitter: 0 base: 0 collector: 0
transistor 1: emitter: 1 base: 0 collector: 0
transistor 1: emitter: 0 base: 1 collector: 0
transistor 1: emitter: 1 base: 1 collector: 1

transistor 2: emitter: 0 base: 0 collector: 0
transistor 2: emitter: 1 base: 0 collector: 1
transistor 2: emitter: 0 base: 1 collector: 1
transistor 2: emitter: 1 base: 1 collector: 0

transistor 3: emitter: 0 base: 0 collector: 0
transistor 3: emitter: 1 base: 0 collector: 1
transistor 3: emitter: 0 base: 1 collector: 1
transistor 3: emitter: 1 base: 1 collector: 1
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: How are processors designed today?

Post by lidnariq »

BJTs (as you're talking about) aren't used in modern ICs. (They consume too much power). For the past ~40 years we've been using MOSFETs of various sorts.

But they're basically current multipliers. X current flowing from the "base" to the "emitter" would allow some greater amount (usually a constant multiple) of current to flow from the "collector" the "emitter".
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: How are processors designed today?

Post by Drew Sebastino »

So would it be like what I wrote except the emitter is the collector, the base is the emitter, and the collector is the base? Same basic concept still though, right?
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: How are processors designed today?

Post by lidnariq »

Most BJT-based logic is current-based, rather than voltage-based, so it's a little misleading to think of it that way.

Rather than trying to explain how TTL logic works, let's instead talk about MOSFETs, because that's what ICs actually use. I'm going to use a very primitive analogy sometimes referred to as the "switch model", wherein a MOSFET can be thought of as equivalent to a light switch.

A MOSFET has four inputs, and they are referred to as "Gate", "Drain", "Source", and "Body". When the difference in voltage between the Gate and Body is large enough, current can flow between the Drain and Source. (why do they have different names? makes it easier to keep them straight, and in practice they aren't quite identical)

Code: Select all

MOSFET symbol:
        drain
          |
gate ---|[--- body
          |
        source
So, in combination with a resistor, it's pretty easy to generate an "inverter", which produces the logical inversion of the output:

Code: Select all

           power
             |
             R
             +-- output
             |
control ---|[--- ground
             |
           ground
It's pretty easy to enumerate what would happen here: if control is low, no current flows through the MOSFET, so the resistor allows current through, raising the voltage of the output to "power".
On the other hand, if control is high, current does flow through the MOSFET, overpowering the resistor, and the voltage of the output is "ground".

You can make it more complex, of course:

Code: Select all

           power
             |
             R
             +-- output
             |
cntrl 1 ---|[--- ground
             |
cntrl 2 ---|[--- ground
             |
           ground
Here, current can only flow through if BOTH control lines are high. (We just implemented a NAND gate: the output is low only if both inputs are high)

edit: "body", not "base"
Last edited by lidnariq on Wed Jul 01, 2015 9:40 pm, edited 1 time in total.
Post Reply