@@ -155,6 +155,7 @@ module fpnew_divsqrt_multi #(
155
155
logic in_ready; // input handshake with upstream
156
156
logic div_valid, sqrt_valid; // input signalling with unit
157
157
logic unit_ready, unit_done; // status signals from unit instance
158
+ logic op_starting; // high in the cycle a new operation starts
158
159
logic out_valid, out_ready; // output handshake with downstream
159
160
logic hold_result; // whether to put result into hold register
160
161
logic data_is_held; // data in hold register is valid
@@ -167,8 +168,9 @@ module fpnew_divsqrt_multi #(
167
168
assign inp_pipe_ready[NUM_INP_REGS ] = in_ready;
168
169
169
170
// 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;
172
174
173
175
// FSM to safely apply and receive data from DIVSQRT unit
174
176
always_comb begin : flag_fsm
@@ -243,9 +245,9 @@ module fpnew_divsqrt_multi #(
243
245
AuxType result_aux_q;
244
246
245
247
// 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 )
249
251
250
252
// -----------------
251
253
// DIVSQRT instance
0 commit comments