It's interesting to see the way you program the FIFOs, which I recall
was discussed some months ago. I looks like writes are fairly efficient
here since they are done of 8 words at a time. For the VGA code that's
the most important since we produce more data than we consume.
I think the code establishes a few things about the nanocontroller:
* We need computed addresses, so I think it's best to keep the current
scratch memory and IO stage.
* The VGA code does not need a multiplier. As you comment in the
code, the two places you do multiplication can be done by
integrating the products instead. (Except for 'pixel_width *
glyph_heigh', which is fixed for a given video mode and thus
unproblematic.)
Though, other things are not that clear:
* Looking at the inner loop of draw_glyph, it doesn't clearly favour
register-like IO over memory-like IO. I ended up translating the
write_io statements to simple move instructions (rather than
computed values), except if we unroll the loop, in which case the
address writes can be combined with addition of constants 0 to 7.
* I think it's worth considering if we can do context switching
without too much overhead. From the discussion between Patrick and
Tim, I understand interrupts are not strictly needed, but they may
reduce PCI bus traffic.
(One last observation: VGA code is embarrassingly parallel, unless
memory access is the real bottleneck. If we were to add an interrupt
context, then I think we could almost as easily have 2 or 4 symmetric
contexts (threads) instead. I'm just pointing it out for now, since
dealing with resource sharing may however prevent us from exploiting the
parallelism, and I don't know if this is any useful in 3D mode.)
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)