Bug with #PRAGMA HLS STABLE
Created by: nicologhielmetti
During the development of VivadoAccelerator
backend I noticed that the #PRAGMA HLS STABLE
causes unexpected outputs for the models during cosim. I created 4 tests which are the combinations of these settings:
{io_stream, io_parallel} x {stable_pragma, no_stable_pragma}
. You can find the generated projects here.
You can see, comparing the files generated by csim and cosim, that the validation doesn't result as passed for all the cases that contain #PRAGMA HLS STABLE
.
In particular:
{stable_pragma, io_stream}
shows duplicates rows in the cosim output
cosim
{ data: 0.366211, last: 0 }
{ data: 0.104492, last: 0 }
{ data: 0.0869141, last: 0 }
{ data: 0.267578, last: 0 }
{ data: 0.196289, last: 1 }
{ data: 0.366211, last: 0 }
{ data: 0.104492, last: 0 }
{ data: 0.0869141, last: 0 }
{ data: 0.267578, last: 0 }
{ data: 0.196289, last: 1 }
csim
{ data: 0.130859, last: 0 }
{ data: 0.130859, last: 0 }
{ data: 0.428711, last: 0 }
{ data: 0.167969, last: 0 }
{ data: 0.167969, last: 1 }
{ data: 0.366211, last: 0 }
{ data: 0.104492, last: 0 }
{ data: 0.0869141, last: 0 }
{ data: 0.267578, last: 0 }
{ data: 0.196289, last: 1 }
{stable_pragma, io_parallel}
shows slighlty different values in the cosim output
cosim
{ data: 0.136719, last: 0 }
{ data: 0.136719, last: 0 }
{ data: 0.451172, last: 0 }
{ data: 0.175781, last: 0 }
{ data: 0.113281, last: 1 }
{ data: 0.347656, last: 0 }
{ data: 0.0996094, last: 0 }
{ data: 0.0820312, last: 0 }
{ data: 0.253906, last: 0 }
{ data: 0.238281, last: 1 }
csim
{ data: 0.130859, last: 0 }
{ data: 0.130859, last: 0 }
{ data: 0.428711, last: 0 }
{ data: 0.167969, last: 0 }
{ data: 0.167969, last: 1 }
{ data: 0.366211, last: 0 }
{ data: 0.104492, last: 0 }
{ data: 0.0869141, last: 0 }
{ data: 0.267578, last: 0 }
{ data: 0.196289, last: 1 }