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?