mirror of https://github.com/VLSIDA/OpenRAM.git
Drop to debug in debug module when -d
This commit is contained in:
parent
2c76a2680f
commit
681b3a91aa
|
|
@ -16,6 +16,9 @@ import sys
|
||||||
# 2 = verbose
|
# 2 = verbose
|
||||||
# n = custom setting
|
# n = custom setting
|
||||||
|
|
||||||
|
import globals
|
||||||
|
import pdb
|
||||||
|
|
||||||
|
|
||||||
def check(check, str):
|
def check(check, str):
|
||||||
if not check:
|
if not check:
|
||||||
|
|
@ -26,6 +29,9 @@ def check(check, str):
|
||||||
log("ERROR: file {0}: line {1}: {2}\n".format(
|
log("ERROR: file {0}: line {1}: {2}\n".format(
|
||||||
os.path.basename(filename), line_number, str))
|
os.path.basename(filename), line_number, str))
|
||||||
|
|
||||||
|
if globals.OPTS.debug:
|
||||||
|
pdb.set_trace()
|
||||||
|
|
||||||
assert 0
|
assert 0
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -37,6 +43,9 @@ def error(str, return_value=0):
|
||||||
log("ERROR: file {0}: line {1}: {2}\n".format(
|
log("ERROR: file {0}: line {1}: {2}\n".format(
|
||||||
os.path.basename(filename), line_number, str))
|
os.path.basename(filename), line_number, str))
|
||||||
|
|
||||||
|
if globals.OPTS.debug:
|
||||||
|
pdb.set_trace()
|
||||||
|
|
||||||
assert return_value == 0
|
assert return_value == 0
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue