Skip to content

Commit

Permalink
[pinmux] Clean up VLNVs
Browse files Browse the repository at this point in the history
Remove unused virtual VLNV exports.
Directly depend on explicit real VLNVs for dependencies.

Signed-off-by: Alexander Williams <[email protected]>
  • Loading branch information
a-will committed Jan 3, 2025
1 parent cb7116d commit 4c38e5c
Show file tree
Hide file tree
Showing 29 changed files with 61 additions and 161 deletions.
12 changes: 9 additions & 3 deletions hw/ip_templates/pinmux/data/pinmux.tpldesc.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,16 @@
default: "1"
}
{
name: "virtual_pkg_vlnv"
desc: "Provides a VLNV that contains all the virtual providers for constants"
name: "top_pkg_vlnv"
desc: "Provides the VLNV for the top_pkg used by this pinmux"
type: "string"
default: ""
default: "lowrisc:constants:top_pkg"
}
{
name: "scan_role_pkg_vlnv"
desc: "Provides the VLNV for the scan_role_pkg used by this pinmux"
type: "string"
default: "lowrisc:systems:scan_role_pkg"
}
]
}
22 changes: 5 additions & 17 deletions hw/ip_templates/pinmux/fpv/pinmux_chip_fpv.core.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,23 @@ CAPI=2:
# SPDX-License-Identifier: Apache-2.0
name: ${instance_vlnv("lowrisc:systems:pinmux_chip_fpv:0.1")}
description: "pinmux FPV target with chip_earlgrey parameters"
virtual:
- lowrisc:ip_interfaces:pinmux_chip_fpv

filesets:
files_formal:
depend:
- lowrisc:prim:all
- lowrisc:ip:tlul
- lowrisc:ip:jtag_pkg
- lowrisc:prim:mubi_pkg
- lowrisc:ip:lc_ctrl_pkg
- ${instance_vlnv("lowrisc:ip:pinmux:0.1")}
- lowrisc:fpv:csr_assert_gen
- ${instance_vlnv("lowrisc:fpv:pinmux_common_fpv:0.1")}
- lowrisc:systems:top_${topname}_pkg
- lowrisc:systems:scan_role_pkg
- ${top_pkg_vlnv}
- ${scan_role_pkg_vlnv}
files:
- tb/pinmux_chip_tb.sv
file_type: systemVerilogSource
% if len(virtual_pkg_vlnv) > 0:
files_virtual_provider:
depend:
- "fileset_top ? (${virtual_pkg_vlnv})"
% endif

generate:
csr_assert_gen:
Expand All @@ -43,14 +39,6 @@ targets:

formal:
<<: *default_target
% if len(virtual_pkg_vlnv) > 0:
filesets_append:
- files_virtual_provider
% endif

lint:
<<: *default_target
% if len(virtual_pkg_vlnv) > 0:
filesets_append:
- files_virtual_provider
% endif
14 changes: 0 additions & 14 deletions hw/ip_templates/pinmux/fpv/pinmux_fpv.core.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,9 @@ filesets:
- ${instance_vlnv("lowrisc:ip:pinmux:0.1")}
- lowrisc:fpv:csr_assert_gen
- ${instance_vlnv("lowrisc:fpv:pinmux_common_fpv")}
- lowrisc:systems:scan_role_pkg
files:
- tb/pinmux_tb.sv
file_type: systemVerilogSource
% if len(virtual_pkg_vlnv) > 0:
files_virtual_provider:
depend:
- "fileset_top ? (${virtual_pkg_vlnv})"
% endif

generate:
csr_assert_gen:
Expand All @@ -39,14 +33,6 @@ targets:

formal:
<<: *default_target
filesets_append:
% if len(virtual_pkg_vlnv) > 0:
- files_virtual_provider
% endif

lint:
<<: *default_target
filesets_append:
% if len(virtual_pkg_vlnv) > 0:
- files_virtual_provider
% endif
15 changes: 0 additions & 15 deletions hw/ip_templates/pinmux/pinmux.core.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ CAPI=2:
# SPDX-License-Identifier: Apache-2.0
name: ${instance_vlnv("lowrisc:ip:pinmux:0.1")}
description: "Pin Multiplexer"
virtual:
- lowrisc:ip_interfaces:pinmux

filesets:
files_rtl:
Expand Down Expand Up @@ -33,12 +31,6 @@ filesets:
% endif
- rtl/pinmux.sv
file_type: systemVerilogSource
% if len(virtual_pkg_vlnv) > 0:

files_virtual_provider:
depend:
- "fileset_top ? (${virtual_pkg_vlnv})"
% endif

files_verilator_waiver:
depend:
Expand Down Expand Up @@ -80,10 +72,6 @@ targets:

