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

Subversion Repositories systemc_rng

[/] [systemc_rng/] [trunk/] [rtl/] [systemc/] [main.cpp] - Blame information for rev 5

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

Line No. Rev Author Line
1 2 jcastillo
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  Random Number Main simulation File                          ////
4
////                                                              ////
5
////  This file is part of the SystemC RNG project                ////
6
////                                                              ////
7
////  Description:                                                ////
8
////  Main simulation file of random number generator             ////
9
////                                                              ////
10
////  To Do:                                                      ////
11
////   - nothing                                                  ////
12
////                                                              ////
13
////  Author(s):                                                  ////
14
////      - Javier Castillo, jcastilo@opencores.org               ////
15
////                                                              ////
16
////  This core is provided by OpenSoc                            ////
17
////  http://www.opensocdesign.com                                ////
18
////                                                              ////
19
//////////////////////////////////////////////////////////////////////
20
////                                                              ////
21
//// Copyright (C) 2000 Authors and OPENCORES.ORG                 ////
22
////                                                              ////
23
//// This source file may be used and distributed without         ////
24
//// restriction provided that this copyright statement is not    ////
25
//// removed from the file and that any derivative work contains  ////
26
//// the original copyright notice and the associated disclaimer. ////
27
////                                                              ////
28
//// This source file is free software; you can redistribute it   ////
29
//// and/or modify it under the terms of the GNU Lesser General   ////
30
//// Public License as published by the Free Software Foundation; ////
31
//// either version 2.1 of the License, or (at your option) any   ////
32
//// later version.                                               ////
33
////                                                              ////
34
//// This source is distributed in the hope that it will be       ////
35
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
36
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
37
//// PURPOSE.  See the GNU Lesser General Public License for more ////
38
//// details.                                                     ////
39
////                                                              ////
40
//// You should have received a copy of the GNU Lesser General    ////
41
//// Public License along with this source; if not, download it   ////
42
//// from http://www.opencores.org/lgpl.shtml                     ////
43
////                                                              ////
44
//////////////////////////////////////////////////////////////////////
45
//
46
// CVS Revision History
47
//
48
// $Log: not supported by cvs2svn $
49 5 jcastillo
// Revision 1.1.1.1  2004/08/19 14:27:14  jcastillo
50
// First import
51
//
52 2 jcastillo
 
53
#include "systemc.h"
54
#include "stimulus.h"
55
#include "rng.h"
56
 
57 5 jcastillo
#ifdef __GNUC__
58
  #include "iostream.h"
59
#endif
60
 
61
 
62 2 jcastillo
int sc_main(int argc, char* argv[]){
63
 
64
        sc_clock clk("clk",1,SC_US);
65
 
66
        rng *rng1;
67
        stimulus *st1;
68
 
69
    rng1=new rng("rng");
70
        st1=new stimulus("stimulus");
71
 
72
        sc_signal<bool> reset;
73
        sc_signal<bool> loadseed_i;
74
        sc_signal<sc_uint<32> > seed_i;
75
        sc_signal<sc_uint<32> > number_o;
76
 
77
        rng1->clk(clk);
78
        rng1->reset(reset);
79
        rng1->loadseed_i(loadseed_i);
80
        rng1->seed_i(seed_i);
81
        rng1->number_o(number_o);
82
 
83
        st1->clk(clk);
84
        st1->reset(reset);
85
        st1->loadseed_o(loadseed_i);
86
        st1->seed_o(seed_i);
87
        st1->number_i(number_o);
88
 
89
    sc_start(-1);
90
 
91
        return 0;
92
 
93
  }

powered by: WebSVN 2.1.0

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