From 7469d1e88c1b705200e5a036a7c08c105370da10 Mon Sep 17 00:00:00 2001 From: Pieter Donker <donker@astron.nl> Date: Thu, 16 Mar 2017 13:09:38 +0000 Subject: [PATCH] Task #893 backup --- tools/oneclick/prestudy/YAML/mm_menu.py | 3 ++- tools/oneclick/prestudy/YAML/py_mm_lib/system_rom.py | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/oneclick/prestudy/YAML/mm_menu.py b/tools/oneclick/prestudy/YAML/mm_menu.py index a565da47b8..1d4073d6fe 100755 --- a/tools/oneclick/prestudy/YAML/mm_menu.py +++ b/tools/oneclick/prestudy/YAML/mm_menu.py @@ -56,7 +56,8 @@ def main(): def show_menu(): """ show main menu """ menu = [] - menu.append("OneClick menu") + menu.append("------------------------") + menu.append("- OneClick MM menu -") menu.append("------------------------") menu.append("1 show config file overview") menu.append("2 generate system-rom") diff --git a/tools/oneclick/prestudy/YAML/py_mm_lib/system_rom.py b/tools/oneclick/prestudy/YAML/py_mm_lib/system_rom.py index 1dab7a45aa..126380a389 100644 --- a/tools/oneclick/prestudy/YAML/py_mm_lib/system_rom.py +++ b/tools/oneclick/prestudy/YAML/py_mm_lib/system_rom.py @@ -70,8 +70,8 @@ class SystemRom(object): for name in slave_order: peripheral = peripherals[name] for key, val in peripheral.rams.items(): - width = int(val['width']) - depth = int(val['depth']) + width = int(val.width) + depth = int(val.depth) n_words = int(ceil(float(width) / self.word_size)) n_addresses = n_words * depth self.mm_reg_list.append([key, reg_addr, n_words, depth]) @@ -85,7 +85,8 @@ class SystemRom(object): self.mm_reg_list.append([key, reg_addr, n_words, depth]) reg_addr += n_addresses ''' - print(self.mm_reg_list) + for i in self.mm_reg_list: + print(i) def generate_reg(self): -- GitLab