From ca117aa3cc43e05d7371ae3a7c0a2b6dd9e4904f Mon Sep 17 00:00:00 2001 From: Michael Rogenmoser Date: Tue, 6 Aug 2024 16:09:11 +0200 Subject: [PATCH] Fix legalizer generation when burst and non-burst protocols combined Co-authored-by: Georg Rutishauser --- util/mario/legalizer.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/util/mario/legalizer.py b/util/mario/legalizer.py index e6ffbdd..ccd5194 100644 --- a/util/mario/legalizer.py +++ b/util/mario/legalizer.py @@ -56,6 +56,12 @@ def render_legalizer(prot_ids: dict, db: dict, tpl_file: str) -> str: data_path = indent_block(db[wp]['legalizer_write_data_path'], 3 - swp, 4) db[wp]['legalizer_write_data_path'] = data_path + has_page_read_bursting = eval_key(used_read_prots, 'bursts', 'split_at_page_boundary', db) + has_pow2_read_bursting = eval_key(used_read_prots, 'bursts', 'only_pow2', db) + has_read_bursting = has_page_read_bursting or has_pow2_read_bursting + has_page_write_bursting = eval_key(used_write_prots, 'bursts', 'split_at_page_boundary', db) + has_pow2_write_bursting = eval_key(used_write_prots, 'bursts', 'only_pow2', db) + has_write_bursting = has_page_write_bursting or has_pow2_write_bursting # assemble context context = { 'name_uniqueifier': prot_id, @@ -66,17 +72,17 @@ def render_legalizer(prot_ids: dict, db: dict, tpl_file: str) -> str: 'one_read_port': srp, 'one_write_port': swp, 'no_read_bursting': - eval_key(used_read_prots, 'bursts', 'not_supported', db), + not has_read_bursting, 'has_page_read_bursting': - eval_key(used_read_prots, 'bursts', 'split_at_page_boundary', db), + has_page_read_bursting, 'has_pow2_read_bursting': - eval_key(used_read_prots, 'bursts', 'only_pow2', db), + has_pow2_read_bursting, 'no_write_bursting': - eval_key(used_write_prots, 'bursts', 'not_supported', db), + not has_write_bursting, 'has_page_write_bursting': - eval_key(used_write_prots, 'bursts', 'split_at_page_boundary', db), + has_page_write_bursting, 'has_pow2_write_bursting': - eval_key(used_write_prots, 'bursts', 'only_pow2', db), + has_pow2_write_bursting, 'used_non_bursting_write_protocols': prot_key(used_read_prots, 'bursts', 'not_supported', db), 'used_non_bursting_read_protocols':