Git Product home page Git Product logo

Comments (3)

sylefeb avatar sylefeb commented on June 11, 2024

Hello Bernd,

Sorry, you stumbled on one of the very few breaking changes I had to make thus far (I try very hard not to introduce any). The fix is very simple but requires a code change:

algorithm main(
$$if ICESTICK then
  output uint5 leds, inout uint8 pmod
$$else
  output uint5 leds
$$end
) {
  while (1) {
  }
}

The rule is that you can freely have preprocessor if-then-else between the '(' and ')' of the algorithm (or unit) in/out declaration, and between the '{' and '}' of the algorithm block. However there should not be an if-then-else enclosing and repeating these parentheses and braces.

I had to introduce this constraint when implementing the new preprocessor (that allows instantiation time preprocessing). There is a technical constraint there that the preprocessor has to be able to extract a 'simple' form of the algorithm or unit, free of top level if-then-else.

I was hopeful no one would encounter this breaking change, but you just prove me wrong ;-) I'll revise the documentation and try to clarify the error message.

Thanks for the report!
Best regards,
Sylvain

from silice.

sylefeb avatar sylefeb commented on June 11, 2024

New documentation section: https://github.com/sylefeb/Silice/blob/master/learn-silice/Documentation.md#preprocessor-constraints

from silice.

at91rm9200 avatar at91rm9200 commented on June 11, 2024

Hello Sylvain,

thank you for the explanation.

Regards, Bernd.

from silice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.