quotient new changed

This commit is contained in:
​Laraib Khan 2021-01-06 10:05:37 +05:00
parent 65d5369d1e
commit 64be0093cb
4 changed files with 1021 additions and 1020 deletions

File diff suppressed because it is too large Load Diff

View File

@ -304,17 +304,17 @@ module exu_div_new_2bit_fullshortq(
wire _T_42 = ~finish_ff; // @[exu_div_ctl.scala 501:69]
wire _T_43 = _T_41 & _T_42; // @[exu_div_ctl.scala 501:67]
wire _T_45 = _T_43 & _T; // @[exu_div_ctl.scala 501:80]
wire [6:0] _T_890 = {1'h0,1'h0,b_enc_io_cls}; // @[Cat.scala 29:58]
wire [6:0] _T_891 = {1'h0,1'h0,a_enc_io_cls}; // @[Cat.scala 29:58]
wire [6:0] _T_893 = _T_890 - _T_891; // @[exu_div_ctl.scala 592:41]
wire [6:0] dw_shortq_raw = _T_893 + 7'h1; // @[exu_div_ctl.scala 592:61]
wire [6:0] _T_891 = {1'h0,1'h0,b_enc_io_cls}; // @[Cat.scala 29:58]
wire [6:0] _T_892 = {1'h0,1'h0,a_enc_io_cls}; // @[Cat.scala 29:58]
wire [6:0] _T_894 = _T_891 - _T_892; // @[exu_div_ctl.scala 592:41]
wire [6:0] dw_shortq_raw = _T_894 + 7'h1; // @[exu_div_ctl.scala 592:61]
wire [5:0] shortq = dw_shortq_raw[6] ? 6'h0 : dw_shortq_raw[5:0]; // @[exu_div_ctl.scala 593:19]
wire _T_899 = ~shortq[5]; // @[exu_div_ctl.scala 594:31]
wire _T_900 = valid_ff & _T_899; // @[exu_div_ctl.scala 594:29]
wire _T_902 = shortq[4:1] == 4'hf; // @[exu_div_ctl.scala 594:58]
wire _T_903 = ~_T_902; // @[exu_div_ctl.scala 594:44]
wire _T_904 = _T_900 & _T_903; // @[exu_div_ctl.scala 594:42]
wire shortq_enable = _T_904 & _T; // @[exu_div_ctl.scala 594:74]
wire _T_900 = ~shortq[5]; // @[exu_div_ctl.scala 594:31]
wire _T_901 = valid_ff & _T_900; // @[exu_div_ctl.scala 594:29]
wire _T_903 = shortq[4:1] == 4'hf; // @[exu_div_ctl.scala 594:58]
wire _T_904 = ~_T_903; // @[exu_div_ctl.scala 594:44]
wire _T_905 = _T_901 & _T_904; // @[exu_div_ctl.scala 594:42]
wire shortq_enable = _T_905 & _T; // @[exu_div_ctl.scala 594:74]
wire _T_46 = ~shortq_enable; // @[exu_div_ctl.scala 501:95]
wire count_enable = _T_45 & _T_46; // @[exu_div_ctl.scala 501:93]
wire [6:0] _T_48 = count_enable ? 7'h7f : 7'h0; // @[Bitwise.scala 72:12]
@ -370,12 +370,12 @@ module exu_div_new_2bit_fullshortq(
wire _T_129 = adder1_out == 33'h0; // @[exu_div_ctl.scala 521:80]
wire _T_130 = _T_112 & _T_129; // @[exu_div_ctl.scala 521:66]
wire _T_131 = _T_126 | _T_130; // @[exu_div_ctl.scala 521:42]
wire [2:0] quotient_raw = {_T_115,_T_123,_T_131}; // @[Cat.scala 29:58]
wire _T_136 = quotient_raw[2] | quotient_raw[1]; // @[exu_div_ctl.scala 522:41]
wire _T_139 = ~quotient_raw[1]; // @[exu_div_ctl.scala 522:82]
wire _T_141 = _T_139 & quotient_raw[0]; // @[exu_div_ctl.scala 522:99]
wire _T_142 = quotient_raw[2] | _T_141; // @[exu_div_ctl.scala 522:80]
wire [1:0] quotient_new = {_T_136,_T_142}; // @[Cat.scala 29:58]
wire [3:0] quotient_raw = {_T_115,_T_123,_T_131,1'h0}; // @[Cat.scala 29:58]
wire _T_137 = quotient_raw[3] | quotient_raw[2]; // @[exu_div_ctl.scala 522:41]
wire _T_140 = ~quotient_raw[2]; // @[exu_div_ctl.scala 522:82]
wire _T_142 = _T_140 & quotient_raw[1]; // @[exu_div_ctl.scala 522:99]
wire _T_143 = quotient_raw[3] | _T_142; // @[exu_div_ctl.scala 522:80]
wire [1:0] quotient_new = {_T_137,_T_143}; // @[Cat.scala 29:58]
wire _T_75 = quotient_new == 2'h0; // @[exu_div_ctl.scala 512:61]
wire _T_76 = running_state & _T_75; // @[exu_div_ctl.scala 512:45]
wire r_restore_sel = _T_76 & _T_56; // @[exu_div_ctl.scala 512:70]
@ -389,150 +389,150 @@ module exu_div_new_2bit_fullshortq(
wire _T_85 = running_state & _T_84; // @[exu_div_ctl.scala 515:45]
wire r_adder3_sel = _T_85 & _T_56; // @[exu_div_ctl.scala 515:70]
reg [31:0] q_ff; // @[Reg.scala 27:20]
wire [31:0] _T_145 = twos_comp_q_sel ? q_ff : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_146 = b_twos_comp ? b_ff[31:0] : 32'h0; // @[Mux.scala 27:72]
wire [31:0] twos_comp_in = _T_145 | _T_146; // @[Mux.scala 27:72]
wire _T_150 = |twos_comp_in[0]; // @[lib.scala 428:35]
wire _T_152 = ~twos_comp_in[1]; // @[lib.scala 428:40]
wire _T_154 = _T_150 ? _T_152 : twos_comp_in[1]; // @[lib.scala 428:23]
wire _T_156 = |twos_comp_in[1:0]; // @[lib.scala 428:35]
wire _T_158 = ~twos_comp_in[2]; // @[lib.scala 428:40]
wire _T_160 = _T_156 ? _T_158 : twos_comp_in[2]; // @[lib.scala 428:23]
wire _T_162 = |twos_comp_in[2:0]; // @[lib.scala 428:35]
wire _T_164 = ~twos_comp_in[3]; // @[lib.scala 428:40]
wire _T_166 = _T_162 ? _T_164 : twos_comp_in[3]; // @[lib.scala 428:23]
wire _T_168 = |twos_comp_in[3:0]; // @[lib.scala 428:35]
wire _T_170 = ~twos_comp_in[4]; // @[lib.scala 428:40]
wire _T_172 = _T_168 ? _T_170 : twos_comp_in[4]; // @[lib.scala 428:23]
wire _T_174 = |twos_comp_in[4:0]; // @[lib.scala 428:35]
wire _T_176 = ~twos_comp_in[5]; // @[lib.scala 428:40]
wire _T_178 = _T_174 ? _T_176 : twos_comp_in[5]; // @[lib.scala 428:23]
wire _T_180 = |twos_comp_in[5:0]; // @[lib.scala 428:35]
wire _T_182 = ~twos_comp_in[6]; // @[lib.scala 428:40]
wire _T_184 = _T_180 ? _T_182 : twos_comp_in[6]; // @[lib.scala 428:23]
wire _T_186 = |twos_comp_in[6:0]; // @[lib.scala 428:35]
wire _T_188 = ~twos_comp_in[7]; // @[lib.scala 428:40]
wire _T_190 = _T_186 ? _T_188 : twos_comp_in[7]; // @[lib.scala 428:23]
wire _T_192 = |twos_comp_in[7:0]; // @[lib.scala 428:35]
wire _T_194 = ~twos_comp_in[8]; // @[lib.scala 428:40]
wire _T_196 = _T_192 ? _T_194 : twos_comp_in[8]; // @[lib.scala 428:23]
wire _T_198 = |twos_comp_in[8:0]; // @[lib.scala 428:35]
wire _T_200 = ~twos_comp_in[9]; // @[lib.scala 428:40]
wire _T_202 = _T_198 ? _T_200 : twos_comp_in[9]; // @[lib.scala 428:23]
wire _T_204 = |twos_comp_in[9:0]; // @[lib.scala 428:35]
wire _T_206 = ~twos_comp_in[10]; // @[lib.scala 428:40]
wire _T_208 = _T_204 ? _T_206 : twos_comp_in[10]; // @[lib.scala 428:23]
wire _T_210 = |twos_comp_in[10:0]; // @[lib.scala 428:35]
wire _T_212 = ~twos_comp_in[11]; // @[lib.scala 428:40]
wire _T_214 = _T_210 ? _T_212 : twos_comp_in[11]; // @[lib.scala 428:23]
wire _T_216 = |twos_comp_in[11:0]; // @[lib.scala 428:35]
wire _T_218 = ~twos_comp_in[12]; // @[lib.scala 428:40]
wire _T_220 = _T_216 ? _T_218 : twos_comp_in[12]; // @[lib.scala 428:23]
wire _T_222 = |twos_comp_in[12:0]; // @[lib.scala 428:35]
wire _T_224 = ~twos_comp_in[13]; // @[lib.scala 428:40]
wire _T_226 = _T_222 ? _T_224 : twos_comp_in[13]; // @[lib.scala 428:23]
wire _T_228 = |twos_comp_in[13:0]; // @[lib.scala 428:35]
wire _T_230 = ~twos_comp_in[14]; // @[lib.scala 428:40]
wire _T_232 = _T_228 ? _T_230 : twos_comp_in[14]; // @[lib.scala 428:23]
wire _T_234 = |twos_comp_in[14:0]; // @[lib.scala 428:35]
wire _T_236 = ~twos_comp_in[15]; // @[lib.scala 428:40]
wire _T_238 = _T_234 ? _T_236 : twos_comp_in[15]; // @[lib.scala 428:23]
wire _T_240 = |twos_comp_in[15:0]; // @[lib.scala 428:35]
wire _T_242 = ~twos_comp_in[16]; // @[lib.scala 428:40]
wire _T_244 = _T_240 ? _T_242 : twos_comp_in[16]; // @[lib.scala 428:23]
wire _T_246 = |twos_comp_in[16:0]; // @[lib.scala 428:35]
wire _T_248 = ~twos_comp_in[17]; // @[lib.scala 428:40]
wire _T_250 = _T_246 ? _T_248 : twos_comp_in[17]; // @[lib.scala 428:23]
wire _T_252 = |twos_comp_in[17:0]; // @[lib.scala 428:35]
wire _T_254 = ~twos_comp_in[18]; // @[lib.scala 428:40]
wire _T_256 = _T_252 ? _T_254 : twos_comp_in[18]; // @[lib.scala 428:23]
wire _T_258 = |twos_comp_in[18:0]; // @[lib.scala 428:35]
wire _T_260 = ~twos_comp_in[19]; // @[lib.scala 428:40]
wire _T_262 = _T_258 ? _T_260 : twos_comp_in[19]; // @[lib.scala 428:23]
wire _T_264 = |twos_comp_in[19:0]; // @[lib.scala 428:35]
wire _T_266 = ~twos_comp_in[20]; // @[lib.scala 428:40]
wire _T_268 = _T_264 ? _T_266 : twos_comp_in[20]; // @[lib.scala 428:23]
wire _T_270 = |twos_comp_in[20:0]; // @[lib.scala 428:35]
wire _T_272 = ~twos_comp_in[21]; // @[lib.scala 428:40]
wire _T_274 = _T_270 ? _T_272 : twos_comp_in[21]; // @[lib.scala 428:23]
wire _T_276 = |twos_comp_in[21:0]; // @[lib.scala 428:35]
wire _T_278 = ~twos_comp_in[22]; // @[lib.scala 428:40]
wire _T_280 = _T_276 ? _T_278 : twos_comp_in[22]; // @[lib.scala 428:23]
wire _T_282 = |twos_comp_in[22:0]; // @[lib.scala 428:35]
wire _T_284 = ~twos_comp_in[23]; // @[lib.scala 428:40]
wire _T_286 = _T_282 ? _T_284 : twos_comp_in[23]; // @[lib.scala 428:23]
wire _T_288 = |twos_comp_in[23:0]; // @[lib.scala 428:35]
wire _T_290 = ~twos_comp_in[24]; // @[lib.scala 428:40]
wire _T_292 = _T_288 ? _T_290 : twos_comp_in[24]; // @[lib.scala 428:23]
wire _T_294 = |twos_comp_in[24:0]; // @[lib.scala 428:35]
wire _T_296 = ~twos_comp_in[25]; // @[lib.scala 428:40]
wire _T_298 = _T_294 ? _T_296 : twos_comp_in[25]; // @[lib.scala 428:23]
wire _T_300 = |twos_comp_in[25:0]; // @[lib.scala 428:35]
wire _T_302 = ~twos_comp_in[26]; // @[lib.scala 428:40]
wire _T_304 = _T_300 ? _T_302 : twos_comp_in[26]; // @[lib.scala 428:23]
wire _T_306 = |twos_comp_in[26:0]; // @[lib.scala 428:35]
wire _T_308 = ~twos_comp_in[27]; // @[lib.scala 428:40]
wire _T_310 = _T_306 ? _T_308 : twos_comp_in[27]; // @[lib.scala 428:23]
wire _T_312 = |twos_comp_in[27:0]; // @[lib.scala 428:35]
wire _T_314 = ~twos_comp_in[28]; // @[lib.scala 428:40]
wire _T_316 = _T_312 ? _T_314 : twos_comp_in[28]; // @[lib.scala 428:23]
wire _T_318 = |twos_comp_in[28:0]; // @[lib.scala 428:35]
wire _T_320 = ~twos_comp_in[29]; // @[lib.scala 428:40]
wire _T_322 = _T_318 ? _T_320 : twos_comp_in[29]; // @[lib.scala 428:23]
wire _T_324 = |twos_comp_in[29:0]; // @[lib.scala 428:35]
wire _T_326 = ~twos_comp_in[30]; // @[lib.scala 428:40]
wire _T_328 = _T_324 ? _T_326 : twos_comp_in[30]; // @[lib.scala 428:23]
wire _T_330 = |twos_comp_in[30:0]; // @[lib.scala 428:35]
wire _T_332 = ~twos_comp_in[31]; // @[lib.scala 428:40]
wire _T_334 = _T_330 ? _T_332 : twos_comp_in[31]; // @[lib.scala 428:23]
wire [6:0] _T_340 = {_T_190,_T_184,_T_178,_T_172,_T_166,_T_160,_T_154}; // @[lib.scala 430:14]
wire [14:0] _T_348 = {_T_238,_T_232,_T_226,_T_220,_T_214,_T_208,_T_202,_T_196,_T_340}; // @[lib.scala 430:14]
wire [7:0] _T_355 = {_T_286,_T_280,_T_274,_T_268,_T_262,_T_256,_T_250,_T_244}; // @[lib.scala 430:14]
wire [30:0] _T_364 = {_T_334,_T_328,_T_322,_T_316,_T_310,_T_304,_T_298,_T_292,_T_355,_T_348}; // @[lib.scala 430:14]
wire [31:0] twos_comp_out = {_T_364,twos_comp_in[0]}; // @[Cat.scala 29:58]
wire _T_366 = ~a_shift; // @[exu_div_ctl.scala 530:6]
wire _T_368 = _T_366 & _T_56; // @[exu_div_ctl.scala 530:15]
wire [31:0] _T_371 = {a_ff[29:0],2'h0}; // @[Cat.scala 29:58]
wire [31:0] _T_146 = twos_comp_q_sel ? q_ff : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_147 = b_twos_comp ? b_ff[31:0] : 32'h0; // @[Mux.scala 27:72]
wire [31:0] twos_comp_in = _T_146 | _T_147; // @[Mux.scala 27:72]
wire _T_151 = |twos_comp_in[0]; // @[lib.scala 428:35]
wire _T_153 = ~twos_comp_in[1]; // @[lib.scala 428:40]
wire _T_155 = _T_151 ? _T_153 : twos_comp_in[1]; // @[lib.scala 428:23]
wire _T_157 = |twos_comp_in[1:0]; // @[lib.scala 428:35]
wire _T_159 = ~twos_comp_in[2]; // @[lib.scala 428:40]
wire _T_161 = _T_157 ? _T_159 : twos_comp_in[2]; // @[lib.scala 428:23]
wire _T_163 = |twos_comp_in[2:0]; // @[lib.scala 428:35]
wire _T_165 = ~twos_comp_in[3]; // @[lib.scala 428:40]
wire _T_167 = _T_163 ? _T_165 : twos_comp_in[3]; // @[lib.scala 428:23]
wire _T_169 = |twos_comp_in[3:0]; // @[lib.scala 428:35]
wire _T_171 = ~twos_comp_in[4]; // @[lib.scala 428:40]
wire _T_173 = _T_169 ? _T_171 : twos_comp_in[4]; // @[lib.scala 428:23]
wire _T_175 = |twos_comp_in[4:0]; // @[lib.scala 428:35]
wire _T_177 = ~twos_comp_in[5]; // @[lib.scala 428:40]
wire _T_179 = _T_175 ? _T_177 : twos_comp_in[5]; // @[lib.scala 428:23]
wire _T_181 = |twos_comp_in[5:0]; // @[lib.scala 428:35]
wire _T_183 = ~twos_comp_in[6]; // @[lib.scala 428:40]
wire _T_185 = _T_181 ? _T_183 : twos_comp_in[6]; // @[lib.scala 428:23]
wire _T_187 = |twos_comp_in[6:0]; // @[lib.scala 428:35]
wire _T_189 = ~twos_comp_in[7]; // @[lib.scala 428:40]
wire _T_191 = _T_187 ? _T_189 : twos_comp_in[7]; // @[lib.scala 428:23]
wire _T_193 = |twos_comp_in[7:0]; // @[lib.scala 428:35]
wire _T_195 = ~twos_comp_in[8]; // @[lib.scala 428:40]
wire _T_197 = _T_193 ? _T_195 : twos_comp_in[8]; // @[lib.scala 428:23]
wire _T_199 = |twos_comp_in[8:0]; // @[lib.scala 428:35]
wire _T_201 = ~twos_comp_in[9]; // @[lib.scala 428:40]
wire _T_203 = _T_199 ? _T_201 : twos_comp_in[9]; // @[lib.scala 428:23]
wire _T_205 = |twos_comp_in[9:0]; // @[lib.scala 428:35]
wire _T_207 = ~twos_comp_in[10]; // @[lib.scala 428:40]
wire _T_209 = _T_205 ? _T_207 : twos_comp_in[10]; // @[lib.scala 428:23]
wire _T_211 = |twos_comp_in[10:0]; // @[lib.scala 428:35]
wire _T_213 = ~twos_comp_in[11]; // @[lib.scala 428:40]
wire _T_215 = _T_211 ? _T_213 : twos_comp_in[11]; // @[lib.scala 428:23]
wire _T_217 = |twos_comp_in[11:0]; // @[lib.scala 428:35]
wire _T_219 = ~twos_comp_in[12]; // @[lib.scala 428:40]
wire _T_221 = _T_217 ? _T_219 : twos_comp_in[12]; // @[lib.scala 428:23]
wire _T_223 = |twos_comp_in[12:0]; // @[lib.scala 428:35]
wire _T_225 = ~twos_comp_in[13]; // @[lib.scala 428:40]
wire _T_227 = _T_223 ? _T_225 : twos_comp_in[13]; // @[lib.scala 428:23]
wire _T_229 = |twos_comp_in[13:0]; // @[lib.scala 428:35]
wire _T_231 = ~twos_comp_in[14]; // @[lib.scala 428:40]
wire _T_233 = _T_229 ? _T_231 : twos_comp_in[14]; // @[lib.scala 428:23]
wire _T_235 = |twos_comp_in[14:0]; // @[lib.scala 428:35]
wire _T_237 = ~twos_comp_in[15]; // @[lib.scala 428:40]
wire _T_239 = _T_235 ? _T_237 : twos_comp_in[15]; // @[lib.scala 428:23]
wire _T_241 = |twos_comp_in[15:0]; // @[lib.scala 428:35]
wire _T_243 = ~twos_comp_in[16]; // @[lib.scala 428:40]
wire _T_245 = _T_241 ? _T_243 : twos_comp_in[16]; // @[lib.scala 428:23]
wire _T_247 = |twos_comp_in[16:0]; // @[lib.scala 428:35]
wire _T_249 = ~twos_comp_in[17]; // @[lib.scala 428:40]
wire _T_251 = _T_247 ? _T_249 : twos_comp_in[17]; // @[lib.scala 428:23]
wire _T_253 = |twos_comp_in[17:0]; // @[lib.scala 428:35]
wire _T_255 = ~twos_comp_in[18]; // @[lib.scala 428:40]
wire _T_257 = _T_253 ? _T_255 : twos_comp_in[18]; // @[lib.scala 428:23]
wire _T_259 = |twos_comp_in[18:0]; // @[lib.scala 428:35]
wire _T_261 = ~twos_comp_in[19]; // @[lib.scala 428:40]
wire _T_263 = _T_259 ? _T_261 : twos_comp_in[19]; // @[lib.scala 428:23]
wire _T_265 = |twos_comp_in[19:0]; // @[lib.scala 428:35]
wire _T_267 = ~twos_comp_in[20]; // @[lib.scala 428:40]
wire _T_269 = _T_265 ? _T_267 : twos_comp_in[20]; // @[lib.scala 428:23]
wire _T_271 = |twos_comp_in[20:0]; // @[lib.scala 428:35]
wire _T_273 = ~twos_comp_in[21]; // @[lib.scala 428:40]
wire _T_275 = _T_271 ? _T_273 : twos_comp_in[21]; // @[lib.scala 428:23]
wire _T_277 = |twos_comp_in[21:0]; // @[lib.scala 428:35]
wire _T_279 = ~twos_comp_in[22]; // @[lib.scala 428:40]
wire _T_281 = _T_277 ? _T_279 : twos_comp_in[22]; // @[lib.scala 428:23]
wire _T_283 = |twos_comp_in[22:0]; // @[lib.scala 428:35]
wire _T_285 = ~twos_comp_in[23]; // @[lib.scala 428:40]
wire _T_287 = _T_283 ? _T_285 : twos_comp_in[23]; // @[lib.scala 428:23]
wire _T_289 = |twos_comp_in[23:0]; // @[lib.scala 428:35]
wire _T_291 = ~twos_comp_in[24]; // @[lib.scala 428:40]
wire _T_293 = _T_289 ? _T_291 : twos_comp_in[24]; // @[lib.scala 428:23]
wire _T_295 = |twos_comp_in[24:0]; // @[lib.scala 428:35]
wire _T_297 = ~twos_comp_in[25]; // @[lib.scala 428:40]
wire _T_299 = _T_295 ? _T_297 : twos_comp_in[25]; // @[lib.scala 428:23]
wire _T_301 = |twos_comp_in[25:0]; // @[lib.scala 428:35]
wire _T_303 = ~twos_comp_in[26]; // @[lib.scala 428:40]
wire _T_305 = _T_301 ? _T_303 : twos_comp_in[26]; // @[lib.scala 428:23]
wire _T_307 = |twos_comp_in[26:0]; // @[lib.scala 428:35]
wire _T_309 = ~twos_comp_in[27]; // @[lib.scala 428:40]
wire _T_311 = _T_307 ? _T_309 : twos_comp_in[27]; // @[lib.scala 428:23]
wire _T_313 = |twos_comp_in[27:0]; // @[lib.scala 428:35]
wire _T_315 = ~twos_comp_in[28]; // @[lib.scala 428:40]
wire _T_317 = _T_313 ? _T_315 : twos_comp_in[28]; // @[lib.scala 428:23]
wire _T_319 = |twos_comp_in[28:0]; // @[lib.scala 428:35]
wire _T_321 = ~twos_comp_in[29]; // @[lib.scala 428:40]
wire _T_323 = _T_319 ? _T_321 : twos_comp_in[29]; // @[lib.scala 428:23]
wire _T_325 = |twos_comp_in[29:0]; // @[lib.scala 428:35]
wire _T_327 = ~twos_comp_in[30]; // @[lib.scala 428:40]
wire _T_329 = _T_325 ? _T_327 : twos_comp_in[30]; // @[lib.scala 428:23]
wire _T_331 = |twos_comp_in[30:0]; // @[lib.scala 428:35]
wire _T_333 = ~twos_comp_in[31]; // @[lib.scala 428:40]
wire _T_335 = _T_331 ? _T_333 : twos_comp_in[31]; // @[lib.scala 428:23]
wire [6:0] _T_341 = {_T_191,_T_185,_T_179,_T_173,_T_167,_T_161,_T_155}; // @[lib.scala 430:14]
wire [14:0] _T_349 = {_T_239,_T_233,_T_227,_T_221,_T_215,_T_209,_T_203,_T_197,_T_341}; // @[lib.scala 430:14]
wire [7:0] _T_356 = {_T_287,_T_281,_T_275,_T_269,_T_263,_T_257,_T_251,_T_245}; // @[lib.scala 430:14]
wire [30:0] _T_365 = {_T_335,_T_329,_T_323,_T_317,_T_311,_T_305,_T_299,_T_293,_T_356,_T_349}; // @[lib.scala 430:14]
wire [31:0] twos_comp_out = {_T_365,twos_comp_in[0]}; // @[Cat.scala 29:58]
wire _T_367 = ~a_shift; // @[exu_div_ctl.scala 530:6]
wire _T_369 = _T_367 & _T_56; // @[exu_div_ctl.scala 530:15]
wire [31:0] _T_372 = {a_ff[29:0],2'h0}; // @[Cat.scala 29:58]
wire [63:0] ar_shifted = _T_61[63:0]; // @[exu_div_ctl.scala 505:28]
wire [31:0] _T_373 = _T_368 ? io_dividend_in : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_374 = a_shift ? _T_371 : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_375 = shortq_enable_ff ? ar_shifted[31:0] : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_376 = _T_373 | _T_374; // @[Mux.scala 27:72]
wire [31:0] a_in = _T_376 | _T_375; // @[Mux.scala 27:72]
wire _T_378 = ~b_twos_comp; // @[exu_div_ctl.scala 536:5]
wire _T_380 = io_signed_in & io_divisor_in[31]; // @[exu_div_ctl.scala 536:63]
wire [32:0] _T_382 = {_T_380,io_divisor_in}; // @[Cat.scala 29:58]
wire _T_383 = ~control_ff[1]; // @[exu_div_ctl.scala 537:49]
wire [32:0] _T_385 = {_T_383,_T_364,twos_comp_in[0]}; // @[Cat.scala 29:58]
wire [32:0] _T_386 = _T_378 ? _T_382 : 33'h0; // @[Mux.scala 27:72]
wire [32:0] _T_387 = b_twos_comp ? _T_385 : 33'h0; // @[Mux.scala 27:72]
wire [32:0] b_in = _T_386 | _T_387; // @[Mux.scala 27:72]
wire [31:0] _T_391 = {r_ff[29:0],a_ff[31:30]}; // @[Cat.scala 29:58]
wire [31:0] _T_396 = r_sign_sel ? 32'hffffffff : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_397 = r_restore_sel ? _T_391 : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_398 = r_adder1_sel ? adder1_out[31:0] : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_399 = r_adder2_sel ? adder2_out[31:0] : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_400 = r_adder3_sel ? adder3_out[31:0] : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_401 = shortq_enable_ff ? ar_shifted[63:32] : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_402 = by_zero_case ? a_ff : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_403 = _T_396 | _T_397; // @[Mux.scala 27:72]
wire [31:0] _T_404 = _T_403 | _T_398; // @[Mux.scala 27:72]
wire [31:0] _T_374 = _T_369 ? io_dividend_in : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_375 = a_shift ? _T_372 : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_376 = shortq_enable_ff ? ar_shifted[31:0] : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_377 = _T_374 | _T_375; // @[Mux.scala 27:72]
wire [31:0] a_in = _T_377 | _T_376; // @[Mux.scala 27:72]
wire _T_379 = ~b_twos_comp; // @[exu_div_ctl.scala 536:5]
wire _T_381 = io_signed_in & io_divisor_in[31]; // @[exu_div_ctl.scala 536:63]
wire [32:0] _T_383 = {_T_381,io_divisor_in}; // @[Cat.scala 29:58]
wire _T_384 = ~control_ff[1]; // @[exu_div_ctl.scala 537:49]
wire [32:0] _T_386 = {_T_384,_T_365,twos_comp_in[0]}; // @[Cat.scala 29:58]
wire [32:0] _T_387 = _T_379 ? _T_383 : 33'h0; // @[Mux.scala 27:72]
wire [32:0] _T_388 = b_twos_comp ? _T_386 : 33'h0; // @[Mux.scala 27:72]
wire [32:0] b_in = _T_387 | _T_388; // @[Mux.scala 27:72]
wire [31:0] _T_392 = {r_ff[29:0],a_ff[31:30]}; // @[Cat.scala 29:58]
wire [31:0] _T_397 = r_sign_sel ? 32'hffffffff : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_398 = r_restore_sel ? _T_392 : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_399 = r_adder1_sel ? adder1_out[31:0] : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_400 = r_adder2_sel ? adder2_out[31:0] : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_401 = r_adder3_sel ? adder3_out[31:0] : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_402 = shortq_enable_ff ? ar_shifted[63:32] : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_403 = by_zero_case ? a_ff : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_404 = _T_397 | _T_398; // @[Mux.scala 27:72]
wire [31:0] _T_405 = _T_404 | _T_399; // @[Mux.scala 27:72]
wire [31:0] _T_406 = _T_405 | _T_400; // @[Mux.scala 27:72]
wire [31:0] _T_407 = _T_406 | _T_401; // @[Mux.scala 27:72]
wire [31:0] r_in = _T_407 | _T_402; // @[Mux.scala 27:72]
wire [31:0] _T_411 = {q_ff[29:0],_T_136,_T_142}; // @[Cat.scala 29:58]
wire [31:0] _T_414 = _T_66 ? _T_411 : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_416 = by_zero_case ? 32'hffffffff : 32'h0; // @[Mux.scala 27:72]
wire [31:0] q_in = _T_414 | _T_416; // @[Mux.scala 27:72]
wire _T_422 = ~twos_comp_q_sel; // @[exu_div_ctl.scala 555:16]
wire _T_423 = _T_27 & _T_422; // @[exu_div_ctl.scala 555:14]
wire [31:0] _T_425 = _T_423 ? q_ff : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_426 = control_ff[0] ? r_ff : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_427 = twos_comp_q_sel ? twos_comp_out : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_428 = _T_425 | _T_426; // @[Mux.scala 27:72]
wire [4:0] _T_910 = 5'h1f - shortq[4:0]; // @[exu_div_ctl.scala 595:57]
wire [4:0] shortq_shift = _T_46 ? 5'h0 : _T_910; // @[exu_div_ctl.scala 595:25]
wire [31:0] _T_408 = _T_407 | _T_402; // @[Mux.scala 27:72]
wire [31:0] r_in = _T_408 | _T_403; // @[Mux.scala 27:72]
wire [31:0] _T_412 = {q_ff[29:0],_T_137,_T_143}; // @[Cat.scala 29:58]
wire [31:0] _T_415 = _T_66 ? _T_412 : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_417 = by_zero_case ? 32'hffffffff : 32'h0; // @[Mux.scala 27:72]
wire [31:0] q_in = _T_415 | _T_417; // @[Mux.scala 27:72]
wire _T_423 = ~twos_comp_q_sel; // @[exu_div_ctl.scala 555:16]
wire _T_424 = _T_27 & _T_423; // @[exu_div_ctl.scala 555:14]
wire [31:0] _T_426 = _T_424 ? q_ff : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_427 = control_ff[0] ? r_ff : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_428 = twos_comp_q_sel ? twos_comp_out : 32'h0; // @[Mux.scala 27:72]
wire [31:0] _T_429 = _T_426 | _T_427; // @[Mux.scala 27:72]
wire [4:0] _T_911 = 5'h1f - shortq[4:0]; // @[exu_div_ctl.scala 595:57]
wire [4:0] shortq_shift = _T_46 ? 5'h0 : _T_911; // @[exu_div_ctl.scala 595:25]
exu_div_cls a_enc ( // @[exu_div_ctl.scala 584:21]
.io_operand(a_enc_io_operand),
.io_cls(a_enc_io_cls)
@ -585,7 +585,7 @@ module exu_div_new_2bit_fullshortq(
.io_clk(rvclkhdr_10_io_clk),
.io_en(rvclkhdr_10_io_en)
);
assign io_data_out = _T_428 | _T_427; // @[exu_div_ctl.scala 554:15]
assign io_data_out = _T_429 | _T_428; // @[exu_div_ctl.scala 554:15]
assign io_valid_out = finish_ff & _T; // @[exu_div_ctl.scala 553:16]
assign a_enc_io_operand = {control_ff[2],a_ff}; // @[exu_div_ctl.scala 585:20]
assign b_enc_io_operand = b_ff[32:0]; // @[exu_div_ctl.scala 588:20]

View File

@ -469,7 +469,7 @@ class exu_div_new_2bit_fullshortq extends Module with RequireAsyncReset with lib
// val r_adder3_sel = WireInit(Bool(),init=false.B)
// val twos_comp_q_sel = WireInit(Bool(),init=false.B)
// val twos_comp_b_sel = WireInit(Bool(),init=false.B)
val quotient_raw = WireInit(0.U(3.W))
val quotient_raw = WireInit(0.U(4.W))
val quotient_new = WireInit(0.U(2.W))
val shortq_enable = WireInit(Bool(),init=false.B)
val shortq_enable_ff = WireInit(Bool(),init=false.B)
@ -518,8 +518,8 @@ class exu_div_new_2bit_fullshortq extends Module with RequireAsyncReset with lib
val adder3_out = Cat(r_ff(31),r_ff(31,0),a_ff(31,30)) + Cat(b_ff(33,0),0.U) + b_ff
quotient_raw := Cat((!adder3_out(34) ^ dividend_sign_ff) | ((a_ff(29,0) === 0.U) & (adder3_out === 0.U)),
(!adder2_out(33) ^ dividend_sign_ff) | ((a_ff(29,0) === 0.U) & (adder2_out === 0.U)),
(!adder1_out(32) ^ dividend_sign_ff) | ((a_ff(29,0) === 0.U) & (adder1_out === 0.U)))
quotient_new := Cat ((quotient_raw(2) | quotient_raw(1)) , (quotient_raw(2) |(!quotient_raw(1) & quotient_raw(0))))
(!adder1_out(32) ^ dividend_sign_ff) | ((a_ff(29,0) === 0.U) & (adder1_out === 0.U)),0.U)
quotient_new := Cat ((quotient_raw(3) | quotient_raw(2)) , (quotient_raw(3) |(!quotient_raw(2) & quotient_raw(1))))
val twos_comp_in = Mux1H(Seq (
twos_comp_q_sel -> q_ff,
twos_comp_b_sel -> b_ff(31,0)