ICAP for readback on Microblaze...

Hi everybody, I'm trying to partially reconfigure my device (XC2VP30 on ML310 board) through ICAP. I have my ICAP attached to OPB which is attached to Microblaze. In bitgen.ut file I have set the value of mode pins (M2M1M0) to 1 (PULLUP). So it is not set on 101 which is JTAG mode. I also made sure that persist bit is not set. As well the base address and high address of my HWICAP is 0x42000000 and 0x42000fff as mentioned in the datasheet of HWICAP. My system's (processor and OPB bus) clock frequency is 25 MHz to make sure that ICAP is OK with it. The system contains a timer, a SysAce, a hwicap, a uartlite and an opb- mdm (for debugging) all attached to the opb. The microblaze has some local memory too. I'm also using EDK, ISE 8.2. That's the whole setting about my system. Now here is the problem:

I just need to measure the delay of reconfiguration through ICAP. The following is a very simple C code I have implemented to read a frame and print the content on the screen. Later I want to write something to a frame and again read it back just to make sure that in fact it changed the reconfiguration. Firstly I initialize the ICAP module and then invoke XHwIcap_DeviceReadFrame() and then I read the configuration through XHwIcap_StorageBufferRead().

XHwIcap my_icap;

XStatus icap_stat;

icap_stat = XHwIcap_Initialize(&my_icap, XPAR_OPB_HWICAP_0_DEVICE_ID, XHI_READ_DEVICEID_FROM_ICAP);

if(icap_stat != XST_SUCCESS) print("\n Initialization not successful!!\n");

Xuint32 frame_content;

icap_stat = XHwIcap_DeviceReadFrame(&my_icap, XHI_FAR_CLB_BLOCK,

32, 32);

if(icap_stat != XST_SUCCESS) print("\n There is something working in reading a frame!\n");

for(i = 0; i < my_icap.WordsPerFrame; i++) { print("word number"); putnum(i+1); print(" is equal to: "); frame_content = XHwIcap_StorageBufferRead(&my_icap, i); putnum(frame_content); putchar('\n'); }

The problem is when I read back the frame except for the first 7 words everything is 0, no matter what frame it is. I have carefully studied ICAP's driver's functions and their implementation. I know that the driver writes the first 7 words in the storage buffer which are basically dummy word, sync word, setting CMD register, setting FAR register and etc. While I have not verified that to read back these are the words that should be sent to ICAP but they sound reasonable. The seven words that I read are as follows:

30008001 0000000d ffffffff ffffffff 30002001 00404000 2800619c

(I guess this should not be an issue but the first 4 words are different than what was written in DeviceReadFrame function, I realized that the content changes after invoking Desync command in DeviceReadFrame function!) So as I mentioned, my problem is I can't basically read a frame of configuration correctly. Do you have any idea where I'm doing wrong or what the problem is? I have been advised to use DeviceRead and DeviceWrite instead of DeviceReadFrame and DeviceWriteFrame. Does any one have a successful on unsuccessful experience with these functions in the driver?

As well I have some doubts and questions. Firstly why should we first read a frame, modify it and then write it back to the configuration? Can't we just write something to the device? I haven't still worked with difference-based reconfiguration and it might have something to do with that. But if I just want to write configuration to one frame that doesn't implement any other part of any other circuit, can't I just write something to that frame without first reading it and modifying it?

The second question that I have is about the storage buffer of the HWICAP module. Firstly I thought that I have to set an opb_bram so that HWICAP can use it. However later through studying the driver I realized that the base address for HWICAP is the same as storage buffer (which is the BRAM) so I concluded that when I use a HWICAP I implicitly assign a BRAM to it. Is this so? If not please let me know.

The third question is the clock frequency that ICAP operates! I have read somewhere that the highest is 66MHz. Is it correct or we can set the clock higher than that?

This message became very long, but I really appreciate it if you could kindly help me out with it. I have read many of the previous posts about ICAP but couldn't find enough information to solve my problems. So perhaps this post can be a complement to them.

Thanks a lot beforehand,

Reply to
Xesium
Loading thread data ...

Hi everybody,

I'm trying to use ICAP for reconfiguring XC2VP30 on ML310 board. At this moment I'm just trying to read back the configuration. However no matter what frame I try reading I get all 0s as the content of the frame. As far as I've understood persist bit should not be set and also configuration mode should not be on JTAG (M2M1M0 should not be

101). I have made sure that these are not problems. I'm using DeviceReadFrame from the hwicap driver to read a frame, meaning that after initialization of ICAP, I try reading a frame which is stored in the storage buffer. After that I print the content of the storage buffer but the content is all 0s. Do you have any idea what the problem could be?

As well I have a doubt about something: Why do we have to go through the process of Read, Modify and then Write for reconfiguration? Can't we just write a frame instead of bearing the overhead of reading and modifyin it?

Also do I have to explicitly define the BRAM attached to the ICAP device or is it assigned explicitly?

I truly appreciate your response beforehand,

Amir

Reply to
Xesium

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.