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

Allow override of N_SLAVES macro by subclasses; Update axi_m_port part select script. #614

Merged
merged 5 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions iob_soc.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ def _generate_files(cls):
if num_extmem_connections == 1:
inplace_change(
os.path.join(cls.build_dir, "hardware/src", cls.name + ".v"),
"[0+:1])",
")",
"[0+:1]",
"",
)
# Generate hw, sw, doc files
super()._generate_files()
Expand Down
2 changes: 1 addition & 1 deletion submodules/AXI
Submodule AXI updated 1 files
+5 −1 rtl/priority_encoder.v
45 changes: 24 additions & 21 deletions submodules/LIB/scripts/submodule_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,27 +136,30 @@ def get_peripheral_macros(confs, peripherals_list):
# Append macros with ID of each peripheral
confs.extend(get_periphs_id_as_macros(peripherals_list))
# Append macro with number of peripherals
confs.append(
{
"name": "N_SLAVES",
"type": "M",
"val": get_n_periphs(peripherals_list),
"min": "NA",
"max": "NA",
"descr": "Number of peripherals",
}
)
# Append macro with width of peripheral bus
confs.append(
{
"name": "N_SLAVES_W",
"type": "M",
"val": get_n_periphs_w(peripherals_list),
"min": "NA",
"max": "NA",
"descr": "Peripheral bus width",
}
)
# Only append macro if it does not exist (to allow subclasses set their own number)
if not list([i for i in confs if i["name"] == "N_SLAVES"]):
confs.append(
{
"name": "N_SLAVES",
"type": "M",
"val": get_n_periphs(peripherals_list),
"min": "NA",
"max": "NA",
"descr": "Number of peripherals",
}
)
if not list([i for i in confs if i["name"] == "N_SLAVES_W"]):
# Append macro with width of peripheral bus
confs.append(
{
"name": "N_SLAVES_W",
"type": "M",
"val": get_n_periphs_w(peripherals_list),
"min": "NA",
"max": "NA",
"descr": "Peripheral bus width",
}
)


# Check if a module of certain type is in given modules list.
Expand Down