Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions approved/v93k/flow_control.aiv
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ lev2_test5 .tmf
long_test .tmf
long_test1 .tmf
long_test2 .tmf
loop_check .tmf
loop_check_no_var .tmf
nt1 .tmf
nt2 .tmf
nt3 .tmf
Expand Down
34 changes: 2 additions & 32 deletions approved/v93k/referenced.list
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
# Main patterns
another_not_p1_or_p2_test
bitcell_iv_0
bitcell_iv_1
bitcell_iv_2
bitmap_all0
cc_test_0
cc_test_1
cc_test_2
cold_test
cz_test1
cz_test2
erase1
erase2
erase_all
extra_test
force_serial_false_test
force_serial_true_test
ft_only_test1
ft_only_test2
grp1_test1
Expand Down Expand Up @@ -45,36 +34,20 @@ lev2_test5
long_test
long_test1
long_test2
margin_read0_ckbd
margin_read1_all1
margin_read1_ckbd
meas_read_pump
mixed_flag_check
mrd_ckbd
normal_read_ckbd
not_p1_or_p2_test
not_p1_test
loop_check
loop_check_no_var
nt1
nt2
nt3
nt4
outer_test
p1_only_test
p1_or_p2_only_test
pgm
pgm1
pgm_ckbd
por_ins
probe_only_test1
probe_only_test2
program_ckbd
program_ckbd_b0
program_ckbd_b1
program_ckbd_b2
read0
read1
read2
some_func_test
test1
test10
test1n
Expand All @@ -97,8 +70,5 @@ test8
test_3lt5
test_5gt4_and_4gt3
test_5gt4_or_4gt5
test_with_flags
test_with_no_flags
warmish_test
xcvr_fs_vilvih

40 changes: 40 additions & 0 deletions approved/v93k/testflow/mfh.testflow.group/flow_control.tf
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,12 @@ tm_172:
tm_173:
"output" = "None";
"testName" = "Functional";
tm_174:
"output" = "None";
"testName" = "Functional";
tm_175:
"output" = "None";
"testName" = "Functional";
tm_18:
"output" = "None";
"testName" = "Functional";
Expand Down Expand Up @@ -693,6 +699,10 @@ tm_172:
"Functional" = "":"NA":"":"NA":"":"":"";
tm_173:
"Functional" = "":"NA":"":"NA":"":"":"";
tm_174:
"Functional" = "":"NA":"":"NA":"":"":"";
tm_175:
"Functional" = "":"NA":"":"NA":"":"":"";
tm_18:
"Functional" = "":"NA":"":"NA":"":"":"";
tm_19:
Expand Down Expand Up @@ -1044,6 +1054,10 @@ tm_172:
testmethod_class = "ac_tml.AcTest.FunctionalTest";
tm_173:
testmethod_class = "ac_tml.AcTest.FunctionalTest";
tm_174:
testmethod_class = "ac_tml.AcTest.FunctionalTest";
tm_175:
testmethod_class = "ac_tml.AcTest.FunctionalTest";
tm_18:
testmethod_class = "ac_tml.AcTest.FunctionalTest";
tm_19:
Expand Down Expand Up @@ -1481,6 +1495,22 @@ long_test_BEA7F3B:
override_testf = tm_31;
site_control = "parallel:";
site_match = 2;
loop_check_BEA7F3B:
local_flags = output_on_pass, output_on_fail, value_on_pass, value_on_fail, per_pin_on_pass, per_pin_on_fail;
override = 1;
override_seqlbl = "loop_check";
override_test_number = 60001;
override_testf = tm_174;
site_control = "parallel:";
site_match = 2;
loop_check_no_var_BEA7F3B:
local_flags = output_on_pass, output_on_fail, value_on_pass, value_on_fail, per_pin_on_pass, per_pin_on_fail;
override = 1;
override_seqlbl = "loop_check_no_var";
override_test_number = 60002;
override_testf = tm_175;
site_control = "parallel:";
site_match = 2;
nt1_BEA7F3B:
local_flags = output_on_pass, output_on_fail, value_on_pass, value_on_fail, per_pin_on_pass, per_pin_on_fail;
override = 1;
Expand Down Expand Up @@ -3764,6 +3794,16 @@ test_flow
else
{
}
for @index = 0; @index < @loop ; @index = @index + 1; do
test_number_loop_increment = 0
{
run(loop_check_BEA7F3B);
}
for @index = 0; @index < 5 ; @index = @index + 1; do
test_number_loop_increment = 0
{
run(loop_check_no_var_BEA7F3B);
}

}, open,"Flow Control Testing","Flow to exercise the Flow Control API"

