EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Small CPUs in FPGAs

Started by Rick Collins July 31, 2008
--- In f..., "bfranchuk@..." wrote:
>
> Brian Davis wrote:
> > The picture therein demonstrating the R16 to have the
> > crowning element needed to qualify as a "real" computer:
> >
> > A front panel with switches and blinkenlights !!!
> >
> >
> I'm working on that .... (but not R16)
> But alas switches and blinking lights use a lot of I/O pins.

In terms of lights and switches vs IO lines, it isn't really important
that the LEDs be EXACTLY the same as the driving signals. The human
eye can't see them anyway if the duty cycle is low.

My approach is to use one of those SPI LED driver chips (actually, any
of the bidirectional IO ports) and just shift out the value at the
time the shift register is loaded. We're talking about clocking SPI
at multiple megahertz so the sampling frequency is quite high.

There are bi-color driver chips as well and matrix LED displays
(including dual-color)
http://www.sparkfun.com/commerce/product_info.php?products_idh2.

If the CPU is stopped, the LEDs will be correct within a millisecond -
far faster than the eye can process.

I use the same idea for switch inputs: any of the bidirectional IO
expanders will work.

I really like SPI. It is trivial to implement.

> >
> Who at the moment is trying to decide to build 12/24 bit cpu
> or 8/16/32 bit cpu both with 256Kb of memory. Note the 12 bit
> is a nicer design but everything is 8 bit bytes today.
>

I am not looking for a design but if something catches my attention, I
might implement it just for the fun of it.

Richard



To post a message, send it to: f...
To unsubscribe, send a blank message to: f...
rtstofer wrote:
> If the CPU is stopped, the LEDs will be correct within a millisecond -
> far faster than the eye can process.
>
> I use the same idea for switch inputs: any of the bidirectional IO
> expanders will work.
>
> I really like SPI. It is trivial to implement.
>
>
If you use a FPGA that is easy. Right now I am trying to stick
to Thu the hole parts and they sound surface mount.
>>>
>>>
>> Who at the moment is trying to decide to build 12/24 bit cpu
>> or 8/16/32 bit cpu both with 256Kb of memory. Note the 12 bit
>> is a nicer design but everything is 8 bit bytes today.
>>
>>
>
> I am not looking for a design but if something catches my attention, I
> might implement it just for the fun of it.
>
The 16/32 bit design I am looking at is
Byte:mode:op:ac:ix:# #:#:#:#:#:# where all are octal digits
except the leading one where it is 0 or 1
The advantage here is you have 512Kb of direct addressing
rather than 16 bits. The only downside like the 68000 is that
byte # takes up a full word.

> Richard
>
>



To post a message, send it to: f...
To unsubscribe, send a blank message to: f...
Richard wrote:
>
> In terms of lights and switches vs IO lines, it isn't
> really important that the LEDs be EXACTLY the same as
> the driving signals. The human eye can't see them
> anyway if the duty cycle is low.
>
> My approach is to use one of those SPI LED driver chips
> (actually, any of the bidirectional IO ports) and just
> shift out the value at the time the shift register is
> loaded. We're talking about clocking SPI at multiple
> megahertz so the sampling frequency is quite high.
>

I'd envisoned something similar: a JTAG front panel
for homebrew CPU projects.

The on-chip CPU JTAG debug register set could have
address/data bus snooping registers that keep a
4 to 8 bit duty cycle for each bus bit, which would
allow for realistic pattern-dependent LED intensities.

I was worried about sampling artifacts with the
once-in-a-while bus snapshot; e.g. if you're in a
loop whose execution time is a factor of the front
panel update period, you'll get a static display.

I never built one though, so that approach might
work just fine in practice ( you could also randomize
the update period )

A basic switch/LED card with 8|9 bit width could
then be chained to work for 16/32 or 18/36 bit CPUs

The CPU debug interface could then be used with a
debugger and JTAG cable, or you could plug in the
old school hardware instead.

If ever I find time to build one, I can but hope that
it looks half as nice as this:
http://www.sparetimegizmos.com/Hardware/SBC6120_Front_Panel.htm

Brian



To post a message, send it to: f...
To unsubscribe, send a blank message to: f...
--- In f..., "bfranchuk@..." wrote:
>
> rtstofer wrote:
> > If the CPU is stopped, the LEDs will be correct within a millisecond -
> > far faster than the eye can process.
> >
> > I use the same idea for switch inputs: any of the bidirectional IO
> > expanders will work.
> >
> > I really like SPI. It is trivial to implement.
> >
> >
> If you use a FPGA that is easy. Right now I am trying to stick
> to Thu the hole parts and they sound surface mount.

Not really. There are a number of these devices in PDIP. In fact, I
built a 16 hex digit display (4 16-bit registers or 2 32 bit registers
depending on the project) and it uses a 40 pin PDIP MAX 6954APL. At
the time I wasn't doing SMD. Now I rarely use thru-hole components.

