Jump to content

dccafe

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by dccafe

  1. I've just found out that SystemC-2.3.2 can be compiled with SC_INCLUDE_EXTRA_STD_HEADERS to include <cstring>. This should be used when configuring, right before make. With this, there is no need to modify SystemC-AMS header files.

    $ mkdir build
    $ cd build
    $ ../configure CXXFLAGS="-DSC_INCLUDE_EXTRA_STD_HEADERS" --prefix=/usr --otheroptions...
    $ make
    $ make install

    Cheers.

  2. Hello,

    SystemC 2.3.2 has improved support for C++11, but with that update, cstring has been removed from systemc.h header file. 

    This implies in a breakage in systemc-ams build because sca_tdf_ct_ltf_nd_proxy and sca_tdf_ct_vector_ss_proxy uses memset and memcpy. A simple fix would be to include <cstring> to both headers:

    • scams/impl/predefined_moc/tdf/sca_tdf_ct_ltf_nd_proxy.h
    • scams/impl/predefined_moc/tdf/sca_tdf_ct_vector_ss_proxy.h

     

  3. Thank you for your reply,

     

    I've read the license file and there is a clause for redistribution. 

     

     

       4. Redistribution. You may reproduce and distribute copies of the
          Work or Derivative Works thereof in any medium, with or without
          modifications, and in Source or Object form, provided that You

     

          meet the following conditions:
     

         ( a ) You must give any other recipients of the Work or Derivative

               Works a copy of this License; 

     
         ( b ) You must cause any modified files to carry prominent notices
               stating that You changed the files; 

     

    And yes, there is a notice.

     

    But when I run make install none of the documents files get installed, even though the folder /usr/share/doc/systemc-ams gets created. So I guess I'll have to manually copy them right after make install.

     

    I will also contact COSEDA to inform them of the package. I think it is a good idea. Thank you for your advice.

  4. Hello all,

     

    I've created an automated installation package for users of Archlinux. I've uploaded it to the AUR (Archlinux User Repository). This package can be installed automatically using yaourt or any aur capable tool. If installed, it will pull dependencies automatically, like the systemc package created by the user brookskd. Files will be installed to /usr/include and /usr/lib and will be managed by pacman or yaourt which means that you can uninstall them latter or update the package automatically if there is a new version available. 

     

    By the way, I still have to update the license info. As far as I know the whole package is protected by Apache license 2.0, right? So it is ok to redistribute like this?

  5. Here you go :

     

    +inf and -inf values are usually generated by an unwanted division by zero.

    If you run the following dummy TDF module, you'll obtain a +inf at the beginning.

    You can then use the vcd file as an input to your tool in order to reproduce the bug

     

     

    #include <systemc-ams>

    SCA_TDF_MODULE(genInf) {
        sca_tdf::sca_out<double> output;
        int counter; double cte;
        SCA_CTOR(genInf) {counter=0;cte=5;}
        void processing() {output = cte / counter++;}
    };


    int sc_main(int argc, char * argv[]) {

     

        sca_tdf::sca_signal<double> sig;
     

        genInf generator("genInf");
        generator.output(sig);
        generator.set_timestep(1,sc_core::SC_SEC);

        // Tracing tools
        sca_util::sca_trace_file * tf = sca_util::sca_create_vcd_trace_file("wave");
        sca_util::sca_trace(tf,sig,"test_signal");

        // Simulation
        sc_core::sc_start(10,sc_core::SC_SEC);

        // After Simulation
        sca_util::sca_close_vcd_trace_file(tf);

        return 0;
    }

     

    VCD output should be as follows

     

     

    $date
        Mon Dec  9 15:57:40 2013
    $end
    $version
        2.0.alpha_1
    $end
    $timescale
          1 ps
    $end
    $scope module SystemC_AMS $end
    $var real 1 !  test_signal $end
    $upscope $end
    $enddefinitions $end

     

    #0
    rinf !            <------ Impulse can't handle this
    #1000000000000
    r5.000000000000000 !
    #2000000000000
    r2.500000000000000 !
    #3000000000000
    r1.666666666666667 !
    #4000000000000
    r1.250000000000000 !
    #5000000000000
    r1.000000000000000 !
    #6000000000000
    r0.8333333333333334 !
    #7000000000000
    r0.7142857142857143 !
    #8000000000000
    r0.6250000000000000 !
    #9000000000000
    r0.5555555555555556 !
    #10000000000000

     

     

    Hope it helps,

    Daniel.

  6. Hello!

     

    I've been using your tool for quite a while now and I'm really pleased with the overall eclipse integration.

    I have found a small bug though : Apparently, the tool does not interpret float values of -inf or +inf.

    It fails to print the waveform whenever it finds those symbols.

     

    As a solution, I suggest the gtkwave workaround ...

    It replaces those symbols by a virtual zero and prints the corresponding portion of the wave with a different color.

     

    Hope it helps,

    Cheers,

×
×
  • Create New...