Ansys Learning Forum › Forums › Discuss Simulation › Embedded Software › “Unexpected operator with clocked I/O” issue. › Reply To: “Unexpected operator with clocked I/O” issue.
November 25, 2024 at 4:03 pm
Benjamin Descorps
Ansys Employee
Hello,
This example is correct from a Scade language point of view. But it cannot be compiled as a C function as the operator declares a clocked variable at the interface.
You may have to instantiate this operator or to modify the interface of the operator rst_clk if you want to generate C code. Here is an example on how to modify the operator to generate C code:
node rst_clk(rst:bool; clock h:bool) returns (s:int32; t:int32 )
let
s = (restart nat every rst) ();
t = merge (h; (restart nat every rst)(() when h); 0 when not h);
tel
Hope this helps,
Benjamin