Project: Papilio Configurator + Arduino Library for high performance


Guest pepevi

Recommended Posts

Hi there,

I just want to post what I'm working on, as comments are appreciated and needed.

I've programmed a PWM module independent of the AVR Core so PWM is generated with VHDL, not with the timers of the Atmega103. Now I have 8 analog outputs on the Papilio, configurable via Arduino/wiring code (analogWrite as usual) and running synchronously. You can find the schematic here.

This has led me to start working in a project where a user will configure its Papilio to meet his needs (PWM output ports, I2C, PPM inputs, etc.) and a .vhd will be generated (top_avr_core_v8.vhd, formally). This uses the full power of the FPGA as each pin is totally configurable.

So this comprises some VHDL modules, a script/app that generates  top_avr_core_v8.vhd and an Arduino library to command the modules.

Link to comment
Share on other sites

Hey pepevi,

I'm real excited to hear that you are working on this! It is something that Girish and I kind of started with but then we lost steam.

If you look at the latest source code in SVN you will see that there are commented out sections that were a first stab at this.

At the top there are these generics:

--							GENERIC
-- (
-- OC0_PWM0_GEN : integer := 4; --Set this default to the Arduino default pin which is pin ?
-- OC1A_PWM1A_GEN : integer := 5; --Set this default to the Arduino default pin which is pin ?
-- OC1B_PWM1B_GEN : integer := 6; --Set this default to the Arduino default pin which is pin ?
-- OC2_PWM2_GEN : integer := 15 --Set this default to the Arduino default pin which is pin 3
-- );

They control what pin those timers connect to, I had that working before I got the PPS functionality working. I think if they are restored it should still work?

There is also a commented out section where a REDe stepper and Button/LED core are defined. The idea was to define more generics that controlled whether those cores would be instantiated or not. So an end user would have two options, they could Open up the ISE project and change the generics to customize the AVR8 core or they could use a custom application that we can create. The custom application would just pass the Generics on the command line to control what cores get synthesized and how they are configured. So the idea was that the top_avr_core_v8.vhd would have a lot of cores already defined but by default it would only instantiate a small set of them. An end user would customize the synthesis directly or with a helper application.

Girish has actually already got a helper application pretty much ready to go. It allows you to drag and drop Wings onto the Papilio One and the idea was to expand it so that cores could be dragged and dropped as well. Then the helper app would invoke a synthesis with the custom options that were dragged and dropped onto the Papilio One.

If you want to chat more about things we started up a Gadget Factory IRC channel. It is on freenode.net and is named #GadgetFactory. It can be accessed from http://webchat.freenode.net.

Attached is a Pic of the helper app in action.

tn_VBBPIC.PNG

tn_VBBPIC2.png

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.