Design Your Own Processor With Verilog


Designing a computer from scratch is one of the holy grails of hardware design. For programmable logic, designing your own processor is a huge accomplishment. That’s exactly what [zhemao] has done. He created EZ8, an 8 bit processor is written in Verilog. EZ8 has a 3 stage pipeline, which makes design very interesting. Instruction set pipelines have been used in processors for many years. They speed up operation by allowing the processor to execute more than one instruction in parallel. The idea is similar to washing, drying and folding laundry. Most people pipeline their laundry. One load is in the washer, another in the dryer, and a third is being folded. Pipelines aren’t a free lunch though – there are hazards. If one instruction requires the result of an instruction which is still being executed in parallel, there’s a problem. In our laundry analogy this would be like having one sock on the folding table while its mate is still in the dryer. The folding operation must wait for the drying operation to complete before the socks can be paired. This is exactly how assemblers handle the situation – they insert NOPs between known hazard instructions.

[zhemao] didn’t just give us a processor and no support though. He also included an assembler written in OCaml, and an emulator written in C. Several test assembly programs are also up on [zhemao's] github repo  to verify operation. [zhemao] has tested his processor with Altera Cyclone 5 series FPGAs, but it should be possible to port it to other FPGA manufacturers. If you want more information, [zhemao] also has a discussion going on in the ECE subreddit.

[Thanks for the tip LongHornEngineer!]

[Image courtesy of intel]

A Pick-And-Mix FPGA Retrocomputer


Cheap FPGA boards are readily available, as are VHDL implementations of classic CPUs like the 6502, 6809, and Z80. Up until now, we haven’t seen anyone take these two parts and combine them into a complete system that turns an FPGA board into a complete 8-bit retrocomputer. Thanks to [Grant]‘s work, it’s now possible to do just that (server on fire, here’s a google cache) with a $30 FPGA board and a handful of parts.

In its full configuration, the Multicomp, as [Grant] calls his project, includes either a 6502, 6809, Z80, or (in the future) a 6800 CPU. Video options include either monochrome RCA, RGB VGA, or RGB via SCART. This, along an SD card interface, a PS2 keyboard, and the ability to connect an external 128kB RAM chip (64k available) means it’s a piece of cake to build a proper and complete portable retrocomputer.

What’s extremely interesting about [Grant]‘s project is the fact the data and address lines are fully exposed on the FPGA board. This means it’s possible to add whatever circuit you’d like to whatever retrocomputer you can imagine; if you want a few NES gamepads, an IDE interface, or you’d like to design your own primitive video card, it’s just a matter of designing a circuit and writing some assembly.

If you’d like to build your own, search “EP2C5T144C8N” on the usual sites, grab a few resistors and connectors, and take a look at [Grant]‘s documentation and upcoming examples.

Via forums

Introducing the FleaFPGA Experimenter’s Board

[Valentin] recently tipped us about an FPGA development board he just finished. It is called the FleaFPGA and is aimed to get people interested in the world of Field Programmable Gate Arrays. One of the other reasons that also got [Valentin] to design his own board was that he was frustrated with the existing solutions, them being either too pricey or fairly spare in terms of connectivity.

The main components that you can see in the platform shown above are: a lattice MachX02-7000HE FPGA (6864LUTs), 256Mbits of SDRAM, a USB2.0 host port, a 4096-color VGA connector, a 3.5mm stereo connector, an SD/MMC card slot, a PS/2 keyboard/mouse combo port, a few push buttons and LEDs. An expansion header is also present in order to connect the FleaFPGA to future shields that will be developed. Unfortunately only the board schematics have been released and [Valentin] is currently aiming for a price of $60 per board for <100 quantities. You’ll be able to see a video of the board in action after the break, in which the FPGA has been loaded with a 68000 software core running a variation of the Amiga Juggler Demo.

[Read more...]

Designing Flip-Flops with Python and Migen


Flip-flops are extremely simple electronic circuits, forming the basis of clock circuits, memory circuits, buffers, and shift registers. Through his dilly-dallying with digital logic, [Jeffrey] decided he would build his own. Not with Verilog or VHDL, though, but Migen: the Python-based way to build digital circuits with software.

Migen is an interesting tool that makes traditional FPGA programming a lot easier; instead of Verilog or VHDL, Migen allows an FPGA to be programmed in Python. Yes, it’s the tool you’ve been waiting for, and the tutorials make it look pretty easy. After installing Migen, [Jeff] wrote a class for a D flip-flop in only three lines of code. That’s three readable lines of code, and he was able to simulate the flip-flop with gtkwave in another two lines. Compared to learning the complexities of VHDL or Verilog, Migen makes digital logic and FPGA programming a breeze.

[Jeff] has a great tutorial for building a D flip-flop with Migen, but we’d love to see some more complex examples of what can be done with this very cool tool. If you’re building (or have built) something with Migen, be sure to send it in and relate your experiences.

Autonomous Quadcopter Fits in the Palm of your Hand

_5184952 [Horiken Engineering], which is made up of engineering students at the department of aerospace at the University of Tokyo have developed an autonomous quadcopter that requires no external control — and its tiny. By using two cameras and a sonar sensor, the quadcopter is capable of flying by itself due to its ability to process the data from the on-board sensors. To do the complex data processing fast enough to fly, it is using a Cortex-M4 MCU, a Spartan-6 FPGA, and 64MBs of DDRSDRAM. It also has the normal parts of a quadcopter, plus gyros, a 3D printed frame and a 3-axis compass. The following video demonstrates the quadcopter’s tracking ability above a static image (or a way point). The data you see in real-time is only the flight log, as the quadcopter receives no signal — it can only transmit data.

[Read more...]

A FPGA Controlled Reflow Oven

FPGA Reflow Oven

For Christmas, [Hamster]‘s wife gave him a mini-oven. Later that day, he tore it apart and built this FPGA controlled reflow oven.

We’ve seen plenty of reflow oven builds in the past. Most of those projects use a microcontroller to do closed loop control, sensing the temperature and toggling the heating element to hit a set point. This build uses the Papilo One FPGA development board as a controller. It implements a state machine that meets the reflow profile of the solder paste, ensuring SMD components are soldered properly.

The oven uses a MAX31855 to read temperature from a thermocouple. This device provides amplification, cold junction compensation, and analog to digital conversion which spits out the temperature over SPI. To control the heater, a 40A solid state relay is used.

The VHDL code that drives this oven is linked in the writeup, and has some interesting bits for those looking to experiment with FPGAs. It includes an SPI interface, display driver, and the temperature state machine logic.

FPGAs For The Pi And ‘Bone


We’ve seen FPGA dev boards out the wazoo—even some following the current trend of putting an FPGA and an ARM processor on a single board. Take one good idea and mix it in with a few million Linux/ARM boards already piling up on workbenches the world over and you get LOGi: an FPGA designed to plug into the Raspberry Pi and BeagleBone.

Both the Raspberry Pi and BeagleBone versions of the LOGi feature a Spartan 6 FPGA with 9152 logic cells, 16 DSP Slices, 576KB of RAM, and 96 I/O Pins. There’s also 256 MB of SDRAM and a SATA connector. The Kickstarter has a few demos for this board, namely a machine vision, Bitcoin mining (though don’t expect this board to make return-on-investment with mining), and an autonomous vehicle control demo. The LOGi’s hardware is comparable to the Papilio Pro, so potential projects may include generating NTSC video, adding a VGA out, and a few retrocomputer emulations via OpenCores.

For what this Kickstarter asks for the Pi or ‘Bone version of the LOGi—$89 USD for either—you’ll get a surprisingly capable FPGA dev board that’s a bit cheaper than comparable offerings. Sure, you won’t save any money buying a Pi and a LOGi, but if you have a few Raspberries lying about, you could do much worse for a starter FPGA board.

Thanks [hamster] for sending this one in.