> The 16/32 bit design I am looking at is
> Byte:mode:op:ac:ix:# #:#:#:#:#:# where all are octal digits
> except the leading one where it is 0 or 1
> The advantage here is you have 512Kb of direct addressing
> rather than 16 bits. The only downside like the 68000 is that
> byte # takes up a full word.
>
The ARM7's can't load a 32 bit immediate constant either using one
word per instruction. The compiler puts such constants in a nearby
literal pool, if necessary. Sometimes it forms constants by loading
portions of the constant in registers and adding them together. Weird...

Then too, the 60 bit CDC computers had as many as (4) 15 bit
instructions in each word. Totally dependent on the instruction
sequence. Instructions did not overlap word boundaries IIRC.

Richard
Richard



To post a message, send it to: f...
To unsubscribe, send a blank message to: f...
>Posted by: "rtstofer" r...@pacbell.net rtstofer
>Philip,
>
>I wandered around your web site this morning looking for the RISC4005
>project but didn't see it. Is there a link?
>Richard

There is no online documentation on the Risc4005 or its cousin the R16.

Jan Gray's design is extremely similar and has great documentation,
so reviewing his docs would be my recomendation.
>Posted by: "John Kent" j...@optushome.com.au
>
>Hi Philip,
>
>We, well my boss, at the CSIRO used a couple of XC4005s and XC4008s in
>his CLP board back in the mid 90's.
>I'm not sure how much the chips were, but I recall them being in the
>$1,000 price mark in Australia.
>
>John.

That's probably right. With each new generation of FPGA, the biggest
devices are often over $1000 each in small quantities. I think that
when the Virtex line first came out, the biggest chips were over $5000
each. You can get them on eBay these days as surplus for far less :-)
>Posted by: "Brian Davis" b...@aol.com brimdavis
>
>Philip Freidin wrote:
>>
>> And to my surprise, my design got mentioned in the August 2008
>> issue of Circuit Cellar magazine, in an article by Tom Cantrell
>>The picture therein demonstrating the R16 to have the
>crowning element needed to qualify as a "real" computer:
>
> A front panel with switches and blinkenlights !!!
>
>Brian

The Risc4005 XC4005 and its 32K words of memory and 8 channel DAC
are on the board on top. It is self contained and can run stand alone.

The front panel box contains a power supply, and 4 XC3020 FPGAs.
Each is a 4 bit slice of the front panel logic, containing a few
display registers (PC, AC, Bus, Q). The right 8 switches and LEDs
have 1 more XC3020 that does single stepping, Run/Halt, Examine
and Deposit, and also repeated Examine/Deposit for quick wiping
of memory or searching for some pattern.

I really can't understand how we have let computers evolve without
front panels. Very sad :-)
>Posted by: "b...@jetnet.ab.ca" b...@jetnet.ab.ca woodelf1
>
>Brian Davis wrote:
>> A front panel with switches and blinkenlights !!!
>
>I'm working on that .... (but not R16)
>But alas switches and blinking lights use a lot of I/O pins.

Maybe a min pin count serial interface to get the registers
out of the FPGA ? Maybe a multiplexed display controller inside
the FPGA, to use up all the left over CLBs.
================Philip Freidin
p...@fliptronics.com



To post a message, send it to: f...
To unsubscribe, send a blank message to: f...
Philip Freidin wrote:
> The front panel box contains a power supply, and 4 XC3020 FPGAs.
> Each is a 4 bit slice of the front panel logic, containing a few
> display registers (PC, AC, Bus, Q). The right 8 switches and LEDs
> have 1 more XC3020 that does single stepping, Run/Halt, Examine
> and Deposit, and also repeated Examine/Deposit for quick wiping
> of memory or searching for some pattern.
>
> I really can't understand how we have let computers evolve without
> front panels. Very sad :-)
>

Even with out front panels, here is some food for thought
for a nice machine that is begging to be re-implimented again
in hardware.

-------------------
Those with an interest in the ETH Lilith Modula-2 should point their FTP
clients to
ftp://jdreesen.dyndns.org/ftp/lilith

where they will find plenty of data concerning that machine.

Most important is a binary image of the Lilith Systemdisk, and a
directory containing all files ( more then 700..) of that systemdisk.

Among these files are :

Medos binaries and source code.
Modula-2 compiler binaries with source code.
Lilith system utilities with source code.
Bootfiles and system files.
Microcode sources and assembler
Manual
Also available are hardware docu and some screenshots.

Enjoy ,

Jos Dreesen

Server is on a basic DSL line, so download speeds will vary....
---------------


