Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

FPGA shield alpha


  • Please log in to reply
23 replies to this topic

#1 Ward

Ward

    Member

  • Members
  • PipPip
  • 22 posts

Posted 12 November 2010 - 07:48 AM

I'm in the process of building an FPGA shield for the Netduino and am now at the point where I'm ready for some community participation, feedback, and if anyone's game, alpha testing. First, the base specs
Top:
Posted Image
Bottom:
Posted Image

Xilinx XC3S50AN 50,000 gate FPGA
64 IO available on 4 dedicated headers
16 IO available to Netduino (D0-D13, TWD, TWCK)
50 MHz clock oscillator
red/green bicolor LED
momentary pushbutton
JTAG pads available for advanced development (the six-pin right angle header at the top left corner, which would typically not be populated)

Some common questions:
What's an FPGA?
An FPGA is a Field Programmable Gate Array. Think of it as a huge array of logic gates (50,000 in this case), which you can configure to suit your needs. In addition, there are clock generators, dedicated multipliers, RAM, flash, and many other useful digital blocks. The logic is an order of magnitude faster than anything that might commonly be found on a breadboard, and it can be easily reconfigured when you move on to a different project.

What can I do with it?
All sorts of stuff. There are plenty of resources on board for applications ranging from basic glue logic to port expansion (essentially 64 more GPIOs) to PWM to motor control. More advanced applications might include high speed digital signal processing, buffered wireless communications, bus capture and digital waveform analysis.

How do I configure it?
Xilinx has made freely available a toolchain for their smaller FPGAs which they call Webpack. The logic structure can be described either using a Hardware Description Language (Verilog, VHDL) or by using schematic capture, basically drawing your gate arrangement in schematic form. Once the design is complete, a bitstream is generated and downloaded into the nonvolatile memory (flash) on the FPGA.

How is the bitstream loaded?
After the bitstream is generated on the PC, it's processed into a handful of resource files which are then deployed to the Netduino along with a script to program the bitstream into the flash on the FPGA. Once the bitstream is programmed, the FPGA will load that bitstream on every subsequent boot. No further intervention is necessary by either the user or the Netduino. For Netduino Plus users, the bitstream can also be written to a microSD on the PC, then transferred to the Netduino. Once on the Netduino, a script is run to transfer the bitstream from the microSD to the FPGA's flash. The microSD approach is the only option available to Netduino Plus users with the standard (48K) firmware.

Why is this even necessary?
The Netduino is a tremendously capable platform, and it's very well suited to many uses. There are two areas where the FPGA shield is able to supplement the Netduino, however: IO and real-time processing. The FPGA shield can provide an additional 64 IO, and depending on configuration, can do this while making all 14 digital IO pins on the Netduino available. As for real-time processing, some tasks like high-speed motor control, IR remote encoding/decoding, video, and sensitive asynchronous serial communications are beyond the abilities of the C# environment of the Netduino. They're either too timing-sensitive or too processor intensive to be feasible. These tasks could be offloaded to the FPGA, while the Netduino manages state and communications.

How/when can I get one?
If you're interested in being one of the alpha testers, please drop me an email at ward@prototype-eng.com and we'll talk. General availability will depend on the community's response, how the alpha test goes, and whether it looks like a beta's necessary. Within the next 2-3 months is not unreasonable if testing goes well and there's a healthy demand.

So fire away with questions, comments, and criticism...I look forward to hearing what people think. Thanks!
--Ward

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 12 November 2010 - 08:08 AM

Wow, Ward. This is a pretty incredible, powerful board. FPGAs are like raw power tools. It would be awesome to see a few "programs" written for this that could be used easily from C# on the Netduino... You've been very busy! Chris

#3 Ward

Ward

    Member

  • Members
  • PipPip
  • 22 posts

Posted 12 November 2010 - 08:24 AM

Thanks, Chris! I actually have the first core done, 64 GPIO programmable via I2C. Input/output can be set on a pin-by-pin basis. Using I2C means that only two pins on the Netduino are consumed, TWD and TWCK. I'm working on a C# class to abstract out the I2C stuff and make the GPIO on the FPGA look and act like the GPIO on the Netduino.

