-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Generate SV code without comments #580
Comments
Looks good. [build]
strip_comments = true |
Yes, sounds good. Having the format as below makes more sense. [build]
strip_comments = true I also really like how the actual formatted code in the SystemVerilog mirrors the code formatting in Veryl. The only exception is in the case statement, but I can live with the way that it is now. It would be nice to have an option, however. For example [build]
sv_case = column_case Which would make this output code: always_ff @ (posedge clock) begin
case (state)
rx_IDLE : sample_counter <= CLOCKS_PER_BAUD / 2;
rx_SHIFT: if ((sample_counter > 0)) begin
sample_counter <= sample_counter - 1;
end else begin
sample_counter <= CLOCKS_PER_BAUD - 1;
end
rx_LOAD: sample_counter <= 0;
rx_DONE: sample_counter <= 0;
endcase
end being transformed to this output code instead: (what I call column case) always_ff @ (posedge clock) begin
case (state)
rx_IDLE : sample_counter <= CLOCKS_PER_BAUD / 2;
rx_SHIFT: if ((sample_counter > 0)) begin
sample_counter <= sample_counter - 1;
end else begin
sample_counter <= CLOCKS_PER_BAUD - 1;
end
rx_LOAD: sample_counter <= 0;
rx_DONE: sample_counter <= 0;
endcase
end |
The column_case seems to be good too. |
The ability to generate documentation from the veryl code is extremely useful.
It would also be helpful to have an option to remove or strip away the comments that are in the veryl code when generating the SystemVerilog code. In cases where the veryl code is heavily documented, this would allow inspection of the SystemVerilog code in a plain format and make it easier to review the generated code.
This process to do this would simply be placing a "strip_comments" in the toml / veryl file as:
The text was updated successfully, but these errors were encountered: