#if 0 ./run -c -$SIM -clean -t memory_test #endif #include "teal.h" using namespace teal; void verification_top () { file_vlog not_used = file_vlog (teal::dictionary::find ("out_file"), dictionary::find ("interactive", true)); vreg clock("top.clock"); vreg reset("top.reset"); vreg enable("top.enable"); vreg counter_out("top.counter_out"); vout log("counter_test"); log << teal_info << "Start of verification_top" << endm; // reset sequence reset = 1; int reset_count = 5; for ( int i(0); i < reset_count; i++ ) at (posedge(clock)); reset = 0; // end of reset sequence log << "End of reset sequence" << endm; // enable sequence enable = 0; int enable_count = 3; for ( int i(0); i < enable_count; i++ ) at (posedge(clock)); enable = 1; // enable sequence log << "End of enable sequence" << endm; int count_number = 17; for (int j(0); j < count_number; j++ ) { at (posedge(clock)); log << "Current number is: " << counter_out << endm; } if (vlog::get().how_many (vlog::error)) { log << teal_info << "Test Failed: Contained " << dec << vlog::get().how_many (vlog::error) << " errors." << endm; } else { log << teal_info << "Test Passed. " << endm; } vreg finish("top.test_end"); finish = 1; } #include "../teal_hdl_connect.cpp"