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

Subversion Repositories xge_mac

[/] [xge_mac/] [trunk/] [tbench/] [systemc/] [sc_cpu_if.h] - Diff between revs 17 and 29

Show entire file | Details | Blame | View Log

Rev 17 Rev 29
Line 41... Line 41...
#include "systemc.h"
#include "systemc.h"
 
 
#include "sc_scoreboard.h"
#include "sc_scoreboard.h"
#include "sc_cpu_if.h"
#include "sc_cpu_if.h"
 
 
 
struct rmonStats_t {
 
    int tx_pkt_cnt;
 
    int rx_pkt_cnt;
 
 
 
    int tx_octets_cnt;
 
    int rx_octets_cnt;
 
};
 
 
 
 
SC_MODULE(cpu_if) {
SC_MODULE(cpu_if) {
 
 
  public:
  public:
 
 
    //---
    //---
Line 79... Line 88...
        INT_LOCAL_FAULT = 4,
        INT_LOCAL_FAULT = 4,
        INT_REMOTE_FAULT = 5,
        INT_REMOTE_FAULT = 5,
        INT_PAUSE_FRAME = 6,
        INT_PAUSE_FRAME = 6,
        INT_CRC_ERROR = 7,
        INT_CRC_ERROR = 7,
        INT_FRAGMENT_ERROR = 8,
        INT_FRAGMENT_ERROR = 8,
 
        INT_LENGHT_ERROR = 9,
    };
    };
 
 
    enum regId {
    enum regId {
        CPUREG_CONFIG0 = 0x0,
        CPUREG_CONFIG0 = 0x0,
 
 
        CPUREG_INT_PENDING = 0x8,
        CPUREG_INT_PENDING = 0x8,
        CPUREG_INT_STATUS = 0xc,
        CPUREG_INT_STATUS = 0xc,
        CPUREG_INT_MASK = 0x10,
        CPUREG_INT_MASK = 0x10,
 
 
 
        CPUREG_STATSTXOCTETS = 0x80,
 
        CPUREG_STATSTXPKTS = 0x84,
 
 
 
        CPUREG_STATSRXOCTETS = 0x90,
 
        CPUREG_STATSRXPKTS = 0x94,
    };
    };
 
 
  private:
  private:
 
 
    //---
    //---
Line 119... Line 135...
    void connect_scoreboard(scoreboard *sbptr, scoreboard::sbSourceId sid);
    void connect_scoreboard(scoreboard *sbptr, scoreboard::sbSourceId sid);
    void set_param(cpu_if::paramId param, int value);
    void set_param(cpu_if::paramId param, int value);
    void set_interrupt(cpu_if::intId intr);
    void set_interrupt(cpu_if::intId intr);
    void set_interrupt_mask(cpu_if::intId intr, bool value);
    void set_interrupt_mask(cpu_if::intId intr, bool value);
    void enable_all_interrupts(void);
    void enable_all_interrupts(void);
 
    void get_rmon_stats(rmonStats_t *rmon_stats);
 
 
    uint read(uint addr);
    uint read(uint addr);
    void write(uint addr, uint data);
    void write(uint addr, uint data);
    void writebits(uint addr, uint hbit, uint lbit, uint value);
    void writebits(uint addr, uint hbit, uint lbit, uint value);
 
 

powered by: WebSVN 2.1.0

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