Skip to content

Commit

Permalink
selftest: skip selftest if preamble/postamble contain symbolic registers
Browse files Browse the repository at this point in the history
  • Loading branch information
mkannwischer committed Dec 16, 2024
1 parent 13a4c30 commit d5a636f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions slothy/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,21 @@ def selftest(self, log):
iterations = 7
if self.config.sw_pipelining.enabled is True:
old_source, new_source = self.get_fully_unrolled_loop(iterations)

dfgc_preamble = DFGConfig(self.config, outputs=self.kernel_input_output)
dfgc_preamble.inputs_are_outputs = False
preamble_dfg = DFG(self.preamble, log, dfgc_preamble)

if preamble_dfg.has_symbolic_registers():
log.info("Skipping selftest as preamble contains symbolic registers.")
return

dfgc_postamble = DFGConfig(self.config, outputs=self.orig_outputs)
postamble_dfg = DFG(self.postamble, log.getChild("new_postamble"), dfgc_postamble)

if postamble_dfg.has_symbolic_registers():
log.info("Skipping selftest as postamble contains symbolic registers.")
return
else:
old_source, new_source = self.orig_code, self.code

Expand Down

0 comments on commit d5a636f

Please sign in to comment.