Discrete FPGA will probably win the 7400 logic competition

For this year’s 7400 logic competition, [Nick] decided to build an FPGA out of logic chips.

Perhaps a short explanation is in order to fully appreciate [Nick]‘s work. The basic component of an FPGA is a slice, or cell, that performs boolean operations on its input and sends the result on its output. The core of these slices is a lookup table – basically a truth table that stores the result of every possible input combination.

One very easy way to implement a lookup table is to use a RAM or EEPROM chip. By tying the address lines of an EEPROM to the input and the data lines to the output, it’s possible to create a single slice of an FPGA very easily.

Unfortunately for [Nick], 74-series memories have long been out of production. There is another option open, though: shift registers. A shift register is basically an 8-bit memory chip with parallel inputs, so combining a shift register with an 8-input multiplexer is a very simple way to implement a 3-input, 1-output FPGA slice.

After figuring out how to tie these slices to bus lines, [Nick] needed a way to program them. Verilog or VHDL would border on insanity, so he wrote his own hardware description language. It’s certainly not as powerful or capable as the mainstream solutions to programming an FPGA, but it’s more than enough.

In the video after the break, you can see [Nick]‘s overview of his very large 8-slice FPGA while he runs a combination lock and PWM program. All the code, schematics, and board layout are up on [Nick]‘s git if you’d like to build your own.
[Read more...]

Storing user data on your FPGA

We’ve seen FPGAs used to recreate everything from classic arcade games to ancient computers, but with each of these builds a common problem arises. Once you’ve got the hardware emulated on an FPGA, you’ve also got to get the ROMs into the project as well. In a very interesting hack, [Mike] figured out that the serial Flash chip that stores the FPGA settings has a lot of space free, so why not store user data there?

[Mike] got the idea from seeing a recreation of the classic BombJack arcade game we featured last month. In that build, [Alex] needed to store 112Kb of game data stored in 16 ROM chips. Unfortunately, [Alex]‘s FPGA only had space for 40Kb of data. After realizing his FPGA had a 512Kb SRAM chip, [Alex] decided to put all the sprites, sounds, and levels of BombJack in the SRAM.

Impressed with [Alex]‘s build, [Mike] set to work generalizing the hack to work with other projects. [Mike] notes that only a few FPGA boards are capable of storing user data next to the  configuration bitstream; the hack is impossible on the Digilent Basys2 board, but it works wonderfully on a Papilio One 250K.

As a very cool build that makes FPGA-related builds even easier, we’ve got to tip our hat to [Mike] for writing up a great tutorial.

LVDS on an FPGA could make it possible to reuse laptops LCDs and the like

Search around the Internet and you’ll find a landfill of forum threads asking how to drive the LCD screen from a dead laptop. The answer is always that there is just no way to do it. That’s because most of them use a Low-Voltage Differential Signalling protocol that just isn’t available through the hardware used in hobby projects. But the appearance of this board could signal that things are about to change. We don’t want to get your hopes up too much. This isn’t an open source project, but it is a piece of hardware that can make LVDS available for the 8, 16, and 32-bit microcontrollers you’re used to working with.

It’s a derivative of a project [Thomas Jespersen] worked on for a customer. It uses an FPGA to implement the LVDS standard used by high-pixel-count LCD displays. It contains enough memory for a full frame-buffer, and includes a Motorola-8080 communication standard. [Thomas] gives a full description of how the setup works in the video after the break. Demonstrations start about 7:30 into the video with an STM32 F4 Discovery board driving the display.

[Read more...]

Homebrew FPGAs

Homebrew CPUs made out of logic chips are nothing new, but a homebrew FPGA is another matter entirely. [Joshua] sent in a project he whipped up where he made a single logic cell FPGA.

Despite how complicated and intimidating they are in practice, FPGAs are really very simple. They’re made of thousands of logic blocks capable of transmuting into AND, OR, NAND, and XOR logic gates. These logic blocks are all tied together, and with a somewhat complex hardware design language are capable of becoming a CPU, a micocontroller, or even a video card. Basically, programming a microcontroller tells a chip what to do, while programming an FPGA tells the chip what to be.

To build his single logic block FPGA, [Joshua] used a four-bit multiplexer to hard wire a truth table out of a 74HC174 D-type flip-flop. A bit of Arduino code changes the state of the pins connected to the multiplexer allows for any combination of TRUE and FALSE to be calculated for AND, NAND or XOR logic functions.

Yes, it’s only a single logic block for an FPGA, and if this build were expanded to even a few hundred cells it would be gargantuan. Still, there’s no better way to learn the ins and outs of abstract hardware, so we’ll gladly tip our hat to [Joshua] and his homebrew FPGA.

Using an undocumented display with an FPGA

When [Mike] ran across a display on Deal Extreme with 8 seven-segment displays, 8 red/green LEDs, and 8 buttons, he knew it would find a good home in a future project. There was only one problem, though: except for an Arduino library, there was absolutely no documentation available for this display. Wanting to use this display with an FPGA board, [Mike] decided against bit-banging a protocol and ported the C++ code into a hardware implementation.

This Deal Extreme display, the TM1638, features enough seven-segment displays, LEDs and buttons to build something really cool, and surprisingly isn’t terribly hard to interface with a microcontroller. The TM1638 library communicates with the outside world via only three pins and a simple serial connection.

After figuring out what commands are sent to make the display turn LEDs on or off, [Mike] wrote a hardware implementation for his Digilent Nexys2 and Digilent Basys2. Now the display operates on an FPGA just like it does with an Arduino, and is a great tool for debugging HDL code for [Mike]‘s FPGA.

Building a classic coin-op game in an FPGA

This game of Bomb Jack is the same as the original arcade version. The difference is that this hardware was built in an FPGA using schematics found on the Internet.

We’re a little shocked by the complexity of such a project. We’ve been impressed before by the use of FPGAs to implement classic CRT vector graphics. But that project used a library that had already implemented the original game. For this effort, [Alex] wanted to find a game that hadn’t ever been translated to an FPGA, and used stock parts. Bomb Jack is a 1984 platformer which ran on a Z80 processor, AY-3-8192 sound generators, and common TTL logic chips. This meant he didn’t have to write the cores himself, but rather use already existing versions of the chips and code together the hardware.

You can read about his experience at the page linked at the top, or just jump after the break to see video of the final project. You can see the monitor is on its side, and the game sounds great and runs flawlessly.

[Read more...]

Moving an FPGA Project from VGA to DVI-D

It’s fairly easy to create VGA with an FPGA using a simple R/2R DAC. As [Mike] points out, this requires a lot of IO pins, and many development boards only support 8 bit VGA. Analog VGA is being replaced with DVI-D and HDMI on many devices nowadays, so it would be nice to port projects from VGA to DVI-D.

To address this, he’s come up with a simple DVI-D implementation in VHDL. The result converts RGB and sync data for VGA into DIV-D. Since DVI-D and HDMI both use the same signals for video, this can be connected to either input on a monitor or TV.

This implementation is shown displaying a test pattern on the Pipistrello development board, which features a Spartan 6 LX45 FPGA, but the project was written to be portable to other vendor’s FPGAs. With the right connector and a fast enough clock speed, this project should help move a project from 8 bit VGA to glorious 32 bit color.