Verilog programming

3 replies [Last post]
ruler501's picture
Title: NooBot
Joined: 01/29/2012
BotPoints: 367
User offline. Last seen 7 years 39 weeks ago.

Looking through the KIPR git I saw that there are verilog source files for the fpga. I have a couple of questions on how this works and how you use it.
1. Is verilog supported in KISS or do we need an external IDE?
2. If it is supported in KISS is there a built in simulator?
3. How do we use the verilog code on the CBC?
4. Can we dynamically switch between verilog files we are using?
I'm just now learning how to program in verilog using Icarus Verilog as an IDE and simulator. I was wondering how useful this could be in botball.

Jeremy Rand
Jeremy Rand's picture
Title: Botball Youth Advisory Council
Joined: 04/03/2009
BotPoints: 1168
User offline. Last seen 7 years 38 weeks ago.

1. Not certain, but my guess is not supported in KISS-IDE.
2. Almost certain that there is no simulator for the FPGA in KISS-IDE; this is a hacker feature and therefore is low on KIPR's priorities.
3/4. I think this would be an excellent topic for a hacking paper at GCER 2013. As such, I'd rather not discuss on a public forum prior to the release of such a paper. However, I heard that Marty Rand at Norman Advanced is planning to do a Link Hacking paper this year; you might want to ask him if he's willing to collaborate.

How useful would this be? This would be VERY useful. There's a huge amount of cool stuff that is best done on the FPGA rather than the ARM. Again, I'd rather not talk about it on a public forum, but rest assured that if you can figure this out, there will be loads of applications. Talk to Marty Rand at Norman Advanced about this too.

-Jeremy Rand
Senior Programmer, Team SNARC (2012-2013), Norman Advanced (2010-2011), Norman HS (2008-2009), Norman North (2005-2007), Whittier MS (2003-2004)
2012-2013 VP of Tech, 2011 President, Botball YAC (2009-2013)
Mentor, Alcott and Whittier MS

ruler501's picture
Title: NooBot
Joined: 01/29/2012
BotPoints: 367
User offline. Last seen 7 years 39 weeks ago.

I probably won't be going to GCER, but I would like to collaborate. I'll make sure to message MartyRand and see if he wants to collaborate. I'll be looking into the source in KIPR's github to see if I can figure out how to apply verilog files.

Beta's picture
Title: The Magnificent
Joined: 02/24/2012
BotPoints: 266
User offline. Last seen 8 years 51 weeks ago.

As a general disclaimer, doing anything like this is not supported by KIPR. It would be *very* difficult to screw up the board by messing with the FPGA, however, so this should be harmless fun. If you do somehow manage to bork your Link however, you're on your own.

1. You'll need the Xilinx Verilog IDE (free)
2. The Xilinx Verilog IDE has a simulator.
3. This repo has some files in it that will load an FPGA firmware from a console: . You'll probably want to rmmod kovan before doing this, however, as the kovan kernel module will probably flip out and crash.
4. Yes. The FPGA isn't a persistent device anyway, so it is flashed every time the device boots. If I recall correctly, this bitfile is loaded from /usr/lib/firmware

I should note that adding stuff to the official FPGA firwmare will not be an easy task. We are already using a significant amount of the chip to do the little we are doing on it, so adding more will probably give you clock timing constraint errors. I wouldn't ignore these (undefined behavior.)

All of this information, free of charge, provided you give me a shout out in your paper ;) Let me know if you have any more questions or issues. I can probably help. Also, if you develop anything interesting, submit a pull request on github! I'd love to get more open source contributions to our software :'(

Braden McDorman

Developer of the KIPR Link, KISS IDE, KIPR's 2D Simulator, and CBCJVM.

Reach me at bmcdorman(cat)kipr(dog)org where (cat)=@ and (dog)=. if you need assistance of any kind.