#4 Ward

Ward

    Member

  • Members
  • PipPip
  • 22 posts

Posted 12 November 2010 - 08:36 AM

One note on clocking: although the onboard oscillator is only 50 MHz, the Digital Clock Manager on the FPGA can multiply that up to 200-300 MHz for use within the FPGA fabric.

#5 Frank

Frank

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts
  • LocationNorth Waterboro Maine

Posted 12 November 2010 - 03:12 PM

It would help to see an example in real life, some sort of small project to demo it! This is a real diverse crowd, and just the Arduino/Netduino direction for projects is sometimes confusing. Course, having said that, I now have to go Google FPGA and start reading !
Retired -stone sculptor -macro photographer- novice but avid Go player - Geek

#6 Chris Seto

Chris Seto

    Advanced Member

  • Members
  • PipPipPip
  • 405 posts

Posted 12 November 2010 - 05:34 PM

I like this alot, and will be looking for updates on the forum. I will probably buy one if you end up producing these guys.

#7 Ward

Ward

    Member

  • Members
  • PipPip
  • 22 posts

Posted 12 November 2010 - 06:14 PM

A few more notes: Given the packaging technology used (tight-pitch IC, 0402 SMT passives), this would definitely not be a kit. It'd be sold fully-assembled and tested. One good resource for free/open FPGA IP is Opencores (http://opencores.org). All of the designs there will be in Verilog or VHDL, so it helps to know a little bit about those languages. An interesting aspect of this board is that since it's connected to all of the Netduino digital lines, it can be used to control many of the existing Ar/Netduino shields out there without Netduino intervention. In this scenario the GPIO on the Netduino would be tristated and the FPGA would take over. A good example of this is my next project: take an existing motor shield and control it with the FPGA, implementing the shaft encoder interface and PID control loop in logic. Another application might be to connect a Zigbee shield to the FPGA shield and write code to buffer into RAM on the FPGA. The Netduino would only be interrupted after a certain number of bytes or a certain byte pattern had been received.

#8 bill.french

bill.french

    Advanced Member

  • Members
  • PipPipPip
  • 260 posts
  • LocationPrinceton, NJ

Posted 12 November 2010 - 08:41 PM

Ballpark, how much $$ are we talking about?

#9 Ward

Ward

    Member

  • Members
  • PipPip
  • 22 posts

Posted 12 November 2010 - 09:20 PM

The retail price will likely be $45, possibly $40 if I can find some ways to cost-reduce.

#10 Chris Seto

Chris Seto

    Advanced Member

  • Members
  • PipPipPip
  • 405 posts

Posted 12 November 2010 - 11:04 PM

I would consider $45 very reasonable. I will definitely pick one up.

#11 Shaw

Shaw

    Member

  • Members
  • PipPip
  • 14 posts

Posted 13 November 2010 - 01:44 AM

I saw mention on another forum of a project to build a Quadcopter or similar, but people were concerned about the lack of real-time support from the .NET MF due to GC etc. Would this be the sort of situation where you could offload the realtime processing to the FPGA to process inputs faster and send the "cleaned" results to the netduino?

#12 Chris Seto

Chris Seto

    Advanced Member

  • Members
  • PipPipPip
  • 405 posts

Posted 13 November 2010 - 02:27 AM

Yes, you could offload the PID controller for a quad copter to an FPGA. In fact, I was planning on doing just that.

#13 sweetlilmre

sweetlilmre

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts

Posted 16 November 2010 - 08:16 PM

Hi Ward,

This is exactly what I am after for a number of ideas / projects.
I will take 2 if available.

Do you accept PayPal?
-(e)

edit: only problem is that I might need a XC3S200

#14 Nilling

Nilling

    New Member

  • Members
  • Pip
  • 1 posts

Posted 04 December 2010 - 04:39 PM

Hey Ward, any updates on this puppy? I'd like to get a hold of one these myself.

