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

Subversion Repositories mips789

[/] [mips789/] [tags/] [v001/] [verilog/] [mips_core/] [decode_pipe.v] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mcupro
/////////////////////////////////////////////////////////////////////
2
////  Author: Liwei                                              ////
3
////                                                             ////
4
////                                                             ////
5
////  If you encountered any problem, please contact :           ////
6
////  Email: mcupro@yahoo.com.hk or mcupro@opencores.org         ////
7
////                                                             ////
8
////  Downloaded from:                                           ////
9
////     http://www.opencores.org/pdownloads.cgi/list/mips789    ////
10
/////////////////////////////////////////////////////////////////////
11
////                                                             ////
12
//// Copyright (C) 2006-2007 Liwei                               ////
13
////                         mcupro@yahoo.com.hk                 ////
14
////                                                             ////
15
////                                                             ////
16
//// This source file may be used and distributed freely without ////
17
//// restriction provided that this copyright statement is not   ////
18
//// removed from the file and any derivative work contains the  ////
19
//// original copyright notice and the associated disclaimer.    ////
20
////                                                             ////
21
//// Please let the author know if it is used                    ////
22
//// for commercial purpose.                                     ////
23
////                                                             ////
24
////     THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY     ////
25
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   ////
26
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS   ////
27
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR      ////
28
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,         ////
29
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES    ////
30
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE   ////
31
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR        ////
32
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF  ////
33
//// LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT  ////
34
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  ////
35
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE         ////
36
//// POSSIBILITY OF SUCH DAMAGE.                                 ////
37
////                                                             ////
38
/////////////////////////////////////////////////////////////////////
39
////                                                             ////
40
////                                                             ////
41
//// Date of Creation: 2007.8.1                                  ////
42
////                                                             ////
43
//// Version: 0.0.1                                              ////
44
////                                                             ////
45
//// Description:                                                ////
46
////                                                             ////
47
////                                                             ////
48
/////////////////////////////////////////////////////////////////////
49
////                                                             ////
50
//// Change log:                                                 ////
51
////                                                             ////
52
/////////////////////////////////////////////////////////////////////
53
 
54
 
55
 
56
module decode_pipe3
57
(
58
clk,id2ra_ctl_clr,id2ra_ctl_cls,
59
ra2ex_ctl_clr,ins_i,alu_func_o,alu_we_o,
60
cmp_ctl_o,dmem_ctl_o,dmem_ctl_ur_o,ext_ctl_o,
61
fsm_dly,muxa_ctl_o,muxb_ctl_o,pc_gen_ctl_o,rd_sel_o,
62
wb_mux_ctl_o,wb_we_o
63
) ;
64
 
65
input clk;
66
wire clk;
67
input id2ra_ctl_clr;
68
wire id2ra_ctl_clr;
69
input id2ra_ctl_cls;
70
wire id2ra_ctl_cls;
71
input ra2ex_ctl_clr;
72
wire ra2ex_ctl_clr;
73
input [31:0] ins_i;
74
wire [31:0] ins_i;
75
output [4:0] alu_func_o;
76
wire [4:0] alu_func_o;
77
output [0:0] alu_we_o;
78
wire [0:0] alu_we_o;
79
output [2:0] cmp_ctl_o;
80
wire [2:0] cmp_ctl_o;
81
output [3:0] dmem_ctl_o;
82
wire [3:0] dmem_ctl_o;
83
output [3:0] dmem_ctl_ur_o;
84
wire [3:0] dmem_ctl_ur_o;
85
output [2:0] ext_ctl_o;
86
wire [2:0] ext_ctl_o;
87
output [2:0] fsm_dly;
88
wire [2:0] fsm_dly;
89
output [1:0] muxa_ctl_o;
90
wire [1:0] muxa_ctl_o;
91
output [1:0] muxb_ctl_o;
92
wire [1:0] muxb_ctl_o;
93
output [2:0] pc_gen_ctl_o;
94
wire [2:0] pc_gen_ctl_o;
95
output [1:0] rd_sel_o;
96
wire [1:0] rd_sel_o;
97
output [0:0] wb_mux_ctl_o;
98
wire [0:0] wb_mux_ctl_o;
99
output [0:0] wb_we_o;
100
wire [0:0] wb_we_o;
101
 
102
 
103
wire [4:0] BUS2040;
104
wire [0:0] BUS2048;
105
wire [2:0] BUS2056;
106
wire [3:0] BUS2064;
107
wire [2:0] BUS2072;
108
wire [1:0] BUS2086;
109
wire [1:0] BUS2094;
110
wire [2:0] BUS2102;
111
wire [1:0] BUS2110;
112
wire [0:0] BUS2118;
113
wire [0:0] BUS2126;
114
 
115
 
116
decoder3 decoder
117
(
118
        .alu_func(BUS2040),
119
        .alu_we(BUS2048),
120
        .cmp_ctl(BUS2056),
121
        .dmem_ctl(BUS2064),
122
        .ext_ctl(BUS2072),
123
        .fsm_dly(fsm_dly),
124
        .ins_i(ins_i),
125
        .muxa_ctl(BUS2086),
126
        .muxb_ctl(BUS2094),
127
        .pc_gen_ctl(BUS2102),
128
        .rd_sel(BUS2110),
129
        .wb_mux(BUS2118),
130
        .wb_we(BUS2126)
131
);
132
 
133
 
134
 
135
pipelinedregs pipereg
136
(
137
        .alu_func_i(BUS2040),
138
        .alu_func_o(alu_func_o),
139
        .alu_we_i(BUS2048),
140
        .alu_we_o(alu_we_o),
141
        .clk(clk),
142
        .cmp_ctl_i(BUS2056),
143
        .cmp_ctl_o(cmp_ctl_o),
144
        .dmem_ctl_i(BUS2064),
145
        .dmem_ctl_o(dmem_ctl_o),
146
        .dmem_ctl_ur_o(dmem_ctl_ur_o),
147
        .ext_ctl(ext_ctl_o),
148
        .ext_ctl_i(BUS2072),
149
        .id2ra_ctl_clr(id2ra_ctl_clr),
150
        .id2ra_ctl_cls(id2ra_ctl_cls),
151
        .muxa_ctl_i(BUS2086),
152
        .muxa_ctl_o(muxa_ctl_o),
153
        .muxb_ctl_i(BUS2094),
154
        .muxb_ctl_o(muxb_ctl_o),
155
        .pc_gen_ctl_i(BUS2102),
156
        .pc_gen_ctl_o(pc_gen_ctl_o),
157
        .ra2ex_ctl_clr(ra2ex_ctl_clr),
158
        .rd_sel_i(BUS2110),
159
        .rd_sel_o(rd_sel_o),
160
        .wb_mux_ctl_i(BUS2118),
161
        .wb_mux_ctl_o(wb_mux_ctl_o),
162
        .wb_we_i(BUS2126),
163
        .wb_we_o(wb_we_o)
164
);
165
 
166
 
167
 
168
endmodule

powered by: WebSVN 2.1.0

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