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

Subversion Repositories scarm

[/] [scarm/] [trunk/] [src/] [scNPC.h] - Blame information for rev 8

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 zhong
// scNPC.h: interface for the scNPC class.
2
//
3
//////////////////////////////////////////////////////////////////////
4
 
5
#if !defined(AFX_SCNPC_H__0BC740FA_B4A2_11D6_BB37_000000000000__INCLUDED_)
6
#define AFX_SCNPC_H__0BC740FA_B4A2_11D6_BB37_000000000000__INCLUDED_
7
 
8
#if _MSC_VER > 1000
9
#pragma once
10
#endif // _MSC_VER > 1000
11
#include <systemc.h>
12
#include <sc_mslib.h>
13
#include "scTypes.h"
14
#include "scRegisterFile.h"
15
class scNPC : public sc_module
16
{
17
public:
18
        sc_in<bool>     in_b_hold;
19
    sc_in<bool>     in_b_Clock;
20
        sc_in<bool>     in_flush;
21
        sc_in<uint32_t> in_PC;
22
        sc_in<bool>     in_b_B;  //is it a branch?
23
        sc_in<uint32_t> in_n_B; //branch address
24
        sc_out<uint32_t> out_n_NPC;
25
        sc_outmaster<bool>        out_b_RW_PC;// 0-Read  1-Write
26
        sc_outmaster<REGS>     out_REG_PC;
27
        sc_inoutslave<uint32_t> inout_n_Data_PC;
28
public:
29
        void delay3();
30
        void delay2();
31
        void delay1();
32
        void write_pc();
33
        uint32_t m_nNPC;
34
        void next_pc();
35
        SC_HAS_PROCESS(scNPC);
36
        scNPC(sc_module_name name_);
37
        virtual ~scNPC();
38
private:
39
    bool m_b_start;
40
        bool m_b_branch;
41
        bool m_b_B;
42
        uint32_t m_n_B,m_PC;
43
        sc_event trigger;
44
        sc_event trigger1_npc,trigger2_npc,trigger3_npc;
45
};
46
 
47
#endif // !defined(AFX_SCNPC_H__0BC740FA_B4A2_11D6_BB37_000000000000__INCLUDED_)

powered by: WebSVN 2.1.0

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