cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mxdsgnl
Contributor
Contributor
339 Views
Registered: ‎11-15-2017

Improved xparameters generation with modified sdk xillib_sw.tcl

      <MEMORYMAP>
        <MEMRANGE ADDRESSBLOCK="s_axi_adc" BASENAME="C_BASEADDR" BASEVALUE="0x80000000" HIGHNAME="C_HIGHADDR" HIGHVALUE="0x8000FFFF" INSTANCE="frf_dsp" IS_DATA="TRUE" IS_INSTRUCTION="TRUE" MASTERBUSINTERFACE="M_AXI_HPM0_LPD" MEMTYPE="REGISTER" SLAVEBUSINTERFACE="s_axi_adc"/>
        <MEMRANGE ADDRESSBLOCK="s_axi_dac" BASENAME="C_BASEADDR" BASEVALUE="0x80010000" HIGHNAME="C_HIGHADDR" HIGHVALUE="0x8001FFFF" INSTANCE="frf_dsp" IS_DATA="TRUE" IS_INSTRUCTION="TRUE" MASTERBUSINTERFACE="M_AXI_HPM0_LPD" MEMTYPE="REGISTER" SLAVEBUSINTERFACE="s_axi_dac"/>
Hello, my custom IP has multiple SLAVEBUSINTERFACES for the same cell name, "frf_dsp." When I regenerate our no-os bsp, the #define macros in xparameters only include the first element in this list.  Hardcoding this seems uncessary since **almost** all the hooks are in this script to support multiple mem_range or slave_bus_interface properties for a single peripheral.
 
 
I looked through C:\Xilinx\SDK\2019.1\scripts\hsm\xillib_sw.tcl and identified that the procedure named
 

 

::hsi::utils::find_addr_params

 

 

loops through each memory map, but only appends elements with different cell names to the returned list.  I have extended this to also export the base and high address of each memrange within the peripheral ("cell"). 

We can easily override the default BSP scripts by listing our custom versions higher in the bsp search path.  Overriding scripts is less obvious.  is "xillib_sw.tcl" added to the xsct path through the SDK plugin somewhere?

Short story long, what's the easiest way to preserve my customization?  can I "source" my updated procedures when XSCT loads in the sdk instance?  Can I modify the script paths somewhere so that calls to ::hsi::utils::xxxx will find my updated version before it finds the distribution default?

Thanks,

Nick

 

0 Kudos
0 Replies