Add a switch to force coverpoint expansion Signed-off-by: Rafal Kapuscik <rkapuscik@antmicro.com>
diff --git a/verilog/formatting/format_style.h b/verilog/formatting/format_style.h index 495caa6..f230a06 100644 --- a/verilog/formatting/format_style.h +++ b/verilog/formatting/format_style.h
@@ -95,6 +95,7 @@ // attempt to do line wrap optimization. By doing nothing in those cases, we // reduce the risk of harming already decent code. bool try_wrap_long_lines = true; + bool expand_coverpoints = true; // Compact binary expressions inside indexing / bit selection operators bool compact_indexing_and_selections = true;
diff --git a/verilog/tools/formatter/verilog_format.cc b/verilog/tools/formatter/verilog_format.cc index b43a1b3..7032b53 100644 --- a/verilog/tools/formatter/verilog_format.cc +++ b/verilog/tools/formatter/verilog_format.cc
@@ -166,6 +166,9 @@ AlignmentPolicy::kInferUserIntent, "Format various assignments: {align,flush-left,preserve,infer}"); +ABSL_FLAG(bool, expand_coverpoints, false, + "If true, always expand coverpoints."); + ABSL_FLAG(bool, try_wrap_long_lines, false, "If true, let the formatter attempt to optimize line wrapping " "decisions where wrapping is needed, else leave them unformatted. " @@ -224,6 +227,7 @@ // formatting style flags format_style.try_wrap_long_lines = absl::GetFlag(FLAGS_try_wrap_long_lines); + format_style.expand_coverpoints = absl::GetFlag(FLAGS_expand_coverpoints); // various indentation control format_style.port_declarations_indentation =