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

Subversion Repositories sc2v

[/] [sc2v/] [trunk/] [examples/] [rng.h] - Blame information for rev 39

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

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

powered by: WebSVN 2.1.0

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