Author Topic: Make a CPU  (Read 9746 times)

0 Members and 1 Guest are viewing this topic.

Offline Mephitus

  • Regular Contributor
  • *
  • Posts: 174
  • Country: us
  • Dashing, no?
Re: Make a CPU
« Reply #25 on: February 07, 2017, 07:04:38 pm »
I am rather surprised that no one has brought up the "Megaprocessor" http://www.megaprocessor.com
https://www.youtube.com/channel/UCB_Zl-VNSH5DLAtG40riCCg
I love watching this thing in operation.
A true gentleman must be prepared for anything. - Pepe le' Pew
 

Offline Back2Volts

  • Supporter
  • ****
  • Posts: 495
  • Country: us
Re: Make a CPU
« Reply #26 on: February 07, 2017, 09:36:09 pm »
This is a fun site with a lot of pages about the development of the HP 9100 calculator:

http://www.hp9825.com/html/the_9100_project.html

In 1964 Tom Osborne designed and built the prototype in his apartment.  10 digit, floating point.  Discrete diode transistor logic.

I actually used the HP9100B to process tests results and statistical analysis.   It had a nice plotter and (IIRC) a paper tape reader.   At that time I was the techie at the Nuclear Medicine department of a very large hospital in Spain.
 

Offline rfeecs

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: us
Re: Make a CPU
« Reply #27 on: February 07, 2017, 10:19:32 pm »
You might like the labs from this:

MIT 6.004 Computation Structures -> https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-004-computation-structures-spring-2009/index.htm

Starts with design of CMOS gates,  progresses through adders, ALU, a pipelined processor, kernel, ...

Wow.  I took this same class almost 40 years ago!  It had three first time instructors, taking turns and making things up as they went along.  It looks like it still covers basically the same thing.  Starting with digital logic, they designed (on paper) a 32 bit computer with pipelining, virtual memory management, cache memory.  It was based on using a bitslice ALU.  It seemed like a disorganized mess at the time.  But looking back, actually it was a great overview class.
 

Offline JoeN

  • Frequent Contributor
  • **
  • Posts: 991
  • Country: us
  • We Buy Trannies By The Truckload
Re: Make a CPU
« Reply #28 on: February 08, 2017, 04:45:19 am »
I am rather surprised that no one has brought up the "Megaprocessor" http://www.megaprocessor.com
https://www.youtube.com/channel/UCB_Zl-VNSH5DLAtG40riCCg
I love watching this thing in operation.

I did in Reply #17, Reply #25.
Have You Been Triggered Today?
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1438
Re: Make a CPU
« Reply #29 on: February 08, 2017, 09:57:18 am »
So I guess the most basic would be a calculator - addition, multiplication, subtraction, division.
Then do more complicated maths functions; square root, powers. Even increase the number lengths.

And that is a Coprocessor - which can be placed outside of my CPU.
Then I'd perhaps want a bios ROM, to start all systems up, perhaps make some alterations (load sequence of solid state memory).
A chunk of RAM off the CPU
BUS between CPU and external components (RAM, coprocessor etc)
Solid state memory (SD card)

Floating point calculator in the CPU
Obviously some Internal RAM Cache for each part of the CPU
Control Unit (CU) directs the operation of the other units by providing timing and control signals. Most computer resources are managed by the CU. It directs the flow of data between the CPU and the other devices.
Status Register, Flag Register, or Condition Code Register
Hardware register that contains information about the state of the processor. Individual bits are implicitly or explicitly read and/or written by the machine code instructions executing on the processor. The status register lets an instruction take action contingent on the outcome of a previous instruction.
Arithmetic Logic Unit (ALU)
A small coprocessor in the CPU for very basic tasks.

Not too concerned about display, input, or anyother input/outputs - that could all come later, slowly.
Primarily concerned with what parts I'd require for the main CPU, and some other very basic features such as BUS between CPU, coprocessor, RAM, and solid state memory. Not worried about multi cores either.

Have I missed anything?

Hi there,

Are you saying that you want to build the CPU out of discrete components like gates and binary counters and perhaps a ROM and static RAM?

I come from a time when we actually had to do this.  There were CPU's just coming onto the market but we built our own in house version.  It did not have to be too super sophisticated but had to go through a bunch of routines on the fly like most CPU's do.

Since then though i've dealt with the 8080 for example and the Z80 which allowed more functionality with less ground work.

The basics of the simplest computer are:
1.  Clock.
2.  Address Counter.
3.  Memory, RAM, ROM.
4.  Instruction decoder.
5.  I/O port decoding (may include an upload port).
6.  ALU which does all the computing.

The clock obviously clocks the address counter.
The ROM comes first in the address range, so say from 0x0000 to 0x8000.
The RAM comes next, so say from 0x8001 to 0xFFFF.
Some of that range in this simple example would be reserved for the I/O port decoder, which would decode part of the address range for use for input and output to the CPU.
As each clock addresses ROM the instruction is decoded and the action is performed based on how the instruction decoder is designed.  For example a memory word of 0x01 may mean to take the data input bus input and send it to the ALU as the first argument in a calculation.  After some more input we may see a 0x0F 0x0001 which could mean perform an addition and put the result into RAM address 0x0001.  We may see an instruction like 0x10 0x04 which might mean put the result on the data bus for transfer to the outside world through port 4.
The first instruction set in ROM could be just to upload code from a host terminal.  That would allow sending code from say your PC to your new CPU board which would then load it into RAM for later execution.
You can also include a calculator chip that does all the math calculations.  Just have instructions that send data to the chip and can get the result back into memory or to an output port.

So there are a lot of variables here but the basics are not too complicated.  In our in house design back then there was a calculator chip available so we used that.  It was a little slow though but that was the state of things back then.

 

Online ebastler

  • Super Contributor
  • ***
  • Posts: 6497
  • Country: de
Re: Make a CPU
« Reply #30 on: February 08, 2017, 11:21:54 am »
The Kenbak-1 may be worth a look, if you are into retro-computing and CPUs built from TTL chips: http://kenbak-1.net/. The Boston Computer Museum has deemed this the first personal computer, in a contest held in 1986.

Sold from 1971, it pre-dates the availability of microprocessors, and contains a bit-serial CPU made out of TTL chips. The website above is published by the original designer, John Blankenbaker, and includes the original technical manual with full schematics as a PDF.

(Edit: "first personal computer" attribution corrected.)
 
« Last Edit: February 08, 2017, 12:23:34 pm by ebastler »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf