Page 4 of 5

Re: How are processors designed today?

Posted: Thu Jul 02, 2015 8:42 pm
by Drew Sebastino
Well, What kind of setup would something like the SNES do? Is it grounded somewhere? Or wait, aren't there two prongs on power outlet for the battery situation? (I don't know what to call it.) This is just what I'm confused about: Grounding is a substitution for having the flat side on a battery right? Didn't you say that you get now power or something if you ground, Khaz? I'm hopelessly confused.

Re: How are processors designed today?

Posted: Thu Jul 02, 2015 8:52 pm
by Khaz
Espozo wrote:Well, What kind of setup would something like the SNES do? Is it grounded somewhere? Or wait, aren't there two prongs on power outlet for the battery situation? (I don't know what to call it.) This is just what I'm confused about: Grounding is a substitution for having the flat side on a battery right? Didn't you say that you get now power or something if you ground, Khaz? I'm hopelessly confused.
Grounding isn't a substitute for the recieving end of a battery, not quite... I believe you could call that end of the battery the "circuit ground", which isn't really a ground at all, it's just the "negative" terminal. What I was talking about is "earth ground".

So, okay, the SNES plugs into the wall. The wall outlet provides AC power which the blocky adaptor rectifies to DC. The wire coming from that is two wires - one is "positive"/"negative" the other is "ground". That "ground" is just the centre line of your AC wave. The "positive" is basically the peak of that wave (but less amplitude). Everything that happens inside the SNES should be relative to those voltages - power will flow from the "positive" to the "ground".

What has always confused me though is why some things make use of the ground pin on the wall outlet, and others don't. Why isn't EVERYTHING grounded like that?

Re: How are processors designed today?

Posted: Thu Jul 02, 2015 9:12 pm
by rainwarrior
Voltage is a relative difference between two conductors. "Ground" in a circuit is a point of reference for zero volts. Every other voltage is relative to ground.

Because voltage is relative, it is very important that point of reference be the same across your whole circuit, which means all connections to "ground" have to be connected together. Often this means a large "ground plane" on a PCB, or connecting to the case/chassis of the device if it's made of metal.

A battery is just a device with a voltage that's different on one end than the other. If you have a 12 V battery, if you connect the negative end of it to ground, the positive end is now 12 volts. If you connect the positive end to ground instead, the negative end is now -12 volts. Ground is just a fixed point of reference to measure voltage against. The back of the battery isn't "ground", the back of the battery is connected to it. You can stack batteries in series or connect them to other things, and the voltage on their ends is relative to what they're connected to. (You can connect two 12 volt batteries together to get a 24 volt difference.)

When you have several electronic devices that you connect together, they usually end up sharing a common ground by being connected. This is especially important when you have a human touching them. If a fault in one device causes its ground to have a different voltage than another, you'll have current passing through you if you touch both (potentially painful or fatal).

Re: How are processors designed today?

