From f57c72e5dbeec58f0bc638a781152220aea6fc91 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sun, 3 Jan 2021 11:57:29 -0500 Subject: [PATCH] clang-format --- Makefile.in | 1 + examples/make_hello_c/sim_main.cpp | 2 +- examples/make_hello_sc/sc_main.cpp | 3 ++- examples/make_protect_lib/sim_main.cpp | 4 ++-- examples/make_tracing_c/sim_main.cpp | 2 +- examples/make_tracing_sc/sc_main.cpp | 6 +++--- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Makefile.in b/Makefile.in index 2ed4c2cd9..acb3e43bd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -422,6 +422,7 @@ endif # Use --xml flag to see the cppcheck code to use for suppression CPPCHECK_CPP = $(wildcard \ + $(srcdir)/examples/*/*.cpp \ $(srcdir)/include/*.cpp \ $(srcdir)/src/*.cpp ) CPPCHECK_H = $(wildcard \ diff --git a/examples/make_hello_c/sim_main.cpp b/examples/make_hello_c/sim_main.cpp index 17cd87887..e95be4fa6 100644 --- a/examples/make_hello_c/sim_main.cpp +++ b/examples/make_hello_c/sim_main.cpp @@ -37,6 +37,6 @@ int main(int argc, char** argv, char** env) { // Destroy model delete top; - // Fin + // Return good completion status exit(0); } diff --git a/examples/make_hello_sc/sc_main.cpp b/examples/make_hello_sc/sc_main.cpp index 208ba582b..6fef7ca31 100644 --- a/examples/make_hello_sc/sc_main.cpp +++ b/examples/make_hello_sc/sc_main.cpp @@ -33,12 +33,13 @@ int sc_main(int argc, char* argv[]) { // Simulate until $finish while (!Verilated::gotFinish()) { + // Simulate 1ns sc_start(1, SC_NS); } // Final model cleanup top->final(); - // Fin + // Return good completion status return 0; } diff --git a/examples/make_protect_lib/sim_main.cpp b/examples/make_protect_lib/sim_main.cpp index d89aa3482..c7762ba54 100644 --- a/examples/make_protect_lib/sim_main.cpp +++ b/examples/make_protect_lib/sim_main.cpp @@ -13,7 +13,7 @@ #include "Vtop.h" #if VM_TRACE -# include +#include #endif vluint64_t main_time = 0; @@ -70,6 +70,6 @@ int main(int argc, char** argv, char** env) { delete top; top = nullptr; - // Fin + // Return good completion status exit(0); } diff --git a/examples/make_tracing_c/sim_main.cpp b/examples/make_tracing_c/sim_main.cpp index b6ebc6cbd..bcd853162 100644 --- a/examples/make_tracing_c/sim_main.cpp +++ b/examples/make_tracing_c/sim_main.cpp @@ -101,6 +101,6 @@ int main(int argc, char** argv, char** env) { VerilatedCov::write("logs/coverage.dat"); #endif - // Fin + // Return good completion status exit(0); } diff --git a/examples/make_tracing_sc/sc_main.cpp b/examples/make_tracing_sc/sc_main.cpp index f91ad5b42..4f7628113 100644 --- a/examples/make_tracing_sc/sc_main.cpp +++ b/examples/make_tracing_sc/sc_main.cpp @@ -55,10 +55,10 @@ int sc_main(int argc, char* argv[]) { sc_signal reset_l; sc_signal in_small; sc_signal in_quad; - sc_signal > in_wide; + sc_signal> in_wide; sc_signal out_small; sc_signal out_quad; - sc_signal > out_wide; + sc_signal> out_wide; // Construct the Verilated model, from inside Vtop.h // Using unique_ptr is similar to "Vtop* top = new Vtop" then deleting at end @@ -134,6 +134,6 @@ int sc_main(int argc, char* argv[]) { VerilatedCov::write("logs/coverage.dat"); #endif - // Fin + // Return good completion status return 0; }