Home / Writing / Chiphack FPGA course, Always Think About the Clock

Chiphack FPGA course, Always Think About the Clock

Simon Sarginson visits Chiphack to find out what exactly all the fuss is about FPGAs…

The weekend of 24 and 25th of May I attended Chiphack in Cambridge to learn about FPGA programming. It sounded like a cool event and even though I’d heard whispers about FPGAs, I barely had an idea of what they really were.
DSC_0018_1
I walked in to Cambridge’s very impressive Maker Space hosted in a Cambridge University building. This makes sense as Cambridge host quite a lot of hardware companies not least of which is ARM who are also one of the Makerspace corperate sponsors.
DSC_0022_1
The room was filled with a mix of students and enthusiast a typical hacker crowd with laptops full of tech related stickers. Hosting the event were there very friendly folk of Embecosm, a hardware startup, who trying to spread the knowledge and get people started with FPGA design.
DSC_0030_1
First off we were explained what an FPGA is.
A Field Programmable Gate Array is:
Programmable in the Field: it can be configured and reconfigured after manufacture.
A Gate Array: an array of logic gates such as AND and OR.
By connecting the logic blocks you create a hardware program to do your bidding.

The DE0 Nano Altera FPGA we used is a very powerful chip set you could think of it as an professional grade Arduino, more flexible and powerful but more complex to configure. I am sure this very crude analogy will make people with more experience in the field cringe.

We went on to setup the software tools we needed and started working on our first FPGA design, something that made the FPGA count using the push buttons lighting up the number in binary form. Although the FPGA we used is way overpowered for this, this simple program was quite a huge undertaking. First there was the tool chain, we were told to setup the Altera software beforehand (which I installed on 64-bit ubuntu, which was a bit painful). But it turned out a lot of us couldn’t run the accompanying chip simulation software. After a lot of research it simply wouldn’t work with our OS and we had to switch to using GTKWave which was delighfully simple to use. Almost all programmers know this unfortunate pain, setting up your tools is, in my experience at least, the least fun and most frustrating part of programming.

After struggling with the tools all breaked for our amazing complementary lunch with Vegan, Vegatarian and Meaty options all curtesy of Embecosm, I had a brief look around the space spotted a robot that wouldn’t have been out of place in Robot Wars of yonder and a 3d printer dutifully at work, as any good Makerspace / Hackerspace should.
DSC_0024_1

But after this initial hitch we were all off to a good start and I and most of the other participant had succesfully built and 80 pound binary counter! Learning about the parallel workflow programming in Verilog and the importance of thinking about the clock which makes sure all the logic stays in sync was immensily satisfying and introduced me to whole new paradigm. It gave me a greater understanding of a what a computer actually does at the CPU level. Pouring over logic simulation images like this was a real treat.
gtkwave
After the course went over we all went for a drink by the river taking in the sight of the serene summer atmosphere of Cambridge while talking over various devolpments in the hardware world and a I learned a little bit of all the other participants background. I also learned another difference between a makerspace and a hackerspace, the makerspace unlike the hackerspace I frequent in London is not community run so to Garnet Hertz statement at Future Everything:
Hacking = Making – Conterversy

I add: Makerspace = Hackerspace – Communism . Also notable was that that kids had their own toy space!
DSC_0026
The next day we all came back to learn how to set up a UART connection transmitting that converts parrallel data (such as data from the FPGA): ABCD all at once, to serial data: A then B then C then D. It was a pretty guided tutorial in virtue of the limited time we had, but it was very useful to learn about a communication protocol and see a typical hardware program in action.

Last but certainly not least we were taught how to setup the open source CPU design and run linux on our FPGA! I spent a long time wresteling with the tools to actually be able to execute the rather simple steps to set it up but I did not quite manage in the time we had, but I almost got there and should be finishing that exercise soon as I have everything setup now (I promise).

So thanks to Jeremy Bennet (Embecosm), Saar Drimer (boldport), Alex Chadwick (the one working on ARM not the one involved with Raspbery Pi) & Kim Spence-Jones (OpenDCU), Julius Baxter(OpenRisc), Simon Cook (Embecosm), Andrew Back (AB Open), Omer Kilic (Ubiquiti Networks), Embecosm for organising it,  Makespace Cambridge for hosting and everyone else who made the chiphack 2014 a great success!

 

Simon is Creative Technologist at Cybersalon.

Simon Sarginson visits Chiphack to find out what exactly all the fuss is about FPGAs... The weekend of 24 and 25th of May I attended Chiphack in Cambridge to learn about FPGA programming. It sounded like a cool event and even though I'd heard whispers about FPGAs, I barely had an idea of what they really were. I walked in to Cambridge's very impressive Maker Space hosted in a Cambridge University building. This makes sense as Cambridge host quite a lot of hardware companies not least of which is ARM who are also one of the Makerspace corperate sponsors. The…

Review Overview

User Rating: Be the first one !
0

About cybersalon

Leave a Reply