PEP8 formatting

This commit is contained in:
mrg 2020-06-18 14:55:01 -07:00
parent 69f5621245
commit 403ea17039
1 changed files with 64 additions and 72 deletions

View File

@ -5,23 +5,18 @@
# (acting for and on behalf of Oklahoma State University) # (acting for and on behalf of Oklahoma State University)
# All rights reserved. # All rights reserved.
# #
import sys,re,shutil
import copy
import collections import collections
from design import design
import debug import debug
import math
import tech
import random import random
from .stimuli import * from .stimuli import *
from .charutils import * from .charutils import *
import utils
from globals import OPTS from globals import OPTS
from .simulation import simulation from .simulation import simulation
# from .delay import delay # from .delay import delay
import graph_util import graph_util
from sram_factory import factory from sram_factory import factory
class functional(simulation): class functional(simulation):
""" """
Functions to write random data values to a random address then read them back and check Functions to write random data values to a random address then read them back and check
@ -60,7 +55,6 @@ class functional(simulation):
self.read_check = [] self.read_check = []
self.read_results = [] self.read_results = []
def run(self, feasible_period=None): def run(self, feasible_period=None):
if feasible_period: #period defaults to tech.py feasible period otherwise. if feasible_period: #period defaults to tech.py feasible period otherwise.
self.period = feasible_period self.period = feasible_period
@ -282,14 +276,13 @@ class functional(simulation):
# wmask must be reversed since a python list goes right to left and sram bits go left to right. # wmask must be reversed since a python list goes right to left and sram bits go left to right.
return wmask[::-1] return wmask[::-1]
def gen_data(self): def gen_data(self):
""" Generates a random word to write. """ """ Generates a random word to write. """
if not self.num_spare_cols: if not self.num_spare_cols:
random_value = random.randint(0,(2**(self.word_size))-1) random_value = random.randint(0, (2 ** self.word_size) - 1)
else: else:
random_value1 = random.randint(0,(2**(self.word_size))-1) random_value1 = random.randint(0, (2 ** self.word_size) - 1)
random_value2 = random.randint(0,(2**(self.num_spare_cols))-1) random_value2 = random.randint(0, (2 ** self.num_spare_cols) - 1)
random_value = random_value1 + random_value2 random_value = random_value1 + random_value2
data_bits = self.convert_to_bin(random_value, False) data_bits = self.convert_to_bin(random_value, False)
return data_bits return data_bits
@ -504,7 +497,6 @@ class functional(simulation):
cell_bl = cell_mod.get_bl_name(port) cell_bl = cell_mod.get_bl_name(port)
cell_br = cell_mod.get_br_name(port) cell_br = cell_mod.get_br_name(port)
bl_found = False
# Only a single path should contain a single s_en name. Anything else is an error. # Only a single path should contain a single s_en name. Anything else is an error.
bl_names = [] bl_names = []
exclude_set = self.get_bl_name_search_exclusions() exclude_set = self.get_bl_name_search_exclusions()