作者ric2k1 (Ric)
看板EE_DSnP
标题[情报] 在 gate 里头取的 CirMgr 的资料
时间Fri Jan 14 00:36:29 2011
有人在问..
> 我现在写完parser的部份,并建立circuit(希望建立正确),卡在如何作DFS上
> 我implement的方法为使用_totGateList[]储存所有gate,
> 再分别以_piList[],_poList[],_aigList[]纪录每个gate在_totGateList的位置
>
> 讲义上做DFS的方式是用Node* recursively呼叫DFS,
> 但我每个gate储存input的方式也是用unsigned来储存,因此不能以
> _in0.DFS()的方法呼叫
> 另外也不能以_totGateList[_in0]的方法呼叫DFS(),
> 因为DFS()是定义在CirGate.h里,无法存取_totGateList[]
> 试问这种情况要怎麽做DFS()?
在 cirMgr.cpp 里头有一个 CirmMgr *cirMgr 的 global variable,
它在 CIRREAD 里头被 allocate, 你应该可以在 cirGate.cpp 里头透过他
去存取 totGateList[] 等 CirMgr 的 data members.
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.36.54.188