小弟最近花了點時間在弄 IC/CAD
Structural Checking of Voltage-Island and Power Gating Low-Power Logic Design 的題目.
寫了一堆很像
蛆的程式碼, 主要功能是 "驗證 Design 是否滿足 Isolation Condition Constrain". 如果你有興趣,就不妨參考看看吧...XD.
感覺裡面還有很多可以改進的地方, 如 class 的分層部份,可以預先加入 Verify 的條件判斷. 雖然目前只是驗證 Design 是否滿足Constrain, 但將來也有可能要 update Design 時候. 那時就需要 register Verify 來確保每次 update 是否還維持其 Design 的完整性. 還有 ISO Rule Check 部份, 可以考慮其相依性, 減少 Search/Loop 的次數. 這邊小弟只寫了 ISO2, ISO3, ISO4, ISO5 的條件判斷. 剩下的部份就請好心人事把他完成吧.
Flow 大致是如此, Parser 出我們要的 Class type, 依序建立在 ISO_Table, SC_Table.底下. 之後透過 SC_Util, ISO_Util 來 Access SC_Table, ISO_Table..

底下用個簡單的 sample code 來抓取 Design port 的 Deepest Fan-In port lists.
SC_Util *sc_util = new SC_Util();
typedef std::vector<SC_Module::SC_Port_D*> PtVec;
typedef std::vector<SC_Module::SC_Port_D*>::iterator PtVec_iter;
PtVec pt_vv;
SC_Module::SC_Port_D *sc_port = sc_util->split_path_2_Port(sc_root,"u1/u2/u3/CPF_ISO__cell_368/Ib");
//get Deepest Fain Vector
sc_util->get_PreestVec(sc_port,&pt_vv);
sc_port->dump_Context();
std::cout << sc_util->get_HierarchyName(sc_port) << std::endl;
for(PtVec_iter pt_it = pt_vv.begin();
pt_it != pt_vv.end(); ++pt_it){
SC_Module::SC_Port_D *sc_preest_p = static_cast<SC_Module::SC_Port_D*>(*pt_it);
sc_preest_p->dump_Context();
std::cout << sc_util->get_HierarchyName(sc_preest_p) << std::endl;
}
delete sc_util;
project :
https://github.com/funningboy/iso_cell_rc1
Refs:
http://lowpowerdesign.blogspot.com/
http://cad_contest.cs.nctu.edu.tw/cad11/Problems.htm
GCC Optimization results in “Undefined symbol” at runtime
Bison 2.5
Code-Level And API Options
沒有留言:
張貼留言