mirror of
https://github.com/myhdl/myhdl.git
synced 2025-01-24 21:52:56 +08:00
10 lines
150 B
Verilog
10 lines
150 B
Verilog
module bin2gray(B, G);
|
|
|
|
parameter width = 8;
|
|
input [width-1:0] B;
|
|
output [width-1:0] G;
|
|
|
|
assign G = (B >> 1) ^ B;
|
|
|
|
endmodule // bin2gray
|