mirror of
https://github.com/openhwgroup/cve2.git
synced 2025-06-28 09:39:26 -04:00
parent
0a9e862fee
commit
1253782b42
5 changed files with 11 additions and 128 deletions
2
Makefile
2
Makefile
|
@ -52,7 +52,7 @@ run-simple-system: sw-simple-hello | $(Vcve2_simple_system)
|
||||||
--raminit=$(simple-system-program)
|
--raminit=$(simple-system-program)
|
||||||
|
|
||||||
compile_verilator:
|
compile_verilator:
|
||||||
fusesoc --cores-root . run --no-export --target=lint --tool=verilator --setup --build lowrisc:cve2:cve2_top:0.1 2>&1 | tee buildsim.log
|
fusesoc --cores-root . run --no-export --target=lint --tool=verilator --setup --build openhwgroup:cve2:cve2_top:0.1 2>&1 | tee buildsim.log
|
||||||
|
|
||||||
# Arty A7 FPGA example
|
# Arty A7 FPGA example
|
||||||
# Use the following targets (depending on your hardware):
|
# Use the following targets (depending on your hardware):
|
||||||
|
|
|
@ -2,16 +2,14 @@ CAPI=2:
|
||||||
# Copyright lowRISC contributors.
|
# Copyright lowRISC contributors.
|
||||||
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
|
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
name: "lowrisc:cve2:cve2_core:0.1"
|
name: "openhwgroup:cve2:cve2_core:0.1"
|
||||||
description: "Ibex CPU Core Components"
|
description: "Ibex CPU Core Components"
|
||||||
|
|
||||||
filesets:
|
filesets:
|
||||||
files_rtl:
|
files_rtl:
|
||||||
depend:
|
depend:
|
||||||
- lowrisc:prim:assert
|
- lowrisc:prim:assert
|
||||||
- lowrisc:prim:clock_gating
|
- openhwgroup:cve2:cve2_pkg
|
||||||
- lowrisc:prim:lfsr
|
|
||||||
- lowrisc:cve2:cve2_pkg
|
|
||||||
- lowrisc:dv:dv_fcov_macros
|
- lowrisc:dv:dv_fcov_macros
|
||||||
files:
|
files:
|
||||||
- rtl/cve2_alu.sv
|
- rtl/cve2_alu.sv
|
||||||
|
@ -80,68 +78,12 @@ parameters:
|
||||||
paramtype: vlogdefine
|
paramtype: vlogdefine
|
||||||
description: "Bitmanip implementation parameter enum. See the cve2_pkg::rv32b_e enum in cve2_pkg.sv for permitted values."
|
description: "Bitmanip implementation parameter enum. See the cve2_pkg::rv32b_e enum in cve2_pkg.sv for permitted values."
|
||||||
|
|
||||||
RegFile:
|
|
||||||
datatype: str
|
|
||||||
default: cve2_pkg::RegFileFF
|
|
||||||
paramtype: vlogdefine
|
|
||||||
description: "Register file implementation parameter enum. See the cve2_pkg::regfile_e enum in cve2_pkg.sv for permitted values."
|
|
||||||
|
|
||||||
ICache:
|
|
||||||
datatype: int
|
|
||||||
default: 0
|
|
||||||
paramtype: vlogparam
|
|
||||||
description: "Enable instruction cache"
|
|
||||||
|
|
||||||
ICacheECC:
|
|
||||||
datatype: int
|
|
||||||
default: 0
|
|
||||||
paramtype: vlogparam
|
|
||||||
description: "Enable ECC protection in instruction cache"
|
|
||||||
|
|
||||||
WritebackStage:
|
|
||||||
datatype: int
|
|
||||||
default: 0
|
|
||||||
paramtype: vlogparam
|
|
||||||
description: "Enables third pipeline stage (EXPERIMENTAL) [0/1]"
|
|
||||||
|
|
||||||
BranchPredictor:
|
|
||||||
datatype: int
|
|
||||||
paramtype: vlogparam
|
|
||||||
default: 0
|
|
||||||
description: "Enables static branch prediction (EXPERIMENTAL)"
|
|
||||||
|
|
||||||
SecureCVE2:
|
|
||||||
datatype: int
|
|
||||||
default: 0
|
|
||||||
paramtype: vlogparam
|
|
||||||
description: "Enables security hardening features (EXPERIMENTAL) [0/1]"
|
|
||||||
|
|
||||||
PMPEnable:
|
|
||||||
datatype: int
|
|
||||||
default: 0
|
|
||||||
paramtype: vlogparam
|
|
||||||
description: "Enable PMP"
|
|
||||||
|
|
||||||
PMPGranularity:
|
|
||||||
datatype: int
|
|
||||||
default: 0
|
|
||||||
paramtype: vlogparam
|
|
||||||
description: "Granularity of NAPOT range, 0 = 4 byte, 1 = byte, 2 = 16 byte, 3 = 32 byte etc"
|
|
||||||
|
|
||||||
PMPNumRegions:
|
|
||||||
datatype: int
|
|
||||||
default: 4
|
|
||||||
paramtype: vlogparam
|
|
||||||
description: "Number of PMP regions"
|
|
||||||
|
|
||||||
targets:
|
targets:
|
||||||
default: &default_target
|
default: &default_target
|
||||||
filesets:
|
filesets:
|
||||||
- tool_verilator ? (files_lint_verilator)
|
- tool_verilator ? (files_lint_verilator)
|
||||||
- tool_veriblelint ? (files_lint_verible)
|
- tool_veriblelint ? (files_lint_verible)
|
||||||
- files_rtl
|
- files_rtl
|
||||||
- target_sim? (files_clk_gate)
|
|
||||||
- files_check_tool_requirements
|
|
||||||
toplevel: cve2_core
|
toplevel: cve2_core
|
||||||
parameters:
|
parameters:
|
||||||
- tool_vivado ? (FPGA_XILINX=true)
|
- tool_vivado ? (FPGA_XILINX=true)
|
||||||
|
|
|
@ -2,7 +2,7 @@ CAPI=2:
|
||||||
# Copyright lowRISC contributors.
|
# Copyright lowRISC contributors.
|
||||||
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
|
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
name: "lowrisc:cve2:cve2_pkg:0.1"
|
name: "openhwgroup:cve2:cve2_pkg:0.1"
|
||||||
description: "Header package for CVE2"
|
description: "Header package for CVE2"
|
||||||
|
|
||||||
filesets:
|
filesets:
|
||||||
|
|
|
@ -2,14 +2,14 @@ CAPI=2:
|
||||||
# Copyright lowRISC contributors.
|
# Copyright lowRISC contributors.
|
||||||
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
|
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
name: "lowrisc:cve2:cve2_top:0.1"
|
name: "openhwgroup:cve2:cve2_top:0.1"
|
||||||
description: "Ibex, a small RV32 CPU core"
|
description: "Ibex, a small RV32 CPU core"
|
||||||
|
|
||||||
filesets:
|
filesets:
|
||||||
files_rtl:
|
files_rtl:
|
||||||
depend:
|
depend:
|
||||||
- lowrisc:cve2:cve2_pkg
|
- openhwgroup:cve2:cve2_pkg
|
||||||
- lowrisc:cve2:cve2_core
|
- openhwgroup:cve2:cve2_core
|
||||||
- lowrisc:prim:buf
|
- lowrisc:prim:buf
|
||||||
- lowrisc:prim:clock_mux2
|
- lowrisc:prim:clock_mux2
|
||||||
- lowrisc:prim:flop
|
- lowrisc:prim:flop
|
||||||
|
@ -68,65 +68,6 @@ parameters:
|
||||||
paramtype: vlogdefine
|
paramtype: vlogdefine
|
||||||
description: "Bitmanip implementation parameter enum. See the cve2_pkg::rv32b_e enum in cve2_pkg.sv for permitted values."
|
description: "Bitmanip implementation parameter enum. See the cve2_pkg::rv32b_e enum in cve2_pkg.sv for permitted values."
|
||||||
|
|
||||||
RegFile:
|
|
||||||
datatype: str
|
|
||||||
default: cve2_pkg::RegFileFF
|
|
||||||
paramtype: vlogdefine
|
|
||||||
description: "Register file implementation parameter enum. See the cve2_pkg::regfile_e enum in cve2_pkg.sv for permitted values."
|
|
||||||
|
|
||||||
ICache:
|
|
||||||
datatype: int
|
|
||||||
default: 0
|
|
||||||
paramtype: vlogparam
|
|
||||||
description: "Enable instruction cache"
|
|
||||||
|
|
||||||
ICacheECC:
|
|
||||||
datatype: int
|
|
||||||
default: 0
|
|
||||||
paramtype: vlogparam
|
|
||||||
description: "Enable ECC protection in instruction cache"
|
|
||||||
|
|
||||||
WritebackStage:
|
|
||||||
datatype: int
|
|
||||||
default: 0
|
|
||||||
paramtype: vlogparam
|
|
||||||
description: "Enables third pipeline stage (EXPERIMENTAL) [0/1]"
|
|
||||||
|
|
||||||
BranchPredictor:
|
|
||||||
datatype: int
|
|
||||||
paramtype: vlogparam
|
|
||||||
default: 0
|
|
||||||
description: "Enables static branch prediction (EXPERIMENTAL)"
|
|
||||||
|
|
||||||
SecureCVE2:
|
|
||||||
datatype: int
|
|
||||||
default: 0
|
|
||||||
paramtype: vlogparam
|
|
||||||
description: "Enables security hardening features (EXPERIMENTAL) [0/1]"
|
|
||||||
|
|
||||||
ICacheScramble:
|
|
||||||
datatype: int
|
|
||||||
default: 0
|
|
||||||
paramtype: vlogparam
|
|
||||||
description: "Enables ICache scrambling feature (EXPERIMENTAL) [0/1]"
|
|
||||||
|
|
||||||
PMPEnable:
|
|
||||||
datatype: int
|
|
||||||
default: 0
|
|
||||||
paramtype: vlogparam
|
|
||||||
description: "Enable PMP"
|
|
||||||
|
|
||||||
PMPGranularity:
|
|
||||||
datatype: int
|
|
||||||
default: 0
|
|
||||||
paramtype: vlogparam
|
|
||||||
description: "Granularity of NAPOT range, 0 = 4 byte, 1 = byte, 2 = 16 byte, 3 = 32 byte etc"
|
|
||||||
|
|
||||||
PMPNumRegions:
|
|
||||||
datatype: int
|
|
||||||
default: 4
|
|
||||||
paramtype: vlogparam
|
|
||||||
description: "Number of PMP regions"
|
|
||||||
|
|
||||||
targets:
|
targets:
|
||||||
default: &default_target
|
default: &default_target
|
||||||
|
@ -135,10 +76,10 @@ targets:
|
||||||
- tool_veriblelint ? (files_lint_verible)
|
- tool_veriblelint ? (files_lint_verible)
|
||||||
- files_rtl
|
- files_rtl
|
||||||
- target_sim ? (files_clk_gate)
|
- target_sim ? (files_clk_gate)
|
||||||
- files_check_tool_requirements
|
|
||||||
toplevel: cve2_top
|
toplevel: cve2_top
|
||||||
parameters:
|
parameters:
|
||||||
- tool_vivado ? (FPGA_XILINX=true)
|
- tool_vivado ? (FPGA_XILINX=true)
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
<<: *default_target
|
<<: *default_target
|
||||||
parameters:
|
parameters:
|
||||||
|
|
|
@ -709,7 +709,7 @@ module cve2_core import cve2_pkg::*; #(
|
||||||
cve2_register_file_ff #(
|
cve2_register_file_ff #(
|
||||||
.RV32E (RV32E),
|
.RV32E (RV32E),
|
||||||
.DataWidth (32),
|
.DataWidth (32),
|
||||||
.WordZeroVal (32'(prim_secded_pkg::SecdedInv3932ZeroWord))
|
.WordZeroVal (32'0)
|
||||||
) register_file_i (
|
) register_file_i (
|
||||||
.clk_i (clk_i),
|
.clk_i (clk_i),
|
||||||
.rst_ni(rst_ni),
|
.rst_ni(rst_ni),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue