Quantcast
Channel: SystemC Language Forum RSS Feed
Viewing all articles
Browse latest Browse all 595

sc_int<N>

$
0
0

I get following message when I debug and print a variable of type sc_dt::sc_int<N>

&"print integer\n"
~"$4 = {<sc_dt::sc_int_base> = {<No data fields>}, <No data fields>}"

I tried to add debug informations with no success. I did following.

 

Install of the shared Library in Linux

  1.  sudo su
  2. Untar the package using - change permissions "chmod  -R +x systemc-2.3.0"
  3. Change to the top level directory systemc-2.3.0 : cd systemc-2.3.0
  4.  Make a directory  systemc230 for installation in your /usr/local/ path.
    "mkdir /usr/local/systemc230"
  5.  Make a directory “objdir” in the directory systemc-2.3.0 : "mkdir objdir"
  6. Change to objdir : cd objdir
  7. now type: export CXX=g++
    export OPT_CXXFLAGS=-O0
  8. Run configure from objdir:  ../configure --prefix=/usr/local/systemc230
  9. Do: make
  10. Install by typing command: make install


First make this

export SYSTEMC_HOME=/usr/local/systemc230/
 

 

My Sample Program

#define SC_INCLUDE_FX
#include <systemc.h>

int sc_main( int, char*[]){
    sc_int<30> integer;
    integer = 12;
    integer = -15;
    return 0;
}
 


Then this to create your program

g++ -I. -I$SYSTEMC_HOME/include -L. -L$SYSTEMC_HOME/lib-linux -Wl,-rpath=$SYSTEMC_HOME/lib-linux -o main main.cpp -g -O0 -lsystemc -lm
 

 

System I Use

GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04

g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Ubuntu "12.04.2 LTS, Precise Pangolin"

 

 

What am I doing wrong?

What am I supposed to do?

 

 

 


 


Viewing all articles
Browse latest Browse all 595

Trending Articles