fpu: detect RV64 FCVT.WU.D overflow on a round-up to 2^32
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- embedded-iot
Hướng nghiên cứu
Start in hw/rtl/fpu/VX_fcvt_unit.sv around lines 632-634, at round_carry_out_s5 and f2i_u32_pos_ovf. Trace how input_sign_s5, unpacked_exp_s5, dst_l_s5, and rounded_abs_s5 are formed for RV64 FCVT.WU.D; the pre-round exponent is 31 while rounding carries the magnitude to 2^32. Reproduce with input 0x41effffffff00000 and frm=RNE, then extend the unsigned overflow condition to cover a rounded value of 2^32, expecting 0xffffffffffffffff and NV set. Done means that case and the (2^32-1,2^32) interval are covered by the FPU tests.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
On RV64 at commit 1061088aa, FCVT.WU.D of 4294967295.5 (0x41effffffff00000) with frm=RNE returns 0 and raises only NX. RNE rounds this value to 2^32, which is outside the unsigned 32-bit range. The result should be 0xffffffffffffffff and NV should be set.
The overflow check misses this case. On RV64, S_MAN_WIDTH is at least 64, so rounding to 2^32 does not wrap rounded_abs_s5 to zero; meanwhile, the pre-round exponent is 31. The conversion therefore takes the in-range path and writes the low 32 bits of 2^32, which are zero. The same issue affects values in (2^32-1, 2^32) that round to 2^32.
This is distinct from #430, which concerns FCVT.S.D overflow rounding and was fixed by #432. It is also distinct from the f2i_u32_pos_ovf zero-extension issue: that branch is reached only when overflow is detected, while this input does not trigger it.
In hw/rtl/fpu/VX_fcvt_unit.sv, round-up carry is counted as overflow only when the rounded magnitude wraps to zero:
wire round_carry_out_s5 = (rounded_abs_s5 == '0) && (|pre_round_abs_s5);
wire f2i_u32_pos_ovf = !is_signed_s5 && !dst_l_s5 && !input_sign_s5
&& ((unpacked_exp_s5 >= S_EXP_WIDTH'(32)) || round_carry_out_s5);
- Ngôn ngữ chính
- Verilog
- Star
- 2.4k
- Fork
- 563
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 33
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của vortexgpgpu/vortex
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
vortexgpgpu/vortex#501 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
vortexgpgpu/vortex#499 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
vortexgpgpu/vortex#505 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
vortexgpgpu/vortex#504 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 22/100
vortexgpgpu/vortex#503 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của vortexgpgpu/vortex
Issue tương tự
-
nuttx/esp32s3: sdkconfig.h has no "no console" case, so CONFIG_NO_SERIAL_CONSOLE builds failĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 61/100
-
mass-storage-gadget64: eMMC is exported as removable media, so Windows cannot write a GPT imageĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
raspberrypi/usbboot#419 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
crosspoint-reader/crosspoint-reader#4595 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày