Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎07-09-2018

__SYNTHESIS__ analog for cosim



I'm working on a streaming IP core that is parameterizable through an AXI4Lite interface. That is, it's C function looks like


dout_t f(din_t x, const config_t cfg&) {
#pragma HLS INTERFACE s_axilite port=cfg
#pragma HLS INTERFACE ap_stable port=cfg #pragma HLS INTERFACE ap_ctrl_none port=return /* some computation here */
return y; }

AXI4Lite interface is used "ansynchronously" to set the parameters once and as a read-only (from PL side). That justifies the pragmas set on it.


However, cosim fails with such a function, because it demands return to also be s_axilite. To overcome this, I simply comment out the line

#pragma HLS INTERFACE s_axilite port=cfg


Now I would like to launch cosim from scripts without changing anything by hand. The only solution I could imagine is to write a separate script.tcl that would set some #define indicating that this build is for cosimulation.

Is there an easier way? And if not, how can I set such a define from tcl script?




0 Kudos
0 Replies