Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
185 Views

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.

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

 

Tags (1)
0 Kudos
2 Replies
Highlighted
Employee
19 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

0 Kudos
Highlighted
Employee
19 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

0 Kudos