12-06-2018 06:36 AM
I'm using a ZC706 board, and I'm trying to read and write the config mem using AXI-HWACAP through ICAPE2.
The PS part and the AXI-HWICAP worked fine, and I can read the IDCODE from ICAP successfully.
After I tried to write a word to frame, I read the same frame address, the data I read didn't match the data I'm trying to write.
the data before write is 0x00000000,
the data which I want to write is 0x12345678,
the data I read after write operation is 0xFFFFFFD8.
What's the Problem?
The Command Sequence :
0xFFFFFFFF //dummy 0x000000BB //Bus Width Sync Word 0x11220044 //Bus Width Detect 0xFFFFFFFF //dummy 0xAA995566 //sync 0x20000000 //noop 0x20000000 //noop 0x28018001 //type1 read idcode 0x20000000 //noop 0x20000000 //noop //read 1 word 0xFFFFFFFF //dummy 0x30008001 //write CMD word1 0x00000004 //CMD RCFG 0x20000000 //noop 0x30002001 //write FAR word1 0x0002051A //Frame addr = 00002051A 0x28006001 //read FDRO 0x20000000 //noop 0x20000000 //noop
//read 1 word 0xFFFFFFFF //dummy 0x30008001 //write CMD word1 0x00000007 //CMD reset CRC 0x20000000 //noop 0x20000000 //noop 0x30008001 //write CMD word1 0x00000001 //CMD WCFG 0x20000000 //noop 0x30002001 //write FAR word1 0x0002051A //frame addr = 00002051A 0x30004001 //write FDRI word1 0x12345678 //frame data to write
0xFFFFFFFF //dummy 0x30008001 //write CMD word1 0x00000004 //CMD RCFG 0x20000000 //noop 0x30002001 //write FAR word1 0x0002051A //Frame addr = 00002051A 0x28006001 //read FDRO word1
//read 1 word
12-06-2018 08:19 PM - edited 12-06-2018 11:51 PM
I modified my code to read or write 101 word of the entire frame.
I read the same data before and after my write operation, it seemed the write operation didn't affect the frame.
here is the command sequence for my write operation:
I read the IDCODE first, and the ICAPE2 was synced.
0xFFFFFFFF //dummy 0x30008001 //write CMD word1 0x00000007 //CMD reset CRC
0x20000000 //noop 0x20000000 //noop
0x30018001 //write IDCODE word1
0x23731093 //IDCODE = 0x23731093 0x30008001 //write CMD word1 0x00000001 //CMD WCFG 0x20000000 //noop 0x30002001 //write FAR word1 0x0002051A //frame addr = 00002051A 0x30004065 //write FDRI word101 0x12345678 //data to write to the frame ...... 0x12345678 //101 words
Is there anything wrong? Or any suggestion about how to write a frame?
12-06-2018 09:02 PM
Please refer to table 6-2, and you need read an extra frame as there is a frame buffer. And also note there is a packet buffer, when you write packet.
12-06-2018 11:11 PM
Thanks for your reply.
I modified the command sequence for read op refer to 6-2, and the data read before and after the write operation is still the same. I think there's something wrong with the write operation. Is there any reference about write a single frame into the config mem?
Another question, is the SHUTDOWN command in the read operation necessary?
12-07-2018 12:26 AM
shutdown command is not necessary. You need to read at least two frames, because the first frame is from frame buffer.
12-07-2018 06:16 AM
@simonThanks for your reply.
I modified the read command sequence refer to 6-2, with 2 frame read and 32 NOOP, I think now I've read the correct data from the frame.
As I read, write, and read again to the frame, the data which I read before and after the write operation is still the same. It seems the write operation goes wrong.
Any suggestions about write operation? Does write operation also need write 2 frames? Is there any reference about write a single frame into the config mem?
12-08-2018 01:51 AM
@simonHi, I just found something maybe another problem.
It's said in the UG470 that PERSIST bit in CTL0 reg, Typically used only with the SelectMAP interface to allow reconfiguration and readback.
I read the CTL0 reg, and got 0x00000501. The PERSIST bit was set as No. Did that cause the problem?
But When I tried to write to the CTL0 reg using the sequence below. After that I still read the 0x00000501, why's that?
3000A001 //type1 write CTL0 word1
How does the MASK reg affect the CTL0 reg, in UG470, it just said that "Writes to the CTL0 register are masked by the value in the MASK Register". If I want to write 0x00000509 to CTL0, should I write to MASK 0x00000509 before I write CTL0 reg?
07-24-2019 08:09 AM
I have the same problem you faced means read, write and read getting the previous data which was there before write. that means writing is not working. so, what was the solution you get ???
09-11-2019 03:52 AM
what is packet buffer. I have been trying to write bitstream same way but getting old configuration.. what will be the sequence for this?