aboutsummaryrefslogtreecommitdiffstats
path: root/usrp2/control_lib/bin2gray.v
blob: 513402163a6e34ca7393534e3b02025c5a573722 (plain)
1
2
3
4
5
6
7
8
9
10
module bin2gray
  #(parameter WIDTH=8)
    (input [WIDTH-1:0] bin,
     output [WIDTH-1:0] gray);

   assign 		gray = (bin >> 1) ^ bin;
   
endmodule // bin2gray