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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [bench/] [sysc/] [src/] [OrpsocAccess.cpp] - 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...
// Access functions for the ORPSoC Verilator model: implementation
// Access functions for the ORPSoC Verilator model: implementation
 
 
// 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 32... Line 33...
#include "Vorpsoc_top_orpsoc_top.h"
#include "Vorpsoc_top_orpsoc_top.h"
#include "Vorpsoc_top_or1k_top.h"
#include "Vorpsoc_top_or1k_top.h"
#include "Vorpsoc_top_or1200_top.h"
#include "Vorpsoc_top_or1200_top.h"
#include "Vorpsoc_top_or1200_cpu.h"
#include "Vorpsoc_top_or1200_cpu.h"
#include "Vorpsoc_top_or1200_ctrl.h"
#include "Vorpsoc_top_or1200_ctrl.h"
 
#include "Vorpsoc_top_or1200_except.h"
 
#include "Vorpsoc_top_or1200_sprs.h"
#include "Vorpsoc_top_or1200_rf.h"
#include "Vorpsoc_top_or1200_rf.h"
#include "Vorpsoc_top_or1200_dpram.h"
#include "Vorpsoc_top_or1200_dpram.h"
 
 
//! Constructor for the ORPSoC access class
//! Constructor for the ORPSoC access class
 
 
Line 45... Line 48...
//! @param[in] orpsoc  The SystemC Verilated ORPSoC instance
//! @param[in] orpsoc  The SystemC Verilated ORPSoC instance
 
 
OrpsocAccess::OrpsocAccess (Vorpsoc_top *orpsoc_top)
OrpsocAccess::OrpsocAccess (Vorpsoc_top *orpsoc_top)
{
{
  or1200_ctrl = orpsoc_top->v->i_or1k->i_or1200_top->or1200_cpu->or1200_ctrl;
  or1200_ctrl = orpsoc_top->v->i_or1k->i_or1200_top->or1200_cpu->or1200_ctrl;
 
  or1200_except = orpsoc_top->v->i_or1k->i_or1200_top->or1200_cpu->or1200_except;
 
  or1200_sprs = orpsoc_top->v->i_or1k->i_or1200_top->or1200_cpu->or1200_sprs;
  rf_a        = orpsoc_top->v->i_or1k->i_or1200_top->or1200_cpu->or1200_rf->rf_a;
  rf_a        = orpsoc_top->v->i_or1k->i_or1200_top->or1200_cpu->or1200_rf->rf_a;
 
 
}       // OrpsocAccess ()
}       // OrpsocAccess ()
 
 
 
 
Line 61... Line 66...
{
{
  return  or1200_ctrl->wb_freeze;
  return  or1200_ctrl->wb_freeze;
 
 
}       // getWbFreeze ()
}       // getWbFreeze ()
 
 
 
//! Access for the except_flushpipe signal
 
 
 
//! @return  The value of the or1200_except.except_flushpipe signal
 
 
 
bool
 
OrpsocAccess::getExceptFlushpipe ()
 
{
 
  return  or1200_except->except_flushpipe;
 
 
 
}       // getExceptFlushpipe ()
 
 
 
//! Access for the ex_dslot signal
 
 
 
//! @return  The value of the or1200_except.ex_dslot signalfac
 
 
 
bool
 
OrpsocAccess::getExDslot ()
 
{
 
  return  or1200_except->ex_dslot;
 
 
 
}       // getExDslot ()
 
 
 
//! Access for the wb_pc register
 
 
 
//! @return  The value of the or1200_except.wb_insn register
 
 
 
uint32_t
 
OrpsocAccess::getWbPC ()
 
{
 
  return  (or1200_except->get_wb_pc) ();
 
 
 
}       // getWbPC ()
 
 
//! Access for the wb_insn register
//! Access for the wb_insn register
 
 
//! @return  The value of the or1200_ctrl.wb_insn register
//! @return  The value of the or1200_ctrl.wb_insn register
 
 
Line 89... Line 126...
{
{
  return  (rf_a->get_gpr) (regNum);
  return  (rf_a->get_gpr) (regNum);
 
 
}       // getGpr ()
}       // getGpr ()
 
 
 No newline at end of file
 No newline at end of file
 
 
 
//! Access for the sr register
 
 
 
//! @return  The value of the or1200_sprs.sr register
 
 
 
uint32_t
 
OrpsocAccess::getSprSr ()
 
{
 
  return  (or1200_sprs->get_sr) ();
 
 
 
}       // getSprSr ()
 
 
 
//! Access for the epcr register
 
 
 
//! @return  The value of the or1200_sprs.epcr register
 
 
 
uint32_t
 
OrpsocAccess::getSprEpcr ()
 
{
 
  return  (or1200_sprs->get_epcr) ();
 
 
 
}       // getSprEpcr ()
 
 
 
//! Access for the eear register
 
 
 
//! @return  The value of the or1200_sprs.eear register
 
 
 
uint32_t
 
OrpsocAccess::getSprEear ()
 
{
 
  return  (or1200_sprs->get_eear) ();
 
 
 
}       // getSprEear ()
 
 
 
//! Access for the esr register
 
 
 
//! @return  The value of the or1200_sprs.esr register
 
 
 
uint32_t
 
OrpsocAccess::getSprEsr ()
 
{
 
  return  (or1200_sprs->get_esr) ();
 
 
 
}       // getSprEsr ()
 
 
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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