Commit 0a7cd7a
committed
fix: Raise a helpful error on a bogus testplan
I found this because I had added a problem to a testplan and running
dvsim on the resulting block didn't work. But it failed silently!
Now, you get a backtrace:
...
File "/home/rjs/work/dvsim/src/dvsim/sim/flow.py", line 324, in _create_objects
self.testplan = Testplan(
^^^^^^^^^
File "/home/rjs/work/dvsim/src/dvsim/testplan.py", line 350, in __init__
self._parse_testplan(filename, tags, repo_top)
File "/home/rjs/work/dvsim/src/dvsim/testplan.py", line 463, in _parse_testplan
self.covergroups = self._create_testplan_elements("covergroup", covergroups, set())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rjs/work/dvsim/src/dvsim/testplan.py", line 284, in _create_testplan_elements
raise ValueError(err_msg)
ValueError: Duplicate items with name handshake_complete_cg.
(which also tells me what I did wrong in my OpenTitan patch!)
Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>1 parent 5b6890a commit 0a7cd7a
1 file changed
Lines changed: 15 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
259 | | - | |
| 258 | + | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
266 | 273 | | |
267 | 274 | | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
273 | 279 | | |
274 | 280 | | |
275 | | - | |
| 281 | + | |
| 282 | + | |
276 | 283 | | |
277 | 284 | | |
278 | 285 | | |
| |||
0 commit comments