Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
I cannot use the Fixed-point Tool when using dual-port RAMs in my design - strange bug
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hello Community
I have a Simulink design which requires quite a large word lenght (64bit signed fixed-point) to run without overflows.
Now I want to optimize my design by using the Fixed-point Tool Add-On in order to identify the required resolution of sub-blocks in my design.
However, I get a strange error when I try to collect the ranges.
The block "select" is inside the "Simple dual-port RAM" block and is locked, i.e. cannot be edited. The signal "Idx1", which is connected to the "rd_addr" port, is driven by a unsigned integer (unsigned fixed-point number with no fraction). By monitoring this signal I can confirm that no signal with the value "-16" enters the RAM block. Therefore, I do not know what causes this error. Unfortunately, the RAM block is locked and I cannot monitor the internal signals.
I attached a simple Simulink model which reproduces the problem.
How can I fix this?
0 comentarios
Respuestas (1)
Fangjun Jiang
el 7 de Ag. de 2020
Internal "Idx1" traces back to input port "rd_addr". The error is complaining that the "rd_addr" can't be negative. In your model, the "rd_addr" could be negative due to the subtraction of 16.
3 comentarios
Fangjun Jiang
el 8 de Ag. de 2020
For "Range Collection Mode", select "Derived ranges", not "Simulation ranges". It will give you the analysis result. It shows overflows.
Although you wrap it, the value between 0 to 63 subtracted by 16 will cause negative value. Maybe the analysis tool didn't consider the wrap.
It might be worth to report this to the Mathworks tech support.
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!