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] - Diff between revs 3 and 5

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 3 Rev 5
Line 1... Line 1...
 
 
`include "timescale.v"
`include "timescale.v"
`include "defines.v"
`include "defines.v"
 
 
 
 
module accumulatorMUX (accMuxSel, immData, aluOut, accMuxOut);
module accumulatorMUX (accMuxSel, immData, aluOut
 
                                                                `ifdef timerAndCounter_peripheral
 
                                                                , tcLoadIn, tcAccIn
 
                                                                `endif
 
                                                                `ifdef UART_peripheral
 
                                                                , uartDataIn
 
                                                                `endif
 
                                                                `ifdef SPI_peripheral
 
                                                                , spiStatIn, spiBufIn
 
                                                                `endif
 
                                                                , accMuxOut
 
                                                                );
 
 
        input [`accMuxSelLen-1:0]        accMuxSel;
        input [`accMuxSelLen-1:0]        accMuxSel;
        input [`immDataLen-1:0]          immData;
        input [`immDataLen-1:0]          immData;
        input   [7:0]    aluOut;
        input   [7:0]    aluOut;
 
        `ifdef timerAndCounter_peripheral
 
        input [7:0] tcLoadIn, tcAccIn;
 
        `endif
 
        `ifdef UART_peripheral
 
        input [7:0] uartDataIn;
 
        `endif
 
        `ifdef SPI_peripheral
 
        input [7:0] spiStatIn, spiBufIn;
 
        `endif
 
 
        output [7:0]     accMuxOut;
        output [7:0]     accMuxOut;
 
 
        reg [7:0]        accMuxOut;
        reg [7:0]        accMuxOut;
 
 
Line 17... Line 37...
        always @ *
        always @ *
        begin
        begin
 
 
                case (accMuxSel)
                case (accMuxSel)
 
 
                        `accMuxSel0     :       begin
                        `accMuxSelImmData       :       begin
                                                                accMuxOut = immData;
                                                                accMuxOut = immData;
                                                                end
                                                                end
 
 
                        `accMuxSel1     :       begin
                        `accMuxSelAluOut        :       begin
                                                                accMuxOut = aluOut;
                                                                accMuxOut = aluOut;
                                                                end
                                                                end
 
 
 
                        `ifdef timerAndCounter_peripheral
 
                        `accMuxSelTcLoad        :       begin
 
                                                                                accMuxOut = tcLoadIn;
 
                                                                                end
 
 
 
                        `accMuxSelTcAcc :       begin
 
                                                                                accMuxOut = tcAccIn;
 
                                                                                end
 
                        `endif
 
 
 
                        `ifdef UART_peripheral
 
                        `accMuxSelUart  :               begin
 
                                                                                accMuxOut = uartDataIn;
 
                                                                                end
 
                        `endif
 
 
 
                        `ifdef SPI_peripheral
 
                        `accMuxSelSpiStat       :       begin
 
                                                                                accMuxOut = spiStatIn;
 
                                                                                end
 
 
 
                        `accMuxSelSpiBuf        :       begin
 
                                                                                accMuxOut = spiBufIn;
 
                                                                                end
 
                        `endif
 
 
 
 
                        default         :       begin
                        default         :       begin
                                                                accMuxOut = 8'bzzzzzzzz;
                                                                accMuxOut = 8'bzzzzzzzz;
                                                                end
                                                                end
 
 
                endcase
                endcase

powered by: WebSVN 2.1.0

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