-
Notifications
You must be signed in to change notification settings - Fork 2
/
reg.h
46 lines (36 loc) · 755 Bytes
/
reg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef REGISTOMOD_H
#define REGISTOMOD_H
/**
*
* Registo module interface.
*/
#include <systemc.h>
/**
* Registo module.
* Registo module implements a 32 bit register.
* Synchronous on writes, assinchronous on reset.
*
* - input ports
* - \c sc_uint<32> \c din - input
* - \c bool \c reset - reset
* - \c bool \c clk - clock
* - output ports
* - \c sc_uint<32> \c dout - output
*/
SC_MODULE(registo) {
sc_in< sc_uint<32> > din;
sc_out< sc_uint<32> > dout;
sc_in< bool > reset;
sc_in< bool > clk;
sc_in< bool > enable;
sc_uint<32> val;
SC_CTOR(registo)
{
SC_METHOD(entry);
sensitive << reset;
sensitive_pos << clk;
val=0;
}
void entry();
};
#endif