rchitect-of-info
rchitect-of-info

Reputation: 1586

test_ids gem allow for bin grouping based on test metadata?

Is there a way for the test_ids gem to group tests such that the same softbin gets assigned? For example, here are 3 tests passed in the flow file:

func :test1, speed: 1000, vdd: :vmin
func :test2, speed: 1200, vdd: :vmin
func :test3, speed: 1000, vdd: :vmax

Would like to be able to tell test_ids gem to group by :vdd and get the following softbins assigned (assume the range is 200-299):

200, func_vmin
201, func_vmax

If I passed speed as the grouping arg I would get the following softbins:

200, func_1000
201, func_1200

The examples shown above only pass one piece of metadata but the ask would be that any combination of test metadata could be used to create the softbin group name.

thx

Upvotes: 2

Views: 30

Answers (1)

Ginty
Ginty

Reputation: 3501

With no special options, the test IDs plugin will use the test name as a unique ID. In that case, tests with different names will be assigned different test numbers, bins and softbins, while tests with the same name will use the same numbers.

Sometimes, like in this case, it is desired for differently named tests to share all or some of their number allocations, and there are a few options available to control this.

Firstly, you can supply a test_id: option, this explicitly defines the ID that should be used for the test when assigning numbers, now your tests will all have the same test numbers, bins and softbins:

func :test1, speed: 1000, vdd: :vmin, test_id: :t1
func :test2, speed: 1200, vdd: :vmin, test_id: :t1
func :test3, speed: 1000, vdd: :vmax, test_id: :t1

This can be further fine-tuned by supplying number:, bin: and/or softbin: options with symbol values and these will be used as the test ID when assigning that specific number type.

For example, this will assign the softbin as you want based on vdd:

func :test1, speed: 1000, vdd: :vmin, softbin: :func_vmin
func :test2, speed: 1200, vdd: :vmin, softbin: :func_vmin
func :test3, speed: 1000, vdd: :vmax, softbin: :func_vmax

This is covered in the docs here - https://origen-sdk.org/test_ids/#Multiple_Instances_of_the_Same_Test

Use your test program interface to programatically assign the IDs based on your business rules, for example in your func method:

def func(name, options)
  options[:softbin] = "func_#{options[:vdd] || :nom}".to_sym
  # ...
end

It is recommended to have all of your test handlers like this func method handover to a single method to add the test to the flow - https://origen-sdk.org/origen//guides/program/interface/#Detecting_Changes_in_the_Execution_Context

That would then give you a single place to implement more global rules like using vdd. vs. speed to group by. For example, if you wanted to group by the test type and then speed, you could do something like:

def func(name, options)
  options[:softbin] = "func"
  # ...
  add_to_flow(my_test, options)
end

def add_to_flow(test, options)
  if group_by_speed?
    options[:softbin] = "#{options[:softbin]_#{options[:speed] || 1000}".to_sym
  else
    options[:softbin] = "#{options[:softbin]_#{options[:vdd] || :nom}".to_sym
  end
  # ...
end

Upvotes: 1

Related Questions