litex_json2renode: only add cpu timeProvider if time_provider exists

This commit is contained in:
Rasmus Pedersen 2023-06-29 14:13:49 +02:00
parent 648c70de82
commit a12703b4ee

View file

@ -297,7 +297,7 @@ def generate_cpu(csr, time_provider, number_of_cores):
cpu{cpu_id}: CPU.{cpu_string.strip()}
hartId: {cpu_id}
"""
if cpu.get('supports_time_provider', False):
if cpu.get('supports_time_provider', False) and time_provider:
result += f' timeProvider: {time_provider}\n'
return result