Commit 3665fc76 authored by Christian Fibich's avatar Christian Fibich Committed by Stefan Tauner
Browse files

Changed resource algorithm for more FIUs (defined now up to 512)

Added possibility to export tests as VHDL package (for simulation)
parent 4855ec48
...@@ -666,23 +666,18 @@ sub _log2 { ...@@ -666,23 +666,18 @@ sub _log2 {
# @param RESET_CYCLES the number of cycles to apply a FIJI-to-DUT reset # @param RESET_CYCLES the number of cycles to apply a FIJI-to-DUT reset
# @param LFSR_WIDTH width of the LFSR used for stuck-open emulation # @param LFSR_WIDTH width of the LFSR used for stuck-open emulation
# @param FIU_NUM the number of FIUs in the configuration # @param FIU_NUM the number of FIUs in the configuration
# @param algo the algorithm to use, can be eiterh "logarithmic" or "polynomial"
# #
# @returns ($registers, $lutsum) # @returns ($registers, $lutsum)
sub _est_resources { sub _est_resources {
my $logger = get_logger(""); my $logger = get_logger("");
my ($FREQUENCY, $BAUD, $TIMER_WIDTH, $RESET_CYCLES, $LFSR_WIDTH, $FIU_NUM, $algo) = @_; my ($FREQUENCY, $BAUD, $TIMER_WIDTH, $RESET_CYCLES, $LFSR_WIDTH, $FIU_NUM) = @_;
# @FIXME where do we put these values? they are likely to change if the VHDL # @FIXME where do we put these values? they are likely to change if the VHDL
# source is changed... # source is changed...
$algo = "logarithmic" if (!defined $algo);
my $registers; my $registers;
my $lutsum;
my $lut6; my $lut6;
my $comb;
$logger->debug("FREQUENCY $FREQUENCY out of range (1000000 - 500000000)") if ($FREQUENCY < 1000000 || $FREQUENCY > 500000000); $logger->debug("FREQUENCY $FREQUENCY out of range (1000000 - 500000000)") if ($FREQUENCY < 1000000 || $FREQUENCY > 500000000);
$logger->debug("BAUD $BAUD out of range (9600 - 3000000)") if ($BAUD < 9600 || $BAUD > 3000000); $logger->debug("BAUD $BAUD out of range (9600 - 3000000)") if ($BAUD < 9600 || $BAUD > 3000000);
...@@ -691,44 +686,23 @@ sub _est_resources { ...@@ -691,44 +686,23 @@ sub _est_resources {
$logger->debug("LFSR_WIDTH $LFSR_WIDTH out of range (16 - 64)") if ($LFSR_WIDTH < 16 || $LFSR_WIDTH > 64); $logger->debug("LFSR_WIDTH $LFSR_WIDTH out of range (16 - 64)") if ($LFSR_WIDTH < 16 || $LFSR_WIDTH > 64);
$logger->debug("FIU_NUM $FIU_NUM out of range (1 - 64)") if ($FIU_NUM < 1 || $FIU_NUM > 64); $logger->debug("FIU_NUM $FIU_NUM out of range (1 - 64)") if ($FIU_NUM < 1 || $FIU_NUM > 64);
if ($algo eq "logarithmic") { $registers = 8769408455.04;
$registers = 105.90215234; $registers += (3.16525787254e-08)*($FREQUENCY) + (-8063276676.79)*(2**(-1.60957863771e-17 * $FREQUENCY));
$registers += (-8.78501935753e-10) * ($FREQUENCY) + (2.02400278472) * (_log2($FREQUENCY)); $registers += (0.000329011902135)*($BAUD) + (-705457194.107)*(2**(7.38032560255e-13 * $BAUD));
$registers += (-1.92362445319e-08) * ($BAUD) + (-1.99903895447) * (_log2($BAUD)); $registers += (86.8258719199)*($TIMER_WIDTH) + (-424084.540754)*(2**(0.000218517717305 * $TIMER_WIDTH));
$registers += (25.294652022) * ($TIMER_WIDTH) + (-3.6942823707) * (_log2($TIMER_WIDTH)); $registers += (5.02154556118)*($RESET_CYCLES) + (51167.4447102)*(2**(-0.000135580209031 * $RESET_CYCLES));
$registers += (-0.0388887762348) * ($RESET_CYCLES) + (1.12647034117) * (_log2($RESET_CYCLES)); $registers += (-5.30893252274)*($LFSR_WIDTH) + (-301970.077109)*(2**(-2.99010866996e-05 * $LFSR_WIDTH));
$registers += (1.0012871074) * ($LFSR_WIDTH) + (-0.035302419887) * (_log2($LFSR_WIDTH)); $registers += (13.746880792)*($FIU_NUM) + (437.305954808)*(2**(-0.00583539664462 * $FIU_NUM));
$registers += (13.0019033469) * ($FIU_NUM) + (-1.06808285072) * (_log2($FIU_NUM));
$lut6 = -1591399138.51;
$lutsum = 141.184641269; $lut6 += (5.65349933334e-06)*($FREQUENCY) + (-245548261.879)*(2**(3.26830064347e-14 * $FREQUENCY));
$lutsum += (5.14383788335e-09) * ($FREQUENCY) + (4.44319121639) * (_log2($FREQUENCY)); $lut6 += (-0.0602788840594)*($BAUD) + (1868596655.23)*(2**(4.65257746085e-11 * $BAUD));
$lutsum += (8.15160754702e-07) * ($BAUD) + (-4.96956691254) * (_log2($BAUD)); $lut6 += (9.04974779295)*($TIMER_WIDTH) + (-123738.805411)*(2**(7.77721022021e-07 * $TIMER_WIDTH));
$lutsum += (21.280632646) * ($TIMER_WIDTH) + (-7.40399315196) * (_log2($TIMER_WIDTH)); $lut6 += (0.156780025973)*($RESET_CYCLES) + (-176988.018256)*(2**(1e-08 * $RESET_CYCLES));
$lutsum += (0.0181923149046) * ($RESET_CYCLES) + (1.33545547133) * (_log2($RESET_CYCLES)); $lut6 += (-1.88257966999)*($LFSR_WIDTH) + (-31351130.663)*(2**(-8.63995764468e-08 * $LFSR_WIDTH));
$lutsum += (0.0264092868862) * ($LFSR_WIDTH) + (-0.817645982805) * (_log2($LFSR_WIDTH)); $lut6 += (3.95693187928)*($FIU_NUM) + (2718.76465806)*(2**(-0.000895867386597 * $FIU_NUM));
$lutsum += (3.88874581602) * ($FIU_NUM) + (0.262418360097) * (_log2($FIU_NUM));
return ($registers, $lut6);
} elsif ($algo eq "polynomial") {
$registers = -2010875.59555;
$registers += (2.76229402251e-07) * ($FREQUENCY) + (-1.99515157117e-15) * ($FREQUENCY**2) + (3.00590523596e-24) * ($FREQUENCY**3);
$registers += (-4.12206137854) * ($BAUD) + (3.43014697591e-05) * ($BAUD**2) + (-1.09771659281e-11) * ($BAUD**3);
$registers += (19.1505478618) * ($TIMER_WIDTH) + (0.968580877998) * ($TIMER_WIDTH**2) + (-0.0572727376031) * ($TIMER_WIDTH**3);
$registers += (2639374.42117) * ($RESET_CYCLES) + (-659843.417883) * ($RESET_CYCLES**2) + (31421.1133492) * ($RESET_CYCLES**3);
$registers += (3990.13449895) * ($LFSR_WIDTH) + (-124.660493304) * ($LFSR_WIDTH**2) + (1.11304032394) * ($LFSR_WIDTH**3);
$registers += (11.9791223372) * ($FIU_NUM) + (0.0532451990358) * ($FIU_NUM**2) + (-0.000610665213464) * ($FIU_NUM**3);
$lutsum = 94081.448429;
$lutsum += (6.84901011695e-07) * ($FREQUENCY) + (-5.31630997207e-15) * ($FREQUENCY**2) + (8.18999405393e-24) * ($FREQUENCY**3);
$lutsum += (2.76529833194) * ($BAUD) + (-2.30130317053e-05) * ($BAUD**2) + (7.36465871249e-12) * ($BAUD**3);
$lutsum += (-1.31145039083) * ($TIMER_WIDTH) + (4.78626536988) * ($TIMER_WIDTH**2) + (-0.330321432416) * ($TIMER_WIDTH**3);
$lutsum += (-122105.518664) * ($RESET_CYCLES) + (30526.6179134) * ($RESET_CYCLES**2) + (-1453.65059187) * ($RESET_CYCLES**3);
$lutsum += (-2766.64987134) * ($LFSR_WIDTH) + (86.4567706424) * ($LFSR_WIDTH**2) + (-0.771930699286) * ($LFSR_WIDTH**3);
$lutsum += (3.54441195947) * ($FIU_NUM) + (0.031558519242) * ($FIU_NUM**2) + (-0.000405853019244) * ($FIU_NUM**3);
}
return ($registers, $lutsum);
} }
## @function public estimate_resources ($settings_ref) ## @function public estimate_resources ($settings_ref)
......
...@@ -694,6 +694,112 @@ sub _sanitize_design { ...@@ -694,6 +694,112 @@ sub _sanitize_design {
return $consts_ref; return $consts_ref;
} }
sub export_as_vhd_pkg {
my ($self, $vhd_file_name, $global_settings_ref) = @_;
my $durations = "";
my $faults = "";
my $fius = "";
my $msg;
my $tests = "";
open(my $vfd, ">", $vhd_file_name);
if (!defined $vfd) {
$msg = "Could not open file $vhd_file_name for writing: $!";
return $msg;
}
my $time = localtime;
for (my $ci = 1 ; $ci <= $global_settings_ref->{'design'}->{'CFGS_PER_MSG'} ; $ci++) {
$durations .= " duration_t$ci : integer range 0 to 2**c_timer_width*8;\n";
$fius .= " fault_$ci : t_fius range 0 to c_fiu_config'length-1;\n";
}
my $absolute_test_index = 0;
for (my $ti = 0; $ti < $self->{'design'}->{'NUM_TESTS'}; $ti++) {
my $durations = "";
my $fius = "";
#my $tests = "";
my $faults = "";
my $test = @{$self->{'tests'}}[$ti];
my $rst = ($test->{"RESET_DUT_AFTER_CONFIG"}) ? "true" : "false";
for (my $ci = 1 ; $ci <= $global_settings_ref->{'design'}->{'CFGS_PER_MSG'} ; $ci++) {
$faults .= " $ci => (\n";
for (my $fi = 0; $fi < $global_settings_ref->{'design'}->{'FIU_NUM'}; $fi++) {
$faults .= " $fi => ".$test->{"FIU_${fi}_FAULT_${ci}"};
$faults .= "," if $fi != $global_settings_ref->{'design'}->{'FIU_NUM'} - 1;
$faults .= "\n";
}
$faults .= " )";
$durations .= " $ci => ".$test->{"TIMER_VALUE_$ci"};
if ($ci != $global_settings_ref->{'design'}->{'CFGS_PER_MSG'}) {
$durations .= ",\n";
$faults .= ",\n";
}
}
$tests .=<<"END_TEST";
$ti => (
durations => (
$durations
),
faults => (
$faults
),
reset_dut_after_config => $rst,
trigger => $test->{"TRIGGER"}
)
END_TEST
if ($ti != $self->{'design'}->{'NUM_TESTS'}-1) {
$tests .= " ,\n";
}
}
my $vhd_text =<<"END_VHDL";
-- VHDL test package generated $time
library ieee;
use ieee.std_logic_1164.all;
library work;
use work.public_config_pkg.c_fiu_config_length;
use work.public_config_pkg.c_timer_width;
use work.private_config_pkg.c_num_patterns;
package p_fiji_tests is
type t_fiu is (NONE, STUCK_AT_0, STUCK_AT_1, DELAY, SEU, STUCK_OPEN);
type t_trigger is (NONE, INT, EXT);
type t_durations is array (natural range <>) of integer range 0 to 2**c_timer_width*8;
type t_faults is array (natural range <>) of t_fiu;
type t_test is record (
durations : t_durations (1 to c_num_patterns);
faults : t_faults (1 to c_num_patterns);
reset_dut : boolean;
trigger : t_trigger;
);
type t_tests is array (natural range <>) of t_test;
constant c_tests : t_tests := (
$tests
);
end package p_fiji_tests;
END_VHDL
print $vfd $vhd_text;
close($vfd);
return $msg;
}
## @method export_as_sim_script ($sim_file_name, $last_test, $num_repetitions, %$global_settings_ref) ## @method export_as_sim_script ($sim_file_name, $last_test, $num_repetitions, %$global_settings_ref)
# @brief generate a sim script from the current test file depending on repetitions and the last executed test # @brief generate a sim script from the current test file depending on repetitions and the last executed test
# #
...@@ -707,7 +813,7 @@ sub _sanitize_design { ...@@ -707,7 +813,7 @@ sub _sanitize_design {
sub export_as_sim_script { sub export_as_sim_script {
my $logger = get_logger(""); my $logger = get_logger("");
my ($self, $sim_file_name, $last_test, $num_repetitions, $global_settings_ref) = @_; my ($self, $sim_file_name, $last_test, $num_repetitions, $global_settings_ref) = @_;
my $script_text = "# Sim script generated " . localtime . "\nsource random_force.tcl\n"; my $script_text = "# Sim script generated " . localtime . "\n#source random_force.tcl\n";
if (ref($global_settings_ref) ne "FIJI::Settings") { if (ref($global_settings_ref) ne "FIJI::Settings") {
$logger->error("Given settings are not of type FIJI::Settings"); $logger->error("Given settings are not of type FIJI::Settings");
...@@ -727,71 +833,134 @@ sub export_as_sim_script { ...@@ -727,71 +833,134 @@ sub export_as_sim_script {
# @FIXME translate in actual Questasim tcl syntax # @FIXME translate in actual Questasim tcl syntax
if ($global_settings_ref->{'design'}->{'RESET_DUT_OUT_EN'} == 1) { if ($global_settings_ref->{'design'}->{'RESET_DUT_OUT_EN'} == 1) {
$script_text .= "Wait until "; $script_text .=<<"END_RST";
$script_text .= $global_settings_ref->{'design'}->{'RESET_DUT_OUT_NAME'}; set testbench_name \$1;
$script_text .= " is not '"; set start 0;
$script_text .= $global_settings_ref->{'design'}->{'RESET_DUT_IN_ACTIVE'}; set test 0;
$script_text .= "'\n"; set lfsrval $global_settings_ref->{'design'}->{'LFSR_SEED'};
proc modbit signal {
set curval [examine \$signal];
# Always invert signal
if {\$curval == "1"} {
set retstring "0"
} elseif {\$curval == "0"} {
set retstring "1"
} elseif {\$curval == "H"} {
set retstring "L"
} elseif {\$curval == "L"} {
set retstring "H"
}
return \$retstring;
}
proc randbit mask {
return expr {(\$lfsrval & \$mask) > 0};
}
when -label rst {\"\$testbench_name|$global_settings_ref->{'design'}->{'RESET_DUT_OUT_NAME'}\" == not $global_settings_ref->{'design'}->{'RESET_DUT_IN_ACTIVE'} &&
\"\$testbench_name|$global_settings_ref->{'design'}->{'CLOCK_NET'}\" == 1 && \"\$start == 0\"} {
set start 1;
nowhen rst;
}
when -label lfsr {\"\$testbench_name|$global_settings_ref->{'design'}->{'CLOCK_NET'}'event &&
\$testbench_name|$global_settings_ref->{'design'}->{'CLOCK_NET'}' = '1'\" &&
\"\$start == 1\"} {
if ( expr{ \$lfsrval & (1 << ($global_settings_ref->{'design'}->{'LFSR_WIDTH'}-1))} != 0 ) {
set \$lfsrval [expr {((\$lfsrval ^ $global_settings_ref->{'design'}->{'LFSR_POLY'}) << 1) | 1}];
} else {
set \$lfsrval [expr {(\$lfsrval << 1)}];
}
}
END_RST
} else {
$script_text .= "set start 1";
} }
my $absolute_test_index = 0;
for (my $ri = 0 ; $ri <= $num_repetitions ; $ri++) { for (my $ri = 0 ; $ri <= $num_repetitions ; $ri++) {
$script_text .= "#\n# Repetition $ri\n#\n"; $script_text .= "#\n# Repetition $ri\n#\n";
my $start = ($ri == 0) ? 0 : $self->{'design'}->{'REPEAT_OFFSET'}; my $start = ($ri == 0) ? 0 : $self->{'design'}->{'REPEAT_OFFSET'};
my $end = ($ri == $num_repetitions) ? $last_test : ($self->{'design'}->{'NUM_TESTS'} - 1); my $end = ($ri == $num_repetitions) ? $last_test : ($self->{'design'}->{'NUM_TESTS'} - 1);
for (my $ti = $start ; $ti <= $end ; $ti++) { for (my $ti = $start ; $ti <= $end ; $ti++) {
$script_text .= "#\n# Test $ti\n#\n";
my $ie; $script_text .= "\n#\n# Test $ri:$ti\n#\n";
my $act; $script_text .= "when -label test_$absolute_test_index \"\$test = $absolute_test_index".(($absolute_test_index == 0) ? " && \$start = 1" : "")."\" {\n";
if ($absolute_test_index > 0) {
$script_text .= $indent."eval {nowhen test_".($absolute_test_index-1)."}\n";
$script_text .= $indent."eval {nowhen dutrst_".($absolute_test_index-1)."}\n";
$script_text .= $indent."eval {nowhen trigger_".($absolute_test_index-1)."}\n";
$script_text .= $indent."eval {nowhen action_".($absolute_test_index-1)."_1}\n";
$script_text .= $indent."eval {nowhen action_".($absolute_test_index-1)."_2}\n";
$script_text .= $indent."eval {nowhen clk}\n";
}
my $test = @{$self->{'tests'}}[$ti]; my $test = @{$self->{'tests'}}[$ti];
if ($test->{'RESET_DUT_AFTER_CONFIG'}) { if ($test->{'RESET_DUT_AFTER_CONFIG'} == 1) {
$script_text .= "Force " . $global_settings_ref->{'design'}->{'RESET_DUT_IN_NAME'}; $script_text .= $indent."force -freeze " . $global_settings_ref->{'design'}->{'RESET_DUT_IN_NAME'};
$script_text .= " to "; $script_text .= " '" . $global_settings_ref->{'design'}->{'RESET_DUT_IN_ACTIVE'} . "'";
$script_text .= "'" . $global_settings_ref->{'design'}->{'RESET_DUT_IN_ACTIVE'} . "'\n"; $script_text .= " -cancel " . ($global_settings_ref->{'design'}->{'RESET_DUT_IN_DURATION'} * (10**12) / ($global_settings_ref->{'design'}->{'FREQUENCY'})) . " ps; \n";
$script_text .= $indent."when -label dutrst_$absolute_test_index \"\$now == ".($global_settings_ref->{'design'}->{'RESET_DUT_IN_DURATION'} * (10**12) / ($global_settings_ref->{'design'}->{'FREQUENCY'})) . " ps\" {\n";
} }
my ($tr, $act);
if ($test->{'TRIGGER'} ne "NONE") { if ($test->{'TRIGGER'} ne "NONE") {
if ($test->{'TRIGGER'} eq "INT") { if ($test->{'TRIGGER'} eq "INT") {
$ie = "int"; $tr = $global_settings_ref->{'design'}->{'TRIGGER_DUT_NAME'};
$act = $global_settings_ref->{'design'}->{'TRIGGER_DUT_ACTIVE'}; $act = $global_settings_ref->{'design'}->{'TRIGGER_DUT_ACTIVE'};
} else { } else {
$ie = "ext"; $tr = $global_settings_ref->{'design'}->{'TRIGGER_DUT_NAME'};
$act = $global_settings_ref->{'design'}->{'TRIGGER_EXT_ACTIVE'}; $act = $global_settings_ref->{'design'}->{'TRIGGER_EXT_ACTIVE'};
} }
$script_text .= "Force ${ie}ernal trigger to $act\n"; $script_text .= ($indent x 2)."when -label trigger_$absolute_test_index {$tr = $act} {\n";
} }
$time = 0;
for (my $ci = 1 ; $ci <= $global_settings_ref->{'design'}->{'CFGS_PER_MSG'} ; $ci++) { for (my $ci = 1 ; $ci <= $global_settings_ref->{'design'}->{'CFGS_PER_MSG'} ; $ci++) {
$script_text .= "#\n# Pattern $ci\n#\n"; $script_text .= ($indent)."#\n".($indent)."# Pattern $ri:$ti:$ci\n".($indent)."#\n";
$script_text .= ($indent)."echo \"Fault $ri:$ti:$ci\"\n";
$time += ($test->{"TIMER_VALUE_$ci"} / $global_settings_ref->{'design'}->{'FREQUENCY'}) * (10**12); $time += ($test->{"TIMER_VALUE_$ci"} / $global_settings_ref->{'design'}->{'FREQUENCY'}) * (10**12);
my $action_text = ""; my $action_text = "";
for (my $fi = 0 ; $fi < $global_settings_ref->{'design'}->{'FIU_NUM'} ; $fi++) { for (my $fi = 0 ; $fi < $global_settings_ref->{'design'}->{'FIU_NUM'} ; $fi++) {
# export patterns to simulator commands # export patterns to simulator commands
$action_text .= $indent; $action_text .= $indent x 3;
my $pattern = $test->{"FIU_${fi}_FAULT_${ci}"}; my $pattern = $test->{"FIU_${fi}_FAULT_${ci}"};
if ($pattern eq "STUCK_AT_0") { if ($pattern eq "STUCK_AT_0") {
$action_text .= "force -freeze " . @{$global_settings_ref->{'fius'}}[$fi]->{'FIU_NET_NAME'} . " '0'; \\\n"; $action_text .= "force -freeze \"\$testbench_name|" . @{$global_settings_ref->{'fius'}}[$fi]->{'FIU_NET_NAME'} . "\" '0'; \n";
} elsif ($pattern eq "STUCK_AT_1") { } elsif ($pattern eq "STUCK_AT_1") {
$action_text .= "force -freeze " . @{$global_settings_ref->{'fius'}}[$fi]->{'FIU_NET_NAME'} . " '1'; \\\n"; $action_text .= "force -freeze \"\$testbench_name|" . @{$global_settings_ref->{'fius'}}[$fi]->{'FIU_NET_NAME'} . "\" '1'; \n";
} elsif ($pattern eq "STUCK_OPEN") { } elsif ($pattern eq "STUCK_OPEN") {
$action_text .= "when -label clk \"\$testbench_name|".$global_settings_ref->{'design'}->{'CLOCK_NET'}."'event && \$testbench_name|".$global_settings_ref->{'design'}->{'CLOCK_NET'}." = '1'\" {\n";
#@FIXME think of something better than setting to 'U' $action_text .= ($indent x 4)."force -freeze \"\$testbench_name|" . @{$global_settings_ref->{'fius'}}[$fi]->{'FIU_NET_NAME'} . "\" [randbit " . @{$global_settings_ref->{'fius'}}[$fi]->{'FIU_LFSR_MASK'} . "]; \n";
$action_text .= "force " . @{$global_settings_ref->{'fius'}}[$fi]->{'FIU_NET_NAME'} . " 'U' \\\n"; $action_text .= ($indent x 3)."};\n";
} elsif ($pattern eq "SEU") { } elsif ($pattern eq "SEU") {
$action_text .= "force -freeze " . @{$global_settings_ref->{'fius'}}[$fi]->{'FIU_NET_NAME'} . " \\\n"; $action_text .= "force -freeze \"\$testbench_name|" . @{$global_settings_ref->{'fius'}}[$fi]->{'FIU_NET_NAME'} . "\" \n";
$action_text .= "${indent}${indent}[modval_bool " . @{$global_settings_ref->{'fius'}}[$fi]->{'FIU_NET_NAME'} . "] "; $action_text .= $indent x 3;
$action_text .= " -cancel " . ((10**12) / ($global_settings_ref->{'design'}->{'FREQUENCY'})) . " ps; \\\n"; $action_text .= "${indent}${indent}[modbit " . @{$global_settings_ref->{'fius'}}[$fi]->{'FIU_NET_NAME'} . "] ";
$action_text .= " -cancel " . ((10**12) / ($global_settings_ref->{'design'}->{'FREQUENCY'})) . " ps; \n";
} elsif ($pattern eq "DELAY") { } elsif ($pattern eq "DELAY") {
#@FIXME think of something better than setting to 'X' #@FIXME think of something better than setting to 'X'
$action_text .= "force " . @{$global_settings_ref->{'fius'}}[$fi]->{'FIU_NET_NAME'} . " 'X'; \\\n"; $action_text .= "force \"\$testbench_name|" . @{$global_settings_ref->{'fius'}}[$fi]->{'FIU_NET_NAME'} . "\" 'X'; \n";
} else { } else {
$action_text .= "noforce " . @{$global_settings_ref->{'fius'}}[$fi]->{'FIU_NET_NAME'} . "; \\\n"; $action_text .= "noforce \"\$testbench_name|" . @{$global_settings_ref->{'fius'}}[$fi]->{'FIU_NET_NAME'} . "\"; \n";
} }
} }
$script_text .= "when -fast {\$now == \@$time ps} { \\\n" . $action_text . "};\n" if $action_text ne ""; $action_text .= ($indent x 3)."set test ".($absolute_test_index+1).";\n" if $ci == $global_settings_ref->{'design'}->{'CFGS_PER_MSG'};
$action_text .= ($indent x 3)."stop; # this was the last test\n" if ($ci == $global_settings_ref->{'design'}->{'CFGS_PER_MSG'} && $ti == $end && $ri == $num_repetitions);
$script_text .= ($indent)."when -label action_".($absolute_test_index)."_$ci \"\$now == $time ps\" { \n" . $action_text . ($indent)."};\n" if $action_text ne "";
} }
$script_text .= "$indent};\n" if ($test->{'TRIGGER'} ne "NONE");
$script_text .= "$indent};\n" if $test->{'RESET_DUT_AFTER_CONFIG'} == 1;
$script_text .= "};\n";
$absolute_test_index++;
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment