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

Subversion Repositories openrisc

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

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 6 Rev 49
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
 
 
// SystemC trace header
// SystemC trace header
 
 
// 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>
 
 
// 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
// under the terms of the GNU Lesser General Public License as published by
// under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or (at your
// the Free Software Foundation, either version 3 of the License, or (at your
// option) any later version.
// option) any later version.
 
 
// This program is distributed in the hope that it will be useful, but WITHOUT
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
// License for more details.
// License for more details.
 
 
// You should have received a copy of the GNU Lesser General Public License
// You should have received a copy of the GNU Lesser General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
 
 
// $Id: TraceSC.h 302 2009-02-13 17:22:07Z jeremy $
// $Id: TraceSC.h 302 2009-02-13 17:22:07Z jeremy $
 
 
// Drives the Verilator VCD trace interface
// Drives the Verilator VCD trace interface
 
 
#ifndef TRACE_SC__H
#ifndef TRACE_SC__H
#define TRACE_SC__H
#define TRACE_SC__H
 
 
#include "Vorpsoc_top.h"
#include "Vorpsoc_top.h"
 
 
 
 
#if VM_TRACE
#if VM_TRACE
#include <SpTraceVcdC.h>
#include <SpTraceVcdC.h>
#endif
#endif
 
 
 
 
//! Class to drive the Verilator VCD trace interface.
//! Class to drive the Verilator VCD trace interface.
 
 
//! Substantive code is only implemented if trace is enabled.
//! Substantive code is only implemented if trace is enabled.
 
 
class TraceSC
class TraceSC
  : public sc_core::sc_module
  : public sc_core::sc_module
{
{
public:
public:
 
 
  // Constructor and destructor
  // Constructor and destructor
  TraceSC (sc_core::sc_module_name  name,
  TraceSC (sc_core::sc_module_name  name,
           Vorpsoc_top        *_traceTarget,
           Vorpsoc_top        *_traceTarget,
           int argc,
           int argc,
           char * argv[]);
           char * argv[]);
  ~TraceSC ();
  ~TraceSC ();
 
 
    // Method to drive the trace
    // Method to drive the trace
  void  driveTrace();
  void  driveTrace();
 
 
 
  // VCD dump controling vars
 
  int dump_start_delay, dump_stop_set;
 
  int dumping_now;
 
  sc_time dump_start,dump_stop;
 
 
  /* The port */
  /* The port */
  sc_in<bool>   clk;
  //sc_in<bool>   clk;
 
 
private:
private:
 
 
  //! The ORPSoC module we are tracing
  //! The ORPSoC module we are tracing
  Vorpsoc_top *traceTarget;
  Vorpsoc_top *traceTarget;
 
 
 
 
#if VM_TRACE
#if VM_TRACE
  //! The System Perl Trace file
  //! The System Perl Trace file
  SpTraceVcdCFile *spTraceFile;
  SpTraceVcdCFile *spTraceFile;
#endif
#endif
 
 
  // Set the time resolution
  // Set the time resolution
  void setSpTimeResolution (sc_time  t);
  void setSpTimeResolution (sc_time  t);
 
 
};      // TraceSC ()
};      // TraceSC ()
 
 
#endif  // TRACE_SC__H
#endif  // TRACE_SC__H
 
 

powered by: WebSVN 2.1.0

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