You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable ruffflake8-errmsg checks and apply fixes. This moves exception error messages to an err variable, to make tracebacks more readable:
Before (error message is partially repeated):
```
>>> pyrtl.Simulation()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/lauj/venv/pyrtlnet/lib/python3.12/site-packages/pyrtl/simulation.py", line 126, in __init__
tracer = SimulationTrace()
^^^^^^^^^^^^^^^^^
File "/home/lauj/venv/pyrtlnet/lib/python3.12/site-packages/pyrtl/simulation.py", line 1490, in __init__
raise PyrtlError("There needs to be at least one named non-constant wire "
pyrtl.pyrtlexceptions.PyrtlError: There needs to be at least one named non-constant wire for simulation to be useful
```
After (only one copy of the error message):
```
>>> pyrtl.Simulation()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/lauj/projects/pyrtl/pyrtl/simulation.py", line 143, in __init__
tracer = SimulationTrace()
^^^^^^^^^^^^^^^^^
File "/home/lauj/projects/pyrtl/pyrtl/simulation.py", line 1582, in __init__
raise PyrtlError(msg)
pyrtl.pyrtlexceptions.PyrtlError: There needs to be at least one named non-constant wire for simulation to be useful
```
Copy file name to clipboardExpand all lines: ipynb-examples/example2-counter.ipynb
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -119,7 +119,7 @@
119
119
"source": [
120
120
"#### A couple interesting features of PyRTL can be seen here:\n",
121
121
"* WireVectors can be indexed like lists, with [0] accessing the least significant bit and [1:] being an example of the use of Python slicing syntax.\n",
122
-
"* While you can add two lists together in python a WireVector + Wirevector means \"make an adder\" so to concatenate the bits of two vectors one need to use \"concat\".\n",
122
+
"* While you can add two lists together in python a WireVector + WireVector means \"make an adder\" so to concatenate the bits of two vectors one need to use \"concat\".\n",
123
123
"* If we look at \"cin\" it seems to have a default value of the integer \"0\" but is a WireVector at other times.Python supports polymorphism throughout and PyRTL will cast integers and some other types to WireVectors when it can."
0 commit comments