支持测试程序流程迭代

时间:2017-08-31 21:16:01

标签: origen-sdk

我打算在我的测试程序中迭代$ dut模型的许多属性和各种测试条件。我正在测试一个非常简单的流程,并且我收到有关重复测试ID的错误。

Flow.create do |options|

  [:pmin, :pmax].each do |cond|
    bist :mbist, ip: :cpu, testmode: :hr, cond: cond, id: :hr
  end

end

这是错误:

[ERROR]      64.198[0.193]   || Test ID hr_965EA18 is defined more than once in flow ws1:
[ERROR]      64.199[0.001]   ||   /users/user/origen/ppekit/program/components/_bist.rb:4
[ERROR]      64.199[0.000]   ||   /users/user/origen/ppekit/program/components/_bist.rb:4

我想我希望这可行,但是当我查看test program generator docs时,我没有看到循环的例子,只有条件。我确实看到了re-useable flow snippets的概念,但这似乎最适合于可重复的测试序列,而不仅仅是迭代ad-hoc。

问候

1 个答案:

答案 0 :(得分:0)

您的代码扩展为:

bist :mbist, ip: :cpu, testmode: :hr, cond: :pmin, id: :hr
bist :mbist, ip: :cpu, testmode: :hr, cond: :pmax, id: :hr

这意味着您有两个ID :hr的测试,由于ID必须是唯一的,因此不允许这样做。

要么考虑你是否真的需要这个ID,除非你在a conditional execution relationship with another test中提到这个测试,否则你可能不会这样做,或者更新你的代码以生成唯一的ID:

[:pmin, :pmax].each do |cond|
  bist :mbist, ip: :cpu, testmode: :hr, cond: cond, id: "hr_#{cond}"
end