Line 46... |
Line 46... |
Read_file: process
|
Read_file: process
|
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 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 128... |
Line 129... |
define_instruction(inst_list, "JUMP", 1);
|
define_instruction(inst_list, "JUMP", 1);
|
define_instruction(inst_list, "LOOP", 1);
|
define_instruction(inst_list, "LOOP", 1);
|
define_instruction(inst_list, "END_LOOP", 0);
|
define_instruction(inst_list, "END_LOOP", 0);
|
define_instruction(inst_list, "IF", 3);
|
define_instruction(inst_list, "IF", 3);
|
define_instruction(inst_list, "ELSE", 0);
|
define_instruction(inst_list, "ELSE", 0);
|
|
define_instruction(inst_list, "ELSEIF", 3);
|
define_instruction(inst_list, "END_IF", 0);
|
define_instruction(inst_list, "END_IF", 0);
|
define_instruction(inst_list, "WHILE", 3);
|
define_instruction(inst_list, "WHILE", 3);
|
define_instruction(inst_list, "END_WHILE", 0);
|
define_instruction(inst_list, "END_WHILE", 0);
|
define_instruction(inst_list, "MESSAGES_OFF", 0);
|
define_instruction(inst_list, "MESSAGES_OFF", 0);
|
define_instruction(inst_list, "MESSAGES_ON", 0);
|
define_instruction(inst_list, "MESSAGES_ON", 0);
|
Line 146... |
Line 148... |
define_instruction(inst_list, "VERIFY", 1);
|
define_instruction(inst_list, "VERIFY", 1);
|
|
|
|
|
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
-- 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);
|
|
|
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
-- 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, 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);
|
|
|
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
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
|