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

Subversion Repositories test_project

[/] [test_project/] [trunk/] [bench/] [sysc/] [src/] [TraceSC.cpp] - Diff between revs 49 and 55

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

Rev 49 Rev 55
Line 36... Line 36...
//!                       constructor.
//!                       constructor.
//! @param _trace_target  ORPSoC module to trace
//! @param _trace_target  ORPSoC module to trace
 
 
TraceSC::TraceSC (sc_core::sc_module_name  name,
TraceSC::TraceSC (sc_core::sc_module_name  name,
                  Vorpsoc_top        *_traceTarget,
                  Vorpsoc_top        *_traceTarget,
                  const char              *dumpName ) :
                  int argc,
 
                  char              *argv[]) :
  sc_module (name),
  sc_module (name),
  traceTarget (_traceTarget)
  traceTarget (_traceTarget)
{
{
#if VM_TRACE
#if VM_TRACE
 
 
 
  // Setup the name of the VCD dump file
 
 
 
  char* dumpName;
 
  char* dumpSuffix = "-vlt.vcd\0";
 
  char* dumpNameDefault = "vlt-dump.vcd\0";
 
  // We will be passed the current test-name when we're called
 
  if (argc > 1)
 
    {
 
      // Assume test name is first thing
 
      int testname_argv_index = 1;
 
      // Take the second argument as the test name and we'll 
 
      // concatendate "-vlt.vcd" on the end
 
      dumpName = (char*) malloc((strlen(argv[testname_argv_index] +
 
                                              strlen(dumpSuffix))*sizeof(char)));
 
      // Copy in the test name
 
      strcpy(dumpName, argv[testname_argv_index]);
 
      // Now add on the suffix
 
      strcat(dumpName, dumpSuffix);
 
 
 
      printf("VCD dumpfile: %s\n", dumpName);
 
    }
 
  else
 
    dumpName = dumpNameDefault;
 
 
  Verilated::traceEverOn (true);
  Verilated::traceEverOn (true);
  cout << "Enabling VCD trace" << endl;
  cout << "Enabling VCD trace" << endl;
 
 
  // Establish a new trace with its correct time resolution, and trace to
  // Establish a new trace with its correct time resolution, and trace to
  // great depth.
  // great depth.

powered by: WebSVN 2.1.0

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