Jump to content

Search the Community

Showing results for tags 'vcd file'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Accellera Systems Initiative
    • Information
    • Announcements
    • In the News
  • SystemC
    • SystemC Language
    • SystemC AMS (Analog/Mixed-Signal)
    • SystemC TLM (Transaction-level Modeling)
    • SystemC Verification (UVM-SystemC, SCV)
    • SystemC CCI (Configuration, Control & Inspection)
    • SystemC Datatypes
  • UVM (Universal Verification Methodology)
    • UVM (IEEE 1800.2) - Methodology and BCL Forum
    • UVM SystemVerilog Discussions
    • UVM Simulator Specific Issues
    • UVM Commercial Announcements
    • UVM (Pre-IEEE) Methodology and BCL Forum
  • Portable Stimulus
    • Portable Stimulus Discussion
    • Portable Stimulus 2.0 Public Review Feedback
  • IP Security
    • SA-EDI Standard Discussion
    • IP Security Assurance Whitepaper Discussion
  • IP-XACT
    • IP-XACT Discussion
  • IEEE 1735/IP Encryption
    • IEEE 1735/IP Encryption Discussion
  • Commercial Announcements
    • Announcements

Categories

  • SystemC
  • UVM
  • UCIS
  • IEEE 1735/IP Encryption

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Biography


Location


Interests


Occupation


Company

Found 2 results

  1. I found vcf file empty I don't know what the main problem is. Is there an error in the code, or there is a problem of installing systemc-ams Code: #ifndef SRC_INC_SIN_SRC_HPP_ #define SRC_INC_SIN_SRC_HPP_ #include <systemc-ams> SCA_TDF_MODULE (sin_src) { sca_tdf::sca_out<double> out; // output port sin_src( sc_core::sc_module_name nm, double ampl_= 1.0, double freq_ = 1.0e3, sca_core::sca_time Tm_ = sca_core::sca_time(0.125, sc_core::SC_MS)) : out("out"), ampl(ampl_), freq(freq_), Tm(Tm_) {} void set_attributes() { set_timestep(Tm); } void processing() { double t = get_time().to_seconds(); // actual time out.write( ampl * std::sin( 2.0 * M_PI * freq * t ) ); } private: double ampl; // amplitude double freq; // frequency sca_core::sca_time Tm; // module time step }; #endif /* SRC_INC_SIN_SRC_HPP_ */ ////////////////////////////////////////////////////////////////////////////////////// #ifndef SRC_INC_COMPARATOR_HPP_ #define SRC_INC_COMPARATOR_HPP_ #include <systemc-ams> SCA_TDF_MODULE( comparator ) { sca_tdf::sca_in<double> vplus; sca_tdf::sca_in<double> vminus; sca_tdf::sca_de::sca_out<bool> comp; void set_attributes() {}; void initialize() { }; void processing() { if(vplus.read() > vminus.read()) { comp.write(1); } else { comp.write(0); } } void ac_processing() {}; SCA_CTOR( comparator) : vplus("vplus"), vminus("vminus"){} }; #endif /* SRC_INC_COMPARATOR_HPP_ */ ////////////////////////////////////////////////////////////////////////////////////////// #ifndef SRC_INC_CONSTANT_VOLTAGE_TDF_HPP_ #define SRC_INC_CONSTANT_VOLTAGE_TDF_HPP_ #include <systemc-ams> SCA_TDF_MODULE (constant_voltage_tdf) { sca_tdf::sca_out<double> out; // output port constant_voltage_tdf( sc_core::sc_module_name nm, double ampl_= 1.0) : out("out"), ampl(ampl_) {} void set_attributes() { } void processing() { out.write( ampl); } private: double ampl; // amplitude }; #endif /* SRC_INC_CONSTANT_VOLTAGE_TDF_HPP_ */ /////////////////////////////////////////////////////////////////////////////////////////////////////// #include <systemc-ams> #include "inc/comparator.hpp" #include "inc/sin_src.hpp" #include "inc/constant_voltage_tdf.hpp" int sc_main (int argc, char* argv[]) { uint32_t i; sca_tdf::sca_signal<double> vp; sca_tdf::sca_signal<double> vn; sc_core::sc_signal<bool> z; sc_core::sc_time time_step(10.0, sc_core::SC_NS); comparator comp0("comp0"); comp0.vplus(vp); comp0.vminus(vn); comp0.comp(z); sin_src sin0("sin0",3.3,10000,time_step); sin0.out(vp); constant_voltage_tdf ref("ref",1.2); ref.out(vn); sca_util::sca_trace_file *vcdfile= sca_util::sca_create_vcd_trace_file("comparator-tdf.vcd"); sca_util::sca_trace(vcdfile, vp, "v_p"); sca_util::sca_trace(vcdfile, vn, "v_n"); sca_util:: sca_trace(vcdfile, z, "z"); sc_start(5, sc_core::SC_MS); sca_util::sca_close_vcd_trace_file(vcdfile); return 0; }
  2. I have a header file, a cpp file and a testbench. Now what i am trying to accomplish is : I have a text file which has a 75 bit packet. I need to use this packet in an input signal declared in the header file. Now the problem is if i use the function to call the text file, it doesnt open up the contents of the cpp file for me so the values are not assigned i know. If i use a main function and not a function declared in the header file then i can see the file is being opened but then the the vcd file does not get created at all so i dont know what happens then. Once this is solved i also need to ask, if i have 10 lines of 5 bit 1s and 0s in the text file and need to assign it 10 different variables then how can i do it ? I can share my code if you want ?
×
×
  • Create New...