【Tessent】【DftSpecification】【1】【IjtagNetwork】Tdr

📅 发布时间:2026/7/17 12:22:37
【Tessent】【DftSpecification】【1】【IjtagNetwork】Tdr TdrOverviewArgumentsExampleUpdate Stage TimingInterfaceDataInPortsArgumentsExamplesDataOutPortsDecodedSignalOverviewA wrapper that specifies the creation and, optionally, the insertion of a TDR inside the IJTAG network.Tdr Wrapper 中包含的内容如下Argumentsid一个只能包含字母、数组和下划线的唯一 id也就是 Tdr 的名称。 IjtagNetwork wrapper 中的每一个 Tdr Wrapper 的 id 不能相同。so_retiming : on | off用来指定 scan_out 信号上是否需要一个 retiming element默认值是 on。如果 so_retiming 为 onTessent 工具在插入 TDR 的时候会在 scan_out 端口插入一个负沿触发的 reg用于 scan chain retiming。parent_instance : instance_name指定 TDR 插入的位置。如果没有指定内容TDR 会被插入到同时包含 DataInPorts、DataOutPorts 和 DecodedSignal 的那个 instances 中。使用该选项将 TDR 放到不同的位置如果将 parent_instance 设置为.TDR 会被强制放在 root module不再依赖其端口的连接关系。如果 TDR Wrapper 中没有指定 DataInPorts 和 DataOutPorts 的连接关系parent_instance 默认为 root module。如果 parent_instance 是一个 repeated module 的 instance直接指定或者是工具推断出的某个默认值Tessent 工具在 Vaildation 阶段会给出一个 wraning然后自动使用uniquify_instances命令来对 instance_name 指定的 instance 进行 uniquify。所谓 uniquify 就是创建一个新的 module只给当前 instance 使用。如果想要在 IjtagNetwork Insertion 的时候不对 repeated module 进行 uniquify可以将 current design 设置为对应的 module在该 module 中插入 IJTAG Network然后在 next level 的时候将其设置为 DesignInstance wrapper。leaf_instance_name : leaf_instance_name指定 TDR 的 leaf instance name.如果没有指定内容默认值是 design_name_design_spec_id_tessent_tdr_tdr_id_inst其中 design_spec_id 是 DftSpecification wrapper 中指定的 idtdr_id 是当前 Tdr 的 id。Tessent 工具在例化 TDR 的时候会检查是否已经有同名的 tdr 存在可以使用set_insertion_option命令来指定 uniquification suffix。Tessent 工具生成的 Tdr 的 module name 为 design_name_design_id_tessent_tdr_id末尾的 id 指的是当前 Tdr 的 id。当 DftSpecification 中的 reuse_modules_when_possible 属性的值是 off 的时候Tessent 工具会为每一个 Tdr Wrapper 创建唯一的 module当其为 on 的时候如果 tdr wrapper 中定义的内容相同工具会复用 TDR module而不是创建一个新的。keep_active_during_scan_test : on | off | auto指定连接到该 TDRs 的所有 nodes 在 Scan Test Mode 都保持 active。length : integer指定移位寄存器的长度。默认情况下移位寄存器的长度足以满足 DataInPorts/count、DataOutPorts/count 或 DecodedSignal/decode_values 中指定的内容。extra_bits_capture_value : 0 | 1 | selfTDRs 位宽中超出指定值部分的值。A property that applies to the upper bits of the TDR when the length is larger than the DataInPorts/count value.The specified values control what the extra shift register bits capture during the capture cycle.reset_value : binary指定 DataOutPorts 和 DecodedSignals 的复位值。Attributes/attribute_name : attribute_valueA data wrapper that defines arbitrary attributes in the TDR ICL module.Example一个 3bit TDR 的内部结构和端口如下图所示其对应的 Spec 文件如下Dftsepcification(MyCore,rtl){IjtagNetwork{HostScanInterface(purple){Tdr(blue){length:3;extra_bits_capture_value:self;DataOutPorts{count:3;port_naming:Dout[%d];output_timing(0):ijtag_scan_selection;output_timing(1):normal;output_timing(2):unlarched;}DataInPorts{count:1;port_naming:Din%d;}DecodedSignal(SigA){decode_values:3bx00;output_timing:ijtag_scan_selection;}DecodedSignal(SigB){decode_values:3bx01;output_timing:normal;}DecodedSignal(SigC){decode_values:3bx1x;output_timing:unlatched;}}}}}如果 Tdr Wrapper 中定义了>Update Stage TimingIJTAG Network 和 IEEE 1149.1 或 IEEE 1500 Network 的结构是十分相似的但是在 IJTAG Network 中 TDR 的输出可以用作部分 Network 的的使能信号。如果 Tdr 的输出数据被用作部分 IJTAG Network 的使能信号enable 或 disable为了避免出现竞争输出端口需要额外增加额外的延时。如下图所示的电路update_en 使能之后S1 在 tck1 的下降沿有效沿到来之后发生变化。如果 Soure Box 中没有 delay stageS1 处的变化并迅速传递到 S3S1 update_enDestination Box 中的 update stage 的时钟有效沿和使能信号同时跳变这个时候就出现了 race。如果 tck1 和 tck2 之间存在很大的 clock skew那么 Destination Box 就不能完成 Update 操作。针对这个问题最直接的解决方法就是 TCK 的 CTS 做的非常细致确保这里不会出现时序问题。Tessent 工具的做法是在 Soure Box 中插入 delay stage让 S3 处的使能信号的持续时间更长。这样一来即使 TCK 的 Clock Skew 很大也不对引起竞争冒险问题确保 Destination Box 能够正确的完成 update 操作。InterfaceA wrapper that provides properties to fully specify the names of the eightclient portsof the TDR.Interface Wrapper 用于定义 IEEE 1687 规定的标准端口的名称其包含的内容如下一般情况下都是使用默认的端口名称如果想要使用其他名称可以做如下定义Interface Wrapper 中的 8 个端口是必须要有的所有 Tdr 都会有这 8 个端口。如下图所示在 Dft Spec 中定义名称为 PERIPLL_CFG1 的 Tdr只指定 32bit 的输入输出端口Tessent 工具最终生成的 Tdr 中也是包含 8 个控制端口的 这些端口的名称使用的是默认名称。定义实现DataInPortsA wrapper that specifies the number (count) of />Argumentscount :integer指定 TDR 上所需要的>Examples示例1定义两个>DftSpecitication(MyCore,rtl){IjtagNetwork{HostScanInterface(purple){Sib(orange){Tdr(orange){DataInPorts{connection(0):u2/top_green/go;connection(1):u2/top_green/done;}}}}}}DataOutPortsA wrapper that specifies the number (count) of>UasgeArgumentsmultiplexing : on | off | auto指定在连接到 pin_name 的时候是否需要添加 mux 。默认值是 auto。当设置为 auto 时如果 pin 没有连接或者连接到一个固定值或者连接到没有扇入 net工具都会插入一个 mux。一旦连接关系中需要插入 mux工具还会自动添加一个额外的 date-out port 来控制 mux 。mux 会被插入到 pin_name 所在的 parent_instance 。Examples指定>DftSpecitication(clk_gen,bottom_up){IjtagNetwork{HostScanInterface(ijtag){Tdr(1){DataOutPorts{connection(5:3):pll/mult[2:0];connection(2:0):pll/div[2:0];port_naming:mux_sel,mult[2:0],div[2:0];}DataInPorts{connection(0):pll/locked;port_naming:locked;}}}}}Multiplexing 没有指定值所以应该是默认是 auto。因为 pll/mult[2:0] 和 pll/div[2:0] 这两个 pins 还有 functional source所以会插入 muxdata-out 端口的第 7 个 bit 命名为 mux_sel 用以控制 mux。DecodedSignalA wrapper that specifies the creation of a decoded signal.Uasgedecode_values 用于指定 TDR 的哪些值可以激活解码信号。Argumentsdecode_values :binary_code, ...指定一个二进制编码列表用于定义 decoded signal 的激活条件。二进制编码的宽度必须和 TDR 一样编码中可以包含 X 值但是保证至少有一个 0 或者 1。遗留问题decoded signal 的输出取决于什么