Skip to content

Commit

Permalink
add target.fclk config to calculate cycles <-> runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Jan 8, 2025
1 parent 6499d0d commit d4f350c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mlonmcu/target/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class Target:
DEFAULTS = {
"print_outputs": False,
"repeat": None,
"fclk": None,
}

REQUIRED = set()
Expand Down Expand Up @@ -101,6 +102,11 @@ def print_outputs(self):
def repeat(self):
return self.config["repeat"]

@property
def fclk(self):
value = self.config["fclk"]
return int(float(value)) if value is not None else None

def __repr__(self):
return f"Target({self.name})"

Expand Down

0 comments on commit d4f350c

Please sign in to comment.