To post a message, send it to: f...
To unsubscribe, send a blank message to: f...
Brian Davis wrote:
> If ever I find time to build one, I can but hope that
> it looks half as nice as this:
> http://www.sparetimegizmos.com/Hardware/SBC6120_Front_Panel.htm
>
I got the switches and PCB for that, but I decided to try my hand
at a homebrew cpu instead.
> Brian
>
That reminds me, I need to update the HD for SBC6120
with the lastest game out .... ADVENTURE Ver 2.0



To post a message, send it to: f...
To unsubscribe, send a blank message to: f...
I was given some PDP-8 design files by Hans Pufal a number of years ago.
The approach he took was to implement the front panel on a VGA display.
He used the numeric keypad section of a PS/2 keyboard for setting the
registers in octal. I have seen numeric key pads in fliers from a local
electronics disposal store so you should be able to get them. The
construction of the display image was done on the fly, using comparators
on the row and column counters but another way would be to have a
separate micro and display controller with pre-initialized block RAM.
You can get disposal LCD display panels for about $50 rather than
allocating a new monitor to the task. Anyway ... that's one way you can
do it. You can even emulate the colour scheme of the original computer
if you are clever.

John.

b...@jetnet.ab.ca wrote:
> Philip Freidin wrote:
>
>> The front panel box contains a power supply, and 4 XC3020 FPGAs.
>> Each is a 4 bit slice of the front panel logic, containing a few
>> display registers (PC, AC, Bus, Q). The right 8 switches and LEDs
>> have 1 more XC3020 that does single stepping, Run/Halt, Examine
>> and Deposit, and also repeated Examine/Deposit for quick wiping
>> of memory or searching for some pattern.
>>
>> I really can't understand how we have let computers evolve without
>> front panels. Very sad :-)
>>
>>
>
> Even with out front panels, here is some food for thought
> for a nice machine that is begging to be re-implimented again
> in hardware.
>
Snip

--
http://www.johnkent.com.au
http://members.optushome.com.au/jekent


To post a message, send it to: f...
To unsubscribe, send a blank message to: f...
John Kent wrote:
> I was given some PDP-8 design files by Hans Pufal a number of years ago.
> The approach he took was to implement the front panel on a VGA display.
> He used the numeric keypad section of a PS/2 keyboard for setting the
> registers in octal. I have seen numeric key pads in fliers from a local
> electronics disposal store so you should be able to get them. The
> construction of the display image was done on the fly, using comparators
> on the row and column counters but another way would be to have a
> separate micro and display controller with pre-initialized block RAM.
> You can get disposal LCD display panels for about $50 rather than
> allocating a new monitor to the task. Anyway ... that's one way you can
> do it. You can even emulate the colour scheme of the original computer
> if you are clever.
>
>
I think I want to get the hardware first designed, then worry about the
display logic.
> John.
>
> b...@jetnet.ab.ca wrote:
>
>>
>> Even with out front panels, here is some food for thought
>> for a nice machine that is begging to be re-implimented again
>> in hardware.
>>
>>
> Snip
>
Check out the Lilith machine... too bad it never made the market place.
I guess nobody wanted a machine with a 'windows' display and mouse
in 1981.



To post a message, send it to: f...
To unsubscribe, send a blank message to: f...
An alternative to using a keypad for the toggle switches would also be
to use a mouse to toggle the switches on the VGA display.

I note the FP6120. The problem with the Intersil (?) 6120 chip was that
my friends wanted to emulate the Digital buses for the PDP-8 (Posibus
and so on) so they could interface old hardware and the 6120 did not
generate the correct bus signals. I have not heard from the guys in
quite a while, so I'm not sure what they did in the end. I was
originally approached by Henk Gooijens, who runs the www.pdp-11.nl web
site who wanted a faster 6809 to run his PDP-8 emulator on. The emulator
was actually originally written by a good friend, Frank Wilson, who I
know from the Flex User Group mailing list. I suggested Henk could
emulate the entire PDP-8 processor in an FPGA, and Hans Pufal was kind
enough to offer us his PDP-8 design.

John.
John Kent wrote:
> I was given some PDP-8 design files by Hans Pufal a number of years ago.
> The approach he took was to implement the front panel on a VGA display.
> He used the numeric keypad section of a PS/2 keyboard for setting the
> registers in octal. I have seen numeric key pads in fliers from a local
> electronics disposal store so you should be able to get them. The
> construction of the display image was done on the fly, using comparators
> on the row and column counters but another way would be to have a
> separate micro and display controller with pre-initialized block RAM.
> You can get disposal LCD display panels for about $50 rather than
> allocating a new monitor to the task. Anyway ... that's one way you can
> do it. You can even emulate the colour scheme of the original computer
> if you are clever.
>
> John.
>
>
--
http://www.johnkent.com.au
http://members.optushome.com.au/jekent


To post a message, send it to: f...
To unsubscribe, send a blank message to: f...

The 2024 Embedded Online Conference