看板 EE_DSnP 關於我們 聯絡資訊
: : 這個不用, 因為 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
eorlthexiv:再問一下,沒有使用到的PI,CIRP -n可以不用理它? 05/29 15:27
Trumen:可以假設每個gate都有用到 (PDF p.2 第二段最後一句) 05/30 23:45