diff --git a/analog/tools/ltspice/__init__.py b/analog/tools/ltspice/__init__.py index 42fe683..638493d 100644 --- a/analog/tools/ltspice/__init__.py +++ b/analog/tools/ltspice/__init__.py @@ -67,11 +67,13 @@ def run(asc: str): # do not allow the WM to decorate window window_path = io.StringIO() executor.sh_exec("winepath -w '%s'" % asc, window_path, NOERR=True, NOOUT=True) - asc = window_path.getvalue().strip().replace("\\", "/") + asc = utils.normpath(window_path.getvalue().strip()) else: ltspice = "XVIIx64.exe" # start the simulation - gen = executor.ish_exec('%s -Run "%s"' % (ltspice, asc), SIM_LOG, MAX_TIMEOUT=300, NOERR=True) + gen = executor.ish_exec( + '%s -Run "%s"' % (ltspice, asc), SIM_LOG, MAX_TIMEOUT=300, NOERR=True + ) proc = next(gen) # watch the log file to determine when # the simulation ends diff --git a/analog/tools/parsers/ltspice_raw.py b/analog/tools/parsers/ltspice_raw.py index 064df91..68cb4ce 100755 --- a/analog/tools/parsers/ltspice_raw.py +++ b/analog/tools/parsers/ltspice_raw.py @@ -13,6 +13,7 @@ sys.path.append(os.environ["REFLOW"]) +import common.utils as utils import common.relog as relog @@ -46,11 +47,13 @@ def load_raw(filename): Returns dict with structure described above. """ + filename = utils.normpath(filename) if not filename.endswith(".raw"): for raw in Path(filename).rglob("**/*.raw"): if not ".op.raw" in str(raw): filename = str(raw) break + filename = utils.normpath(filename) print(filename) ret, header = {}, [] mode, data, time = None, None, None diff --git a/common/templates/report.html.mako b/common/templates/report.html.mako index 85fab40..95753cf 100644 --- a/common/templates/report.html.mako +++ b/common/templates/report.html.mako @@ -187,7 +187,7 @@ def get_block_name(block: dict): ${lint.get("name")} ${"%d" % lint.get("warnings")} ${"%d" % lint.get("errors")} - ${lint.get("total_time")} + ${to_time(lint.get("total_time"))} % endfor diff --git a/envs/bin/create b/envs/bin/create index 3f271be..63662c2 100755 --- a/envs/bin/create +++ b/envs/bin/create @@ -76,7 +76,7 @@ def update_active(env_dir: str = "./"): [ "# Add base path of ReFlow\n", '$env:REFLOW = "%s"\n' % REFLOW_DIR, - '$env:PATH = "%s:" + $env:PATH\n' % REFLOW_BIN, + '$env:PATH = "%s;" + $env:PATH\n' % REFLOW_BIN, "Function reflow_run {python '%s' @args}\n" % os.path.join(REFLOW_BIN, "run"), "Function reflow_create {python '%s' @args}\n" diff --git a/envs/bin/run b/envs/bin/run index e9a5504..af7e8d1 100755 --- a/envs/bin/run +++ b/envs/bin/run @@ -124,7 +124,8 @@ if __name__ == "__main__": if not any(dict(args._get_kwargs()).values()): parser.print_help() exit(0) - + # execution path + CURRENT_DIR = utils.normpath(CURRENT_DIR) # the default configuration default_config = utils.normpath(os.path.join(REFLOW_DIR, "./default.config")) # load a local configuration if there is one diff --git a/tests/.tmp_report/report.html b/tests/.tmp_report/report.html index 30646bd..934d4e8 100644 --- a/tests/.tmp_report/report.html +++ b/tests/.tmp_report/report.html @@ -1,705 +1,705 @@ - - - - - - - - - - - -

tests

-

Thursday, 06. August 2020 17:44

-

- Errors:335 -
- Warnings:2 -
- Elapsed Time:15.993s -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
namelintsimulationcoveragetotal time
- - analog - - -4/4-5.494s
- - batch - - 6/68/80/60.541s
- - digital - - 9/911/112/93.217s
- - ltspice - - -4/4-5.494s
- - others - - ----
- - testcases - - -1/4-1.247s
- -
- - analog - -

Lint

-
No lints
- -

Simulation

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idwarningserrorstotal time
xor001.361s
schmitt001.19s
ota001.12s
filter002.102s
- -

Code coverage

-
No coverage simulations
-
-
- - batch - -

