作者ric2k1 (Ric)
看板EE_DSnP
标题Re: [问题] Simulation Pattern File
时间Sun Jan 16 13:08:40 2011
※ 引述《stimim (qqaa)》之铭言:
: 请问一下,Spec 上说:
: Each line represents an input pattern, where its string length should
这句话的意思是说 spec 上面那个例子的每行 "represents an input pattern",
并没有说不能有空行。
总而言之,pattern file 的 format 与 C/C++ 一样都不用考虑 white space or
new line. 唯三的限制是:
1. 同一 pattern 的长度必须等於 number of PIs.
2. 同一 pattern 里头 PI assignments 之间不能有 space.
3. Patterns 只能由 0/1 组成。
: match the number of circuit inputs. The patterns, of course, should
: contain only '0' and '1' and no space character is allowed between
: the input assignments in a pattern.
: 感觉起来好像:
: 1. 不能有空白行 (Each line represents an input pattern)
: 2. 每一行的长度一定等於 PI 的数量 (string length matchs
: the number of circuit inputs)
: 3. 每一行一定只有 '0' 或 '1' (因为 2.)
: 可是,ref prog好像是用类似 "cin >> string_var" 的方式,乎略了换行和空白
: Ex1: // #PI = 1
: --------
: 1 1
: --------
: ref prog: No error
: my prog: Pattern(1 1) length(3) does not match
: Ex2:
: --------
: 1
: --------
: ref prog: No error
: my prog: Pattern() length(0) does not match
: Ex3
: --------
: 1
: --------
: ref prog: No error
: my prog: Pattern( 1) length(2) does not match
: 可以请问一下 Pattern File 的详细格式吗?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.36.62.203