cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
muravin
Scholar
Scholar
9,990 Views
Registered: ‎11-21-2013

passing a user-specific parameters from IPI canvas to the HDF file

Jump to solution

Hello,

 

We are trying to get one generic IP with multiple, project-specific, SDK drivers that could be linked to the IP via an HDF, which in turn would generate a system-specific BSP.

 

Is there a way to pass something like a user-specific parameter to an HDF to do that? If yes, how? If not, what is the best way to accomplish what we need?

 

Thank you

Vlad

Vladislav Muravin
0 Kudos
1 Solution

Accepted Solutions
muravin
Scholar
Scholar
16,553 Views
Registered: ‎11-21-2013

Thank you both for your suggestions, Steve and Brian. My apologies for the late response. I think this topic would make a good Xilinx Enhancement Request or whatever this is called.

 

We are being very strict about keeping our code repository "refactored" and having a way to link multiple drivers to the same IP through automatic BSP generation, we believe many FPGA/embedded designers would find this very useful.

 

Thanks again and have a great day.

Vlad

Vladislav Muravin

View solution in original post

0 Kudos
10 Replies
bwiec
Xilinx Employee
Xilinx Employee
9,978 Views
Registered: ‎08-02-2011

Hmm I'm not sure of the answer to your specific question of pasing parameters to the BD, but...

 

How about packaging all driver variations with the IP, create a parameter in the IP package that selects the desired driver (or select it based on whatever logic of other parameters you want), and use #defines in the actual driver code itself to select the correct files to #include based on the IP parameter settings that get generated in xparameters.h

www.xilinx.com
0 Kudos
muravin
Scholar
Scholar
9,970 Views
Registered: ‎11-21-2013

Hi Brian,

 

Thanks for the prompt response.

 

We are trying to avoid using #define for this purpose, and ideally would like to have the drivers to be generated during the BSP generation stage, which as we know are based off the HDF file.

 

Thanks again

Vlad

Vladislav Muravin
0 Kudos
bwiec
Xilinx Employee
Xilinx Employee
9,959 Views
Registered: ‎08-02-2011

Hi Vlad,

 

Sure! Hmm okay, so how does passing a user-specific parameter to IPI help you accomplish this?

 

Another thing might be able to do is play with the driver version numbers (you could, say, have my_ip_driver_v1_0_a, my_ip_driver_v1_0_b, my_ip_driver_v1_0_c, etc) and then in the BSP settings in SDK, you can select which driver to use for which IP.

 

 

Best,

Brian

www.xilinx.com
0 Kudos
muravin
Scholar
Scholar
9,955 Views
Registered: ‎11-21-2013

Hi Brian,

I don't know, i.e. I am looking for a way to link my_ip_driver_v1_0_a through the HDF of one project, my_ip_driver_v1_0_b through the HDF for another project etc, but in such way that the HDF will already contain the information necessary to generate the right drivers for the BSP.

 

I will check with our SW peer but we are pretty sure that this is what we want, if it is possible.

BR
Vlad

Vladislav Muravin
0 Kudos
Anonymous
Not applicable
9,942 Views
You can add a generic to your hdl code in your custom ip. Then in the data folder of your driver, you would read this using hsi commands, for example:
hsi::get_property test_param [hsi::get_cells my_ip_0]
and you could pull in the specific driver files to match the param set in your ip
The AR below discusses how to use the hsi in your custom driver.
http://www.xilinx.com/support/answers/65538.html
0 Kudos
bwiec
Xilinx Employee
Xilinx Employee
9,939 Views
Registered: ‎08-02-2011

Ahh I see.

 

Well I think the problem is that there is no linkage of IP to driver on the vivado side (except during packaging but you don't know at package-time which driver to use). The .hdf does not contain this information (which, by the way, is an archive file... you can extract it to see the contents. Not sure if everyone is aware of that or not). The hdf basically contains (among other things) a list of IPs in the design. From there, SDK looks at each the IP in the design and checks its repositories for a driver .mdd file with a matching supporting_peripherals option and binds the driver to the BSP that way if it finds a match.

 

So for your use case where you need some way to bind the driver to the IP in Vivado, I'm not sure there's a nice way to do this because there's no mechanism for it that I'm aware of. Both tools work together to figure out which driver to use for a given IP.

 

The only other thing I can think of would involve some very ugly tcl scripting to hack up the .mdd.

www.xilinx.com
0 Kudos
bwiec
Xilinx Employee
Xilinx Employee
9,938 Views
Registered: ‎08-02-2011

Stephen, that's an interesting idea. Is there a way to tie it to the driver tcl so it could be automated? I don't know enough about how those callbacks work...

www.xilinx.com
0 Kudos
Anonymous
Not applicable
9,930 Views
There is a generate proc in the tcl in the data folder of the driver. This is called during the BSP generation. This is how all our driver work. So, user can create their own proc and utilise the HSI to do whatever they want and call this proc from within the generate proc. This is discussed in the AR linked above.
Anonymous
Not applicable
9,925 Views
muravin
Scholar
Scholar
16,554 Views
Registered: ‎11-21-2013

Thank you both for your suggestions, Steve and Brian. My apologies for the late response. I think this topic would make a good Xilinx Enhancement Request or whatever this is called.

 

We are being very strict about keeping our code repository "refactored" and having a way to link multiple drivers to the same IP through automatic BSP generation, we believe many FPGA/embedded designers would find this very useful.

 

Thanks again and have a great day.

Vlad

Vladislav Muravin

View solution in original post

0 Kudos