Hi everyone,
I’m currently switching some ports from double to 32-bit float, but the simulation fails to generate .qraw,
I’m unsure whether shortfloat is fully supported in the C-block interface (returned non-zero exit status 3221225477)
Hi everyone,
I’m currently switching some ports from double to 32-bit float, but the simulation fails to generate .qraw,
I’m unsure whether shortfloat is fully supported in the C-block interface (returned non-zero exit status 3221225477)
Curious, how do you change to shortfloat?
Do you just change the port definition from Qspice?
Do you change the port definition within the C-code?
Do you ensure to properly cast the data assigned to the input port to shortfloat as you modify your C-block?
Is there any chance that you may do this?
(float) outpost = (double) outdata;
yes, I modified both the QSPICE port definitions and the C code.
I simply replaced the relevant double declarations with float and used uData.f throughout
I have considered that possibility as well. However, I’d like to confirm whether there are any known examples of successfully using shortfloat
I never use shortfloat on port definition, I typically use double, bool, int… Often time the data I want to send to the port and the actual port has different definition. And so far so good.
Anyway, I suppose it’s just casting inconsistency.
@gao,
I’ve made a very simple Cblock with one input (as shortfloat) passes on to the one output (as shortfloat).
CBlock_float_test.qsch (1.3 KB)
cblock_float_test_x1.cpp (1005 Bytes)
Seems to work with no errors.
Len