Re: [問題] HW4幾個問題

作者: ric2k1 (Ric)   2010-04-28 20:32:15
※ 引述《kaie819 (kaie)》之銘言:
: 有關於作業四目前遇到了幾個問題
: 1. 我想要建立DFF fanin cone的BDD,看CirGate的資料結構,可以藉由CirGate[0]得到
: fanin gate,可是實際這樣用卻得到的是自己這個DFF(?),如果要得到fanin cone,必須
: 要用CirGate[0][0],這樣做出來感覺是對的,但不知道是否合理?(二維?)
你確定你的 gate 是 DFF 嗎? 看來有可能是 PO gate 哦?
I wrote the following test code, and the output looks fine.
for( unsigned i = 0, n = _dffList.size(); i < n; ++i ) {
cout << i << ": " << endl;
cout << _dffList[i]->getTypeStr() << endl;
cout << (*_dffList[i])[0]->getTypeStr() << endl;
}
======= for alu2.v =======
0:
DFF
AND
1:
DFF
AND
....<略>
7:
DFF
AND
: 2. 作業題目有關於PTR的部份TR和TRI順序好像跟程式不一致
: 題目是PTR TR TRI; 程式是PTR TRI TR
啊... 寫反了。
改題目好了,比較單純。
就是改成 PTR [triName][trName]
: 3. 有關於BddNode exist()的功能,不知道大家有沒有問題,我用了不會作existential
: quantification...(e.g., _tr.exit(2);),這個功能應該不需要自己implement吧?
: 不知道有沒有人可以幫我解答一下~
Yes, the prototype for exist() is:
BddNode exist(unsigned l) const;
That means, _tr.exist(2) will return a existentially quantified BDD,
but itself won't get changed (i.e. This is a constant method).
So you should use something like "a = b.exist(2)".
Of course, "_tr = _tr.exist(2)" works fine too,
if that's what you intened to do.

Links booklink

Contact Us: admin [ a t ] ucptt.com