Skip to content

Commit

Permalink
[hw,alert_hander,rtl] Rename alert_pkg to alert_handler_pkg
Browse files Browse the repository at this point in the history
The rename is done to ease the uniquification of the alert handler.
From alert_handler_pkg, alert_handler will be the module instance name.

Signed-off-by: Robert Schilling <[email protected]>
  • Loading branch information
Razer6 committed Jan 7, 2025
1 parent c97e3fa commit b93e55c
Show file tree
Hide file tree
Showing 68 changed files with 91 additions and 91 deletions.
2 changes: 1 addition & 1 deletion hw/ip_templates/alert_handler/alert_handler_component.core
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ filesets:
- lowrisc:prim:sparse_fsm
- lowrisc:ip_interfaces:alert_handler_reg
files:
- rtl/alert_pkg.sv
- rtl/alert_handler_pkg.sv
- rtl/alert_handler_reg_wrap.sv
- rtl/alert_handler_lpg_ctrl.sv
- rtl/alert_handler_class.sv
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Binds ALERT_HANDLER functional coverage interafaces to the top level ALERT_HANDLER module.

module alert_handler_cov_bind;
import alert_pkg::*;
import alert_handler_pkg::*;

bind alert_handler cip_mubi_cov_wrapper#(.NumMubis(NLpg)) u_lpg_cg_en_cov_if (
.rst_ni (rst_ni),
Expand Down
2 changes: 1 addition & 1 deletion hw/ip_templates/alert_handler/dv/env/alert_handler_if.sv
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Interface for LPG and crashdump output.
interface alert_handler_if(input clk, input rst_n);
import uvm_pkg::*;
import alert_pkg::*;
import alert_handler_pkg::*;
import prim_mubi_pkg::*;
import cip_base_pkg::*;
import alert_handler_env_pkg::*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,8 @@ class alert_handler_scoreboard extends cip_base_scoreboard #(
forever begin
wait (cfg.under_reset == 0 && cfg.en_scb == 1);
@(cfg.crashdump_vif.pins) begin
alert_pkg::alert_crashdump_t crashdump_val =
alert_pkg::alert_crashdump_t'(cfg.crashdump_vif.sample());
alert_handler_pkg::alert_crashdump_t crashdump_val =
alert_handler_pkg::alert_crashdump_t'(cfg.crashdump_vif.sample());

// Wait two negedge clock cycles to make sure csr mirrored values are updated.
`DV_SPINWAIT_EXIT(cfg.clk_rst_vif.wait_n_clks(2);, wait (cfg.under_reset == 1);)
Expand Down
2 changes: 1 addition & 1 deletion hw/ip_templates/alert_handler/dv/tb/tb.sv
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module tb;
import dv_utils_pkg::*;
import alert_handler_env_pkg::*;
import alert_handler_test_pkg::*;
import alert_pkg::*;
import alert_handler_pkg::*;

// macro includes
`include "uvm_macros.svh"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Testbench module for alert_handler_esc_timer.
// Intended to be used with a formal tool.