Expand Down
2 changes: 2 additions & 0 deletions approved/v93k/vectors/flow_control.pmfl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ lev2_test5.binl.gz
long_test.binl.gz
long_test1.binl.gz
long_test2.binl.gz
loop_check.binl.gz
loop_check_no_var.binl.gz
nt1.binl.gz
nt2.binl.gz
nt3.binl.gz
Expand Down
12 changes: 12 additions & 0 deletions approved/v93k_smt8/OrigenTesters/flows/FLOW_CONTROL.flow
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ flow FLOW_CONTROL {
testName = "Functional";
}

suite loop_check calls ac_tml.AcTest.FunctionalTest {
measurement.pattern = setupRef(OrigenTesters.patterns.loop_check);
measurement.specification = setupRef(OrigenTesters.specs.specs.Nominal);
output = "None";
testName = "Functional";
}

suite nt1 calls ac_tml.AcTest.FunctionalTest {
measurement.pattern = setupRef(OrigenTesters.patterns.nt1);
measurement.specification = setupRef(OrigenTesters.specs.specs.Nominal);
Expand Down Expand Up @@ -1751,5 +1758,10 @@ flow FLOW_CONTROL {
else
{
}
for @index = 0; @index < @loop ; @index = @index + 1; do
test_number_loop_increment = 0
{
loop_check.execute();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,4 @@ SMALL.test2,test2,54110,test2,0,0,,
test_3lt5,test_3lt5,55000,test_3lt5,0,0,,
test_5gt4_or_4gt5,test_5gt4_or_4gt5,55002,test_5gt4_or_4gt5,0,0,,
test_5gt4_and_4gt3,test_5gt4_and_4gt3,55004,test_5gt4_and_4gt3,0,0,,
loop_check,loop_check,0,loop_check,0,0,,
16 changes: 16 additions & 0 deletions lib/origen_testers/smartest_based_tester/base/flow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,22 @@ def capture_lines
@lines_buffer.pop
end

def on_loop(node)
loop_start = node.children[0]
loop_end = node.children[1]
loop_inc = node.children[2]
loop_flag = node.children[3] if node.children[3].is_a?(String)
loop_end_str = loop_flag.nil? ? loop_end.to_s : "@#{loop_flag}"
line "for @index = 0; @index < #{loop_end_str} ; @index = @index + #{loop_inc}; do"
line 'test_number_loop_increment = 0'
line '{'
@indent += 1
children_start_index = loop_flag.nil? ? 3 : 4
process_all(node.children[children_start_index..-1])
@indent -= 1
line '}'
end

def on_test(node)
test_suite = node.find(:object).to_a[0]
if test_suite.is_a?(String)
Expand Down
9 changes: 9 additions & 0 deletions program/flow_control.rb
Original file line number Diff line number Diff line change
Expand Up @@ -521,4 +521,13 @@
func :read1, id: :ta5, bin: 10, number: 60000
func :erase1, if_all_sites_passed: :ta5, bin: 12, number: 60010
end

if tester.v93k?
loop from: 1, to: 5, step: 1, var: "loop" do
func :loop_check, test_number: 60001
end
loop from: 1, to: 5, step: 1 do
func :loop_check_no_var, test_number: 60002
end
end
end
30 changes: 30 additions & 0 deletions templates/origen_guides/program/flowapi.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -338,5 +338,35 @@ group :my_other_group, comment: "This is the other group" do
end
~~~

#### Looping

A loop API exists, though it currently only generates content for the V93K platform.

~~~ruby
loop from: 1, to: 5, step: 1, var: "loop" do
func :loop_check, test_number: 60001
end
loop from: 1, to: 5, step: 1 do
func :loop_check_no_var, test_number: 60002
end
~~~

If the optional `var` option is passed it will replace the `to` option. The user is expected to handle setting the flow variable to a proper value.

~~~text
for @index = 0; @index < @loop ; @index = @index + 1; do
test_number_loop_increment = 0
{
run(loop_check_BEA7F3B);
}
for @index = 0; @index < 5 ; @index = @index + 1; do
test_number_loop_increment = 0
{
run(loop_check_no_var_BEA7F3B);
}
~~~




% end