lint:
<<: *default_target
% if len(virtual_pkg_vlnv) > 0:
filesets_append:
- files_virtual_provider
% endif
default_tool: verilator
parameters:
- SYNTHESIS=true
Expand All @@ -105,7 +93,4 @@ targets:
formal:
filesets:
- files_rtl
% if len(virtual_pkg_vlnv) > 0:
- files_virtual_provider
% endif
toplevel: pinmux_tb
3 changes: 2 additions & 1 deletion hw/ip_templates/pinmux/pinmux_pkg.core.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ filesets:
files_rtl:
depend:
- lowrisc:prim:pad_wrapper_pkg
- ${instance_vlnv("lowrisc:ip:pinmux_reg")}
- lowrisc:tlul:headers
files:
- rtl/pinmux_reg_pkg.sv
- rtl/pinmux_pkg.sv
file_type: systemVerilogSource

Expand Down
7 changes: 3 additions & 4 deletions hw/ip_templates/pinmux/pinmux_reg.core.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ CAPI=2:
# SPDX-License-Identifier: Apache-2.0
name: ${instance_vlnv("lowrisc:ip:pinmux_reg:0.1")}
description: "Auto-generated pinmux register sources"
virtual:
- lowrisc:ip_interfaces:pinmux_reg

filesets:
files_rtl:
depend:
- lowrisc:tlul:headers
- lowrisc:ip:tlul
- lowrisc:prim:subreg
- ${instance_vlnv("lowrisc:ip:pinmux_pkg")}
files:
- rtl/pinmux_reg_pkg.sv
- rtl/pinmux_reg_top.sv
file_type: systemVerilogSource

Expand Down
2 changes: 1 addition & 1 deletion hw/ip_templates/pinmux/syn/pinmux_syn_cfg.hjson.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name: pinmux
// Fusesoc core file used for building the file list.
fusesoc_core: lowrisc:ip_interfaces:pinmux:0.1
fusesoc_core: ${instance_vlnv("lowrisc:ip:pinmux:0.1")}

import_cfgs: [// Project wide common synthesis config file
"{proj_root}/hw/syn/tools/dvsim/common_syn_cfg.hjson"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
n_dio_periph_out: 57
enable_usb_wakeup: false
enable_strap_sampling: false
virtual_pkg_vlnv: lowrisc:opentitan:top_darjeeling_virtual_pkgs
top_pkg_vlnv: lowrisc:constants:top_darjeeling_top_pkg
scan_role_pkg_vlnv: lowrisc:systems:top_darjeeling_scan_role_pkg
topname: darjeeling
}
}
16 changes: 5 additions & 11 deletions hw/top_darjeeling/ip_autogen/pinmux/fpv/pinmux_chip_fpv.core
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,23 @@ CAPI=2:
# SPDX-License-Identifier: Apache-2.0
name: lowrisc:opentitan:top_darjeeling_pinmux_chip_fpv:0.1
description: "pinmux FPV target with chip_earlgrey parameters"
virtual:
- lowrisc:ip_interfaces:pinmux_chip_fpv

filesets:
files_formal:
depend:
- lowrisc:prim:all
- lowrisc:ip:tlul
- lowrisc:ip:jtag_pkg
- lowrisc:prim:mubi_pkg
- lowrisc:ip:lc_ctrl_pkg
- lowrisc:opentitan:top_darjeeling_pinmux:0.1
- lowrisc:fpv:csr_assert_gen
- lowrisc:opentitan:top_darjeeling_pinmux_common_fpv:0.1
- lowrisc:systems:top_darjeeling_pkg
- lowrisc:systems:scan_role_pkg
- lowrisc:constants:top_darjeeling_top_pkg
- lowrisc:systems:top_darjeeling_scan_role_pkg
files:
- tb/pinmux_chip_tb.sv
file_type: systemVerilogSource
files_virtual_provider:
depend:
- "fileset_top ? (lowrisc:opentitan:top_darjeeling_virtual_pkgs)"

generate:
csr_assert_gen:
Expand All @@ -41,10 +39,6 @@ targets:

formal:
<<: *default_target
filesets_append:
- files_virtual_provider

lint:
<<: *default_target
filesets_append:
- files_virtual_provider
8 changes: 0 additions & 8 deletions hw/top_darjeeling/ip_autogen/pinmux/fpv/pinmux_fpv.core
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@ filesets:
- lowrisc:opentitan:top_darjeeling_pinmux:0.1
- lowrisc:fpv:csr_assert_gen
- lowrisc:opentitan:top_darjeeling_pinmux_common_fpv
- lowrisc:systems:scan_role_pkg
files:
- tb/pinmux_tb.sv
file_type: systemVerilogSource
files_virtual_provider:
depend:
- "fileset_top ? (lowrisc:opentitan:top_darjeeling_virtual_pkgs)"

generate:
csr_assert_gen:
Expand All @@ -37,10 +33,6 @@ targets:

formal:
<<: *default_target
filesets_append:
- files_virtual_provider