module alert_handler_esc_timer_tb import alert_pkg::*; (
module alert_handler_esc_timer_tb import alert_handler_pkg::*; (
input clk_i,
input rst_ni,
input en_i,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Testbench module for ping timer in alert handler. Intended to use with
// a formal tool.

module alert_handler_ping_timer_tb import alert_pkg::*; (
module alert_handler_ping_timer_tb import alert_handler_pkg::*; (
input clk_i,
input rst_ni,
output logic edn_req_o,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

`include "prim_assert.sv"

module alert_handler_esc_timer_assert_fpv import alert_pkg::*; (
module alert_handler_esc_timer_assert_fpv import alert_handler_pkg::*; (
input clk_i,
input rst_ni,
input en_i,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

`include "prim_assert.sv"

module alert_handler_ping_timer_assert_fpv import alert_pkg::*; (
module alert_handler_ping_timer_assert_fpv import alert_handler_pkg::*; (
input clk_i,
input rst_ni,
input edn_req_o,
Expand Down
2 changes: 1 addition & 1 deletion hw/ip_templates/alert_handler/rtl/alert_handler.sv
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
`include "prim_assert.sv"

module alert_handler
import alert_pkg::*;
import alert_handler_pkg::*;
import prim_alert_pkg::*;
import prim_esc_pkg::*;
#(
Expand Down
2 changes: 1 addition & 1 deletion hw/ip_templates/alert_handler/rtl/alert_handler_accu.sv
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

`include "prim_assert.sv"

module alert_handler_accu import alert_pkg::*; (
module alert_handler_accu import alert_handler_pkg::*; (
input clk_i,
input rst_ni,
input class_en_i, // class enable
Expand Down
2 changes: 1 addition & 1 deletion hw/ip_templates/alert_handler/rtl/alert_handler_class.sv
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// produces the alert cause and class trigger signals.
//

module alert_handler_class import alert_pkg::*; (
module alert_handler_class import alert_handler_pkg::*; (
input [NAlerts-1:0] alert_trig_i, // alert trigger
input [N_LOC_ALERT-1:0] loc_alert_trig_i, // alert trigger
input [NAlerts-1:0] alert_en_i, // alert enable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

`include "prim_assert.sv"

module alert_handler_esc_timer import alert_pkg::*; (
module alert_handler_esc_timer import alert_handler_pkg::*; (
input clk_i,
input rst_ni,
input en_i, // enables timeout/escalation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

`include "prim_assert.sv"

module alert_handler_lpg_ctrl import alert_pkg::*; (
module alert_handler_lpg_ctrl import alert_handler_pkg::*; (
input clk_i,
input rst_ni,
// Low power clk and rst indication signals.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

`include "prim_assert.sv"

module alert_handler_ping_timer import alert_pkg::*; #(
module alert_handler_ping_timer import alert_handler_pkg::*; #(
// Compile time random constants, to be overriden by topgen.
parameter lfsr_seed_t RndCnstLfsrSeed = RndCnstLfsrSeedDefault,
parameter lfsr_perm_t RndCnstLfsrPerm = RndCnstLfsrPermDefault,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: Apache-2.0
//

package alert_pkg;
package alert_handler_pkg;

// these localparams are generated based on the system top-level configuration
localparam int unsigned NAlerts = alert_handler_reg_pkg::NAlerts; // maximum 252
Expand Down Expand Up @@ -98,4 +98,4 @@ package alert_pkg;
logic [N_CLASSES-1:0][PHASE_DW-1:0] class_crashdump_phase;
} reg2hw_wrap_t;

endpackage : alert_pkg
endpackage : alert_handler_pkg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// Breakout / remapping wrapper for register file.

module alert_handler_reg_wrap import alert_pkg::*; (
module alert_handler_reg_wrap import alert_handler_pkg::*; (
input clk_i,
input rst_ni,
input rst_shadowed_ni,
Expand Down
2 changes: 1 addition & 1 deletion hw/ip_templates/rstmgr/dv/env/rstmgr_env_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package rstmgr_env_pkg;
import rstmgr_reg_pkg::NumHwResets;
import rstmgr_reg_pkg::NumSwResets;

import alert_pkg::alert_crashdump_t;
import alert_handler_pkg::alert_crashdump_t;
import rv_core_ibex_pkg::cpu_crash_dump_t;

import sec_cm_pkg::*;
Expand Down
2 changes: 1 addition & 1 deletion hw/ip_templates/rstmgr/dv/env/rstmgr_if.sv
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface rstmgr_if (
rstmgr_pkg::rstmgr_cpu_t cpu_i;

// Interface to alert handler
alert_pkg::alert_crashdump_t alert_dump_i;
alert_handler_pkg::alert_crashdump_t alert_dump_i;

// Interface to cpu crash dump
rv_core_ibex_pkg::cpu_crash_dump_t cpu_dump_i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class rstmgr_sw_rst_reset_race_vseq extends rstmgr_base_vseq;
bit [NumSwResets-1:0] exp_ctrl_n;
bit [NumSwResets-1:0] sw_rst_regwen = '1;
int expected;
alert_pkg::alert_crashdump_t bogus_alert_dump = '1;
alert_handler_pkg::alert_crashdump_t bogus_alert_dump = '1;
rv_core_ibex_pkg::cpu_crash_dump_t bogus_cpu_dump = '1;
set_alert_and_cpu_info_for_capture(bogus_alert_dump, bogus_cpu_dump);

Expand Down
4 changes: 2 additions & 2 deletions hw/ip_templates/rstmgr/rtl/rstmgr.sv.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module rstmgr
output mubi4_t sw_rst_req_o,
// Interface to alert handler
input alert_pkg::alert_crashdump_t alert_dump_i,
input alert_handler_pkg::alert_crashdump_t alert_dump_i,
// Interface to cpu crash dump
input rv_core_ibex_pkg::cpu_crash_dump_t cpu_dump_i,
Expand Down Expand Up @@ -414,7 +414,7 @@ module rstmgr
assign dump_capture_halt = rst_hw_req;

rstmgr_crash_info #(
.CrashDumpWidth($bits(alert_pkg::alert_crashdump_t))
.CrashDumpWidth($bits(alert_handler_pkg::alert_crashdump_t))
) u_alert_info (
.clk_i(clk_por_i),
.rst_ni(rst_por_ni),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ filesets:
- lowrisc:prim:sparse_fsm
- lowrisc:ip_interfaces:alert_handler_reg
files:
- rtl/alert_pkg.sv
- rtl/alert_handler_pkg.sv
- rtl/alert_handler_reg_wrap.sv
- rtl/alert_handler_lpg_ctrl.sv
- rtl/alert_handler_class.sv
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Binds ALERT_HANDLER functional coverage interafaces to the top level ALERT_HANDLER module.

module alert_handler_cov_bind;
import alert_pkg::*;
import alert_handler_pkg::*;

bind alert_handler cip_mubi_cov_wrapper#(.NumMubis(NLpg)) u_lpg_cg_en_cov_if (
.rst_ni (rst_ni),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Interface for LPG and crashdump output.
interface alert_handler_if(input clk, input rst_n);
import uvm_pkg::*;
import alert_pkg::*;
import alert_handler_pkg::*;
import prim_mubi_pkg::*;
import cip_base_pkg::*;
import alert_handler_env_pkg::*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,8 @@ class alert_handler_scoreboard extends cip_base_scoreboard #(
forever begin
wait (cfg.under_reset == 0 && cfg.en_scb == 1);
@(cfg.crashdump_vif.pins) begin
alert_pkg::alert_crashdump_t crashdump_val =
alert_pkg::alert_crashdump_t'(cfg.crashdump_vif.sample());
alert_handler_pkg::alert_crashdump_t crashdump_val =
alert_handler_pkg::alert_crashdump_t'(cfg.crashdump_vif.sample());

// Wait two negedge clock cycles to make sure csr mirrored values are updated.
`DV_SPINWAIT_EXIT(cfg.clk_rst_vif.wait_n_clks(2);, wait (cfg.under_reset == 1);)
Expand Down
2 changes: 1 addition & 1 deletion hw/top_darjeeling/ip_autogen/alert_handler/dv/tb/tb.sv
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module tb;
import dv_utils_pkg::*;
import alert_handler_env_pkg::*;
import alert_handler_test_pkg::*;
import alert_pkg::*;
import alert_handler_pkg::*;

// macro includes
`include "uvm_macros.svh"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Testbench module for alert_handler_esc_timer.
// Intended to be used with a formal tool.

module alert_handler_esc_timer_tb import alert_pkg::*; (
module alert_handler_esc_timer_tb import alert_handler_pkg::*; (
input clk_i,
input rst_ni,
input en_i,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Testbench module for ping timer in alert handler. Intended to use with
// a formal tool.

module alert_handler_ping_timer_tb import alert_pkg::*; (
module alert_handler_ping_timer_tb import alert_handler_pkg::*; (
input clk_i,
input rst_ni,
output logic edn_req_o,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

`include "prim_assert.sv"

module alert_handler_esc_timer_assert_fpv import alert_pkg::*; (
module alert_handler_esc_timer_assert_fpv import alert_handler_pkg::*; (
input clk_i,
input rst_ni,
input en_i,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

`include "prim_assert.sv"

module alert_handler_ping_timer_assert_fpv import alert_pkg::*; (
module alert_handler_ping_timer_assert_fpv import alert_handler_pkg::*; (
input clk_i,
input rst_ni,
input edn_req_o,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
`include "prim_assert.sv"

module alert_handler
import alert_pkg::*;
import alert_handler_pkg::*;
import prim_alert_pkg::*;
import prim_esc_pkg::*;
#(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

`include "prim_assert.sv"

module alert_handler_accu import alert_pkg::*; (
module alert_handler_accu import alert_handler_pkg::*; (
input clk_i,
input rst_ni,
input class_en_i, // class enable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// produces the alert cause and class trigger signals.
//

module alert_handler_class import alert_pkg::*; (
module alert_handler_class import alert_handler_pkg::*; (
input [NAlerts-1:0] alert_trig_i, // alert trigger
input [N_LOC_ALERT-1:0] loc_alert_trig_i, // alert trigger
input [NAlerts-1:0] alert_en_i, // alert enable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

`include "prim_assert.sv"

module alert_handler_esc_timer import alert_pkg::*; (
module alert_handler_esc_timer import alert_handler_pkg::*; (
input clk_i,
input rst_ni,
input en_i, // enables timeout/escalation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

`include "prim_assert.sv"

module alert_handler_lpg_ctrl import alert_pkg::*; (
module alert_handler_lpg_ctrl import alert_handler_pkg::*; (
input clk_i,
input rst_ni,
// Low power clk and rst indication signals.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

`include "prim_assert.sv"

module alert_handler_ping_timer import alert_pkg::*; #(
module alert_handler_ping_timer import alert_handler_pkg::*; #(
// Compile time random constants, to be overriden by topgen.
parameter lfsr_seed_t RndCnstLfsrSeed = RndCnstLfsrSeedDefault,
parameter lfsr_perm_t RndCnstLfsrPerm = RndCnstLfsrPermDefault,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: Apache-2.0
//

package alert_pkg;
package alert_handler_pkg;

// these localparams are generated based on the system top-level configuration
localparam int unsigned NAlerts = alert_handler_reg_pkg::NAlerts; // maximum 252
Expand Down Expand Up @@ -98,4 +98,4 @@ package alert_pkg;
logic [N_CLASSES-1:0][PHASE_DW-1:0] class_crashdump_phase;
} reg2hw_wrap_t;

endpackage : alert_pkg
endpackage : alert_handler_pkg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// Breakout / remapping wrapper for register file.

module alert_handler_reg_wrap import alert_pkg::*; (
module alert_handler_reg_wrap import alert_handler_pkg::*; (
input clk_i,
input rst_ni,
input rst_shadowed_ni,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package rstmgr_env_pkg;
import rstmgr_reg_pkg::NumHwResets;
import rstmgr_reg_pkg::NumSwResets;

import alert_pkg::alert_crashdump_t;
import alert_handler_pkg::alert_crashdump_t;
import rv_core_ibex_pkg::cpu_crash_dump_t;

import sec_cm_pkg::*;
Expand Down
2 changes: 1 addition & 1 deletion hw/top_darjeeling/ip_autogen/rstmgr/dv/env/rstmgr_if.sv
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface rstmgr_if (
rstmgr_pkg::rstmgr_cpu_t cpu_i;

// Interface to alert handler
alert_pkg::alert_crashdump_t alert_dump_i;
alert_handler_pkg::alert_crashdump_t alert_dump_i;

// Interface to cpu crash dump
rv_core_ibex_pkg::cpu_crash_dump_t cpu_dump_i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class rstmgr_sw_rst_reset_race_vseq extends rstmgr_base_vseq;
bit [NumSwResets-1:0] exp_ctrl_n;
bit [NumSwResets-1:0] sw_rst_regwen = '1;
int expected;
alert_pkg::alert_crashdump_t bogus_alert_dump = '1;
alert_handler_pkg::alert_crashdump_t bogus_alert_dump = '1;
rv_core_ibex_pkg::cpu_crash_dump_t bogus_cpu_dump = '1;
set_alert_and_cpu_info_for_capture(bogus_alert_dump, bogus_cpu_dump);

Expand Down
Loading

0 comments on commit b93e55c

Please sign in to comment.