Tutorial: Creating a Custom Bitfile

From Cpre584
Revision as of 20:00, 14 February 2012 by Cnel711 (talk | contribs)
Jump to navigation Jump to search

This page covers the creation and installation of a custom personality/bitfile (a modification of the vector adder sample project).

Building a Bitfile

Copy rev 2011_11_22 of the example project and set your environment variables if you have not done so already. You can make a small modification to the verilog code if you wish.

cd ~/pdk_sample/cae_vadd/phys
make

The bitfile will take a long time (2 to 4 hours; sometimes perhaps 10 hours) to create. Be patient.

Packaging the Bitfile

cd ~/pdk_sample/cae_vadd/phys
make release

This will create a new directory (~/pdk_sample/cae_vadd.release/). Then something magical happens that I don't quite understand yet.

Installing the Bitfile

Any ideas? Intuition tells me we'd need higher privilledges to install the RPM to the /opt/convey/personalities/ folder.

Using the Bitfile in C Code

My current understanding is that running a routine on the coprocessor requires two parts:

  • A call to the cny_get_signature function to get the signature of the custom personality you created
  • A cny coprocessor funcation call (ex: l_copcall_fmt)

If you want to pass parameters to your function call, the vector adder set the standard of using an assembly file to marshal registers back and forth between the processor / coprocessor, though there may be other ways.

References