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

Subversion Repositories usb11

[/] [usb11/] [trunk/] [rtl/] [systemc/] [usb_ram512x8.h] - Blame information for rev 13

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alfoltran
/////////////////////////////////////////////////////////////////////
2
////                                                             ////
3
////  USB RAM                                                    ////
4
////                                                             ////
5
////  SystemC Version: usb_ram512x8.h                            ////
6
////  Author: Alfredo Luiz Foltran Fialho                        ////
7
////          alfoltran@ig.com.br                                ////
8
////                                                             ////
9
////                                                             ////
10
/////////////////////////////////////////////////////////////////////
11
////                                                             ////
12
//// Verilog Version: generic_dpram.v                            ////
13
//// Copyright (C) 2000 Authors and OPENCORES.ORG                ////
14
////                         www.opencores.org                   ////
15
////                                                             ////
16
//// This source file may be used and distributed without        ////
17
//// restriction provided that this copyright statement is not   ////
18
//// removed from the file and that any derivative work contains ////
19
//// the original copyright notice and the associated disclaimer.////
20
////                                                             ////
21
////     THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY     ////
22
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   ////
23
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS   ////
24
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR      ////
25
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,         ////
26
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES    ////
27
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE   ////
28
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR        ////
29
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF  ////
30
//// LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT  ////
31
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  ////
32
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE         ////
33
//// POSSIBILITY OF SUCH DAMAGE.                                 ////
34
////                                                             ////
35
/////////////////////////////////////////////////////////////////////
36
 
37
#ifndef USB_RAM512X8_H
38
#define USB_RAM512X8_H
39
 
40
SC_MODULE(usb_ram512x8) {
41
 
42
  public:
43
 
44
        sc_in<bool>                     rclk, rrst, rce;
45
        sc_in<bool>                     oe;
46
        sc_in<sc_uint<9> >      raddr;
47
        sc_out<sc_uint<8> >     dout;
48
 
49
        sc_in<bool>                     wclk, wrst, wce;
50
        sc_in<bool>                     we;
51
        sc_in<sc_uint<9> >      waddr;
52
        sc_in<sc_uint<8> >      din;
53
 
54
        sc_signal<sc_uint<8> >  dout_reg;
55
 
56
        sc_uint<8>                              mem[512];
57
 
58
        void dout_update(void);
59
        void read(void);
60
        void write(void);
61
 
62
        SC_CTOR(usb_ram512x8) {
63
                SC_METHOD(dout_update);
64
                sensitive << oe << rce << dout_reg;
65
                SC_METHOD(read);
66
                sensitive << rclk.pos();
67
                SC_METHOD(write);
68
                sensitive << wclk.pos();
69
        }
70
 
71
};
72
 
73
#endif
74
 

powered by: WebSVN 2.1.0

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