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/] [op2Mux.v] - Blame information for rev 9

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

Line No. Rev Author Line
1 3 maheshpalv
 
2
`include "timescale.v"
3
`include "defines.v"
4
 
5
 
6
module op2Mux (op2MuxSel, inputReadOut, outputReadOut, bitOut, byteOut, op2MuxOut);
7
 
8
        input [`op2MuxSelLen-1:0] op2MuxSel;
9
        input inputReadOut, outputReadOut, bitOut;
10
        input [7:0] byteOut;
11
 
12
        output [7:0] op2MuxOut;
13
 
14 9 maheshpalv
        reg [7:0] op2MuxOut = 0;
15 3 maheshpalv
 
16
 
17 9 maheshpalv
        always @ (op2MuxSel)
18 3 maheshpalv
        begin
19
 
20
                case (op2MuxSel)
21
 
22 5 maheshpalv
                `op2MuxSelInput :       begin
23 3 maheshpalv
                                                                op2MuxOut = {7'b0, inputReadOut};
24
                                                                end
25
 
26 5 maheshpalv
                `op2MuxSelOutput        :       begin
27 3 maheshpalv
                                                                op2MuxOut = {7'b0, outputReadOut};
28
                                                                end
29
 
30 5 maheshpalv
                `op2MuxSelBitRam        :       begin
31 3 maheshpalv
                                                                op2MuxOut = {7'b0, bitOut};
32
                                                                end
33
 
34 5 maheshpalv
                `op2MuxSelByteRam       :       begin
35 3 maheshpalv
                                                                op2MuxOut = byteOut;
36
                                                                end
37
 
38
 
39
                default                 :       begin
40 9 maheshpalv
                                                                op2MuxOut = op2MuxOut;
41 3 maheshpalv
                                                                end
42
 
43
                endcase
44
 
45
        end     // end always
46
 
47
 
48
endmodule

powered by: WebSVN 2.1.0

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