关于Origen test_ids gem配置与功能的技术咨询
test_ids Gem Questions Hey there! I’ve worked extensively with the Origen test_ids gem, so let’s walk through each of your questions clearly:
1. Can we configure only bins and softbins without specifying test numbers?
Absolutely! The test_ids gem doesn’t mandate test number configurations if your primary focus is binning. You can define your bin/softbin mappings directly in your Origen app’s config files (like config/test_ids.rb) without any test number ties.
A minimal valid config would look like this:
TestIds.configure do |config| # Standard hardbin mappings config.bins = { pass: 1, electrical_fail: 2, functional_fail: 3 } # Product-specific softbin mappings config.softbins = { pass_grade_a: 101, pass_grade_b: 102, rework_eligible: 103 } end
You can reference these bins in your test logic without needing to link them to specific test numbers at all.
2. Can test interfaces query TestId configurations from other objects?
Yes, definitely. The test_ids gem exposes its full configuration via the global TestIds.config object, which is accessible anywhere in your Origen codebase. This means any object—test interfaces, test modules, utility classes, etc.—can pull config values directly.
For example, in a custom test interface class:
class MyCustomTestInterface < Origen::TestInterface def fetch_pass_bin_value # Pull the pass hardbin from the global config TestIds.config.bins[:pass] end def fetch_grade_a_softbin # Pull a specific softbin value TestIds.config.softbins[:pass_grade_a] end end
If you prefer more encapsulated code, you can also pass config references explicitly between objects, but the global TestIds.config is the simplest approach for most use cases.
3. We have many test modules with standardized hardbins but product-specific softbins—can test interfaces query the active module’s binning config?
This is totally doable with a structured runtime setup. Here’s how I’d implement it:
- First, define your global standardized hardbins in the main
config/test_ids.rbfile—this ensures all modules use the same hardbin values. - For each product-specific test module, dynamically override the softbin config when the module is activated. Origen lets you modify
TestIds.configat runtime, so you can swap in product-specific softbins when the module loads. - To let your test interface access the active module’s config, you can either:
- Store a reference to the module’s binning config in a context variable (like
Origen.current_module.binning_config), or - Add a method to your test modules that returns their softbin config, which the interface can call directly.
- Store a reference to the module’s binning config in a context variable (like
Example implementation in a product test module:
class ProductXTestModule < Origen::TestModule def setup # Keep global hardbins, override softbins for this product TestIds.config.softbins = { pass_first_attempt: 201, pass_second_attempt: 202, rework_required: 203 } # Store a reference for the test interface to access Origen.current_module.binning_config = TestIds.config.dup end end
Then in your test interface:
def get_current_softbin(key) # Pull the softbin from the active module's config Origen.current_module.binning_config.softbins[key] end
This way, your interface always uses the softbin config tied to the currently active module, while hardbins stay consistent across all modules.
4. Why does "softbin" have three 'b's in the configuration?
Great question! This is purely an industry naming convention, not a technical requirement.
In semiconductor test, "hardbin" refers to physical binning of parts (e.g., sorting parts into physical trays based on test results), while "softbin" refers to logical binning (e.g., tracking pass/fail sub-categories for reporting). Over time, the triple-'b' spelling became a widely adopted standard in the industry—tools like Origen adopted this convention to align with existing terminology, so developers familiar with semiconductor testing would immediately recognize what it means. There’s no functional reason for the three 'b's—it’s just industry jargon that stuck.
内容的提问来源于stack exchange,提问作者rchitect-of-info

