sylefeb / Silice

Silice is an easy-to-learn, powerful hardware description language, that simplifies designing hardware algorithms with parallelism and pipelines.
Other
1.28k stars 77 forks source link

Allowing always_before and always_after blocks inline #181

Open sylefeb opened 3 years ago

sylefeb commented 3 years ago

In some cases (see discussion here for instance) moving code to always blocks is detrimental to readability, as the semantics get split and spread in different places.

A straightforward possibility would be to allow inline always blocks. In that case all always blocks would be concatenated together, into one global always_before and one always_after block.

Upsides:

Potential downsides:

Syntax highlighting can likely help with identifying the blocks clearly. The linter could warn on non-conditional conflicting assignments?