B
Brad
Hi All,
I've heard of Java CPUs. Has anyone implemented a Python CPU in VHDL
or Verilog?
-Brad
I've heard of Java CPUs. Has anyone implemented a Python CPU in VHDL
or Verilog?
-Brad
Hi All,
I've heard of Java CPUs.
Has anyone implemented a Python CPU in VHDL
or Verilog?
I've heard of Java CPUs. Has anyone implemented a Python CPU in VHDL
or Verilog?
Java is a statically-typed language which makes a distinction between
primitive types (bool, int, double, etc) and objects. Python is a
dynamically-typed language which makes no such distinction. Even something
as simple as "a + b" can be a primitive addition, a bigint addition, a
call to a.__add__(b) or a call to b.__radd__(a), depending upon the values
of a and b (which can differ for different invocations of the same code).
This is one of the main reasons that statically-typed languages exist, and
are used for most production software.
Nobody, 01.04.2011 18:52:
I doubt that the reason they are "used for most production software" is a
technical one.
Hi All,
I've heard of Java CPUs. Has anyone implemented a Python CPU in VHDL
or Verilog?
-Brad
On 4/1/2011 11:28 AM Emile van Sebille said...
Sorry - wrong url in the cut'n paste buffer -
http://tsheffler.com/software/python/
Brad said:Hi All,
I've heard of Java CPUs. Has anyone implemented a Python CPU in VHDL
or Verilog?
Brad said:I've heard of Java CPUs. Has anyone implemented a Python CPU in VHDL
or Verilog?
Not that I know of.
I've had thoughts about designing one, just for the exercise.
It's doubtful whether such a thing would ever be of practical use.
Without as much money as Intel has to throw at CPU development, it's
likely that a Python chip would always be slower and more expensive than
an off-the-shelf CPU running a tightly-coded interpreter.
However, wasn't there a Python version that used JVM? Perhaps that might
run on a Java CPU, and it would be interesting to see how well it works.
There were also Forth chips, which let you run Forth in hardware. I
believe they were much faster than Forth in software, but were killed by
the falling popularity of Forth.
John Nagle said:The Forth chips were cute, and got more done with fewer gates than
almost anything else. But that didn't matter for long.
Willow Garage has a custom Forth chip they use in their Ethernet
cameras, but it's really a FPGA.
You probably heard of the infamous FORTH chips like the Harris RTX2000,
or ShhBoom, which implemented a stack oriented very low power design
before there were FPGAs in silicon. To my knowledge the RTX2000 is still
used for space hardened application and if I search long enough I might
fine the one I had sitting in my cellar.
The chip was at that time so insanely fast that it could produce video
signals with FORTH programs driving the IO pins. Chuck Moore, father of
FORTH developed the chip on silicon in FORTH itself.
Due to the fact, that the instruction sets of a FORTH machine, being a
very general stack based von Neumann system, I believe that starting
with an RTX2000 (which should be available in VHDL) one could quite fast
be at a point where things make sense, meaning not going for the
'fastest' ever CPU but for the advantage of having a decent CPU
programmable in Python sitting on a chip with a lot of hardware available.
Note that if you run out of return point stack, or parameter
stack, you're stuck. So there's a hardware limit on call depth.
National Semiconductor once built a CPU with a separate return
point stack with a depth of 20. Big mistake.
The 8-bit PIC microcontrollers have a separate return stack. The PIC10 has
a 2-level stack, the PIC16 has 8 levels, and the PIC18 has 31 levels.
But these chips range from 16 bytes of RAM and 256 words of flash for a
PIC10, through 64-256 bytes of RAM and 1-4K words of flash for a PIC16, up
to 2KiB of RAM and 16K words of flash for a PIC18, so you usually run out
of something else long before the maximum stack depth becomes an issue.
Paul said:You can order 144-core Forth chips right now,
http://greenarrays.com/home/products/index.html
They are asynchronous cores running at around 700 mhz, so you get an
astounding amount of raw compute power per watt and per dollar. But for
me at least, it's not that easy to figure out applications where their
weird architecture fits well.
John said:A tagged machine might make Python faster. You could have
unboxed ints and floats, yet still allow values of other types,
with the hardware tagging helping with dispatch. But it probably
wouldn't help all that much. It didn't in the LISP machines.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.