Skip to content

Commit bcbeb95

Browse files
Update lowrisc_ip to lowRISC/opentitan@d268f271f4
Update code from upstream repository https://github.com/lowRISC/opentitan to revision d268f271f4f75aeb8f3bf9624a497ae5bfb9c47e * [rtl] MuBi encoding of iCache memory ctrl signals (Pascal Nasahl) * [sram_ctrl] Add readback feature (Pascal Nasahl) * [prim_pad_wrapper,rtl] Change input enable to active-high (Andreas Kurth) * [hmac/rtl] Wait for digest of complete block when stopping (Martin Velay) * [prim_sha2_pad,rtl] Signal msg feed complete also when stopping (Andreas Kurth) * [prim_sha2_pad,rtl] Go to idle (without padding) when told to stop (Andreas Kurth) * [prim_sha2_pad,rtl] Refactor comparison on tx_count and msg len into signal (Andreas Kurth) * [prim_sha2_pad,rtl] Fix setting of digest mode when continuing (Andreas Kurth) * [hmac/prim_2,rtl] Do not clear redundant digest values (Ghada Dessouky) * [prim,fpv] Tweak how a parameter gets used in some assertions (Rupert Swarbrick) * [prim,fpv] Fix trivial lint warning in prim_fifo_sync_assert_fpv (Rupert Swarbrick) * [prim,rtl] Fix trivial lint warning in prim_fifo_sync (Rupert Swarbrick) * [top_earlgrey,pinmux] Add input disable attribute for non-manual pads (Andreas Kurth) * [ipgen,flash_ctrl] Fix core files (Guillermo Maturana) * [prim,rtl] Avoid unnecessary check in prim_esc_receiver.sv (Rupert Swarbrick) * [prim,fpv] Use PossibleActions param in prim_esc_receiver (Rupert Swarbrick) * [prim_diff_decode] Use `prim_xnor2` to detect integrity issue (Andreas Kurth) * [prim] Fix typo'd loop increment (James Wainwright) * [hmac/prim_sha2,rtl] Implement SW error for invalid HMAC config (Ghada Dessouky) * [prim_sha2,rtl/dv] Fix secret value wiping (Ghada Dessouky) * [prim,rtl,fpv] Fix typo in assertion in prim_alert_receiver (Rupert Swarbrick) * [fpv,prim] Drop prim_count_expected_failure.hjson (Rupert Swarbrick) * [fpv,prim] Generalise from DecrNeverTrue to listing possible actions (Rupert Swarbrick) * [prim,fpv] Correct assertions for commit_i input (Rupert Swarbrick) * [prim,fpv] Rephrase some "backwards" assertions in prim_count (Rupert Swarbrick) * [prim,fpv] Properly "waive" some unreachable prim_count assertions (Rupert Swarbrick) * [prim,fpv] Fix width of FPV variable in prim_arbiter_ppc.sv (Rupert Swarbrick) * [prim,fpv] Rephrase prim_count error assertions (Rupert Swarbrick) * [prim,fpv] Fix port list in prim_count_tb (Rupert Swarbrick) * [prim_ram_1p_scr] Align documentation with actual implementation (Pirmin Vogel) * [prim, rom_ctrl] Increase number of PRINCE rounds for improved security (Pirmin Vogel) * [prim,fpv] Make file structure slightly clearer (Rupert Swarbrick) * [prim,fpv] Shorten a variable name (prim_hier -> hier) (Rupert Swarbrick) * [prim,fpv] Tidy up and document some FPV macros (Rupert Swarbrick) * [rtl,comments] Fix some comments (Guillermo Maturana) * [dv,prim] Clarification of reset behavior (Adrian Lees) * [ast] Add dependency in fileset_partner to select correct ast_pkg (Sharon Topaz) * [prim,fpv] Only allow unconstrained counters in prim_count FPV (Rupert Swarbrick) * [prim,dv] Tweak ASSERT_FINAL to be a no-op if FPV enabled (Rupert Swarbrick) * [prim,tlul,rtl] Explicitly cast a "1" to specific number of bits (Rupert Swarbrick) * Add the project name to the copyright header (Michael Munday) * Remove trailing whitespaces (Pirmin Vogel) * [hmac] Coding style and minor fixes (Ghada Dessouky) * [prim_fifo_sync_cnt] Minor code cleanup (Andreas Kurth) * [prim_fifo_sync_cnt] Fix signedness of Depth parameter (Andreas Kurth) * [prim_fifo_sync] Keep wraparound pointers contained within `prim_fifo_sync_cnt` (Andreas Kurth) * [prim_fifo_sync] Move pointer and depth calculation to `prim_fifo_sync_cnt` (Andreas Kurth) * [prim_fifo_sync] Remove out-commented RTL code (Andreas Kurth) * [prim_fifo_sync_cnt] Improve module and parameter documentation (Andreas Kurth) * [lint] Demote licence warning in AscentLint parser (Rupert Swarbrick) * [prim] Add support for MuBi's up to 32bit (Michael Schaffner) * [otp_ctrl] Increase Hamming distance in OTP commands (Michael Schaffner) * Make .core files pass FuseSoC 2 schema validator (Olof Kindgren) * [prim_sha2,rtl] Add key_length type and change type encodings (Ghada Dessouky) * [dv,sram_ctrl] Fix a few failing tests (Guillermo Maturana) * [prim/lint] Fix long line lint error in prim_intr_hw (Alexander Williams) * [doc,prim] Improve comments in prim_intr_hw (Harry Callahan) * [prim_sha2] Add `hash_running_o` (Andreas Kurth) * [prim_sha2] Add `hash_continue_i` (Andreas Kurth) * [prim_sha2] Make digest writable from input while disabled (Andreas Kurth) * [prim] Fix lint error in shadow register subreg primitive (Pirmin Vogel) * [primgen] Fix parameters in a primgen template (Rupert Swarbrick) * [prim] Avoid unnecessary Impl parameter in prim_onehot_check (Rupert Swarbrick) * [hw,prim,sha2] Fix syntax error in waiver file (Robert Schilling) * [prim_sha2,rtl] prim_sha2 minor RTL and styling fixes (Ghada Dessouky) * [prim_sha2,rtl] Add RTL implementation + update core + lint waivers (Ghada Dessouky) * [clkmgr] Restructure division clock feedback (Michael Schaffner) * Revert "[edn] Move prim_edn_req out of prim" (Rupert Swarbrick) * [rtl, prim] Add 'commit' functionality to prim_count (Greg Chadwick) * [prim] Fix up 1r1w cores (Alexander Williams) * [prim] Add two-port memory ECC wrappers (Michael Schaffner) * [prim] Add two-port memory implementation (Michael Schaffner) * [prim] Make copies of dual port memory files (Michael Schaffner) * [otp_ctrl] Add option to disable integrity on a partition (Michael Schaffner) * [prim_trivium] Allow dynamically disabling the lockup protection (Pirmin Vogel) * [scrambling] Add reference to RFC issue (Michael Schaffner) * [edn] Move prim_edn_req out of prim (Rupert Swarbrick) * [reggen] Remove the devmode input (Michael Schaffner) * [prim, rom_ctrl] Remove S&P layer from data scrambling (Michael Schaffner) * [prim] Fix typo in Trivium/Bivium stream cipher primitives (Pirmin Vogel) Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
1 parent 076ec32 commit bcbeb95

