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;
initial fm_cmd = timing.fm_data_in_init;
//!!8.0 change - used ^^^ fm_data_in_init in timing
reg check_cb_ack
; initial check_cb_ack
= 1'b0;
parameter zero_delay = {32'h0, 32'h0, 32'h0, 32'h0};
//integer msg_level; initial msg_level = `debug_int; //`no_msg;
integer msg_level
; initial msg_level
= gen_debug_level + 1;
integer cmd_src
; initial cmd_src
= `embedded;
//!!8.0.burst
integer delete_cmd_code
; initial delete_cmd_code
= `null_cmd; //code of command to delete from ctrl_queue;
//assigned by modeler, deleted within get_nxt_cmd
integer lq_delete_cmd_code
; initial lq_delete_cmd_code
= `null_cmd; //code of command to delete from ctrl_queue;
//assigned by controller, deleted within load_queue
reg lq_vfyn_f
; initial lq_vfyn_f
= `false; //flag to notify load_queue that it should verify the
//next multi-cycle command queued is NOT lq_delete_cmd_code
//!!8.0.burst
parameter initial_max_cmd_mem_size = 400; //Change initial value to alter the size of the
//internal memory which is used to store commands
//read from the external command file
integer max_cmd_mem_size
; initial max_cmd_mem_size
= initial_max_cmd_mem_size - 5;
parameter max_ctrl_queue_size = 2000; //Change initial value to alter the size of the
//internal memory which is used to store commands
//that are queued to be executed
reg new_cmd_f
; initial new_cmd_f
= `false;
//signifies when ctrl_queue_beg holds a new command,
//get_nxt_cmd sets false when this command is next, only used by slave type devices
reg [`slv_size:0] tmp_saddr
;
reg [`slv_size:0] tt_saddr
;
integer load_mem_addr
; initial load_mem_addr
= 0; //for loading from file and buffered cb commands
integer curr_mem_addr
; initial curr_mem_addr
= 0; //for loading from cmd_memory
reg [1:`token_size*8] nul_token
; initial nul_token
= "";
reg [1:`max_cmd_size*8] nul_cmd_str
; initial nul_cmd_str
= "";
reg [cbfield1:cbfield2] cb_field_local_cmd
; // control_bus_type
initial begin
cb_field_local_cmd[cbinitiator_id1:cbinitiator_id2] = id_number;
cb_field_local_cmd[cbtarget_id1:cbtarget_id2] = id_number;
cb_field_local_cmd[cbtransaction1:cbtransaction2] = `cmd_trans;
cb_field_local_cmd[cbbuffer_f] = 1'b0;
cb_field_local_cmd[cbnotify_f] = 1'b0;
cb_field_local_cmd[cbreturn_data_f] = 1'b0;
cb_field_local_cmd[cbdone_f] = 1'b0;
cb_field_local_cmd[cbdvalid_f] = 1'b0;
cb_field_local_cmd[cbbuffer_avail_f] = 1'b0;
cb_field_local_cmd[cbmsg1:cbmsg2] = nul_cmd_str;
cb_field_local_cmd[cbtag1:cbtag2] = 0;
end
//return data/expected data variables --used by return_data,done_chks
reg dvalid_f
; initial dvalid_f
= `false;
reg [`slv_size-1 : 0] ret_addr_slv
; //initial ret_addr_slv = "";
reg [`slv_size-1 : 0] ret_data_slv
; //initial ret_data_slv = "";
reg [`slv_size-1 : 0] ret_data_mask
;
reg [127:0] ret_data_ary
[0 : `ret_ary_len-1]; // ret_data_ary
reg [127:0] ret_data_ary_hold
;
integer ret_data_ptr
; initial ret_data_ptr
= 0;
integer ret_data_t
; initial ret_data_t
= 0 * `time_scale_multiplier;
reg [cbfield1:cbfield2] dspch_data
; // control_bus_type
reg dspch_data_f
; initial dspch_data_f
= `false;
reg wait_on_done_f
; initial wait_on_done_f
= `false;
reg done_f_rcvd
; initial done_f_rcvd
= `false;
integer wait_on_done_tag
; initial wait_on_done_tag
= 0;
reg issued_busy_f
; initial issued_busy_f
= `false;
reg wait_on_avail_f
; initial wait_on_avail_f
= `false;
integer wait_on_avail_id
; initial wait_on_avail_id
= 0;
reg fm_cmd_strobe_event
;
always @(fm_cmd[instrobe]) begin
fm_cmd_strobe_event = `true;
fm_cmd_strobe_event <= #(0) `false;
end
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 [1:32*8] cmd2string;
input [31:0] cmd_code;
reg [1:32*8] tmp_str;
begin
case (cmd_code)
`remote_cmd : tmp_str = " remote_cmd ";
`restart_cmd : tmp_str = " restart_cmd ";
`rte_cmd : tmp_str = " rte_cmd ";
`trigger_cmd : tmp_str = " trigger_cmd ";
`wait_on_cmd : tmp_str = " wait_on_cmd ";
`print_msg_cmd : tmp_str = " print_msg_cmd ";
`set_msg_level_cmd : tmp_str = " set_msg_level_cmd ";
`call_cmd : tmp_str = " call_cmd ";
`open_buffer_cmd : tmp_str = " open_buffer_cmd ";
`close_buffer_cmd : tmp_str = " close_buffer_cmd ";
`func_beg_cmd : tmp_str = " func_beg_cmd ";
`func_end_cmd : tmp_str = " func_end_cmd ";
`sequential_cmd : tmp_str = " sequential_cmd ";
`stop_sim_cmd : tmp_str = " stop_sim_cmd ";
`wait_on_node_cmd : tmp_str = " wait_on_node_cmd ";
`set_cmd : tmp_str = " set_cmd ";
`get_cmd : tmp_str = " get_cmd ";
`reload_cmd : tmp_str = " reload_cmd ";
`dump_cmd : tmp_str = " dump_cmd ";
`configure_cmd : tmp_str = " configure_cmd ";
`query_cmd : tmp_str = " query_cmd ";
`idle_cmd : tmp_str = " idle_cmd ";
`read_cycle_cmd : tmp_str = " read_cycle_cmd ";
`read_continue_cmd : tmp_str = " read_continue_cmd ";
`write_cycle_cmd : tmp_str = " write_cycle_cmd ";
`write_continue_cmd : tmp_str = " write_continue_cmd ";
`read_mod_write_cmd : tmp_str = " read_modify_write_cmd ";
`read_until : tmp_str = " read_until_compare ";
`transfer_cmd : tmp_str = " transfer_cmd ";
`request_cmd : tmp_str = " request_cmd ";
`connect_cmd : tmp_str = " connect_cmd ";
`detach_cmd : tmp_str = " detach_cmd ";
`wakeup_cmd : tmp_str = " wakeup_cmd ";
`sleep_cmd : tmp_str = " sleep_cmd ";
`start_cmd : tmp_str = " start_cmd ";
`halt_cmd : tmp_str = " halt_cmd ";
`shutdown_cmd : tmp_str = " shutdown_cmd ";
`null_cmd : tmp_str = " null_cmd ";
default : tmp_str = " illegal cmd[incode1:incode2] ";
endcase
cmd2string = tmp_str;
end
endfunction // cmd2string
function [1:16*8] cbackval2string;
input [31:0] ack_val;
reg [1:16*8] tmp;
begin
case (ack_val)
`ack_rsp : tmp = "ack_rsp";
`busy_rsp : tmp = "busy_rsp";
`unknown : tmp = "unknown";
`Release : tmp = "Release";
endcase
cbackval2string = tmp;
end
endfunction // cbackval2string
function [1:16*8] trans2string;
input [31:0] trans_val;
begin
case (trans_val)
`cmd_trans : trans2string = "cmd_trans";
`status_trans : trans2string = "status_trans";
endcase
end
endfunction // trans2string
task cb2string;
input [cbfield1:cbfield2] cb;
begin
if (cb[cbtransaction1:cbtransaction2] === `cmd_trans) begin
$display(" \"initiator_id = %0d", cb[cbinitiator_id1:cbinitiator_id2]);
$display(" target_id = %0d", cb[cbtarget_id1:cbtarget_id2]);
$display(" transaction = %0s", trans2string(cb[cbtransaction1:cbtransaction2]));
$display(" buffer_f = %b", cb[cbbuffer_f]);
$display(" notify_f = %b", cb[cbnotify_f]);
$display(" return_data_f = %b", cb[cbreturn_data_f]);
$display(" msg = %0s", cb[cbmsg1:cbmsg2]);
$display(" tag = %0d\"", cb[cbtag1:cbtag2]);
end else if (cb[cbtransaction1:cbtransaction2] === `status_trans) begin
$display(" \"initiator_id = %0d", cb[cbinitiator_id1:cbinitiator_id2]);
$display(" target_id = %0d", cb[cbtarget_id1:cbtarget_id2]);
$display(" transaction = %0s", trans2string(cb[cbtransaction1:cbtransaction2]));
$display(" done_f = %b", cb[cbdone_f]);
$display(" dvalid_f = %b", cb[cbdvalid_f]);
$display(" buffer_avail_f = %b", cb[cbbuffer_avail_f]);
$display(" msg = %0s", cb[cbmsg1:cbmsg2]);
$display(" tag = %0d\"", cb[cbtag1:cbtag2]);
end // if
end
endtask // cb2string
//----------------------
// MEMORY STRUCTURES --
//----------------------
//Controller Command Queue
//dynamic fifo - allocated/deallocated with every queue/dequeue, respectively
parameter end_of_queue = 0;
parameter beg_of_queue = 1;
integer ctrl_queue_pointer
; initial ctrl_queue_pointer
= 1;
integer ctrl_queue_size
; initial ctrl_queue_size
= 0;
reg [ctrl_store1:ctrl_store2] ctrl_queue
[1 : max_ctrl_queue_size]; // ctrl_store_data
reg [ctrl_store1:ctrl_store2] ctrl_queue_hold
; // ctrl_store_data
reg [ctrl_store1:ctrl_store2] temp_ctrl_queue
;
integer temp_cmd_ptr
;
reg [ctrl_store1:ctrl_store2] temp_cmd
; // ctrl_store_data
integer queue_size
; initial queue_size
= 0;
integer num_non_immed_queued
; initial num_non_immed_queued
= 0;
integer strd_queue_pointer
; initial strd_queue_pointer
= 0;
reg [ctrl_store1:ctrl_store2] strd_queue
[1 : 10]; // ctrl_store_data
integer strd_queue_beg
;
integer strd_queue_end
;
integer strd_queue_size
; initial strd_queue_size
= 0;
integer strd_num_non_immed_queued
; initial strd_num_non_immed_queued
= 0;
reg strd_stop_queuing_f
; initial strd_stop_queuing_f
= `false;
//Command Memory Structure
//exe_nxt_buf, stores remote-execute type commands, used only as one-deep queue
integer exe_nxt_buf_pointer
; initial exe_nxt_buf_pointer
= 0;
reg [ctrl_store1:ctrl_store2] exe_nxt_buf
[1 : 1]; // ctrl_store_data
reg [ctrl_store1:ctrl_store2] exe_nxt_buf_hold
; // ctrl_store_data
//external file and remote-buffer commands (including P-code)
reg cmd_mem_full_f
; initial cmd_mem_full_f
= `false;
integer cmd_mem_counter
; initial cmd_mem_counter
= 0;
reg [cbfield1:cbfield2] tmp_cb
; initial tmp_cb
= cb_field_local_cmd; // control_bus_type
reg [cbfield1:cbfield2] cmd_mem
[1 : initial_max_cmd_mem_size]; // control_bus_type
reg [cbfield1:cbfield2] cmd_mem_hold
;
//==================================================================--
// TOOL-GENERATED MODEL-SPECIFIC VARIABLES --
//==================================================================--
//Command Pipelining
parameter pipeline_depth = 1; //size of executer's cmd_queue
integer cmd_queue_pointer
; initial cmd_queue_pointer
= 0;
reg [fm_data_in1:fm_data_in2] cmd_queue
[0 : pipeline_depth-1]; // fm_data_in
reg [fm_data_in1:fm_data_in2] cmd_queue_hold
;
integer i
;
initial begin
for (i = 0; i <= pipeline_depth-1; i = i + 1) cmd_queue[i] = timing.fm_data_in_init;
//!!8.0 change - used fm_data_in_init in timing ^^^^^^^
end
reg [fm_data_in1:fm_data_in2] curr_cmd
; // fm_data_in
initial curr_cmd = timing.fm_data_in_init; //updated by controller, used by executer,
//!!8.0 change - used ^^^ fm_data_in_init in timing
//holds copy of cmd_queue[0]
reg [31:0] pad_out_mask
; initial pad_out_mask
= 32'h0;
reg [63:32] pd_out_mask
; initial pd_out_mask
= 32'h0;
reg [3:0] pcxbenn_out_mask
; initial pcxbenn_out_mask
= 4'h0;
reg [7:4] pbenn_out_mask
; initial pbenn_out_mask
= 4'h0;
reg x_transition_l
; initial x_transition_l
= `true;
//==================================================================--
// TOOL-GENERATED MODEL-SPECIFIC SUBPROGRAMS --
//==================================================================--
//--------------------------
// PIN OUTPUT SUBPROGRAMS --
//--------------------------
task pad_out;
input [31:0] output_vector;
input [127:0] delay_in;
input [31:0] skew_in;
integer delay[0:3];
integer delay_time, skew, i;
begin
delay[0] = delay_in[31:0];
delay[1] = delay_in[63:32];
delay[2] = delay_in[95:64];
delay[3] = delay_in[127:96];
skew = skew_in;
for (i=0; i<=31; i=i+1) begin
begin : pad_loop
if (pad_out_mask[i] !== 1'b1) begin
delay_time = delay[lmcver.map(output_vector[i])] + model_times.tld_pad[i] + skew;
if (delay_time < 0) begin delay_time = 0; end
if (! x_transition_l && output_vector[i] === 1'bx && delay_time === 0)
begin
disable pad_loop;
end
case (i)
0: pad_reg_0 <= #( delay_time) output_vector[i];
1: pad_reg_1 <= #( delay_time) output_vector[i];
2: pad_reg_2 <= #( delay_time) output_vector[i];
3: pad_reg_3 <= #( delay_time) output_vector[i];
4: pad_reg_4 <= #( delay_time) output_vector[i];
5: pad_reg_5 <= #( delay_time) output_vector[i];
6: pad_reg_6 <= #( delay_time) output_vector[i];
7: pad_reg_7 <= #( delay_time) output_vector[i];
8: pad_reg_8 <= #( delay_time) output_vector[i];
9: pad_reg_9 <= #( delay_time) output_vector[i];
10: pad_reg_10 <= #( delay_time) output_vector[i];
11: pad_reg_11 <= #( delay_time) output_vector[i];
12: pad_reg_12 <= #( delay_time) output_vector[i];
13: pad_reg_13 <= #( delay_time) output_vector[i];
14: pad_reg_14 <= #( delay_time) output_vector[i];
15: pad_reg_15 <= #( delay_time) output_vector[i];
16: pad_reg_16 <= #( delay_time) output_vector[i];
17: pad_reg_17 <= #( delay_time) output_vector[i];
18: pad_reg_18 <= #( delay_time) output_vector[i];
19: pad_reg_19 <= #( delay_time) output_vector[i];
20: pad_reg_20 <= #( delay_time) output_vector[i];
21: pad_reg_21 <= #( delay_time) output_vector[i];
22: pad_reg_22 <= #( delay_time) output_vector[i];
23: pad_reg_23 <= #( delay_time) output_vector[i];
24: pad_reg_24 <= #( delay_time) output_vector[i];
25: pad_reg_25 <= #( delay_time) output_vector[i];
26: pad_reg_26 <= #( delay_time) output_vector[i];
27: pad_reg_27 <= #( delay_time) output_vector[i];
28: pad_reg_28 <= #( delay_time) output_vector[i];
29: pad_reg_29 <= #( delay_time) output_vector[i];
30: pad_reg_30 <= #( delay_time) output_vector[i];
31: pad_reg_31 <= #( delay_time) output_vector[i];
endcase
end // if
end // pad_loop
end
pad_out_mask = 32'h0;
end
endtask // pad_out
task pcxbenn_out;
input [3:0] output_vector;
input [127:0] delay_in;
input [31:0] skew_in;
integer delay[0:3];
integer delay_time, skew, i;
begin
delay[0] = delay_in[31:0];
delay[1] = delay_in[63:32];
delay[2] = delay_in[95:64];
delay[3] = delay_in[127:96];
skew = skew_in;
for (i=0; i<=3; i=i+1) begin
begin : pcxbenn_loop
if (pcxbenn_out_mask[i] !== 1'b1) begin
delay_time = delay[lmcver.map(output_vector[i])] + model_times.tld_pcxbenn[i] + skew;
if (delay_time < 0) begin delay_time = 0; end
if (! x_transition_l && output_vector[i] === 1'bx && delay_time === 0)
begin
disable pcxbenn_loop;
end
case (i)
0: pcxbenn_reg_0 <= #( delay_time) output_vector[i];
1: pcxbenn_reg_1 <= #( delay_time) output_vector[i];
2: pcxbenn_reg_2 <= #( delay_time) output_vector[i];
3: pcxbenn_reg_3 <= #( delay_time) output_vector[i];
endcase
end // if
end // pcxbenn_loop
end
pcxbenn_out_mask = 4'h0;
end
endtask // pcxbenn_out
task ppar_out;
input output_value;
input [127:0] delay_in;
input [31:0] skew_in;
integer delay[0:3];
integer delay_time, skew, i;
begin
delay[0] = delay_in[31:0];
delay[1] = delay_in[63:32];
delay[2] = delay_in[95:64];
delay[3] = delay_in[127:96];
skew = skew_in;
delay_time = delay[lmcver.map(output_value)] + model_times.tld_ppar + skew;
if (delay_time < 0) begin delay_time = 0; end
if (delay_time < 0) begin delay_time = 0; end
if (! x_transition_l && output_value === 1'bx)
begin
disable ppar_out;
end
ppar_reg <= #( delay_time) output_value;
end
endtask // ppar_out
task pframenn_out;
input output_value;
input [127:0] delay_in;
input [31:0] skew_in;
integer delay[0:3];
integer delay_time, skew, i;
begin
delay[0] = delay_in[31:0];
delay[1] = delay_in[63:32];
delay[2] = delay_in[95:64];
delay[3] = delay_in[127:96];
skew = skew_in;
delay_time = delay[lmcver.map(output_value)] + model_times.tld_pframenn + skew;
if (delay_time < 0) begin delay_time = 0; end
if (!x_transition_l && output_value === 1'bx) begin
disable pframenn_out;
end
pframenn_reg <= #( delay_time) output_value;
end
endtask // pframenn_out
task ptrdynn_out;
input output_value;
input [127:0] delay_in;
input [31:0] skew_in;
integer delay[0:3];
integer delay_time, skew, i;
begin
delay[0] = delay_in[31:0];
delay[1] = delay_in[63:32];
delay[2] = delay_in[95:64];
delay[3] = delay_in[127:96];
skew = skew_in;
delay_time = delay[lmcver.map(output_value)] + model_times.tld_ptrdynn + skew;
if (delay_time < 0) begin delay_time = 0; end
if (!x_transition_l && output_value === 1'bx) begin
disable ptrdynn_out;
end
ptrdynn_reg <= #( delay_time) output_value;
end
endtask // ptrdynn_out
task pirdynn_out;
input output_value;
input [127:0] delay_in;
input [31:0] skew_in;
integer delay[0:3];
integer delay_time, skew, i;
begin
delay[0] = delay_in[31:0];
delay[1] = delay_in[63:32];
delay[2] = delay_in[95:64];
delay[3] = delay_in[127:96];
skew = skew_in;
delay_time = delay[lmcver.map(output_value)] + model_times.tld_pirdynn + skew;
if (delay_time < 0) begin delay_time = 0; end
if (!x_transition_l && output_value === 1'bx) begin
disable pirdynn_out;
end
pirdynn_reg <= #( delay_time) output_value;
end
endtask // pirdynn_out
task pdevselnn_out;
input output_value;
input [127:0] delay_in;
input [31:0] skew_in;
integer delay[0:3];
integer delay_time, skew, i;
begin
delay[0] = delay_in[31:0];
delay[1] = delay_in[63:32];
delay[2] = delay_in[95:64];
delay[3] = delay_in[127:96];
skew = skew_in;
delay_time = delay[lmcver.map(output_value)] + model_times.tld_pdevselnn + skew;
if (delay_time < 0) begin delay_time = 0; end
if (!x_transition_l && output_value === 1'bx) begin
disable pdevselnn_out;
end
pdevselnn_reg <= #( delay_time) output_value;
end
endtask // pdevselnn_out
task preqnn_out;
input output_value;
input [127:0] delay_in;
input [31:0] skew_in;
integer delay[0:3];
integer delay_time, skew, i;
begin
delay[0] = delay_in[31:0];
delay[1] = delay_in[63:32];
delay[2] = delay_in[95:64];
delay[3] = delay_in[127:96];
skew = skew_in;
delay_time = delay[lmcver.map(output_value)] + model_times.tld_preqnn + skew;
if (delay_time < 0) begin delay_time = 0; end
if (!x_transition_l && output_value === 1'bx) begin
disable preqnn_out;
end
preqnn_reg <= #( delay_time) output_value;
end
endtask // preqnn_out
task pclkrunnn_out;
input output_value;
input [127:0] delay_in;
input [31:0] skew_in;
integer delay[0:3];
integer delay_time, skew, i;
begin
delay[0] = delay_in[31:0];
delay[1] = delay_in[63:32];
delay[2] = delay_in[95:64];
delay[3] = delay_in[127:96];
skew = skew_in;
delay_time = delay[lmcver.map(output_value)] + model_times.tld_pclkrunnn + skew;
if (delay_time < 0) begin delay_time = 0; end
pclkrunnn_reg <= #( delay_time) output_value;
end
endtask // pclkrunnn_out
task pd_out;
input [63:32] output_vector;
input [127:0] delay_in;
input [31:0] skew_in;
integer delay[0:3];
integer delay_time, skew, i;
begin
delay[0] = delay_in[31:0];
delay[1] = delay_in[63:32];
delay[2] = delay_in[95:64];
delay[3] = delay_in[127:96];
skew = skew_in;
for (i=32; i<=63; i=i+1) begin
begin : pd_loop
if (pd_out_mask[i] !== 1'b1) begin
delay_time = delay[lmcver.map(output_vector[i])] + model_times.tld_pd[i] + skew;
if (delay_time < 0) begin delay_time = 0; end
if (! x_transition_l && output_vector[i] === 1'bx && delay_time === 0)
begin
disable pd_loop;
end
case (i)
32: pd_reg_32 <= #( delay_time) output_vector[i];
33: pd_reg_33 <= #( delay_time) output_vector[i];
34: pd_reg_34 <= #( delay_time) output_vector[i];
35: pd_reg_35 <= #( delay_time) output_vector[i];
36: pd_reg_36 <= #( delay_time) output_vector[i];
37: pd_reg_37 <= #( delay_time) output_vector[i];
38: pd_reg_38 <= #( delay_time) output_vector[i];
39: pd_reg_39 <= #( delay_time) output_vector[i];
40: pd_reg_40 <= #( delay_time) output_vector[i];
41: pd_reg_41 <= #( delay_time) output_vector[i];
42: pd_reg_42 <= #( delay_time) output_vector[i];
43: pd_reg_43 <= #( delay_time) output_vector[i];
44: pd_reg_44 <= #( delay_time) output_vector[i];
45: pd_reg_45 <= #( delay_time) output_vector[i];
46: pd_reg_46 <= #( delay_time) output_vector[i];
47: pd_reg_47 <= #( delay_time) output_vector[i];
48: pd_reg_48 <= #( delay_time) output_vector[i];
49: pd_reg_49 <= #( delay_time) output_vector[i];
50: pd_reg_50 <= #( delay_time) output_vector[i];
51: pd_reg_51 <= #( delay_time) output_vector[i];
52: pd_reg_52 <= #( delay_time) output_vector[i];
53: pd_reg_53 <= #( delay_time) output_vector[i];
54: pd_reg_54 <= #( delay_time) output_vector[i];
55: pd_reg_55 <= #( delay_time) output_vector[i];
56: pd_reg_56 <= #( delay_time) output_vector[i];
57: pd_reg_57 <= #( delay_time) output_vector[i];
58: pd_reg_58 <= #( delay_time) output_vector[i];
59: pd_reg_59 <= #( delay_time) output_vector[i];
60: pd_reg_60 <= #( delay_time) output_vector[i];
61: pd_reg_61 <= #( delay_time) output_vector[i];
62: pd_reg_62 <= #( delay_time) output_vector[i];
63: pd_reg_63 <= #( delay_time) output_vector[i];
endcase
end // if
end // pd_loop
end
pd_out_mask = 32'h0;
end
endtask // pd_out
task pbenn_out;
input [7:4] output_vector;
input [127:0] delay_in;
input [31:0] skew_in;
integer delay[0:3];
integer delay_time, skew, i;
begin
delay[0] = delay_in[31:0];
delay[1] = delay_in[63:32];
delay[2] = delay_in[95:64];
delay[3] = delay_in[127:96];
skew = skew_in;
for (i=4; i<=7; i=i+1) begin
begin : pbenn_loop
if (pbenn_out_mask[i] !== 1'b1) begin
delay_time = delay[lmcver.map(output_vector[i])] + model_times.tld_pbenn[i] + skew;
if (delay_time < 0) begin delay_time = 0; end
if (! x_transition_l && output_vector[i] === 1'bx && delay_time === 0)
begin
disable pbenn_loop;
end
case (i)
4: pbenn_reg_4 <= #( delay_time) output_vector[i];
5: pbenn_reg_5 <= #( delay_time) output_vector[i];
6: pbenn_reg_6 <= #( delay_time) output_vector[i];
7: pbenn_reg_7 <= #( delay_time) output_vector[i];
endcase
end // if
end // pbenn_loop
end
pbenn_out_mask = 4'h0;
end
endtask // pbenn_out
task ppar64_out;
input output_value;
input [127:0] delay_in;
input [31:0] skew_in;
integer delay[0:3];
integer delay_time, skew, i;
begin
delay[0] = delay_in[31:0];
delay[1] = delay_in[63:32];
delay[2] = delay_in[95:64];
delay[3] = delay_in[127:96];
skew = skew_in;
delay_time = delay[lmcver.map(output_value)] + model_times.tld_ppar64 + skew;
if (delay_time < 0) begin delay_time = 0; end
if (!x_transition_l && output_value === 1'bx) begin
disable ppar64_out;
end
ppar64_reg <= #( delay_time) output_value;
end
endtask // ppar64_out
task preq64nn_out;
input output_value;
input [127:0] delay_in;
input [31:0] skew_in;
integer delay[0:3];
integer delay_time, skew, i;
begin
delay[0] = delay_in[31:0];
delay[1] = delay_in[63:32];
delay[2] = delay_in[95:64];
delay[3] = delay_in[127:96];
skew = skew_in;
delay_time = delay[lmcver.map(output_value)] + model_times.tld_preq64nn + skew;
if (delay_time < 0) begin delay_time = 0; end
if (!x_transition_l && output_value === 1'bx) begin
disable preq64nn_out;
end
preq64nn_reg <= #( delay_time) output_value;
end
endtask // preq64nn_out
task plocknn_out;
input output_value;
input [127:0] delay_in;
input [31:0] skew_in;
integer delay[0:3];
integer delay_time, skew, i;
begin
delay[0] = delay_in[31:0];
delay[1] = delay_in[63:32];
delay[2] = delay_in[95:64];
delay[3] = delay_in[127:96];
skew = skew_in;
delay_time = delay[lmcver.map(output_value)] + model_times.tld_plocknn + skew;
if (delay_time < 0) begin delay_time = 0; end
if (!x_transition_l && output_value === 1'bx) begin
disable plocknn_out;
end
plocknn_reg <= #( delay_time) output_value;
end
endtask // plocknn_out
task pperrnn_out;
input output_value;
input [127:0] delay_in;
input [31:0] skew_in;
integer delay[0:3];
integer delay_time, skew, i;
begin
delay[0] = delay_in[31:0];
delay[1] = delay_in[63:32];
delay[2] = delay_in[95:64];
delay[3] = delay_in[127:96];
skew = skew_in;
delay_time = delay[lmcver.map(output_value)] + model_times.tld_pperrnn + skew;
if (delay_time < 0) begin delay_time = 0; end
if (!x_transition_l && output_value === 1'bx) begin
disable pperrnn_out;
end
pperrnn_reg <= #( delay_time) output_value;
end
endtask // pperrnn_out
//-----------
// EXE_SET --
//-----------
task exe_set;
input [fm_data_in1:fm_data_in2] cmd;
integer stype;
integer object_name;
reg [`slv_size-1:0] object_value;
reg [31:0] delay_val;
reg [31:0] pad_out_data;
reg [31:0] pd_out_data;
reg [3:0] pcxbenn_out_data;
reg [3:0] pbenn_out_data;
begin
stype = cmd[instype1:instype2];
object_name = cmd[inobject_name1:inobject_name2];
object_value = cmd[inobject_value1:inobject_value2];
delay_val = cmd[indelay_val1:indelay_val2];
case (stype)
mpin : begin
case (object_name)
pad_0 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[0] = 1'b0;
pad_out_data[0] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_1 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[1] = 1'b0;
pad_out_data[1] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_2 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[2] = 1'b0;
pad_out_data[2] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_3 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[3] = 1'b0;
pad_out_data[3] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_4 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[4] = 1'b0;
pad_out_data[4] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_5 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[5] = 1'b0;
pad_out_data[5] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_6 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[6] = 1'b0;
pad_out_data[6] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_7 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[7] = 1'b0;
pad_out_data[7] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_8 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[8] = 1'b0;
pad_out_data[8] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_9 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[9] = 1'b0;
pad_out_data[9] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_10 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[10] = 1'b0;
pad_out_data[10] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_11 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[11] = 1'b0;
pad_out_data[11] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_12 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[12] = 1'b0;
pad_out_data[12] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_13 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[13] = 1'b0;
pad_out_data[13] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_14 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[14] = 1'b0;
pad_out_data[14] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_15 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[15] = 1'b0;
pad_out_data[15] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_16 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[16] = 1'b0;
pad_out_data[16] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_17 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[17] = 1'b0;
pad_out_data[17] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_18 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[18] = 1'b0;
pad_out_data[18] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_19 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[19] = 1'b0;
pad_out_data[19] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_20 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[20] = 1'b0;
pad_out_data[20] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_21 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[21] = 1'b0;
pad_out_data[21] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_22 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[22] = 1'b0;
pad_out_data[22] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_23 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[23] = 1'b0;
pad_out_data[23] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_24 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[24] = 1'b0;
pad_out_data[24] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_25 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[25] = 1'b0;
pad_out_data[25] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_26 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[26] = 1'b0;
pad_out_data[26] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_27 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[27] = 1'b0;
pad_out_data[27] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_28 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[28] = 1'b0;
pad_out_data[28] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_29 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[29] = 1'b0;
pad_out_data[29] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_30 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[30] = 1'b0;
pad_out_data[30] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pad_31 : begin
pad_out_mask = 32'hffffffff;
pad_out_mask[0] = 1'b0;
pad_out_data[31] = object_value[0];
pad_out(pad_out_data,zero_delay,delay_val);
end
pcxbenn_0 : begin
pcxbenn_out_mask = 4'b1111;
pcxbenn_out_mask[0] = 1'b0;
pcxbenn_out_data[0] = object_value[0];
pcxbenn_out(pcxbenn_out_data,zero_delay,delay_val);
end
pcxbenn_1 : begin
pcxbenn_out_mask = 4'b1111;
pcxbenn_out_mask[1] = 1'b0;
pcxbenn_out_data[1] = object_value[0];
pcxbenn_out(pcxbenn_out_data,zero_delay,delay_val);
end
pcxbenn_2 : begin
pcxbenn_out_mask = 4'b1111;
pcxbenn_out_mask[2] = 1'b0;
pcxbenn_out_data[2] = object_value[0];
pcxbenn_out(pcxbenn_out_data,zero_delay,delay_val);
end
This page: |
Created: | Thu Aug 19 11:57:00 1999 |
| From: |
../../../sparc_v8/system/lmc/rtl/pcimaster_fm.v
|