EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: iceisfun on July 09, 2013, 07:45:39 pm

Title: Best beginner processor to implement?
Post by: iceisfun on July 09, 2013, 07:45:39 pm
I want to implement a z80 or 8086 (or other, suggestions) machine to do some learning.

It would be nice to get enough memory accessible to do a few 512x512x4 buffers and floating point access, I know some of these processors have optional fpu.
Title: Best beginner processor to implement?
Post by: madshaman on July 09, 2013, 08:00:08 pm
Go for something with a simpler instruction set like a 6502 or a 6809.  The 8086 and z80 are practically siblings (read the history of the z80) and have a larger instruction set to implement.

I assume you're going to do a scratch registers + mutliplexor/demultiplexor + ALU with microcode solution?

(I'm no expert, the only uC I ever implemented myself [in hardware that is] was in uni using EPROMs and PALs, because I'm ancient ;-p )

Edit: I know that doesn't address your desire for floating point, but I can't think of a simple processor that has it.  Was going to suggest Arm32 as well, but again, no floating point by default.

Maybe an 8086/8087 combo really is the best/simplest choice, but it's still a decently large instuction set, especially when you have to implement the system level instructions too.
Title: Re: Best beginner processor to implement?
Post by: dfmischler on July 09, 2013, 10:50:09 pm
Are you planning to implement the CPU in some kind of logic, or use a microprocessor?  I'm guessing implementing the CPU outright, but its not really clear.

The simplest machine I ever worked with was a PDP-8.  And there are loads of websites that describe it, maybe even in sufficient detail to implement it (plus simulators, and even partly working VHDL if you want to use a fpga).  But the result is a 12-bit machine with 4K words, or up to 32K words if you implement the memory expansion..
Title: Re: Best beginner processor to implement?
Post by: iceisfun on July 11, 2013, 01:26:34 am
I do not mind bigger instruction sets or having to implement memory paging and drivers.

What I really want here is to be able to have several (16?) mb addressable memory and floating point processing for vector math, eventually I want to implement a ff pipeline for rendering through a fpga but a good first step is making a processor tick.

I don't understand hardware memory buses and addressing very well
Title: Re: Best beginner processor to implement?
Post by: cthree on July 11, 2013, 01:33:26 am
I think you should get a Raspberry Pi and call it a day. If you really want an 8086/Z80/8088 I suggest looking for one at a museum.

(http://upload.wikimedia.org/wikipedia/commons/6/69/IBM_PC_5150.jpg)
Title: Best beginner processor to implement?
Post by: WarSim on July 11, 2013, 02:57:41 am
Cthree you know 2 months ago I found a place still making 8086s.  I was surprised.  So many years later and still being produced. 
Title: Re: Best beginner processor to implement?
Post by: Alexei.Polkhanov on July 11, 2013, 03:33:36 am
I do not mind bigger instruction sets or having to implement memory paging and drivers.

What I really want here is to be able to have several (16?) mb addressable memory and floating point processing for vector math, eventually I want to implement a ff pipeline for rendering through a fpga but a good first step is making a processor tick.

I don't understand hardware memory buses and addressing very well
Good lecture from Cornell univ. on FPGA - there in lecture 5 and 6 they talk about stack-based processor implemented in FPGA. Memory handling for Cyclone II board that they use is discussed earlier. FPGA - Lecture #5 -- lab 2 audio filtering (https://www.youtube.com/watch?v=DQVRNg713nk#) I just started watching it myself actually. URL for sample code appears to be here: http://people.ece.cornell.edu/land/courses/ece5760/DE2/ (http://people.ece.cornell.edu/land/courses/ece5760/DE2/)
Title: Re: Best beginner processor to implement?
Post by: cthree on July 11, 2013, 03:40:10 am
Cthree you know 2 months ago I found a place still making 8086s.  I was surprised.  So many years later and still being produced.

I would bet money on there being process control machines on a factory floor somewhere running on 8086/8088 PC clones.
Title: Re: Best beginner processor to implement?
Post by: cthree on July 11, 2013, 03:57:18 am
I do not mind bigger instruction sets or having to implement memory paging and drivers.

What I really want here is to be able to have several (16?) mb addressable memory and floating point processing for vector math, eventually I want to implement a ff pipeline for rendering through a fpga but a good first step is making a processor tick.

I don't understand hardware memory buses and addressing very well
Good lecture from Cornell univ. on FPGA - there in lecture 5 and 6 they talk about stack-based processor implemented in FPGA. Memory handling for Cyclone II board that they use is discussed earlier. FPGA - Lecture #5 -- lab 2 audio filtering (https://www.youtube.com/watch?v=DQVRNg713nk#) I just started watching it myself actually. URL for sample code appears to be here: http://people.ece.cornell.edu/land/courses/ece5760/DE2/ (http://people.ece.cornell.edu/land/courses/ece5760/DE2/)

I worked on a 32 bit stack based CPU that was actually pretty cool. I was leading a team porting PersonalJava vm to is which was actually the claim to fame for the CPU, the javaVM uses a stack architecture internally so it 'almost' ran natively on the CPU. It turned out it wasn't that simple.

For those that don't know what a stack processor is, rather than loading resisters with data and then executing an instruction, you push your data into a stack and then execute the instruction which replaces your data with the result on the top of the stack, aka RPN. From there you can push more data and execute more instructions. It's actually a pretty cool architecture.
Title: Re: Best beginner processor to implement?
Post by: johnboxall on July 11, 2013, 07:58:52 am
I want to implement a z80 or 8086 (or other, suggestions) machine to do some learning.

It would be nice to get enough memory accessible to do a few 512x512x4 buffers and floating point access, I know some of these processors have optional fpu.

Build a TEC-1. :)

