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

Merge dev-integrate --> main #240

Merged
merged 16 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
1 change: 1 addition & 0 deletions src/aes/config/aes.vf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

+incdir+${CALIPTRA_ROOT}/src/entropy_src/rtl
+incdir+${CALIPTRA_ROOT}/src/integration/rtl
+incdir+${CALIPTRA_ROOT}/src/libs/rtl
Expand Down
1 change: 1 addition & 0 deletions src/aes/config/aes_pkg.vf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

+incdir+${CALIPTRA_ROOT}/src/entropy_src/rtl
+incdir+${CALIPTRA_ROOT}/src/integration/rtl
+incdir+${CALIPTRA_ROOT}/src/libs/rtl
Expand Down
4 changes: 3 additions & 1 deletion src/aes/rtl/aes_cipher_control.sv
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

`include "caliptra_prim_assert.sv"

module aes_cipher_control import aes_pkg::*;
module aes_cipher_control
import aes_reg_pkg::*;
import aes_pkg::*;
#(
parameter bit SecMasking = 0,
parameter sbox_impl_e SecSBoxImpl = SBoxImplDom
Expand Down
4 changes: 3 additions & 1 deletion src/aes/rtl/aes_cipher_control_fsm.sv
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

`include "caliptra_prim_assert.sv"

module aes_cipher_control_fsm import aes_pkg::*;
module aes_cipher_control_fsm
import aes_reg_pkg::*;
import aes_pkg::*;
#(
parameter bit SecMasking = 0,
parameter sbox_impl_e SecSBoxImpl = SBoxImplDom
Expand Down
4 changes: 3 additions & 1 deletion src/aes/rtl/aes_cipher_control_fsm_n.sv
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
// - inverting these signals between the regular FSM and the caliptra_prim_buf synthesis barriers.
// Synthesis tools will then push the inverters into the actual FSM.

module aes_cipher_control_fsm_n import aes_pkg::*;
module aes_cipher_control_fsm_n
import aes_reg_pkg::*;
import aes_pkg::*;
#(
parameter bit SecMasking = 0,
parameter sbox_impl_e SecSBoxImpl = SBoxImplDom
Expand Down
4 changes: 3 additions & 1 deletion src/aes/rtl/aes_cipher_control_fsm_p.sv
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
// This module contains the AES cipher core control FSM operating on
// and producing the positive values of important control signals.

module aes_cipher_control_fsm_p import aes_pkg::*;
module aes_cipher_control_fsm_p
import aes_reg_pkg::*;
import aes_pkg::*;
#(
parameter bit SecMasking = 0,
parameter sbox_impl_e SecSBoxImpl = SBoxImplDom
Expand Down
4 changes: 3 additions & 1 deletion src/aes/rtl/aes_cipher_core.sv
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@

`include "caliptra_prim_assert.sv"

module aes_cipher_core import aes_pkg::*;
module aes_cipher_core
import aes_reg_pkg::*;
import aes_pkg::*;
#(
parameter bit AES192Enable = 1,
parameter bit SecMasking = 1,
Expand Down
4 changes: 3 additions & 1 deletion src/aes/rtl/aes_key_expand.sv
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

`include "caliptra_prim_assert.sv"

module aes_key_expand import aes_pkg::*;
module aes_key_expand
import aes_reg_pkg::*;
import aes_pkg::*;
#(
parameter bit AES192Enable = 1,
parameter bit SecMasking = 0,
Expand Down
1 change: 1 addition & 0 deletions src/aes/rtl/aes_mix_columns.sv
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module aes_mix_columns (
output logic [3:0][3:0][7:0] data_o
);

import aes_reg_pkg::*;
import aes_pkg::*;

// Transpose to operate on columns
Expand Down
1 change: 1 addition & 0 deletions src/aes/rtl/aes_mix_single_column.sv
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module aes_mix_single_column (
output logic [3:0][7:0] data_o
);

import aes_reg_pkg::*;
import aes_pkg::*;

