作者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