diff options
author | bryan newbold <bnewbold@leaflabs.com> | 2014-03-25 11:51:46 -0400 |
---|---|---|
committer | bryan newbold <bnewbold@leaflabs.com> | 2014-03-25 12:00:08 -0400 |
commit | e3ef6c1adb03c9aceb0e8a4e0cae497e16ba9b40 (patch) | |
tree | 7ba99f70e51895aa11e64cfac20e7956e90eb9bc /hdl/rot13.v | |
parent | c87a900a056c566bf5fb85daaec2f74e4efe4a0f (diff) | |
download | basic-hdl-template-e3ef6c1adb03c9aceb0e8a4e0cae497e16ba9b40.tar.gz basic-hdl-template-e3ef6c1adb03c9aceb0e8a4e0cae497e16ba9b40.zip |
verilog indentation style cleanup
Diffstat (limited to 'hdl/rot13.v')
-rw-r--r-- | hdl/rot13.v | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/hdl/rot13.v b/hdl/rot13.v index d394407..6c9b9d9 100644 --- a/hdl/rot13.v +++ b/hdl/rot13.v @@ -20,27 +20,27 @@ module rot13 ( output reg [7:0] out_char = 8'd0 ); - always @(posedge clock) begin - if (reset) begin - out_char <= 8'd0; +always @(posedge clock) begin + if (reset) begin + out_char <= 8'd0; + end else begin + if (in_char >= 8'd97 && in_char < 8'd110) begin + // 'a' through 'm' + out_char <= in_char + 8'd13; + end else if (in_char >= 8'd110 && in_char < 8'd123) begin + // 'n' through 'z' + out_char <= in_char - 8'd13; + end else if (in_char >= 8'd65 && in_char < 8'd78) begin + // 'A' through 'M' + out_char <= in_char + 8'd13; + end else if (in_char >= 8'd78 && in_char < 8'd91) begin + // 'N' through 'Z' + out_char <= in_char - 8'd13; end else begin - if (in_char >= 8'd97 && in_char < 8'd110) begin - // 'a' through 'm' - out_char <= in_char + 8'd13; - end else if (in_char >= 8'd110 && in_char < 8'd123) begin - // 'n' through 'z' - out_char <= in_char - 8'd13; - end else if (in_char >= 8'd65 && in_char < 8'd78) begin - // 'A' through 'M' - out_char <= in_char + 8'd13; - end else if (in_char >= 8'd78 && in_char < 8'd91) begin - // 'N' through 'Z' - out_char <= in_char - 8'd13; - end else begin - // all other characters - out_char <= in_char; - end + // all other characters + out_char <= in_char; end end +end endmodule |