X
Xesium
Guest
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. As
well the base address and high address of my HWICAP is 0x42000000 and
0x42000fff as mentioned in the datasheet of HWICAP. Initially my OPB
clock frequency was 100 MHz but now I have reduced it to 25MHz. 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 There is something wrong in initializing the ICAP!!
\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 with col
= 5 and lut_bit = 3!!!!!\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 but even the 7 words that I read from the storage
buffer is not the same as the ones that the driver's deviceRead
function writes to the storage buffer. So I don't get what the problem
is.
The seven words that I read are as follows:
30008001
0000000d
ffffffff
ffffffff
30002001
00404000
2800619c
However for example based on the driver's implementation the first
word should be 0xFFFFFFFF which is an XHI_DUMMY_PACKET.
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?
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,
Amir
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. As
well the base address and high address of my HWICAP is 0x42000000 and
0x42000fff as mentioned in the datasheet of HWICAP. Initially my OPB
clock frequency was 100 MHz but now I have reduced it to 25MHz. 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 There is something wrong in initializing the ICAP!!
\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 with col
= 5 and lut_bit = 3!!!!!\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 but even the 7 words that I read from the storage
buffer is not the same as the ones that the driver's deviceRead
function writes to the storage buffer. So I don't get what the problem
is.
The seven words that I read are as follows:
30008001
0000000d
ffffffff
ffffffff
30002001
00404000
2800619c
However for example based on the driver's implementation the first
word should be 0xFFFFFFFF which is an XHI_DUMMY_PACKET.
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?
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,
Amir