clang-format

This commit is contained in:
Wilson Snyder 2021-01-03 11:57:29 -05:00
parent 7eeb930c72
commit f57c72e5db
6 changed files with 10 additions and 8 deletions

View File

@ -422,6 +422,7 @@ endif
# Use --xml flag to see the cppcheck code to use for suppression # Use --xml flag to see the cppcheck code to use for suppression
CPPCHECK_CPP = $(wildcard \ CPPCHECK_CPP = $(wildcard \
$(srcdir)/examples/*/*.cpp \
$(srcdir)/include/*.cpp \ $(srcdir)/include/*.cpp \
$(srcdir)/src/*.cpp ) $(srcdir)/src/*.cpp )
CPPCHECK_H = $(wildcard \ CPPCHECK_H = $(wildcard \

View File

@ -37,6 +37,6 @@ int main(int argc, char** argv, char** env) {
// Destroy model // Destroy model
delete top; delete top;
// Fin // Return good completion status
exit(0); exit(0);
} }

View File

@ -33,12 +33,13 @@ int sc_main(int argc, char* argv[]) {
// Simulate until $finish // Simulate until $finish
while (!Verilated::gotFinish()) { while (!Verilated::gotFinish()) {
// Simulate 1ns
sc_start(1, SC_NS); sc_start(1, SC_NS);
} }
// Final model cleanup // Final model cleanup
top->final(); top->final();
// Fin // Return good completion status
return 0; return 0;
} }

View File

@ -13,7 +13,7 @@
#include "Vtop.h" #include "Vtop.h"
#if VM_TRACE #if VM_TRACE
# include <verilated_vcd_c.h> #include <verilated_vcd_c.h>
#endif #endif
vluint64_t main_time = 0; vluint64_t main_time = 0;
@ -70,6 +70,6 @@ int main(int argc, char** argv, char** env) {
delete top; delete top;
top = nullptr; top = nullptr;
// Fin // Return good completion status
exit(0); exit(0);
} }

View File

@ -101,6 +101,6 @@ int main(int argc, char** argv, char** env) {
VerilatedCov::write("logs/coverage.dat"); VerilatedCov::write("logs/coverage.dat");
#endif #endif
// Fin // Return good completion status
exit(0); exit(0);
} }

View File

@ -55,10 +55,10 @@ int sc_main(int argc, char* argv[]) {
sc_signal<bool> reset_l; sc_signal<bool> reset_l;
sc_signal<vluint32_t> in_small; sc_signal<vluint32_t> in_small;
sc_signal<vluint64_t> in_quad; sc_signal<vluint64_t> in_quad;
sc_signal<sc_bv<70> > in_wide; sc_signal<sc_bv<70>> in_wide;
sc_signal<vluint32_t> out_small; sc_signal<vluint32_t> out_small;
sc_signal<vluint64_t> out_quad; sc_signal<vluint64_t> out_quad;
sc_signal<sc_bv<70> > out_wide; sc_signal<sc_bv<70>> out_wide;
// Construct the Verilated model, from inside Vtop.h // Construct the Verilated model, from inside Vtop.h
// Using unique_ptr is similar to "Vtop* top = new Vtop" then deleting at end // 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"); VerilatedCov::write("logs/coverage.dat");
#endif #endif
// Fin // Return good completion status
return 0; return 0;
} }