ruwan2 Posted June 30, 2014 Report Share Posted June 30, 2014 Hi, After I define fixed point, the last line d(SC_OFF); of #define SC_INCLUDE_FX #include <systemc.h> #include "fir_data.h" void fir_data::entry() { int state; sc_int<8> sample_tmp; sc_ufixed<16,16> d; d(SC_OFF); is complained by compiler: # fir_data.cpp:44: error: no match for call to '(sc_dt::sc_ufixed<16, 16, SC_TRN, SC_WRAP, 0>) (sc_dt::sc_switch)' # C:\modeltech_10.1c\include\systemc/sc_fxnum.h:3372: note: candidates are: const sc_dt::sc_fxnum_subref sc_dt::sc_fxnum::operator()(int, int) const # C:\modeltech_10.1c\include\systemc/sc_fxnum.h:3383: note: sc_dt::sc_fxnum_subref sc_dt::sc_fxnum::operator()(int, int) # C:\modeltech_10.1c\include\systemc/sc_fxnum.h:3415: note: const sc_dt::sc_fxnum_subref sc_dt::sc_fxnum::operator()() const # C:\modeltech_10.1c\include\systemc/sc_fxnum.h:3422: note: sc_dt::sc_fxnum_subref sc_dt::sc_fxnum::operator()() # ** Error: (sccom-6142) Compilation failed. # # # ** Error: C:/modeltech_10.1c/win32/sccom failed. # Error in macro C:\Users\Jeff\modelsim_systemC\fir_clk\run0.do line 25 What is wrong with my code? Thanks, Quote Link to comment Share on other sites More sharing options...
Philipp A Hartmann Posted June 30, 2014 Report Share Posted June 30, 2014 SC_ON, SC_OFF are related to "floating-point cast switches". You likely don't need to worry about these, if you don't know what problems these intend to address. Otherwise, please refer to Sections 7.10.7, 711.5 of IEEE 1666-2011. Syntaxwise, you currently try to invoke the function call operator on the sc_ufixed variable d (with an incompatible parameter).What do you intend to achieve? Do you want to assign a value? /Philipp ruwan2 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.