build a simple cpu

Guest
Hello i am a student in 3rd year of a diploma course in electronics my
project is to build a simple 8-bit cpu. I have to produce a schematic
of the whole thing using flip flops and gates. Then test each separate
building block. And finally produce hardware. What's the simplest way
to start this daunting task?
 
LIMITSTATE@yahoo.com wrote:


Hello i am a student in 3rd year of a diploma course in electronics my
project is to build a simple 8-bit cpu. I have to produce a schematic
of the whole thing using flip flops and gates. Then test each separate
building block. And finally produce hardware. What's the simplest way
to start this daunting task?
First think about the capabilities the CPU. Easy are the operations of the ALU (move, add,
bit test, jump...). More challanging are addressing modes (register, indirect,
indexed...). Think about the time each of these operations and addressing modes consume
(all in a fixed number of clock cycles or dependent on the task).

Then think about an architecture (where to place the ALU, how many busses, how many
registers...).

Then think about how to solve every operation with every addressing mode on the chosen
architecture. This means you have to find something like the states of a state machine.
Re-Work your requirements (operations, addressing modes, architecture) to find a suitable
state machine.

Don't forget to think about the instruction format! Fetching one instruction word or more
leads to big differences in the state machine. Try to code every operation and every
addressing mode in a "smart" way.

And then ... well I think then you are clear how to solve it. ;-)


Do you really have start without any constraints? Finding a suitable instruction set,
helpful addressing modes and finally coding them (hopefully in an orthogonal way) into
some instruction opcodes is not that easy.
Maybe it is helpful to look at common microcontrollers to get aninspiration of the
instruction set. I prefer the Texas Insruments MSP430 as nice RISC CPU. The Zilog Z80 and
the Microchip PIC are not structured so clear like the MSP430.


Ralf
 
LIMITSTATE@yahoo.com wrote:
Hello i am a student in 3rd year of a diploma course in electronics my
project is to build a simple 8-bit cpu. I have to produce a schematic
of the whole thing using flip flops and gates. Then test each separate
building block. And finally produce hardware. What's the simplest way
to start this daunting task?
ALU, CU, Bus and Registers. Have I missed anything?

--

Wing Wong.
Webpage: http://wing.ucc.asn.au
 
<LIMITSTATE@yahoo.com> wrote in message
news:1110554072.817460.151420@g14g2000cwa.googlegroups.com...
Hello i am a student in 3rd year of a diploma course in electronics my
project is to build a simple 8-bit cpu. I have to produce a schematic
of the whole thing using flip flops and gates. Then test each separate
building block. And finally produce hardware. What's the simplest way
to start this daunting task?
Ashenden's book (The Designer's Guide to VHDL) has a case
study on a CPU design. It may be overkill for you, but might show
the way.

He also developed a CPU in the (free) pdf precursor to the book:

http://tech-www.informatik.uni-hamburg.de/vhdl/doc/cookbook/VHDL-Cookbook.pdf
 
Ralf Hildebrandt wrote:
Maybe it is helpful to look at common microcontrollers to get
aninspiration of the
instruction set. I prefer the Texas Insruments MSP430 as nice RISC
CPU. The Zilog Z80 and
the Microchip PIC are not structured so clear like the MSP430.


Ralf
And if you are not afraid of Verilog and bold enough you may take a
peek at my PacoBlaze and S430 projects as a starting point. They are a
PicoBlaze and MSP430 clones respectively, available at:

http://bleyer.org/pacoblaze/
http://www.nongnu.org/s430/

Don't hesitate to email me if you have any questions.

HaPpY hAcKiNg!


-- /"It would appear that we have reached the limits of
PabloBleyerKocik/ what it is possible to achieve with computer
technology,
pablo / although one should be careful with such statements,
as
@bleyer.org / they tend to sound pretty silly in 5 years."-J.von
Neumann
 

Welcome to EDABoard.com

Sponsor

Back
Top