Closed taichi-ishitani closed 4 months ago
I think this is a good feature that will make the code more compact.
My suggestion is to allow for naming the actual clock and reset signals in the toml file, such as
[build]
clock_name = "clock"
reset_name = "reset"
and then there are the positive / negative options for clock, and sync/async positive/negative options for reset.
Some people may want the final SystemVerilog code to have "i_reset_n" versus "i_rst_n" for example.
I prefer this idea, but the forth code block may be bit confusable.
In general programming language including SV, both i_clk
and clk
are visible at the always_ff
.
Even if the case is not allowed, almost all cases will be covered.
My suggestion is to allow for naming the actual clock and reset signals in the toml file, such as
How about #623 ? Specifing the name directly may be difficult to apply the multi-clock modules.
Most modules have one pair of clock and reset only so we can omit spacyfying clock and reset singals on
always_ff
blocks.To realize this feature, special types named
clock
andreset
would be instroduced. These types are to tell Veryl which signals are clock and reset signals. If a module have only one pair of signals of which types areclock
andreset
then Veryl can insert that clock and reset signals toalways_ff
blocks automatically.In addition, I think synthesis tools require that clock and reset signals should be single bit signals. Therefore, Veryl should check if signals speciled as clock/reset are single bit signals.