Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / model / verilog / mem / fbdimm / design / fbdimm_tasks.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: fbdimm_tasks.v
4// Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
5// 4150 Network Circle, Santa Clara, California 95054, U.S.A.
6//
7// * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8//
9// This program is free software; you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation; version 2 of the License.
12//
13// This program is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU General Public License
19// along with this program; if not, write to the Free Software
20// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21//
22// For the avoidance of doubt, and except that if any non-GPL license
23// choice is available it will apply instead, Sun elects to use only
24// the General Public License version 2 (GPLv2) at this time for any
25// software where a choice of GPL license versions is made
26// available with the language indicating that GPLv2 or any later version
27// may be used, or where a choice of which version of the GPL is applied is
28// otherwise unspecified.
29//
30// Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
31// CA 95054 USA or visit www.sun.com if you need additional information or
32// have any questions.
33//
34// ========== Copyright Header End ============================================
35`ifdef STINGRAY
36
37module fbdimm_tasks();
38
39// This task writes the data into the register memory
40
41task write_fbdimm_reg(input reg [2:0] function_code,input reg [7:0] offset, input reg [31:0] data);
42
43 amb.sb_decoder.register_memory[{function_code,offset}] = data;
44
45endtask
46
47// This function returns the data from the register memory
48
49function [31:0] read_fbdimm_reg(input reg [2:0] function_code, input reg [7:0] offset);
50
51 read_fbdimm_reg = amb.sb_decoder.register_memory[{function_code,offset}];
52
53endfunction
54
55
56// This task programs the registers related to NB crc error injection
57
58task corrupt_nb_crc(input reg [13:0] pn0_crc_mask,
59 input reg [13:0] pn1_crc_mask,
60 input reg [13:0] pn2_crc_mask,
61 input reg [13:0] pn3_crc_mask,
62 input reg [13:0] pn4_crc_mask,
63 input reg [13:0] pn5_crc_mask,
64 input reg [13:0] pn6_crc_mask,
65 input reg [13:0] pn7_crc_mask,
66 input reg [13:0] pn8_crc_mask,
67 input reg [13:0] pn9_crc_mask,
68 input reg [13:0] pn10_crc_mask,
69 input reg [13:0] pn11_crc_mask,
70 input reg [11:0] pn_frame_num,
71 input reg [11:0] pn_crc_freq,
72 input reg [11:0] pn_crc_period);
73/*
74 amb.nb_crc_error_injector.pn0_crc_mask = pn0_crc_mask;
75 amb.nb_crc_error_injector.pn1_crc_mask = pn1_crc_mask;
76 amb.nb_crc_error_injector.pn2_crc_mask = pn2_crc_mask;
77 amb.nb_crc_error_injector.pn3_crc_mask = pn3_crc_mask;
78 amb.nb_crc_error_injector.pn4_crc_mask = pn4_crc_mask;
79 amb.nb_crc_error_injector.pn5_crc_mask = pn5_crc_mask;
80 amb.nb_crc_error_injector.pn6_crc_mask = pn6_crc_mask;
81 amb.nb_crc_error_injector.pn7_crc_mask = pn7_crc_mask;
82 amb.nb_crc_error_injector.pn8_crc_mask = pn8_crc_mask;
83 amb.nb_crc_error_injector.pn9_crc_mask = pn9_crc_mask;
84 amb.nb_crc_error_injector.pn10_crc_mask = pn10_crc_mask;
85 amb.nb_crc_error_injector.pn11_crc_mask = pn11_crc_mask;
86
87 amb.nb_crc_error_injector.pn_frame_num = pn_frame_num;
88 amb.nb_crc_error_injector.pn_crc_freq = pn_crc_freq;
89 amb.nb_crc_error_injector.pn_crc_period = pn_crc_period;
90*/
91
92endtask
93
94
95endmodule
96
97`endif
98