Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix legalizer generation when burst and non-burst protocols combined #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading