I'm not getting it. I guess the software had to be done this way to
optimize the CPU utilization. The "proper" way to time in software is
to have the video data already calculated in a frame buffer and use spin
loops to time when pixels are shifted out. That way you don't have lots
of processing to figure out the timing for. But you spend most of your
processing time in spin loops. Why was it done this way? To save a few
bucks on video hardware? That's just not an issue now days... unless
you are really obsessive about not using hardware where hardware is
warranted.
> Caveat: The above assumes that there is no interrupt per horizontal
> pixel. With interrupts, it's much easier. The Propeller doesn't have
> any interrupts so software video generation would be non-trivial to
> say the least. The easiest way would be to provide a pixel clock and
> use an I/O pin to sync to, as Chuck found out for himself when
> implementing video on the GA144.
I would have to go back and reread the web pages, but I think Chuck's
original attempt was to time the *entire* frame timing in software with
NO hardware timing at all. He found the timings drifted too much from
temperature (that's what async processors do after all, they are timed
by the silicon delays which vary with temp) so that with the monitor he
was using it would stop working once the board warmed up. I'm surprised
he had to build it to find that out. But I guess he didn't have specs
on the monitor.
His "compromise" to hardware timing was to use a horizontal *line*
interrupt (with a casual use of the word "interrupt", it is really a
wait for a signal) which was driven from the 10 MHz oscillator node,
like you described the Atari VCS. He still did the pixel timing in a
software loop. With 144 processors it is no big deal to do that... *OR*
he could have sprinkled a few counters around the chip to be used for
*really* low power timing. Each CPU core uses 5 mW when it is running a
simple timing loop. One of the big goals of the chip is to be low power
and software timing is the antithesis of low power in my opinion. But
then you would need an oscillator and a clock tree...
I think there is an optimal compromise between a chip with fully async
CPUs, with teeny tiny memories, no clocks, no peripherals (including
nearly no real memory interface) and a chip with a very small number of
huge CPUs, major clock trees running at very high clock rates, massive
memories (multiple types), a plethora of hardware peripherals and a
maximal bandwidth memory interface. How about an array of many small
CPUs, much like the F18 (or an F32 which rumor has is under
development), each one with a few kB of memory, with a dedicated idle
timer connected to lower speed clock trees (is one or two small clock
trees a real power problem?), some real hardware peripherals for the
higher speed I/O standards like 100/1000 Mbps Ethernet, real USB
(including USB 3.0), some amount of on chip block RAM and some *real*
memory interface which works at 200 or 300 MHz clock rates?
I get where Chuck is coming from with the minimal CPU thing. I have
said before that I think it is a useful chip in many ways. But so far I
haven't been able to use it. One project faced the memory interface
limitation and another found the chip to be too hard to use in the low
power modes it is supposed to be capable of, just not when you need to
do real time stuff at real low power. It only needs a few small
improvements including *real* I/O that can work at a number of voltages
rather than just the core voltage.
Oh yeah, some real documentation on the development system would be
useful too. I think you have to read some three or more documents just
to get started with the tools. I know it was pretty hard to figure it
all out, not that I *actually* figured it out.
Rick