1
0
mirror of https://github.com/myhdl/myhdl.git synced 2024-12-14 07:44:38 +08:00

Raise traceSignals to DeprecationWarning from UserWarning (#401)

This commit is contained in:
Dave Keeshan 2022-12-24 09:48:13 +00:00 committed by GitHub
parent da9adf848a
commit 7c6a5fda54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -111,7 +111,10 @@ class _TraceSignalsClass(object):
h = _getHierarchy(name, dut)
else:
warnings.warn(
"\n traceSignals(): Deprecated usage: See http://dev.myhdl.org/meps/mep-114.html", stacklevel=2)
"\n traceSignals(): Deprecated usage: See http://dev.myhdl.org/meps/mep-114.html",
category=DeprecationWarning,
stacklevel=2,
)
h = _HierExtr(name, dut, *args, **kwargs)
if self.filename is None:

View File

@ -39,3 +39,10 @@ def testOldToVHDL():
def testOldToVerilog():
with pytest.deprecated_call():
toVerilog(bin2gray_depr, width, BB, GG)
def testOldToTraceSignals():
with pytest.deprecated_call():
vcd = traceSignals(bin2gray_depr, width, BB, GG)
sim = Simulation(vcd)
sim.run(20)