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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 6 julius
// ----------------------------------------------------------------------------
2
 
3
// Access functions for the ORPSoC Verilator model: 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: OrpsocAccess.h 303 2009-02-16 11:20:17Z jeremy $
28
 
29
 
30
#ifndef ORPSOC_ACCESS__H
31
#define ORPSOC_ACCESS__H
32
 
33
#include <stdint.h>
34
 
35
class Vorpsoc_top;
36
class Vorpsoc_top_orpsoc_top;
37
class Vorpsoc_top_or1200_ctrl;
38 44 julius
class Vorpsoc_top_or1200_except;
39
class Vorpsoc_top_or1200_sprs;
40 6 julius
class Vorpsoc_top_or1200_dpram;
41
 
42
 
43
//! Access functions to the Verilator model
44
 
45
//! This class encapsulates access to the Verilator model, allowing other
46
//! Classes to access model state, without needing to be built within the
47
//! Verilator environment.
48
class OrpsocAccess
49
{
50
public:
51
 
52
  // Constructor
53
  OrpsocAccess (Vorpsoc_top *orpsoc_top);
54
 
55
  // Accessor functions
56
  bool      getWbFreeze ();
57
  uint32_t  getWbInsn ();
58 49 julius
  uint32_t  getIdInsn ();
59 44 julius
  uint32_t  getWbPC ();
60 49 julius
  uint32_t  getIdPC ();
61 44 julius
  bool  getExceptFlushpipe ();
62
  bool  getExDslot ();
63
  // Get a specific GPR from the register file
64 6 julius
  uint32_t  getGpr (uint32_t regNum);
65 44 julius
  //SPR accessessors
66
  uint32_t  getSprSr ();
67
  uint32_t  getSprEpcr ();
68
  uint32_t  getSprEear ();
69
  uint32_t  getSprEsr ();
70 6 julius
 
71
private:
72
 
73
  // Pointers to modules with accessor functions
74 44 julius
  Vorpsoc_top_or1200_ctrl       *or1200_ctrl;
75
  Vorpsoc_top_or1200_except     *or1200_except;
76
  Vorpsoc_top_or1200_sprs       *or1200_sprs;
77
  Vorpsoc_top_or1200_dpram      *rf_a;
78 6 julius
 
79
};      // OrpsocAccess ()
80
 
81
#endif  // ORPSOC_ACCESS__H

powered by: WebSVN 2.1.0

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