lint:
<<: *default_target
filesets_append:
- files_virtual_provider
9 changes: 0 additions & 9 deletions hw/top_darjeeling/ip_autogen/pinmux/pinmux.core
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ CAPI=2:
# SPDX-License-Identifier: Apache-2.0
name: lowrisc:opentitan:top_darjeeling_pinmux:0.1
description: "Pin Multiplexer"
virtual:
- lowrisc:ip_interfaces:pinmux

filesets:
files_rtl:
Expand All @@ -31,10 +29,6 @@ filesets:
- rtl/pinmux.sv
file_type: systemVerilogSource

files_virtual_provider:
depend:
- "fileset_top ? (lowrisc:opentitan:top_darjeeling_virtual_pkgs)"

files_verilator_waiver:
depend:
# common waivers
Expand Down Expand Up @@ -75,8 +69,6 @@ targets:

lint:
<<: *default_target
filesets_append:
- files_virtual_provider
default_tool: verilator
parameters:
- SYNTHESIS=true
Expand All @@ -98,5 +90,4 @@ targets:
formal:
filesets:
- files_rtl
- files_virtual_provider
toplevel: pinmux_tb
3 changes: 2 additions & 1 deletion hw/top_darjeeling/ip_autogen/pinmux/pinmux_pkg.core
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ filesets:
files_rtl:
depend:
- lowrisc:prim:pad_wrapper_pkg
- lowrisc:opentitan:top_darjeeling_pinmux_reg
- lowrisc:tlul:headers
files:
- rtl/pinmux_reg_pkg.sv
- rtl/pinmux_pkg.sv
file_type: systemVerilogSource

Expand Down
7 changes: 3 additions & 4 deletions hw/top_darjeeling/ip_autogen/pinmux/pinmux_reg.core
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ CAPI=2:
# SPDX-License-Identifier: Apache-2.0
name: lowrisc:opentitan:top_darjeeling_pinmux_reg:0.1
description: "Auto-generated pinmux register sources"
virtual:
- lowrisc:ip_interfaces:pinmux_reg

filesets:
files_rtl:
depend:
- lowrisc:tlul:headers
- lowrisc:ip:tlul
- lowrisc:prim:subreg
- lowrisc:opentitan:top_darjeeling_pinmux_pkg
files:
- rtl/pinmux_reg_pkg.sv
- rtl/pinmux_reg_top.sv
file_type: systemVerilogSource

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name: pinmux

// Fusesoc core file used for building the file list.
fusesoc_core: lowrisc:ip_interfaces:pinmux:0.1
fusesoc_core: lowrisc:opentitan:top_darjeeling_pinmux:0.1

import_cfgs: [// Project wide common synthesis config file
"{proj_root}/hw/syn/tools/dvsim/common_syn_cfg.hjson"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
n_dio_periph_out: 14
enable_usb_wakeup: true
enable_strap_sampling: true
virtual_pkg_vlnv: lowrisc:opentitan:top_earlgrey_virtual_pkgs
top_pkg_vlnv: lowrisc:constants:top_earlgrey_top_pkg
scan_role_pkg_vlnv: lowrisc:systems:top_earlgrey_scan_role_pkg
topname: earlgrey
}
}
16 changes: 5 additions & 11 deletions hw/top_earlgrey/ip_autogen/pinmux/fpv/pinmux_chip_fpv.core
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,23 @@ CAPI=2:
# SPDX-License-Identifier: Apache-2.0
name: lowrisc:opentitan:top_earlgrey_pinmux_chip_fpv:0.1
description: "pinmux FPV target with chip_earlgrey parameters"
virtual:
- lowrisc:ip_interfaces:pinmux_chip_fpv

filesets:
files_formal:
depend:
- lowrisc:prim:all
- lowrisc:ip:tlul
- lowrisc:ip:jtag_pkg
- lowrisc:prim:mubi_pkg
- lowrisc:ip:lc_ctrl_pkg
- lowrisc:opentitan:top_earlgrey_pinmux:0.1
- lowrisc:fpv:csr_assert_gen
- lowrisc:opentitan:top_earlgrey_pinmux_common_fpv:0.1
- lowrisc:systems:top_earlgrey_pkg
- lowrisc:systems:scan_role_pkg
- lowrisc:constants:top_earlgrey_top_pkg
- lowrisc:systems:top_earlgrey_scan_role_pkg
files:
- tb/pinmux_chip_tb.sv
file_type: systemVerilogSource
files_virtual_provider:
depend:
- "fileset_top ? (lowrisc:opentitan:top_earlgrey_virtual_pkgs)"

generate:
csr_assert_gen:
Expand All @@ -41,10 +39,6 @@ targets:

formal:
<<: *default_target
filesets_append:
- files_virtual_provider

lint:
<<: *default_target
filesets_append:
- files_virtual_provider
Loading

0 comments on commit 4c38e5c

Please sign in to comment.