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

Subversion Repositories cdc_ufifo

[/] [cdc_ufifo/] [trunk/] [gray2bin.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 AlexRayne
module gray2bin (bin, gray);
2
 
3
parameter lpm_size = 4;
4
 
5
output [lpm_size-1:0] bin;
6
input [lpm_size-1:0] gray;
7
reg [lpm_size-1:0] bin;
8
 
9
integer i;
10
always @(gray)
11
    for (i=0; i<lpm_size; i=i+1)
12
        bin[i] = ^(gray>>i);
13
endmodule

powered by: WebSVN 2.1.0

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