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: 
Explorer
Explorer
469 Views
Registered: ‎10-12-2018

Cannot write AXI traffic generator registeres with standalone driver.

My design is containing a traffic generator IP. I try to set up from a C code from microblase with the following code (part).

uint32_t *tafGenbasePtr = XPAR_AXI_TRAFFIC_GEN_0_BASEADDR;
len = 5+i;            // 0 = 1
transferCnt = 2+i;    // 0 = inf
...

XTrafGen_SetStreamingTransLen(xtrafGenptr , len);
XTrafGen_SetStreamingTransCnt(xtrafGenptr , transferCnt);

It works for the first time, but when I call these macros multiple times, the register value remain unchanged, or become totally wrong.

 

If I use native register writes like the following:

uint32_t *tafGenbasePtr = XPAR_AXI_TRAFFIC_GEN_0_BASEADDR;
len = 5+i;            // 0 = 1
transferCnt = 2+i;    // 0 = inf
...
tafGenbasePtr[XTG_STREAM_TL_OFFSET/4] = (transferCnt<<16)+len;

works fine also writing several times.

 

I use

  • Vivado 2016.3 (legacy reasons)
  • Win 7
  • VC707 devboard
0 Kudos
2 Replies
Moderator
Moderator
390 Views
Registered: ‎10-06-2016

Re: Cannot write AXI traffic generator registeres with standalone driver.

Hi @betontalpfa

Could you share your macro definitions to check where the error is? I also guess that each time you are calling to the function/macro you increment the value of i?

Regards

Ibai


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Explorer
Explorer
381 Views
Registered: ‎10-12-2018

Re: Cannot write AXI traffic generator registeres with standalone driver.

Hi @ibaie

Yes, this is a test and I modify the 'i' in each loop iteration.

The macro is located in the xtrafgen.h header.

Here is the "fully expanded" version of the macro in my case (len=5):

(Xil_Out32((((xtrafGenptr)->Config.BaseAddress) + (0x38)), (((Xil_In32((((xtrafGenptr)->Config.BaseAddress) + (0x38)))) | 05))))

 

0 Kudos