diff --git a/pyrtl/simulation.py b/pyrtl/simulation.py index 6c783533..cb58bc8f 100644 --- a/pyrtl/simulation.py +++ b/pyrtl/simulation.py @@ -1756,6 +1756,8 @@ def render_trace( is not found in the map, the argument ``repr_func`` will be used instead. :param segment_size: Traces are broken in the segments of this number of cycles. """ + if len(self) == 0: + raise PyrtlError("You need to step the simulation at least once to render a trace.") if repr_per_name is None: repr_per_name = {} if _currently_in_jupyter_notebook():