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 jaimecorrea
Visitor
10,593 Views
Registered: ‎07-19-2013

HWICAP driver problem on ZYNQ

Hi Forum.

 

I'm trying to perform a partial reconfiguration on ZYNQ (zedboard) by means of hwICAP. However the app crashes in line: 

 

int Status = XHwIcap_CfgInitialize(&HwIcap, CfgPtr, CfgPtr->BaseAddress);

I suppose that is because the zynq devices (or any 7 series device) are not populated in DeviceDetaillkup[] table in file hwicap.c and therefore the device is not found, resulting in a failure in the initialization. Maybe if I have the values for: 

 

    u32 DeviceIdCode;         /**< IDCODE of targeted device */
    u32 Cols;             /**< Number of CLB cols */
    u32 Rows;             /**< Number of CLB rows */
    u32 BramCols;             /**< Number of BRAM cols */
    u8  DSPCols;             /**< Number of DSP cols for V4/V5/V6 */
    u8  IOCols;             /**< Number of IO cols for V4/V5/V6 */
    u8  MGTCols;             /**< Number of MGT cols for V4/V5/V6 */
    u8  HClkRows;             /**< Number of HClk cols for V4/V5/V6 */
    u16 *SkipCols;             /**< Columns to skip for CLB Col */

the initialization can run as it should. 

 

Any suggestions of where I can get the numbers for device 7Z020?

 

or maybe some insight about making work HWICAP in ZYNQ?

 

Thanks!

Tags (3)
0 Kudos
3 Replies
Scholar austin
Scholar
10,590 Views
Registered: ‎02-27-2008

Re: HWICAP driver problem on ZYNQ

j,

 

A line of c code does not instantiate, or connect up, the HWICAP....


The HWICAP is a VHDL wrapper, which must be part of a hardware design, synthesized, placed, and routed (connected) int he programmable logic side, and interfaced to the processor side (AXI bus).

 

Once all that is done, one also needs to release the PCAP interface, and enable the ICAP interface, as the ARM processor system hasa total control over the ICAP, hence also over the HWICAP.  Unless it is released, and subsequentlyenabled, the HWICAP will stall (never be available, never respond).

 

So, the c code must:

1. release pcap

2. enable icap

3. talk to the icap (hwicap)

 

The hardware must:

1. route a gpio from the emio from the processor side to the programmable logic side to  control the ICAP

2. instantiate the ICAP

3. interface the ICAP to the processor through an AXI bus interface (HWICAP IP block)

 

Assigning addreses, bit locations, etc. and then having the matching code to do everything is, of course, required.

 

 

 

 

Austin Lesea
Principal Engineer
Xilinx San Jose
0 Kudos
Visitor jaimecorrea
Visitor
10,569 Views
Registered: ‎07-19-2013

Re: HWICAP driver problem on ZYNQ

Hello Austin, Forum:

 

Thank you for the quick response.

 

I have already done the hardware side of the HWICAP that you mentioned (the VHDL, synthesis, route, processing system interface by AXI etc.) I think/hope there are no errors there.
And for the software side I'm also following the steps you mentioned, release PCAP, enable ICAP, and, so far, trying to talk to the ICAP (hwicap)..


The line of code I posted before is just an extract of the C code that I'm trying to implement, I will post the complete code here, it is based in the hwicap interrupt example and sorry if it's messy, is still work in progress :P . What I tried to say there is that the initialization funcion of the driver is giving me a hard time... And I think is because the device parameters are not found in the driver (hwicap.c) and therefore it cannot be initialized.


I've found a similar (if not exactly the same problem) in another thread:

 

http://http://forums.xilinx.com/t5/Hierarchical-Design/Hardware-ICAP-on-the-netFPGA-Virtex-5-TXT-240-xc5vtx240t/td-p/309163


Just they had this problem with another device (my problem is with Zynq 7Z020, not Virtex 5).

The thing is that I managed to get some values to fill the DeviceDetaillkup[] table in file hwicap.c for Zynq 7Z020, those are:

 

Cols 73
Rows 149
BramCols 6
DSPCols 5
IO Cols ??
MGT Cols ??
HClk Cols ??
SkipCols ??

 

Of course I'm not really sure about this numbers as i got them by looking and counting the columns and so on in "Device View" in PlanAhead, and the "??" numbers I have no idea how to get them.
I've read several UG, TM etc. but I do not understand how they got those values, maybe just by looking the Device View aswell....

And another question about the same issue... there is a note in hwicap.c just before the ZYNQ part of the DeviceDetaillkup[] table that states:


...
...
...
/*
* Zynq devices. Array index is 94 for the first V7 device
* The details of the rows, cloumns etc. are not filled as
* the related support is not added in the driver. The data
* will be populated whenever the support for writing into a CLB
* is implemented.
*/

{ XHI_XC7Z010, 0, 0, 0, 0, 0, 0, 0, 0 },

{ XHI_XC7Z020, 0, 0, 0, 0, 0, 0, 0, 0 },

{ XHI_XC7Z030, 0, 0, 0, 0, 0, 0, 0, 0 },

{ XHI_XC7Z045, 0, 0, 0, 0, 0, 0, 0, 0 }
....
....
....


Does that means that even if I manage to get the device parameters to fill the Device detail table, HWICAP is not supported in ZYNQ?

Thank you for your help!

Jaime

0 Kudos
Scholar austin
Scholar
10,562 Views
Registered: ‎02-27-2008

Re: HWICAP driver problem on ZYNQ

As far as I know,

 

ICAP works just fine.

 

If HWICAP is not fully supported for mapping to CLBs yet in Zynq, you may just have to wait for the next release of that IP block.

 

 

Austin Lesea
Principal Engineer
Xilinx San Jose
0 Kudos