Code Search for Developers
 
 
  

test.cc from GreenSocs at Krugle


Show test.cc syntax highlighted

#include "data_ext.h"

int sc_main(int argc, char** argv) {
  scv_smart_ptr<data_t> data_p("data");

  //set the values of the fields. Note: a scv_smart_ptr
  //works like a normal pointer object for accessing the
  //object.
  data_p->field_1 = 10;
  data_p->field_2 = 0xff;
  for(unsigned i=0; i<5; ++i) data_p->payload[i] = i*i;
  data_p->str = "my data string";

  scv_out << "Printing data in object " << data_p->get_name()
       << endl;
  data_p->print(); //print the object
  
  return 0;
}




See more files for this project here

GreenSocs

To develop SystemC infrustructure, basic IP, patches and add on library code for eventual standerdization.\r\nThe GreenSocs project is made up of a number of contributions (sub projects). Please visit www.greensocs.com for more information.

Project homepage: http://sourceforge.net/projects/greensocs
Programming language(s): C,C++,Java,Perl,XML
License: other

  Makefile
  README
  SConstruct
  checktest.sh
  data.h
  data_ext.h
  test.cc
  test_reg.cc