OpenCores
URL https://opencores.org/ocsvn/socgen/socgen/trunk

Subversion Repositories socgen

[/] [socgen/] [trunk/] [tools/] [lint/] [sim_main.cpp] - Rev 127

Go to most recent revision | Compare with Previous | Blame | View Log

#include "VTB.h"
#include "verilated.h"
 
VTB *TB;
unsigned int main_time = 0;
double sc_time_stamp () {
  return main_time;
}
 
int main(int argc, char **argv) {
Verilated::commandArgs(argc, argv);
 
 
TB = new VTB;
TB-> reset = 1;
 
 
 
 
while (!Verilated::gotFinish()) 
 
{
if (main_time > 100) {
TB->reset = 0;
// Deassert reset
}
if ((main_time % 10) == 1) {
TB->clk = 1;
// Toggle clock
}
if ((main_time % 10) == 6) {
TB->clk = 0;
}
 
 
 
 
TB->eval();
// Evaluate model
 
 
 
main_time++;
 
 
 
 
 
}
 
 
exit(0);
}
 
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.