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
153 Views
Registered: ‎09-22-2017

Question about write configuration through ICAP

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

hwicap_test.png

0 Kudos
6 Replies
109 Views
Registered: ‎09-22-2017

Re: Question about write configuration through ICAP

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?

0 Kudos
Xilinx Employee
Xilinx Employee
100 Views
Registered: ‎08-25-2010

Re: Question about write configuration through ICAP

Hi @macmillan_zhu,

 

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.

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
87 Views
Registered: ‎09-22-2017

Re: Question about write configuration through ICAP

@simon

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? 

0 Kudos
Xilinx Employee
Xilinx Employee
79 Views
Registered: ‎08-25-2010

Re: Question about write configuration through ICAP

shutdown command is not necessary. You need to read at least two frames, because the first frame is from frame buffer.

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
69 Views
Registered: ‎09-22-2017

Re: Question about write configuration through ICAP

@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?

 

0 Kudos
55 Views
Registered: ‎09-22-2017

Re: Question about write configuration through ICAP

@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
00000509      //CTL0

无标题.png

 

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?

0 Kudos