11-10-2017 06:01 AM
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?
11-10-2017 07:33 AM
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:
So I guess you need to apply the same for your driver.
Hope that helps,
11-10-2017 09:07 AM
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?
11-13-2017 12:37 AM
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.