See:
http://www.talkingelectronics.com/TE-1-15_pdfs/TE-Issue10.pdf (http://www.talkingelectronics.com/TE-1-15_pdfs/TE-Issue10.pdf)
http://www.talkingelectronics.com/TE-1-15_pdfs/TE-Issue11.pdf (http://www.talkingelectronics.com/TE-1-15_pdfs/TE-Issue11.pdf)
http://www.talkingelectronics.com/TE-1-15_pdfs/TE-Issue12.pdf (http://www.talkingelectronics.com/TE-1-15_pdfs/TE-Issue12.pdf)
http://www.talkingelectronics.com/TE-1-15_pdfs/TE-Issue13.pdf (http://www.talkingelectronics.com/TE-1-15_pdfs/TE-Issue13.pdf)
http://www.talkingelectronics.com/TE-1-15_pdfs/TE-Issue14.pdf (http://www.talkingelectronics.com/TE-1-15_pdfs/TE-Issue14.pdf)
http://www.talkingelectronics.com/TE-1-15_pdfs/TE-Issue15.pdf (http://www.talkingelectronics.com/TE-1-15_pdfs/TE-Issue15.pdf)
Title: Re: Best beginner processor to implement?
Post by: EEVblog on July 11, 2013, 08:11:25 am
I want to implement a z80 or 8086 (or other, suggestions) machine to do some learning.
It would be nice to get enough memory accessible to do a few 512x512x4 buffers and floating point access, I know some of these processors have optional fpu.

Wouldn't ARM be more relevant these days?
I assume you want to program in assembler then?
Title: Re: Best beginner processor to implement?
Post by: EEVblog on July 11, 2013, 08:11:53 am
Build a TEC-1. :)

YES!
Title: Re: Best beginner processor to implement?
Post by: amyk on July 11, 2013, 10:30:27 am
By "implement a machine" do you mean actually implementing the processor core, or just building a systemusing one? In any case if you're preferring Z80/x86 line, and want 16M of memory, then maybe a 286 could be your choice.

I would bet money on there being process control machines on a factory floor somewhere running on 8086/8088 PC clones.
Military and aerospace, actually.
http://www.intersil.com/en/products/space-and-harsh-environment/-883/microprocessors-and-peripherals/80C86-883.html (http://www.intersil.com/en/products/space-and-harsh-environment/-883/microprocessors-and-peripherals/80C86-883.html)
($325 in 1ku :o)
http://www.intersil.com/en/products/space-and-harsh-environment/-883/microprocessors-and-peripherals/80C88-883.html (http://www.intersil.com/en/products/space-and-harsh-environment/-883/microprocessors-and-peripherals/80C88-883.html)
($533 in 1ku :o :o :o)
Title: Re: Best beginner processor to implement?
Post by: cthree on July 11, 2013, 02:19:32 pm
By "implement a machine" do you mean actually implementing the processor core, or just building a systemusing one? In any case if you're preferring Z80/x86 line, and want 16M of memory, then maybe a 286 could be your choice.

I would bet money on there being process control machines on a factory floor somewhere running on 8086/8088 PC clones.
Military and aerospace, actually.
http://www.intersil.com/en/products/space-and-harsh-environment/-883/microprocessors-and-peripherals/80C86-883.html (http://www.intersil.com/en/products/space-and-harsh-environment/-883/microprocessors-and-peripherals/80C86-883.html)
($325 in 1ku :o)
http://www.intersil.com/en/products/space-and-harsh-environment/-883/microprocessors-and-peripherals/80C88-883.html (http://www.intersil.com/en/products/space-and-harsh-environment/-883/microprocessors-and-peripherals/80C88-883.html)
($533 in 1ku :o :o :o)

Wow and yeah, that makes sense. I heard the Hubble telescope ran on a '386 CPU somewhere, probably while they wee fixing it  ;)
Title: Re: Best beginner processor to implement?
Post by: cthree on July 11, 2013, 02:25:16 pm
I want to implement a z80 or 8086 (or other, suggestions) machine to do some learning.

It would be nice to get enough memory accessible to do a few 512x512x4 buffers and floating point access, I know some of these processors have optional fpu.

Build a TEC-1. :)


I'd love to know what the BOM cost on one of those is these days. Samsung dropped the price of their. 11" chromebook to $169, could you build a tec1 for twice that? I dunno. Still, if the goal is software development, you can't beat the RPi for features or price.