More Related Content
Similar to SystemC Verification Methodology
Similar to SystemC Verification Methodology (20)
SystemC Verification Methodology
- 11. 項目 ツール or 手法 コメント
アサーション PSL ほどほど
カバレッジ JEDA/gcov ほどほど
フォーマル SLEC/HECTOR ほどほど
UVM/e Co-Simulation 敷居高い
SystemCモデル検証
- 20. 項目 ライブラリ リリース予定
アサーション svm_ovl 2013/11
カバレッジ svm_cover_xxx 201x/xx/xx
フォーマル ー むりぽー
UVM/e svm_xxx 2013/12
作ります。
- 27. 全階層信号波形取得
• svm_waves(char* tf, sc_module top);
#include “svm.h”
int sc_main( int argc, char* argv[] ) {
top utop("utop");
svm_waves(“systemc”, utop);
sc_start();
return 0;
}
全階層がVCD形式で出力
・sc_in/out/inout
・sc_signal
※標準SystemCでは無理です
- 28. get_child_object()
inline svm_waves::svm_waves(const char* tf_name, const sc_module& m_top){
create( tf_name );
std::vector<sc_object*> children = m_top.get_child_objects();
svm_trace(tf, children);
}
void svm_waves::svm_trace(sc_trace_file *tf, std::vector<sc_object*>& children){
for (std::vector<sc_object*>::iterator i = children.begin(); i != children.end(); i++){
if ( std::string((*i)->kind())=="sc_module" ) {
sc_module* mptr = dynamic_cast<sc_module*>(*i);
std::vector<sc_object*> r_children = mptr->get_child_objects();
svm_trace(tf, r_children);
}else if(std::string((*i)->kind()) == "sc_in" || std::string((*i)->kind()) == "sc_out"
|| std::string((*i)->kind()) == "sc_inout" || std::string((*i)->kind()) == "sc_signal"){
(*i)->trace(tf);
}
}
}
- 29. pre/post_random()
struct packet : public svm_sequence_item {
svm_rand<int> a;
svm_rand<double> b;
svm_rand<sc_int<8> > c;
packet() {
svm_sequence_item::regist(&a);
svm_sequence_item::regist(&b);
svm_sequence_item::regist(&c);
a.keep_only(-30, 30);
b.keep_only(-10, 20);
c.keep_only(30);
}
void post_randmize() {
a -= 10000;
}
};
int sc_main( int argc, char* argv[] ) {
packet data_p;
for (int i=0; i<20; i++) {
data_p.randmize();
:
}
return 0;
}
# a = -9987, b = 10.016675, c = 30
# a = -9971, b = -4.749229, c = 30
# a = -10008, b = -4.446328, c = 30
# a = -10004, b = 10.039535, c = 30
: