Entry
  version
install
    make
    make install
  Cygwin
  Hello World
  NetBSD
    2.2.0
    2.0.1
  Emacs mode
examples
  fft/fft_fxpt
  gdb/bt
書き方
  sc_clock
  Makefile
    one module
    階層配置
    SC_THREAD
    SC_METHOD
    指定方法
    違い
  bit-slice
URL

eda

SystemC

Last Update: "2009/12/10 15:49:30 makoto"

examples

fft/fft_fxpt

cd systemc-2.2.0/objdir/examples/sysc/fft/fft_fxpt
gmake check
ambiguous overload
fft/fft_fxpt/fft.cpp:262: error: ambiguous overload for 'operator+' in 'i + len'
fft/fft_fxpt/fft.cpp:262: note: candidates are: operator+(int, sc_dt::int_type) 
include/sysc/datatypes/fx/sc_fxval.h:1719: note:                 const sc_dt::sc_fxval_fast

fft/fft_fxpt/fft.cpp:260: error: ambiguous overload for 'operator<' in 'i < N'
fft/fft_fxpt/fft.cpp:260: note: candidates are: operator<(int, sc_dt::int_type) 
--- systemc-2.2.0/examples/sysc/fft/fft_fxpt/fft.cpp~	2006-12-16 05:31:29.000000000 +0900
+++ systemc-2.2.0/examples/sysc/fft/fft_fxpt/fft.cpp	2009-11-12 15:52:27.000000000 +0900
@@ -109,9 +109,9 @@
   sc_int<16> tmp_real;
   sc_int<16> tmp_imag;
   short index;
-  sc_int<6> N;  
+  int N;
   sc_int<4> M;
-  sc_int<6> len;
+  int len;
   sc_int<16> W_real[7];
   sc_int<16> W_imag[7];
   sc_int<16> w_real;
gmake check

gdb/bt

genova@makoto 15:52:34/091112(..fft/fft_fxpt)% ./fft

             SystemC 2.2.0 --- Nov 12 2009 11:17:05
        Copyright (c) 1996-2006 by all Contributors
                    ALL RIGHTS RESERVED

Reading in the samples...
zsh: segmentation fault (core dumped)  ./fft
genova@makoto 15:53:22/091112(..fft/fft_fxpt)% 
gdb fft fft.core
...
(gdb) bt
#0  0xbba7218b in __svfscanf_unlocked () from /usr/lib/libc.so.12
#1  0xbba736ff in vfscanf () from /usr/lib/libc.so.12
#2  0xbba30ca1 in fscanf () from /usr/lib/libc.so.12
#3  0x08052e7f in source::entry ()
#4  0x080bac22 in sc_core::sc_cthread_cor_fn ()
#5  0x080bad4c in qt_null ()
(gdb) 
Above Segmetation fault is kind of unlucky. It also segfaults on CentOS 4.4. Try different file: say: fft/fft_flpt. With this file, it runs OK on both NetBSD and CentOS 4.4. (You need to make install for SystemC 2.x).
   50  (cd /export/local-src/systemc-2.2.0/objdir/; make install)
   52  make check
   37  cd ../fft_flpt/

genova@makoto 15:39:00/091210(..fft/fft_flpt)% make check
make  fft
`fft' is up to date.
make  check-TESTS

             SystemC 2.2.0 --- Nov 12 2009 11:17:05
        Copyright (c) 1996-2006 by all Contributors
                    ALL RIGHTS RESERVED

Reading in the samples...
Computing...
     (omitted)
PASS: fft
==================
All 1 tests passed
==================
genova@makoto 15:38:49/091210(..fft/fft_flpt)%
Last Update: Thu, 10 Dec 2009 06:49:30 GMT 1.1.1.1 2008/03/12