Lint

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idwarningserrorstotal time
s20020.0
youpi0020.0
fast_clock0020.0
tb0025.0
s0018.0
UFC0028.0
- -

Simulation

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idwarningserrorstotal time
s2000.30s
youpi000.30s
fast_clock000.38s
tb000.30s
n000.32s
s000.31s
n2000.31s
UFC000.31s
- -

Code coverage

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idwarningserrorstotal time
s20150.26s
youpi0150.26s
fast_clock0150.28s
tb0150.25s
s0150.26s
UFC0150.26s
-
-
- - digital - -

Lint

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idwarningserrorstotal time
s20020.0
youpi0020.0
fast_clock0020.0
tb0025.0
s0018.0
UFC0028.0
mako0028.0
generic_sar0024.0
simple0018.0
- -

Simulation

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idwarningserrorstotal time
s2000.30s
youpi000.30s
fast_clock000.38s
tb000.30s
n000.32s
s000.31s
n2000.31s
UFC000.31s
mako101.254s
generic_sar101.230s
simple000.29s
- -

Code coverage

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idwarningserrorstotal time
s20150.26s
youpi0150.26s
fast_clock0150.28s
tb0150.25s
s0150.26s
UFC0150.26s
mako010.32s
generic_sar000.32s
simple000.29s
-
-
- - ltspice - -

Lint

-
No lints
- -

Simulation

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idwarningserrorstotal time
xor001.361s
schmitt001.19s
ota001.12s
filter002.102s
- -

Code coverage

-
No coverage simulations
-
-
- - others - -

Lint

-
No lints
- -

Simulation

-
No simulations
- -

Code coverage

-
No coverage simulations
-
-
- - testcases - -

Lint

-
No lints
- -

Simulation

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idwarningserrorstotal time
50meg020.310s
60meg040.317s
100meg01480.307s
32meg000.313s
- -

Code coverage

-
No coverage simulations
-
- - + + + + + + + + + + + +

tests

+

Monday, 14. September 2020 20:38

+

+ Errors:154 +
+ Warnings:2 +
+ Elapsed Time:28.335s +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
namelintsimulationcoveragetotal time
+ + analog + + -4/4-9.417s
+ + batch + + 6/68/86/61.268s
+ + digital + + 9/911/119/95.570s
+ + ltspice + + -4/4-9.417s
+ + others + + ----
+ + testcases + + -1/4-2.663s
+ +
+ + analog + +

Lint

+
No lints
+ +

Simulation

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idwarningserrorstotal time
filter002.871s
ota002.21s
schmitt002.51s
xor002.474s
+ +

Code coverage

+
No coverage simulations
+
+
+ + batch + +

Lint

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idwarningserrorstotal time
fast_clock000.58s
s000.62s
s2000.79s
tb000.94s
UFC000.65s
youpi000.75s
+ +

Simulation

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idwarningserrorstotal time
fast_clock000.82s
n000.93s
n2000.69s
s000.82s
s2000.83s
tb000.109s
UFC000.77s
youpi000.128s
+ +

Code coverage

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idwarningserrorstotal time
fast_clock000.15s
s000.16s
s2000.15s
tb000.17s
UFC000.31s
youpi000.18s
+
+
+ + digital + +

Lint

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idwarningserrorstotal time
simple000.84s
generic_sar000.53s
mako000.78s
fast_clock000.58s
s000.62s
s2000.79s
tb000.94s
UFC000.65s
youpi000.75s
+ +

Simulation

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idwarningserrorstotal time
simple000.197s
generic_sar101.979s
mako101.813s
fast_clock000.82s
n000.93s
n2000.69s
s000.82s
s2000.83s
tb000.109s
UFC000.77s
youpi000.128s
+ +

Code coverage

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idwarningserrorstotal time
simple000.31s
generic_sar000.52s
mako000.15s
fast_clock000.15s
s000.16s
s2000.15s
tb000.17s
UFC000.31s
youpi000.18s
+
+
+ + ltspice + +

Lint

+
No lints
+ +

Simulation

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idwarningserrorstotal time
filter002.871s
ota002.21s
schmitt002.51s
xor002.474s
+ +

Code coverage

+
No coverage simulations
+
+
+ + others + +

Lint

+
No lints
+ +

Simulation

+
No simulations
+ +

Code coverage

+
No coverage simulations
+
+
+ + testcases + +

Lint

+
No lints
+ +

Simulation

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idwarningserrorstotal time
100meg01480.695s
32meg000.728s
50meg020.603s
60meg040.637s
+ +

Code coverage

+
No coverage simulations
+
+ + \ No newline at end of file