作者ric2k1 (Ric)
看板EE_DSnP
标题Re: [问题] cirGateV
时间Sun Jan 15 16:10:11 2012
※ 引述《toshiba011 ()》之铭言:
: 标题: Re: [问题] cirGateV
: 时间: Sun Jan 15 12:31:29 2012
:
: : 推 ric2k1:CirGateV = CirGate* + invPhase + floatPhase 01/15 02:34
:
: 抱歉再问一个问题
:
: 在replace(CirGAte*, bool inv)的时候
:
: 里面只有(size_t)g + (inv^isInv())
:
: 那floatPhase在哪里呢???
:
: 谢谢
:
: --
:
※ 发信站: 批踢踢实业坊(ptt.cc)
: ◆ From: 140.112.4.192
: 推 anfranion:GateV里头不也有个isFloat(?) 01/15 12:49
: 老师的意思应该是 设定的时候会顺便把float phase传进去
:
: 但是replace并没有处理到
嗯,我是把 float 另外再设的,可能是因为我懒得传那麽多的参数给 replace,
也可能是常常不需要设定 float. 所以,我的 code 是像这样:
_in1.replace(n, inv); if (n->isUndef()) _in1.setFloat();
当然,如果你觉得应该把 float flag 一起传进去,please go ahead to modify it.
:
: 还有一个问题
:
: 如果有一个cirGate* aig, fanin0本来是一个aig
:
: 现在有一个CirGate* g 他是const 0
:
: 以下步骤後:
:
: aig->getIn0().replace(g, inv);
:
: 那麽现在aig->getIn0Gate()->isConst()会自动改成true吗?
:
会啊! 因为 g 的本身是一个 CirConstGate, 所以 isConst() 当然会 return true.
: aig->getIn0Gate()->getGid() == g->getGid()吗
:
这个应该也会成立吧!
: 我试过好像步行欸...
用 debugger 来 "p* aig" 以及 "p* aig->getIn0Gate()" 看看,
是不是有正确的接好呢?
: ※ 编辑: toshiba011 来自: 140.112.4.192 (01/15 13:35)
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.36.61.155
1F:推 toshiba011:OK 谢谢RIC! 01/15 16:12