forked from github/verilator
ce10dbd11c
git-svn-id: file://localhost/svn/verilator/trunk/verilator@753 77ca24e4-aefa-0310-84f0-b9a241c72d87
27 lines
630 B
C++
27 lines
630 B
C++
// $Id$
|
|
// DESCRIPTION: Verilator: Verilog Test module
|
|
//
|
|
// This file ONLY is placed into the Public Domain, for any use,
|
|
// without warranty, 2006 by Wilson Snyder.
|
|
|
|
#include <verilated.h>
|
|
#include "Vt_func_rand.h"
|
|
|
|
int main (int argc, char *argv[]) {
|
|
Vt_func_rand *topp = new Vt_func_rand;
|
|
|
|
Verilated::debug(0);
|
|
|
|
printf ("\nTesting\n");
|
|
for (int i = 0; i < 10; i++) {
|
|
topp->clk = 0;
|
|
topp->eval();
|
|
topp->clk = 1;
|
|
topp->eval();
|
|
}
|
|
if (topp->Rand != 0xfeed0fad) {
|
|
vl_fatal(__FILE__,__LINE__,"top", "Unexpected value for Rand output\n");
|
|
}
|
|
printf ("*-* All Finished *-*\n");
|
|
}
|