File tree

595 files changed

+5471
-1259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

595 files changed

+5471
-1259
lines changed

vendor/lowrisc_ip.lock.hjson

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
upstream:
1010
{
1111
url: https://github.com/lowRISC/opentitan
12-
rev: 042415198f3dc6b3bc387c669c7e9cf982d208e2
12+
rev: d268f271f4f75aeb8f3bf9624a497ae5bfb9c47e
1313
}
1414
}

vendor/lowrisc_ip/dv/dpi/uartdpi/uartdpi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44

vendor/lowrisc_ip/dv/dpi/uartdpi/uartdpi.core

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CAPI=2:
2-
# Copyright lowRISC contributors.
2+
# Copyright lowRISC contributors (OpenTitan project).
33
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
44
# SPDX-License-Identifier: Apache-2.0
55
name: "lowrisc:dv_dpi_c:uartdpi:0.1"

vendor/lowrisc_ip/dv/dpi/uartdpi/uartdpi.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44

vendor/lowrisc_ip/dv/dpi/uartdpi/uartdpi.sv

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44

vendor/lowrisc_ip/dv/dpi/uartdpi/uartdpi_sv.core

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CAPI=2:
2-
# Copyright lowRISC contributors.
2+
# Copyright lowRISC contributors (OpenTitan project).
33
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
44
# SPDX-License-Identifier: Apache-2.0
55
name: "lowrisc:dv_dpi_sv:uartdpi:0.1"

vendor/lowrisc_ip/ip/prim/BUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright lowRISC contributors.
1+
# Copyright lowRISC contributors (OpenTitan project).
22
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
# SPDX-License-Identifier: Apache-2.0
44

vendor/lowrisc_ip/ip/prim/doc/prim_ram_1p_scr.md

+13-10

vendor/lowrisc_ip/ip/prim/dv/prim_alert/data/prim_alert_cover.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44

