Skip to content

Commit baea106

Browse files
committed
Updated Gray functions
1 parent 0523320 commit baea106

8 files changed

+231
-363
lines changed

ActionBurst.v

-84
This file was deleted.

ActionBurst2.v

-93
This file was deleted.

ActionBurst2_tb.v

-88
This file was deleted.

ActionBurst_tb.v

-89
This file was deleted.

bin2gray.sv

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//------------------------------------------------------------------------------
22
// bin2gray.sv
3+
// published as part of https://github.com/pConst/basic_verilog
34
// Konstantin Pavlov, [email protected]
45
//------------------------------------------------------------------------------
56

@@ -26,9 +27,9 @@ module bin2gray #( parameter
2627
output logic[WIDTH-1:0] gray_out
2728
);
2829

29-
always_comb begin
30-
gray_out[WIDTH-1:0] = bin_in[WIDTH-1:0]^(bin_in[WIDTH-1:0]>>1);
31-
end
30+
always_comb begin
31+
gray_out[WIDTH-1:0] = bin_in[WIDTH-1:0] ^ ( bin_in[WIDTH-1:0] >> 1 );
32+
end
3233

3334
endmodule
3435

0 commit comments

Comments
 (0)