UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor berryjatsc
Visitor
1,839 Views
Registered: ‎02-14-2017

Create library of functions for use in custom IP drivers

In developing drivers for the collection of custom IP I am working with (in Vivado and SDK), I have developed at least a couple of functions that would be useful in several of the drivers. Right now, I have them copied as static functions, but I don't like that solution. Is there some way I could put them in some sort of library that could be shared between the different drivers?

0 Kudos
3 Replies
Moderator
Moderator
1,810 Views
Registered: ‎11-09-2015

Re: Create library of functions for use in custom IP drivers

Hi @berryjatsc,

 

In the xilinx drivers, under the data directory, you have an .mdd file. This file is used to give options to the driver. There is one option you want to look at is "DEPENDS". This means that the driver depends on other drivers.

 

For example, the driver for the Video Processing Subsystem depends on the driver video_common (and others) which is also used by other video IPs:

VPSS.PNG

 

So I guess you need to apply the same for your driver.

 

Hope that helps,

 

Best Regards,

 

Florent


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Visitor berryjatsc
Visitor
1,798 Views
Registered: ‎02-14-2017

Re: Create library of functions for use in custom IP drivers

Thanks @florentw! That does look like what I want. Now, my next question is: How do I go about creating a separate driver for my library code? The way I have been doing things is to have the driver code for each custom IP core to be in with the core itself and referenced in the core's component.xml. Going through the create new IP wizard builds up the core this way. Looking at the Xilinx IP cores, it looks like they do not do that and the cores and drivers are completely separate. Is one way or the other preferable? I think I like having the driver included with the core since that makes it a contained unit. How then do I deal with having a common driver? Is this something I should do through Vivado or SDK?

0 Kudos
Moderator
Moderator
1,765 Views
Registered: ‎11-09-2015

Re: Create library of functions for use in custom IP drivers

Hi @berryjatsc,

 

I am not completely sure about how to do this. But what I would do is to create the common driver separatly. The add its repo to the local repo of SDK.

Then the option DEPENDENCE should help to have it used by the other driver.

 

Regards,

 

Florent


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos