-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'esl-epfl:main' into update_cve2
- Loading branch information
Showing
38 changed files
with
1,425 additions
and
99 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
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
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
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
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
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
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
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
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
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,76 @@ | ||
// Copyright EPFL contributors. | ||
// Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
{ name: "iffifo" | ||
clock_primary: "clk_i" | ||
bus_interfaces: [ | ||
{ protocol: "reg_iface", direction: "device" } | ||
], | ||
regwidth: 32 | ||
registers: [ | ||
|
||
{ name: "FIFO_OUT" | ||
desc: "Data coming from the FIFO (Fifo Output/Software RX)" | ||
swaccess: "ro" | ||
hwaccess: "hrw" # required for RE signal | ||
hwext: "true" # required for RE signal | ||
hwre: "true" # Used to emulate a window behaviour | ||
fields: [ | ||
{ bits: "31:0" } | ||
] | ||
} | ||
|
||
{ name: "FIFO_IN" | ||
desc: "Data sent to the FIFO (Fifo Input/Software TX)" | ||
hwaccess: "hro" | ||
swaccess: "rw" # required for QE signal | ||
hwqe: "true" # Used to emulate a window behaviour | ||
fields: [ | ||
{ bits: "31:0" } | ||
] | ||
} | ||
|
||
{ name: "STATUS" | ||
desc: "General purpose status register" | ||
swaccess: "ro" | ||
hwaccess: "hwo" | ||
fields: [ | ||
{ bits: "0", name: "EMPTY", desc: "Asserted when FIFO empty." } | ||
{ bits: "1", name: "AVAILABLE", desc: "Asserted when data is available in FIFO." } | ||
{ bits: "2", name: "REACHED", desc: "Asserted when occupied data slots count greater than threshold." } | ||
{ bits: "3", name: "FULL", desc: "Asserted when all FIFO slots are occupied." } | ||
] | ||
} | ||
|
||
{ name: "OCCUPANCY" | ||
desc: "Current number of occupied FIFO slots" | ||
swaccess: "ro" | ||
hwaccess: "hwo" | ||
fields: [ | ||
{ bits: "31:0" } | ||
] | ||
} | ||
|
||
{ name: "WATERMARK" | ||
desc: "FIFO occupancy at which the STATUS:REACHED bit is asserted" | ||
swaccess: "rw" | ||
hwaccess: "hro" | ||
fields: [ | ||
{ bits: "31:0" } | ||
] | ||
} | ||
|
||
{ name: "INTERRUPTS" | ||
desc: "Write any value to assert an interrupt. Write 0 or 1 to disable or enable an interrupt." | ||
swaccess: "rw" | ||
hwaccess: "hro" | ||
hwqe: "true" # Used to catch software writes | ||
fields: [ | ||
{ bits: "0", name: "REACHED", desc: "Watermark reached interrupt" } | ||
] | ||
} | ||
|
||
] | ||
} | ||
|
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,26 @@ | ||
CAPI=2: | ||
|
||
name: "example:ip:iffifo" | ||
description: "core-v-mini-mcu iffifo peripheral" | ||
|
||
# Copyright 2023 EPFL | ||
# Solderpad Hardware License, Version 2.1, see LICENSE.md for details. | ||
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 | ||
# | ||
# Author: Pierre Guillod <[email protected]>, EPFL, STI-SEL | ||
# Date: 18.10.2023 | ||
|
||
filesets: | ||
files_rtl: | ||
depend: | ||
- pulp-platform.org::common_cells | ||
files: | ||
- rtl/iffifo_reg_pkg.sv | ||
- rtl/iffifo_reg_top.sv | ||
- rtl/iffifo.sv | ||
file_type: systemVerilogSource | ||
|
||
targets: | ||
default: | ||
filesets: | ||
- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright 2023 EPFL | ||
// Solderpad Hardware License, Version 2.1, see LICENSE.md for details. | ||
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 | ||
// | ||
// Author: Pierre Guillod <[email protected]>, EPFL, STI-SEL | ||
// Date: 18.10.2023 | ||
|
||
`verilator_config | ||
|
||
lint_off -rule DECLFILENAME -file "*/iffifo/rtl/iffifo_reg_top.sv" -match "Filename 'iffifo_reg_top' does not match MODULE name: 'iffifo_reg_top_intf'*" | ||
lint_off -rule WIDTH -file "*/iffifo/rtl/iffifo_reg_top.sv" -match "Operator ASSIGNW expects 3 bits on the Assign RHS, but Assign RHS's SEL generates 32*" | ||
lint_off -rule UNUSED -file "*/iffifo/rtl/iffifo.sv" -match "Bits of signal are not used: 'reg2hw'[0]*" | ||
|
||
lint_off -rule UNUSED -file "*/iffifo/rtl/iffifo_window.sv" -match "Bits of signal are not used: 'rx_win_i'[67:64,31:0]" | ||
lint_off -rule WIDTH -file "*/iffifo/rtl/iffifo_*.sv" -match "Operator ASSIGNW expects*" |
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,8 @@ | ||
# Copyright EPFL contributors. | ||
# Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
echo "Generating RTL" | ||
${PYTHON} ../../vendor/pulp_platform_register_interface/vendor/lowrisc_opentitan/util/regtool.py -r -t rtl data/iffifo.hjson | ||
echo "Generating SW" | ||
${PYTHON} ../../vendor/pulp_platform_register_interface/vendor/lowrisc_opentitan/util/regtool.py --cdefines -o ../../../sw/device/lib/drivers/iffifo/iffifo_regs.h data/iffifo.hjson |
Oops, something went wrong.