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

Subversion Repositories dma_ahb

[/] [dma_ahb/] [trunk/] [src/] [dma_ahb32/] [prgen_demux8.v] - Blame information for rev 2

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

Line No. Rev Author Line
1 2 eyalhoc
//---------------------------------------------------------
2
//-- File generated by RobustVerilog parser
3
//-- Version: 1.0
4
//-- Invoked Fri Mar 25 23:31:23 2011
5
//--
6
//-- Source file: prgen_demux.v
7
//---------------------------------------------------------
8
 
9
 
10
 
11
 
12
module prgen_demux8(sel,x,ch_x);
13
 
14
   parameter                  WIDTH      = 8;
15
 
16
 
17
   input [3-1:0]     sel;
18
   input [WIDTH-1:0]           x;
19
   output [8*WIDTH-1:0]    ch_x;
20
 
21
 
22
   reg [8*WIDTH-1:0]       ch_x;
23
 
24
 
25
 
26
   always @(/*AUTOSENSE*/sel or x)
27
     begin
28
    ch_x = {8*WIDTH{1'b0}};
29
 
30
    case (sel)
31
      3'd0 : ch_x[WIDTH-1+WIDTH*0:WIDTH*0] = x;
32
      3'd1 : ch_x[WIDTH-1+WIDTH*1:WIDTH*1] = x;
33
      3'd2 : ch_x[WIDTH-1+WIDTH*2:WIDTH*2] = x;
34
      3'd3 : ch_x[WIDTH-1+WIDTH*3:WIDTH*3] = x;
35
      3'd4 : ch_x[WIDTH-1+WIDTH*4:WIDTH*4] = x;
36
      3'd5 : ch_x[WIDTH-1+WIDTH*5:WIDTH*5] = x;
37
      3'd6 : ch_x[WIDTH-1+WIDTH*6:WIDTH*6] = x;
38
      3'd7 : ch_x[WIDTH-1+WIDTH*7:WIDTH*7] = x;
39
 
40
      default :
41
        ch_x[WIDTH-1:0] = x;
42
    endcase
43
     end
44
 
45
 
46
endmodule
47
 
48
 
49
 

powered by: WebSVN 2.1.0

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