First you will run C simulation to confirm the optimized design works as expected. Edit the tsp.h
file to make sure the number of cities is small (N=5
) for faster simulation run times, and Run C Simulation.
After reviewing the results of simulation, increase the number of cities again (N=13
) in the tsp.h
file for C synthesis so that you can compare results with the original design. Run C Synthesis.
The following figure shows the C synthesis report in the Vitis HLS GUI (the Performance and Resource Estimates section):
You will notice that:
The latency for the
tsp
function is now less than a secondThe loop distance trip count is unchanged as expected since the input data is same
The tripcount for the main loop (
loop_compute
) is now a fourth of factorial 12 (12!/4) thanks to the parallel execution of thecompute
functionThe new
Loop 3
originates from the final std::min call that returns the smallest of the 4 results obtained