Jump to content

knhan930

Members
  • Content Count

    4
  • Joined

  • Last visited

About knhan930

  • Rank
    Member

Profile Information

  • Gender
    Not Telling
  • Location
    Portland, OR
  1. Philipp, Thank you for the quick reply. The reason I mention about the concatenation operator is that I have a workaround that removed the random result error after replacing the concatenation operator of sc_biguint to arithmetic equations. For example, after I changed the code from code A, z = (f[3]) ? (a == (sc_biguint<1>(1), sc_biguint<width>(0))) : (f[4]) ? (a == (sc_biguint<1>(0), sc_biguint<width>)) : 0; to code B, z = (f[3]) ? (a == (1 << width)) : (f[4]) ? (a == 0) : 0; , the random result error was disappeared. The source code with co
  2. Another issue I have is that I have a simple C++ code that uses only SystemC datatypes from SystemC library like below. #include "systemc.h" int main() { sc_uint<8> a, b; sc_uint<9> z; z = a + b; } It’s working with SystemC 2.2.0, but there is a link error with SystemC 2.3.0. I used the general compile command with GCC 4.2.2: % g++ -I$SYSTEMC/include test.cpp –L$SYSTEMC/lib-linux64 -lsystemc …/systemc-2.3.0/lib-linux64/libsystemc.so: undefined reference to `sc_main' collect2: ld returned 1 exit status I wonder if SystemC 2.3.0 disables to use main() at all, w
  3. I had a problem with a SystemC code, which generated correct results but began to produce random results after thousands of iterations. Both SystemC 2.2.0 and 2.3.0 showed the same error. What I found is that the main culprit of this error came from the concatenation operation, which was reported both by Valgrind and Purify that there were memory leaks. Let me share some testcases with these symptoms. 1. sc_uint, sc_int datatypes #include "systemc.h" int sc_main(int argc, char* argv[]) { sc_uint<4> a, b; sc_uint<8> c, z1; bool z2; a = 0x5; b = 0x3; c = 0x11; z1 = (a,
×
×
  • Create New...