tools/litex_sim: avoid build/run duplication.
This commit is contained in:
parent
e8f21cd958
commit
31afe55821
|
@ -398,21 +398,22 @@ def main():
|
||||||
# Build/Run ------------------------------------------------------------------------------------
|
# Build/Run ------------------------------------------------------------------------------------
|
||||||
builder_kwargs["csr_csv"] = "csr.csv"
|
builder_kwargs["csr_csv"] = "csr.csv"
|
||||||
builder = Builder(soc, **builder_kwargs)
|
builder = Builder(soc, **builder_kwargs)
|
||||||
vns = builder.build(run=False, threads=args.threads, sim_config=sim_config,
|
for i in range(2):
|
||||||
opt_level = args.opt_level,
|
build = (i == 0)
|
||||||
trace = args.trace,
|
run = (i == 1)
|
||||||
trace_fst = args.trace_fst,
|
vns = builder.build(
|
||||||
trace_start = int(args.trace_start),
|
build = build,
|
||||||
trace_end = int(args.trace_end))
|
run = run,
|
||||||
if args.with_analyzer:
|
threads = args.threads,
|
||||||
soc.analyzer.export_csv(vns, "analyzer.csv")
|
sim_config = sim_config,
|
||||||
builder.build(build=False, threads=args.threads, sim_config=sim_config,
|
opt_level = args.opt_level,
|
||||||
opt_level = args.opt_level,
|
trace = args.trace,
|
||||||
trace = args.trace,
|
trace_fst = args.trace_fst,
|
||||||
trace_fst = args.trace,
|
trace_start = int(args.trace_start),
|
||||||
trace_start = int(args.trace_start),
|
trace_end = int(args.trace_end)
|
||||||
trace_end = int(args.trace_end)
|
)
|
||||||
)
|
if args.with_analyzer:
|
||||||
|
soc.analyzer.export_csv(vns, "analyzer.csv")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in New Issue