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

Subversion Repositories instruction_list_pipelined_processor_with_peripherals

[/] [instruction_list_pipelined_processor_with_peripherals/] [trunk/] [hdl/] [ppReg2.v] - Blame information for rev 10

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

Line No. Rev Author Line
1 10 maheshpalv
////////////////////////////////////////////////////////////////////////////////////////////////
2
////                                                                                                                    ////
3
////                                                                                                                    ////
4
////    This file is part of the project                                                                                        ////
5
////    "instruction_list_pipelined_processor_with_peripherals"                                                         ////
6
////                                                                                                                    ////
7
////  http://opencores.org/project,instruction_list_pipelined_processor_with_peripherals        ////
8
////                                                                                                                    ////
9
////                                                                                                                    ////
10
////                             Author:                                                                                ////
11
////                            - Mahesh Sukhdeo Palve                                                                                                  ////
12
////                                                                                                                                                                            ////
13
////////////////////////////////////////////////////////////////////////////////////////////////
14
////////////////////////////////////////////////////////////////////////////////////////////////
15
////                                                                                                                                                                            ////
16
////                                                                                                                                                            ////
17
////                                                                                                                    ////
18
////                                    This source file may be used and distributed without                    ////
19
////                                    restriction provided that this copyright statement is not               ////
20
////                                    removed from the file and that any derivative work contains             ////
21
////                                    the original copyright notice and the associated disclaimer.            ////
22
////                                                                                                                    ////
23
////                                    This source file is free software; you can redistribute it              ////
24
////                                    and/or modify it under the terms of the GNU Lesser General              ////
25
////                                    Public License as published by the Free Software Foundation;            ////
26
////                                    either version 2.1 of the License, or (at your option) any              ////
27
////                                    later version.                                                          ////
28
////                                                                                                                    ////
29
////                                    This source is distributed in the hope that it will be                  ////
30
////                                    useful, but WITHOUT ANY WARRANTY; without even the implied              ////
31
////                                    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR                 ////
32
////                                    PURPOSE.  See the GNU Lesser General Public License for more            ////
33
////                                    details.                                                                ////
34
////                                                                                                                    ////
35
////                                    You should have received a copy of the GNU Lesser General               ////
36
////                                    Public License along with this source; if not, download it              ////
37
////                                    from http://www.opencores.org/lgpl.shtml                                ////
38
////                                                                                                                    ////
39
////////////////////////////////////////////////////////////////////////////////////////////////
40 6 maheshpalv
 
41
`include "timescale.v"
42
`include "defines.v"
43
 
44
 
45
module ppReg2 (clk,
46
                                        branchIn,
47
                                        accMuxSelIn, accEnIn, op2MuxSelIn, aluEnIn, aluOpcodeIn,
48
                                        bitRamEnIn, bitRamRwIn, byteRamEnIn, byteRamRwIn,
49
                                        inputReadIn, outputRwIn
50
 
51
                                        `ifdef timerAndCounter_peripheral
52
                                                , entypeEnIn, tcAccReadIn, tcResetEnIn, tcPresetEnIn, tcLoadEnIn
53
                                        `endif
54
 
55
                                        `ifdef UART_peripheral
56
                                                , uartReadIn, uartWriteIn
57
                                        `endif
58
 
59
                                        `ifdef SPI_peripheral
60
                                                , sconEnIn, spiStatReadIn, spiBufReadIn, spiBufWriteIn, spiBufShiftIn
61
                                        `endif
62
                                        , fieldIn
63
                                        , branchOut,
64
                                        accMuxSelOut, accEnOut, op2MuxSelOut, aluEnOut, aluOpcodeOut,
65
                                        bitRamEnOut, bitRamRwOut, byteRamEnOut, byteRamRwOut,
66
                                        inputReadOut, outputRwOut
67
 
68
                                        `ifdef timerAndCounter_peripheral
69
                                                , entypeEnOut, tcAccReadOut, tcResetEnOut, tcPresetEnOut, tcLoadEnOut
70
                                        `endif
71
 
72
                                        `ifdef UART_peripheral
73
                                                , uartReadOut, uartWriteOut
74
                                        `endif
75
 
76
                                        `ifdef SPI_peripheral
77
                                                , sconEnOut, spiStatReadOut, spiBufReadOut, spiBufWriteOut, spiBufShiftOut
78
                                        `endif
79
 
80
                                        , fieldOut
81
                                        );
82
 
83
        input clk;
84
 
85
        input branchIn;
86
        input [`accMuxSelLen-1:0]        accMuxSelIn;
87
        input accEnIn;
88
        input [`op2MuxSelLen-1:0]        op2MuxSelIn;
89
        input aluEnIn;
