Origen-SDK / origen_testers

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

[Ultraflex] Request for supporting calling of subflows in the flow table #45

Open jiangliu23 opened 7 years ago

jiangliu23 commented 7 years ago

Ultraflex interface currently does not support the 'call' statement in the flow table which is a useful feature for handling subflows, it would be good to see this feature enabled for Ultraflex at some point.

ginty commented 7 years ago

What's the benefit of using call to a subroutine vs. in-lining in a generated flow? Does it make the flow more readable or something?

Generally I don't like the idea of creating a new method like flow.call since it would be a very UFlex specific API and we are really trying to move away from all such things in the program generator.

However, I'm definitely not opposed to improving the UFlex generator output to make it create something that is more native looking, we just need more information about what/why you are trying to achieve by using call. Once we get that we can think about whether we need to provide a specific control for that to user, or whether we just universally make use of call in the generated output.

jiangliu23 commented 7 years ago

The advantage of doing subflow call can be experienced in the following scenarios:

  1. when test module A needs to insert test module B in the middle somewhere, both test modules are developed and maintained by two different parties and need to be able independently imported and debugged separately. i.e. anyone should be able to only import module A or only module B or both without encountering errors.
  2. When constructing flows which get repeatedly used throughout the flow, you can create a subflow and then just call it rather than generating many redundant lines in the main flow which do the same thing. things like your utility or engineering or CZ flows can all essentially be generated as subflows, anyone can just make a call to these subflows easily in their main flow. makes the test flow much more modular and easier to maintain in general.

There are a lot of useful flow control commands in Ultraflex which i understand that not everyone needs to take advantage of or has very little reason to, however there are always good use cases for these methods, to minimize the work load on the core team for requests like this, perhaps the testers Gem can provide an easy way to allow users to create their own custom flow op-codes (if they are not supported natively by the tester plugin?)

thanks.

ginty commented 7 years ago

Would use of render as discussed here provide what you want re. calling sub flows?

https://stackoverflow.com/questions/46243808/does-origen-support-93k-multi-bin-feature

jiangliu23 commented 7 years ago

Much appreciate your help in adding in the render feature, it seems to be able to provide the functionality that's needed for calling sub flows

ginty commented 7 years ago

I'll leave this ticket open until we get a more permanent solution in place, I think we should implement an API like this:

flow.call_sub_flow "some_sub_flow"

For testers which support calling a sub-flow as a subroutine, like the UFlex, then it would generate the required flow line to make the call.

On testers which don't support that, like the J750 and V93K, then it would split the flow into two sections at that point. The top-level flow integrator could then insert the two sections on either side of the flow to be called in the test program.

This is conceptually very similar with how the tester.handshake API is handled for patterns.