Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎04-10-2019

Keep track of time passed

I Implemented a .cpp file in ROS platform (Robotics Operating System) on and it worked perfectly fine when I added this file on the zynq board and tested it , but my problem is that now I  need to implement the same file in HLS but I can't because in ROS I kept track of time passed (dt )to use it in my equations but I can't in HLS , Is there a way to do so ?

Attached is a photo of the time part which is implemented with ROS and needs to be implemented in HLS .

Please note that I should be able to synthesis it and export this file to get a packaged IP , or if there is any hack that would get me around this ?

Mohamed Taher
Tags (4)
0 Kudos
1 Reply
Registered: ‎04-26-2015

How about adding a free-running timer, either connected directly to the block with a parallel port or via AXI (which means other things can access it too and get a consistent source of time)? Then you would replace all calls to ros::Time::now() with a query to the timer.


This will not be consistent with the CPU's timer (ie code running on the CPU will get different answers, unless it also polls the AXI timer) but that may not be critical.