Skip to content

Commit

Permalink
stm_layout_tk: Include max frequency in the display.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgree committed Feb 15, 2022
1 parent be8d8af commit 66d56be
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions stm_layout/tk/tk_bga.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,7 @@ def __init__(self, *args):
package_name = chip_db.package(self.chip.part)
c.add_text(m.x, m.y, font=self.label_font, text=self.chip.name,
anchor='sw')
c.add_text(m.x + m.width / 2, m.y, font=self.label_font,
text=self.max_freq_mhz, anchor='s')
c.add_text(m.rx, m.y, font=self.label_font, text=package_name,
anchor='se')
3 changes: 2 additions & 1 deletion stm_layout/tk/tk_lqfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def __init__(self, *args):
c.add_text(
m.x + m.width / 2, m.y + m.height / 2,
font=self.label_font,
text='%s\n%s' % (self.chip.name, package_name),
text='%s\n%s\n%s' % (self.chip.name, package_name,
self.max_freq_mhz),
anchor='c')

if 'LQFP' not in package_name:
Expand Down
3 changes: 2 additions & 1 deletion stm_layout/tk/tk_tssop.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ def __init__(self, *args):
c.add_text(
m.x + m.width / 2, m.y + m.height / 2,
font=self.label_font,
text='%s\n%s' % (self.chip.name, package_name),
text='%s\n%s\n%s' % (self.chip.name, package_name,
self.max_freq_mhz),
anchor='c')
6 changes: 6 additions & 0 deletions stm_layout/tk/tk_workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ def __init__(self, chip, elem_fill, hilite_fill, select_fill, re_fill):
self.pin_elems = []
self.regex = None

d = chip.part.get_driver('rcc')
if d and 'max-frequency' in d:
self.max_freq_mhz = '%.0f MHz' % (int(d['max-frequency'][-1]) / 1e6)
else:
self.max_freq_mhz = ''

self.label_font = tkinter.font.Font(family=xplat.LABEL_FONT[0],
size=xplat.LABEL_FONT[1])
self.pin_font = tkinter.font.Font(family=xplat.PIN_FONT[0],
Expand Down

0 comments on commit 66d56be

Please sign in to comment.