software/litescope_cli: set default length to None (do a capture with max depth).
This commit is contained in:
parent
bd10138124
commit
12be70325e
|
@ -99,7 +99,7 @@ class LiteScopeAnalyzerDriver:
|
||||||
def configure_subsampler(self, value):
|
def configure_subsampler(self, value):
|
||||||
self.subsampler_value.write(value-1)
|
self.subsampler_value.write(value-1)
|
||||||
|
|
||||||
def run(self, offset = 0, length = None):
|
def run(self, offset=0, length=None):
|
||||||
if length is None:
|
if length is None:
|
||||||
length = self.depth
|
length = self.depth
|
||||||
assert offset < self.depth
|
assert offset < self.depth
|
||||||
|
|
|
@ -64,7 +64,7 @@ def parse_args():
|
||||||
parser.add_argument("-l", "--list", action="store_true", help="List signal choices")
|
parser.add_argument("-l", "--list", action="store_true", help="List signal choices")
|
||||||
parser.add_argument("--subsampling", default="1", help="Capture Subsampling.")
|
parser.add_argument("--subsampling", default="1", help="Capture Subsampling.")
|
||||||
parser.add_argument("--offset", default="32", help="Capture Offset.")
|
parser.add_argument("--offset", default="32", help="Capture Offset.")
|
||||||
parser.add_argument("--length", default="128", help="Capture Length.")
|
parser.add_argument("--length", default=None, help="Capture Length.")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
return args
|
return args
|
||||||
|
|
||||||
|
@ -112,7 +112,10 @@ def main():
|
||||||
if not add_triggers(args, analyzer, signals):
|
if not add_triggers(args, analyzer, signals):
|
||||||
print("WARNING: no trigger added!")
|
print("WARNING: no trigger added!")
|
||||||
|
|
||||||
analyzer.run(offset=int(args.offset, 0), length=int(args.length, 0))
|
analyzer.run(
|
||||||
|
offset = int(args.offset, 0),
|
||||||
|
length = None if args.length is None else int(args.length, 0)
|
||||||
|
)
|
||||||
|
|
||||||
analyzer.wait_done()
|
analyzer.wait_done()
|
||||||
analyzer.upload()
|
analyzer.upload()
|
||||||
|
|
Loading…
Reference in New Issue