Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support full C syntax for invoking derived FSMs #180

Open
JulianKemmerer opened this issue Sep 17, 2023 · 0 comments
Open

Support full C syntax for invoking derived FSMs #180

JulianKemmerer opened this issue Sep 17, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@JulianKemmerer
Copy link
Owner

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
@JulianKemmerer JulianKemmerer added the enhancement New feature or request label Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant