diff --git a/compiler/debug.py b/compiler/debug.py index 271b874b..e6c6a1bd 100644 --- a/compiler/debug.py +++ b/compiler/debug.py @@ -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( diff --git a/compiler/example_configs/big_config_scn4m_subm.py b/compiler/example_configs/big_config_scn4m_subm.py index 0f71169b..4fa4de8d 100644 --- a/compiler/example_configs/big_config_scn4m_subm.py +++ b/compiler/example_configs/big_config_scn4m_subm.py @@ -1,4 +1,4 @@ -word_size = 8 +word_size = 32 num_words = 128 tech_name = "scn4m_subm" diff --git a/compiler/run_profile.sh b/compiler/run_profile.sh index 1b8df3ae..37a130a4 100755 --- a/compiler/run_profile.sh +++ b/compiler/run_profile.sh @@ -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" diff --git a/compiler/view_profile.py b/compiler/view_profile.py index 5a522b8a..cb5a0cfd 100755 --- a/compiler/view_profile.py +++ b/compiler/view_profile.py @@ -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()