Procedure/Macro中的数据替换,主要是说WFC %和#。
%是一个字符替换,主要是常量,但是我没有看到例子。
#是多个字符替换
在替换的时候,有补齐(padding)。
下面这个例子:
SignalGroups {
sg_in=’si1+si2+si3’ {ScanIn;}
sg_ou=’so1+so2+so3’ {ScanOut;}
sg =’sg_in+sg_ou’;
}
// the scan BODY:
all_scans { // procedure or macro
// this defines the default pad state for all signals unless overridden by another state before a ’#’
C { sg = PPPPPP; } #初始化
V { sg = #00##X; } #shift之前的init A
Shift { v1: V {sg_in=#; sg_ou=#; } } B
V { sg = ##0#XX; } #shift之后的处理 C
}
// the scan INVOCATION:
all_scans { si1=111; si2=111; si3=111; so1=HHHHH; so2=HHH; so3=HHH;}
解释如下: