Author Archive for eric
My friend Ken pointed out that unlike a real Elf, my FPGA-Elf didn’t display the contents of memory if you repeatedly press the input button while in load mode with memory protect enabled. At first I couldn’t figure out how the real Elf did that, but careful study of the schematic and the 1802 manual [...]
FPGA-Elf is 100 times faster than original COSMAC Elf
0 Comments Published by Eric July 30th, 2010 in FPGA, RetroChallengeThe original COSMAC Elf ran at 1 to 2 MHz. Every machine cycle required eight oscillator cycles, and each instruction required two or three machine cycles, so each instruction took 8 to 12 microseconds at 2 MHz, or 16 to 24 microseconds at 1 MHz.
The FPGA-Elf runs at 25 MHz when using a Spartan-3E FPGA [...]
Richard Ottosen used my cell phone to shoot a short video of me demonstrating the FPGA-Elf, toggling in and running the dice demo.
Thanks to Jim Donnelly, Richard Ottosen, and Jim Phillips for helping me put together the FPGA-Elf front panel! I never would have been able to get the project completed by the deadline without [...]
I needed a demo program for the FPGA-Elf that was at least a little more interesting than simply counting, so I wrote a dice program. When you press the input button, it simulates rolling a pair of six-sided dice. Perfect for playing board games. The program is 49 bytes long, so it is somewhat tedious [...]
After much gnashing of teeth and pulling of hair, I finally figured out what was causing load mode to fail on the real hardware despite working on the simulator. My “next state” logic didn’t have a default value, so both the simulator and the synthesizer were inferring a latch. However, somehow the synthesizer wasn’t doing [...]
More FPGA-Elf photos and a video
0 Comments Published by Eric July 28th, 2010 in FPGA, RetroChallengeI’ve added some photos of the completed hardware, showing the Avago hexadecimal displays to my FPGA-Elf set. I also shot a brief video showing an LED test, though it is not using the 1802 core. (I got the 1802 core working last night a few hours after I shot the video.)
While I’m on vacation my [...]
FPGA-Elf success! Well, mostly.
0 Comments Published by Eric July 27th, 2010 in FPGA, RetroChallengeI got the switches wired up and working, with a little help from Richard Ottosen. I tested the debouncer, which worked. Then I went for broke and loaded the complete Elf system into the FPGA. After a bit more debugging, it partially works.
What doesn’t work is load mode, so I can’t yet toggle in a [...]
Hexadecimal LEDs wired and working
0 Comments Published by Eric July 27th, 2010 in FPGA, RetroChallengeI’ve wired up the Avago hexadecimal LEDs to the FPGA board and verified that they work with some VHDL test code (not yet tried with the VHDL Elf code). Now I need to wire up the switches.
Does anyone have an interesting game that can be toggled into a basic Elf (just the toggle switches, LEDs, [...]
FPGA-Elf load mode fixed, now can load and run program in simulation
0 Comments Published by Eric July 26th, 2010 in FPGA, RetroChallengeI changed the state machine in my Elf code to something much simpler, based on the observation that in load mode the DMA input cycle *always* is acknowledged immediately, and that I don’t have to wait for the 1802 core state code output to indicate DMA before deasserting the DMA input.
Now I can (in simulation) [...]
I threw together a testbench for the Elf, with the switch debouncing disabled. The testbench tries to use load mode to load a program that has an infinite loop setting and clearing the Q flag, which is available as an output.
The GHDL simulator can dump the state of all the signals as a VCD file, [...]