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

Subversion Repositories brisc

[/] [brisc/] [trunk/] [mux8.v] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 waqqas.jab
module mux8( mux_out, data_0, data_1, data_2, data_3, data_4, data_5, data_6, data_7, select);
2
 
3
        parameter dw = 8;
4
 
5
        input [dw-1:0] data_0, data_1, data_2, data_3, data_4, data_5, data_6, data_7;
6
        input [2:0] select;
7
        output reg [dw-1:0] mux_out;
8
 
9
         // choose between the two inputs
10
        always @ ( data_0 or data_1 or data_2 or data_3 or data_4 or data_5 or data_6 or data_7 or select)
11
        case (select)//  (* synthesis parallel_case *)
12
                3'd0:           mux_out = data_0;
13
                3'd1:           mux_out = data_1;
14
                3'd2:           mux_out = data_2;
15
                3'd3:           mux_out = data_3;
16
                3'd4:           mux_out = data_4;
17
                3'd5:           mux_out = data_5;
18
                3'd6:           mux_out = data_6;
19
                3'd7:           mux_out = data_7;
20
                default:        mux_out = {dw{1'bx}};
21
    endcase
22
endmodule

powered by: WebSVN 2.1.0

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