Work in progress

This commit is contained in:
Julian Hammer
2017-10-04 13:47:14 +02:00
parent a734f233f4
commit 18825b48cd
6 changed files with 17 additions and 17 deletions

View File

@@ -4,10 +4,12 @@ import sys
import os
import math
import ast
from param import Register, MemAddr
from operator import add
import pandas as pd
from .param import Register, MemAddr
class Scheduler(object):

View File

@@ -2,8 +2,8 @@
import os
import re
import argparse
from testcase import Testcase
from param import Register, MemAddr, Parameter
from .testcase import Testcase
from .param import Register, MemAddr, Parameter
class InstrExtractor(object):

View File

@@ -6,9 +6,9 @@ import os
import io
import re
import subprocess
from param import Register, MemAddr, Parameter
from eu_sched import Scheduler
from testcase import Testcase
from .param import Register, MemAddr, Parameter
from .eu_sched import Scheduler
from .testcase import Testcase
import pandas as pd
from datetime import datetime
import numpy as np
@@ -53,10 +53,10 @@ class Osaca(object):
# Check args and exit program if something's wrong
if(not self.check_arch()):
print('Invalid microarchitecture.')
sys.exit()
sys.exit(1)
if(not self.check_file()):
print('Invalid file path or file format.')
sys.exit()
print('Invalid file path or file format.', file=sys.stderr)
sys.exit(1)
# Check for database for the chosen architecture
self.df = self.read_csv()
# Create sequence of numbers and their reciprokals for validate the measurements
@@ -132,10 +132,10 @@ class Osaca(object):
# Check args and exit program if something's wrong
if(not self.check_arch()):
print('Invalid microarchitecture.')
sys.exit()
sys.exit(1)
if(not self.check_elffile()):
print('Invalid file path or file format.')
sys.exit()
sys.exit(1)
# Finally check for database for the chosen architecture
self.read_csv()
@@ -210,9 +210,10 @@ class Osaca(object):
False if file does not exist or is not an elf64 file
"""
print(self.filepath, os.path.isfile(self.filepath))
if(os.path.isfile(self.filepath)):
self.store_src_code_elf()
if('file format elf64' in self.srcCode[1]):
if('file format elf64' in self.srcCode[1].lower()):
return True
return False

View File

@@ -3,7 +3,7 @@
import os
from subprocess import call
from math import ceil
from param import Register, MemAddr, Parameter
from .param import Register, MemAddr, Parameter
class Testcase(object):

View File

@@ -103,9 +103,6 @@ setup(
# If there are data files included in your packages that need to be
# installed, specify them here. If using Python 2.6 or less, then these
# have to be included in MANIFEST.in as well.
package_data={
'osaca': ['data/*.csv', 'README.rst', 'LICENSE'],
},
include_package_data=True,
# Although 'package_data' is the preferred approach, in some case you may

View File

@@ -2,4 +2,4 @@
envlist = py35
[testenv]
commands=
osaca
osaca --arch ivb --iaca osaca/taxCalc/ivb-iaca