Skip to content

Commit

Permalink
Fix cw521 reference internally
Browse files Browse the repository at this point in the history
  • Loading branch information
colinoflynn committed Oct 8, 2020
1 parent 558511c commit bd040fc
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions ballisticgel/ballisticgel.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,17 @@ def seed_test_setup(self, seed=0xFAA2):
#time1 = time.clock()

# Have to do one extra?
for i in range(int(cw521.sram_len / self.block_size) + 1):
cw521.write_seed(state, i * self.block_size, self.block_size)
# cw521.write_pattern(data)
for i in range(int(self.sram_len / self.block_size) + 1):
self.write_seed(state, i * self.block_size, self.block_size)
# self.write_pattern(data)
#time2 = time.clock()
#write_time = time2 - time1

#Generate random test vector (so when re-run know if write was working)
# print "Generating test vector %d bytes"%cw521.sram_len
# print "Generating test vector %d bytes"%self.sram_len

# time1 = time.clock()
# data = get_xor_sram(cw521.sram_len)
# data = get_xor_sram(self.sram_len)
# time2 = time.clock()
# pattern_time = time2 - time1

Expand All @@ -177,12 +177,12 @@ def seed_test_compare(self):

#time1 = time.clock()
errorlist = []
for i in range(0, int(cw521.sram_len / self.block_size)):
errorlist.extend(cw521.read_pattern_rng(i * self.block_size, self.block_size))
for i in range(0, int(self.sram_len / self.block_size)):
errorlist.extend(self.read_pattern_rng(i * self.block_size, self.block_size))
#time2 = time.clock()
#read_time = time2 - time1

test_len = cw521.sram_len
test_len = self.sram_len
#time1 = time.clock()
byte_errors = 0
for i in range(0, len(errorlist)):
Expand Down Expand Up @@ -220,16 +220,16 @@ def raw_test_setup(self):
raw_test_compare()"""

#Generate random test vector (so when re-run know if write was working)
#print "Generating test vector %d bytes"%cw521.sram_len
#print "Generating test vector %d bytes"%self.sram_len

#time1 = time.clock()
self.data = np.random.randint(0, 256, cw521.sram_len)
self.data = np.random.randint(0, 256, self.sram_len)
#time2 = time.clock()
#pattern_time = time2 - time1

#print "Writing..."
#time1 = time.clock()
cw521.write_pattern(self.data)
self.write_pattern(self.data)
#time2 = time.clock()
#write_time = time2 - time1

Expand All @@ -240,7 +240,7 @@ def raw_test_compare(self):
with raw_test_setup()"""

#time1 = time.clock()
din = cw521.read_pattern()
din = self.read_pattern()
#time2 = time.clock()
#read_time = time2 - time1

Expand All @@ -250,7 +250,7 @@ def raw_test_compare(self):
set_errors = []
reset_errors = []

test_len = cw521.sram_len
test_len = self.sram_len

#time1 = time.clock()
for i in range(0, test_len):
Expand Down

0 comments on commit bd040fc

Please sign in to comment.