Go Down

Topic: 8 bit computer questions.  (Read 1 time) previous topic - next topic

Arduino99

May 01, 2017, 05:11 pm Last Edit: May 01, 2017, 05:18 pm by Arduino99
Okay, so I'm building a 8 bit computer from scratch using ttl chips, I'm following a youtuber called "Ben Eater" however I'm building mine a bit different than his and would like to know if these differences would still work in a 8 bit computer.

Instead of a 4 bit memory address register I'm using a 8 bit due to the more address lines.

(Not built yet!) Also with the memory instruction register, his is 4 bit ,will a 8 Bit work?

And with the program counter instead of a 4 bit I'm using a 8 bit program counter.

KeithRB

This totally depends on you. Yes, it should work.

Robin2

What are you using the Arduino for?  And what Arduino?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Arduino99

In this project im using a Arduino to program a EEPROM, but i had these questions about the rest of the project. It was either This forum or yahoo answers.....

MrMark

#4
May 01, 2017, 08:18 pm Last Edit: May 01, 2017, 08:20 pm by MrMark
In the overview video I started to watch, he says the computer is based on the SAP-1 ("simple as possible") architecture from a text book.  The first SAP-1 link I found was this (cad-sapreport.pdf)* which says that the 8-bit instructions are 4 bits opcode plus 4 bit immediate address, so if you expand the address space, this would have to change.  Without having looked at details, it might be as simple as going to a 12 bit word length for the architecture, but if you change his architecture, you will have this sort of ripple effect**.

Of course if you have 8 bit wide components, you can simply use 4 bits of them, but I think you're asking how you would expand the address space.

* - For what it's worth there seem to be quite a few FPGA implementations of the architecture floating around the web.

** - Some of the PIC microcontrollers use 8 bit data paths but wider instruction paths.  That doesn't appear to be an option here because the SAP-1 uses a shared instruction and program memory architecture.

DrAzzy

#5
May 01, 2017, 08:20 pm Last Edit: May 01, 2017, 08:20 pm by DrAzzy
As others have noted, where does the Arduino come into your make-a-computer project? It sounds like a non-arduino electronics project...

It's super easy to make an 8-bit computer with an arduino; just open the box and presto: You're holding an 8-bit computer ;-)
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

lastchancename

#6
May 02, 2017, 08:47 am Last Edit: May 02, 2017, 08:48 am by lastchancename
Take a look, search and ask questions at EEVBLOG
There are several homebrew TTL computer threads over there.
Q: How many searches did you make before posting this question?      A: none
At the very least, take a guess at the solution, then we can help move forward from what you know already.

AWOL

It's super easy to make an 8-bit computer with an arduino; just open the box and presto: You're holding an 8-bit computer ;-)
Or are you?
The data paths may be eight bit, but the instruction paths are sixteen bit. 
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.
I speak for myself, not Arduino.

Arduino99

In the overview video I started to watch, he says the computer is based on the SAP-1 ("simple as possible") architecture from a text book.  The first SAP-1 link I found was this (cad-sapreport.pdf)* which says that the 8-bit instructions are 4 bits opcode plus 4 bit immediate address, so if you expand the address space, this would have to change.  Without having looked at details, it might be as simple as going to a 12 bit word length for the architecture, but if you change his architecture, you will have this sort of ripple effect**.

Of course if you have 8 bit wide components, you can simply use 4 bits of them, but I think you're asking how you would expand the address space.

* - For what it's worth there seem to be quite a few FPGA implementations of the architecture floating around the web.

** - Some of the PIC microcontrollers use 8 bit data paths but wider instruction paths.  That doesn't appear to be an option here because the SAP-1 uses a shared instruction and program memory architecture.
So in order for me to use a 8 bit memory address  register I'll have to increase the number of address lines to 12 and almost everything else to 12? It is possible but I've already spent enough on parts on this project so If that's the case I'll just reduce the size of the memory address register down to 4, after work or course...

MrMark

So in order for me to use a 8 bit memory address  register I'll have to increase the number of address lines to 12 and almost everything else to 12? It is possible but I've already spent enough on parts on this project so If that's the case I'll just reduce the size of the memory address register down to 4, after work or course...
You'd have to increase the data path to 12 bits (i.e. memory width because it stores 12 bit instructions and probably the accumulator width as well).  There would be 8 address lines instead of the current 4.

Given that the processor is a demonstration of basic computer concepts rather than an implementation of a practical computing device, it seems expanding the memory space is a lot of extra work for little marginal benefit.

Arduino99

You'd have to increase the data path to 12 bits (i.e. memory width because it stores 12 bit instructions and probably the accumulator width as well).  There would be 8 address lines instead of the current 4.

Given that the processor is a demonstration of basic computer concepts rather than an implementation of a practical computing device, it seems expanding the memory space is a lot of extra work for little marginal benefit.
Yeah, i think i'll just put the address register back to 4 bits.... Thanks for the high amount of info, this is my first large project so im not 100% sure on what im doing XD

3D8192

Easy way would be to extend the opcode width to 12-bit, thus maintaining the 4-bit opcode +n bit (8 in your case) address space.

There are just as simple designs though that use a 16 bit address space with 8-bit opcodes and 8-bit ALU.   So it may be worth looking at other 8-bit TTL CPU designs, there are many out there.    It is not that much more difficult to have a 24 bit address space with an 8-bit design for that matter (just adding 2 8-bit bank registers and a few opcodes for dealing with them).

I have found that it is often easier to use a true pipelined semi-CISC design to implement CPU designs, including 8-bit.

Though what ever works for you go get into the concepts is great, I am a firm believer that those that use computers should know how to program, and have designed at least one CPU with a complete computer around it.

allanhurst

#12
Jun 02, 2017, 10:32 pm Last Edit: Jun 02, 2017, 10:51 pm by allanhurst
Quote
I am a firm believer that those that use computers should know how to program, and have designed at least one CPU with a complete computer around it.
That's a pretty severe requirement.

What about the millions of schoolkids who can use a fancy mobile phone much quicker that you or I?

What about all the enthusiastic but ignorant newbies on this forum?

What about all those poor sods in call centres working for a pittance?

Let them all rot?

Would you have everyone who uses a lathe or a pen or a spade design one first?

We all had to start somewhere.

Allan

Go Up