2013-03-01から1ヶ月間の記事一覧

SystemVerilog:$finishの引数

IEEE規格では以下のように定義されています。 Table 20.1 Diagnostics for $finish Argument value Diagnostic message 0 Prints nothing 1 Prints simulation time and location 2 Prints simulation time, location, and statistics about the memory and …

電子書籍の利用

読み放題でコスパよし!電子書籍アプリyomel.jpキャンペーン とあるキャンペーン中なので、書いてみる。 電子書籍について、私はほとんど読んでいない。。。 というもの、小説ほとんど読まないから。 ただ、技術書に関しては別で技術論文(PDF)になっているも…

SystemCインストール (Visual Studio 2012)

Accellera Systems Initiative Forumsにて、スレッドがあったので紹介。 SystemC in Visual Studio 2012 Visual Studio 2012を使う人は見てみてください。 引用 1. Installed Visual C++ 2012 Express Edition 2. Download Systemc-2.3.0.tgz 3. uncompress …

SystemC 2.3 : sc_starvation_policy

SystemC 2.3から追加になっている機能になります。 sc_start()時に、sc_starvation_policyを指定できます。 4.2.1 Function declarations より引用 enum sc_starvation_policy { SC_RUN_TO_TIME, SC_EXIT_ON_STARVATION }; default値は「SC_RUN_TO_TIME」で…

SystemC 2.3:throw_it

SystemC 2.3にて追加された「throw_it」についてです。 サンプルコード # include <stdio.h> # include <systemc.h> SC_MODULE( hoge ){ std::exception ex; sc_event ev; sc_process_handle t; int q; SC_CTOR( hoge ) { SC_THREAD( calling ); SC_THREAD( target ); t = sc_get</systemc.h></stdio.h>…

SystemC 2.3 : reset/kill event

SystemC 2.3では、reset/kill 発生時のイベントを利用して プロセスを動作させることも出来ます。 サンプルコード # include <stdio.h> # include <systemc.h> SC_MODULE( hoge ){ sc_event ev; sc_process_handle t; int q; SC_CTOR( hoge ) { SC_THREAD( calling ); SC_THREAD(</systemc.h></stdio.h>…

SystemC 2.3:unwind (reset and kill)

前回の「reset/kill」を観測することができます。 サンプルコード #include <stdio.h> #include <systemc.h> SC_MODULE( hoge ){ sc_event ev; sc_process_handle t; int q; SC_CTOR( hoge ) { SC_THREAD( calling ); SC_THREAD( target ); t = sc_get_current_process_handle();</systemc.h></stdio.h>…

SystemC 2.3:reset and kill

SystemC 2.3で追加された「reset と kill」についてです。 サンプルコード #include <stdio.h> #include <systemc.h> SC_MODULE( hoge ){ sc_event ev; sc_process_handle t; int q; SC_CTOR( hoge ) { SC_THREAD( calling ); SC_THREAD( target ); t = sc_get_current_process_h</systemc.h></stdio.h>…

SystemC 2.3 : sync_reset_on/off

SystemC 2.3の「sync_reset_on/off」についてです。 サンプルコード #include <stdio.h> #include <systemc.h> SC_MODULE( hoge ){ sc_event ev; sc_process_handle t; int q; SC_CTOR( hoge ) { SC_THREAD( calling ); SC_THREAD( target ); t = sc_get_current_process_handle(</systemc.h></stdio.h>…

SystemC 2.3 : disable and enable

SystemC 2.3では、Process Control 編です。 今回は、「disable & enable」についてです。 サンプルコード #include <stdio.h> #include <systemc.h> SC_MODULE( hoge ){ sc_in<bool> clock; sc_process_handle t; SC_CTOR( hoge ) { SC_THREAD( calling ); SC_THREAD( target ); sensi</bool></systemc.h></stdio.h>…

SystemC 2.3:suspend and resume

SystemC 2.3では、Process Controlはかなり拡張されています。 今回は、「suspend & resume」についてです。 サンプルコード #include <stdio.h> #include <systemc.h> SC_MODULE( hoge ){ sc_event ev; sc_process_handle t; SC_CTOR( hoge ) { SC_THREAD( calling ); SC_THREAD</systemc.h></stdio.h>…

SystemC 2.3:Process Handles

SystemC 2.3で色々拡張?変更されたので、 勉強がてら書いていきたいと思います。 先ずは、正常動作というか何も変更を加えてない状態です。 ここでは、t に対しての属性を表示させています。 サンプルコード #include <stdio.h> #include <systemc.h> SC_MODULE( hoge ){ sc_proc</systemc.h></stdio.h>…

SystemVerilog:pre/post_randomize()

SystemVerilogのランダム生成には、以下の functionが存在します。 IEEE1800-2012引用: 18.6.2 Pre_randomize() and post_randomize() Every class contains pre_randomize() and post_randomize() methods, which are automatically called by randomize()…

SCVインストール(SystemC 2.3版)

基本的な操作は Ubuntu12.04に SCV をインストール と変わりません。 違う点は config時の指定だけです。 SystemCのインストール先は個別に違うと思うので、置き換えてください。 SystemC 2.2 $> ../configure [--prefix=インストール先] --with-systemc=/us…

SCV:SystemCデータ型のランダマイズ

今まで試したソースは C/C++のデータ・タイプだったので、 SystemCのデータ・タイプで試してみました。 サンプルコード #include <scv.h> int sc_main( int argc, char* argv[] ) { printf( "-----------------------\n"); printf( "--- Type:sc_int<8> ---\n"); pr</scv.h>…