-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPC.h.old
More file actions
42 lines (31 loc) · 696 Bytes
/
PC.h.old
File metadata and controls
42 lines (31 loc) · 696 Bytes
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
//PC.h
#ifndef __processor_h_
#define __processor_h_
#include "systemc.h"
#include "IR.h"
SC_MODULE(processor)
{
// Ports
sc_in<bool> CLK;
sc_in<sc_uint<16> > Operand;
sc_in<sc_uint<16> > Rx;
sc_in<sc_uint<16> > Data_out;
sc_out<sc_uint<16> > IR_out;
sc_out<sc_int<16> > PC_out;
// Signals
sc_signal<sc_uint<16> > PC1;
sc_signal<sc_uint<16> > PCMux_out;
sc_signal<bool> PCR_ld;
// Instantiating Modules
Register *my_Register;
SC_CTOR(processor)
{
my_PCR = new Register("my_Register");
my_PCR->CLK(CLK);
my_PCR->Ld_Reg(PCR_ld);
my_PCR->Input(PCMux_out);
my_PCR->Output(PC_out);
sensitive << CLK;
}
};
#endif // __processor_h_