URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc/trunk/orpsocv2/bench/sysc/include
- from Rev 6 to Rev 44
- ↔ Reverse comparison
Rev 6 → Rev 44
/Or1200MonitorSC.h
5,6 → 5,7
// Copyright (C) 2008 Embecosm Limited <info@embecosm.com> |
|
// Contributor Jeremy Bennett <jeremy.bennett@embecosm.com> |
// Contributor Julius Baxter <jb@orsoc.se> |
|
// This file is part of the cycle accurate model of the OpenRISC 1000 based |
// system-on-chip, ORPSoC, built using Verilator. |
29,6 → 30,9
#ifndef OR1200_MONITOR_SC__H |
#define OR1200_MONITOR_SC__H |
|
#include <fstream> |
#include <ctime> |
|
#include "systemc.h" |
|
#include "OrpsocAccess.h" |
52,11 → 56,18
// Method to check instructions |
void checkInstruction(); |
|
// Methods to setup and output state of processor to a file |
void init_displayState(int argc,char *argv[]); |
void displayState(); |
|
// The ports |
sc_in<bool> clk; |
|
private: |
|
// Function to calculate performance of the sim |
void perfSummary(); |
|
// Special NOP instructions |
static const uint32_t NOP_NOP = 0x15000000; //!< Normal nop instruction |
static const uint32_t NOP_EXIT = 0x15000001; //!< End of simulation |
64,6 → 75,15
static const uint32_t NOP_PRINTF = 0x15000003; //!< Simprintf instruction |
static const uint32_t NOP_PUTC = 0x15000004; //!< Putc instruction |
|
// Variables for processor status output |
ofstream statusFile; |
int logging_enabled; |
int exit_perf_summary_enabled; |
int insn_count; |
|
// Time measurement variables - for calculating performance of the sim |
clock_t start; |
|
//! The accessor for the Orpsoc instance |
OrpsocAccess *accessor; |
|
/OrpsocAccess.h
35,6 → 35,8
class Vorpsoc_top; |
class Vorpsoc_top_orpsoc_top; |
class Vorpsoc_top_or1200_ctrl; |
class Vorpsoc_top_or1200_except; |
class Vorpsoc_top_or1200_sprs; |
class Vorpsoc_top_or1200_dpram; |
|
|
53,13 → 55,24
// Accessor functions |
bool getWbFreeze (); |
uint32_t getWbInsn (); |
uint32_t getWbPC (); |
bool getExceptFlushpipe (); |
bool getExDslot (); |
// Get a specific GPR from the register file |
uint32_t getGpr (uint32_t regNum); |
//SPR accessessors |
uint32_t getSprSr (); |
uint32_t getSprEpcr (); |
uint32_t getSprEear (); |
uint32_t getSprEsr (); |
|
private: |
|
// Pointers to modules with accessor functions |
Vorpsoc_top_or1200_ctrl *or1200_ctrl; |
Vorpsoc_top_or1200_dpram *rf_a; |
Vorpsoc_top_or1200_ctrl *or1200_ctrl; |
Vorpsoc_top_or1200_except *or1200_except; |
Vorpsoc_top_or1200_sprs *or1200_sprs; |
Vorpsoc_top_or1200_dpram *rf_a; |
|
}; // OrpsocAccess () |
|