Subject: Re: Lisp on an FPGA
From: (Rob Warnock)
Date: Sun, 11 May 2008 22:27:27 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
J�rgen B�hm  <> wrote:
| Under the working title "LispmFPGA" I recently completed a first
| milestone on the way to an autonomous, "bare metal" Lisp on a CPU
| specifically designed to execute compiled Lisp code.

Neat! Looks like a fun project!

| All this is implemented with Verilog HDL on a Xilinx Spartan 3 FPGA.

Just curious... Why did you pick the Spartan 3 over other Xilinx FPGAs?
Was it mainly the availability/price of the Starter Kit?

If I were to do something like this myself, I'd probably not bother
with designing a CPU per se but just use some flavor of the Xilinx
Virtex II line which has an on-chip PPC processor (1-4, actually,
depending on model/cost), and then just code a Lisp VM in tight
PPC assembler [but compiled from sexpr-based DSL code, of course!].

| The FPGA board as used now provides in addition to the above features
| 1MB=256Kx32bit SRAM.

In <> you note
that this is an "ISSI" SRAM, but I don't seem to see it in the picture
of the Starter Kit. Is it on the other side of the board?

| - a lisp programming toy
| Additionally, as a system like the above (even with more RAM) can be
| realized for about 100$, it might become a toy for Lisp enthusiasts and
| a learning tool for young people who want to own and program a computer
| they can understand and control completely, as was the PET 2001 or C64
| in former times.

Again, I might be tempted to look at other platforms that already have
a CPU included, and concentrate my efforts on a tight Lisp VM and/or
integration between the Lisp code and the "custom hardware" that the
FPGA gives you. That is, an ARM or PPC plus an FPGA, or any of a number
of 8- or 16-bit CPUs with built-in hardcoded USB interfaces, e.g., PIC
or Atmel, etc. These pages list a number of such for USB 1.1 and USB 2.0:

Oh, cute! Here's one [found via the above pages] that has your
Xilinx Spartan 3 FPGA on it, along with a Cypress CY68013A FX2LP
USB microcontroller, 64 MiB SDRAM, 1 MiB SRAM (512 KiW x 18),
8 MiB flash, and other goodies:

Oops, price is a bit steep: $750/q1. Oh, well, they also have a smaller
[only 31 MiB SDRAM, no SRAM or flash], cheaper one ["only"(?) $350/q1]:

Or if one prefers Ethernet, something like the PIC18F97J60 family,
which has embedded Ethernet and enough on-chip RAM to run the core
of a Lisp VM (with the user code being in external SRAM, of course).
There are lots of interesting little Ethernet -- and some WiFi --
development boards at reasonable prices here:

Or both, with Atmel's ARM-based AT91RM9200, which has both USB
and 10/100 Ethernet. [Hmmm... Pricing is only $12/q50k [$25/q1?],
but the development board is $5000. Ouch!]

Wow! I didn't realize the array of choices of development boards and
interfaces was so wide. This is going to take some more study...  ;-}  ;-}

| - a microcontroller programmable in Lisp(????)
| This would make a complete overhaul of the CPU necessary,
| to get a more compact opcode structure. ...

Yeah, for that you might want to look at one of the versions of the
Xilinx Virtex II [mentioned above] which already have embedded CPUs.

But one of your indirect points is still quite correct: It's gotten
quite difficult for the average beginning experimenter to put together
"computers" unless you use some kind of pre-built development board.

Anyway, good luck with it...


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607