diff --git a/t1rocketemu/online_dpi/src/dpi.rs b/t1rocketemu/online_dpi/src/dpi.rs index 0b1bd54899..f4b51f221b 100644 --- a/t1rocketemu/online_dpi/src/dpi.rs +++ b/t1rocketemu/online_dpi/src/dpi.rs @@ -40,7 +40,7 @@ unsafe fn load_from_payload( size: usize, ) -> (Vec, &[u8]) { let src = *payload as *mut u8; - let data_width_in_byte = size; + let data_width_in_byte = std::cmp::max(size, 4); let strb_width_per_byte = if data_width < 64 { 4 } else { 8 }; let strb_width_in_byte = size.div_ceil(strb_width_per_byte);