default : is_command = `false;
endcase
end
endfunction // is_command
task pcl_to_msg_level_types;
output [31:0] ret_val; // set_types
input [1:`token_size*8] inline;
output valid_f;
input [31:0] msg_level;
input [1:13*8] cmd_name;
reg [1:`token_size*8] tmp_inline;
reg [1:13*8] tmp_cmd_name;
integer tmp_msg_level;
begin
tmp_msg_level = `no_msg;
tmp_cmd_name = "NO NAME GIVEN";
tmp_inline = inline;
valid_f = `true;
case (tmp_inline)
"no_msg" : ret_val = `no_msg;
"warnings" : ret_val = `warnings;
"debug_1" : ret_val = `debug_1;
"debug_2" : ret_val = `debug_2;
"debug_3" : ret_val = `debug_3;
"debug_cb" : ret_val = `debug_cb;
"debug_int" : ret_val = `debug_int;
"debug_cmd_mem" : ret_val = `debug_cmd_mem;
default : begin
msg_level = tmp_msg_level;
cmd_name = tmp_cmd_name;
syntax_warn(cmd_name,tmp_inline,msg_level);
valid_f = `false;
end
endcase
end
endtask // pcl_to_msg_level_types
task pcl_to_set_types;
output [31:0] ret_val;
input [1:`token_size*8] inline;
output valid_f;
input [31:0] msg_level;
input [1:13*8] cmd_name;
reg [1:`token_size*8] tmp_inline;
begin
valid_f = `true;
tmp_inline = inline;
case (tmp_inline)
"mpin" : ret_val = mpin;
"mbus" : ret_val = mbus;
"mregister" : ret_val = mregister;
default : begin
syntax_warn(cmd_name,tmp_inline,msg_level);
valid_f = `false;
end
endcase
end
endtask // pcl_to_set_types;
task pcl_to_object_name_types;
output [31:0] ret_val;
input [1:`token_size*8] inline;
output valid_f;
input [31:0] msg_level;
input [1:13*8] cmd_name;
reg [1:`token_size*8] tmp_inline;
begin
valid_f = `true;
tmp_inline = inline;
case (tmp_inline)
"pad_bus" : ret_val = pad_bus;
"pad_0" : ret_val = pad_0;
"pad_1" : ret_val = pad_1;
"pad_2" : ret_val = pad_2;
"pad_3" : ret_val = pad_3;
"pad_4" : ret_val = pad_4;
"pad_5" : ret_val = pad_5;
"pad_6" : ret_val = pad_6;
"pad_7" : ret_val = pad_7;
"pad_8" : ret_val = pad_8;
"pad_9" : ret_val = pad_9;
"pad_10" : ret_val = pad_10;
"pad_11" : ret_val = pad_11;
"pad_12" : ret_val = pad_12;
"pad_13" : ret_val = pad_13;
"pad_14" : ret_val = pad_14;
"pad_15" : ret_val = pad_15;
"pad_16" : ret_val = pad_16;
"pad_17" : ret_val = pad_17;
"pad_18" : ret_val = pad_18;
"pad_19" : ret_val = pad_19;
"pad_20" : ret_val = pad_20;
"pad_21" : ret_val = pad_21;
"pad_22" : ret_val = pad_22;
"pad_23" : ret_val = pad_23;
"pad_24" : ret_val = pad_24;
"pad_25" : ret_val = pad_25;
"pad_26" : ret_val = pad_26;
"pad_27" : ret_val = pad_27;
"pad_28" : ret_val = pad_28;
"pad_29" : ret_val = pad_29;
"pad_30" : ret_val = pad_30;
"pad_31" : ret_val = pad_31;
"pcxbenn_bus" : ret_val = pcxbenn_bus;
"pcxbenn_0" : ret_val = pcxbenn_0;
"pcxbenn_1" : ret_val = pcxbenn_1;
"pcxbenn_2" : ret_val = pcxbenn_2;
"pcxbenn_3" : ret_val = pcxbenn_3;
"ppar_pin" : ret_val = ppar_pin;
"pframenn_pin" : ret_val = pframenn_pin;
"ptrdynn_pin" : ret_val = ptrdynn_pin;
"pirdynn_pin" : ret_val = pirdynn_pin;
"pstopnn_pin" : ret_val = pstopnn_pin;
"pdevselnn_pin" : ret_val = pdevselnn_pin;
"pidsel_pin" : ret_val = pidsel_pin;
"psbonn_pin" : ret_val = psbonn_pin;
"psdone_pin" : ret_val = psdone_pin;
"pclk_pin" : ret_val = pclk_pin;
"prstnn_pin" : ret_val = prstnn_pin;
"pd_bus" : ret_val = pd_bus;
"pd_32" : ret_val = pd_32;
"pd_33" : ret_val = pd_33;
"pd_34" : ret_val = pd_34;
"pd_35" : ret_val = pd_35;
"pd_36" : ret_val = pd_36;
"pd_37" : ret_val = pd_37;
"pd_38" : ret_val = pd_38;
"pd_39" : ret_val = pd_39;
"pd_40" : ret_val = pd_40;
"pd_41" : ret_val = pd_41;
"pd_42" : ret_val = pd_42;
"pd_43" : ret_val = pd_43;
"pd_44" : ret_val = pd_44;
"pd_45" : ret_val = pd_45;
"pd_46" : ret_val = pd_46;
"pd_47" : ret_val = pd_47;
"pd_48" : ret_val = pd_48;
"pd_49" : ret_val = pd_49;
"pd_50" : ret_val = pd_50;
"pd_51" : ret_val = pd_51;
"pd_52" : ret_val = pd_52;
"pd_53" : ret_val = pd_53;
"pd_54" : ret_val = pd_54;
"pd_55" : ret_val = pd_55;
"pd_56" : ret_val = pd_56;
"pd_57" : ret_val = pd_57;
"pd_58" : ret_val = pd_58;
"pd_59" : ret_val = pd_59;
"pd_60" : ret_val = pd_60;
"pd_61" : ret_val = pd_61;
"pd_62" : ret_val = pd_62;
"pd_63" : ret_val = pd_63;
"pbenn_bus" : ret_val = pbenn_bus;
"pbenn_4" : ret_val = pbenn_4;
"pbenn_5" : ret_val = pbenn_5;
"pbenn_6" : ret_val = pbenn_6;
"pbenn_7" : ret_val = pbenn_7;
"ppar64_pin" : ret_val = ppar64_pin;
"preq64nn_pin" : ret_val = preq64nn_pin;
"pack64nn_pin" : ret_val = pack64nn_pin;
"plocknn_pin" : ret_val = plocknn_pin;
"pperrnn_pin" : ret_val = pperrnn_pin;
"pserrnn_pin" : ret_val = pserrnn_pin;
default : begin
syntax_warn(cmd_name,tmp_inline,msg_level);
valid_f = `false;
end
endcase
end
endtask // pcl_to_object_name_types;
task pcl_to_config_types;
output [31:0] ret_val;
input [1:`token_size*8] inline;
output valid_f;
input [31:0] msg_level;
input [1:13*8] cmd_name;
reg [1:`token_size*8] tmp_inline;
begin
valid_f = `true;
tmp_inline = inline;
case (tmp_inline)
"transfer_limit" : ret_val = transfer_limit;
"abort_limit" : ret_val = abort_limit;
"termination_style" : ret_val = termination_style;
"pci_error" : ret_val = pci_error;
"decode" : ret_val = decode;
"delays" : ret_val = delays;
"dev_id" : ret_val = dev_id;
"ven_id" : ret_val = ven_id;
"rev_id" : ret_val = rev_id;
"h_type" : ret_val = h_type;
"cls_code" : ret_val = cls_code;
"mem_l_0" : ret_val = mem_l_0;
"mem_u_0" : ret_val = mem_u_0;
"mem_l_1" : ret_val = mem_l_1;
"mem_u_1" : ret_val = mem_u_1;
"mem_l_2" : ret_val = mem_l_2;
"mem_u_2" : ret_val = mem_u_2;
"io_l_0" : ret_val = io_l_0;
"io_u_0" : ret_val = io_u_0;
"io_l_1" : ret_val = io_l_1;
"io_u_1" : ret_val = io_u_1;
"io_l_2" : ret_val = io_l_2;
"io_u_2" : ret_val = io_u_2;
"c_line_size" : ret_val = c_line_size;
"addr_64" : ret_val = addr_64;
"data_64" : ret_val = data_64;
"int_ack" : ret_val = int_ack;
"int_ack_vector" : ret_val = int_ack_vector;
"type1_access" : ret_val = type1_access;
default : begin
syntax_warn(cmd_name,tmp_inline,msg_level);
valid_f = `false;
end
endcase
end
endtask // pcl_to_config_types;
task pcl_to_mem_types;
output [31:0] ret_val;
input [1:`token_size*8] inline;
output valid_f;
input [31:0] msg_level;
input [1:13*8] cmd_name;
reg [1:`token_size*8] tmp_inline;
begin
valid_f = `true;
tmp_inline = inline;
case (tmp_inline)
"mem" : ret_val = mem;
"io" : ret_val = io;
"cfg" : ret_val = cfg;
default : begin
syntax_warn(cmd_name,tmp_inline,msg_level);
valid_f = `false;
end
endcase
end
endtask // pcl_to_mem_types;
task get_configure_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f [2:4];
reg status_f [2:4];
reg [1:9*8] cmd_name;
reg [(`token_size-1)*8:0] token_2;
reg [64*4:1] token_3;
reg [`token_size-1:0] token_4;
integer i;
begin : block_get
for (i=2; i<=4; i=i+1) begin
valid_f[i] = `false;
status_f[i] = `false;
end // loop
cmd_name = "CONFIGURE";
valid_token = `false;
token_number = 0;
$lmv_tokenize(inline, 1, 0, token_2, status_f[2]);
pcl_to_config_types(wk_cmd[inctype1:inctype2],token_2,valid_f[2],msg_level,cmd_name);
if ((valid_f[2] && status_f[2])) begin
case (wk_cmd[inctype1:inctype2])
dev_id , ven_id , rev_id , h_type , cls_code , mem_l_0 , mem_u_0 , mem_l_1 , mem_u_1 , mem_l_2 , mem_u_2 ,
io_l_0 , io_u_0 , io_l_1 , io_u_1 , io_l_2 , io_u_2 , c_line_size , int_ack_vector : begin
$lmv_tokenize(inline, 2, 256, token_3, status_f[3]);
wk_cmd[invalue_vector1:invalue_vector2] = token_3;
valid_f[3] = `true;
valid_f[4] = `true;
status_f[4] = `true;
end
transfer_limit , abort_limit , termination_style , pci_error , decode : begin
$lmv_tokenize(inline, 0, 256, token_3, status_f[3]);
wk_cmd[invalue1:invalue2] = token_3;
valid_f[3] = `true;
valid_f[4] = `true;
status_f[4] = `true;
end
addr_64 , data_64 , int_ack , type1_access : begin
$lmv_tokenize(inline, 1, 0, token_3, status_f[3]);
pcl_to_boolean(wk_cmd[invalue_boolean],token_3,valid_f[3],msg_level,cmd_name);
valid_f[3] = `true;
valid_f[4] = `true;
status_f[4] = `true;
end
endcase
end // if
for (i = 2; i <= 4; i = i + 1) begin
if (!(valid_f[i] && status_f[i])) begin
valid_token = `false;
token_number = i;
disable block_get;
end // if
end // loop
valid_token = `true;
wk_cmd[incode1:incode2] = `configure_cmd;
end
endtask // get_configure_cmd
task get_configure_delay_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f [2:3];
reg status_f [2:3];
reg [1:9*8] cmd_name;
reg [(`token_size-1)*8:0] token_2;
reg [(`token_size-1)*8:0] token_3;
integer i;
reg [1:`token_size*8*10] temp_inline;
begin : block_get
for (i=2; i<=3; i=i+1) begin
valid_f[i] = `false;
status_f[i] = `false;
end // loop
cmd_name = "CONFIGURE_DELAY";
valid_token = `false;
token_number = 0;
temp_inline = inline;
wk_cmd[inctype1:inctype2] = delays;
$lmv_tokenize(inline, 1, 256, token_2, status_f[2]);
case (token_2)
"all_delays" : begin
wk_cmd[indelay_index1:indelay_index2] = -1;
valid_f[2] = `true;
end
default : begin
$lmv_tokenize(temp_inline, 0, 256, token_2, status_f[2]);
wk_cmd[indelay_index1:indelay_index2] = token_2;
valid_f[2] = `true;
end
endcase
$lmv_tokenize(inline, 0, 256, token_3, status_f[3]);
wk_cmd[indelay1:indelay2] = token_3;
valid_f[3] = `true;
for (i = 2; i <= 3; i = i + 1) begin
if (!(valid_f[i] && status_f[i])) begin
valid_token = `false;
token_number = i;
disable block_get;
end // if
end // loop
valid_token = `true;
wk_cmd[incode1:incode2] = `configure_cmd;
end
endtask // get_configure_delay_cmd
task get_request_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f [2 : 4];
reg status_f [2 : 4];
integer i;
reg [1:`token_size*8] cmd_name;
reg [`token_size-1:0] token_2;
reg [`token_size-1:0] token_3;
reg [`token_size-1:0] token_4;
begin : block_get
for (i=2; i<=4; i=i+1) begin
valid_f[i] = `false;
status_f[i] = `false;
end // loop
cmd_name = "REQUEST";
valid_token = `false;
token_number = 0;
token_2= "";
token_3= "";
token_4= "";
$lmv_tokenize(inline, 0, 128, token_2, status_f[2]);
wk_cmd[inrequest_limit1:inrequest_limit2] = token_2;
valid_f[2] = `true;
$lmv_tokenize(inline, 0, 128, token_3, status_f[3]);
wk_cmd[indecode1:indecode2] = token_3;
valid_f[3] = `true;
$lmv_tokenize(inline, 0, 128, token_4, status_f[4]);
wk_cmd[indelay1:indelay2] = token_4;
valid_f[4] = `true;
for (i = 2; i <= 4; i = i + 1) begin
if (!(valid_f[i] && status_f[i])) begin
valid_token = `false;
token_number = i;
disable block_get;
end // if
end // loop
valid_token = `true;
wk_cmd[incode1:incode2] = `request_cmd;
end
endtask // get_request_cmd
task get_idle_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f [2 : 2];
reg status_f [2 : 2];
integer i;
reg [1:`token_size*8] cmd_name;
reg [`token_size-1:0] token_2;
begin : block_get
for (i=2; i<=2; i=i+1) begin
valid_f[i] = `false;
status_f[i] = `false;
end // loop
cmd_name = "IDLE";
valid_token = `false;
token_number = 0;
token_2= "";
$lmv_tokenize(inline, 0, 128, token_2, status_f[2]);
wk_cmd[incycles1:incycles2] = token_2;
valid_f[2] = `true;
for (i = 2; i <= 2; i = i + 1) begin
if (!(valid_f[i] && status_f[i])) begin
valid_token = `false;
token_number = i;
disable block_get;
end // if
end // loop
valid_token = `true;
wk_cmd[incode1:incode2] = `idle_cmd;
end
endtask // get_idle_cmd
task get_trigger_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f [2 : 2];
reg status_f [2 : 2];
integer i;
reg [1:`token_size*8] cmd_name;
reg [`token_size-1:0] token_2;
begin : block_get
for (i=2; i<=2; i=i+1) begin
valid_f[i] = `false;
status_f[i] = `false;
end // loop
cmd_name = "TRIGGER";
valid_token = `false;
token_number = 0;
token_2= "";
$lmv_tokenize(inline, 0, 128, token_2, status_f[2]);
wk_cmd[intvalue1:intvalue2] = token_2;
valid_f[2] = `true;
for (i = 2; i <= 2; i = i + 1) begin
if (!(valid_f[i] && status_f[i])) begin
valid_token = `false;
token_number = i;
disable block_get;
end // if
end // loop
valid_token = `true;
wk_cmd[incode1:incode2] = `trigger_cmd;
end
endtask // get_trigger_cmd
task get_wait_on_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f [2 : 2];
reg status_f [2 : 2];
integer i;
reg [1:`token_size*8] cmd_name;
reg [`token_size-1:0] token_2;
begin : block_get
for (i=2; i<=2; i=i+1) begin
valid_f[i] = `false;
status_f[i] = `false;
end // loop
cmd_name = "WAIT_ON";
valid_token = `false;
token_number = 0;
token_2= "";
$lmv_tokenize(inline, 0, 128, token_2, status_f[2]);
wk_cmd[intvalue1:intvalue2] = token_2;
valid_f[2] = `true;
for (i = 2; i <= 2; i = i + 1) begin
if (!(valid_f[i] && status_f[i])) begin
valid_token = `false;
token_number = i;
disable block_get;
end // if
end // loop
valid_token = `true;
wk_cmd[incode1:incode2] = `wait_on_cmd;
end
endtask // get_wait_on_cmd
task get_print_msg_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f [2 : 2];
reg status_f [2 : 2];
integer i;
reg [1:`token_size*8] cmd_name;
reg [(`token_size-1)*8:0] token_2;
begin : block_get
for (i=2; i<=2; i=i+1) begin
valid_f[i] = `false;
status_f[i] = `false;
end // loop
cmd_name = "PRINT_MSG";
valid_token = `false;
token_number = 0;
token_2= "";
$lmv_tokenize(inline, 1, 128, token_2, status_f[2]);
wk_cmd[inmessage1:inmessage2] = token_2;
valid_f[2] = `true;
for (i = 2; i <= 2; i = i + 1) begin
if (!(valid_f[i] && status_f[i])) begin
valid_token = `false;
token_number = i;
disable block_get;
end // if
end // loop
valid_token = `true;
wk_cmd[incode1:incode2] = `print_msg_cmd;
end
endtask // get_print_msg_cmd
task get_set_msg_level_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f [2 : 2];
reg status_f [2 : 2];
integer i;
reg [1:`token_size*8] cmd_name;
reg [`token_size-1:0] token_2;
begin : block_get
for (i=2; i<=2; i=i+1) begin
valid_f[i] = `false;
status_f[i] = `false;
end // loop
cmd_name = "SET_MSG_LEVEL";
valid_token = `false;
token_number = 0;
token_2= "";
$lmv_tokenize(inline, 1, 128, token_2, status_f[2]);
pcl_to_msg_level_types(wk_cmd[inmlevel1:inmlevel2],token_2,valid_f[2],msg_level,cmd_name);
for (i = 2; i <= 2; i = i + 1) begin
if (!(valid_f[i] && status_f[i])) begin
valid_token = `false;
token_number = i;
disable block_get;
end // if
end // loop
valid_token = `true;
wk_cmd[incode1:incode2] = `set_msg_level_cmd;
end
endtask // get_set_msg_level_cmd
task get_call_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f [2 : 2];
reg status_f [2 : 2];
integer i;
reg [1:`token_size*8] cmd_name;
reg [`token_size-1:0] token_2;
begin : block_get
for (i=2; i<=2; i=i+1) begin
valid_f[i] = `false;
status_f[i] = `false;
end // loop
cmd_name = "CALL";
valid_token = `false;
token_number = 0;
token_2= "";
$lmv_tokenize(inline, 1, 1024, token_2, status_f[2]);
wk_cmd[infunction_name1:infunction_name2] = token_2;
valid_f[2] = `true;
for (i = 2; i <= 2; i = i + 1) begin
if (!(valid_f[i] && status_f[i])) begin
valid_token = `false;
token_number = i;
disable block_get;
end // if
end // loop
valid_token = `true;
wk_cmd[incode1:incode2] = `call_cmd;
end
endtask // get_call_cmd
task get_func_beg_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f[2:2];
reg status_f[2:2];
reg [1:8*8] cmd_name;
reg [(`token_size-1)*8:0] token_2;
integer i;
begin : block_get
valid_f[2] = `false;
status_f[2] = `false;
cmd_name = "FUNC_BEG";
valid_token = `false;
token_number = 0;
$lmv_tokenize(inline, 1, 1024, token_2, status_f[2]);
wk_cmd[infunction_name1:infunction_name2] = token_2;
valid_f[2] = `true;
for (i=2; i <= 2; i = i + 1) begin
if (!(valid_f[i] && status_f[i])) begin
valid_token = `false;
token_number = i;
disable block_get;
end // if
end // loop
valid_token = `true;
wk_cmd[incode1:incode2] = `func_beg_cmd;
end
endtask // get_func_beg_cmd
task get_func_end_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f[2:2];
reg status_f[2:2];
reg [1:8*8] cmd_name;
reg [(`token_size-1)*8:0] token_2;
integer i;
begin : block_get
valid_f[2] = `false;
status_f[2] = `false;
cmd_name = "FUNC_END";
valid_token = `false;
token_number = 0;
$lmv_tokenize(inline, 1, 1024, token_2, status_f[2]);
wk_cmd[infunction_name1:infunction_name2] = token_2;
valid_f[2] = `true;
for (i=2; i <= 2; i = i + 1) begin
if (!(valid_f[i] && status_f[i])) begin
valid_token = `false;
token_number = i;
disable block_get;
end // if
end // loop
valid_token = `true;
wk_cmd[incode1:incode2] = `func_end_cmd;
end
endtask // get_func_end_cmd
task get_sequential_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f [2:1];
reg status_f [2:1];
reg [1:10*8] cmd_name;
begin
valid_f[2] = `false;
valid_f[1] = `false;
cmd_name = "SEQUENTIAL";
token_number = 0;
valid_token = `true;
wk_cmd[incode1:incode2] = `sequential_cmd;
end
endtask // get_sequential_cmd
task get_stop_sim_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f [2:1];
reg status_f [2:1];
reg [1:8*8] cmd_name;
begin
valid_f[2] = `false;
valid_f[1] = `false;
cmd_name = "STOP_SIM";
token_number = 0;
valid_token = `true;
wk_cmd[incode1:incode2] = `stop_sim_cmd;
end
endtask // get_stop_sim_cmd
task get_wait_on_node_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f [2:4];
reg status_f [2:4];
reg [1:12*8] cmd_name;
reg [(`token_size-1)*8:0] token_2;
reg [(`token_size-1):0] token_3;
reg [(`token_size-1):0] token_4;
integer i;
begin : block_get
for (i=2; i <= 4; i = i + 1) begin
valid_f[i] = `false;
status_f[i] = `false;
end
cmd_name = "WAIT_ON_NODE";
valid_token = `false;
token_number = 0;
$lmv_tokenize(inline, 1, 1024, token_2, status_f[2]);
wk_cmd[innode_name1:innode_name2] = token_2;
valid_f[2] = `true;
$lmv_tokenize(inline, 2, 1024, token_3, status_f[3]);
wk_cmd[innode_value1:innode_value2] = token_3;
valid_f[3] = `true;
$lmv_tokenize(inline, 2, 1024, token_4, status_f[4]);
wk_cmd[innode_mask1:innode_mask2] = token_4;
valid_f[4] = `true;
for (i=2; i <= 4; i = i + 1) begin
if (!(valid_f[i] && status_f[i])) begin
valid_token = `false;
token_number = i;
disable block_get;
end // if
end // loop
valid_token = `true;
wk_cmd[incode1:incode2] = `wait_on_node_cmd;
end
endtask // get_wait_on_node_cmd
task get_open_buffer_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f[2:2];
reg status_f[2:2];
reg [1:11*8] cmd_name;
reg [(`token_size-1)*8:0] token_2;
integer i;
begin : block_get
valid_f[2] = `false;
status_f[2] = `false;
cmd_name = "OPEN_BUFFER";
valid_token = `false;
token_number = 0;
$lmv_tokenize(inline, 1, 1024, token_2, status_f[2]);
wk_cmd[infunction_name1:infunction_name2] = token_2;
valid_f[2] = `true;
for (i=2; i <= 2; i = i + 1) begin
if (!(valid_f[i] && status_f[i])) begin
valid_token = `false;
token_number = i;
disable block_get;
end // if
end // loop
valid_token = `true;
wk_cmd[incode1:incode2] = `open_buffer_cmd;
end
endtask // get_open_buffer_cmd
task get_close_buffer_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f[2:2];
reg status_f[2:2];
reg [1:12*8] cmd_name;
reg [(`token_size-1)*8:0] token_2;
integer i;
begin : block_get
valid_f[2] = `false;
status_f[2] = `false;
cmd_name = "CLOSE_BUFFER";
valid_token = `false;
token_number = 0;
$lmv_tokenize(inline, 1, 1024, token_2, status_f[2]);
wk_cmd[infunction_name1:infunction_name2] = token_2;
valid_f[2] = `true;
for (i=2; i <= 2; i = i + 1) begin
if (!(valid_f[i] && status_f[i])) begin
valid_token = `false;
token_number = i;
disable block_get;
end // if
end // loop
valid_token = `true;
wk_cmd[incode1:incode2] = `close_buffer_cmd;
end
endtask // get_close_buffer_cmd
task get_set_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f [2:5];
reg status_f [2:5];
reg [1:3*8] cmd_name;
reg [`token_size-1:0] token_2;
reg [`token_size-1:0] token_3;
reg [`token_size-1:0] token_4;
reg [`token_size-1:0] token_5;
integer i;
begin : block_get
for (i=2; i <= 5; i = i + 1) begin
valid_f[i] = `false;
status_f[i] = `false;
end // loop
cmd_name = "SET";
valid_token = `false;
token_number = 0;
$lmv_tokenize(inline, 1, 0, token_2, status_f[2]);
pcl_to_set_types(wk_cmd[instype1:instype2],token_2,valid_f[2],msg_level,cmd_name);
if ((valid_f[2] && status_f[2])) begin
case (wk_cmd[instype1:instype2])
mpin, mbus : begin
$lmv_tokenize(inline, 1, 0, token_3, status_f[3]);
pcl_to_object_name_types(wk_cmd[inobject_name1:inobject_name2],token_3,valid_f[3],msg_level,cmd_name);
$lmv_tokenize(inline, 2, 128, token_4, status_f[4]);
wk_cmd[inobject_value1:inobject_value2] = token_4;
valid_f[4] = `true;
$lmv_tokenize(inline, 0, 128, token_5, status_f[5]);
wk_cmd[indelay_val1:indelay_val2] = token_5 * `time_scale_multiplier;
valid_f[5] = `true;
end
mregister : begin
$lmv_tokenize(inline, 1, 0, token_3, status_f[3]);
pcl_to_object_name_types(wk_cmd[inobject_name1:inobject_name2],token_3,valid_f[3],msg_level,cmd_name);
$lmv_tokenize(inline, 2, 128, token_4, status_f[4]);
wk_cmd[inobject_value1:inobject_value2] = token_4;
valid_f[4] = `true;
valid_f[5] = `true;
status_f[5] = `true;
end
endcase
end // if
for (i=2; i <= 5; i = i + 1) begin
if (!(valid_f[i] && status_f[i])) begin
valid_token = `false;
token_number = i;
disable block_get;
end // if
end // loop
valid_token = `true;
wk_cmd[incode1:incode2] = `set_cmd;
end
endtask // get_set_cmd
task get_set_addr_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f [2 : 4];
reg status_f [2 : 4];
integer i;
reg [1:`token_size*8] cmd_name;
reg [`token_size-1:0] token_2;
reg [`token_size-1:0] token_3;
reg [`token_size-1:0] token_4;
begin : block_get
for (i=2; i<=4; i=i+1) begin
valid_f[i] = `false;
status_f[i] = `false;
end // loop
cmd_name = "SET_ADDR";
valid_token = `false;
token_number = 0;
token_2= "";
token_3= "";
token_4= "";
$lmv_tokenize(inline, 1, 128, token_2, status_f[2]);
pcl_to_mem_types(wk_cmd[inmtype1:inmtype2],token_2,valid_f[2],msg_level,cmd_name);
$lmv_tokenize(inline, 2, 128, token_3, status_f[3]);
wk_cmd[insaddr1:insaddr2] = token_3;
valid_f[3] = `true;
$lmv_tokenize(inline, 2, 128, token_4, status_f[4]);
wk_cmd[inobject_value1:inobject_value2] = token_4;
valid_f[4] = `true;
for (i = 2; i <= 4; i = i + 1) begin
if (!(valid_f[i] && status_f[i])) begin
valid_token = `false;
token_number = i;
disable block_get;
end // if
end // loop
valid_token = `true;
wk_cmd[incode1:incode2] = `set_addr_cmd;
end
endtask // get_set_addr_cmd
task get_get_cmd;
input [1:`token_size*8*10] inline;
output valid_token;
output [31:0] token_number;
input [31:0] msg_level;
reg valid_f [2 : 4];
reg status_f [2 : 4];
integer i;
reg [1:`token_size*8] cmd_name;
reg [`token_size-1:0] token_2;
reg [`token_size-1:0] token_3;
reg [`token_size-1:0] token_4;
begin : block_get
for (i=2; i<=4; i=i+1) begin
valid_f[i] = `false;
status_f[i] = `false;
end // loop
cmd_name = "GET";
valid_token = `false;
token_number = 0;
token_2= "";
token_3= "";
token_4= "";
$lmv_tokenize(inline, 1, 128, token_2, status_f[2]);
pcl_to_set_types(wk_cmd[instype1:instype2],token_2,valid_f[2],msg_level,cmd_name);
$lmv_tokenize(inline, 1, 128, token_3, status_f[3]);
pcl_to_object_name_types(wk_cmd[inobject_name1:inobject_name2],token_3,valid_f[3],msg_level,cmd_name);
$lmv_tokenize(inline, 2, 128, token_4, status_f[4]);
wk_cmd[inexpected_data1:inexpected_data2] = token_4;
valid_f[4] = `true;
for (i = 2; i <= 4; i = i + 1) begin
if (!(valid_f[i] && status_f[i])) begin
valid_token = `false;
token_number = i;
disable block_get;
end // if
This page: |
Created: | Thu Aug 19 11:57:47 1999 |
| From: |
../../../sparc_v8/system/lmc/rtl/pcislave_timing.v
|