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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [bench/] [sysc/] [include/] [Or1200MonitorSC.h] - Diff between revs 6 and 44

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 6 Rev 44
Line 3... Line 3...
// SystemC OpenRISC 1200 Monitor: definition
// SystemC OpenRISC 1200 Monitor: definition
 
 
// Copyright (C) 2008  Embecosm Limited <info@embecosm.com>
// Copyright (C) 2008  Embecosm Limited <info@embecosm.com>
 
 
// Contributor Jeremy Bennett <jeremy.bennett@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
// This file is part of the cycle accurate model of the OpenRISC 1000 based
// system-on-chip, ORPSoC, built using Verilator.
// system-on-chip, ORPSoC, built using Verilator.
 
 
// This program is free software: you can redistribute it and/or modify it
// This program is free software: you can redistribute it and/or modify it
Line 27... Line 28...
// $Id: Or1200MonitorSC.h 288 2009-02-03 15:08:00Z jeremy $
// $Id: Or1200MonitorSC.h 288 2009-02-03 15:08:00Z jeremy $
 
 
#ifndef OR1200_MONITOR_SC__H
#ifndef OR1200_MONITOR_SC__H
#define OR1200_MONITOR_SC__H
#define OR1200_MONITOR_SC__H
 
 
 
#include <fstream>
 
#include <ctime>
 
 
#include "systemc.h"
#include "systemc.h"
 
 
#include "OrpsocAccess.h"
#include "OrpsocAccess.h"
 
 
 
 
Line 50... Line 54...
                   OrpsocAccess            *_accessor);
                   OrpsocAccess            *_accessor);
 
 
  // Method to check instructions
  // Method to check instructions
  void  checkInstruction();
  void  checkInstruction();
 
 
 
  // Methods to setup and output state of processor to a file
 
  void init_displayState(int argc,char *argv[]);
 
  void displayState();
 
 
  // The ports
  // The ports
  sc_in<bool>   clk;
  sc_in<bool>   clk;
 
 
private:
private:
 
 
 
  // Function to calculate performance of the sim
 
  void perfSummary();
 
 
  // Special NOP instructions
  // Special NOP instructions
  static const uint32_t NOP_NOP    = 0x15000000;  //!< Normal nop instruction
  static const uint32_t NOP_NOP    = 0x15000000;  //!< Normal nop instruction
  static const uint32_t NOP_EXIT   = 0x15000001;  //!< End of simulation
  static const uint32_t NOP_EXIT   = 0x15000001;  //!< End of simulation
  static const uint32_t NOP_REPORT = 0x15000002;  //!< Simple report
  static const uint32_t NOP_REPORT = 0x15000002;  //!< Simple report
  static const uint32_t NOP_PRINTF = 0x15000003;  //!< Simprintf instruction
  static const uint32_t NOP_PRINTF = 0x15000003;  //!< Simprintf instruction
  static const uint32_t NOP_PUTC   = 0x15000004;  //!< Putc 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
  //! The accessor for the Orpsoc instance
  OrpsocAccess *accessor;
  OrpsocAccess *accessor;
 
 
};      // Or1200MonitorSC ()
};      // Or1200MonitorSC ()
 
 

powered by: WebSVN 2.1.0

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