Building New, Weird CPUs In FPGAs

CPU

The popularization of FPGAs for the hobbyist market means a lot more than custom LED controllers and clones of classic computer systems. FPGAs are also a great tool to experiment with computer architecture, creating new, weird, CPUs that don’t abide by the conventions the industry has used for 40 years. [Victor] is designing a new CPU that challenges the conventions of how to access different memory locations, and in the process even came up with a bit of example code that runs on an ARM microcontroller.

Most of the time, the machine code running on your desktop or laptop isn’t that interesting; it’s just long strings of instructions to be processed linearly. The magic of a computer comes through comparisons, an if statement or a jump in code, where the CPU can run one of two pieces of code, depending on a value in a register. There is the problem of reach, though: if a piece of code makes a direct call to another piece of code, the address of the new code must fit within an instruction. On an ARM processor, only 24 bits are available to encode the address, meaning a jump in code can only go 16 MB on either side of its call. Going any further requires more instructions, and the performance hit that comes along with that.

[Victor] decided a solution to this problem would be to create a bit of circuitry that would be a sliding window to store address locations. Instead of storing the literal address for jumps in code, every branch in the code is stored as a location relative to whatever is in the program counter. The result is an easy way to JMP to code very far away in memory, with less of a performance hit.

There’s an implementation for this sliding window token thing [Victor] whipped up for NXP’s ARM Cortex M3 microprocessor, and he’ll be working on an implementation of this concept in a new CPU over on his git.

Pumping 1080p Video Out Of An FPGA

fpga-pumping-1080p

[Hamster] admits this 1080p HDMI hack for an FPGA doesn’t put a signal that’s fully up to specifications. But as you can see in the image above it does output a 1920×1080 image at 60 Hz, which is the size and frequency of full HD video. It falls just short due to some jitter, which may be just fine if this is only being used for early prototyping and will be replaced with a dedicated encoder later in the design process.

Here he’s chosen a Pipistrello board but thinks that any device which has a Spartan 6 chip with the differential pairs connected to an HDMI socket will work. The difficulty of the task comes in serializing four output channels at 1500 Mb/s each. Because of this just coding your logic isn’t going to work. After roughing out the design [Hamster] went back in and chose to manually place some of the components to ensure that data from each channel arrives at the same time.

While you’re messing with HDMI you may also want to give this overlay hack a try.

A Bitcoin Mining Example For The BeagleBone With An FPGA Shield

beaglebone-fpga-bitcoin-mining

If you’ve got a BeagleBone and an FPGA board you should give this Bitcoin mining rig a try. The hardware uses brute-force to solve hashes, looking for the rare sets that can be used as digital currency. This particular example is designed for the LOGi-bone which is an FPGA shield for the BeagleBone. But we don’t see anything that would make this difficult to use with other FPGA hardware.

We’ve seen FPGA hardware bitcoin mining in the past. It doesn’t offer as much horsepower as an array of GPUs would, but the ARM/FPGA combo can be used in a cluster in order to speed up the process. This sounds like a fun group project to take on at the local Hackerspace.

Stuffing An NES Into An FPGA

megaman_fpga

When the developer of the µTorrent torrent client and the ScummVM  LucasArts adventure game interpreter gets bored, something cool is bound to happen. Luckily for us, [Ludde] was a bit listless over Christmas, and with more time than energy to burn, implemented a Nintendo Entertainment System on an FPGA dev board.

The NES was powered by a Ricoh 2A03 CPU, a chip nearly identical to the 6502 found in the Commodore 64s and Apple IIs of the early 1980s. There are a few differences between the two, though: the NES CPU includes an Audio Processing Unit on the chip and is connected to a very cool Picture Processing unit elsewhere on the NES. [Ludde] put all these chips in his Spartan-6 FPGA with a lot of Verilog code.

The rest of the system – the RAM, display output, and controller input comes from the peripherals attached to the FPGA dev board. [Ludde]’s specific board didn’t have a good digital to analog converter, so the composite output was traded for a VGA output. It’s not a completely accurate color pallet, but it’s still an amazing piece of work for someone who was simply bored.

Breathing Life Into An Old LCD

panel

Out of the depths of a junk drawer, [Alex]’s friend pulled out an old monochrome LCD display. This is an older low-resolution display from ancient electronics that unfortunately doesn’t have its own controller chip. No worries, though, because with the help of an FPGA [Alex] figured out how to drive this display.

On the back of this display are eight Hitachi LCD drivers, six column shifters and two row shifters, allowing the LCD to display a 256×128 pixel image. Without an LCD controller, though, [Alex] couldn’t just send a static image to the LCD. Instead, he had to continuously refresh the display just like a VGA monitor.

With the help of a 1500-page PDF titled Hitachi LCD Controller/Driver LSI Data Book, [Alex] was able to dump pixels into the ICs on the display with the help of a Papilio One FPGA board. A lot of work just to display the beautiful [Lena], but she wouldn’t have it any other way.

Hackaday Links: January 17th, 2013

Free-formed VFD clock

links-free-formed-vfd-clock [James] doesn’t need a circuit board or even some protoboard to get the job done. He free-formed all the circuits for his VFD clock. Right now this is the only project hosted on his blog so click around to see how he got to this point.

DIY LED traffic light

links-diy-traffic-light

Here’s a scratch-build traffic light which [Jarle] uses to display information about his server. If you’re unable to find your own storm damaged original this is a pretty easy way to build one.

FPGA space attack game

links-classic-shooter-running-on-fpga

This game is running on an FPGA, but it’s not written in HDL. Instead, [Johan] wrote the game in C to run on a soft processor loaded on the gate array.

Hourglass entropy

links-hour-glass-entropy

This is a fascinating idea for generating random numbers. [Gijs] is shining a laser onto a light dependent transistor. The beam of the laser is broken by the falling sand of an hourglass. This technique could be use as an entropy source for random number generation.

GPS clock source for a digital timepiece

links-gps-clock

It seems like massive overkill, but you can’t beat the time accuracy of using a GPS module as a clock source. We don’t expect that [Jay] kept the clock in one piece after finishing the project. It’s just a good way to practice decoding the GPS data.

Raspi Astrophotography Board Also Does Everything Else

FPGA

A few years ago the folks at Astro Designs put together a board that took off-the-shelf CCD sensors from point and shoot cameras and turned them into respectable astrophotography sensors. Since then, the world has seen an explosion of Raspberry Pis, Arduinos, and other microcontroller platforms, making this the perfect time for a hardware revision.

Their PiXi-200, like their previous AstroCam board, is able to take image sensors out of cameras and turn them into telescope mounted cameras. That’s only one of its tricks, though: The PiXi-200 also has accelerometers, gyroscopes, enough UARTs to do just about anything, a four channel ADC and four channel DAC, two dozen GPIO pins, enough LEDs and buttons for any project, and a 200,000 gate FPGA. All this in a board that plugs directly into the GPIO pins on the Raspberry Pi just like an Arduino shield. Needless to say, there’s a lot you can do with this board.

Right now, the design is still in the prototype stage, but once everything is finalized the basic model of the board will sell for £30 GBP ($50 USD). The high-end “Model C” board, with all the bells and whistles, will sell for £45 GPB ($70 USD).