Commit Graph

7 Commits

Author SHA1 Message Date
Lars-Peter Clausen de9d5e98b1 tgt-vvp: Replace `%pushi ...; %op` with `%opi`
For sequences where the tgt-vvp backend generates `%pushi` followed by one
of the operations that have an immediate version replace it with the
immediate version. This is slightly more efficient.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2024-08-31 13:46:30 +02:00
Martin Whitaker a204af04a5 Support for loops with no loop condition.
SystemVerilog makes all of the initialisation, condition, and step
components of a for loop optional. We already support this for the
initialisation and step components.
2024-07-09 21:58:15 +01:00
Cary R d42f97ecbe Cleanup space issues 2024-01-20 11:26:06 -08:00
Lars-Peter Clausen fb403c6266 tgt-vvp: Handle continue/break in do-while loops
Currently continue and break are supported in most loops. But not in
do-while loops. Add support for them in do-while loops as well.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-06-11 07:20:15 -07:00
Cary R ef931e2e0d Spelling and space cleanup 2023-05-31 22:44:13 -07:00
Cary R 7ac6182d4c Update to compile with older GCC versions 2023-05-31 20:02:36 -07:00
Stephen Williams 6c9c876c83 Add compiler support for break and continue
This includes support at the parser (pform) through enaboration
and the netlist format for the break and continue statements.

Elaboration actually already worked for for-loops, but since the code
generators need more information, this is a rewire of that support to
be explicit about for-loops. This means they are not rewritten as fancy
while loops. The code generators will have to handle that.

Given the elaboration of for-loops now work, write the vvp code generator
support needed to implement it.

Now that for-loops are presented as for-loops to the code generator, the
vlog95 code generator doesn't need to infer them anymore. Generate the code
more directly.

Also update the tests list so that the vlog95_reg tests all pass.
2023-01-15 21:46:20 -08:00