logic [3:0][7:0] x;
Expand Down
4 changes: 3 additions & 1 deletion src/aes/rtl/aes_prng_masking.sv
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@

`include "caliptra_prim_assert.sv"

module aes_prng_masking import aes_pkg::*;
module aes_prng_masking
import aes_reg_pkg::*;
import aes_pkg::*;
#(
parameter int unsigned Width = WidthPRDMasking, // Must be divisble by ChunkSize and 8
parameter int unsigned ChunkSize = ChunkSizePRDMasking, // Width of the LFSR primitives
Expand Down
4 changes: 3 additions & 1 deletion src/aes/rtl/aes_sbox.sv
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

`include "caliptra_prim_assert.sv"

module aes_sbox import aes_pkg::*;
module aes_sbox
import aes_reg_pkg::*;
import aes_pkg::*;
#(
parameter sbox_impl_e SecSBoxImpl = SBoxImplLut
) (
Expand Down
1 change: 1 addition & 0 deletions src/aes/rtl/aes_sbox_canright.sv
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module aes_sbox_canright (
output logic [7:0] data_o
);

import aes_reg_pkg::*;
import aes_pkg::*;
import aes_sbox_canright_pkg::*;

Expand Down
1 change: 1 addition & 0 deletions src/aes/rtl/aes_sbox_canright_masked.sv
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ module aes_masked_inverse_gf2p4 (
output logic [3:0] b_inv
);

import aes_reg_pkg::*;
import aes_pkg::*;
import aes_sbox_canright_pkg::*;

Expand Down
1 change: 1 addition & 0 deletions src/aes/rtl/aes_sbox_canright_masked_noreuse.sv
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module aes_masked_inverse_gf2p4_noreuse (
output logic [3:0] b_inv
);

import aes_reg_pkg::*;
import aes_pkg::*;
import aes_sbox_canright_pkg::*;

Expand Down
1 change: 1 addition & 0 deletions src/aes/rtl/aes_sbox_dom.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,7 @@ module aes_sbox_dom
output logic [19:0] prd_o // PRD for usage in Stages 2 - 4 of other S-Box instances
);

import aes_reg_pkg::*;
import aes_pkg::*;
import aes_sbox_canright_pkg::*;

Expand Down
1 change: 1 addition & 0 deletions src/aes/rtl/aes_sbox_lut.sv
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module aes_sbox_lut (
output logic [7:0] data_o
);

import aes_reg_pkg::*;
import aes_pkg::*;

// Define the LUTs
Expand Down
1 change: 1 addition & 0 deletions src/aes/rtl/aes_sel_buf_chk.sv
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module aes_sel_buf_chk #(
output logic err_o
);

import aes_reg_pkg::*;
import aes_pkg::*;

// Tie off unused inputs.
Expand Down
1 change: 1 addition & 0 deletions src/aes/rtl/aes_shift_rows.sv
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module aes_shift_rows (
output logic [3:0][3:0][7:0] data_o
);

import aes_reg_pkg::*;
import aes_pkg::*;

// Row 0 is left untouched
Expand Down
4 changes: 3 additions & 1 deletion src/aes/rtl/aes_sub_bytes.sv
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
//
// AES SubBytes