#15 Dat Nguyen

Dat Nguyen

    New Member

  • Members
  • Pip
  • 1 posts

Posted 03 March 2011 - 04:26 AM

I would like to have this one too. How can I purchase it?

#16 JonnyBoats

JonnyBoats

    Advanced Member

  • Members
  • PipPipPip
  • 155 posts
  • LocationPhillips, ME

Posted 04 March 2011 - 12:19 AM

I just found this thread and all I can say is WOW! I definitely would like to buy one.

#17 pic_micro23

pic_micro23

    New Member

  • Members
  • Pip
  • 6 posts

Posted 06 July 2011 - 10:33 PM

I was waiting for this too but now news lately. I found a new open source project in KickStarter from Jack Gasset who has created other open source FPGA projects (papilio) http://www.kickstart...eld-for-arduino

#18 Ward

Ward

    Member

  • Members
  • PipPip
  • 22 posts

Posted 01 August 2011 - 09:33 PM

I'm very happy to report that we are now shipping the FPGA shield, with a new name: ÜberShield. Boards are in stock at Amazon.com, and more information can be found at the product website http://ubershield.com and in our forums at http://forums.ubershield.com. The final product specs are essentially the same as above, although the 50 MHz clock oscillator has been replaced with a 25 MHz model. At present, the board is shipping with a combination GPIO/PWM core. All 64 of the dedicated header digital pins are available for either input or output, and 32 of them are also able to generate PWM signals. The PWM engine has 32 bit/1us resolution, meaning your pulse width and period can range from 2us to 1 hour, 11 minutes, and 34.967296 seconds, in 1us steps. In addition, all 32 PWM channels are time-aligned, and there's a master "terminate" count, so you can create complex waveforms like stepper motor control sequences. Further discussion and some examples are in the ÜberShield forums. A full Netduino library is available to support the GPIO and PWM functionality. In addition, should you want to write your own core in Verilog/VHDL or using Xilinx's schematic capture tool a bitstream loader is available for the Netduino and Netduino Plus. This allows you to transfer your design into the FPGA without using a specialized JTAG cable.

#19 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 01 August 2011 - 10:20 PM

Ward, great to see that this is now shipping. Can you give us some ideas of what types of projects we can do "out of the box" with the shield? Chris

#20 Ward

Ward

    Member

  • Members
  • PipPip
  • 22 posts

Posted 01 August 2011 - 11:20 PM

Chris, thanks for asking! Here are a few examples:

Individually control the intensity of 32 LEDs over 256 discrete levels (15mA or less per LED)
Control 32 hobby RC servos and/or ESCs
Control the speed and direction of 8 stepper motors, using external power FETs
Control the speed and direction of 16 brushed DC motors, using external power FETs
Using external RC filtering, generate voltages between 0V and 3.3V with very high resolution (>10 bit effective) on 32 channels.
Any of the above still leave 32 channels available for connection to sensors and actuators

Here's an example to illuminate an LED on channel 7 at 25% duty cycle (50% intensity):

using UberShield.Cores;
//SPI config omitted for clarity, but it's pretty straightforward
var spi = new SPI(spiConfig);
var GP = new GpioPwm(spi);
GP.SetPinType(7, GpioPwm.PinType.Pwm);
GP.SetPwmParameter(7, GpioPwm.PwmParameter.Rise, 0);
GP.SetPwmParameter(7, GpioPwm.PwmParameter.Fall, 2500);
GP.SetPwmParameter(7, GpioPwm.PwmParameter.Period, 10000);
GP.PwmGo();

Basically, that code instantiates an ÜberShield GPIO/PWM class, sets pin 7 to be a PWM channel (as opposed to input, output, or inverted PWM), sets it up to rise at 0us, fall at 2500us, and sets its period to 10000us (10ms, 100Hz). To make the LED automatically go out after 1.5 seconds, we could add to the end of that snippet, before the "PwmGo":
GP.SetTerminate(1500000);
Note that everything's in microseconds, so that's 1500000us, or 1.5 seconds.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.