diff options
| author | Julian Blake Kongslie | 2021-03-23 12:29:00 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2021-03-23 12:29:22 -0700 |
| commit | ed2f2d8e5df20768fd23c45d97478e19f7346725 (patch) | |
| tree | 6e4a50dda735c23deb6d7a15c01ad2348c98ba88 /ntoa.sv | |
| parent | Initial commit. (diff) | |
| download | toycpu-ed2f2d8e5df20768fd23c45d97478e19f7346725.tar.xz | |
Clean up the preshifts on bin2bcd and ntoa.
Diffstat (limited to '')
| -rw-r--r-- | ntoa.sv | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -50,7 +50,7 @@ always_ff @(posedge clk) begin | |||
| 50 | // verilator lint_off WIDTH | 50 | // verilator lint_off WIDTH |
| 51 | work = b2b.DIGITS; | 51 | work = b2b.DIGITS; |
| 52 | // verilator lint_on WIDTH | 52 | // verilator lint_on WIDTH |
| 53 | for (int i = b2b.DIGITS; i > 1; i = i - 1) begin | 53 | for (int i = 0; i < b2b.DIGITS - 1; i = i + 1) begin |
| 54 | if (bcd_b_data[b2b.DIGITS-1] != 0) break; | 54 | if (bcd_b_data[b2b.DIGITS-1] != 0) break; |
| 55 | bcd_b_data = { bcd_b_data[b2b.DIGITS-2:0], {b2b.BASE_BITS{1'b0}} }; | 55 | bcd_b_data = { bcd_b_data[b2b.DIGITS-2:0], {b2b.BASE_BITS{1'b0}} }; |
| 56 | work = work - 1; | 56 | work = work - 1; |
