AR# 52751

Vivado HLS 2012.x - read and write from 64 bit memory with structs casting - example

Description

I would like to read some data from memory and cast directly to my own data structures.

Is this possible? 

How can I do this?

Solution

This example builds on the examples and Vivado HLS user guide and documentation.

One thing to understand from the user guide is that "Pointer casting is not however supported between general types".


The attached example will read and write from a single port 64 bits memory. 


Please use it along with the User Guide.

When run, the TB produces the following output:

>>>
before call:
[0]:0x0000000011000000
[1]:0x0000010111000001
[2]:0x0000000211000002
[3]:0x0000010311000003
[4]:0x0000000411000004
[5]:0x0000010511000005
[6]:0x0000000611000006
[7]:0x0000010711000007
[8]:0x0000000811000008
[9]:0x0000010911000009
calling HLS block
done, after call:
[0]:0x0000000011000000
[1]:0x0000010111000001
[2]:0x0000000211000002
[3]:0x0000010311000003
[4]:0x0000000411000004
[5]:0x00000105ee000004
[6]:0x00000004ee000002
[7]:0x00000103ee000002
[8]:0x00000002ee000000
[9]:0x00000101ee000000
<<<

 

 

AR52751.jpg
AR52751.jpg


 

Attachments

Associated Attachments

Name File Size File Type
AR52751.zip 1006 Bytes ZIP
AR# 52751
Date 03/23/2015
Status Active
Type General Article
Tools