forked from lowRISC/opentitan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[darjeeling,dv] Copy pwrmgr_if from integrated
Package pwrmgr interface to also make it available outside of the main testbench Signed-off-by: Robert Schilling <[email protected]>
- Loading branch information
1 parent
b92d43a
commit c419cea
Showing
3 changed files
with
73 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters