« IAR IDE Flow | Main | Interlude: Physical Wiring (Who Will Drive VCCOUT_D?) »

Ordinary Blinking Lights

I've given the f2013 8 bright shiny green LEDs to talk to; it's time to put those LEDs to work.

Edit: grr. The blog inserts bogus html directives into my pasted embedded youtube video reference, which confuses IE. For now, you'll have to click on a link to see the video.
Edit: no longer grr. I asked movabletype to not insert html tags for me.

There's a lot going on in this blurry video. On the lower left, the 8 green LEDs are throbbing nicely. On the lower right, you can see the LED on the f2013 board (P1.0) throbbing as well. The 7-segment digits display the number "02". Above them, another green LED blinks - that LED is just reporting that the 1c20 board configured itself from epcs flash. Lastly, above that, the power LED glows green.

PWM and ramp
I'm using PWM to brighten and dim the 8 LEDs. Each LED has a threshold value and a direction. A counter counts from 0 to a terminal count; each LED is off until its threshold value is reached, then on. After each count cycle, the threshold and direction values are updated. This is a purely software bit-twiddling operation, using none of the fabulous hardware features of the f2013. Here's my resource consumption report, excerpted from the list file:

148 bytes in segment CODE
4 bytes in segment DATA16_AN
24 bytes in segment DATA16_C

Updated testbench:
A note on this testbench: it's slightly improved from the previous one. As before, it connects its 8 inputs to the 8 LEDs; it also drives a version number ("02") onto the 2 seven-segment display digits on the 1c20 board. Going forward I'll give each new testbench its own ID, so I can verify at a glance that the testbench matches the f2013 firmware.

For reference and archiving, here are all the source files.
main.c (obl firmware )
ordinary_blinking_lights.zip (archived workspace, project, source code)
top.v (top-level verilog file for testbench 02)
tb_2.zip (archived testbench 02 source files)


TrackBack URL for this entry:

Comments (1)

This is awesome. This note and IV really clarify and justify this whole scheme for using a great fat fpga as a testbench. Very sensible!

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


This page contains a single entry from the blog posted on June 25, 2007 7:22 PM.

The previous post in this blog was IAR IDE Flow.

The next post in this blog is Interlude: Physical Wiring (Who Will Drive VCCOUT_D?).

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.31