Tests: Cleanup some C++ new calls. No functional change.

This commit is contained in:
Wilson Snyder 2023-02-23 06:14:54 -05:00
parent cfe0fdd5cc
commit b4dd398af6
32 changed files with 33 additions and 33 deletions

View File

@ -24,7 +24,7 @@ void oneTest(int argc, char** argv, int seed) {
contextp->randReset(123);
// Construct the Verilated model, from Vtop.h generated from Verilating
const std::unique_ptr<Vt_clk_inp_init> topp{new Vt_clk_inp_init{contextp.get()}};
const std::unique_ptr<VM_PREFIX> topp{new VM_PREFIX{contextp.get()}};
// Start not in reset
topp->rst_n = 1;

View File

@ -22,7 +22,7 @@ int main(int argc, char** argv) {
contextp->commandArgs(argc, argv);
srand48(5);
const std::unique_ptr<Vt_comb_input_0> topp{new Vt_comb_input_0};
const std::unique_ptr<VM_PREFIX> topp{new VM_PREFIX};
topp->inc = 1;
topp->clk = false;
topp->eval();

View File

@ -22,7 +22,7 @@ int main(int argc, char** argv) {
contextp->commandArgs(argc, argv);
srand48(5);
const std::unique_ptr<Vt_comb_input_1> topp{new Vt_comb_input_1};
const std::unique_ptr<VM_PREFIX> topp{new VM_PREFIX};
topp->inc = 1;
topp->clk = false;
topp->eval();

View File

@ -22,7 +22,7 @@ int main(int argc, char** argv) {
contextp->commandArgs(argc, argv);
srand48(5);
const std::unique_ptr<Vt_comb_input_2> topp{new Vt_comb_input_2};
const std::unique_ptr<VM_PREFIX> topp{new VM_PREFIX};
topp->inc = 1;
topp->clk = false;
topp->eval();

View File

@ -14,7 +14,7 @@
#include <iostream>
int main(int argc, char* argv[]) {
Vt_const_bitoptree_bug3096* const tb = new Vt_const_bitoptree_bug3096;
VM_PREFIX* const tb = new VM_PREFIX;
tb->instr_i = 0x08c0006f;
tb->eval();

View File

@ -18,7 +18,7 @@ int main(int argc, char* argv[]) {
Verilated::debug(0);
Verilated::commandArgs(argc, argv);
Vt_enum_public* topp = new Vt_enum_public;
VM_PREFIX* topp = new VM_PREFIX;
// Make sure public tag worked
if (Vt_enum_public_p3::ZERO == Vt_enum_public_p3::ONE) {}

View File

@ -16,7 +16,7 @@ int main(int argc, char* argv[]) {
Verilated::debug(0);
Verilated::commandArgs(argc, argv);
Vt_func_rand* topp = new Vt_func_rand;
VM_PREFIX* topp = new VM_PREFIX;
printf("\nTesting\n");
for (int i = 0; i < 10; i++) {

View File

@ -21,8 +21,8 @@ int main(int argc, char** argv) {
contextp->debug(0);
contextp->commandArgs(argc, argv);
std::unique_ptr<Vt_gantt_two> topap{new Vt_gantt_two{contextp.get(), "topa"}};
std::unique_ptr<Vt_gantt_two> topbp{new Vt_gantt_two{contextp.get(), "topb"}};
std::unique_ptr<VM_PREFIX> topap{new VM_PREFIX{contextp.get(), "topa"}};
std::unique_ptr<VM_PREFIX> topbp{new VM_PREFIX{contextp.get(), "topb"}};
topap->clk = false;
topap->eval();

View File

@ -19,7 +19,7 @@ int main(int argc, char* argv[]) {
Verilated::debug(0);
Verilated::commandArgs(argc, argv);
Vt_math_imm2* sim = new Vt_math_imm2;
VM_PREFIX* sim = new VM_PREFIX;
int lbit, hbit;
int errs = 0;

View File

@ -48,7 +48,7 @@ int main(int argc, char* argv[]) {
Verilated::debug(0);
Verilated::commandArgs(argc, argv);
Vt_mem_slot* sim = new Vt_mem_slot;
VM_PREFIX* sim = new VM_PREFIX;
int slot, bit, i;
// clear all bits in the array

View File

@ -23,7 +23,7 @@ int main(int argc, char* argv[]) {
Verilated::debug(0);
Verilated::commandArgs(argc, argv);
Vt_multitop_sig* topp = new Vt_multitop_sig{""};
VM_PREFIX* topp = new VM_PREFIX{""};
{
topp->a__02Ein = 0;

View File

@ -14,7 +14,7 @@
#include <svdpi.h>
int main(int argc, char* argv[]) {
Vt_order_dpi_export_1* const tb = new Vt_order_dpi_export_1;
VM_PREFIX* const tb = new VM_PREFIX;
tb->contextp()->commandArgs(argc, argv);
bool clk = true;

View File

@ -16,7 +16,7 @@
void toggle_other_clk(svBit val) { set_other_clk(val); }
int main(int argc, char* argv[]) {
Vt_order_dpi_export_2* const tb = new Vt_order_dpi_export_2;
VM_PREFIX* const tb = new VM_PREFIX;
tb->contextp()->commandArgs(argc, argv);
bool clk = true;

View File

@ -18,7 +18,7 @@ void toggle_other_clk(svBit val) { set_other_clk(val); }
void toggle_third_clk(svBit val) { set_third_clk(val); }
int main(int argc, char* argv[]) {
Vt_order_dpi_export_3* const tb = new Vt_order_dpi_export_3;
VM_PREFIX* const tb = new VM_PREFIX;
tb->contextp()->commandArgs(argc, argv);
bool clk = true;

View File

@ -18,7 +18,7 @@ void toggle_other_clk(svBit val) { set_other_clk(val); }
void toggle_third_clk(svBit val) { set_third_clk(val); }
int main(int argc, char* argv[]) {
Vt_order_dpi_export_4* const tb = new Vt_order_dpi_export_4;
VM_PREFIX* const tb = new VM_PREFIX;
tb->contextp()->commandArgs(argc, argv);
bool clk = true;

View File

@ -14,7 +14,7 @@
#include <svdpi.h>
int main(int argc, char* argv[]) {
Vt_order_dpi_export_5* const tb = new Vt_order_dpi_export_5;
VM_PREFIX* const tb = new VM_PREFIX;
tb->contextp()->commandArgs(argc, argv);
bool clk = true;

View File

@ -16,7 +16,7 @@
void toggle_other_clk(svBit val) { set_other_clk(val); }
int main(int argc, char* argv[]) {
Vt_order_dpi_export_6* const tb = new Vt_order_dpi_export_6;
VM_PREFIX* const tb = new VM_PREFIX;
tb->contextp()->commandArgs(argc, argv);
bool clk = true;

View File

@ -14,7 +14,7 @@
#include <svdpi.h>
int main(int argc, char* argv[]) {
Vt_order_dpi_export_7* const tb = new Vt_order_dpi_export_7;
VM_PREFIX* const tb = new VM_PREFIX;
tb->contextp()->commandArgs(argc, argv);
bool clk = true;

View File

@ -18,7 +18,7 @@ int main(int argc, char* argv[]) {
Verilated::debug(0);
Verilated::commandArgs(argc, argv);
Vt_param_public* topp = new Vt_param_public;
VM_PREFIX* topp = new VM_PREFIX;
// Make sure public tag worked
if (static_cast<int>(Vt_param_public_t::TOP_PARAM) != 30) {

View File

@ -19,7 +19,7 @@ int main(int argc, char** argv) {
contextp->debug(0);
contextp->commandArgs(argc, argv);
srand48(5);
topp.reset(new Vt_public_clk("top"));
topp.reset(new VM_PREFIX{"top"});
topp->rootp->t__DOT__clk = 0;
topp->eval();

View File

@ -19,7 +19,7 @@ int main(int argc, char** argv) {
contextp->debug(0);
contextp->commandArgs(argc, argv);
srand48(5);
topp.reset(new Vt_public_seq("top"));
topp.reset(new VM_PREFIX{"top"});
topp->clk = 0;
topp->eval();

View File

@ -20,7 +20,7 @@ const unsigned long long dt_2 = 3;
int main(int argc, char** argv) {
const std::unique_ptr<VerilatedContext> contextp{new VerilatedContext};
Vt_scope_map* top = new Vt_scope_map{contextp.get(), "top"};
VM_PREFIX* top = new VM_PREFIX{contextp.get(), "top"};
contextp->debug(0);
contextp->traceEverOn(true);

View File

@ -27,7 +27,7 @@ int main(int argc, char** argv) {
Verilated::traceEverOn(true);
Verilated::commandArgs(argc, argv);
std::unique_ptr<VM_PREFIX> top{new VM_PREFIX("top")};
std::unique_ptr<VM_PREFIX> top{new VM_PREFIX{"top"}};
std::unique_ptr<VerilatedVcdC> tfp{new VerilatedVcdC};
top->trace(tfp.get(), 99);

View File

@ -27,7 +27,7 @@ int main(int argc, char** argv) {
Verilated::traceEverOn(true);
Verilated::commandArgs(argc, argv);
std::unique_ptr<VM_PREFIX> top{new VM_PREFIX("top")};
std::unique_ptr<VM_PREFIX> top{new VM_PREFIX{"top"}};
std::unique_ptr<VerilatedFstC> tfp{new VerilatedFstC};
top->trace(tfp.get(), 99);

View File

@ -24,7 +24,7 @@ int main(int argc, char** argv) {
Verilated::traceEverOn(true);
Verilated::commandArgs(argc, argv);
std::unique_ptr<VM_PREFIX> top{new VM_PREFIX("top")};
std::unique_ptr<VM_PREFIX> top{new VM_PREFIX{"top"}};
#if defined(T_TRACE_DUMPVARS_DYN_VCD_0) || defined(T_TRACE_DUMPVARS_DYN_VCD_1)
std::unique_ptr<VerilatedVcdC> tfp{new VerilatedVcdC};

View File

@ -32,7 +32,7 @@ int main(int argc, char** argv) {
Verilated::traceEverOn(true);
Verilated::commandArgs(argc, argv);
std::unique_ptr<VM_PREFIX> top{new VM_PREFIX("top")};
std::unique_ptr<VM_PREFIX> top{new VM_PREFIX{"top"}};
std::unique_ptr<VerilatedVcdC> tfp{new VerilatedVcdC};
top->trace(tfp.get(), 99);

View File

@ -21,7 +21,7 @@ int main(int argc, char** argv) {
Verilated::traceEverOn(true);
Verilated::commandArgs(argc, argv);
std::unique_ptr<VM_PREFIX> top{new VM_PREFIX("top")};
std::unique_ptr<VM_PREFIX> top{new VM_PREFIX{"top"}};
std::unique_ptr<VerilatedVcdC> tfp{new VerilatedVcdC};
top->trace(tfp.get(), 99);

View File

@ -36,7 +36,7 @@ int main() {
bool pass = true;
Verilated::debug(0);
tb = new Vt_tri_inout{"tb"};
tb = new VM_PREFIX{"tb"};
// loop through every possibility and check the result
for (tb->SEL = 0; tb->SEL < 2; tb->SEL++) {

View File

@ -34,7 +34,7 @@ void check(int d, int en, int exp0, int exp1, int expx, int expz) {
int main() {
Verilated::debug(0);
tb = new Vt_tri_inz{"tb"};
tb = new VM_PREFIX{"tb"};
check(0, 1, 1, 0, 0, 0);
check(1, 1, 0, 1, 0, 0);
check(0, 0, 0, 0, 0, 1);

View File

@ -46,7 +46,7 @@ bool check() {
int main() {
Verilated::debug(0);
tb = new Vt_tri_pullup{"tb"};
tb = new VM_PREFIX{"tb"};
// loop through every possibility and check the result
bool pass = true;

View File

@ -44,7 +44,7 @@ bool check() {
int main() {
Verilated::debug(0);
tb = new Vt_tri_select{"tb"};
tb = new VM_PREFIX{"tb"};
// loop through every possibility and check the result
bool pass = true;

View File

@ -54,7 +54,7 @@ int main()
#endif
{
Verilated::debug(0);
tb = new VM_PREFIX("tb");
tb = new VM_PREFIX{"tb"};
VlWide<8> /*255:0*/ input_var;
VlWide<8> /*255:0*/ out_var;