作者ric2k1 (Ric)
看板EE_DSnP
標題Re: [更正] HW#6
時間Thu May 28 22:23:12 2009
src/Makefile.in
※ 引述《ric2k1 (Ric)》之銘言:
主要是關於 error message 的更正...
※ 引述《ric2k1 (Ric)》之銘言:
※ 引述《ric2k1 (Ric)》之銘言:
1. [3:50pm, 05/25/09] 新增 CIRRead command 之說明, 如黃色字體所顯示.
3.1 Command "CIRRead"
Usage: CIRRead <(string fileName)> [-Replace]
Description: Read the circuit from the file "fileName" and store it in the
global variable (e.g. cirMgr). If the circuit has been read, issue an error
"Error: circuit already exists!!" unless the option "-Replace" is issued. In
such case, delete the original circuit, create a new one, and print out the
message "Note: original circuit is replaced...".
Note that the original
circuit will be deleted even if the new circuit construction fails. No
warning or error message is needed if "-Replace" is used in the first
construction of the circuit.
Example:
cir> cirread test.cir // read in the circuit description file "test.cir"
cir> cirr -rep kk.cir // read in the circuit description file "kk.cir"
// and replace the original circuit
(Word & PDF file will be updated later)
// 請見底下的更新版本
2. [9:20pm, 05/26/09] Circuit parsing error message update
The following items are added as guarded error message:
Line 2: PI "G3" is redefined!!
Line 2: PI "G6" is defined but not used!!
Line 3: PO "G23" is undefined!!
Line 52: Extra input for INV gate "19GAT_B"!!
Line 57: Missing name for OR gate!!
Modified error message:
Line 49: Missing input for AND gate "19GAT"!!
Please refer to the updated .doc/.pdf file for details.
3. [9:20pm, 05/26/09] Update on Section 2 "Circuit Description File"
The ".cir", ".input", ".output", gate descriptions, and ".end" sections
are strictly in the above order
, and you do not need check if any of
them is missing.
(.doc and .pdf files have been updated)
4. [9:00pm, 05/28/09] Error message updated
基於語意 & implementation 上的考量, error message 更新如下.
Cannot open design "c17.kk"!!
// 不變
Line 1: Missing circuit name!!
// 新增, 如果 .cir 後面沒有接名字, 就直接接 .input, 應該要 output error
Line 2: Gate "G3" is redefined!!
// 原先: Line 2: PI "G3" is redefined!!
// 因為一個 gate 被 redefined, 應該 show 的是被 redefined 的那一行,
// 但是 gate 的 type 又是原先的那行 define 的, 所以印起來會有點奇怪,
// 所以將 type 去掉.
// 例如說:
// (line 12) and 16GAT 2GAT
// (line 13) or 16GAT 8GAT
// 就直接 output ---
// Line 13: Gate "16GAT" is redefined!!
// 就好了!
//
// 另外, 注意: 對於 PO gate redefined 的 error, 要 output:
// Line 5: Gate "23GAT$PO" is redefined!!
// 或是:
// Line 5: Gate "23GAT" is redefined!!
// 都可以, depend on your implementation
Line 2: PI "G6" is defined but not used!!
// 這個 rule 去掉.
// 原先本來是想說如果有一個 PI 沒有接到任何人的話, 就 output 這個 message,
// 但是問題是如果 circuit parse 的時候有文法錯誤, 或是連線不合理,
// circuit netlist 是不完整的, 這樣子其實並不容易定義什麼樣的 PI 是
// 沒有接到別人, 也不容易檢查.
// 所以乾脆去掉這個 rule.
Line 3: PO "G23" is undefined!!
// 這個不變, 就是檢查一下被定義成 PO 的 signal 是否在 gate def section
// 是否有被定義成其他的 gate
Line 12: Undefined gate "15GAT" in the circuit!!
// 這個不變, 就是檢查一下是否有 signal 被宣告成別人的 fanin,
// 但他自己並沒有被定義成任何 gate type
Line 38: Gate "16GAT" is redefined!!
// 這個不變. 同上, 不用 specify gate type.
//
// 注意: 昨天的 ref program "Gate" 不小心寫成 "gate" 了...
Line 49: Missing input for AND gate "19GAT"!!
Line 52: Extra input for INV gate "19GAT_B"!!
// 這兩個不變, 昨天上傳的 ref program 有誤, 已更正
Line 57: Missing gate name!!
// 原先: Line 57: Missing name for OR gate!!
// 此 error 發生的原因就是 有 gate type 的 keyword, 但是下面接的
// 又是另外一個 keyword, 而非可以作為 gate name 的 string.
// 不過由於 yacc grammar rule 的關係, 所以我決定不 report gate type,
// 請大家配合一下!
(ref programs, .doc/.pdf files, and tests/errors/C17-err1.cir are NOW
being uploaded)
5. [10:20pm, 05/28/09] src/Makefile.in
CFLAGS = -O3 -Wall -DTA_KB_SETTING $(PKGFLAG)
CFLAGS = -g -Wall -DTA_KB_SETTING $(PKGFLAG)
原先忘記放 "-DTA_KB_SETTING"
而且將 -O3 放在下面... (這樣子你們將無法 debug)
hw6.tgz 以上傳完畢!!!!!!!!!!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.21.241
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.224.47.190
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.224.47.190
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.224.47.190