Skip to content

Commit

Permalink
Merge pull request #614 from arturum1/main
Browse files Browse the repository at this point in the history
Allow override of `N_SLAVES` macro by subclasses; Update `axi_m_port` part select script.
  • Loading branch information
jjts authored Oct 31, 2023
2 parents 1530106 + a29be36 commit 8dd3cd9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 24 deletions.
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

0 comments on commit 8dd3cd9

Please sign in to comment.