blob: 5ad90d439c093332db533331763d90370437eec3 [file] [log] [blame]
Steve Nelson87a9d122020-10-26 13:10:20 -07001// Copyright lowRISC contributors.
2// Licensed under the Apache License, Version 2.0, see LICENSE for details.
3// SPDX-License-Identifier: Apache-2.0
4
5package csrng_env_pkg;
6 // dep packages
7 import uvm_pkg::*;
8 import top_pkg::*;
9 import dv_utils_pkg::*;
10 import push_pull_agent_pkg::*;
Steve Nelsonef7bcab2021-01-06 08:40:01 -080011 import csrng_agent_pkg::*;
Steve Nelson87a9d122020-10-26 13:10:20 -070012 import dv_lib_pkg::*;
13 import tl_agent_pkg::*;
14 import cip_base_pkg::*;
15 import csr_utils_pkg::*;
16 import csrng_ral_pkg::*;
Steve Nelson9c384a32021-05-24 06:25:49 -070017 import aes_model_dpi_pkg::*;
Steve Nelson87a9d122020-10-26 13:10:20 -070018
19 // macro includes
20 `include "uvm_macros.svh"
21 `include "dv_macros.svh"
22
23 // parameters
Steve Nelsona1155d82021-07-14 20:11:05 -070024 parameter uint NUM_HW_APPS = 2;
Mark Branstad6fec52e2021-07-29 08:56:14 -070025 parameter string LIST_OF_ALERTS[] = {"recov_alert","fatal_alert"};
26 parameter uint NUM_ALERTS = 2;
Steve Nelson9c384a32021-05-24 06:25:49 -070027 parameter uint KEY_LEN = 256;
28 parameter uint BLOCK_LEN = 128;
29 parameter uint CTR_LEN = 32;
30 parameter uint RSD_CTR_LEN = 32;
Steve Nelsonef7bcab2021-01-06 08:40:01 -080031
Steve Nelsonde3d1052020-11-05 14:32:02 -080032 parameter bit [TL_DW-1:0] [3:0] ZERO_SEED_GENBITS = {32'h0,
33 32'h0,
34 32'h0,
Mark Branstad535275b2021-05-14 10:13:35 -070035 32'h4};
Steve Nelson87a9d122020-10-26 13:10:20 -070036
37 // types
Steve Nelsonde3d1052020-11-05 14:32:02 -080038 typedef enum int {
39 CmdReqDone = 0,
40 EntropyReq = 1,
41 HwInstExc = 2,
42 FifoErr = 3
43 } csrng_intr_e;
44
Steve Nelson87a9d122020-10-26 13:10:20 -070045 // functions
46
47 // package sources
48 `include "csrng_env_cfg.sv"
49 `include "csrng_env_cov.sv"
50 `include "csrng_virtual_sequencer.sv"
51 `include "csrng_scoreboard.sv"
52 `include "csrng_env.sv"
53 `include "csrng_vseq_list.sv"
54
55endpackage