作者ric2k1 (Ric)
看板EE_DSnP
标题Re: [问题] ref program
时间Fri May 29 01:34:54 2009
: : 这个不用, 因为 16GAT 是 redefined, 所以这行本身就 illegal...
: 但是如果按照相同的逻辑,Line 10不是本身也illegal吗,何必再去管KK是什麽...
This really depends on your implementation...
To me---
Line 10: the inverter will be created since the gate name is legal. It then
figures out that it has an extra input, so it will report the extra
input.
Line 13: (or 16GAT 8GAT) Since 16GAT is a dupicated declaration, this gate
will NOT be generated. Therefore, I don't check for its fanins.
: 另外error message会说第12行有Missing input for AND gate
: 第13行16GAT redefined而且也有Missing input for AND gate
的确, 第13行的 missing input message 也是不必要的, 我因为忘记去判断一个
null pointer, 所以多了这个 error message, 已修正 again!
(hw6.tgz 偷偷更新...)
: 同样按照这个逻辑,第13行本身就illegal了,还去说他有Missing input感觉怪怪的...
嗯
: 另外假如我在C17-err1.cir的第10行下面多写一行,变成:
: 10| inv 11GAT_B 11GAT KK
: 11| QQ
: 这样的error message会说第11行有Extra input,但是就不说第10行有Extra input了
: 这样似乎不太直观
这个上一封有回过了... 我用 yacc 写的确是有点难将 error report 在 第 11 行...
: 所以...我可以用自己想要的方式写吗...
就尽量吧!
我知道 parser 会因为 parse 的 algorithm 不同而抓到不同的 compile error,
所以这题大家就尽量吧, 原则上我们测试时会用 single or fewer errors 的 design
来测试大家有没有抓到 error. 至於抓到什麽 error, 如果是因为 implementation
不同而异, 只要合理 (i.e. report 合理的 error), 我们都会给分的!
: 顺便问一下,xor可以有超过两个input?
可以!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.224.47.190
1F:推 eorlthexiv:再问一下,没有使用到的PI,CIRP -n可以不用理它? 05/29 15:27
2F:推 Trumen:可以假设每个gate都有用到 (PDF p.2 第二段最後一句) 05/30 23:45