% render "layouts/guides.html" do A flow, meaning a sequence of patterns, can be simulated in two ways - by supplying a list of patterns or by configuring a test program generator flow to support simulation. #### Simulating a Pattern List If you were to run this: ~~~text origen g my_pat_1 my_pat_2 -e environment/sim.rb ~~~ then it would run the two patterns as two independent simulations, creating two waveforms named after each pattern. They can be combined into a single simulation by adding a `--flow` option: ~~~text origen g my_pat_1 my_pat_2 -e environment/sim.rb --flow my_flow ~~~ This will simulate the given patterns back-back and dump them to a waveform named after the flow option, in this case "my_flow". The list of patterns can also be supplied via a list file: ~~~text origen g list/regression.list -e environment/sim.rb --flow regression ~~~ #### Simulating a Test Program Flow To simulate a pattern sequence defined by a [test program flow](<%= path "guides/program/flows" %>), it is necessary to [setup your interface](<%= path "guides/program/interface" %>) to support the simulation tester driver as if it were another ATE. The simulation tester driver has no concept of test methods, suites or instances, so its interface setup is very simple - once you have the pattern name simply pass that to the `test` method: ~~~ruby # Example interface method def func(name, options = {}) # Resolve the pattern name as required pattern = extract_pattern_name(name, options) if tester.sim? test(pattern, options) elsif tester.v93k? t = test_suites.add(:vreg_func) t.test_method = test_methods.origen.functional_test t.pattern = pattern test(t, options) else fail "The test program interface has not been setup for #{tester.class}!" end end ~~~ To simulate the flow, run the program generator as normal but with the simulation environment selected: ~~~text origen p program/my_flow.rb -e environment/sim.rb ~~~ The generated wave will be named after the flow, _my_flow_ in this example. % end