ModelSim VHDL实时仿真时间估计

时间:2013-05-15 14:09:54

标签: vhdl modelsim

我想通过测试平台获得模型的VHDL仿真时间。我在ModelSim工作并且知道ModelSim的分析器支持性能分析,但它不是我想要的信息。

耗费时间并不意味着模拟步骤,而是在我的计算机上实时运行。我正在寻找VHDL语句或ModelSim或其他第三方工具中的命令。

2 个答案:

答案 0 :(得分:1)

Modelsim有一个tcl解释器正在运行,所以你可以使用它。

clock seconds函数可能是一个好的开始,将值存储在开头和结尾并减去它们。

TCL tutorial starts here.

例如(Caveat lector:我不是TCL专家,自从我写任何东西以来已经很久了:)

set start [clock seconds]      # store the start time
run -all                       # run the simulation assuming it terminates when finished!
set finish [clock seconds]     # store the end time
puts [ expr {finish - start} ] # print out the difference

答案 1 :(得分:1)

您也可以使用:

set sim_time [time {run -all}]

它将为您提供模拟时间,以微秒为单位。

相关问题