Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎08-26-2014

Is it possible to create an IP which writes 6 values on the DDR incrementaly but just setting once the start address?



I need an IP wich writes 6 values on the given DDR address every time I call the function. However, I don't want to increment the address every time I call the function. So I thought of passing the input pointer as an argument (*init_addr), which then I save as an local static pointer (*addr) that I increment when writing the values. Here you can see my code:


unsigned int writing_on_ddr(volatile float *init_addr)
#pragma HLS INTERFACE s_axilite depth=1 port=return
#pragma HLS INTERFACE m_axi depth=6 port=init_addr offset=slave

	static volatile float *addr = init_addr;

	// Write some data in the given address and increment the pointer
	*addr++ = "some_data";
	*addr++ = "some_data";
	*addr++ = "some_data";
	*addr++ = "some_data";
	*addr++ = "some_data";
	*addr++ = "some_data";

	// Return the next address to be written
	return (unsigned int*)&addr;

However, it complains when synthesising:


ERROR: [SYNCHK 200-11] CIC_conversion_to_float/CIC_conversion_to_float.cpp:155: Constant 'addr' has an unsynthesizable type 'floatP*' (possible cause(s): pointer to pointer or global pointer).
ERROR: [SYNCHK 200-61] CIC_conversion_to_float/CIC_conversion_to_float.cpp:157: unsupported memory access on variable 'addr' which is (or contains) an array with unknown size at compile time.
ERROR: [SYNCHK 200-41] CIC_conversion_to_float/CIC_conversion_to_float.cpp:162: pointer reinterpretation on global variable 'addr' from type 'floatP*' to type 'i32*' is unsupported.

Actually, if I remove the "return", it does synthesize without any problem. But I have tested the IP and it does not write the data in the specified address, so I thought of debugging the IP returning the address where is going to write next.


However, the console says this:


WARNING: [RTGEN 206-101] Register 'init' is power-on initialization.
WARNING: [RTGEN 206-101] Register 'addr_index' is power-on initialization.

Which I guess means it will not take into account any changes after power-on initialization.


Any clue how to implement it?


Many thanks,



0 Kudos
0 Replies