cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
2,066 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
Reply
3 Replies
Highlighted
Moderator
Moderator
2,037 Views
Registered: ‎11-09-2015

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
Reply
Highlighted
Visitor
Visitor
2,025 Views
Registered: ‎02-14-2017

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
Reply
Highlighted
Moderator
Moderator
1,992 Views
Registered: ‎11-09-2015

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
Reply