module aes_sub_bytes import aes_pkg::*;
module aes_sub_bytes
import aes_reg_pkg::*;
import aes_pkg::*;
#(
parameter sbox_impl_e SecSBoxImpl = SBoxImplDom
) (
Expand Down
1 change: 1 addition & 0 deletions src/ahb_lite_bus/config/ahb_lite_bus.vf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

+incdir+${CALIPTRA_ROOT}/src/integration/rtl
+incdir+${CALIPTRA_ROOT}/src/libs/rtl
+incdir+${CALIPTRA_ROOT}/src/ahb_lite_bus/rtl
Expand Down
2 changes: 1 addition & 1 deletion src/ahb_lite_bus/rtl/ahb_lite_bus.sv
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module ahb_lite_bus #(
// --------------------------------------
// Responder Interface Port
// --------------------------------------
CALIPTRA_AHB_LITE_BUS_INF.Responder_Interface_Ports ahb_lite_responders[NUM_RESPONDERS-1:0],
CALIPTRA_AHB_LITE_BUS_INF.Responder_Interface_Ports ahb_lite_responders[0:NUM_RESPONDERS-1],

// ----------------------------------------------
// Respnder Disable
Expand Down
1 change: 1 addition & 0 deletions src/caliptra_prim/config/caliptra_prim.vf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

+incdir+${CALIPTRA_ROOT}/src/integration/rtl
+incdir+${CALIPTRA_ROOT}/src/libs/rtl
+incdir+${CALIPTRA_ROOT}/src/caliptra_prim/rtl
Expand Down
1 change: 1 addition & 0 deletions src/caliptra_prim/config/caliptra_prim_pkg.vf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

+incdir+${CALIPTRA_ROOT}/src/caliptra_prim/rtl
${CALIPTRA_ROOT}/src/caliptra_prim/rtl/caliptra_prim_util_pkg.sv
${CALIPTRA_ROOT}/src/caliptra_prim/rtl/caliptra_prim_alert_pkg.sv
Expand Down
6 changes: 5 additions & 1 deletion src/caliptra_prim/rtl/caliptra_prim_lc_sync.sv
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@

`include "caliptra_prim_assert.sv"

module caliptra_prim_lc_sync #(
module caliptra_prim_lc_sync
import lc_ctrl_state_pkg::*;
import lc_ctrl_reg_pkg::*;
import lc_ctrl_pkg::*;
#(
// Number of separately buffered output signals.
// The buffer cells have a don't touch constraint
// on them such that synthesis tools won't collapse
Expand Down
1 change: 1 addition & 0 deletions src/caliptra_prim_generic/config/caliptra_prim_generic.vf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

+incdir+${CALIPTRA_ROOT}/src/caliptra_prim_generic/rtl
${CALIPTRA_ROOT}/src/caliptra_prim_generic/rtl/caliptra_prim_generic_flop_en.sv
${CALIPTRA_ROOT}/src/caliptra_prim_generic/rtl/caliptra_prim_generic_flop.sv
Expand Down
1 change: 1 addition & 0 deletions src/csrng/config/csrng.vf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

+incdir+${CALIPTRA_ROOT}/src/integration/rtl
+incdir+${CALIPTRA_ROOT}/src/libs/rtl
+incdir+${CALIPTRA_ROOT}/src/caliptra_prim/rtl
Expand Down
1 change: 1 addition & 0 deletions src/csrng/config/csrng_pkg.vf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

+incdir+${CALIPTRA_ROOT}/src/entropy_src/rtl
+incdir+${CALIPTRA_ROOT}/src/csrng/rtl
${CALIPTRA_ROOT}/src/entropy_src/rtl/entropy_src_main_sm_pkg.sv
Expand Down
1 change: 1 addition & 0 deletions src/csrng/config/csrng_tb.vf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

+incdir+${CALIPTRA_ROOT}/src/integration/rtl
+incdir+${CALIPTRA_ROOT}/src/libs/rtl
+incdir+${CALIPTRA_ROOT}/src/caliptra_prim/rtl
Expand Down
17 changes: 10 additions & 7 deletions src/csrng/rtl/csrng.sv
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
module csrng
import csrng_pkg::*;
import csrng_reg_pkg::*;
import lc_ctrl_state_pkg::*;
import lc_ctrl_reg_pkg::*;
import lc_ctrl_pkg::*;
#(
parameter aes_pkg::sbox_impl_e SBoxImpl = aes_pkg::SBoxImplCanright,
parameter logic [NumAlerts-1:0] AlertAsyncOn = {NumAlerts{1'b1}},
parameter logic [csrng_reg_pkg::NumAlerts-1:0] AlertAsyncOn = {csrng_reg_pkg::NumAlerts{1'b1}},
parameter int NHwApps = 2,
parameter cs_keymgr_div_t RndCnstCsKeymgrDivNonProduction = CsKeymgrDivWidth'(0),
parameter cs_keymgr_div_t RndCnstCsKeymgrDivProduction = CsKeymgrDivWidth'(0),
Expand Down Expand Up @@ -56,8 +59,8 @@ module csrng
output csrng_rsp_t [NHwApps-1:0] csrng_cmd_o,

// Alerts
input caliptra_prim_alert_pkg::alert_rx_t [NumAlerts-1:0] alert_rx_i,
output caliptra_prim_alert_pkg::alert_tx_t [NumAlerts-1:0] alert_tx_o,
input caliptra_prim_alert_pkg::alert_rx_t [csrng_reg_pkg::NumAlerts-1:0] alert_rx_i,
output caliptra_prim_alert_pkg::alert_tx_t [csrng_reg_pkg::NumAlerts-1:0] alert_tx_o,

// Interrupts
output logic intr_cs_cmd_req_done_o,
Expand All @@ -69,10 +72,10 @@ module csrng
csrng_reg2hw_t reg2hw;
csrng_hw2reg_t hw2reg;

logic [NumAlerts-1:0] alert_test;
logic [NumAlerts-1:0] alert;
logic [csrng_reg_pkg::NumAlerts-1:0] alert_test;
logic [csrng_reg_pkg::NumAlerts-1:0] alert;

logic [NumAlerts-1:0] intg_err_alert;
logic [csrng_reg_pkg::NumAlerts-1:0] intg_err_alert;
assign intg_err_alert[0] = 1'b0;

// SEC_CM: CONFIG.REGWEN
Expand Down Expand Up @@ -143,7 +146,7 @@ module csrng
///////////////////////////
// Alert generation
///////////////////////////
for (genvar i = 0; i < NumAlerts; i++) begin : gen_alert_tx
for (genvar i = 0; i < csrng_reg_pkg::NumAlerts; i++) begin : gen_alert_tx
caliptra_prim_alert_sender #(
.AsyncOn(AlertAsyncOn[i]),
.IsFatal(i)
Expand Down
7 changes: 6 additions & 1 deletion src/csrng/rtl/csrng_core.sv
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
//


module csrng_core import csrng_pkg::*; #(
module csrng_core
import csrng_pkg::*;
import lc_ctrl_state_pkg::*;
import lc_ctrl_reg_pkg::*;
import lc_ctrl_pkg::*;
#(
parameter aes_pkg::sbox_impl_e SBoxImpl = aes_pkg::SBoxImplLut,
parameter int NHwApps = 2,
parameter cs_keymgr_div_t RndCnstCsKeymgrDivNonProduction = CsKeymgrDivWidth'(0),
Expand Down
1 change: 1 addition & 0 deletions src/datavault/config/datavault.vf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

+incdir+${CALIPTRA_ROOT}/src/integration/rtl
+incdir+${CALIPTRA_ROOT}/src/libs/rtl
+incdir+${CALIPTRA_ROOT}/src/datavault/rtl
Expand Down
1 change: 1 addition & 0 deletions src/datavault/config/dv_defines_pkg.vf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

+incdir+${CALIPTRA_ROOT}/src/datavault/rtl
${CALIPTRA_ROOT}/src/datavault/rtl/dv_defines_pkg.sv
${CALIPTRA_ROOT}/src/datavault/rtl/dv_defines_pkg.sv
1 change: 1 addition & 0 deletions src/datavault/config/dv_uvm_pkg.vf
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@

+incdir+${CALIPTRA_ROOT}/src/datavault/rtl
${CALIPTRA_ROOT}/src/datavault/rtl/dv_reg_uvm.sv
1 change: 1 addition & 0 deletions src/doe/config/doe_cbc_tb.vf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

+incdir+${CALIPTRA_ROOT}/src/integration/rtl
+incdir+${CALIPTRA_ROOT}/src/libs/rtl
+incdir+${CALIPTRA_ROOT}/src/keyvault/rtl
Expand Down
1 change: 1 addition & 0 deletions src/doe/config/doe_core_cbc_tb.vf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

+incdir+${CALIPTRA_ROOT}/src/integration/rtl
+incdir+${CALIPTRA_ROOT}/src/libs/rtl
+incdir+${CALIPTRA_ROOT}/src/keyvault/rtl
Expand Down
1 change: 1 addition & 0 deletions src/doe/config/doe_ctrl.vf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

+incdir+${CALIPTRA_ROOT}/src/integration/rtl
+incdir+${CALIPTRA_ROOT}/src/libs/rtl
+incdir+${CALIPTRA_ROOT}/src/keyvault/rtl
Expand Down
1 change: 1 addition & 0 deletions src/doe/config/doe_defines_pkg.vf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

+incdir+${CALIPTRA_ROOT}/src/doe/rtl
${CALIPTRA_ROOT}/src/doe/rtl/doe_defines_pkg.sv
${CALIPTRA_ROOT}/src/doe/rtl/doe_defines_pkg.sv
1 change: 1 addition & 0 deletions src/ecc/config/ecc_montgomerymultiplier_tb.vf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

+incdir+${CALIPTRA_ROOT}/src/integration/rtl
+incdir+${CALIPTRA_ROOT}/src/libs/rtl
+incdir+${CALIPTRA_ROOT}/src/keyvault/rtl
Expand Down
1 change: 1 addition & 0 deletions src/ecc/config/ecc_top.vf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

+incdir+${CALIPTRA_ROOT}/src/integration/rtl
+incdir+${CALIPTRA_ROOT}/src/libs/rtl
+incdir+${CALIPTRA_ROOT}/src/keyvault/rtl
Expand Down
1 change: 1 addition & 0 deletions src/ecc/config/ecc_top_tb.vf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

+incdir+${CALIPTRA_ROOT}/src/integration/rtl
+incdir+${CALIPTRA_ROOT}/src/libs/rtl
+incdir+${CALIPTRA_ROOT}/src/keyvault/rtl
Expand Down
3 changes: 3 additions & 0 deletions src/ecc/coverage/ecc_top_cov_if.sv
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ interface ecc_top_cov_if
logic error_flag;
logic privkey_input_outofrange;
logic r_output_outofrange;
logic s_output_outofrange;
logic r_input_outofrange;
logic s_input_outofrange;
logic pubkeyx_input_outofrange;
Expand Down Expand Up @@ -93,6 +94,7 @@ interface ecc_top_cov_if
assign error_flag = ecc_top.ecc_dsa_ctrl_i.error_flag;
assign privkey_input_outofrange = ecc_top.ecc_dsa_ctrl_i.privkey_input_outofrange;
assign r_output_outofrange = ecc_top.ecc_dsa_ctrl_i.r_output_outofrange;
assign s_output_outofrange = ecc_top.ecc_dsa_ctrl_i.s_output_outofrange;
assign r_input_outofrange = ecc_top.ecc_dsa_ctrl_i.r_input_outofrange;
assign s_input_outofrange = ecc_top.ecc_dsa_ctrl_i.s_input_outofrange;
assign pubkeyx_input_outofrange = ecc_top.ecc_dsa_ctrl_i.pubkeyx_input_outofrange;
Expand All @@ -118,6 +120,7 @@ interface ecc_top_cov_if
error_flag_cp: coverpoint error_flag;
privkey_input_outofrange_cp: coverpoint privkey_input_outofrange;
r_output_outofrange_cp: coverpoint r_output_outofrange;
s_output_outofrange_cp: coverpoint s_output_outofrange;
r_input_outofrange_cp: coverpoint r_input_outofrange;
s_input_outofrange_cp: coverpoint s_input_outofrange;
pubkeyx_input_outofrange_cp: coverpoint pubkeyx_input_outofrange;
Expand Down
Loading
Loading