diff --git a/hw/top_darjeeling/dv/env/pwrmgr_low_power_if.sv b/hw/top_darjeeling/dv/env/pwrmgr_low_power_if.sv new file mode 100644 index 0000000000000..1715c8e89a9b8 --- /dev/null +++ b/hw/top_darjeeling/dv/env/pwrmgr_low_power_if.sv @@ -0,0 +1,34 @@ +// Copyright lowRISC contributors (OpenTitan project). +// Licensed under the Apache License, Version 2.0, see LICENSE for details. +// SPDX-License-Identifier: Apache-2.0 +// +// Legacy pwrmgr_if.sv has import pwrmgr_env_pkg::*; +// inside interface. +// To avoid unnecessary compile overhead, create separate interface +// probing low_power_o +interface pwrmgr_low_power_if ( + input logic clk, + input logic fast_clk, + input logic rst_n +); + + // low_power indicates the PWRMGR starts entering low power state. When the + // signal is high, the chip does not yet complete the power down. + logic low_power; + + // If `in_sleep` is 1, it indicates, the chip is in either normal sleep or + // deep sleep state. + logic in_sleep; + + // Deep Power down indicator (while `low_power` is high) + logic deep_powerdown; + + // slow clock + clocking cb @(posedge clk); + endclocking + + // main clock + clocking fast_cb @(posedge fast_clk); + endclocking + +endinterface // pwrmgr_low_power_if diff --git a/hw/top_darjeeling/dv/pwrmgr_low_power_if.core b/hw/top_darjeeling/dv/pwrmgr_low_power_if.core new file mode 100644 index 0000000000000..ed670c4be492e --- /dev/null +++ b/hw/top_darjeeling/dv/pwrmgr_low_power_if.core @@ -0,0 +1,38 @@ +CAPI=2: +# Copyright lowRISC contributors (OpenTitan project). +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 +name: "lowrisc:systems:pwrmgr_if:0.1" +description: "Power manager interface" + +filesets: + files_rtl: + files: + - env/pwrmgr_low_power_if.sv + file_type: systemVerilogSource + + files_verilator_waiver: + depend: + # common waivers + - lowrisc:lint:common + - lowrisc:lint:comportable + + files_ascentlint_waiver: + depend: + # common waivers + - lowrisc:lint:common + - lowrisc:lint:comportable + + files_veriblelint_waiver: + depend: + # common waivers + - lowrisc:lint:common + - lowrisc:lint:comportable + +targets: + default: &default_target + filesets: + - tool_verilator ? (files_verilator_waiver) + - tool_ascentlint ? (files_ascentlint_waiver) + - tool_veriblelint ? (files_veriblelint_waiver) + - files_rtl diff --git a/hw/top_earlgrey/dv/env/pwrmgr_low_power_if.sv b/hw/top_earlgrey/dv/env/pwrmgr_low_power_if.sv index 7172c31ecee0a..1715c8e89a9b8 100644 --- a/hw/top_earlgrey/dv/env/pwrmgr_low_power_if.sv +++ b/hw/top_earlgrey/dv/env/pwrmgr_low_power_if.sv @@ -2,11 +2,9 @@ // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 // -// sample only pwrmgr.low_power_o -// // Legacy pwrmgr_if.sv has import pwrmgr_env_pkg::*; // inside interface. -// To avoid unnecessary compile overhead, create separte interface +// To avoid unnecessary compile overhead, create separate interface // probing low_power_o interface pwrmgr_low_power_if ( input logic clk,