File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1755,6 +1755,9 @@ def render_trace(
17551755 is not found in the map, the argument ``repr_func`` will be used instead.
17561756 :param segment_size: Traces are broken in the segments of this number of cycles.
17571757 """
1758+ if len (self ) == 0 :
1759+ msg = "You need to step the simulation at least once to render a trace."
1760+ raise PyrtlError (msg )
17581761 if repr_per_name is None :
17591762 repr_per_name = {}
17601763 if _currently_in_jupyter_notebook ():
Original file line number Diff line number Diff line change @@ -1206,14 +1206,8 @@ def test_empty_trace_after_untraceable_removed(self):
12061206 r .next <<= r + 1
12071207 sim = self .sim ()
12081208 sim .step_multiple (provided_inputs = {}, nsteps = 10 )
1209- with self .assertRaises (pyrtl .PyrtlError ) as ex :
1209+ with self .assertRaises (pyrtl .PyrtlError ):
12101210 sim .tracer .render_trace ()
1211- self .assertEqual (
1212- str (ex .exception ),
1213- "Empty trace list. This may have occurred because "
1214- "untraceable wires were removed prior to simulation, "
1215- "if a CompiledSimulation was used." ,
1216- )
12171211
12181212 def test_invalid_base (self ):
12191213 self .in1 = pyrtl .Input (8 , "in1" )
You can’t perform that action at this time.
0 commit comments