Jump to content

Aaron Yang

Members
  • Content Count

    5
  • Joined

  • Last visited

About Aaron Yang

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Aaron Yang

    Sensitive List

    Thank you for the explanation, where should I put this overload? In the systemc.h?
  2. Aaron Yang

    Sensitive List

    To be more concrete, I have another thread called fir_main and in_val = din.read(); In this example, I want to trigger fir_comb by adding the in_val(updated in the fir_main) to its sensitive list.
  3. Aaron Yang

    Sensitive List

    Hey, question about the sensitive list, I got this error: fir.h:79:23: error: no match for 'operator<<' (operand types are 'sc_core::sc_sensitive' and 'sc_core::sc_vector<sc_dt::sc_fixed<16, 2> >::element_type {aka sc_dt::sc_fixed<16, 2>}') sensitive << in_val; Here is the fir.h sc_vector<sc_fixed<din_size, din_int>> in_val{"in_val", din_num_samples}; void fir_comb(); SC_HAS_PROCESS(fir); // The combination of SC_HAS_PROCESS and a normal constructor replaces the use of SC_CTOR fir(sc_module_name name_, bool debug_ = false): sc_module(name_), debug(debug_) { SC_THREAD(fir_comb); for( unsigned i= 0; i<in_val.size(); ++i ) sensitive << in_val[i]; Anything wrong with it? Thank you in advance.
  4. Aaron Yang

    How to connect array of ports?

    Thanks Roman, that works!
  5. Hey I am kinda new to system C, I met this error when connecting ports declared as array: sc_main.cpp: In function 'int sc_main(int, char**)': sc_main.cpp:16:21: error: expression cannot be used as a function tb0.in(sample_in); This is sc_main.cpp #include <systemc.h> #include "fir.h" #include "tb.h" int sc_main (int, char *[]){ sc_clock clock("clock", 10, SC_NS); sc_signal<bool> reset; sc_signal<sc_fixed<16,2>> sample_in[2]; sc_signal<sc_fixed<16,2>> sample_out[4]; tb tb0("tb0_name"); tb0.rstn(reset); tb0.clk(clock); tb0.in(sample_in); tb0.out(sample_out); fir1("fir1_name", true); fir1.din(sample_in); fir1.dout(sample_out); This is the tb.h file #include <systemc.h> SC_MODULE(tb) { sc_in<bool> clk; sc_out<bool> rstn; sc_out<sc_fixed<16,2>> in[2]; sc_in<sc_fixed<16,2>> out[4]; This is the fir.h #include <systemc.h> SC_MODULE(fir) { sc_in<bool> rst_n; sc_in<bool> clk; sc_in<sc_fixed<16,2>> din[2]; sc_out<sc_fixed<16,2>> dout[4]; What should I do in this case?
×