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

[darjeeling,dv] Copy pwrmgr_if from integrated #25575

Merged
merged 1 commit into from
Dec 13, 2024
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
34 changes: 34 additions & 0 deletions hw/top_darjeeling/dv/env/pwrmgr_low_power_if.sv
Original file line number Diff line number Diff line change
@@ -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
38 changes: 38 additions & 0 deletions hw/top_darjeeling/dv/pwrmgr_low_power_if.core
Original file line number Diff line number Diff line change
@@ -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
4 changes: 1 addition & 3 deletions hw/top_earlgrey/dv/env/pwrmgr_low_power_if.sv
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading