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/] [accMUX.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 3 maheshpalv
 
41
`include "timescale.v"
42
`include "defines.v"
43
 
44
 
45 5 maheshpalv
module accumulatorMUX (accMuxSel, immData, aluOut
46
                                                                `ifdef timerAndCounter_peripheral
47
                                                                , tcLoadIn, tcAccIn
48
                                                                `endif
49
                                                                `ifdef UART_peripheral
50 7 maheshpalv
                                                                , uartDataIn, uartStatIn
51 5 maheshpalv
                                                                `endif
52
                                                                `ifdef SPI_peripheral
53
                                                                , spiStatIn, spiBufIn
54
                                                                `endif
55
                                                                , accMuxOut
56
                                                                );
57 3 maheshpalv
 
58
        input [`accMuxSelLen-1:0]        accMuxSel;
59
        input [`immDataLen-1:0]          immData;
60
        input   [7:0]    aluOut;
61 5 maheshpalv
        `ifdef timerAndCounter_peripheral
62
        input [7:0] tcLoadIn, tcAccIn;
63
        `endif
64
        `ifdef UART_peripheral
65 7 maheshpalv
        input [7:0] uartDataIn, uartStatIn;
66 5 maheshpalv
        `endif
67
        `ifdef SPI_peripheral
68
        input [7:0] spiStatIn, spiBufIn;
69
        `endif
70 3 maheshpalv
 
71
        output [7:0]     accMuxOut;
72
 
73
        reg [7:0]        accMuxOut;
74
 
75
 
76
        always @ *
77
        begin
78
 
79
                case (accMuxSel)
80
 
81 5 maheshpalv
                        `accMuxSelImmData       :       begin
82
                                                                                accMuxOut = immData;
83
                                                                                end
84 3 maheshpalv
 
85 5 maheshpalv
                        `accMuxSelAluOut        :       begin
86
                                                                                accMuxOut = aluOut;
87
                                                                                end
88 3 maheshpalv
 
89 5 maheshpalv
                        `ifdef timerAndCounter_peripheral
90
                        `accMuxSelTcLoad        :       begin
91
                                                                                accMuxOut = tcLoadIn;
92
                                                                                end
93
 
94
                        `accMuxSelTcAcc :       begin
95
                                                                                accMuxOut = tcAccIn;
96
                                                                                end
97
                        `endif
98
 
99
                        `ifdef UART_peripheral
100 7 maheshpalv
                        `accMuxSelUartData      :               begin
101 5 maheshpalv
                                                                                accMuxOut = uartDataIn;
102
                                                                                end
103 7 maheshpalv
 
104
                        `accMuxSelUartStat      :               begin
105
                                                                                accMuxOut = uartStatIn;
106
                                                                                end
107 5 maheshpalv
                        `endif
108
 
109
                        `ifdef SPI_peripheral
110
                        `accMuxSelSpiStat       :       begin
111
                                                                                accMuxOut = spiStatIn;
112
                                                                                end
113
 
114
                        `accMuxSelSpiBuf        :       begin
115
                                                                                accMuxOut = spiBufIn;
116
                                                                                end
117
                        `endif
118
 
119
 
120 3 maheshpalv
                        default         :       begin
121
                                                                accMuxOut = 8'bzzzzzzzz;
122
                                                                end
123
 
124
                endcase
125
 
126
        end
127
 
128
 
129
endmodule

powered by: WebSVN 2.1.0

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