Skip to content

Commit

Permalink
Fix legalizer generation when burst and non-burst protocols combined
Browse files Browse the repository at this point in the history
Co-authored-by: Georg Rutishauser <[email protected]>
  • Loading branch information
2 people authored and thommythomaso committed Dec 4, 2024
1 parent 28a39a0 commit ca117aa
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions util/mario/legalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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':
Expand Down

0 comments on commit ca117aa

Please sign in to comment.