Line 47... |
Line 47... |
variable current_line : text_line; -- The current input line
|
variable current_line : text_line; -- The current input line
|
variable inst_list : inst_def_ptr; -- the instruction list
|
variable inst_list : inst_def_ptr; -- the instruction list
|
variable defined_vars : var_field_ptr; -- defined variables
|
variable defined_vars : var_field_ptr; -- defined variables
|
variable inst_sequ : stim_line_ptr; -- the instruction sequence
|
variable inst_sequ : stim_line_ptr; -- the instruction sequence
|
variable file_list : file_def_ptr; -- pointer to the list of file names
|
variable file_list : file_def_ptr; -- pointer to the list of file names
|
|
variable last_sequ_num: integer;
|
|
variable last_sequ_ptr: stim_line_ptr;
|
|
|
variable instruction : text_field; -- instruction field
|
variable instruction : text_field; -- instruction field
|
variable par1 : integer; -- paramiter 1
|
variable par1 : integer; -- paramiter 1
|
variable par2 : integer; -- paramiter 2
|
variable par2 : integer; -- paramiter 2
|
variable par3 : integer; -- paramiter 3
|
variable par3 : integer; -- paramiter 3
|
Line 151... |
Line 153... |
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
-- Read, test, and load the stimulus file
|
-- Read, test, and load the stimulus file
|
read_instruction_file(stimulus_file, inst_list, defined_vars, inst_sequ,
|
read_instruction_file(stimulus_file, inst_list, defined_vars, inst_sequ,
|
file_list);
|
file_list);
|
|
|
|
-- initialize last info
|
|
last_sequ_num := 0;
|
|
last_sequ_ptr := inst_sequ;
|
|
|
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
-- Using the Instruction record list, get the instruction and implement
|
-- Using the Instruction record list, get the instruction and implement
|
-- it as per the statements in the elsif tree.
|
-- it as per the statements in the elsif tree.
|
while(v_line < inst_sequ.num_of_lines) loop
|
while(v_line < inst_sequ.num_of_lines) loop
|
v_line := v_line + 1;
|
v_line := v_line + 1;
|
access_inst_sequ(inst_sequ, defined_vars, file_list, v_line, instruction,
|
access_inst_sequ(inst_sequ, defined_vars, file_list, v_line, instruction,
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line);
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line,
|
|
last_sequ_num, last_sequ_ptr);
|
|
|
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
if(instruction(1 to len) = "DEFINE_VAR") then
|
if(instruction(1 to len) = "DEFINE_VAR") then
|
null; -- This instruction was implemented while reading the file
|
null; -- This instruction was implemented while reading the file
|
|
|
Line 279... |
Line 286... |
severity failure;
|
severity failure;
|
end case;
|
end case;
|
|
|
if(if_state = false) then
|
if(if_state = false) then
|
v_line := v_line + 1;
|
v_line := v_line + 1;
|
access_inst_sequ(inst_sequ, defined_vars, v_line, instruction,
|
access_inst_sequ(inst_sequ, defined_vars, file_list, v_line, instruction,
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line);
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line,
|
|
last_sequ_num, last_sequ_ptr);
|
while(instruction(1 to len) /= "ELSE" and
|
while(instruction(1 to len) /= "ELSE" and
|
instruction(1 to len) /= "ELSEIF" and
|
instruction(1 to len) /= "ELSEIF" and
|
instruction(1 to len) /= "END_IF") loop
|
instruction(1 to len) /= "END_IF") loop
|
if(v_line < inst_sequ.num_of_lines) then
|
if(v_line < inst_sequ.num_of_lines) then
|
v_line := v_line + 1;
|
v_line := v_line + 1;
|
access_inst_sequ(inst_sequ, defined_vars, v_line, instruction,
|
access_inst_sequ(inst_sequ, defined_vars, file_list, v_line, instruction,
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line);
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line,
|
|
last_sequ_num, last_sequ_ptr);
|
else
|
else
|
assert (false)
|
assert (false)
|
report LF & "ERROR: IF instruction unable to find terminating" &
|
report LF & "ERROR: IF instruction unable to find terminating" &
|
LF & " ELSE, ELSEIF or END_IF statement."
|
LF & " ELSE, ELSEIF or END_IF statement."
|
severity failure;
|
severity failure;
|
Line 302... |
Line 311... |
|
|
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
elsif (instruction(1 to len) = "ELSEIF") then
|
elsif (instruction(1 to len) = "ELSEIF") then
|
if(if_state = true) then -- if the if_state is true then skip to the end
|
if(if_state = true) then -- if the if_state is true then skip to the end
|
v_line := v_line + 1;
|
v_line := v_line + 1;
|
access_inst_sequ(inst_sequ, defined_vars, v_line, instruction,
|
access_inst_sequ(inst_sequ, defined_vars, file_list, v_line, instruction,
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line);
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line,
|
|
last_sequ_num, last_sequ_ptr);
|
while(instruction(1 to len) /= "END_IF") loop
|
while(instruction(1 to len) /= "END_IF") loop
|
if(v_line < inst_sequ.num_of_lines) then
|
if(v_line < inst_sequ.num_of_lines) then
|
v_line := v_line + 1;
|
v_line := v_line + 1;
|
access_inst_sequ(inst_sequ, defined_vars, v_line, instruction,
|
access_inst_sequ(inst_sequ, defined_vars, file_list, v_line, instruction,
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line);
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line,
|
|
last_sequ_num, last_sequ_ptr);
|
else
|
else
|
assert (false)
|
assert (false)
|
report LF & "ERROR: IF instruction unable to find terminating" &
|
report LF & "ERROR: IF instruction unable to find terminating" &
|
LF & " ELSE, ELSEIF or END_IF statement."
|
LF & " ELSE, ELSEIF or END_IF statement."
|
severity failure;
|
severity failure;
|
Line 336... |
Line 347... |
severity failure;
|
severity failure;
|
end case;
|
end case;
|
|
|
if(if_state = false) then
|
if(if_state = false) then
|
v_line := v_line + 1;
|
v_line := v_line + 1;
|
access_inst_sequ(inst_sequ, defined_vars, v_line, instruction,
|
access_inst_sequ(inst_sequ, defined_vars, file_list, v_line, instruction,
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line);
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line,
|
|
last_sequ_num, last_sequ_ptr);
|
while(instruction(1 to len) /= "ELSE" and
|
while(instruction(1 to len) /= "ELSE" and
|
instruction(1 to len) /= "ELSEIF" and
|
instruction(1 to len) /= "ELSEIF" and
|
instruction(1 to len) /= "END_IF") loop
|
instruction(1 to len) /= "END_IF") loop
|
if(v_line < inst_sequ.num_of_lines) then
|
if(v_line < inst_sequ.num_of_lines) then
|
v_line := v_line + 1;
|
v_line := v_line + 1;
|
access_inst_sequ(inst_sequ, defined_vars, v_line, instruction,
|
access_inst_sequ(inst_sequ, defined_vars, file_list, v_line, instruction,
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line);
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line,
|
|
last_sequ_num, last_sequ_ptr);
|
else
|
else
|
assert (false)
|
assert (false)
|
report LF & "ERROR: ELSEIF instruction unable to find terminating" &
|
report LF & "ERROR: ELSEIF instruction unable to find terminating" &
|
LF & " ELSE, ELSEIF or END_IF statement."
|
LF & " ELSE, ELSEIF or END_IF statement."
|
severity failure;
|
severity failure;
|
Line 360... |
Line 373... |
|
|
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
elsif (instruction(1 to len) = "ELSE") then
|
elsif (instruction(1 to len) = "ELSE") then
|
if(if_state = true) then -- if the if_state is true then skip the else
|
if(if_state = true) then -- if the if_state is true then skip the else
|
v_line := v_line + 1;
|
v_line := v_line + 1;
|
access_inst_sequ(inst_sequ, defined_vars, v_line, instruction,
|
access_inst_sequ(inst_sequ, defined_vars, file_list, v_line, instruction,
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line);
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line,
|
|
last_sequ_num, last_sequ_ptr);
|
while(instruction(1 to len) /= "END_IF") loop
|
while(instruction(1 to len) /= "END_IF") loop
|
if(v_line < inst_sequ.num_of_lines) then
|
if(v_line < inst_sequ.num_of_lines) then
|
v_line := v_line + 1;
|
v_line := v_line + 1;
|
access_inst_sequ(inst_sequ, defined_vars, v_line, instruction,
|
access_inst_sequ(inst_sequ, defined_vars, file_list, v_line, instruction,
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line);
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line,
|
|
last_sequ_num, last_sequ_ptr);
|
else
|
else
|
assert (false)
|
assert (false)
|
report LF & "ERROR: IF instruction unable to find terminating" &
|
report LF & "ERROR: IF instruction unable to find terminating" &
|
LF & " ELSE, ELSEIF or END_IF statement."
|
LF & " ELSE, ELSEIF or END_IF statement."
|
severity failure;
|
severity failure;
|
Line 407... |
Line 422... |
else
|
else
|
wh_end := false;
|
wh_end := false;
|
while(wh_end /= true) loop
|
while(wh_end /= true) loop
|
if(v_line < inst_sequ.num_of_lines) then
|
if(v_line < inst_sequ.num_of_lines) then
|
v_line := v_line + 1;
|
v_line := v_line + 1;
|
access_inst_sequ(inst_sequ, defined_vars, v_line, instruction,
|
access_inst_sequ(inst_sequ, defined_vars, file_list, v_line, instruction,
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line);
|
par1, par2, par3, par4, par5, par6, txt, len, file_name, file_line,
|
|
last_sequ_num, last_sequ_ptr);
|
else
|
else
|
assert (false)
|
assert (false)
|
report LF & "ERROR: WHILE instruction unable to find terminating" &
|
report LF & "ERROR: WHILE instruction unable to find terminating" &
|
LF & " END_WHILE statement."
|
LF & " END_WHILE statement."
|
severity failure;
|
severity failure;
|