Skip to content

Instantly share code, notes, and snippets.

@GaryLee
Created August 29, 2024 01:41
Show Gist options
  • Save GaryLee/36ff677645591ad5db8073fd7af3ae0e to your computer and use it in GitHub Desktop.
Save GaryLee/36ff677645591ad5db8073fd7af3ae0e to your computer and use it in GitHub Desktop.
My setting of coding style of verilog. Use verible-verilog-format to re-format the code.
#!/bin/sh
verible-verilog-format \
--inplace \
--column_limit=200 \
--indentation_spaces=4 \
--line_break_penalty=4 \
--assignment_statement_alignment=align \
--case_items_alignment=align \
--class_member_variable_alignment=align \
--formal_parameters_alignment=align \
--formal_parameters_indentation=indent \
--named_port_alignment=align \
--named_parameter_alignment=align \
--module_net_variable_alignment=align \
--port_declarations_alignment=align \
--port_declarations_alignment=align \
--struct_union_members_alignment=align \
-- "$*"
# Above flags can be put into a file. Then, use following commmand to format the verilog.
# Note, one flag per line. The leading space and trailing backslash need to be omitted.
# > verible-verilog-format --flagfile=coding-style.f -- "$*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment