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

Subversion Repositories wb2axi4

[/] [wb2axi4/] [trunk/] [rtl/] [bin2gray.sv] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alzhang
module bin2gray (
2
// *************************** Ports ********************************
3
      bin,
4
     gray
5
 );
6
// ************************ Parameters ******************************
7
  parameter DATA_W   = 32  ;
8
 
9
// ********************** Inputs/Outputs ****************************
10
  input wire  [DATA_W-1:0] bin  ;
11
  output wire [DATA_W-1:0] gray ;
12
 
13
  assign gray = {1'b0, bin[DATA_W-1:1] } ^ bin;
14
 
15
endmodule // bin2gray
16
 

powered by: WebSVN 2.1.0

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