forked from openhwgroup/cv32e40p
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e0a77d8
commit 3f6ee5a
Showing
5 changed files
with
228 additions
and
111 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,61 @@ | ||
# Logic Equivalence Checking (LEC) | ||
# Sequential Logic Equivalence Checking (SLEC) | ||
|
||
This folder contains a LEC script that runs on both | ||
Synopsys Formality and Cadence Design Systems Conformal. | ||
This folder contains a SLEC script that runs: | ||
|
||
This script allows to catch non-logical equivalent changes on the RTL which are forbidden | ||
on the verified paramter set. | ||
- LEC: Synopsys Formality and Cadence Design Systems Conformal. | ||
- SEC: Siemens SLEC App | ||
|
||
Please have a look at: https://cv32e40p.readthedocs.io/en/latest/core_versions/ | ||
|
||
The `cv32e40p_v1.0.0` tag refers to the frozen RTL. The RTL has been verified and frozen on a given value of the input parameter of the design. Unless a bug is found, it is forbidden to change the RTL | ||
in a non-logical equivalent manner for PPA optimizations of any other change. | ||
Instead, it is possible to change the RTL on a different value of the parameter set, which has not been verified yet. | ||
For example, it is possible to change the RTL design when the `FPU` parameter is set to 1 as this configuration has not been verified yet. However, the design must be logically equivalent when the parameter is set back to 0. | ||
It is possible to change the `apu` interface and the `pulp_clock_en_i` signal on the frozen parameter set as these | ||
signals are not used when the parameter `FPU` and `PULP_CLUSTER` are set to 0, respectively. | ||
|
||
The current scripts have been tried on Synopsys Formality `2021.06-SP5` and Cadence Design Systems Conformal `20.20` on a 64 bit executable. | ||
The `cv32e40p_v1.0.0` tag refers to the frozen RTL. The RTL has been verified | ||
and frozen on a given value of the input parameter of the design. Unless a bug | ||
is found, it is forbidden to change the RTL in a non-logical equivalent manner | ||
for PPA optimizations of any other change. | ||
Instead, it is possible to change the RTL on a different value of the parameter | ||
set, which has not been verified yet. | ||
For example, it is possible to change the RTL design when the `FPU` parameter is | ||
set to 1 as this configuration has not been verified yet. However, the design | ||
must be logically equivalent when the parameter is set back to 0. | ||
It is possible to change the `apu` interface and the `pulp_clock_en_i` signal on | ||
the frozen parameter set as these signals are not used when the parameter `FPU` | ||
and `PULP_CLUSTER` are set to 0, respectively. | ||
|
||
The current scripts have been tried on Synopsys Formality `2021.06-SP5` , | ||
Cadence Design Systems Conformal `20.20` and Siemens SLEC App `2023.4`. | ||
|
||
### Running the script | ||
|
||
From a bash shell, please execute: | ||
From a bash shell using LEC, please execute: | ||
|
||
``` | ||
./lec.sh synopsys | ||
./run.sh -t synopsys -p lec | ||
``` | ||
or | ||
|
||
``` | ||
./lec.sh cadence | ||
``` | ||
``` | ||
./run.sh -t cadence -p lec | ||
``` | ||
|
||
to use one of the tools. synopsys is used by default if no tool is specified,. | ||
From a bash shell to use SEC, please execute: | ||
``` | ||
./run.sh -t siemens -p sec | ||
``` | ||
|
||
Use `sh ./les.sh {synopsys, cadence}` if you run it from a tcsh shell. | ||
By default `cv32e40p_core` is used as a top module, if you want to use | ||
another one set the `TOP_MODULE` environment variable. | ||
|
||
The script clones the `cv32e40p_v1.0.0` tag of the core as a golden reference, and uses the current repository's `rtl` as revised version. | ||
The script clones the `cv32e40p_v1.0.0` tag of the core as a golden reference, | ||
and uses the current repository's `rtl` as revised version. | ||
|
||
If you want to use another golden reference rtl, Set the `GOLDEN_RTL` enviromental variable to the new rtl before calling the `lec.sh` script. | ||
If you want to use another golden reference RTL, set the `GOLDEN_RTL` | ||
environmental variable to the new RTL before calling the `run.sh` script. | ||
|
||
``` | ||
export GOLDEN_RTL=YOUR_GOLDEN_CORE_RTL_PATH | ||
``` | ||
or | ||
``` | ||
export GOLDEN_RTL=YOUR_GOLDEN_CORE_RTL_PATH | ||
``` | ||
or | ||
|
||
``` | ||
setenv GOLDEN_RTL YOUR_GOLDEN_CORE_RTL_PATH | ||
``` | ||
If the script succeeds, it returns 0, otherwise -1. | ||
``` | ||
setenv GOLDEN_RTL YOUR_GOLDEN_CORE_RTL_PATH | ||
``` | ||
|
||
The `check_lec.tcl` scripts in the tool specific folders are executed on the tools to perform `RTL to RTL` logic equivalence checking. |
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,41 @@ | ||
############################################################################## | ||
# Copyright 2006-Mentor Graphics Corporation | ||
# | ||
# THIS SOFTWARE AND RELATED DOCUMENTATION | ||
# ARE PROPRIETARY AND CONFIDENTIAL TO SIEMENS. | ||
# © 2023 Siemens | ||
|
||
INSTALL := $(shell qverify -install_path) | ||
VLIB = $(INSTALL)/modeltech/linux_x86_64/vlib | ||
VMAP = $(INSTALL)/modeltech/linux_x86_64/vmap | ||
VLOG = $(INSTALL)/modeltech/linux_x86_64/vlog | ||
VCOM = $(INSTALL)/modeltech/linux_x86_64/vcom | ||
|
||
run_sec_vl: clean run_sec | ||
|
||
run_sec: | ||
$(VLIB) work_ip_orig | ||
$(VLIB) work_ip_mod | ||
$(VMAP) work_spec work_ip_orig | ||
$(VMAP) work_impl work_ip_mod | ||
$(VLOG) -sv -f $(SPEC_FLIST) -work work_spec | ||
$(VLOG) -sv -f $(IMPL_FLIST) -work work_impl | ||
|
||
qverify -c -od log -do " \ | ||
onerror { exit 1 }; \ | ||
slec configure -spec -d $(TOP_MODULE) -work work_spec; \ | ||
slec configure -impl -d $(TOP_MODULE) -work work_impl; \ | ||
slec compile; \ | ||
slec verify -timeout 10m; \ | ||
exit" | ||
@cp log/slec_verify.log $(SUMMARY_LOG) | ||
|
||
|
||
debug: | ||
qverify log/slec.db | ||
|
||
clean: | ||
qverify_clean | ||
rm -rf log* work* *.rpt modelsim.ini .visualizer visualizer* | ||
|
||
|
Oops, something went wrong.