#include "memory_txGen.h" void memory_txGen::test() { scv_smart_ptr object; int error = 0; // Drive low on all signals input to DUT addr = 0; wr = 0; cs = 0; wdata = 0; done = 0; wait(1); // wait for one clock cout<<"@"<next(); //------------------------------------------ // Do Memory Write //------------------------------------------ // Drive the addess addr = object->addr.read(); // Drive the data wdata = object->data.read(); // Drive Chip Select cs = 1; // Drive write enable wr = 1; cout<<"@"<addr <addr < 0) { cout << "=======================================" << endl; cout << " SIMULATION FAILED" << endl; cout << "=======================================" << endl; } else { cout << "=======================================" << endl; cout << " SIMULATION PASSED" << endl; cout << "=======================================" << endl; } done = 1; // Just wait for few cycles wait(100); }