OpenCores
URL https://opencores.org/ocsvn/s1_core/s1_core/trunk

Subversion Repositories s1_core

[/] [s1_core/] [trunk/] [hdl/] [rtl/] [sparc_core/] [sparc_mul_top.v] - Blame information for rev 113

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 95 fafa1971
// ========== Copyright Header Begin ==========================================
2
// 
3
// OpenSPARC T1 Processor File: sparc_mul_top.v
4
// Copyright (c) 2006 Sun Microsystems, Inc.  All Rights Reserved.
5
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
6
// 
7
// The above named program is free software; you can redistribute it and/or
8
// modify it under the terms of the GNU General Public
9
// License version 2 as published by the Free Software Foundation.
10
// 
11
// The above named program is distributed in the hope that it will be 
12
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
// General Public License for more details.
15
// 
16
// You should have received a copy of the GNU General Public
17
// License along with this work; if not, write to the Free Software
18
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
19
// 
20
// ========== Copyright Header End ============================================
21 113 albert.wat
`ifdef SIMPLY_RISC_TWEAKS
22
`define SIMPLY_RISC_SCANIN .si(0)
23
`else
24
`define SIMPLY_RISC_SCANIN .si()
25
`endif
26 95 fafa1971
module sparc_mul_top(/*AUTOARG*/
27
   // Outputs
28
   mul_exu_ack, mul_spu_ack, mul_spu_shf_ack, mul_data_out, so,
29
   // Inputs
30
   rclk, grst_l, arst_l, exu_mul_input_vld, exu_mul_rs1_data, exu_mul_rs2_data,
31
   spu_mul_req_vld, spu_mul_acc, spu_mul_areg_shf, spu_mul_areg_rst,
32
   spu_mul_op1_data, spu_mul_op2_data, spu_mul_mulres_lshft, si, se
33
   );
34
 
35
input           rclk;
36
input           grst_l;                 // system reset
37
input           arst_l;                 // async reset
38
input           si;                     // scan in
39
input           se;                     // scan enablen
40
input           exu_mul_input_vld;      // EXU multipler op request
41
input [63:0]     exu_mul_rs1_data;       // EXU multipler Op1
42
input [63:0]     exu_mul_rs2_data;       // EXU multipler Op2
43
input           spu_mul_req_vld;        // SPU multipler op request
44
input           spu_mul_acc;            // MAC Op: ACCUM += op1 * op2 if spu_mul_acc=1
45
                                        // Bypass Op: Out = ACCUM * op1 if spu_mul_acc=0  
46
input           spu_mul_areg_shf;       // Shift >> 64 ACCUM register
47
input           spu_mul_areg_rst;       // Reset of ACCUM register (136-bit)
48
input [63:0]     spu_mul_op1_data;       // SPU multiplier Op1
49
input [63:0]     spu_mul_op2_data;       // SPU multiplier Op2
50
 
51
input spu_mul_mulres_lshft;
52
 
53
output          so;                     // scan_out
54
output          mul_exu_ack;            // ack signal for EXU mul operation
55
output          mul_spu_ack;            // ack signal for SPU MAC and Bypass mul operation
56
output          mul_spu_shf_ack;        // acl signal for ACCUM >> 64 operation
57
output [63:0]    mul_data_out;           // Shared output data for both EXU and SPU
58
 
59
wire            acc_imm, acc_actc2, acc_actc3, acc_actc5, acc_reg_enb;
60
wire            acc_reg_rst, acc_reg_shf;
61
wire            byp_sel, byp_imm, spick, x2;
62
wire            c0_act;
63
 
64
wire            rst_l;
65
wire            clk;
66
 
67
assign clk = rclk ;
68
 
69
dffrl_async     rstff   (
70
                        .din    (grst_l),
71
                        .clk    (clk),
72
                        .rst_l  (arst_l),
73
                        .q      (rst_l),
74
                        .se     (se),
75 113 albert.wat
                        `SIMPLY_RISC_SCANIN,
76 95 fafa1971
                        .so     ());
77
 
78
sparc_mul_cntl  control (
79
                        .ecl_mul_req_vld        (exu_mul_input_vld),
80
                        .spu_mul_req_vld        (spu_mul_req_vld),
81
                        .spu_mul_acc            (spu_mul_acc),
82
                        .spu_mul_areg_shf       (spu_mul_areg_shf),
83
                        .spu_mul_areg_rst       (spu_mul_areg_rst),
84
                        .spu_mul_mulres_lshft   (spu_mul_mulres_lshft),
85
                        .c0_act                 (c0_act),
86
                        .spick                  (spick),
87
                        .byp_sel                (byp_sel),
88
                        .byp_imm                (byp_imm),
89
                        .acc_imm                (acc_imm),
90
                        .acc_actc2              (acc_actc2),
91
                        .acc_actc3              (acc_actc3),
92
                        .acc_actc5              (acc_actc5),
93
                        .acc_reg_enb            (acc_reg_enb),
94
                        .acc_reg_rst            (acc_reg_rst),
95
                        .acc_reg_shf            (acc_reg_shf),
96
                        .x2                     (x2),
97
                        .mul_ecl_ack            (mul_exu_ack),
98
                        .mul_spu_ack            (mul_spu_ack),
99
                        .mul_spu_shf_ack        (mul_spu_shf_ack),
100
                        .rst_l                  (rst_l),
101
                        .rclk                   (clk));
102
 
103
sparc_mul_dp    dpath   (
104
                        .ecl_mul_rs1_data       (exu_mul_rs1_data),
105
                        .ecl_mul_rs2_data       (exu_mul_rs2_data),
106
                        .spu_mul_op1_data       (spu_mul_op1_data),
107
                        .spu_mul_op2_data       (spu_mul_op2_data),
108
                        .valid                  (c0_act),
109
                        .spick                  (spick),
110
                        .byp_sel                (byp_sel),
111
                        .byp_imm                (byp_imm),
112
                        .acc_imm                (acc_imm),
113
                        .acc_actc2              (acc_actc2),
114
                        .acc_actc3              (acc_actc3),
115
                        .acc_actc5              (acc_actc5),
116
                        .acc_reg_enb            (acc_reg_enb),
117
                        .acc_reg_rst            (acc_reg_rst),
118
                        .acc_reg_shf            (acc_reg_shf),
119
                        .x2                     (x2),
120
                        .mul_data_out           (mul_data_out),
121
                        .rst_l                  (rst_l),
122 113 albert.wat
                        `SIMPLY_RISC_SCANIN,
123 95 fafa1971
                        .so                     (),
124
                        .se                     (se),
125
                        .rclk                   (clk));
126
 
127
endmodule // sparc_mul_top

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.