OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [orpsocv2/] [bench/] [sysc/] [include/] [Or1200MonitorSC.h] - Blame information for rev 40

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 6 julius
// ----------------------------------------------------------------------------
2
 
3
// SystemC OpenRISC 1200 Monitor: definition
4
 
5
// Copyright (C) 2008  Embecosm Limited <info@embecosm.com>
6
 
7
// Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
8
 
9
// This file is part of the cycle accurate model of the OpenRISC 1000 based
10
// system-on-chip, ORPSoC, built using Verilator.
11
 
12
// This program is free software: you can redistribute it and/or modify it
13
// under the terms of the GNU Lesser General Public License as published by
14
// the Free Software Foundation, either version 3 of the License, or (at your
15
// option) any later version.
16
 
17
// This program is distributed in the hope that it will be useful, but WITHOUT
18
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
20
// License for more details.
21
 
22
// You should have received a copy of the GNU Lesser General Public License
23
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
24
 
25
// ----------------------------------------------------------------------------
26
 
27
// $Id: Or1200MonitorSC.h 288 2009-02-03 15:08:00Z jeremy $
28
 
29
#ifndef OR1200_MONITOR_SC__H
30
#define OR1200_MONITOR_SC__H
31
 
32
#include "systemc.h"
33
 
34
#include "OrpsocAccess.h"
35
 
36
 
37
//! Monitor for special l.nop instructions
38
 
39
//! This class is based on the or1200_monitor.v of the Verilog test bench. It
40
//! wakes up on each posedge clock to check for "special" l.nop instructions,
41
//! which need processing.
42
 
43
class Or1200MonitorSC
44
  : public sc_core::sc_module
45
{
46
public:
47
 
48
  // Constructor
49
  Or1200MonitorSC (sc_core::sc_module_name  name,
50
                   OrpsocAccess            *_accessor);
51
 
52
  // Method to check instructions
53
  void  checkInstruction();
54
 
55
  // The ports
56
  sc_in<bool>   clk;
57
 
58
private:
59
 
60
  // Special NOP instructions
61
  static const uint32_t NOP_NOP    = 0x15000000;  //!< Normal nop instruction
62
  static const uint32_t NOP_EXIT   = 0x15000001;  //!< End of simulation
63
  static const uint32_t NOP_REPORT = 0x15000002;  //!< Simple report
64
  static const uint32_t NOP_PRINTF = 0x15000003;  //!< Simprintf instruction
65
  static const uint32_t NOP_PUTC   = 0x15000004;  //!< Putc instruction
66
 
67
  //! The accessor for the Orpsoc instance
68
  OrpsocAccess *accessor;
69
 
70
};      // Or1200MonitorSC ()
71
 
72
#endif  // OR1200_MONITOR_SC__H

powered by: WebSVN 2.1.0

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