Fix forward progress in driver | Add more checks for correct profile-interval
This commit is contained in:
parent
d90a280ced
commit
159e949e6d
|
@ -236,7 +236,8 @@ class RuntimeHWConfig:
|
|||
permissive_driver_args += [f"$(sed \':a;N;$!ba;s/\\n/ /g\' {runtimeconf})"] if runtimeconf else []
|
||||
permissive_driver_args += [run_device_placement]
|
||||
permissive_driver_args += [vitis_bit]
|
||||
permissive_driver_args += [f"+profile-interval={profile_interval}"]
|
||||
if profile_interval != -1:
|
||||
permissive_driver_args += [f"+profile-interval={profile_interval}"]
|
||||
permissive_driver_args += [zero_out_dram]
|
||||
permissive_driver_args += [disable_asserts]
|
||||
permissive_driver_args += command_macs
|
||||
|
|
|
@ -37,6 +37,11 @@ firesim_top_t::firesim_top_t(simif_t &simif,
|
|||
for (auto &arg : args) {
|
||||
if (arg.find("+profile-interval=") == 0) {
|
||||
profile_interval = atoi(arg.c_str() + 18);
|
||||
|
||||
if (*profile_interval == 0) {
|
||||
fprintf(stderr, "Must provide a profile interval > 0\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +50,7 @@ firesim_top_t::firesim_top_t(simif_t &simif,
|
|||
|
||||
// Add functions you'd like to periodically invoke on a paused simulator here.
|
||||
if (profile_interval) {
|
||||
register_task(0, [&] {
|
||||
register_task(0, [&, profile_interval] { // capture profile_interval by copy otherwise you will get a invalid optional
|
||||
for (auto &mod : registry.get_bridges<FASEDMemoryTimingModel>()) {
|
||||
mod->profile();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue