PipelineC
PipelineC copied to clipboard
Support full C syntax for invoking derived FSMs
Ex. consider a derived FSM function uint32_t add1(uint32_t)
invoked three times sequentially:
uint32_t add1(uint32_t x)
{
uint32_t rv = x + 1;
__clk();
return rv;
}
uint32_t test1(uint32_t x)
{
uint32_t rv = add1(add1(add1(x)));
return rv;
}
The add1(add1(add1(x
nesting syntax is not yet supported (requires logic to follow chain of ~almost recursive looking use of a function and allocate registers as needed).
Will get an error like:
Exception: TODO unsupported control flow in func call argument:
or similar...
Work around is to declare the intermediate variables yourself:
a = add1(x)
b = add1(a);
c = add1(b);
//etc