Jump to content

Aaron Yang

Members
  • Content Count

    7
  • 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. Hey Guys, I am kinda new to this language so bear with me if question sounds naive. I am building cycle accurate system C model. When I run performance profiler, some process triggered by clk consume a lot resources(clk is always running). So I am looking for tricks to improve the performance: Original code: SC_METHOD(process_output); sensitive << reset; sensitive << clk.pos(); ... void fir::process_output() { if (reset.read() == 0) { //reset sequence } else { if(enable.read()) { //normal operation } } } One way to
  2. Hey guys, Need help about this: Exception thrown at 0x00007FFC1FCE1CAF (ntdll.dll) in mytest.exe: 0xC0000005: Access violation reading location 0x0000000000000000. I traced the call stack to where it stopped in my code, found it's this line in header file: sc_vector<sc_signal<float>> output_connect_wire{"output_connect_wire",1}; It's been used like this in cpp file, not sure if it's relevant though: .... submodule->O_data(output_connect_wire); .... if(...){...} else { data_out.write(output_conncet_wire[0].read()); } .... where the submodule output
  3. Thank you for the explanation, where should I put this overload? In the systemc.h?
  4. 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.
  5. 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_
  6. 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);
×
×
  • Create New...