On 7/2/14, 9:44 PM, Bruce Hoult wrote:One interesting problem with doing that is determining which zero page locations are free for use on the target machine. The Apple II ROM, for example, reserves many of these locations for its own use. Other machines may reserve different locations within the zero page.
I've considered doing this as well :-) As an exercise to learn the LLVM back end as much as anything.
It probably makes sense to allocate 8 or 16 pairs of zero page locations as virtual 16 bit registers and make 32 bit operations available only as library routines/intrinsics.
Well, the stack pointer be a single byte, so pushing things on there doesn't work terribly well.Assuming I pass by reference, that's 128 values absolutely total before it wraps around and silently clobbers itself. It means single byte values will be incredibly inefficient... Tricky stuff.
With regard to code layout, ideally everything would get inlined since I have gobs of memory compared to everything else. I wouldn't need to worry as much about the stack as long as real values don't get stored there.
> What's the one-paragraph current state of FPGA programming? What does one > cost? What support gear do you need (and how much is it)? Is programming > one-shot or can you reuse it?
FPGA boards vary from about $39 up to 1/4 zillion$.
The FPGA manufacturers provide free proprietary tools that work with most of their cheaper parts. For some of their high-end FPGAs they may charge you a body part or two to be able to programme them. The tools will all run on Linux or Windows, or in a VM on a mac (although synthesis, the equivalent of "compiling" can take 2 - 3x longer depending on how good your hypervisor is at handling processes with lots of memory).
Companies like Digilent make lots of nice FPGA development boards. The ones designed for the academic/student market are good choices as they are often good value for money, have lots of interesting ports already included, use FPGAs that are definitely supported by the free versions of the tools and generally have better on-line support.
For the C65GS (the FPGA re-implementation of the 4510 based Commodore 65 that Jeremy mentioned) I am using a Nexys4 board that is US$160 - US$320 depending on whether you have a .edu.* email address or not. This has a shiny new Artix Xilinx FPGA that is very fast, is powered by a USB port, and can fit quite large designs. I work at a University, so mine cost me US$160. The previous generation based on the slower and less capable (but still very capable) Spartan 6 FPGAs are about 1/2 to 1/3 that price. But for me the price is worth it, because I want my 8-bit machine to be fast enough for basic productivity, and low enough power to be turned into a laptop, albeit, one with joystick ports and a 1541 disk drive port.
FPGAs can be infinitely reprogrammed. In fact, they need a flash rom or something to feed them their "program" each time they turn on.
Paul.
_______________________________________________