vendor/lowrisc_ip/ip/prim/dv/prim_alert/data/prim_alert_testplan.hjson

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44
{

vendor/lowrisc_ip/ip/prim/dv/prim_alert/prim_alert_sim.core

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CAPI=2:
2-
# Copyright lowRISC contributors.
2+
# Copyright lowRISC contributors (OpenTitan project).
33
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
44
# SPDX-License-Identifier: Apache-2.0
55
name: "lowrisc:dv:prim_alert_sim:0.1"
@@ -29,4 +29,3 @@ targets:
2929

3030
lint:
3131
<<: *sim_target
32-

vendor/lowrisc_ip/ip/prim/dv/prim_alert/prim_alert_sim_cfg.hjson

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44
{

vendor/lowrisc_ip/ip/prim/dv/prim_alert/tb/prim_alert_tb.sv

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44
//

vendor/lowrisc_ip/ip/prim/dv/prim_esc/data/prim_esc_cover.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44

vendor/lowrisc_ip/ip/prim/dv/prim_esc/data/prim_esc_testplan.hjson

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44
{

vendor/lowrisc_ip/ip/prim/dv/prim_esc/prim_esc_sim.core

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CAPI=2:
2-
# Copyright lowRISC contributors.
2+
# Copyright lowRISC contributors (OpenTitan project).
33
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
44
# SPDX-License-Identifier: Apache-2.0
55
name: "lowrisc:dv:prim_esc_sim:0.1"

vendor/lowrisc_ip/ip/prim/dv/prim_esc/prim_esc_sim_cfg.hjson

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44
{

vendor/lowrisc_ip/ip/prim/dv/prim_esc/tb/prim_esc_tb.sv

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44
//
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0

vendor/lowrisc_ip/ip/prim/dv/prim_lfsr/data/prim_lfsr_cover.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44
//

vendor/lowrisc_ip/ip/prim/dv/prim_lfsr/prim_lfsr_sim.core

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CAPI=2:
2-
# Copyright lowRISC contributors.
2+
# Copyright lowRISC contributors (OpenTitan project).
33
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
44
# SPDX-License-Identifier: Apache-2.0
55
name: "lowrisc:dv:prim_lfsr_sim:0.1"

vendor/lowrisc_ip/ip/prim/dv/prim_lfsr/prim_lfsr_sim_cfg.hjson

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44
{

vendor/lowrisc_ip/ip/prim/dv/prim_lfsr/prim_lfsr_tb.sv

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44
//

vendor/lowrisc_ip/ip/prim/dv/prim_present/crypto_dpi_present/crypto_dpi_present.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44
//

vendor/lowrisc_ip/ip/prim/dv/prim_present/crypto_dpi_present/crypto_dpi_present.core

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CAPI=2:
2-
# Copyright lowRISC contributors.
2+
# Copyright lowRISC contributors (OpenTitan project).
33
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
44
# SPDX-License-Identifier: Apache-2.0
55
name: "lowrisc:dv:crypto_dpi_present:0.1"

vendor/lowrisc_ip/ip/prim/dv/prim_present/crypto_dpi_present/crypto_dpi_present_pkg.sv

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44

vendor/lowrisc_ip/ip/prim/dv/prim_present/data/prim_present_cover.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44

vendor/lowrisc_ip/ip/prim/dv/prim_present/prim_present_sim.core

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CAPI=2:
2-
# Copyright lowRISC contributors.
2+
# Copyright lowRISC contributors (OpenTitan project).
33
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
44
# SPDX-License-Identifier: Apache-2.0
55
name: "lowrisc:dv:prim_present_sim:0.1"

vendor/lowrisc_ip/ip/prim/dv/prim_present/prim_present_sim_cfg.hjson

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44
{

vendor/lowrisc_ip/ip/prim/dv/prim_present/tb/prim_present_tb.sv

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44
//

vendor/lowrisc_ip/ip/prim/dv/prim_prince/crypto_dpi_prince/crypto_dpi_prince.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44

vendor/lowrisc_ip/ip/prim/dv/prim_prince/crypto_dpi_prince/crypto_dpi_prince.core

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CAPI=2:
2-
# Copyright lowRISC contributors.
2+
# Copyright lowRISC contributors (OpenTitan project).
33
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
44
# SPDX-License-Identifier: Apache-2.0
55
name: "lowrisc:dv:crypto_dpi_prince:0.1"

vendor/lowrisc_ip/ip/prim/dv/prim_prince/crypto_dpi_prince/crypto_dpi_prince_pkg.sv

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44

vendor/lowrisc_ip/ip/prim/dv/prim_prince/crypto_dpi_prince/crypto_dpi_prince_sim_opts.hjson

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44
{

vendor/lowrisc_ip/ip/prim/dv/prim_prince/crypto_dpi_prince/crypto_prince_ref.core

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CAPI=2:
2-
# Copyright lowRISC contributors.
2+
# Copyright lowRISC contributors (OpenTitan project).
33
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
44
# SPDX-License-Identifier: Apache-2.0
55
name: "lowrisc:dv:crypto_prince_ref:0.1"

vendor/lowrisc_ip/ip/prim/dv/prim_prince/crypto_dpi_prince/prince_ref.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Copyright 2016 Sebastien Riou
33
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
44
// SPDX-License-Identifier: Apache-2.0

vendor/lowrisc_ip/ip/prim/dv/prim_prince/data/prim_prince_cover.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44

vendor/lowrisc_ip/ip/prim/dv/prim_prince/prim_prince_sim.core

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CAPI=2:
2-
# Copyright lowRISC contributors.
2+
# Copyright lowRISC contributors (OpenTitan project).
33
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
44
# SPDX-License-Identifier: Apache-2.0
55
name: "lowrisc:dv:prim_prince_sim:0.1"

vendor/lowrisc_ip/ip/prim/dv/prim_prince/prim_prince_sim_cfg.hjson

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44
{

vendor/lowrisc_ip/ip/prim/dv/prim_prince/tb/prim_prince_tb.sv

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44
//

vendor/lowrisc_ip/ip/prim/dv/prim_ram_scr/cpp/scramble_model.cc

+19-15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright lowRISC contributors.
1+
// Copyright lowRISC contributors (OpenTitan project).
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44

@@ -21,7 +21,7 @@ uint8_t PRESENT_SBOX4_INV[] = {0x5, 0xe, 0xf, 0x8, 0xc, 0x1, 0x2, 0xd,
2121

2222
static const uint32_t kNumAddrSubstPermRounds = 2;
2323
static const uint32_t kNumDataSubstPermRounds = 2;
24-
static const uint32_t kNumPrinceHalfRounds = 2;
24+
static const uint32_t kNumPrinceHalfRounds = 3;
2525

2626
static std::vector<uint8_t> byte_reverse_vector(
2727
const std::vector<uint8_t> &vec_in) {
@@ -322,7 +322,7 @@ std::vector<uint8_t> scramble_encrypt_data(
322322
const std::vector<uint8_t> &data_in, uint32_t data_width,
323323
uint32_t subst_perm_width, const std::vector<uint8_t> &addr,
324324
uint32_t addr_width, const std::vector<uint8_t> &nonce,
325-
const std::vector<uint8_t> &key, bool repeat_keystream) {
325+
const std::vector<uint8_t> &key, bool repeat_keystream, bool use_sp_layer) {
326326
assert(data_in.size() == ((data_width + 7) / 8));
327327
assert(addr.size() == ((addr_width + 7) / 8));
328328

@@ -335,28 +335,32 @@ std::vector<uint8_t> scramble_encrypt_data(
335335

336336
auto data_enc = xor_vectors(data_in, keystream);
337337

338-
return scramble_subst_perm_full_width(data_enc, data_width, subst_perm_width,
339-
true);
338+
if (use_sp_layer) {
339+
return scramble_subst_perm_full_width(data_enc, data_width,
340+
subst_perm_width, true);
341+
} else {
342+
return data_enc;
343+
}
340344
}
341345

342346
std::vector<uint8_t> scramble_decrypt_data(
343347
const std::vector<uint8_t> &data_in, uint32_t data_width,
344348
uint32_t subst_perm_width, const std::vector<uint8_t> &addr,
345349
uint32_t addr_width, const std::vector<uint8_t> &nonce,
346-
const std::vector<uint8_t> &key, bool repeat_keystream) {
350+
const std::vector<uint8_t> &key, bool repeat_keystream, bool use_sp_layer) {
347351
assert(data_in.size() == ((data_width + 7) / 8));
348352
assert(addr.size() == ((addr_width + 7) / 8));
349353

350-
// Data is decrypted by reversing substitution/permutation layer then XORing
351-
// with keystream
352-
auto data_sp_out = scramble_subst_perm_full_width(data_in, data_width,
353-
subst_perm_width, false);
354-
355354
auto keystream =
356355
scramble_gen_keystream(addr, addr_width, nonce, key, data_width,
357356
kNumPrinceHalfRounds, repeat_keystream);
358-
359-
auto data_dec = xor_vectors(data_sp_out, keystream);
360-
361-
return data_dec;
357+
if (use_sp_layer) {
358+
// Data is decrypted by reversing substitution/permutation layer then XORing
359+
// with keystream
360+
auto data_sp_out = scramble_subst_perm_full_width(data_in, data_width,
361+
subst_perm_width, false);
362+
return xor_vectors(data_sp_out, keystream);
363+
} else {
364+
return xor_vectors(data_in, keystream);
365+
}
362366
}

vendor/lowrisc_ip/ip/prim/dv/prim_ram_scr/cpp/scramble_model.core

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CAPI=2:
2-
# Copyright lowRISC contributors.
2+
# Copyright lowRISC contributors (OpenTitan project).
33
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
44
# SPDX-License-Identifier: Apache-2.0
55

0 commit comments

Comments
 (0)