Skip to content

Commit

Permalink
Merge branch 'cv32e40s/dev' into dev_hf_clic_updates
Browse files Browse the repository at this point in the history
  • Loading branch information
silabs-hfegran authored Sep 14, 2023
2 parents 68a5170 + 4a8a8e9 commit aeaa67e
Show file tree
Hide file tree
Showing 12 changed files with 1,942 additions and 248 deletions.
76 changes: 76 additions & 0 deletions bin/csv2json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#!/usr/bin/env python3


# Copyright 2023 Silicon Labs, Inc.
#
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
#
# Licensed under the Solderpad Hardware License v 2.1 (the "License"); you may
# not use this file except in compliance with the License, or, at your option,
# the Apache License version 2.0.
#
# You may obtain a copy of the License at
# https://solderpad.org/licenses/SHL-2.1/
#
# Unless required by applicable law or agreed to in writing, any work
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
# See the License for the specific language governing permissions and
# limitations under the License.


"""
Description:
Converts ".csv" vplans to ".json".
Rationale:
It is an alternative to the ".csv" vplans, which in some cases might be
easier to review.
Usage:
Run it on a ".csv" vplan.
"""


import csv
import json
import sys


# Check correct usage

if len(sys.argv) != 2:
message = "usage: {} <csv vplan>".format(sys.argv[0])
sys.exit(message)


# Read ".csv"

csv_filename = sys.argv[1]
csv_file = open(csv_filename, 'r', encoding='utf-8')
csv_reader = csv.DictReader(csv_file)


# Fill empty cells (with value of above cell)

csv_rows = []
csv_row_previous = None

for row in csv_reader:
for key, value in row.items():
if not value and csv_row_previous:
row[key] = csv_row_previous[key]
# TODO not for "link-to-cov" etc

csv_rows.append(row)
csv_row_previous = row


# Write ".json"

json_string = json.dumps(csv_rows, indent = 4)
json_filename = csv_filename.replace(".csv", ".json")
json_file = open(json_filename, 'w', encoding='utf-8')

json_file.write(json_string)
File renamed without changes.
2 changes: 1 addition & 1 deletion cv32e40s/sim/ExternalRepos.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export SHELL = /bin/bash

CV_CORE_REPO ?= https://github.com/openhwgroup/cv32e40s
CV_CORE_BRANCH ?= master
CV_CORE_HASH ?= 6feea13d7c345bb63728d9893d2256a0a45c3d2f
CV_CORE_HASH ?= 86b09c6f88bdaec9e28fc192cdbbc6d88bee038a
CV_CORE_TAG ?= none

#RISCVDV_REPO ?= https://github.com/google/riscv-dv
Expand Down
34 changes: 19 additions & 15 deletions cv32e40s/sim/tools/xrun/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
## Xcelium tools directory
## Xcelium Tools Directory

Various Xcelium-based utilities and scripts.
Xcelium-based utilities and scripts.

### Simulator control scripts

These TCL scripts can be passed to Xcelium by the core-v-verif Makefiles when using Xcelium. The following scripts are currently supported:
### Simulator Control Scripts

| Script | Usage |
|--------|-------|
| probe.tcl | Generates probes for waveform database viewable with Cadence SimVision. Invoked when WAVES=1 passed to the make test command |
| indago.tcl | Generates probes for waveform database viewable with Cadence Indago. Invokedf when WAVEs=1 ADV_DEBUG=1 passed to the make test command |
These scripts can be passed to Xcelium by the core-v-verif Makefiles.
The following scripts are currently supported:

### Coverage refinement files
| Script | Usage |
|------------|-------|
| probe.tcl | Generates probes for waveform database viewable with Cadence SimVision. Invoked when WAVES=1 passed to the make test command |
| indago.tcl | Generates probes for waveform database viewable with Cadence Indago. Invokedf when WAVES=1 ADV_DEBUG=1 passed to the make test command |

These XML files should be created using coverage tools such as IMC or Vmanager. These are used to generate coverage reports that focus on necessary coverage while removing exceptions that are unhittable or not significant for the design being verified.

### Coverage Refinement Files

These refinement files should be created using coverage tools such as IMC or Vmanager.
They are used to generate coverage reports that focus on necessary coverage, while removing exceptions that are unhittable or not significant for the design being verified.

*Note that some files are automatically generated and some are manually maintained. This is indicated in the table.*

| File | Maintenance | Description |
|------|-------------|-------------|
| cv32e40s.hierarchy.vRefine | Manual | Removes hierarchies from coverage database that are not to be considered for coverage (e.g. testbench |
| cv32e40s.auto.vRefine | Automatic | Auto-generated refinements based on parameter usage for the CV32E40S without PULP extensions. *Do not manually edit* |
| cv32e40s.manual.vRefine | Manual | Manually added coverage exception based on deesign verification reviews. |
| File | Maintenance | Description |
|-----------------------------------|-------------|-------------|
| cv32e40s.non_dut_code_cov.vRefine | Manual | Removes non-DUT code coverage from coverage database, that are not to be considered for coverage (e.g. testbench) |
| cv32e40s.auto.vRefine | Automatic | Auto-generated refinements based on parameter usage for the CV32E40S without PULP extensions. *Do not manually edit* |
| cv32e40s.manual.vRefine | Manual | Manually added coverage exception based on deesign verification reviews. |
Loading

0 comments on commit aeaa67e

Please sign in to comment.