Skip to content

Commit 4a241d4

Browse files
author
Stefan Mach
committed
🔖 Release 0.6.1
2 parents b7ca052 + 029dc52 commit 4a241d4

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

docs/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ Versions of the IP in the same major relase are "pin-compatible" with each other
1414
### Changed
1515
### Fixed
1616

17+
18+
## [0.6.1] - 2019-07-10
19+
20+
### Fixed
21+
- A bug where the div/sqrt unit could lose operations in flight
22+
1723
## [0.6.0] - 2019-07-04
1824

1925
### Changed

src/fpnew_divsqrt_multi.sv

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ module fpnew_divsqrt_multi #(
155155
logic in_ready; // input handshake with upstream
156156
logic div_valid, sqrt_valid; // input signalling with unit
157157
logic unit_ready, unit_done; // status signals from unit instance
158+
logic op_starting; // high in the cycle a new operation starts
158159
logic out_valid, out_ready; // output handshake with downstream
159160
logic hold_result; // whether to put result into hold register
160161
logic data_is_held; // data in hold register is valid
@@ -167,8 +168,9 @@ module fpnew_divsqrt_multi #(
167168
assign inp_pipe_ready[NUM_INP_REGS] = in_ready;
168169

169170
// Valids are gated by the FSM ready. Invalid input ops run a sqrt to not lose illegal instr.
170-
assign div_valid = in_valid_q & (op_q == fpnew_pkg::DIV) & in_ready & ~flush_i;
171-
assign sqrt_valid = in_valid_q & (op_q != fpnew_pkg::DIV) & in_ready & ~flush_i;
171+
assign div_valid = in_valid_q & (op_q == fpnew_pkg::DIV) & in_ready & ~flush_i;
172+
assign sqrt_valid = in_valid_q & (op_q != fpnew_pkg::DIV) & in_ready & ~flush_i;
173+
assign op_starting = div_valid | sqrt_valid;
172174

173175
// FSM to safely apply and receive data from DIVSQRT unit
174176
always_comb begin : flag_fsm
@@ -243,9 +245,9 @@ module fpnew_divsqrt_multi #(
243245
AuxType result_aux_q;
244246

245247
// Fill the registers everytime a valid operation arrives (load FF, active low asynch rst)
246-
`FFL(result_is_fp8_q, input_is_fp8, in_valid_q, '0)
247-
`FFL(result_tag_q, inp_pipe_tag_q[NUM_INP_REGS], in_valid_q, '0)
248-
`FFL(result_aux_q, inp_pipe_aux_q[NUM_INP_REGS], in_valid_q, '0)
248+
`FFL(result_is_fp8_q, input_is_fp8, op_starting, '0)
249+
`FFL(result_tag_q, inp_pipe_tag_q[NUM_INP_REGS], op_starting, '0)
250+
`FFL(result_aux_q, inp_pipe_aux_q[NUM_INP_REGS], op_starting, '0)
249251

250252
// -----------------
251253
// DIVSQRT instance

0 commit comments

Comments
 (0)