mirror of https://github.com/VLSIDA/OpenRAM.git
Move inspect into if statement for runtime
This commit is contained in:
parent
1bdf4dbe4f
commit
82a09be026
|
|
@ -11,9 +11,9 @@ import sys
|
|||
|
||||
|
||||
def check(check, str):
|
||||
(frame, filename, line_number, function_name, lines,
|
||||
index) = inspect.getouterframes(inspect.currentframe())[1]
|
||||
if not check:
|
||||
(frame, filename, line_number, function_name, lines,
|
||||
index) = inspect.getouterframes(inspect.currentframe())[1]
|
||||
sys.stderr.write("ERROR: file {0}: line {1}: {2}\n".format(
|
||||
os.path.basename(filename), line_number, str))
|
||||
log("ERROR: file {0}: line {1}: {2}\n".format(
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
word_size = 8
|
||||
word_size = 32
|
||||
num_words = 128
|
||||
|
||||
tech_name = "scn4m_subm"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
python3 -m cProfile -o profile.dat ./openram.py example_config_scn4m_subm.py -v
|
||||
python3 -m cProfile -o profile.dat ./openram.py example_configs/medium_config_scn4m_subm.py -v | tee -i medium.log
|
||||
echo "Run view_profile.py to view results"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
import pstats
|
||||
p = pstats.Stats(‘profile.dat’)
|
||||
p = pstats.Stats("profile.dat")
|
||||
p.strip_dirs()
|
||||
p.sort_stats(‘cumulative’)
|
||||
p.print_stats(50)
|
||||
p.sort_stats("cumulative")
|
||||
#p.print_stats(50)
|
||||
p.print_stats()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue