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 6

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

Line No. Rev Author Line
1 6 maheshpalv
 
2
`include "timescale.v"
3
`include "defines.v"
4
 
5
 
6
module ppReg2 (clk,
7
                                        branchIn,
8
                                        accMuxSelIn, accEnIn, op2MuxSelIn, aluEnIn, aluOpcodeIn,
9
                                        bitRamEnIn, bitRamRwIn, byteRamEnIn, byteRamRwIn,
10
                                        inputReadIn, outputRwIn
11
 
12
                                        `ifdef timerAndCounter_peripheral
13
                                                , entypeEnIn, tcAccReadIn, tcResetEnIn, tcPresetEnIn, tcLoadEnIn
14
                                        `endif
15
 
16
                                        `ifdef UART_peripheral
17
                                                , uartReadIn, uartWriteIn
18
                                        `endif
19
 
20
                                        `ifdef SPI_peripheral
21
                                                , sconEnIn, spiStatReadIn, spiBufReadIn, spiBufWriteIn, spiBufShiftIn
22
                                        `endif
23
                                        , fieldIn
24
                                        , branchOut,
25
                                        accMuxSelOut, accEnOut, op2MuxSelOut, aluEnOut, aluOpcodeOut,
26
                                        bitRamEnOut, bitRamRwOut, byteRamEnOut, byteRamRwOut,
27
                                        inputReadOut, outputRwOut
28
 
29
                                        `ifdef timerAndCounter_peripheral
30
                                                , entypeEnOut, tcAccReadOut, tcResetEnOut, tcPresetEnOut, tcLoadEnOut
31
                                        `endif
32
 
33
                                        `ifdef UART_peripheral
34
                                                , uartReadOut, uartWriteOut
35
                                        `endif
36
 
37
                                        `ifdef SPI_peripheral
38
                                                , sconEnOut, spiStatReadOut, spiBufReadOut, spiBufWriteOut, spiBufShiftOut
39
                                        `endif
40
 
41
                                        , fieldOut
42
                                        );
43
 
44
        input clk;
45
 
46
        input branchIn;
47
        input [`accMuxSelLen-1:0]        accMuxSelIn;
48
        input accEnIn;
49
        input [`op2MuxSelLen-1:0]        op2MuxSelIn;
50
        input aluEnIn;
51
        input [`aluOpcodeLen-1:0] aluOpcodeIn;
52
        input bitRamEnIn, bitRamRwIn, byteRamEnIn, byteRamRwIn;
53
        input inputReadIn, outputRwIn;
54
        `ifdef timerAndCounter_peripheral
55
        input entypeEnIn, tcAccReadIn, tcResetEnIn, tcPresetEnIn, tcLoadEnIn;
56
        `endif
57
        `ifdef UART_peripheral
58
        input uartReadIn, uartWriteIn;
59
        `endif
60
        `ifdef SPI_peripheral
61
        input sconEnIn, spiStatReadIn, spiBufReadIn, spiBufWriteIn, spiBufShiftIn;
62
        `endif
63
        input [`instFieldLen-1:0] fieldIn;
64
 
65
 
66
        output branchOut;
67
        output [`accMuxSelLen-1:0]       accMuxSelOut;
68
        output accEnOut;
69
        output [`op2MuxSelLen-1:0]       op2MuxSelOut;
70
        output aluEnOut;
71
        output [`aluOpcodeLen-1:0] aluOpcodeOut;
72
        output bitRamEnOut, bitRamRwOut, byteRamEnOut, byteRamRwOut;
73
        output inputReadOut, outputRwOut;
74
        `ifdef timerAndCounter_peripheral
75
        output entypeEnOut, tcAccReadOut, tcResetEnOut, tcPresetEnOut, tcLoadEnOut;
76
        `endif
77
        `ifdef UART_peripheral
78
        output uartReadOut, uartWriteOut;
79
        `endif
80
        `ifdef SPI_peripheral
81
        output sconEnOut, spiStatReadOut, spiBufReadOut, spiBufWriteOut, spiBufShiftOut;
82
        `endif
83
 
84
        output [`instFieldLen-1:0] fieldOut;
85
 
86
        reg branchOut;
87
        reg [`accMuxSelLen-1:0]  accMuxSelOut;
88
        reg accEnOut;
89
        reg [`op2MuxSelLen-1:0]  op2MuxSelOut;
90
        reg aluEnOut;
91
        reg [`aluOpcodeLen-1:0] aluOpcodeOut;
92
        reg bitRamEnOut, bitRamRwOut, byteRamEnOut, byteRamRwOut;
93
        reg inputReadOut, outputRwOut;
94
        `ifdef timerAndCounter_peripheral
95
        reg entypeEnOut, tcAccReadOut, tcResetEnOut, tcPresetEnOut, tcLoadEnOut;
96
        `endif
97
        `ifdef UART_peripheral
98
        reg uartReadOut, uartWriteOut;
99
        `endif
100
        `ifdef SPI_peripheral
101
        reg sconEnOut, spiStatReadOut, spiBufReadOut, spiBufWriteOut, spiBufShiftOut;
102
        `endif
103
 
104
        reg [`instFieldLen-1:0] fieldOut;
105
 
106
 
107
 
108
        always @ (posedge clk)
109
        begin
110
 
111
        fieldOut = fieldIn;
112
 
113
        branchOut = branchIn;
114
        accMuxSelOut = accMuxSelIn;
115
        accEnOut = accEnIn;
116
        op2MuxSelOut = op2MuxSelIn;
117
        aluEnOut = aluEnIn;
118
        aluOpcodeOut = aluOpcodeIn;
119
        bitRamEnOut = bitRamEnIn;
120
        bitRamRwOut = bitRamRwIn;
121
        byteRamEnOut = byteRamEnIn;
122
        byteRamRwOut = byteRamRwIn;
123
        inputReadOut = inputReadIn;
124
        outputRwOut = outputRwIn;
125
 
126
        `ifdef timerAndCounter_peripheral
127
 
128
        entypeEnOut = entypeEnIn;
129
        tcAccReadOut = tcAccReadIn;
130
        tcResetEnOut = tcResetEnIn;
131
        tcPresetEnOut = tcPresetEnIn;
132
        tcLoadEnOut = tcLoadEnIn;
133
 
134
        `endif
135
 
136
 
137
        `ifdef UART_peripheral
138
 
139
        uartReadOut = uartReadIn;
140
        uartWriteOut = uartWriteIn;
141
 
142
        `endif
143
 
144
 
145
        `ifdef SPI_peripheral
146
 
147
        sconEnOut = sconEnIn;
148
        spiStatReadOut = spiStatReadIn;
149
        spiBufReadOut = spiBufReadIn;
150
        spiBufWriteOut = spiBufWriteIn;
151
        spiBufShiftOut = spiBufShiftIn;
152
 
153
        `endif
154
 
155
        end
156
 
157
 
158
endmodule

powered by: WebSVN 2.1.0

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