Posted: Thu Jul 02, 2015 9:20 pm
by rainwarrior
Bregalad wrote:
rainwarrior wrote:I remember a while back Kevtris made a small computer entirely out of NAND chips: http://blog.kevtris.org/blogfiles/NANDputer/
There is no reason to limit you to do that, because using many NAND gates where you could use another type of gate just slows down the circuit for no particular gain.
He did it for fun, not to make an efficient computer. (I don't think anybody building a CPU at home is trying to make an efficient one?)

Re: How are processors designed today?

Posted: Thu Jul 02, 2015 10:26 pm
by lidnariq
Espozo wrote:Also, what's the difference between a P Channel and an N Channel Mosfet? I see that both only have 3 prongs instead of 4, so I'm guessing it's how the 4 prongs are grouped to make 3.
Let's try explaining how an n-type MOSFET works...

First: MOSFET stands for Metal-Oxide-Semiconductor Field Effect Transistor.

Metal-Oxide-Semiconductor because it's made by making a sandwich of metal (or almost-metal) on top of an insulating layer of oxide on top of the underlying semiconductor. This layer of oxide between two conductive layers makes a capacitor.

Field Effect because it uses electric fields to allow current to flow.

A positive voltage on the gate (a lack of electrons) attracts extra electrons to the other side of the capacitor (in the semiconductor)

These extra electrons don't have a dedicated place in the silicon crystal lattice, so they move particularly easily. They cause the normally not-conductive semiconductor to become conductive.

If there is a voltage difference between the "drain" and "source", these extra electrons will allow current to flow.

In fact, one can (although to a limit) allow even more current to flow by attracting more electrons with a higher voltage difference.


So, p-type and n-type MOSFETs behave differently. You can sort of think of them as opposites; unlike the n-type MOSFET which works on electrons, the p-type MOSFET works on "un-electrons", or what solid-state engineers refer to as an "electron hole". Because it's an "un-electron", rather than a positive voltage on the gate to attract electrons, you apply a negative voltage on the gate to attract holes. Or to repel electrons, whatever. Either way, because there's places for electrons to jump between, it's more conductive than without the field there.

Most modern ICs use CMOS: C for complimentary, meaning both n-type and p-type. A CMOS inverter looks like

Code: Select all

          positive supply
             |
        +-o|[--- positive supply
        |    |
input --+    +-- output
        |    |
        +--|[--- negative supply
             |
          negative supply
(This is only one of a myriad number of different symbols for a p-MOSFET, but it's the one that fits being used in ASCII art best)

To enumerate what's happening again:
- A high voltage on the input causes the bottom n-MOSFET to conduct, and (because there's no difference in voltage relative to the body) causes the top p-MOSFET to NOT conduct, pulling the output low.
- A low voltage on the input causes the bottom n-MOSFET to not conduct, and, because the gate is lower than the body, causes the top p-MOSFET to conduct, pulling the output high.

Re: How are processors designed today?

Posted: Fri Jul 03, 2015 5:42 am
by Drew Sebastino
So are you saying that a p channel or an n channel mosfet will flip the value at the end? Or are you saying that the things on the sides that control if the main power goes through (I don't remember what they're called) have to be at different voltages relative to each other? I mean like on a p channel mosfet, they have to be the same to let the power go through, and on an n channel mosfet, they have to be different to let the power go through. How could there be both on a CMOS? (I'm not really getting this.) Could you actually try to use 1's and 0's in your explanations if possible? Isn't the difference between them that the 1 is just at some higher voltage? is there a standard voltage for each that has been said, or does it vary from CPU to CPU?

Re: How are processors designed today?

Posted: Fri Jul 03, 2015 9:43 am
by Sik
Khaz wrote:What has always confused me though is why some things make use of the ground pin on the wall outlet, and others don't. Why isn't EVERYTHING grounded like that?
No idea, the ones that need it the most (due to consuming a lot) are the ones that almost never have it. It's pretty stupid in hindsight (I guess there must be some legal loophole somewhere). There's also the fact that extension cords rarely ever include the ground line so you may as well assume it doesn't exist...

Re: How are processors designed today?

Posted: Fri Jul 03, 2015 10:06 am
by tepples
Sik wrote:No idea, the ones that need it the most (due to consuming a lot) are the ones that almost never have it. It's pretty stupid in hindsight (I guess there must be some legal loophole somewhere).
It probably has something to do with explicit insulation of all exposed metal from contact with electrical components. (Source: Delta Machinery; Citizens Electric)
There's also the fact that extension cords rarely ever include the ground line so you may as well assume it doesn't exist...
Power strips and outdoor extension cords routinely include all three conductors, at least in NEMA markets.

Re: How are processors designed today?

Posted: Fri Jul 03, 2015 11:29 am
by lidnariq
Espozo wrote:So are you saying that a p channel or an n channel mosfet will flip the value at the end? Or are you saying that the things on the sides that control if the main power goes through (I don't remember what they're called) have to be at different voltages relative to each other? I mean like on a p channel mosfet, they have to be the same to let the power go through, and on an n channel mosfet, they have to be different to let the power go through.
As far as 1970s-level digital logic is concerned, all MOSFETs are like light switches:

n-channel MOSFETs conduct between the source and drain if the voltage on the gate is enough higher than the voltage on the body.
p-channel MOSFETs conduct between the source and drain if the voltage on the gate is enough lower than the voltage on the body.
I'm only talking about enhancement-mode MOSFETs. Please ignore depletion-mode MOSFETs for now...

Here's my ASCII art diagrams again:

Code: Select all

    n-MOSFET               p-MOSFET
        drain                  source
          |                      |
gate ---|[--- body     gate --o|[--- body
          |                      |
        source                 drain
These connections are oriented in the way they are because of the "higher on the page = more positive voltage" convention that schematics often use.
Espozo wrote:How could there be both on a CMOS? (I'm not really getting this.)
While it is true that it took engineers a while to figure out how to put both n-MOS and p-MOS elements on the same physical die, I don't think that's what you're asking...

Guessing: we don't put these separate MOSFETs physically on top of each other; they're displaced and connected with wires. (Look at this drawing of an inverter in MAGIC. The upper bit is the p-MOSFET, with the orange; the lower bit is the n-MOSFET, with the green)
Isn't the difference between them that the 1 is just at some higher voltage?
Usually, but not always. The most egregious example that comes to mind is serial communications using RS-232, where "1" is -12V and "0" is +12V.
is there a standard voltage for each that has been said, or does it vary from CPU to CPU?
It varies a lot from device to device. In the 1970s through ... eh, 1993 or so, most things used 5V, but we've slowly reduced operating voltages down through 3.3V, 2.5V, 2V, 1.8V, 1.2V...

Re: How are processors designed today?

Posted: Fri Jul 03, 2015 11:32 am
by Sik
Certainly not over here (・~・) The annoying thing is that the sockets do include the 3 holes... but the plug only has 2 prongs. So ground is going nowhere basically. Ugh.

Re: How are processors designed today?

Posted: Fri Jul 03, 2015 3:51 pm
by Drew Sebastino
lidnariq wrote:n-channel MOSFETs conduct between the source and drain if the voltage on the gate is enough higher than the voltage on the body.
p-channel MOSFETs conduct between the source and drain if the voltage on the gate is enough lower than the voltage on the body.
I'm only talking about enhancement-mode MOSFETs. Please ignore depletion-mode MOSFETs for now...

Here's my ASCII art diagrams again:

Code: Select all

    n-MOSFET               p-MOSFET
        drain                  source
          |                      |
gate ---|[--- body     gate --o|[--- body
          |                      |
        source                 drain
So, it's basically the same thing except the body and the gate are flipped. (Except they aren't but I think you get what I mean) On a 3 pronged thing though, like I said, is it that the source and the body are connected, or is it that the source and the gate are connected?

Re: How are processors designed today?

Posted: Fri Jul 03, 2015 4:17 pm
by lidnariq
Almost always in 3-pin MOSFETs, the body and source are connected, regardless of whether it's n-type or p-type.

It's actually kinda hard to get your hands on a discrete 4-pin MOSFET where all 4 parts are available to the user.

Re: How are processors designed today?

Posted: Fri Jul 03, 2015 5:43 pm
by Drew Sebastino
lidnariq wrote:It's actually kinda hard to get your hands on a discrete 4-pin MOSFET where all 4 parts are available to the user.
Well that's dumb. You can always connect two pins together, but you can't really take them apart.

Re: How are processors designed today?

Posted: Fri Jul 03, 2015 6:49 pm
by lidnariq
Analog Devices has an interesting engineering demonstration using the CD4007, which is three p-MOSFETs and three n-MOSFETs hooked up kinda funny in a single package. But at least the CD4007 gets you access to the body terminal...

Re: How are processors designed today?

Posted: Sat Jul 04, 2015 5:57 pm
by 8bitMicroGuy
Khaz wrote:
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*
Hey I was thinking about that too.
When studying pneumatics and hydraulics in class, I tried to make a pneumatic memory. I did to one extent, but only in the simulator program which was limited and had problems so I couldn't really be precise enough. I think that a pneumatic computer is very makeable in reality. A microfluidic hydraulic computer would be more efficient due to the Coanda effect and higher precision. However, I don't know what would the maximum frequency be. Megahertz-s would cause a lot of hydraulic noise and even hydraulic impact which would cause vibrations and everything exploding. If not that, then corrosion caused by exploding hydraulic bubbles caused by the densification due to hydraulic impact. If the pipes and the pressures would be very little and nicely calculated, it might be somewhat safer.