Origen-SDK / origen_testers

Origen drivers/APIs for ATE tester platforms
http://origen-sdk.org/testers
MIT License
11 stars 23 forks source link

Temp/pk branch #204

Closed JamesCreamer closed 6 months ago

JamesCreamer commented 6 months ago

Problem Statement

SMT7 and SMT8 had multiple environment specific use cases that could be done on the tester but not through origen. To address those, shared API were updated and added to address the use cases. Below I have listed out and detailed the changes and why they are each needed.

Change List

Flow Flag Manipulation (unset_flag, add_flag)

unset_flag is used for manually set flags the user defines. Initially origen core intended set_flag to be called for auto-generated flags only. The tester still allows flow flags to be unset after conditions are met. The API was needed.

add_flag is used for custom ways of setting flags like custom test method library functionality. Origen does not understand that the flags would be needed in that flow's context since there is not direct call to those flags. Add_flag will still add the variables to the infrastructure use cases without adding an flow baggage.

regression updates: smt7_flow smt7_variable_file smt8_flow

functional updates: extract_flow_vars flow.rb

Flow Loop Handling

loop only supported integer SMT7 use cases. Updates help to support SMT8 use cases, documentation and variable passing for both SMT7 and SMT8. There are environment restrictions for the use cases. I added origen fail statements based on those conditions.

SMT8 Only

Auxiliary Flow Calls

add_auxiliary_flow is used to call SMT8 defined auxiliary flows like POWERDOWN without re-defining multiple test suites. This is applicable for all auxiliary flows (PREBIND, PRERUN, PRESTART, POWERUP, POWERDOWN, POSTRUN, PRESTOP). The most likely use cases will be POWERUP and POWERDOWN. No flow variables are allowed to be used for these calls. This is also not recommended or intended for other sub-flows the user defines since the flow variables are not handled.

functional_updates: template.flow.erb flow.rb

Flow Variable Grouping

Controlled through environment variable flow_variable_grouping. If this is true, then a flow comment and brace block will be added to the flow for fast visual collapsing.

functional_updates: flow.rb

Print All Parameters (even if they match defaults)

Controlled through environment variable print_all_parms. If this is true, then all parameters will be printed regardless if they match the loaded parameter defaults.

functional_updates: test_suite.rb

Complex Data Structure Passing (List/Hash)

SMT8 supports List and Hash passing. This support is needed for List, List, and Hashes. Hashes have been documented with regression testing along with nested hashes.

regression_updates: custom_test_interface.rb

functional updates: test_suites.rb test_method.rb

Prefix handling

SMT8 has automated prefixes for operatingSequence, specification, etc. There was a default, but I added in an overwrite capability to customize these values.

functional updates: test_suites.rb

Flow namespace overwrite

I added in an ability to overwrite the flow namespace if the Origen generated one happens to be incorrect.

functional_updates: generator.rb

Limit File Creation

Customize the tester environment limit file creation based on the environment variable settings. create_limits_file

functional_updates: limits_workbook.rb

Bypass flag

SMT7 enabled the flag properly based on the test options. SMT8 sets it as a flag as well but needs a parameter added to the test suite for it to be properly applied.

functional updates: test_suites.rb

Conditional type changes

SMT7 used 'and'/'or' for conditionals. SMT8 needs java coding conditionals like &&/||.

functional updates: flow.rb

pderouen commented 6 months ago

Wow, quite a large change. Would it be better to review in a call?

priyavadan commented 6 months ago

Wow, quite a large change. Would it be better to review in a call?

perhaps :)

point to note, we added a new target to the regression tests, which now has new files for that target into the .approved folder.

I believe the actual changes to code are limited to a few files. We made sure that default behavior did not change for existing feature set, added new tests for the features we enabled.

If a call is needed, I can definitely arrange (but it might be challenging given people's schedules). Instead should we take the next week or so to do the review and re-convene then to see if a meeting is still required ? @pderouen

pderouen commented 6 months ago

That seems fine to me @priyavadan

priyavadan commented 6 months ago

@Origen-SDK/o2-core-developers any concerns with the PR that you can think of?

pderouen commented 6 months ago

LGTM, nice work

If @rlaj is happy, I'm happy.

priyavadan commented 6 months ago

will wait till later today to merge this PR

Thanks @rlaj @pderouen for the review!