90
        input [`aluOpcodeLen-1:0] aluOpcodeIn;
91
        input bitRamEnIn, bitRamRwIn, byteRamEnIn, byteRamRwIn;
92
        input inputReadIn, outputRwIn;
93
        `ifdef timerAndCounter_peripheral
94
        input entypeEnIn, tcAccReadIn, tcResetEnIn, tcPresetEnIn, tcLoadEnIn;
95
        `endif
96
        `ifdef UART_peripheral
97
        input uartReadIn, uartWriteIn;
98
        `endif
99
        `ifdef SPI_peripheral
100
        input sconEnIn, spiStatReadIn, spiBufReadIn, spiBufWriteIn, spiBufShiftIn;
101
        `endif
102
        input [`instFieldLen-1:0] fieldIn;
103
 
104
 
105
        output branchOut;
106
        output [`accMuxSelLen-1:0]       accMuxSelOut;
107
        output accEnOut;
108
        output [`op2MuxSelLen-1:0]       op2MuxSelOut;
109
        output aluEnOut;
110
        output [`aluOpcodeLen-1:0] aluOpcodeOut;
111
        output bitRamEnOut, bitRamRwOut, byteRamEnOut, byteRamRwOut;
112
        output inputReadOut, outputRwOut;
113
        `ifdef timerAndCounter_peripheral
114
        output entypeEnOut, tcAccReadOut, tcResetEnOut, tcPresetEnOut, tcLoadEnOut;
115
        `endif
116
        `ifdef UART_peripheral
117
        output uartReadOut, uartWriteOut;
118
        `endif
119
        `ifdef SPI_peripheral
120
        output sconEnOut, spiStatReadOut, spiBufReadOut, spiBufWriteOut, spiBufShiftOut;
121
        `endif
122
 
123
        output [`instFieldLen-1:0] fieldOut;
124
 
125
        reg branchOut;
126
        reg [`accMuxSelLen-1:0]  accMuxSelOut;
127
        reg accEnOut;
128
        reg [`op2MuxSelLen-1:0]  op2MuxSelOut;
129
        reg aluEnOut;
130
        reg [`aluOpcodeLen-1:0] aluOpcodeOut;
131
        reg bitRamEnOut, bitRamRwOut, byteRamEnOut, byteRamRwOut;
132
        reg inputReadOut, outputRwOut;
133
        `ifdef timerAndCounter_peripheral
134
        reg entypeEnOut, tcAccReadOut, tcResetEnOut, tcPresetEnOut, tcLoadEnOut;
135
        `endif
136
        `ifdef UART_peripheral
137
        reg uartReadOut, uartWriteOut;
138
        `endif
139
        `ifdef SPI_peripheral
140
        reg sconEnOut, spiStatReadOut, spiBufReadOut, spiBufWriteOut, spiBufShiftOut;
141
        `endif
142
 
143
        reg [`instFieldLen-1:0] fieldOut;
144
 
145
 
146
 
147
        always @ (posedge clk)
148
        begin
149
 
150
        fieldOut = fieldIn;
151
 
152
        branchOut = branchIn;
153
        accMuxSelOut = accMuxSelIn;
154
        accEnOut = accEnIn;
155
        op2MuxSelOut = op2MuxSelIn;
156
        aluEnOut = aluEnIn;
157
        aluOpcodeOut = aluOpcodeIn;
158
        bitRamEnOut = bitRamEnIn;
159
        bitRamRwOut = bitRamRwIn;
160
        byteRamEnOut = byteRamEnIn;
161
        byteRamRwOut = byteRamRwIn;
162
        inputReadOut = inputReadIn;
163
        outputRwOut = outputRwIn;
164
 
165
        `ifdef timerAndCounter_peripheral
166
 
167
        entypeEnOut = entypeEnIn;
168
        tcAccReadOut = tcAccReadIn;
169
        tcResetEnOut = tcResetEnIn;
170
        tcPresetEnOut = tcPresetEnIn;
171
        tcLoadEnOut = tcLoadEnIn;
172
 
173
        `endif
174
 
175
 
176
        `ifdef UART_peripheral
177
 
178
        uartReadOut = uartReadIn;
179
        uartWriteOut = uartWriteIn;
180
 
181
        `endif
182
 
183
 
184
        `ifdef SPI_peripheral
185
 
186
        sconEnOut = sconEnIn;
187
        spiStatReadOut = spiStatReadIn;
188
        spiBufReadOut = spiBufReadIn;
189
        spiBufWriteOut = spiBufWriteIn;
190
        spiBufShiftOut = spiBufShiftIn;
191
 
192
        `endif
193
 
194
        end
195
 
196
 
197
endmodule

powered by: WebSVN 2.1.0

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