Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

464 profile views

samng's Achievements


Member (1/2)



  1. I can build SystemC 2.3.3 in VC++ 2017 but when it come to linking, it cannot find some assignment operators like: Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "public: class sc_dt::sc_fixed_fast<8,1,0,0,0> & __cdecl sc_dt::sc_fixed_fast<8,1,0,0,0>::operator=(class sc_dt::sc_fxnum_fast const &)" (??4?$sc_fixed_fast@$07$00$0A@$0A@$0A@@sc_dt@@QEAAAEAV01@AEBVsc_fxnum_fast@1@@Z) referenced in function "void __cdecl utils::fx2fp<12,8>(class fx_complex_<class sc_dt::sc_fixed_fast<12,12,5,3,0>,class sc_dt::sc_fxval_fast>,class fx_complex_<class sc_dt::sc_fixed_fast<8,1,0,0,0>,class sc_dt::sc_fxval_fast> &,class sc_dt::sc_uint<4> &,enum sc_dt::sc_switch)" (??$fx2fp@$0M@$07@utils@@YAXV?$fx_complex_@V?$sc_fixed_fast@$0M@$0M@$04$02$0A@@sc_dt@@Vsc_fxval_fast@2@@@AEAV?$fx_complex_@V?$sc_fixed_fast@$07$00$0A@$0A@$0A@@sc_dt@@Vsc_fxval_fast@2@@@AEAV?$sc_uint@$03@sc_dt@@W4sc_switch@4@@Z) model_test C:\Users\samn\Perforce\samn_lithium\depot\arch\phy\beryllium\src\digital\hls\hls_client\model_test\model_test.obj 1 Is the fixed point package built by default? When I use dumpbin to look at the symbols in systemc.lib, I cannot find any sc_fixed related functions. Even setting SC_INCLUDE_FX during the compilation of systemc-2.3.3.lib and systemc.lib do not help. Thanks Sam
  2. Hi, Can someone show me how to use sc_fxnum_observer class to watch for saturation, roll over etc in objects like sc_fixed? Thanks, Sam
  3. Hi, I am interested in wrapping a C model with SystemC wrapper to mimic a future RTL design. Is it possible to create a port that can connect directly to a SystemVerilog Interface? For Example: SystemC: struct foo{ bool valid; sc_uint<8> data; }; SC_MODULE (xyz) { sc_inout<foo> port1; ... }; SystemVerilog: interface abc () logic valid; logic [7:0] data; endinterface abc abc_i(); xyz ( .port1(abc_i); .... ); Would this work? Thanks, Sam
  4. Hi, Sorry if this has been asked before. I have problem to get sc_module to compile with 2 tlm_blocking_put_if's but with different template types. I have the sc_module inherit tlm_blocking_put_if's like this: class Abc: sc_module, tlm_blocking_put_if<X>, tlm_blocking_put_if<Y> { ...... sc_export<tlm_blocking_put_if<X> > port1; sc_export<tlm_blocking_put_if<Y> > port2; ..... virtual void put(const X &t) { ....} virtual void put(const Y &t) { ....} ..... } Do you see anything wrong? Do I need to use tlm_tag? Thanks, Sam
  5. Thank you, Philipp. Can simple_initiator/target_socket work with non-GP payload?
  6. This is possible, right? I add a target socket as a member to a SC module but not passing generic payload: tlm_target_socket<my_item> inp_sock; But I get the following error: "model.h", line 34: error: type name is not allowed tlm_target_socket<my_item> inp_sock; Do I need to derive 'my_item' from some base class? Thanks, Sam
  7. Alan, thanks for the reply. I think uvmc_tlm is for TLM2 and uvmc_tlm1 is used for TLM1 connection. Is that right? I think tlm_analysis_port is a TLM2 feature, right? Thanks, Sam
  8. Hi, I am trying to connect uvm_analysis_export (SV) and tlm_aanalysis_port (SC) using UVMC like the following: uvm_analysis_export #(obs_xact#(WL,DEP)) sc_export; uvmc_tlm#(obs_xact#(WL,DEP))::connect(sc_export,"fft_ap"); but I got the follow error message: Incompatible complex type usage in task or function call. The following expression is incompatible with the formal parameter of the function. The type of the actual is 'class uvm_pkg::uvm_analysis_export#(class test_pkg::obs_xact#(12,512))', while the type of the formal is 'class uvm_pkg::uvm_port_base#(class uvm_pkg::uvm_tlm_if#(class test_pkg::obs_xact#(12,512),enum uvm_pkg::uvm_tlm_phase_e))'. Expression: this.sc_export Source info: uvmc_tlm#(test_pkg::obs_xact#(12,512),uvm_pkg::uvm_tlm_phase_e,uvmc_pkg::uvmc_default_converter#(uvm_pkg::uvm_object))::connect(this.sc_export, "fft_ap", null ... Isn't uvm_analysis_export is extended from uvm_port_base#(uvm_tlm_if#())? Thanks Sam
  9. Hi sc_fixed type looks ahead to the type of the destination variable to pick the right action for quatisation and overflow handling: sc_fixed<6,6> a = 13; sc_fixed<5,5,SC_RND> b = a>>1; a become 7. But using sc_fixed in a template class like: template <class T, int N> class Vector { T m_array[N]; Vector operator>> (const unisgned int m) const { Vector tmp; for (int i=0; i<N; i++) tmp.m_array = m_array>>m; } }; ..... Vector <sc_fixed<6,6>,1 > a; Vector <sc_fixed<5,5,SC_RND>,1 > b = a >> 1; a[0] is now 6 not 7, because the return type of operator >> is still Vector<sc_fixed<6,6>,1 >. Is there anyway to write the template class/operator that can see the type of b so that sc_fixed rounding behaviour can preserved? Thanks Sam
  10. Anyone has experience with the simulation speed of sc_fixed_fast. Done some benchmarking against int and double, sc_fixed_fast is x10 slower. Is this your experience too? Or there are some other factors that affects it speed. Thanks,
  11. Hi, We have been experimenting with wrapping SystemC sim with mexFunction so that it can be called within Matlab. What we find is that repeat calling of the mexFunction causes memory leak as if something was not cleaned up even each SystemC object is meticulaously deleted. Does anyone has experience with calling SystemC from Matlab? Was the memory leak issue encountered? Is there a solution? Thanks, Sam
  12. Thank you, Alan. Is it possible not to compile in the kernel at all by simply including the data types .h files instead of systemc.h? Sam
  13. Is it possible to use only systemc data types without including the simulation kernel? Thanks Sam
  14. Alan, I did define SC_INCLUDE_FX and sc_fixed type is working fine. Dakupoto, The context switch code if put in functions/methods works fine. It seems that it just don't like it in class declaration. Sam
  15. I am trying to implement float and fixed and point computation using the same code using sc_fixed<> and type casting sc_fxcast_switch(). For this, I created a class template and added the type casting code: template <sc_switch FIXPT> class abc { sc_fxcast_switch fxc(FIXPT); sc_fxcast_context fxc_context(fxc); // members sc_fixed<....> a, b, c; ..... } However, the compiler does not seem to like having the type casting code in class declaration, error in VS2010: error C2061: syntax error : identifier 'fxc' Can sc_fxcast_context/switch be members of a class? If not, how do you control the cast switch sc_fixed<> members? Thanks, Sam
  • Create New...