summaryrefslogtreecommitdiffstats
path: root/usrp2/control_lib/gray2bin.v
blob: 5df40bd5278494ac4c943de5e62553020c224ef4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module gray2bin
  #(parameter WIDTH=8)
    (input [WIDTH-1:0] gray,
     output reg [WIDTH-1:0] bin);

   integer 		i;
   always @(gray)
     for(i = 0;i<WIDTH;i=i+1)
	  bin[i] = ^(gray>>i);
   
endmodule // gray2bin