Jump to content
Sign in to follow this  
bogdan.tabacaru88

Cannot find commonsrcs.h and gendatatrace.h files in systemc-ams package

Recommended Posts

Hi everyone,
 
I have just started working with SystemC-AMS.
I have installed the systemcams-1.0.tar package from www.systemc-ams.org .
 
As reference I am using the examples from the book: http://www.amazon.de/SystemC-SystemC-AMS-Practice-2-3-ebook/dp/B00F8HSYF8

SystemC and SystemC-AMS in Practice: SystemC 2.3, 2.2 and SystemC-AMS 1.0 from Amal Banerjee (Autor)Balmiki Sur (Autor)
 
I am trying to run their first example from the book and I find myself stuck at compiling.
 
Here is the part that is giving me a hard time:

#include <systemc-ams>
#include "commonsrcs.h"                                     //<-- doesn't exist
#include "gendatatrace.h"                                   //<-- doesn't exist
#include <cstdlib>
#include <cstring>
#include <iostream>                                         //<-- was not written in original example

using namespace std;                                        //<-- was not written in original example

int sc_main (int argc, char **argv)
{
    double amplitude;
    double frequency;
    
    if (argc < 3)
    {
        cout<<"Insufficient input parameters ..."<<endl;
        cout<<"give <amplitude> and <frequency> arguments to output file"<<endl;
        exit(0);
    }
    
    sca_tdf::sca_signal<double> sigin0;
    sca_tdf::sca_signal<double> sigout0;
    
    amplitude = strtod(argv[1], NULL);
    frequency = strtod(argv[2], NULL);
    
    sinsrc sin_src ("sin_src");                              //<-- cannot be referenced due to commonsrcs.h not being found
    tracedoublecombo trdbl ("tr_nd");                        //<-- cannot be referenced due to gendatatrace.h not being found
    
    sin_src.sigout(sigin0);                                 //<-- cannot be referenced due to error above
    sin_src.amplitude = amplitude;                          //<-- cannot be referenced due to error above
    sin_src.frequency = frequency;                          //<-- cannot be referenced due to error above
    
    trdbl.in1(sigin0);                                      //<-- cannot be referenced due to error above
    trdbl.in2(sigout0);                                     //<-- cannot be referenced due to error above
    
    sc_core::sc_start(100.0, sc_core::SC_MS);
    sc_core::sc_stop();
    return 0;
}

The compiler version I am using is:

gcc version 4.1.2 20080704 

The compilation output is:

g++ \
                -I. -I/home/tabacaru/systemc-2.3.0/include -I/home/tabacaru/systemc-ams-1.0/include \
                -L. -L/home/tabacaru/systemc-2.3.0/lib-linux64 -L/home/tabacaru/systemc-ams-1.0/lib-linux64 \
                -o butter butter.cpp \
                -lsystemc-ams -lsystemc -lm
butter.cpp:2:80: error: commonsrcs.h: No such file or directory
butter.cpp:3:80: error: gendatatrace.h: No such file or directory
butter.cpp: In function 'int sc_main(int, char**)':
butter.cpp:28: error: 'sinsrc' was not declared in this scope
butter.cpp:28: error: expected `;' before 'sin_src'
butter.cpp:29: error: 'tracedoublecombo' was not declared in this scope
butter.cpp:29: error: expected `;' before 'trdbl'
butter.cpp:31: error: 'sin_src' was not declared in this scope
butter.cpp:35: error: 'trdbl' was not declared in this scope

 
I am sure I am doing something wrong, however I do not know what exactly. I already installed the systemc-ams-1.0 package twice and I still get the same problem.
Any feedback regarding the 2 header files (commonsrcs.h and gendatatrace.h) would be much appreciated.
If you know another package from an official/mirror web-page I would be happy for a link.
 
Thank you in advance.
 
Bogdan

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...