FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5283 Discussions

On HLS device is it possible to have the base address (pointer offset) of a MM_Master interface on the Control and Status Register (CSR), besides the default conduit.

rafaelcorsi
Beginner
340 Views

On my project I have this component:

typedef ihc::mm_master<unsigned char, ihc::aspace<1>, ihc::awidth<32>, ihc::dwidth<8> > Master1; typedef ihc::mm_master<unsigned char, ihc::aspace<2>, ihc::awidth<32>, ihc::dwidth<8> > Master2;     hls_avalon_slave_component component void imgOffSet(Master1& imgIn, Master2& imgOut, hls_avalon_slave_register_argument int N) { for(int y=0; y < N; y++){ #pragma unroll 8 for (int x=0; x < N; x++){ int px = pxToMem(x,y,N); printf("%d \n", px); unsigned int tpx = ((unsigned int) imgIn[px])+OFFSET; if(tpx > 255) imgOut[px]= 255; else imgOut[px]= tpx; } } }

 

The problem is that the HLS creates two conduits that is the base address of ImgIn and ImgOut, I would like to have this address on the already existent CSR register, that is accessible by the Slave port created by the compiler, as shown bellow:

 

 Screenshot from 2019-11-18 18-40-17@2x.png

 

0 Kudos
2 Replies
MEIYAN_L_Intel
Employee
174 Views

Hi,

You can refer to https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/hls/mnl-hls-reference.pd... in Chapter 4.3.2 with explicit example.

 

There is an avalon standardize interface format that need to follow

 

Thanks

MEIYAN_L_Intel
Employee
174 Views

Hi,

You may try to change the code code as below:

component void imgOffSet(hls_avalon_slave_register_argument Master1& imgIn,

 

 hls_avalon_slave_register_argument Master2& imgOut,

 

hls_avalon_slave_register_argument int N) 

 

Thanks

Reply