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: 
323 Views
Registered: ‎10-06-2017

reading AXILite value

 

H,
We have top function as below :

void index_compute_block_top_29_1_Aug(
......,
ap_uint<32> &trade_cnt,
......,
)
{
.....
#pragma HLS INTERFACE s_axilite port=trade_cnt
.....
....
....
//some code
trade_cnt = trade_cnt + 1;
....
....

}

The variable trade_cnt is mapped on to AXILite as seen above.
Now we create an IP of this using export IP option. This also generates hardware address file.
The generated hardware address file in the exported IP folder gives 3 addresses with extensions _i,_o and _vld.

here is a snippet from the hardware file

// 0x060 : Data signal of trade_cnt_V_i
// bit 31~0 - trade_cnt_V_i[31:0] (Read/Write)
// 0x064 : reserved
// 0x068 : Data signal of trade_cnt_V_o
// bit 31~0 - trade_cnt_V_o[31:0] (Read)
// 0x06c : Control signal of trade_cnt_V_o
// bit 0 - trade_cnt_V_o_ap_vld (Read/COR)
// others - reserved


We used trade_cnt_V_i address (0x060)to write a value to the variable.

Question is, how do we read the values from the variable over AXILite? What address do we use? Is there any protocol
for accessing the variable? how do we go about?

I am attaching the hardware address file along with this post for reference.


awaiting reply,
regards,
-Mahesh

0 Kudos
2 Replies
Highlighted
Observer immi4net
Observer
255 Views
Registered: ‎06-24-2011

Re: reading AXILite value

Hi,

The same address you are using to read XilIn32(base+0x60), thats it.

Make sure that if you are not using the trade_cnt outside your IP then do not return it and don't use & operator in the declaration. It will only create a single axi light register for read/write.

Moderator
Moderator
167 Views
Registered: ‎11-21-2018

Re: reading AXILite value

Hi mahesh.barve@tcs.com 

If your question is answered or your issue is solved, please kindly mark the response which helped as solution (click on "Accept as solution" button below the reply).

 

If this is not solved/answered, please reply in the topic giving more information on your current status.

 

Thanks and Regards,

Aoife
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos