Jump to content

lee_timmy

Members
  • Content Count

    2
  • Joined

  • Last visited

About lee_timmy

  • Rank
    Member

Contact Methods

  • MSN
    lee_timmy@hotmail.com

Profile Information

  • Gender
    Male
  • Location
    Dallas
  1. Thanks, Alan. You are correct. I separated my Gnoise.cpp to a Gnoise.h with the function prototype, and Gnoise.cpp only having the function of sc_processing. The C++ function "gauss_rand(double)" is called in Gnoise.cpp. In this way, Gnoise.h can be included in its top module. The compilation is passed and simulation seems correct. Thank you all! Tim
  2. Hi, all I tried to implement the time domain Gaussian random noise in page 93 of AMS user manual. I made this as an sub-module of the BASK modulation/demodulation system. However, the compilation gives me errors: Gnoise.o: In function `gauss_rand(double)': Gnoise.cpp:(.text+0x60): multiple definition of `gauss_rand(double)' BASK.o:BASK.cpp:(.text+0x60): first defined here /tmp/ccRJX6KO.o: In function `gauss_rand(double)': test_BASK.cpp:(.text+0x60): multiple definition of `gauss_rand(double)' BASK.o:BASK.cpp:(.text+0x60): first defined here collect2: ld returned 1 exit status make: *** [test_BASK] Error 1 It says the the C++ function gauss_rand(double) is defined in multiple places. But I'm sure that's Gnoise.cpp is the only file where I use and define this function. How can SystemC/AMS call a C++ function in a module without getting this error? Thank you! Tim
×
×
  • Create New...