parameter pbenn_6 = 86;
parameter pbenn_7 = 87;
parameter ppar64_pin = 88;
parameter preq64nn_pin = 89;
parameter pack64nn_pin = 90;
parameter plocknn_pin = 91;
parameter pperrnn_pin = 92;
parameter pserrnn_pin = 93;
parameter psbonn_pin = 94;
parameter psdone_pin = 95;
//type set_types is :
parameter mpin = 96;
parameter mbus = 97;
parameter mregister = 98;
//type address_mode is :
parameter linear = 99;
parameter toggle = 100;
parameter wrap = 101;
parameter reserved = 102;
//type read_types is :
parameter intr_ack = 103;
parameter io_read = 104;
parameter rsvd4 = 105;
parameter mem_read = 106;
parameter rsvd8 = 107;
parameter config_read = 108;
parameter mem_read_mul = 109;
parameter mem_read_line = 110;
parameter mem_read64 = 136;
parameter mem_read_mul64 = 137;
parameter mem_read_line64 = 138;
//type write_types is :
parameter special_cyc = 111;
parameter io_write = 112;
parameter rsvd5 = 113;
parameter mem_write = 114;
parameter rsvd9 = 115;
parameter config_write = 116;
parameter mem_write_inv = 117;
parameter mem_write64 = 139;
parameter mem_write_inv64 = 140;
//type config_types is :
parameter dual_ad = 118;
parameter pci_error = 119;
parameter cdelay = 120;
parameter step = 121;
parameter same = 122;
parameter back = 123;
parameter mode = 124;
parameter dummy_cfg = 125;
parameter x_trans = 126;
parameter dev_id = 127;
parameter ven_id = 128;
parameter rev_id = 129;
parameter cls_code = 130;
parameter c_line_size = 131;
parameter max_clk_p = 132;
parameter rl = 133;
parameter tl = 134;
parameter cl = 135;
parameter type1_access = 136;
reg [fm_data_in1:fm_data_in2] fm_data_in_init
;
initial begin
fm_data_in_init[incode1:incode2] = `idle_cmd;
fm_data_in_init[instrobe] = 1'b0;
fm_data_in_init[inrtype1:inrtype2] = intr_ack;
fm_data_in_init[inbyten1:inbyten2] = 64'hxxxxxxxxxxxxxxxx;
fm_data_in_init[inexpected_data1:inexpected_data2] = 64'hxxxxxxxxxxxxxxxx;
fm_data_in_init[indelay1:indelay2] = 0;
fm_data_in_init[inaddr1:inaddr2] = 32'hxxxxxxxx;
fm_data_in_init[intc1:intc2] = 32'h00000000;
fm_data_in_init[inlock1:inlock2] = `false;
fm_data_in_init[inwtype1:inwtype2] = special_cyc;
fm_data_in_init[indata1:indata2] = 64'hxxxxxxxxxxxxxxxx;
fm_data_in_init[inctype1:inctype2] = dual_ad;
fm_data_in_init[invalue_vector1:invalue_vector2] = 64'hxxxxxxxxxxxxxxxx;
fm_data_in_init[invalue_int1:invalue_int2] = 32'h00000000;
fm_data_in_init[invalue_bol] = `false;
fm_data_in_init[inmode1:inmode2] = linear;
fm_data_in_init[invalue_time1:invalue_time2] = 0 * `time_scale_multiplier;
fm_data_in_init[inctype1:inctype2] = dummy_cfg;
fm_data_in_init[inwait_num1:inwait_num2] = 0;
fm_data_in_init[inwakeup_num1:inwakeup_num2] = 0;
fm_data_in_init[incycles1:incycles2] = 1;
fm_data_in_init[insleep_num1:insleep_num2] = 0;
fm_data_in_init[intvalue1:intvalue2] = 0;
fm_data_in_init[inmessage1:inmessage2] = "";
fm_data_in_init[inmlevel1:inmlevel2] = `no_msg;
fm_data_in_init[infunction_name1:infunction_name2] = "";
fm_data_in_init[instype1:instype2] = mpin;
fm_data_in_init[inobject_name1:inobject_name2] = pad_bus;
fm_data_in_init[inobject_value1:inobject_value2] = 28'hxxxxxxx;
fm_data_in_init[indelay_val1:indelay_val2] = 0 * `time_scale_multiplier;
fm_data_in_init[intarget_id1:intarget_id2] = 1;
fm_data_in_init[inmsg1:inmsg2] = "";
fm_data_in_init[inbuffer_f] = `false;
fm_data_in_init[innotify_f] = `false;
fm_data_in_init[inreturn_data_f] = `false;
end
reg [fm_data_in1:fm_data_in2] wk_cmd
; initial wk_cmd
= fm_data_in_init; // fm_data_in
task pcl_to_boolean;
output ret_val;
input [1:`token_size*8] inline;
output valid_f;
input [31:0] msg_level; // default = no_msg;
input [1:13*8] cmd_name; // default = "NO NAME GIVEN"
reg [1:`token_size*8] tmp_inline;
begin
valid_f = `true;
tmp_inline = inline;
case (tmp_inline)
"false","`false" : ret_val = 1'b0;
"true","`true" : ret_val = 1'b1;
default : begin
syntax_warn(cmd_name,tmp_inline,msg_level);
valid_f = `false;
end
endcase
end
endtask // pcl_to_boolean
task pcl_to_address_mode;
output [31:0] ret_val; // address_mode_types
input [1:`token_size*8] inline;
output valid_f;
input [31:0] msg_level; // default = no_msg;
input [1:13*8] cmd_name; // default = "NO NAME GIVEN"
reg [1:`token_size*8] tmp_inline;
begin
valid_f = `true;
tmp_inline = inline;
case (tmp_inline)
"linear" : ret_val = linear;
"toggle" : ret_val = toggle;
"wrap" : ret_val = wrap;
"reserved" : ret_val = reserved;
default : begin
syntax_warn(cmd_name,tmp_inline,msg_level);
valid_f = `false;
end
endcase
end
endtask // pcl_to_address_mode
task syntax_warn;
input [1 : 32*8] cmd_name;
input [1:`token_size*8] token;
input [31 : 0] msg_level; // default = `warnings
begin
if (!(msg_level < `warnings)) begin
$display("WARNING at %0t from %m", $time);
$write(" \"Syntax Error in %0s command: Illegal Value is %0s", cmd_name, token);
$display("\"");
end // if
end
endtask // syntax_warn
task pcl_to_msg_level;
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
task bfm_msg;
input [1 : `token_size*8*10] message;
input [31 : 0] message_level;
input [31 : 0] msg_level;
integer sev_level;
integer note;
begin
note = 100;
sev_level = note;
if (message_level === `warnings) begin
sev_level = `warnings;
end // if
case (sev_level)
note : begin
if ((!(msg_level < message_level))) begin
$display("NOTE at %0t from %m", $time);
$write(" \" %0s", message);
$display("\"");
end // if
end
`warnings : begin
if ((!(msg_level < message_level))) begin
$display("WARNING at %0t from %m", $time);
$write(" \" %0s", message);
$display("\"");
end // if
end
endcase
end
endtask // bfm_msg
function is_command;
input [1 : `token_size*8] inline;
begin
case (inline)
"configure" : is_command = `true;
"read_cycle" : is_command = `true;
"read_intr_ack" : is_command = `true;
"read_continue" : is_command = `true;
"write_cycle" : is_command = `true;
"write_special_cyc" : is_command = `true;
"write_continue" : is_command = `true;
"idle" : is_command = `true;
"sleep" : is_command = `true;
"wakeup" : is_command = `true;
"trigger" : is_command = `true;
"wait_on" : is_command = `true;
"print_msg" : is_command = `true;
"set_msg_level" : is_command = `true;
"call" : is_command = `true;
"func_beg" : is_command = `true;
"func_end" : is_command = `true;
"sequential" : is_command = `true;
"stop_sim" : is_command = `true;
"wait_on_node" : is_command = `true;
"open_buffer" : is_command = `true;
"close_buffer" : is_command = `true;
"set" : is_command = `true;
"get" : is_command = `true;
"remote" : is_command = `true;
default is_command = `false;
endcase
end
endfunction // is_command
task pcl_to_object_name_types;
output [31:0] ret_val; // object_name_types
input [1:`token_size*8] inline;
output valid_f;
input [31:0] msg_level; // default = no_msg;
input [1:13*8] cmd_name; // default = "NO NAME GIVEN"
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_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;
"preqnn_pin" : ret_val = preqnn_pin;
"pgntnn_pin" : ret_val = pgntnn_pin;
"pclk_pin" : ret_val = pclk_pin;
"pclkrunnn_pin" : ret_val = pclkrunnn_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;
"psbonn_pin" : ret_val = psbonn_pin;
"psdone_pin" : ret_val = psdone_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_set_types;
output [31:0] ret_val; // set_types
input [1:`token_size*8] inline;
output valid_f;
input [31:0] msg_level; // default = no_msg;
input [1:13*8] cmd_name; // default = "NO NAME GIVEN"
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_read_types;
output [31:0] ret_val; // read_types
input [1:`token_size*8] inline;
output valid_f;
input [31:0] msg_level; // default = no_msg;
input [1:13*8] cmd_name; // default = "NO NAME GIVEN"
reg [1:`token_size*8] tmp_inline;
begin
valid_f = `true;
tmp_inline = inline;
case (tmp_inline)
"intr_ack" : ret_val = intr_ack;
"io_read" : ret_val = io_read;
"rsvd4" : ret_val = rsvd4;
"mem_read" : ret_val = mem_read;
"mem_read64" : ret_val = mem_read64;
"rsvd8" : ret_val = rsvd8;
"config_read" : ret_val = config_read;
"mem_read_mul" : ret_val = mem_read_mul;
"mem_read_mul64" : ret_val = mem_read_mul64;
"mem_read_line" : ret_val = mem_read_line;
"mem_read_line64" : ret_val = mem_read_line64;
default : begin
syntax_warn(cmd_name,tmp_inline,msg_level);
valid_f = `false;
end
endcase
end
endtask // pcl_to_read_types
task pcl_to_write_types;
output [31:0] ret_val; // write_types
input [1:`token_size*8] inline;
output valid_f;
input [31:0] msg_level; // default = no_msg;
input [1:13*8] cmd_name; // default = "NO NAME GIVEN"
reg [1:`token_size*8] tmp_inline;
begin
valid_f = `true;
tmp_inline = inline;
case (tmp_inline)
"special_cyc" : ret_val = special_cyc;
"io_write" : ret_val = io_write;
"rsvd5" : ret_val = rsvd5;
"mem_write" : ret_val = mem_write;
"mem_write64" : ret_val = mem_write64;
"rsvd9" : ret_val = rsvd9;
"config_write" : ret_val = config_write;
"mem_write_inv" : ret_val = mem_write_inv;
"mem_write_inv64" : ret_val = mem_write_inv64;
default : begin
syntax_warn(cmd_name,tmp_inline,msg_level);
valid_f = `false;
end
endcase
end
endtask // pcl_to_write_types
task pcl_to_config_types;
output [31:0] ret_val; // config_types
input [1:`token_size*8] inline;
output valid_f;
input [31:0] msg_level; // default = no_msg;
input [1:13*8] cmd_name; // defaut = "NO NAME GIVEN"
reg [1:`token_size*8] tmp_inline;
begin
valid_f = `true;
tmp_inline = inline;
case (tmp_inline)
"dual_ad" : ret_val = dual_ad;
"pci_error" : ret_val = pci_error;
"cdelay" : ret_val = cdelay;
"step" : ret_val = step;
"same" : ret_val = same;
"back" : ret_val = back;
"mode" : ret_val = mode;
"dummy_cfg" : ret_val = dummy_cfg;
"x_trans" : ret_val = x_trans;
"dev_id" : ret_val = dev_id;
"ven_id" : ret_val = ven_id;
"rev_id" : ret_val = rev_id;
"cls_code" : ret_val = cls_code;
"c_line_size" : ret_val = c_line_size;
"max_clk_p" : ret_val = max_clk_p;
"rl" : ret_val = rl;
"tl" : ret_val = tl;
"cl" : ret_val = cl;
"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 get_read_intr_ack_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:13*8] cmd_name;
reg [`token_size-1: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 // loop
cmd_name = "READ_INTR_ACK";
token_number = 0;
wk_cmd[inrtype1:inrtype2] = intr_ack;
$lmv_tokenize(inline, 2, 128, token_2, status_f[2]);
wk_cmd[inbyten1:inbyten2] = token_2;
valid_f[2] = `true;
$lmv_tokenize(inline, 2, 128, token_3, status_f[3]);
wk_cmd[inexpected_data1:inexpected_data2] = 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] = `read_cycle_cmd;
end
endtask // get_read_intr_ack_cmd
task get_read_cycle_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:8];
reg status_f [2:8];
reg [1:10*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;
reg [`token_size-1:0] token_6;
reg [`token_size-1:0] token_7;
reg [`token_size-1:0] token_8;
integer i;
begin : block_get
for (i=2; i<=8; i=i+1) begin
valid_f[i] = `false;
status_f[i] = `false;
end // loop
cmd_name = "READ_CYCLE";
valid_token = `false;
token_number = 0;
$lmv_tokenize(inline, 1, 0, token_2, status_f[2]);
pcl_to_read_types(wk_cmd[inrtype1:inrtype2],token_2,valid_f[2],msg_level,cmd_name);
if ((valid_f[2] && status_f[2])) begin
case (wk_cmd[inrtype1:inrtype2])
intr_ack : begin
valid_f[3] = `true;
status_f[3] = `true;
valid_f[4] = `true;
status_f[4] = `true;
valid_f[5] = `true;
status_f[5] = `true;
end
io_read, rsvd4, mem_read, mem_read64, rsvd8, config_read, mem_read_mul, mem_read_mul64, mem_read_line, mem_read_line64 : begin
$lmv_tokenize(inline, 2, 128, token_3, status_f[3]);
wk_cmd[inaddr1:inaddr2] = token_3;
valid_f[3] = `true;
$lmv_tokenize(inline, 0, 128, token_4, status_f[4]);
wk_cmd[intc1:intc2] = token_4;
valid_f[4] = `true;
$lmv_tokenize(inline, 2, 128, token_5, status_f[5]);
wk_cmd[inbyten1:inbyten2] = token_5;
valid_f[5] = `true;
$lmv_tokenize(inline, 2, 128, token_6, status_f[6]);
wk_cmd[inexpected_data1:inexpected_data2] = token_6;
valid_f[6] = `true;
$lmv_tokenize(inline, 0, 128, token_7, status_f[7]);
wk_cmd[indelay1:indelay2] = token_7;
valid_f[7] = `true;
$lmv_tokenize(inline, 1, 128, token_8, status_f[8]);
pcl_to_boolean(wk_cmd[inlock1:inlock2],token_8,valid_f[8],msg_level,cmd_name);
end
endcase
end // if
for (i = 2; i <= 8; 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] = `read_cycle_cmd;
end
endtask // get_read_cycle_cmd
task get_read_continue_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:13*8] cmd_name;
reg [`token_size-1: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 // loop
cmd_name = "READ_CONTINUE";
valid_token = `false;
token_number = 0;
$lmv_tokenize(inline, 2, 128, token_2, status_f[2]);
wk_cmd[inbyten1:inbyten2] = token_2;
valid_f[2] = `true;
$lmv_tokenize(inline, 2, 128, token_3, status_f[3]);
wk_cmd[inexpected_data1:inexpected_data2] = 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] = `read_continue_cmd;
end
endtask // get_read_continue_cmd
task get_write_special_cyc_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:14*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 = "WRITE_SPECIAL_CYC";
valid_token = `false;
token_number = 0;
wk_cmd[inwtype1:inwtype2] = special_cyc;
$lmv_tokenize(inline, 2, 128, token_2, status_f[2]);
wk_cmd[inbyten1:inbyten2] = token_2;
valid_f[2] = `true;
$lmv_tokenize(inline, 2, 128, token_3, status_f[3]);
wk_cmd[indata1:indata2] = 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;
$lmv_tokenize(inline, 1, 128, token_5, status_f[5]);
pcl_to_boolean(wk_cmd[inlock1:inlock2],token_5,valid_f[5],msg_level,cmd_name);
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] = `write_cycle_cmd;
end
endtask // get_write_special_cyc_cmd
task get_write_cycle_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:8];
reg status_f [2:8];
reg [1:11*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;
reg [`token_size-1:0] token_6;
reg [`token_size-1:0] token_7;
reg [`token_size-1:0] token_8;
integer i;
begin : block_get
for (i=2; i <= 8; i = i + 1) begin
valid_f[i] = `false;
status_f[i] = `false;
end // loop
cmd_name = "WRITE_CYCLE";
valid_token = `false;
token_number = 0;
token_2 = "";
token_3 = "";
token_4 = "";
token_5 = "";
token_6 = "";
token_7 = "";
token_8 = "";
$lmv_tokenize(inline, 1, 0, token_2, status_f[2]);
pcl_to_write_types(wk_cmd[inwtype1:inwtype2],token_2,valid_f[2],msg_level,cmd_name);
$lmv_tokenize(inline, 2, 128, token_3, status_f[3]);
wk_cmd[inaddr1:inaddr2] = token_3;
valid_f[3] = `true;
$lmv_tokenize(inline, 0, 128, token_4, status_f[4]);
wk_cmd[intc1:intc2] = token_4;
valid_f[4] = `true;
$lmv_tokenize(inline, 2, 128, token_5, status_f[5]);
wk_cmd[inbyten1:inbyten2] = token_5;
valid_f[5] = `true;
$lmv_tokenize(inline, 2, 128, token_6, status_f[6]);
wk_cmd[indata1:indata2] = token_6;
valid_f[6] = `true;
$lmv_tokenize(inline, 0, 128, token_7, status_f[7]);
wk_cmd[indelay1:indelay2] = token_7;
valid_f[7] = `true;
$lmv_tokenize(inline, 1, 128, token_8, status_f[8]);
pcl_to_boolean(wk_cmd[inlock1:inlock2],token_8,valid_f[8],msg_level,cmd_name);
for (i=2; i <= 8; 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] = `write_cycle_cmd;
end
endtask // get_write_cycle_cmd
task get_write_continue_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:14*8] cmd_name;
reg [`token_size-1: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 // loop
cmd_name = "WRITE_CONTINUE";
valid_token = `false;
token_number = 0;
$lmv_tokenize(inline, 2, 128, token_2, status_f[2]);
wk_cmd[inbyten1:inbyten2] = token_2;
valid_f[2] = `true;
$lmv_tokenize(inline, 2, 128, token_3, status_f[3]);
wk_cmd[indata1:indata2] = 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] = `write_continue_cmd;
end
endtask // get_write_continue_cmd
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:6];
reg status_f [2:6];
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;
reg [`token_size-1:0] token_5;
reg [`token_size-1:0] token_6;
integer i;
begin : block_get
for (i=2; i<=6; 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, cls_code, c_line_size, dual_ad : 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;
valid_f[5] = `true;
status_f[5] = `true;
valid_f[6] = `true;
status_f[6] = `true;
end
cdelay, pci_error, step, cl, rl, tl : begin
$lmv_tokenize(inline, 0, 256, token_3, status_f[3]);
wk_cmd[invalue_int1:invalue_int2] = token_3;
valid_f[3] = `true;
valid_f[4] = `true;
status_f[4] = `true;
valid_f[5] = `true;
status_f[5] = `true;
valid_f[6] = `true;
status_f[6] = `true;
end
same, back, x_trans ,type1_access: begin
$lmv_tokenize(inline, 1, 0, token_3, status_f[3]);
pcl_to_boolean(wk_cmd[invalue_bol],token_3,valid_f[3],msg_level,cmd_name);
valid_f[4] = `true;
status_f[4] = `true;
valid_f[5] = `true;
status_f[5] = `true;
valid_f[6] = `true;
status_f[6] = `true;
end
mode : begin
$lmv_tokenize(inline, 1, 256, token_3, status_f[3]);
pcl_to_address_mode(wk_cmd[inmode1:inmode2],token_3,valid_f[3],msg_level,cmd_name);
valid_f[4] = `true;
status_f[4] = `true;
valid_f[5] = `true;
status_f[5] = `true;
valid_f[6] = `true;
status_f[6] = `true;
end
max_clk_p : begin
$lmv_tokenize(inline, 0, 256, token_3, status_f[3]);
wk_cmd[invalue_time1:invalue_time2] = token_3 * `time_scale_multiplier;
valid_f[3] = `true;
valid_f[4] = `true;
status_f[4] = `true;
valid_f[5] = `true;
status_f[5] = `true;
valid_f[6] = `true;
status_f[6] = `true;
end
endcase
end // if
for (i = 2; i <= 6; 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_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];
reg [1:4*8] cmd_name;
reg [`token_size-1:0] token_2;
integer i;
begin : block_get
valid_f[2] = `false;
status_f[2] = `false;
cmd_name = "IDLE";
valid_token = `false;
token_number = 0;
$lmv_tokenize(inline, 0, 0, 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_sleep_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:5*8] cmd_name;
reg [`token_size-1:0] token_2;
integer i;
begin : block_get
valid_f[2] = `false;
status_f[2] = `false;
cmd_name = "SLEEP";
valid_token = `false;
token_number = 0;
$lmv_tokenize(inline, 0, 0, token_2, status_f[2]);
wk_cmd[inwait_num1:inwait_num2] = 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] = `sleep_cmd;
end
endtask // get_sleep_cmd
task get_wakeup_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:6*8] cmd_name;
reg [`token_size-1:0] token_2;
integer i;
begin : block_get
valid_f[2] = `false;
status_f[2] = `false;
cmd_name = "WAKEUP";
valid_token = `false;
token_number = 0;
$lmv_tokenize(inline, 0, 0, token_2, status_f[2]);
wk_cmd[inwakeup_num1:inwakeup_num2] = token_2;
valid_f[2] = `true;
This page: |
Created: | Thu Aug 19 12:03:04 1999 |
| From: |
../../../sparc_v8/system/lmc/rtl/pcimaster_timing.v
|