Skip to content

Commit

Permalink
SAD model: allow for trigger not being allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
jpcrypt committed Oct 1, 2024
1 parent b852140 commit ea57507
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions software/chipwhisperer/common/utils/sad_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def trigger_allowed(self):
else:
return True

def step(self, sample, armed_and_ready):
def step(self, sample, armed_and_ready, trigger_allowed=True):
# on the first run through, counters are started one at a time:
#if i < self.num_counters:
# self.counters[i].activate(i)
Expand All @@ -317,7 +317,7 @@ def step(self, sample, armed_and_ready):
match, covered, logscore = c.update(sample, 0, armed_and_ready)
if logscore:
self.SADS.append(c.SAD)
if match:
if match and trigger_allowed:
matched = True
self.match_times.append(self.index+1)
self.match_scores.append(c.SAD)
Expand Down

0 comments on commit ea57507

Please sign in to comment.