put user message on its own line

This commit is contained in:
Zachary Snow 2024-09-02 12:10:55 -04:00
parent fe3c93e82f
commit 68fc7455d5
5 changed files with 12 additions and 11 deletions

View File

@ -47,7 +47,8 @@ elab severity args prefixStr prefixArgs = do
return $ Block Seq "" [] [stmtDisplay, stmtFinish]
where
msg scope file = severityToString severity ++ " [" ++ prefixStr ++ "] "
++ file ++ " - " ++ scope ++ if null displayArgs then "" else " - "
++ file ++ " - " ++ scope
++ if null displayArgs then "" else "\\n msg: "
displayArgs = if severity /= SeverityFatal || null args
then args
else tail args

View File

@ -1,5 +1,5 @@
affirm $finish;
affirm $display("Fatal [elaboration] elab_task.sv:9:5 - top");
affirm $finish(0);
affirm $display("Fatal [elaboration] elab_task.sv:10:5 - top - ", "%b", 4);
affirm $display("Fatal [elaboration] elab_task.sv:10:5 - top\\n msg: ", "%b", 4);
affirm $finish(1);

View File

@ -1,10 +1,10 @@
module top;
initial $display("Info [elaboration] elab_task.sv:2:5 - top");
initial $display("Info [elaboration] elab_task.sv:3:5 - top - %b", 1);
initial $display("Info [elaboration] elab_task.sv:3:5 - top\n msg: %b", 1);
initial $display("Warning [elaboration] elab_task.sv:4:5 - top");
initial $display("Warning [elaboration] elab_task.sv:5:5 - top - %b", 2);
initial $display("Warning [elaboration] elab_task.sv:5:5 - top\n msg: %b", 2);
initial $display("Error [elaboration] elab_task.sv:6:5 - top");
initial $display("Error [elaboration] elab_task.sv:7:5 - top - %b", 3);
initial $display("Error [elaboration] elab_task.sv:7:5 - top\n msg: %b", 3);
initial begin
$display("Fatal [elaboration] elab_task.sv:8:5 - top");
$finish;
@ -14,7 +14,7 @@ module top;
$finish(0);
end
initial begin
$display("Fatal [elaboration] elab_task.sv:10:5 - top - %b", 4);
$display("Fatal [elaboration] elab_task.sv:10:5 - top\n msg: %b", 4);
$finish(1);
end
endmodule

View File

@ -1,5 +1,5 @@
affirm $finish;
affirm $display("Fatal [%0t] severity_task.sv:10:9 - top.<unnamed_block>", $time);
affirm $finish(0);
affirm $display("Fatal [%0t] severity_task.sv:11:9 - top.<unnamed_block> - ", $time, "%b", 4);
affirm $display("Fatal [%0t] severity_task.sv:11:9 - top.<unnamed_block>\\n msg: ", $time, "%b", 4);
affirm $finish(1);

View File

@ -1,16 +1,16 @@
module top;
initial begin
$display("Info [%0t] severity_task.sv:3:9 - top.<unnamed_block>", $time);
$display("Info [%0t] severity_task.sv:4:9 - top.<unnamed_block> - ", $time, "%b", 1);
$display("Info [%0t] severity_task.sv:4:9 - top.<unnamed_block>\n msg: ", $time, "%b", 1);
$display("Warning [%0t] severity_task.sv:5:9 - top.<unnamed_block>", $time);
$display("Warning [%0t] severity_task.sv:6:9 - top.<unnamed_block> - ", $time, "%b", 2);
$display("Warning [%0t] severity_task.sv:6:9 - top.<unnamed_block>\n msg: ", $time, "%b", 2);
$display("Error [%0t] severity_task.sv:7:9 - top.<unnamed_block>", $time);
$display("Error [%0t] severity_task.sv:8:9 - top.<unnamed_block> - ", $time, "%b", 3);
$display("Error [%0t] severity_task.sv:8:9 - top.<unnamed_block>\n msg: ", $time, "%b", 3);
$display("Fatal [%0t] severity_task.sv:9:9 - top.<unnamed_block>", $time);
$finish;
$display("Fatal [%0t] severity_task.sv:10:9 - top.<unnamed_block>", $time);
$finish(0);
$display("Fatal [%0t] severity_task.sv:11:9 - top.<unnamed_block> - ", $time, "%b", 4);
$display("Fatal [%0t] severity_task.sv:11:9 - top.<unnamed_block>\n msg: ", $time, "%b", 4);
$finish(1);
end
endmodule