Is there an equivalent OR logic based from a Variable value in Origen?

49 views Asked by At

I am working on Verigy 93K test program and I have a logic that I would like to know if there's an equivalent code in Origen.

I am working on Verigy 93K test program and I have this logic (IF condition) that I need to insert in my flow. Basically, I have a variable called 'INSERTION' and this will have different values like 'GCORR', 'VCORR' and others.

I would like to know if there's an equivalent code like this in Origen.

I attached a snapshot, hope that it can help clarify my question more.

In this logic, I would like to check the INSERTION value and if the value is not equal to GCORR or VCORR, the logic should pass, else, fail.

Here is the screenshot: screenshot

2

There are 2 answers

1
nay lin than On

I couldn't find api support on flow control or variable values beyond "if/unless_enable" support which can help check for 1 or zero. One way is to use render.

render 'if @INSERTION != "GCORR|VCORR" then' 
render '{'
    # your code for non-GCORR_VCORR flow    
render "} \n else \n { \n } "
0
Ginty On

This pull-request adds an official API for this.

This example would be implemented as:

whenever_any ne(:INSERTION, 'GCORR'), ne(:INSERTION, 'VCORR') do

  # Your tests in here   

end

That would produce something logically equivalent and which can be re-targeted to other platforms.

If you don't care about that and want to produce exactly as you have it in the above example, then this should work too (where the OR is hard-coded for V93K syntax):

whenever ne(:INSERTION, 'GCORR|VCORR') do

  # Your tests in here   

end

Here is the preliminary documentation of this feature from the above PR - https://github.com/Origen-SDK/origen_testers/blob/66345c9422d9fa6b2577af20110259e45c2bdd26/templates/origen_guides/program/flowapi.md.erb#L71