diff --git a/.github/ISSUE_TEMPLATE/1-bug.yaml b/.github/ISSUE_TEMPLATE/1-bug.yaml new file mode 100644 index 00000000000..f258ad58efe --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1-bug.yaml @@ -0,0 +1,37 @@ +name: Bug +description: Report a CVA6 RTL bug +title: "[BUG] " +labels: ["Type:Bug"] +body: +- type: checkboxes + attributes: + label: Code of Conduct + options: + - label: I have searched the existing bug issues. + required: true + - label: >- + I am a human engaging in an interpersonal interaction. + During this interaction, my words are my own and are not generated. + If relevant, I provide links to my sources. + required: true +- type: input + attributes: + label: CVA6 commit affected + description: The git hash of a commit in the official CVA6 repository that was used to demonstrate the bug. + placeholder: "0123abc" + validations: + required: true +- type: textarea + attributes: + label: Bug Description + value: | + <!-- Introduction --> + + # Steps to reproduce + + ## Expected behavior + + ## Observed behavior + + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/task.yaml b/.github/ISSUE_TEMPLATE/2-task.yaml similarity index 84% rename from .github/ISSUE_TEMPLATE/task.yaml rename to .github/ISSUE_TEMPLATE/2-task.yaml index b679f04288e..07c18d215dc 100644 --- a/.github/ISSUE_TEMPLATE/task.yaml +++ b/.github/ISSUE_TEMPLATE/2-task.yaml @@ -1,14 +1,18 @@ -name: CVA6 Task -description: Create a CVA6 Project Task +name: Task +description: A CVA6 Project Task title: "[TASK] <title>" labels: ["task"] body: - type: checkboxes attributes: - label: Is there an existing CVA6 task for this? - description: Please search to see if a task issue already exists for the task you need to create + label: Code of Conduct options: - - label: I have searched the existing task issues + - label: I have searched the existing task issues. + required: true + - label: >- + I am a human engaging in an interpersonal interaction. + During this interaction, my words are my own and are not generated. + If relevant, I provide links to my sources. required: true - type: textarea attributes: diff --git a/.github/ISSUE_TEMPLATE/3-other.yaml b/.github/ISSUE_TEMPLATE/3-other.yaml new file mode 100644 index 00000000000..8e5cb6410db --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3-other.yaml @@ -0,0 +1,19 @@ +name: Other +description: Other issues +title: "<title>" +labels: [] +body: +- type: checkboxes + attributes: + label: Code of Conduct + options: + - label: >- + I am a human engaging in an interpersonal interaction. + During this interaction, my words are my own and are not generated. + If relevant, I provide links to my sources. + required: true +- type: textarea + attributes: + label: Description + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml deleted file mode 100644 index 6fb9c0b8655..00000000000 --- a/.github/ISSUE_TEMPLATE/bug.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: CVA6 bug -description: Create a CVA6 bug -title: "[BUG] <title>" -labels: ["Type:Bug"] -body: -- type: checkboxes - attributes: - label: Is there an existing CVA6 bug for this? - description: Please search to see if an issue already exist for the bug you need to create - options: - - label: I have searched the existing bug issues - required: true -- type: textarea - attributes: - label: Bug Description - description: A concise description of the bug - validations: - required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000000..3ba13e0cec6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/actions/setup-cva6-env/action.yml b/.github/actions/setup-cva6-env/action.yml new file mode 100644 index 00000000000..da4a15d3539 --- /dev/null +++ b/.github/actions/setup-cva6-env/action.yml @@ -0,0 +1,88 @@ +# Copyright 2026 OpenHW Group +# SPDX-License-Identifier: Apache-2.0 +# +# Composite Action: Setup CVA6 Simulation Environment +# Handles caching, optional tool installation, and environment setup for CVA6 CI jobs + +name: 'Setup CVA6 Environment' +description: 'Cache/restore tools and prepare the CVA6 simulation environment' + +inputs: + install-tools: + description: 'Run ci/setup.sh to install tools if cache miss' + required: false + default: 'true' + +outputs: + toolchain-cache-hit: + description: 'Whether RISC-V toolchain cache was hit' + value: ${{ steps.cache-toolchain.outputs.cache-hit }} + verilator-cache-hit: + description: 'Whether Verilator cache was hit' + value: ${{ steps.cache-verilator.outputs.cache-hit }} + spike-cache-hit: + description: 'Whether Spike cache was hit' + value: ${{ steps.cache-spike.outputs.cache-hit }} + +runs: + using: 'composite' + steps: + # Step 1: Get submodule hash for Spike cache key + - name: Get core-v-verif submodule hash + id: submodule-hash + shell: bash + run: | + cd verif/core-v-verif + echo "hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT + + # Step 2: Cache RISC-V Toolchain + - name: Cache RISC-V Toolchain + id: cache-toolchain + uses: actions/cache@v6 + with: + path: tools/riscv-toolchain/ + key: ${{ runner.os }}-toolchain-${{ hashFiles('ci/install-toolchain.sh') }} + # restore-keys: | + # ${{ runner.os }}-toolchain- + + # Step 3: Cache Verilator + - name: Cache Verilator + id: cache-verilator + uses: actions/cache@v6 + with: + path: tools/verilator/ + key: ${{ runner.os }}-verilator-${{ hashFiles('verif/regress/install-verilator.sh') }} + # restore-keys: | + # ${{ runner.os }}-verilator- + + # Step 4: Cache Spike + - name: Cache Spike + id: cache-spike + uses: actions/cache@v6 + with: + path: tools/spike/ + key: ${{ runner.os }}-spike-${{ hashFiles('verif/regress/install-spike.sh') }}-${{ steps.submodule-hash.outputs.hash }} + # restore-keys: | + # ${{ runner.os }}-spike-${{ hashFiles('verif/regress/install-spike.sh') }}- + # ${{ runner.os }}-spike- + + # Step 5: Install tools if cache miss and requested + - name: Setup tools (if cache miss) + if: | + inputs.install-tools == 'true' && ( + steps.cache-toolchain.outputs.cache-hit != 'true' || + steps.cache-verilator.outputs.cache-hit != 'true' || + steps.cache-spike.outputs.cache-hit != 'true' + ) + shell: bash + run: | + set -x + ci/setup.sh + + # Step 6: Setup environment variables + - name: Setup environment variables + shell: bash + run: | + echo "RISCV=$(pwd)/tools/riscv-toolchain" >> $GITHUB_ENV + echo "$(pwd)/tools/verilator/bin" >> $GITHUB_PATH + echo "$(pwd)/tools/spike/bin" >> $GITHUB_PATH diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000000..9d002ca173a --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,16 @@ +<!-- Contents within these symbols are commented out and will not appear in the PR description --> + +<!-- Thanks for your contribution! Before sending us a pull request, please make sure you have read CONTRIBUTING.md --> + +- [ ] I have searched for similar pull requests +- [ ] I am a human engaging in an interpersonal interaction. During this interaction, my words are my own and are not generated. If relevant, I provide links to my sources. + + +<!-- Please indicate why this PR is needed for the project --> + +<!-- Is this PR related to existing issues? If so, link to them below --> + +<!-- Are there limitations with the current state of this contribution? --> + +<!-- If the contribution is not ready to be merged yet, please make this PR a draft: https://docs.github.com/fr/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests --> + diff --git a/.github/scripts/dashboard_tiers/collect_data.py b/.github/scripts/dashboard_tiers/collect_data.py new file mode 100644 index 00000000000..e629ff08850 --- /dev/null +++ b/.github/scripts/dashboard_tiers/collect_data.py @@ -0,0 +1,253 @@ +#!/usr/bin/env python3 +# Copyright 2026 OpenHW Group +# SPDX-License-Identifier: Apache-2.0 +"""Collect CI run/job data from GitHub API for the CVA6 tier dashboard. + +Uses `gh api` (pre-installed on GHA runners, auto-authenticated). +Produces per-workflow JSON files with incremental updates. +""" + +import argparse +import json +import os +import subprocess +import sys +from datetime import datetime, timezone +from pathlib import Path + +from parser import parse_job_name + +# Workflows to track +WORKFLOWS = { + "ci": "ci.yml", + "tier1": "openhw-cva6-ci-tier1.yml", + "tier2": "openhw-cva6-ci-tier2.yml", +} + +MAX_HISTORY = 50 + + +def gh_api(endpoint: str, repo: str) -> dict: + """Call GitHub API via `gh api` and return parsed JSON.""" + url = f"/repos/{repo}/actions/{endpoint}" + result = subprocess.run( + ["gh", "api", url, "--paginate"], + capture_output=True, + text=True, + ) + if result.returncode != 0: + print(f"ERROR: gh api {url} failed: {result.stderr}", file=sys.stderr) + sys.exit(1) + return json.loads(result.stdout) + + +def gh_api_list(endpoint: str, repo: str, per_page: int = 100) -> dict: + """Call GitHub API with per_page parameter.""" + url = f"/repos/{repo}/actions/{endpoint}" + sep = "&" if "?" in url else "?" + result = subprocess.run( + ["gh", "api", f"{url}{sep}per_page={per_page}"], + capture_output=True, + text=True, + ) + if result.returncode != 0: + print(f"ERROR: gh api {url} failed: {result.stderr}", file=sys.stderr) + sys.exit(1) + return json.loads(result.stdout) + + +def fetch_runs(repo: str, workflow_file: str, count: int) -> list: + """Fetch the latest `count` completed workflow runs.""" + data = gh_api_list( + f"workflows/{workflow_file}/runs?status=completed&per_page={count}", + repo, + ) + runs = data.get("workflow_runs", []) + return runs[:count] + + +def fetch_jobs(repo: str, run_id: int) -> list: + """Fetch all jobs for a given workflow run.""" + data = gh_api(f"runs/{run_id}/jobs", repo) + return data.get("jobs", []) + + +def duration_seconds(started_at: str, completed_at: str) -> int: + """Calculate duration in seconds between two ISO timestamps.""" + if not started_at or not completed_at: + return 0 + try: + start = datetime.fromisoformat(started_at.replace("Z", "+00:00")) + end = datetime.fromisoformat(completed_at.replace("Z", "+00:00")) + return max(0, int((end - start).total_seconds())) + except (ValueError, TypeError): + return 0 + + +def process_run(repo: str, run: dict, workflow_name: str) -> dict: + """Process a single workflow run into our data format.""" + run_id = run["id"] + jobs_raw = fetch_jobs(repo, run_id) + + jobs = [] + total_jobs = 0 + passed_jobs = 0 + failed_jobs = 0 + + for job in jobs_raw: + parsed = parse_job_name(job["name"], workflow_name) + if parsed is None: + continue # Skip utility jobs + + total_jobs += 1 + conclusion = job.get("conclusion", "unknown") + if conclusion == "success": + passed_jobs += 1 + elif conclusion in ("failure", "timed_out"): + failed_jobs += 1 + + job_data = { + "name": job["name"], + "conclusion": conclusion, + "started_at": job.get("started_at", ""), + "completed_at": job.get("completed_at", ""), + "duration_seconds": duration_seconds( + job.get("started_at", ""), job.get("completed_at", "") + ), + "html_url": job.get("html_url", ""), + } + job_data.update(parsed) + jobs.append(job_data) + + # Calculate run-level duration + run_duration = duration_seconds( + run.get("run_started_at", run.get("created_at", "")), + run.get("updated_at", ""), + ) + + return { + "id": run_id, + "source": "github-actions", # Extensibility: "questa-aws", "gitlab-ci", etc. + "simulator": "verilator", # Extensibility: "questa", "vcs", etc. + "run_number": run.get("run_number", 0), + "status": run.get("status", ""), + "conclusion": run.get("conclusion", "unknown"), + "html_url": run.get("html_url", ""), + "head_branch": run.get("head_branch", ""), + "head_sha": run.get("head_sha", "")[:8], + "event": run.get("event", ""), + "created_at": run.get("created_at", ""), + "updated_at": run.get("updated_at", ""), + "run_started_at": run.get("run_started_at", run.get("created_at", "")), + "duration_seconds": run_duration, + "total_jobs": total_jobs, + "passed_jobs": passed_jobs, + "failed_jobs": failed_jobs, + "skipped_jobs": total_jobs - passed_jobs - failed_jobs, + "jobs": jobs, + } + + +def load_existing(path: Path) -> list: + """Load existing run data from JSON file.""" + if path.exists(): + try: + with open(path) as f: + return json.load(f) + except (json.JSONDecodeError, IOError): + print(f"WARNING: Could not read {path}, starting fresh", file=sys.stderr) + return [] + + +def merge_runs(existing: list, new_runs: list) -> list: + """Merge new runs into existing data, deduplicating by run_id.""" + existing_ids = {r["id"] for r in existing} + merged = list(existing) + + for run in new_runs: + if run["id"] not in existing_ids: + merged.append(run) + existing_ids.add(run["id"]) + + # Sort by created_at descending (newest first) + merged.sort(key=lambda r: r.get("created_at", ""), reverse=True) + + # Trim to MAX_HISTORY + return merged[:MAX_HISTORY] + + +def main(): + parser = argparse.ArgumentParser(description="Collect CVA6 tier CI data from GitHub API") + parser.add_argument( + "--repo", + default=os.environ.get("GITHUB_REPOSITORY", "openhwgroup/cva6"), + help="GitHub repository (owner/name)", + ) + parser.add_argument( + "--data-dir", + default="data", + help="Directory to store JSON data files", + ) + parser.add_argument( + "--fetch-count", + type=int, + default=10, + help="Number of recent runs to fetch per workflow", + ) + args = parser.parse_args() + + data_dir = Path(args.data_dir) + data_dir.mkdir(parents=True, exist_ok=True) + + for wf_name, wf_file in WORKFLOWS.items(): + print(f"\n{'='*60}") + print(f"Processing workflow: {wf_name} ({wf_file})") + print(f"{'='*60}") + + json_path = data_dir / f"runs_{wf_name}.json" + existing = load_existing(json_path) + existing_ids = {r["id"] for r in existing} + + print(f" Existing records: {len(existing)}") + + # Fetch latest runs + runs = fetch_runs(args.repo, wf_file, args.fetch_count) + print(f" Fetched {len(runs)} runs from API") + + # Only process new runs (incremental update) + new_runs = [] + for run in runs: + if run["id"] in existing_ids: + print(f" Skipping run #{run['run_number']} (id={run['id']}) - already exists") + continue + + print(f" Processing run #{run['run_number']} (id={run['id']})...") + processed = process_run(args.repo, run, wf_name) + new_runs.append(processed) + print( + f" -> {processed['total_jobs']} jobs: " + f"{processed['passed_jobs']} passed, " + f"{processed['failed_jobs']} failed" + ) + + # Merge and save + merged = merge_runs(existing, new_runs) + with open(json_path, "w") as f: + json.dump(merged, f, indent=2) + + print(f" Saved {len(merged)} records to {json_path}") + + # Write metadata + meta = { + "generated_at": datetime.now(timezone.utc).isoformat(), + "repo": args.repo, + "workflows": list(WORKFLOWS.keys()), + } + with open(data_dir / "metadata.json", "w") as f: + json.dump(meta, f, indent=2) + + print(f"\nDone! Data saved to {data_dir}/") + + +if __name__ == "__main__": + main() diff --git a/.github/scripts/dashboard_tiers/generate_dashboard.py b/.github/scripts/dashboard_tiers/generate_dashboard.py new file mode 100644 index 00000000000..abd77ca8638 --- /dev/null +++ b/.github/scripts/dashboard_tiers/generate_dashboard.py @@ -0,0 +1,330 @@ +#!/usr/bin/env python3 +# Copyright 2026 OpenHW Group +# SPDX-License-Identifier: Apache-2.0 +"""Generate CVA6 tier dashboard HTML from collected JSON data. + +Reads per-workflow JSON files and renders a Jinja2 template into +a self-contained static HTML file. +""" + +import argparse +import json +import os +import shutil +from datetime import datetime, timezone +from pathlib import Path + +from jinja2 import Environment, FileSystemLoader + +# Workflow display info (order matters for UI) +WORKFLOW_INFO = [ + {"key": "ci", "display_name": "ci.yml (Reference)", "file": "runs_ci.json"}, + {"key": "tier1", "display_name": "Tier 1", "file": "runs_tier1.json"}, + {"key": "tier2", "display_name": "Tier 2", "file": "runs_tier2.json"}, +] + +# Preferred display order for configs and test suites in the matrix. +# Any configs/suites not listed here but found in the data will be +# appended at the end automatically. +MATRIX_CONFIGS_ORDER = [ + "cv32a65x", + "cv32a60x", + "cv64a6_imafdc_sv39_hpdcache_wb", + "cv64a6_imafdc_sv39_hpdcache", + "cv64a6_imafdc_sv39_wb", + "cv64a6_imafdc_sv39", +] + +MATRIX_SUITES_ORDER = [ + "smoke-tests-cv32a65x", + "cv32a6_tests", + "cv64a6_imafdc_tests", + "dv-riscv-arch-test", + "dv-riscv-tests-p", + "dv-riscv-tests-v", + "dv-riscv-compliance", + "dv-riscv-csr-access-test", + "benchmark", +] + +TREND_COUNT = 20 + + +def is_valid_matrix_job(job: dict) -> bool: + """Return True if a job has usable config/testcase for matrix rendering.""" + config = job.get("config", "") + testcase = job.get("testcase", "") + if not config or not testcase: + return False + if "${{" in config or "${{" in testcase: + return False + return True + + +def format_duration(seconds: int) -> str: + """Format seconds into human-readable duration.""" + if seconds <= 0: + return "N/A" + minutes = seconds // 60 + secs = seconds % 60 + if minutes >= 60: + hours = minutes // 60 + mins = minutes % 60 + return f"{hours}h {mins}m" + return f"{minutes}m {secs}s" + + +def format_datetime(iso_str: str) -> str: + """Format ISO datetime to readable string.""" + if not iso_str: + return "N/A" + try: + dt = datetime.fromisoformat(iso_str.replace("Z", "+00:00")) + return dt.strftime("%Y-%m-%d %H:%M UTC") + except (ValueError, TypeError): + return iso_str + + +def load_workflow_data(data_dir: Path) -> dict: + """Load all workflow JSON data files.""" + result = {} + for wf in WORKFLOW_INFO: + path = data_dir / wf["file"] + if path.exists(): + with open(path) as f: + result[wf["key"]] = json.load(f) + else: + result[wf["key"]] = [] + return result + + +def build_matrix(all_data: dict) -> tuple: + """Build unified config x testsuite matrix from ALL workflows. + + Each cell is a dict keyed by workflow name, e.g.: + matrix["cv64a6_imafdc_sv39_hpdcache_wb"]["dv-riscv-arch-test"] = { + "ci": {"conclusion": "success", "html_url": "..."}, + "tier2": {"conclusion": "success", "html_url": "..."}, + } + + Returns: (matrix_data, configs_used, suites_used) + """ + # matrix[config][testcase][workflow_key] = {conclusion, html_url} + matrix = {} + all_configs = set() + all_suites = set() + + for wf in WORKFLOW_INFO: + key = wf["key"] + runs = all_data.get(key, []) + if not runs: + continue + + # Use the latest run that actually has usable matrix jobs. + # This avoids rendering placeholder jobs from early setup failures. + latest = next( + (run for run in runs if any(is_valid_matrix_job(job) for job in run.get("jobs", []))), + None, + ) + if latest is None: + continue + + for job in latest.get("jobs", []): + if not is_valid_matrix_job(job): + continue + config = job.get("config", "") + testcase = job.get("testcase", "") + + all_configs.add(config) + all_suites.add(testcase) + + if config not in matrix: + matrix[config] = {} + if testcase not in matrix[config]: + matrix[config][testcase] = {} + + matrix[config][testcase][key] = { + "conclusion": job.get("conclusion", "unknown"), + "html_url": job.get("html_url", ""), + } + + # Order: preferred order first, then any extras alphabetically + def ordered(items, preferred): + result = [c for c in preferred if c in items] + extras = sorted(items - set(preferred)) + return result + extras + + configs_used = ordered(all_configs, MATRIX_CONFIGS_ORDER) + suites_used = ordered(all_suites, MATRIX_SUITES_ORDER) + + return matrix, configs_used, suites_used + + +def build_chart_data(all_data: dict) -> dict: + """Build Chart.js data for trend charts.""" + chart_data = {} + + for wf in WORKFLOW_INFO: + key = wf["key"] + runs = all_data.get(key, []) + + # Take last TREND_COUNT runs, reversed for chronological order + trend_runs = list(reversed(runs[:TREND_COUNT])) + + labels = [] + pass_rates = [] + durations = [] + + for run in trend_runs: + labels.append(str(run.get("run_number", ""))) + total = run.get("total_jobs", 0) + passed = run.get("passed_jobs", 0) + rate = round(passed / total * 100, 1) if total > 0 else 0 + pass_rates.append(rate) + dur_min = round(run.get("duration_seconds", 0) / 60, 1) + durations.append(dur_min) + + chart_data[key] = { + "labels": labels, + "pass_rates": pass_rates, + "durations": durations, + } + + return chart_data + + +def enrich_run(run: dict) -> dict: + """Add display-friendly fields to a run dict.""" + run["duration_display"] = format_duration(run.get("duration_seconds", 0)) + run["created_at_display"] = format_datetime(run.get("created_at", "")) + for job in run.get("jobs", []): + job["duration_display"] = format_duration(job.get("duration_seconds", 0)) + return run + + +def build_workflows_context(all_data: dict) -> list: + """Build the workflows list for the template context.""" + workflows = [] + + for wf in WORKFLOW_INFO: + key = wf["key"] + runs = all_data.get(key, []) + + # Enrich all runs + for run in runs: + enrich_run(run) + + # Build latest run summary (or placeholder) + if runs: + latest = runs[0] + else: + latest = { + "conclusion": "unknown", + "head_branch": "N/A", + "head_sha": "N/A", + "passed_jobs": 0, + "failed_jobs": 0, + "skipped_jobs": 0, + "total_jobs": 0, + "duration_display": "N/A", + "run_number": 0, + "html_url": "#", + } + + workflows.append( + { + "key": key, + "display_name": wf["display_name"], + "latest": latest, + "runs": runs, + } + ) + + return workflows + + +def main(): + parser = argparse.ArgumentParser( + description="Generate CVA6 CI Dashboard HTML" + ) + parser.add_argument( + "--data-dir", + default="data", + help="Directory containing JSON data files", + ) + parser.add_argument( + "--output-dir", + default="site", + help="Output directory for generated HTML", + ) + parser.add_argument( + "--repo", + default=os.environ.get("GITHUB_REPOSITORY", "openhwgroup/cva6"), + help="GitHub repository (owner/name)", + ) + args = parser.parse_args() + + data_dir = Path(args.data_dir) + output_dir = Path(args.output_dir) + output_dir.mkdir(parents=True, exist_ok=True) + + # Load data + all_data = load_workflow_data(data_dir) + + # Build template context + now = datetime.now(timezone.utc) + workflows = build_workflows_context(all_data) + matrix_data, matrix_configs, matrix_suites = build_matrix(all_data) + chart_data = build_chart_data(all_data) + + default_matrix_wf = "tier2" + if not all_data.get("tier2"): + for wf in WORKFLOW_INFO: + if all_data.get(wf["key"]): + default_matrix_wf = wf["key"] + break + + context = { + "generated_at": now.strftime("%Y-%m-%d %H:%M UTC"), + "year": now.year, + "repo": args.repo, + "workflows": workflows, + "matrix_data": matrix_data, + "matrix_data_json": json.dumps(matrix_data), + "matrix_configs": matrix_configs, + "matrix_configs_json": json.dumps(matrix_configs), + "matrix_suites": matrix_suites, + "matrix_suites_json": json.dumps(matrix_suites), + "default_matrix_wf": default_matrix_wf, + "chart_data_json": json.dumps(chart_data), + "trend_count": TREND_COUNT, + } + + # Render template + template_dir = Path(__file__).parent / "templates" + env = Environment(loader=FileSystemLoader(str(template_dir)), autoescape=True) + template = env.get_template("index.html") + html = template.render(**context) + + # Write output + output_file = output_dir / "index.html" + with open(output_file, "w") as f: + f.write(html) + + # Copy static dashboard assets, such as the local OpenHW logo. + static_dir = Path(__file__).parent / "static" + if static_dir.exists(): + assets_dir = output_dir / "assets" + if assets_dir.exists(): + shutil.rmtree(assets_dir) + shutil.copytree(static_dir, assets_dir) + + print(f"Dashboard generated: {output_file}") + print(f" Workflows: {len(workflows)}") + for wf in workflows: + print(f" - {wf['display_name']}: {len(wf['runs'])} runs") + print(f" Matrix: {len(matrix_configs)} configs x {len(matrix_suites)} suites") + + +if __name__ == "__main__": + main() diff --git a/.github/scripts/dashboard_tiers/parser.py b/.github/scripts/dashboard_tiers/parser.py new file mode 100644 index 00000000000..bd702f72ee2 --- /dev/null +++ b/.github/scripts/dashboard_tiers/parser.py @@ -0,0 +1,146 @@ +#!/usr/bin/env python3 +# Copyright 2026 OpenHW Group +# SPDX-License-Identifier: Apache-2.0 +"""Parse CI job names into structured data for the CVA6 tier dashboard.""" + +import re +from typing import Optional + +# Utility/infrastructure jobs to skip (not actual test executions) +SKIP_JOBS = { + "Setup Tools", + "Test Summary", + "Resolve Tier", + "Prepare Matrix", + "build-riscv-tests", + "report-summary", + "setup-tools", + "resolve-tier", + "prepare-matrix", +} + +# All known CVA6 configs (longest first for greedy match) +KNOWN_CONFIGS = [ + "cv64a6_imafdc_sv39_hpdcache_wb", + "cv32a60x", + "cv32a65x", +] + + +def parse_job_name(job_name: str, workflow_name: str) -> Optional[dict]: + """Parse a CI job name into structured fields. + + Returns: + dict with keys: arch, config, testcase, simulator (optional) + None if the job should be skipped (utility/infrastructure job) + """ + name = job_name.strip() + + # Skip utility jobs + if name in SKIP_JOBS: + return None + + # --- tier workflows --- + m = re.match(r"^(RV(?:32|64))\s+Tier[12]\s+(.+?)\s+/\s+(.+)$", name) + if m: + arch = m.group(1).lower() + config = m.group(2).strip() + testcase = m.group(3).strip() + if "${{" in testcase or "${{" in config: + return None + return { + "arch": arch, + "config": config, + "testcase": testcase, + } + + # --- tier workflows and similar matrix-style workflows --- + # Format: "RV64 {testcase} ({config})" or "RV32 {testcase} ({config})" + m = re.match(r"^(RV(?:32|64))\s+(.+?)\s+\(([^)]+)\)$", name) + if m: + arch = m.group(1).lower() + testcase = m.group(2).strip() + config = m.group(3).strip() + # Skip unresolved matrix placeholders from early-failed/skipped runs + # (e.g. "RV64 ${{ matrix.testcase }} (${{ matrix.config }})") + if "${{" in testcase or "${{" in config: + return None + return { + "arch": arch, + "config": config, + "testcase": testcase, + } + + # --- ci.yml --- + # Format: "execute-riscv64-tests (config, simulator, testcase)" + # or "execute-riscv32-tests (testcase, config, simulator)" + m = re.match( + r"^execute-riscv(32|64)-tests\s+\(([^)]+)\)$", name + ) + if m: + arch = f"rv{m.group(1)}" + params = [p.strip() for p in m.group(2).split(",")] + + if arch == "rv64" and len(params) == 3: + # ci.yml rv64 matrix: (testcase, config, simulator) + # Actually from the workflow: matrix keys are testcase, config, simulator + # GitHub renders them in the order they appear in the matrix definition + # For execute-riscv64-tests: testcase, config, simulator + testcase, config, simulator = params + return { + "arch": arch, + "config": config, + "testcase": testcase, + "simulator": simulator, + } + elif arch == "rv32" and len(params) == 3: + # ci.yml rv32 matrix: (testcase, config, simulator) + testcase, config, simulator = params + return { + "arch": arch, + "config": config, + "testcase": testcase, + "simulator": simulator, + } + elif len(params) >= 2: + # Fallback for unexpected param count + return { + "arch": arch, + "config": params[1] if len(params) > 1 else "unknown", + "testcase": params[0], + } + + # Unrecognized job name - skip it + return None + + +def arch_from_config(config: str) -> str: + """Infer architecture from config name.""" + if config.startswith("cv64"): + return "rv64" + elif config.startswith("cv32"): + return "rv32" + return "unknown" + + +if __name__ == "__main__": + # Quick self-test + test_cases = [ + ("RV64 Tier2 cv64a6_imafdc_sv39_hpdcache_wb / dv-riscv-arch-test", "tier2"), + ("RV32 Tier1 cv32a65x / smoke-tests-cv32a65x", "tier1"), + ("RV64 Tier2 cv64a6_imafdc_sv39_hpdcache_wb / benchmark", "tier2"), + ( + "execute-riscv64-tests (cv64a6_imafdc_tests, cv64a6_imafdc_sv39_hpdcache, veri-testharness)", + "ci", + ), + ( + "execute-riscv32-tests (dv-riscv-arch-test, cv32a65x, veri-testharness)", + "ci", + ), + ("Setup Tools", "tier2"), + ("Test Summary", "tier1"), + ] + + for job_name, wf in test_cases: + result = parse_job_name(job_name, wf) + print(f" {job_name!r:80s} -> {result}") diff --git a/.github/scripts/dashboard_tiers/static/openhw-landscape.svg b/.github/scripts/dashboard_tiers/static/openhw-landscape.svg new file mode 100644 index 00000000000..baf06fb702d --- /dev/null +++ b/.github/scripts/dashboard_tiers/static/openhw-landscape.svg @@ -0,0 +1,1145 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:i="http://ns.adobe.com/AdobeIllustrator/10.0/" version="1.1" viewBox="0 0 446.6 104"> + <defs> + <style> + .cls-1 { + fill: #18a13b; + } + + .cls-2 { + fill: #747173; + } + + .cls-3 { + fill: none; + stroke: #747173; + stroke-miterlimit: 10; + } + + .cls-4 { + fill: #222e5b; + } + </style> + </defs> + <!-- Generator: Adobe Illustrator 28.7.0, SVG Export Plug-In . SVG Version: 1.2.0 Build 136) --> + <g> + <g id="Layer_1"> + <g> + <g> + <path class="cls-1" d="M37.2,35.5c.7.6,1.5,1.3,2.2,1.9v-1.9h-2.2Z"/> + <path class="cls-1" d="M39.6,5.9c-.1.1-.3.2-.4.3h.4v-.3Z"/> + <path class="cls-1" d="M39.6,13.2v-5.4h-2.1c-1.3,1.2-2.3,2.6-3.3,4.2v1.3h5.4Z"/> + <path class="cls-1" d="M32.6,15c-.6,1.6-1,3.3-1.2,5.1h1.2v-5.1Z"/> + <rect class="cls-1" x="34.1" y="21.6" width="5.4" height="5.4"/> + <path class="cls-1" d="M32.6,21.6h-1.2c0,1.9.3,3.7.7,5.4h.4v-5.4Z"/> + <path class="cls-1" d="M46.5,2.8c-1.9.4-3.7,1.2-5.4,2.1v1.3h5.4v-3.4Z"/> + <path class="cls-1" d="M39.6,34v-5.4h-5.4v2.9c.5.9,1.2,1.8,1.8,2.6h3.6Z"/> + <rect class="cls-1" x="48" y="14.6" width="5.4" height="5.4"/> + <rect class="cls-1" x="48" y="28.5" width="5.4" height="5.4"/> + <rect class="cls-1" x="41.1" y="7.7" width="5.4" height="5.4"/> + <rect class="cls-1" x="48" y="7.7" width="5.4" height="5.4"/> + <rect class="cls-1" x="48" y="21.6" width="5.4" height="5.4"/> + <rect class="cls-1" x="41.1" y="14.6" width="5.4" height="5.4"/> + <rect class="cls-1" x="41.1" y="21.6" width="5.4" height="5.4"/> + <rect class="cls-1" x="41.1" y="28.5" width="5.4" height="5.4"/> + <rect class="cls-1" x="34.1" y="14.6" width="5.4" height="5.4"/> + <rect class="cls-1" x="54.9" y="7.7" width="5.4" height="5.4"/> + <path class="cls-1" d="M60.4,4.9c-1.7-1-3.5-1.7-5.4-2.1v3.4h5.4v-1.3Z"/> + <path class="cls-1" d="M41.1,35.5v2.9c1.7,1,3.5,1.7,5.4,2.1v-5h-5.4Z"/> + <path class="cls-1" d="M61.7,35.5v1.9c.9-.5,1.6-1.2,2.2-1.9h-2.2Z"/> + <path class="cls-1" d="M61.7,28.5v5.4h3.6c.6-.7,1.3-1.7,1.8-2.6v-2.9h-5.4Z"/> + <path class="cls-1" d="M48,6.2h5.4v-3.6c-.9-.1-1.8-.2-2.8-.2s-1.8.1-2.8.2v3.6h.1Z"/> + <path class="cls-1" d="M70,21.6h-1.2v5.4h.4c.4-1.7.7-3.5.7-5.4h0Z"/> + <rect class="cls-1" x="54.9" y="28.5" width="5.4" height="5.4"/> + <rect class="cls-1" x="54.9" y="14.6" width="5.4" height="5.4"/> + <rect class="cls-1" x="54.9" y="21.6" width="5.4" height="5.4"/> + <path class="cls-1" d="M69.9,20.1c-.1-1.8-.5-3.5-1.2-5.1v5.1h1.2Z"/> + <path class="cls-1" d="M48,35.5v5.2c.9.1,1.6.2,2.5.2h.4c.9,0,1.7-.1,2.5-.2v-5.2h-5.3Z"/> + <rect class="cls-1" x="61.7" y="14.6" width="5.4" height="5.4"/> + <path class="cls-1" d="M54.9,35.5v5c1.9-.4,3.7-1.2,5.4-2.1v-2.9h-5.4Z"/> + <rect class="cls-1" x="61.7" y="21.6" width="5.4" height="5.4"/> + <path class="cls-1" d="M61.7,6.2h.4c-.1-.1-.3-.2-.4-.3v.3Z"/> + <path class="cls-1" d="M67.3,11.9c-.9-1.5-2-2.9-3.3-4.2h-2.1v5.4h5.4v-1.3Z"/> + </g> + <g> + <path class="cls-1" d="M20.2,34h4.1c-.9-1.7-1.5-3.5-1.9-5.4h-2.1v5.4Z"/> + <rect class="cls-1" x="20.2" y="56.3" width="5.4" height="5.4"/> + <rect class="cls-1" x="20.2" y="42.4" width="5.4" height="5.4"/> + <path class="cls-1" d="M25.7,36.5c-.2-.3-.4-.7-.6-1.1h-4.9v5.4h5.4v-4.4h.1Z"/> + <path class="cls-1" d="M20.2,27h1.8c-.3-1.7-.5-3.5-.5-5.4h-1.3v5.4Z"/> + <path class="cls-1" d="M22.8,13.2c.4-1.4,1-2.8,1.6-4.1-1.5.9-2.9,1.9-4.2,2.9v1.2h2.6Z"/> + <path class="cls-1" d="M20.2,20.1h1.4c.1-1.9.3-3.7.7-5.4h-2.2v5.4h.1Z"/> + <rect class="cls-1" x="20.2" y="49.3" width="5.4" height="5.4"/> + <rect class="cls-1" x="27.2" y="56.3" width="2.9" height="5.4"/> + <path class="cls-1" d="M1.6,42.4c0,.2-.1.5-.1.7h3.5v-.7H1.6Z"/> + <rect class="cls-1" x="27.2" y="49.3" width="2.9" height="5.4"/> + <polyline class="cls-1" points="29.8 42.4 27.2 42.4 27.2 47.8 30 47.8 30 43.1"/> + <path class="cls-1" d="M28.9,40.9c-.6-.6-1.2-1.4-1.7-2.1v2.1h1.7Z"/> + <rect class="cls-1" x="13.3" y="42.4" width="5.4" height="5.4"/> + <rect class="cls-1" x="6.4" y="35.5" width="5.4" height="5.4"/> + <path class="cls-1" d="M4.9,40.9v-5.4h-1.5c-.6,1.8-1.1,3.6-1.5,5.4h3Z"/> + <rect class="cls-1" x="6.4" y="28.5" width="5.4" height="5.4"/> + <path class="cls-1" d="M11.8,21.6h-1.1c-1.3,1.7-2.5,3.5-3.5,5.4h4.7v-5.4h-.1Z"/> + <path class="cls-1" d="M4.9,31.5c-.3.7-.6,1.6-1,2.5h1v-2.5Z"/> + <rect class="cls-1" x="6.4" y="42.4" width="5.4" height=".7"/> + <rect class="cls-1" x="13.3" y="56.3" width="5.4" height="5.4"/> + <rect class="cls-1" x="13.3" y="49.3" width="5.4" height="5.4"/> + <rect class="cls-1" x="13.3" y="21.6" width="5.4" height="5.4"/> + <path class="cls-1" d="M18.8,20.1v-5.4h-1.7c-1.3,1.2-2.6,2.5-3.7,3.8v1.6h5.4Z"/> + <rect class="cls-1" x="13.3" y="35.5" width="5.4" height="5.4"/> + <rect class="cls-1" x="13.3" y="28.5" width="5.4" height="5.4"/> + </g> + <g> + <polygon class="cls-1" points="88 63.2 84.3 63.2 85.5 68.6 88 68.6 88 63.2"/> + <rect class="cls-1" x="82.6" y="42.4" width="5.4" height="5.4"/> + <path class="cls-1" d="M82.6,20.1h5.4v-1.6c-1.2-1.3-2.5-2.6-3.7-3.8h-1.7v5.4Z"/> + <rect class="cls-1" x="82.6" y="28.5" width="5.4" height="5.4"/> + <rect class="cls-1" x="82.6" y="35.5" width="5.4" height="5.4"/> + <rect class="cls-1" x="82.6" y="21.6" width="5.4" height="5.4"/> + <path class="cls-1" d="M86,70.1l.9,3.4c.2.7.3,1.4.4,2h.7c0-.2.1-.4.1-.6v-4.8h-2.1Z"/> + <path class="cls-1" d="M87.8,77.1h-.3c.1,1,.1,1.6.1,1.6h.1c0-.1,0-.6.1-1.6Z"/> + <polygon class="cls-1" points="89.5 54.8 92.4 54.8 93.7 49.3 89.5 49.3 89.5 54.8"/> + <path class="cls-1" d="M96.4,43.1h3.5c0-.2-.1-.5-.1-.7h-3.3v.7h-.1Z"/> + <rect class="cls-1" x="89.5" y="35.5" width="5.4" height="5.4"/> + <rect class="cls-1" x="89.5" y="28.5" width="5.4" height="5.4"/> + <polygon class="cls-1" points="89.5 61.7 90.9 61.7 92.1 56.3 89.5 56.3 89.5 61.7"/> + <path class="cls-1" d="M89.5,27h4.7c-1.1-1.9-2.2-3.7-3.5-5.4h-1.1v5.4h-.1Z"/> + <polygon class="cls-1" points="80.6 47.8 81.2 47.8 81.2 42.4 75.6 42.4 75.6 43.1 79.5 43.1 80.6 47.8"/> + <polygon class="cls-1" points="88 61.7 88 56.3 82.6 56.3 83.9 61.7 88 61.7"/> + <polygon class="cls-1" points="81 49.3 81.2 50 81.2 49.3 81 49.3"/> + <path class="cls-1" d="M71,42.4c-.2.2-.4.5-.7.7h3.9v-.7h-3.2Z"/> + <polygon class="cls-1" points="89.5 63.2 89.5 67.9 90.6 63.2 89.5 63.2"/> + <path class="cls-1" d="M96.4,34h1c-.3-.9-.6-1.6-1-2.5v2.5Z"/> + <polygon class="cls-1" points="89.5 42.4 89.5 47.8 94 47.8 94.9 43.1 94.9 43.1 94.9 42.4 89.5 42.4"/> + <path class="cls-1" d="M96.4,35.5v5.4h3.1c-.4-1.8-1-3.6-1.5-5.4h-1.6Z"/> + <path class="cls-1" d="M81.2,12c-1.4-1.1-2.8-2-4.2-2.9.6,1.3,1.2,2.7,1.6,4.1h2.7v-1.2h-.1Z"/> + <path class="cls-1" d="M81.2,14.6h-2.2c.4,1.7.7,3.6.7,5.4h1.4v-5.4h.1Z"/> + <path class="cls-1" d="M81.2,21.6h-1.3c0,1.8-.2,3.6-.5,5.4h1.8v-5.4Z"/> + <path class="cls-1" d="M81.2,28.5h-2.1c-.4,1.9-1.1,3.7-1.9,5.4h4.1v-5.4Z"/> + <path class="cls-1" d="M81.2,40.9v-5.4h-4.9c-.2.3-.4.7-.6,1.1v4.4h5.5Z"/> + <rect class="cls-1" x="82.6" y="49.3" width="5.4" height="5.4"/> + <path class="cls-1" d="M74.2,38.8c-.5.7-1.2,1.5-1.7,2.1h1.7v-2.1Z"/> + </g> + <g> + <polygon class="cls-1" points="61.7 61.7 65.3 61.7 66.7 56.3 61.7 56.3 61.7 61.7"/> + <polygon class="cls-1" points="60.4 68.6 60.4 63.2 58.8 63.2 59.8 68.6 60.4 68.6"/> + <polygon class="cls-1" points="60.4 56.3 57.4 56.3 58.4 61.7 60.4 61.7 60.4 56.3"/> + <path class="cls-1" d="M68.7,44.4v3.4l1.1-4.3c-.3.3-.6.5-1.1.9Z"/> + <path class="cls-1" d="M67.3,45.5c-1.3.9-2.6,1.6-3.9,2.3h3.9v-2.3Z"/> + <polygon class="cls-1" points="61.7 68.6 63.6 68.6 64.9 63.2 61.7 63.2 61.7 68.6"/> + <path class="cls-1" d="M63.2,70.1h-1.5v5.4h.2c.1-.6.2-1.3.4-2l.9-3.4Z"/> + <polygon class="cls-1" points="61.7 49.3 61.7 54.8 67 54.8 67.3 53.8 67.3 49.3 61.7 49.3"/> + <polygon class="cls-1" points="60.1 70.1 60.4 70.9 60.4 70.1 60.1 70.1"/> + <path class="cls-1" d="M57.1,54.8h3.2v-5.4h-.6c-1.2.4-2.3.6-3.5,1l1,4.5Z"/> + </g> + <g> + <rect class="cls-4" x="13.3" y="77.1" width="5.4" height="5.4"/> + <path class="cls-4" d="M18.8,84h-5.4v1c1.4,1.6,2.9,3.1,4.6,4.5h1v-5.4h-.1Z"/> + <polygon class="cls-4" points="45.4 56.3 41.9 56.3 41.9 61.7 46.5 61.7 46.5 60.5 45.4 56.3"/> + <rect class="cls-4" x="20.2" y="77.1" width="5.4" height="5.4"/> + <rect class="cls-4" x="20.2" y="84" width="5.4" height="5.4"/> + <path class="cls-4" d="M20.2,90.9v.4c1.7,1.3,3.5,2.6,5.4,3.6v-4.2h-5.4Z"/> + <rect class="cls-4" x="20.2" y="72.7" width="5.4" height="2.9"/> + <path class="cls-4" d="M46.5,97.8h-5.4v3c1.8.3,3.6.6,5.4.7v-3.7Z"/> + <path class="cls-4" d="M39.6,97.8h-5.4v1.1c1.8.6,3.6,1.2,5.4,1.6v-2.7Z"/> + <path class="cls-4" d="M32.6,96.4v-4.6h-2.6v-.9h-2.9v4.9c.3.2.6.3,1,.5,0,0,4.5,0,4.5,0Z"/> + <rect class="cls-4" x="13.3" y="72.7" width="5.4" height="2.9"/> + <rect class="cls-4" x="41.9" y="63.2" width="4.6" height="5.4"/> + <rect class="cls-4" x="27.2" y="72.7" width="2.9" height="2.9"/> + <rect class="cls-4" x="41.9" y="84" width="4.6" height="5.4"/> + <path class="cls-4" d="M43.9,50c-.6-.2-1.4-.3-2-.5v5.3h3.2l-1.2-4.8Z"/> + <rect class="cls-4" x="41.9" y="77.1" width="4.6" height="5.4"/> + <rect class="cls-4" x="41.9" y="70.1" width="4.6" height="5.4"/> + <rect class="cls-4" x="27.2" y="77.1" width="2.9" height="5.4"/> + <polygon class="cls-4" points="46.5 96.4 46.5 90.9 41.9 90.9 41.9 91.7 41.1 91.7 41.1 96.4 46.5 96.4"/> + <rect class="cls-4" x="27.2" y="84" width="2.9" height="5.4"/> + <rect class="cls-4" x="34.1" y="91.7" width="5.4" height="4.6"/> + <path class="cls-4" d="M32.6,97.8h-1.3c.4.2.9.3,1.3.5v-.5Z"/> + <polygon class="cls-4" points="48 82.5 51.8 82.5 50.4 77.1 48 77.1 48 82.5"/> + <rect class="cls-4" x="48" y="90.9" width="5.4" height="5.4"/> + <polygon class="cls-4" points="48 89.4 53.4 89.4 53.4 89 52.1 84 48 84 48 89.4"/> + <polygon class="cls-4" points="48.4 68.6 48 66.6 48 68.6 48.4 68.6"/> + <path class="cls-4" d="M67.3,97.8h-5.4v2.6c1.8-.4,3.7-1,5.4-1.5v-1.1Z"/> + <path class="cls-4" d="M60.4,97.8h-5.4v3.7c1.8-.1,3.6-.4,5.4-.7v-3Z"/> + <path class="cls-4" d="M68.7,97.8v.4c.4-.1.7-.3,1.2-.4h-1.2Z"/> + <path class="cls-4" d="M53.4,97.8h-5.4v3.8c.9,0,1.8.1,2.8.1s1.8-.1,2.8-.1v-3.8h-.1Z"/> + <path class="cls-4" d="M81.2,90.9h-5.4v4.1c1.9-1.1,3.7-2.3,5.4-3.6v-.4Z"/> + <path class="cls-4" d="M68.7,90.9v5.4h4.4c.3-.2.7-.3,1.1-.5v-4.9h-5.4Z"/> + <polygon class="cls-4" points="75.9 68.6 75.6 67.5 75.6 68.6 75.9 68.6"/> + <polygon class="cls-4" points="81.2 89.3 79.8 84 75.6 84 75.6 89.4 81.2 89.4 81.2 89.3"/> + <polygon class="cls-4" points="48 75.6 50.1 75.6 48.8 70.1 48 70.1 48 75.6"/> + <polygon class="cls-4" points="75.6 82.5 79.5 82.5 78.1 77.1 75.6 77.1 75.6 82.5"/> + <polygon class="cls-4" points="74.2 77.1 71.1 77.1 69.8 82.5 74.2 82.5 74.2 77.1"/> + <polygon class="cls-4" points="75.6 70.1 75.6 75.6 77.6 75.6 76.4 70.1 75.6 70.1"/> + <polygon class="cls-4" points="74.2 84 69.3 84 68.7 86.5 68.7 89.4 74.2 89.4 74.2 84"/> + <rect class="cls-4" x="54.9" y="91.7" width="5.4" height="4.6"/> + <polygon class="cls-4" points="74.2 70.1 72.8 70.1 71.5 75.6 74.2 75.6 74.2 70.1"/> + <rect class="cls-4" x="61.7" y="91.7" width="5.4" height="4.6"/> + <path class="cls-4" d="M74.2,63.9c-.1,1-.3,2-.6,3.2l-.3,1.5h1v-4.7Z"/> + </g> + </g> + <g> + <path class="cls-4" d="M132,67.1c-2.3-.9-4.2-2-5.7-3.4-1.5-1.5-2.6-3.2-3.2-5.1s-1-4.1-1-6.3.3-4.4,1-6.3c.6-1.9,1.7-3.6,3.2-5.1,1.5-1.5,3.3-2.6,5.7-3.5,2.3-.9,5.1-1.3,8.4-1.3h12.2c3.3,0,6.1.4,8.4,1.3s4.2,2,5.7,3.5c1.5,1.5,2.6,3.2,3.2,5.1s1,4.1,1,6.3-.3,4.4-1,6.3c-.6,1.9-1.7,3.6-3.2,5.1-1.5,1.5-3.3,2.6-5.7,3.4-2.3.9-5.1,1.3-8.4,1.3h-12.2c-3.3,0-6.1-.4-8.4-1.3ZM157.7,60.5c1.4-.4,2.5-1.1,3.3-1.9s1.4-1.8,1.7-2.9.5-2.2.5-3.5-.1-2.5-.5-3.5c-.3-1.1-.9-2-1.7-2.9s-1.9-1.5-3.3-1.9c-1.4-.4-3.1-.7-5.2-.7h-12.1c-2.1,0-3.9.2-5.3.7-1.4.4-2.5,1.1-3.3,1.9s-1.4,1.8-1.7,2.9-.5,2.2-.5,3.5.1,2.5.5,3.5c.3,1.1.9,2,1.7,2.9s1.9,1.5,3.3,1.9c1.4.4,3.1.7,5.2.7h12.1c2.2,0,3.9-.2,5.3-.7Z"/> + <path class="cls-4" d="M207.6,36.5c2.1,0,4.1.3,5.5.9s2.8,1.3,3.7,2.2c1,1,1.6,2.1,2.1,3.4.4,1.3.6,2.7.6,4.1s-.2,2.9-.6,4.2c-.4,1.3-1.2,2.3-2.1,3.3-1,1-2.1,1.7-3.7,2.2-1.5.5-3.3.9-5.5.9h-23.4v10.3h-7v-31.5h30.4ZM184.2,50.5h23.2c1,0,1.8-.1,2.5-.3s1.1-.4,1.5-.7c.3-.3.5-.6.6-1.1s.2-.9.2-1.3-.1-.9-.2-1.3c-.1-.4-.3-.7-.6-1.1s-.9-.5-1.5-.7c-.6-.2-1.4-.3-2.5-.3h-23.2v6.8Z"/> + <path class="cls-4" d="M264.9,36.5v7.1h-33.5v5.3h29.4v6.5h-29.4v5.3h33.5v7.1h-40.5v-31.5h40.5Z"/> + <path class="cls-4" d="M278.6,68h-7v-31.5h6.7l29.6,22.2v-22.2h7v31.5h-6.7l-29.6-22.2v22.2Z"/> + <path class="cls-1" d="M330,55.8v12.2h-7v-31.5h7v12.2h29v-12.2h7v31.5h-7v-12.2h-29Z"/> + <path class="cls-1" d="M386.4,68l-16.1-31.5h8.5l10.2,21.6,10.5-21.6h5.2l10.5,21.6,10.2-21.6h8.5l-16,31.5h-5.2l-10.6-21.6-10.6,21.6h-5.2Z"/> + </g> + <g> + <path class="cls-2" d="M171.4,78.2h7.7c.4,0,.7.1,1.1.4s.4.6.4,1.1v2.7c0,.4-.1.7-.4,1.1-.3.3-.6.4-1.1.4h-6.7v3.5h-1.1v-9.2h.1ZM179.6,82.5v-2.8c0-.1,0-.2-.1-.3-.1-.1-.2-.1-.3-.1h-6.2c-.1,0-.2,0-.3.1s-.1.2-.1.3v2.7c0,.1,0,.2.1.3.1.1.2.1.3.1h6.2c.1,0,.2,0,.3-.1.1,0,.1-.1.1-.2Z"/> + <path class="cls-2" d="M192.9,79.7v2.7c0,.4-.1.7-.4,1.1-.3.3-.6.4-1.1.4h-1.4l2.9,3.4h-1.4l-2.9-3.4h-3.9v3.5h-1.1v-9.2h7.7c.4,0,.7.1,1.1.4.3.3.5.6.5,1.1ZM185.2,82.9h6.2c.1,0,.2,0,.3-.1s.1-.2.1-.3v-2.8c0-.1,0-.2-.1-.3-.1-.1-.2-.1-.3-.1h-6.2c-.1,0-.2,0-.3.1s-.1.2-.1.3v2.7c0,.1,0,.2.1.3,0,.2.1.2.3.2Z"/> + <path class="cls-2" d="M197.8,78.2h6.2c.4,0,.7.1,1.1.4s.4.6.4,1.1v6.2c0,.4-.1.7-.4,1.1-.3.3-.6.4-1.1.4h-6.2c-.4,0-.7-.1-1.1-.4s-.4-.6-.4-1.1v-6.2c0-.4.1-.7.4-1.1.2-.3.6-.4,1.1-.4ZM197.8,86.5h6.2c.1,0,.2,0,.3-.1s.1-.2.1-.3v-6.3c0-.1,0-.2-.1-.3-.1-.1-.2-.1-.3-.1h-6.2c-.1,0-.2,0-.3.1s-.1.2-.1.3v6.2c0,.1,0,.2.1.3,0,.1.2.2.3.2Z"/> + <path class="cls-2" d="M214.5,86.5l4.7-8.2h1.2l-5.3,9.2h-1.2l-5.3-9.2h1.2l4.8,8.2Z"/> + <path class="cls-2" d="M232.2,78.2v1.1h-7.4v3.1h6v1.1h-6v3.1h7.4v1.1h-8.4v-9.2h8.4v-.2Z"/> + <path class="cls-2" d="M243.9,86.2v-8h1.1v9.2h-1.4l-6.7-8v8h-1.1v-9.2h1.4l6.7,8Z"/> + <path class="cls-2" d="M253.9,78.2h7.7c.4,0,.7.1,1.1.4s.4.6.4,1.1v2.7c0,.4-.1.7-.4,1.1-.3.3-.6.4-1.1.4h-6.7v3.5h-1.1v-9.2h.1ZM262,82.5v-2.8c0-.1,0-.2-.1-.3-.1-.1-.2-.1-.3-.1h-6.2c-.1,0-.2,0-.3.1s-.1.2-.1.3v2.7c0,.1,0,.2.1.3.1.1.2.1.3.1h6.2c.1,0,.2,0,.3-.1.1,0,.1-.1.1-.2Z"/> + <path class="cls-2" d="M275.2,79.7v2.7c0,.4-.1.7-.4,1.1s-.6.4-1.1.4h-1.4l2.9,3.4h-1.4l-2.9-3.4h-3.9v3.5h-1.1v-9.2h7.7c.4,0,.7.1,1.1.4.4.3.5.6.5,1.1ZM267.6,82.9h6.2c.1,0,.2,0,.3-.1.1-.1.1-.2.1-.3v-2.8c0-.1,0-.2-.1-.3-.1-.1-.2-.1-.3-.1h-6.2c-.1,0-.2,0-.3.1-.1.1-.1.2-.1.3v2.7c0,.1,0,.2.1.3.1.2.2.2.3.2Z"/> + <path class="cls-2" d="M280.2,78.2h6.2c.4,0,.7.1,1.1.4s.4.6.4,1.1v6.2c0,.4-.1.7-.4,1.1s-.6.4-1.1.4h-6.2c-.4,0-.7-.1-1.1-.4s-.4-.6-.4-1.1v-6.2c0-.4.1-.7.4-1.1s.6-.4,1.1-.4ZM280.2,86.5h6.2c.1,0,.2,0,.3-.1.1-.1.1-.2.1-.3v-6.3c0-.1,0-.2-.1-.3-.1-.1-.2-.1-.3-.1h-6.2c-.1,0-.2,0-.3.1-.1.1-.1.2-.1.3v6.2c0,.1,0,.2.1.3.1.1.2.2.3.2Z"/> + <path class="cls-2" d="M300.5,79.3h-7.7c-.1,0-.2,0-.3.1-.1.1-.1.2-.1.3v6.2c0,.1,0,.2.1.3.1.1.2.1.3.1h7.7v1.1h-7.7c-.4,0-.7-.1-1.1-.4s-.4-.6-.4-1.1v-6.2c0-.4.1-.7.4-1.1s.6-.4,1.1-.4h7.7v1.1Z"/> + <path class="cls-2" d="M312.4,78.2v1.1h-7.4v3.1h6v1.1h-6v3.1h7.4v1.1h-8.4v-9.2h8.4v-.2Z"/> + <path class="cls-2" d="M324.9,79.7v.3h-1.1v-.3c0-.1,0-.2-.1-.3-.1-.1-.2-.1-.3-.1h-6.2c-.1,0-.2,0-.3.1-.1.1-.1.2-.1.3v2.1c0,.1,0,.2.1.3.1.1.2.1.3.1h6.2c.4,0,.7.1,1.1.4s.4.6.4,1.1v2c0,.4-.1.7-.4,1.1s-.6.4-1.1.4h-6.2c-.4,0-.7-.1-1.1-.4s-.4-.6-.4-1.1v-.3h1.1v.3c0,.1,0,.2.1.3.1.1.2.1.3.1h6.2c.1,0,.2,0,.3-.1.1-.1.1-.2.1-.3v-2c0-.1,0-.2-.1-.3-.1-.1-.2-.1-.3-.1h-6.2c-.4,0-.7-.1-1.1-.4s-.4-.6-.4-1.1v-2.1c0-.4.1-.7.4-1.1s.6-.4,1.1-.4h6.2c.4,0,.7.1,1.1.4s.4.6.4,1.1Z"/> + <path class="cls-2" d="M337.4,79.7v.3h-1.1v-.3c0-.1,0-.2-.1-.3-.1-.1-.2-.1-.3-.1h-6.2c-.1,0-.2,0-.3.1-.1.1-.1.2-.1.3v2.1c0,.1,0,.2.1.3.1.1.2.1.3.1h6.2c.4,0,.7.1,1.1.4s.4.6.4,1.1v2c0,.4-.1.7-.4,1.1s-.6.4-1.1.4h-6.2c-.4,0-.7-.1-1.1-.4s-.4-.6-.4-1.1v-.3h1.1v.3c0,.1,0,.2.1.3.1.1.2.1.3.1h6.2c.1,0,.2,0,.3-.1.1-.1.1-.2.1-.3v-2c0-.1,0-.2-.1-.3-.1-.1-.2-.1-.3-.1h-6.2c-.4,0-.7-.1-1.1-.4s-.4-.6-.4-1.1v-2.1c0-.4.1-.7.4-1.1s.6-.4,1.1-.4h6.2c.4,0,.7.1,1.1.4.3.3.4.6.4,1.1Z"/> + <path class="cls-2" d="M342.4,78.2h6.2c.4,0,.7.1,1.1.4s.4.6.4,1.1v6.2c0,.4-.1.7-.4,1.1s-.6.4-1.1.4h-6.2c-.4,0-.7-.1-1.1-.4s-.4-.6-.4-1.1v-6.2c0-.4.1-.7.4-1.1.3-.3.6-.4,1.1-.4ZM342.4,86.5h6.2c.1,0,.2,0,.3-.1.1-.1.1-.2.1-.3v-6.3c0-.1,0-.2-.1-.3-.1-.1-.2-.1-.3-.1h-6.2c-.1,0-.2,0-.3.1-.1.1-.1.2-.1.3v6.2c0,.1,0,.2.1.3.1.1.2.2.3.2Z"/> + <path class="cls-2" d="M362.7,79.7v2.7c0,.4-.1.7-.4,1.1s-.6.4-1.1.4h-1.4l2.9,3.4h-1.4l-2.9-3.4h-3.9v3.5h-1.1v-9.2h7.7c.4,0,.7.1,1.1.4.4.3.5.6.5,1.1ZM355.1,82.9h6.2c.1,0,.2,0,.3-.1.1-.1.1-.2.1-.3v-2.8c0-.1,0-.2-.1-.3-.1-.1-.2-.1-.3-.1h-6.2c-.1,0-.2,0-.3.1-.1.1-.1.2-.1.3v2.7c0,.1,0,.2.1.3.1.2.2.2.3.2Z"/> + <path class="cls-2" d="M371.7,87.4v-9.2h1.1v9.2h-1.1Z"/> + <path class="cls-2" d="M376.5,78.2h7.7c.4,0,.7.1,1.1.4s.4.6.4,1.1v2.7c0,.4-.1.7-.4,1.1s-.6.4-1.1.4h-6.7v3.5h-1.1v-9.2h.1ZM384.7,82.5v-2.8c0-.1,0-.2-.1-.3-.1-.1-.2-.1-.3-.1h-6.2c-.1,0-.2,0-.3.1-.1.1-.1.2-.1.3v2.7c0,.1,0,.2.1.3.1.1.2.1.3.1h6.2c.1,0,.2,0,.3-.1.1,0,.1-.1.1-.2Z"/> + </g> + <line class="cls-3" x1="122.1" y1="83.5" x2="164.4" y2="83.5"/> + <line class="cls-3" x1="391.9" y1="83.5" x2="434.1" y2="83.5"/> + <g> + <path class="cls-4" d="M344.1,23.2l-.2-.2h-.1c-.2-.2-.3-.3-.4-.4-.6-.4-1.3-.7-2-.7h-4.4c-.7,0-1.3.2-1.9.6-.1,0-.3.2-.4.3-.2.2-.3.3-.4.4-.5.7-.8,1.4-.8,2.2v1.2c0,.7.2,1.3.6,1.9,0,.1.2.3.4.5.2.2.4.3.5.4.6.5,1.4.7,2.1.7h4.4c.6,0,1.1-.1,1.6-.4.2-.1.4-.3.6-.4.1,0,.3-.2.4-.4.6-.7.9-1.5.9-2.3v-1.2c0-.7-.2-1.4-.6-2,0,0-.1-.2-.2-.3ZM335.5,26.7v-1.1c0-.2,0-.4.1-.6,0-.1,0-.2.2-.4.3-.4.8-.6,1.3-.6h4.3c.3,0,.5,0,.8.2.3.2.5.5.7.8,0,.1,0,.3,0,.6v1c0,.3,0,.5-.1.7,0,.1-.1.2-.2.4-.3.4-.7.6-1.3.6h-4.3c-.4,0-.8-.2-1.1-.5-.2-.2-.2-.3-.2-.3-.1-.2-.2-.5-.2-.8Z"/> + <path class="cls-4" d="M357.4,22h-2.1s0,5.5,0,5.5c0,.2,0,.4-.1.5-.1.2-.3.3-.5.3h-5.7c-.3,0-.5-.1-.6-.4,0,0,0-.2,0-.3v-5.6h-2.1v5.3s0,.4,0,.4c0,.9.3,1.5.7,1.8.2.2.4.3.5.4.1,0,.3.1.6.2.2,0,.6.1.7.1.1,0,.4,0,.7,0h4.8c.3,0,.6,0,1,0,.4,0,.6-.1.8-.2.2,0,.4-.2.5-.2.2-.1.4-.3.5-.5,0-.1.1-.3.2-.4.1-.3.2-.6.2-1.1v-.2c0,0,0-.1,0-.2,0-.2,0-2.6,0-2.6v-2.7Z"/> + <path class="cls-4" d="M368.3,27.9l-1.2-1c-.5-.5-2.3-2-2.3-2-.9-.8-1.6-1.4-2.3-2-.6-.5-.9-.8-1.1-.9h-2v8.4h2v-6l1.2,1,2.3,2c.9.8,1.6,1.4,2.3,2l.6.5c.2.2.3.2.3.3h.1c0,0,0,0,0,0h2.1v-8.3h-2s0,5.9,0,5.9Z"/> + <path class="cls-4" d="M383,24.3c0,0,0-.1,0-.2-.1-.2-.2-.4-.4-.6,0-.1-.2-.3-.4-.5-.2-.2-.3-.3-.4-.4-.6-.5-1.3-.7-2.1-.7h-7.4s0,8.3,0,8.3h.8s6.6,0,6.6,0c.6,0,1.2-.1,1.7-.4h.1c.1-.1.2-.2.3-.3.1,0,.3-.2.4-.4.2-.2.3-.4.4-.5.2-.3.4-.7.5-1.1,0-.3.1-.6.1-1v-1.1c0-.4,0-.7-.1-1,0,0,0-.3,0-.3ZM380.7,27.9c-.3.3-.6.4-1,.4h-5.3v-4.3h5.2c.2,0,.4,0,.6.1,0,0,.2,0,.3.2,0,0,.2.2.3.3.2.3.3.6.3.9v1.3c0,.3,0,.6-.3.8,0,0,0,.1-.2.3Z"/> + <polygon class="cls-4" points="393.7 24 398 24 398 30.3 400.1 30.3 400.1 24 404.7 24 404.7 22 393.7 22 393.7 24"/> + <polygon class="cls-4" points="406.2 30.3 408.6 30.3 408.6 22 406.2 22 406.2 30.3"/> + <path class="cls-4" d="M420.6,23.2v-.2c-.1,0-.2,0-.2,0-.2-.1-.3-.2-.4-.3-.6-.4-1.3-.7-2-.7h-4.4c-.7,0-1.3.2-1.9.6-.1,0-.3.2-.4.3-.2.2-.3.3-.4.4-.5.7-.8,1.4-.8,2.2v1.2c0,.7.2,1.3.6,1.9,0,0,.1.2.4.5.2.2.4.3.5.4.6.5,1.4.7,2.1.7h4.4c.6,0,1.1-.1,1.6-.4.2-.1.4-.3.6-.4.1,0,.3-.2.4-.4.6-.7.9-1.5.9-2.3v-1.2c0-.7-.2-1.4-.6-2,0,0-.2-.2-.3-.3ZM412.1,26.7v-1.1c0-.2,0-.4.1-.6,0-.1.1-.2.2-.4.3-.4.8-.6,1.3-.6h4.3c.3,0,.5,0,.8.2.3.2.5.5.7.8,0,.1,0,.3,0,.6v1c0,.3,0,.5-.1.7,0,.1-.1.2-.2.4-.3.4-.7.6-1.3.6h-4.3c-.4,0-.8-.2-1.1-.5-.2-.2-.2-.3-.2-.3-.1-.2-.2-.5-.2-.8Z"/> + <path class="cls-4" d="M431.9,22v6l-1.2-1-2.3-2c-.9-.8-1.6-1.4-2.3-2-.7-.6-.9-.8-1.1-.9h-2.1v8.3h2.1s0-6,0-6l1.2,1c.6.5,1.2,1,1.9,1.7l.4.4c.9.8,1.6,1.4,2.3,2,.8.6,1,.8,1.1.9h2v-8.3h-2Z"/> + <path class="cls-4" d="M393.8,26.6l-1.2-2.1-1.4-2.5h-3.1l-2.7,4.8-2,3.5h2.4l.8-1.4h0c0,0,0-.1,0-.1h6l.9,1.6h2.4l-1.9-3.4-.2-.3ZM389.7,23.6c0,0,.6,1,1.6,2.8l.4.8h-4.2l2.1-3.7v.2Z"/> + <polygon class="cls-4" points="332.7 24 332.7 22 322.9 22 322.9 30.3 325 30.3 325 27.1 330.4 27.1 330.4 25.1 325 25.1 325 24 332.7 24"/> + </g> + <g> + <path class="cls-4" d="M436.2,36.5h4.4v.8h-1.8v3.6h-.8v-3.6h-1.8v-.8Z"/> + <path class="cls-4" d="M443.5,38.3l1.6-1.9h.9v4.4h-.8v-3.2l-1.7,2-1.7-2v3.2h-.8v-4.4h.9l1.6,1.9Z"/> + </g> + </g> + </g> + <metadata> + <i:aipgfRef id="adobe_illustrator_pgf"/> + <i:aipgf id="adobe_illustrator_pgf" i:pgfEncoding="zstd/base64" i:pgfVersion="24"> +<![CDATA[ +KLUv/QBYtE4DCow/tCqQRGSWDwCAjdmRLXLQU5zSG5zBpbH+fzhoMpUyVV0OPe5GJAIACAAAAAKp +ClkLdQt/A1vuGkX9+61V8MWG6/czQeXvctljZf9LZk7Q1ovJ7vaj5hMse75McdB6wah/MeCy+0Xf +LwKQnjPZV70vlfxasvUHgO83/hvOxUb8mrIAjZrLM6z6dSbgx3RrPmU0HJ9uGa7p+geY6dS3eA52 +khzwK/b9bRv9sem965kWwH73CV657GHXcCvPp88R8FHyRCXDKxuW34/Zy6yDIEmO5f3eHNiGP635 +vucUFP0IhmUcfzX1LWMHy6w0eSiaJD13TNL+rLm+bQH/zr4Mx/dr5vXNieNXO0FZXKaS4frmfJmi +e9wjPbdSwV8izwCA61niOXH8VfA1q3H81f7tVOpOfUvqW3ppluKd+pbuR1/Pc9ySpRimvuUkv7cN +ryoZDuDDn/IWvR6GZTZ6s5fyvwWwYvceL8XUt6hk9J/eVgxPL03ARZccSQ+m90oFb/inB3Q2d+pb +7hO8/tj0dn7rxcTvabbY66T+tzw5zev9SuLP4bLHW9fod8Oyx37h+M3gW36z+qeysf/4PXFIKLh2 +SRt2y/Cc6TN8v/GrBdtZ/emXzswfm7J/v/Fsw6rsfs2s0yyzUD0TQVEc5f9r1Ss2/TrzWT3H8ylD +1e9suuu39KEX7QwF16pswEn+9Uvb8lvfmTlB63/b7yab7xeaTVAue3gwjfJkHc+nkGW/rXumbRuO +X45CvTSXxe/ffNkIDrjhGDa9N4xis1vA72Q/QP3tX2ey3icol8XznH5ZJ20YI1N8AMATlMtuefJl +A+pXnuH7BDuyj7Rh7/2uJkpmSaEP/W3DljSDnTIYAEJkaYZiSIak6fHMl1wcy06KHRTNDopm76No +9rEcS9LjmRiKJCmKpO+d7N30OGbK/Pv+8ZtByewjS/31y7DHh6FCWc86tgllHENl/MAgu2S8ZwFk +PUvIeEbJODYglHEMDWUdDLnHs7F7E+SlycWQ9CP3eFaS3ONZH0EPerIMybDzMPSkWHrRj+E4lqUp +gubo8azkpDmOIti5GZYj6XFsk3HsDRFk/Md0C+Z8GCP7rRfzZYqDO369qb8acJgjkwOY5cqH2T8e +cHPuGjW55z30Gc86hyk4DCWzXqb4VqfX3Mk+Rf1RNUFWf9Urv5cMJbNritlp55idkjaMk5K2jPOe +cTEbs575bCR7D00vgr4sRV6SfDQ7N0PRk2DvHs9Gb5bh6LkZiqbvpcez7kcO+i6CpQiafvR4Jpoi +aYqdg14syXD0eEZyk3dSLEdRBEPS45gBVqekLQuxE0u72rESNEGMj1hZYjxdO9vbzn333oM+9KIf +PelLb3rUp171q2d96znYQQ+CYAiK4AiSYAmaIIaCKaiCK8iCLcjDHvoQDMNQDMeQDMvQDNEwDdVw +DdmwDbnYRS+CYiiKoiiOIimWoimiYiqq4iqyYivyEeujH8ExHMVxHMmxHM0RHdNRHdeRHduRk530 +JEiGpEiOJEmWpEmiZEqq5EqyZEvyspe+BMuwFMuxJMuyxMwSLdNSLdeSLduSm930JmiGpmiOJmmW +pmmiZmqq5mqyZmtytKMeBdEQFdERJdESNVEUTVEVXVEWbVGeYj31KZiGqZiOKZmWqZmiaZqq6Zqy +aZtytateBdVQFdVRHVVSLVVTRdVUVdVVZdVW5Wtf/Qqu4Squ40quWLmaK7qmq7quK7u2K2c761mQ +DVmRHVmSLVmTRdmUVdmVZdmW5W1vfQu2YSu2Y0u2ZWu2aJu2aru2bNu2rcqqq6qqqFqqpCqqoNrV +Nl3TdEzD1Kc8ZVEVRVFTREG0oxzFWFM1UdEEzW625VqqJVqW5ViGLUqWJOlJTrZmOIKoaIYiGIYY +2Haxh9jKVc5RsyT5yEcxBH3nWOetyU0sXck1JdGSxEoSHD2GchEVQywMwXDEOimiYdtNrPeyl7xs +yZYl19Gz4zqqYxrysV1FLBVR0RRNsRxFUQxFsAzJcMRKkARBsPWtZ33pR4x77tvO9nHlK8pRkov+ +xNh0TdVUTdMUTc3UTMuUTMdUTMU0TMEUTH3aU57ytEVZlEVXdEVVVEVTFEUxFDXREi1REh3RERXR +EAVREPWoRzvKUY62Jmuy5mqupmqmZmqipmmapUmapDmaoimaoRmaoAma3sS6yU1utmVbsiVbrqVa +qmVaoiVammVZliVZkuVYjqVYhiVYgqUvfdlLXvKyJVlyJVVSJVMSJU3SJEuSJDGSHEmRDEmQBElP +dpKT7diO7KiO6YiO6GiO5UiO4yiO4hiO4OjHPvaRj63Iiqy4iqqoiqloiqVIiqQoilgohiIoerGL +XGzDNmTDNVTDNERDMzRDMhxDMQxDMPRhD3nIwxZkwRVUwRREQRMsQRIcQREMQQ92kIOtx1i/etWn +HvWmLz3pRR960HvfPfdrV3va0W72spNd7GEHu++9895ylqs85SYv+chFHnKQYwKYAYZKM5/xDFOo +MtRvvbLs4TLHLX8Y9daunGa90RA5meLT74qToeTXTLdm9d/wi5PVHyXDqdX9ZkL3l984c8vwa6lf ++Y1/ANhio+Qfp9kqAHyfPm3X/wSv6LdWwXH8qneN3jW6ut+MTGCbYMvqdL8BcLJ6vmEUm8mZr0Kx +WTzPnXieO9nKftVpVv/7fk+tf9sDOD8+wXf9Zlo2HM+m1gAOlylUMnx6607GZYr79BNMBBnqAwCu +5/v0P/Qc/wAy26rn1F8VNPx6XKbIfv3GLYfNKXlCv+balWHVK86QSgymkuFbhuuMPGNI9Ov+HNUc +z3Vm2zD7ln+rNasomd02jHPxOL+oJC//+37j1oe9FPtImqY3uTd756VXZp5EwbXrw4zk3iHDKrgm ++Ko3s5EBfPgjoj4JJbMB/PuV63/HKInspJiNZc96J3sWel/20fSe9B4Y+jLr4WiOpAfL0HtlB8uM +Z6JJljzsYBiCo2l6PQNBERxB0Ju8HL1Q9FlIdpGHpmiCpCh63Wxkjg9/5o78aQIS7xN0w8Is9I5b +RQpASsGkW/63PKskGVb9lER2u/4DXkvrhSnvVzzbf3N/Vf12+hu3d42SxPij5os5QTesZ44fvyfO +V9WvhRT6zGHfsOypf/zacB6GnLtGvzxjMkcAHw7wfRdLcgxJz7lXhmBWimQXOcg556BnkmImkmXY +PSh60jQ90vtG5kNfhuZomqY5eqHYGzEseqWYiZ73/t9vTLd+pxTNkIdhyU3T671nYxdB3kfOOR+9 +MQyzXnZy5F40wzHs3CsznjlsVv226LlWHMgzDKv+xoDjmSN1N9uG8cxhq2T4vj/nq97WhERO0A3L +HF/12h4SOEE3bAR75qi/qfXCoGL4lZJ8n6A9u99WPbc/hluSOEE3jHV64zQLYI7jL8reW/6q95LJ +7wA1c9j1HM+qbf/TXGdu+bdep3ndNowkSTHko0jyPnom79nIRRMUSZCL3vTEMMzE0RRNECxFX5Le +4z3rJthLE/SjOI6hZ/8NLNk2jPeejWGY8Z71zCFgTlUyjJJfc7ptGFiCY88cHwCwbb8B5FfdNuyC +ZmV38J6JvGHyRui5zxz/fld5hhUpFO19+j3ZKPmNGyAJhs0QcJnjxzfc2TZMwWUK+V1VsreG3wuX +Oeq5Jb3SZw55hu36f0jlBN02jHuhzxQbrp7vt77tVxxPssxRz/f7a3XbsIx7YOObZhTa4GS0LQci +BN/aHAwjhpst9wMiRey2Dq5TUoKbvzLYBgQCxUkx5YETok4kSkdwMKm2J7QFu0AUGsS0x6BReYHO +K71qtoAuusI0AH+Gi0DKAnqIgkBdv0IDH0/I5eUzHb4QSsoWRTy7BGg4t243MgMJX6hJsSueB9MC +eqDNytDUzcrQWtbZaV7CirFhItbZaYfb9xeEREGPK6Od1+jUVxtC8gkRhM1ngURO/WwdFL6mXxto +MFphtHFgGehG+UILKOgTcdkwQnoEfkqbEUnYioJAQZc9RFI2LoyEzbCsQiECmSkzoo/B3jADkF2Y +naT8yP1V0yKKZ9w1B2EMFJVde5qAiXTgmwQ8QG1LTHsMihTjESam5LLpreuDJmDhGJAm2ZQgCL7x +bkaT6n42BEL9al+CHykS2kOYOEQE0i03ps9BfSBzNnOYcsuGLRy+EBZ0LobiD2pRyvAAgW6ZSGQc +rcRBLXcEiiNYM4L/3G2poPjTqPbYDwSJAeLdcsMcioPX0F6AeMo3XVB2MZogtA1DWDgm+bSFztBT +NvGhObtttD+PtXIhsFQPIFA8EmIRXNwAgYBLQ+LthpmkkcQjoxCiy7Q0qf+wNN59wAk41sFCYA0l +qAgwClAxkJCyYBQdggMejjhMe8ATQDdKIg041hFowxYmCMg1crnRCEJLIISPAmIp2BvW8AgUj4AE +1A8nEAHpD6+4d+GFNFQfTjGI3c/1OAo9lfCAO8/cLZ8SZVJxXgZLwVY/ScI3rAwlPlz1XJqHiwYp +RTLCbNgjRWCyPCAkjml+ODfjoyqjRqVgb5htoEwqBouK/R0crjCoSZ3DSRuGqiRWJIHwrkq4Xlz4 +Z8NUsXYZNQYWabsknUeguCg5ICBrWVKwFyJrYOGRghCysXBIQcsasf3DsnBKlv15h9TLkWuIzm7D +RClpEZHcT6DcFdWuy1GisK7dT3BBGEbLbHA5n4+1PWwOJtVyBFFY1xCxFDdQp+UEvrU5kKq2YBOM +acsLRGFdbxhZ8HIZDCNCE4DwltMkAsUnmjtU6J62YDdcAwzLNyKK4z7wCYIWJX/CpnYIzTAiVnTR +N2wkvZ+/tpKENyodAmp8A127eQh0G7ZavMAcIlD8wADCKbZeenGc8OMXgtOjCynCurYtFdVxAGMX +InaoxEq0P29hshii2dFxmbiVaUxO4IbZJvfsXqUF9F6eiidQqJqoURAoPiAQaT3zVwiAW+eRTeiG +PRYkVKdFQr9WqiGYGHCn5xEoznGaCKghfR6B4nYB9fiGpX6grtVPSjevS7Q/z4HQGf3gR01kgQCj +oEyvLI5pIyv0jsyXj8D1PhH7IOzAL7XgoAYX+8A/NkxzGS3eDjeLhtqxJnTRFaDpxNhz2nVQHH1q +ppDHbRgYnL6GSoDlGwant0KLWbBCE1EkhsYifBhamSopNI536rSyUTa0CcKHoYV1rTBgnZpIocIy +ugHJgEQ3rPTczykoF/NdIJNTR8cFAjyUHoN2IzKOjEbOxuD0cdSGdRwPjZummhNawGoLVnf2UpV9 +oQwryQdYR8VMOwMlwG4YJxr4eChKG1onYcXQeKNsaB8Ip6F5HMVpp8vtNApX0GnvaGtltJAqT93F +FVzQO3LyqAUiwPqBlnP764tgvg07fJAn8hp1MhGS00TAzs20m53Z4L9xNvi0cymlqdHB6dPIBrPd +sApolKBq4v4i9yKhBkFMpsAvEARYEwg0t5hvMFtM7dmU5AMsZ6AEWM6ga0SH0JOCB4iDa9BrAyzv +PAanz/ZCs+uI2oKVIx/U7IZhSqMELXCQupYMDCQ8ax44O820gB6FdXZayKQ0NNU7dVql/00LJb6G +1nEFnYa2nqGZNHJDa9m+rm3LXVpAj1HxXJEDY/QopWVJ8Q17dcpVl/Ry1R8t5/b6nGA+m4w9mqoZ +Cv8SiBTkaJPKCrJcOvaV1n81LMazK0vi2UEoJYnmANqhCVR2lCJ2kLXFaE5ohNMMdMMcckOgYADl +NNaH4rSaBSu00y8ptE6HTnhMmYKvBAejuzKYFGdtDAp3eWnzFSLfqqsJl6mzEAHWb9jhNYCCHq9c +bG+HGoWqieC9gnSfFqjEOxWoxAtQHGQlQGBK6chTQawfSUACEtH+PJqjEA18nIUZCM1x4BLaYhIi +NI5nLjS19QyNA6INrXHYcFrFO3Uaxjt12hnDCm01bgY679AIhP7SfdxAqm4X8RCDYgxIYiRBVU29 +ckHYfIdObeob1uIYFp85B5kIBTbEkdC3DHRjSTw7FAdB5NyWGgIFrbFgLMEyBRMOEvOMcBAofpYI +ICFrFc9uFSFQPHHpPv6ZPpCOLIlnt2GM7KPm01/FcjJROeiXOTLsFvA7vU/QRxyjt/1aQu6HM59k +1t/y3KK+qcXWvzLfLzSlyrgfDnz6dcb9cPpptnRQwO+4H87aWd0P56XdD8f9cO5bnlv3w5FhC0p+ +MxIKjt8Pqf6fds1wsCSAefVjGr7j1+UHeDnq3a4ZLnvA9KuyHuwx/Mqm1mvV+fdbf/m7nW97vA9Z +9XvpfMBbu/D9bm55bu9vm14cWA3hFHzLHzUZ0Pkx3BE9aMBbuzIc158eIPmoV3ySJx2+7b92lDyr +A97aHWcT+lVvazLL80UM4XjOyPdrmusT+r408gx3rpJhuCIHMK+/Nder0yzPl56ZsOo5gLtGW3Pd +wpZ+16jaguuOhabfuuNZ9XtR/U1avyj5vTmdhuuT/X2foJ4cwCyz5Fdmw6k5+/Yri195lSeZ/War +08vOTnBM0292v+YBb5y9cPZPb0xn852h/pez1zygnjMGnMnwq1LJ8A2jfibPmfzGdPaaB3zb9mRe +1q4Z+c3sN/sxnMrkN1PJcIDXzuS/CiCzs+yv7uzXb/btv+pwPYAPf0wfdNtvu5l81ZshtWsm7BO0 +d0jtmul9gmYG3E/VPxN/AXCGe5mzul9a9W2SSoYDzJf3xPkxvALRr8wZOZwMm/VNJuDHNByr6Wd3 +2J5lOMtmOTN7h8CjGXzLaDZBs3FOyRPTTPFMc8JXyW/9Va/8xiYaZtmeaU6I3/nb9Q/w6zieTxma +3TL88ExzAv8/Tk/z+u3Xv+FVAPTL9mgBJ/mVUvW6huMTfMuvRwugBbyqL8Mmz6bjH+DH3rPpbnrZ +3i2nXro1n3rs2bRt/5puzSf7y/cbp+5vezZdf9S7sj2bvuX55Nl9NMmapusfAK7XbIApQ30ZTv2V +q2l6TtV02UNT9L7qbcFeTdNeJL2apuOPmlsoGkXT8W3XNA2Ael7RcJzyUPWJ3/KH/emNTV4dz7R9 +1z+APJ+8OqZV9SyfBpxi+mQH+PF7sj1UfeoxfHuo+rSS5XdOyfBXvXT9QtXzqX5NNj17tIAfx/OJ +fls3bLJfzzQnoLz4tk2mOUFWwfZHeaY5IQCvpul55dU0fYpNr/wH3PYN36Y5gX7j+gf4MhynPspL +/Rj1f2yi57v2UqnZY7VUtGfXqLr+XnzbXABPVc8eqo5R3i2nUHMLTs0+QKYYZQhAHG6Uof79zmpm ++qDM43gebkDrVP/VPf9bhr3W6fvuGfNlH/r+GqXnWt2gGb9OPB7wZDKZXhSYIk9jg0ShzMZ/x7BB +lqlUw4dh6qde0odcNEWxm5x7JdjLzBxNsn4vA96YtuG1Z1yH7Xkzd+K/4ffpx5+D2hNRSMCcBvDh +T0b2zoEEzCk91yrJ/XACSNkdNLn3ngxFb3Wj4ABWAkw/imI4hiVYeuBokgI8J0XQDEXOvRHsZWOA +6Z/q18w5wXEPIGV/eZZRn3WaY9h0f079BmC05tt+nfzDrt8AJFtGcAEcthy3BLz3u/6Ybr22I8Dj +fpng+r7fGhXDq9PDvj/nx6YXrt8A/b1f1Hv/1m2+AeSPmuXGR81y3BJg4D5qxlguoQ9Vz6cigemg +Zh90JxUBrd7Xyj0zAyNKQaznXqpKXIbqecwmwOLyY5HiF7S1QSVjifOOPl8+TAeEghvWzqbnEXAB +ARZc7AP/EKE4+tww+7VhoxHbW6gk9BL3acP4gXuGJhKufW2MtXtYvB1CCE6r32zVYuBFYPRaszwi +pwLr4wuS53R5LUQgUuBeHJQyGkxWLuHRQUWbxCdS+lxyhMWWXjZydyDgY8PmyIhtCBjOjjOUJPzc +mD6fdFHq/Ya5wLWDsgZcdx2th8qDgkBxxPmAdBum4ThWCn/WEdlYHAYFqf144kMX/bD+1dfXV9u/ +F1YjCK8DnyJeZ1cwLaCHsT28pj1eWxtuTVb0Q12RDmck7IZFeUT6wU1qQQKet3rQeHYbRksU/iO1 +H1cP5m1VQBWwG+Yl3pe1bCQucqW9OCirNv+jBn066KoA7ljboDCUJPwRdi7fmXCQGHiogtqWuYXW +IjVTknBDwUBdr/KG4mviQLNtTWo9hGsHtQioCFCDhEFqVwRjidU6N6mdDFQ+kf+xOS8PCt4ZSpIT +5UnxTdRonTbQXUAS/lOHXso4Va+HxEA5UFGbg9meosFsOR5TShG9k4psfgpiJ4xvWB3rjHBgDJhS +mgqMEjQyjhLUvGQOHBtGqiAaFkQQoS0sCr+kLAJswQiXb1O4KGgPxBe0IkZcEXpUQMGQzyBAlgvN +mIfHcd7iGJ/g4yTyw3KNKKxrjdR+3ABTDnSs62xhCFy+Yfcm/DhXkl5118DUtQJBoMRdL/7hoUPj +cgs8t3zVVFruaCSwPHXEj241bgZIVsiSsGJoto3QHxjUBUFGbw8rRndRUlaEMlJtvg7i4NRP+nDq +ri2+oB8IAYwqbIrBtIDeYx7Z9ZfAsrxgdhQZA5Nom0YEgz0BlXbNmaW63iBGl1NOqZanlbTlkQQo +0H1cKq9FEDpP+3A6nnPDJH80hwaG1UsxmRikttHlwEMCggFpmFGO1JuLJLlkDvLnkEDsYFU2nULC +GipQ0CH1uY9LxPzOCjReOCiIh7VJS6FrEbXaq3ih9lJu2Cn0RNJAxHKJGxfBBSF5lOIWKb1cBhD1 +jrQxfbkMKEYl4akrTShaDW7h0ZgH8dlSVjUY0ganT5M57k3Oy+GAMei0DVvZYokiUUTrbcFEjGh0 +g19ZkQjBifluSm3qFbp1QSkGkiOyGYQs3klUBrqxNGfEU3HpPh5vJVdrwBMYuGGgyTbVpJoUOrAG +El41rAYSXtVMAwmvhmpS7RlI+IQKQhx+4S30FMcKPcULPcVdIzXhPYMWuecnpPh8QipD4VHnTydz +NuwnfP4TPud+wuetTCvjnpzQQEnC1c12lCQ8LEm42pHezzmcYvNAQHDzQEBQ0zg4jaNCVwwaB2Tz +QMANuzMOCEXEXpQOoZiH7jiAiUSm0iEgpVVwHMANu1cu0d0u+8BP/CShIZJCqQcl/iOFUg+hlCQ9 +lIG/DYPcZ7dh5+06bwO4YWDNEHkIRqElxQs4x+OxGhQSmQy66IjMahBBZFqITIsinhu2sUivWhsg +KHwDAeqFKRvdw+iFmiRBTNoCQxPwjIaR5uDua/p8rE1y0HKuagu2SBTSC1BksRIxnvjRbSKa8kAT +kJSgqHZdUXMRDGMDoS2MFCFrczBxG7YS6fmQsL9MyWkCrHngJFmhj4ukSgZFYmgj2lloHRSJoXEQ +PgwNtFkZWn9UFhOuZOkIk1NGLZBFyW+YfBGocEyo/Z4mUE09tTAwX4E0UPgEqvB9g9R+HLxXtG0S +jZ7qqSnuqSkDUSjEpQweCjUUrpFr5BqBQgZT4e2qCgoxFCW6f6qqJlKcFtEiWvQJuRIpvnAlUtx3 +LPs/0EWD8UAXLPvPH/cE54/rCS22DVOQ3g3jgK2M28q4naEyVjYPBAQrtMMDARMaB6TbMLBCGzoP +BKzwuwMBKS1K6DIPL0qntChcpVMQnuNQoYCUlvfds5v485b4z3BD7t5hnF3vSFQSFenKGhfVuYWX +ZohYBHYdsZ1mFBoikEVga4ZIZohWv/oNW9cZkVk3C7roNiKjoou+qYlQNPBx9p4dHepYlLgKfgOL +V31oPSzLPxVMuRGFGyYpCwwadzy4JFFpxYSbYcwIVFrvbQsHijA2gHCKlVgjyITtxUx54IQKTUDl +mSYJT4HB5SDdFkYHig15uCx4y7uj9KoVIgPVcUrKDQRT2glDScILZ8Kj2lEo43aQdexK88CGdTgd +ZOVQvmEFUb5U7ay1M0AaQKhZS3p/Ec6nLVjJlEGKlIgmAlfhmUfje8O2cns7igl4LRsuqDowX76E +p0ZBDenVgpmESRzxLvaB37CHbQI/T01x2+TerFDqNQQi24QQSn1DlAiNnKMm1aSa5HKOFN8wFXON +XCO3+3w+n1Ai5UrQIlcdsX1xjtgHuugej8ez7M87y/78Y9mfzx93dqCLrhDRRfedUCfUCSkUjG7B +KUoSrnbS+3kr47YybivjnhgntKhsWAWs0B/4onQIpUVxmQfwRekQSosLHQcw3bwgpUU5cI4DSGkt +XpQOuQfu9V45SHevkwSWg0wSJpOEW2Uf+HrlICEplPoN66RQ6j8/4XME5OY2yH16iYrrl4GEZ0gk +EpVrnqDv3PtsJsu7qA2BW/gLF2Eg4e+S5V2Uy8gMJPyl8Pa2QCq8/eVNlsLbZ29CsCtIM0QsAsIw +YhFYmiGaPe8vnZ8RmQ2bLwzDivkNWw1W1upCZE6/GnCmgRmROeUuEr/a02cUllH4cDAcBo2I9ADl +g6R0DTBsSIMpP2r1LYhOZ261BdtAFI5eo8tgGDeth0DXS696w7iCwMOyCoWS0u4cdm023NJ7gQk2 +Tdpp+YZ9qLZgh0ThrAlsi5W4YT7j0JQGmsCGxVupq3ypqp68VG35/UU8AbZgFZGQTstmzk6LEDmY +7YaR3k/srgjOut5g6oRI54RIQdAlQqJphIH5KIyPJwIZBRDgfCj1/vJWVoTbEq7I2iq4G6PNcfni +RaRQ6lUStFQeB9A2uSdom1zb5KJCqVc3zFMbnupxjhT/DCS8CnqcIxRChEJdTXIZLOdI8ZrkukaN +Qk81Cj3VKPSUawQChVzz5EAhe1N4e6PQU12hp/iG0SKXFn1CqvYZsZ1gxHbVlUhxkBa5tMg954/7 +cSnDdyz78w3rWHbHsjuWPX88IU/IE+lYtoJlf774CZ+rt4pAcXVAtee04xgIFE+ACrCVcU9OiBPi +OKHZK0m4Snq/apBA8Q1LkN7PK7RrnhVx80BATeOAVGisotA4KgnSAwE1DkhX0TggneYV2bDRZR5A +UaGnOKXlXeYBBF+UDuk27KJxQDoKlqh0CKVFqXRIhINAUew57T6WeQBVcGUfeMy1D9h+ryCW/fkk +QTFJTDbbdh8YWA4yhxOWg7Cae3YTz2QfeJcDgeKqgaemuETVccKPbxi2SeaLX0P2iSiIMEulQzrJ +wRVKC5BbW4VSLznvs9NsyBJdk1wjWrRhMsfdsFbG3eSDyXJRG7YhoEDu+cLwG+aiJKDp7Fx7TrtV +dBsMJPyG2SXLuyjXPDes+zz355FWQ9C+G6LCcpCuNegeRmd0D6MbXqHCC7bvoq8D3bz6uCRxeDvN +WEOvhCMUpZArkeIbNn/cs2PtOe0QXubzDevWDaLiXjofCCgasQ0Rg2WALIJrnpv1rz5EPRmxPd28 +EpBFUFDMgtRvWAHnSPENc43cxmPD2oR00Wds9pDezzdsYShwtAR7VtLXgZ9wSMIzLgMJn3iRJiZr +w0wD8LdtIoUjMpoNW7xIEr4hShKe8bjmyVoborNbN9v6V19qz2nn6QF00ecLY2PPs9OAnPDj7JtA +8dXANc8N4xgOA/ypi4ba1a/27DQtroSO0EVPGeFKJAixCC7DuGFy64XQQhWoihbF/OXlY60b1mkc +RDTt9Nh1wuJpG7YiuZ/4lBhuaLcFOwpfsuaBDZNsmGR1goyOQDp1oAf+UhBjKPAoTTIofK7py/e2 +KRKdhLY4oomaOGKwYYyGoSThWG0wI6gprhVgUtzgwPRu94YmQmkYnDracm6vJDzMR7ckq0eYmw26 +YRtmqxYbtmGaeKTwBZZldJdHtfkOrxYFIQdP0k0vQ+EPAgTOdymkAwfg7t6wBenkN+wDbdiJeJ29 +3DAP4hv2oUnPHxokR0QjWjyvOUhZkXij2nzdoq/6hgmgLCm+ppiSX7QSLN1zqGgbxm3Yhm2YZ7Ra +aMglOSIFLpeCciaRibAc3nyNhbrq6jg59RVcsJ6+JMTIZlO4DdMarBZUSCauiMdtUDyBhaAFN+wi +QUneFdOXj8P4eCIcmboindy6oKPThm3Yhm2YB5ZVaEchuaAFd4VRVE1dvm4k4IjACa8Eflq4Cmd1 +U9c1ZezRDznnh8fxxIZtWMFLPDpzxKpv1s0GrQUwvSdArIxe4HOF1up8+V4DDxi9WdTzG7ZhHoSw +Aztrg+IriNURSThgek/NhBhx1fTl29SJU4FBQ29Aotu4fSKXzEJG3YaGgvbkxHxb6J36hsFf6/MJ +BZTRzePjiIhG/9ftjJI9D4yRYWcA7E7NLAwlCfceVPU4gJzA/SIHMVS5HSOeHYFKIxCWnMclLd4O +LyUCSKhwuCn9gYAoXiERGL2VC3HKMtkHnjOU1POgq4hn132rBKOrowhCysDhSQmQmf9hnF1BaEnx +RkR0cY4U53BdHHEV9+w8BgLFXZ+OUni7gtS2KGL6R2xHcfwzkAcjfX8r+8ALWLwdgiINE5sYdTbo +qRCv7UFHJUBbH/DgXRHgQTR4IMDQ4xHgd/Anrw1EbNhG1UAlU5iAepR8QUhR2rxI3hKTvALx7LxI +AcmLIPHsRJUnvQrWIxi8vCdeRYLT6icFqweJZ+cNSFa/YQwQC/VS+JI3EGmcAoXnUAckigk951g/ +PJ2Abfg674jn1xFPr4NyjArfEc8OZHEuX9eKukHBqW8YgeTUuVfHk6cRz0NDI55do9Om3mk2BFP3 +GPHsvGWU9A1rITJnxzHcQbsYD8HFFCxux6wmhwZPDai6h1HZVMaEiyCkeOLbBz4REROGRMEDARsr ++8C73o8zUBKSb7BC8if4uIADgeVA7tmpi4Y6QZEY2stutcPb72404aYjQ+EvuqVwksxQeElmHKZf +dpfCzQHT52R3KVx7RRZ9wxChJcURFgapFxMoqleVYEYJWuAh1GyBA9Jp4c1Z13YEgeKf9xi+86B4 +1p16GQgl4Oe//pW+b8O8r/Exvq8kySw+teIWbMPoGZ3BYBBA3lftMRjdgsEoSfqG8U/hNTZsofAD +pdHmYOIMRGnNfrMWkvSXZxGQoLZhq1XeXCrksGh4CKgCtTtMYG2w6EIEBq8Hx14FWOucEU9PQsE7 +qChSg4kwsENNe/m6vjduWHj7wVv4BAcJQ0lyk+yReHYgyfuEUv95CG5nrIW3d4MHAmw8RmxnzQOx +y8FoJhT6xMLnG9a2hdmFnIUCKDI5z0IOardhio9dQNXCLCK0iL/whlYAog2NkvgaodCFoTE4ilMY +PEep5SFQnCGii76IZD7+0jwQcON+3EbZB/6jrJIq+ZBn92HEs/sctNvrlcOIZ9fwENyOWQy4CJ3g +/DifBSgrV2lGr4hnB6mYRP5Nzo+7NpGT3lRGX1RKMmd013mfHVcRz26DQGyfxENwu+cyD2BEIp4d +/4RSP2JIOoeoCMWPJzzR9jjO75Z5ADcMkSnAn1dgfbxjheaMwpDoeJxNJeP9RTYsU8eKlHJJQSw3 +Exw41gIQAqwXGgJ8fWC3r5oUK1I4KKBghJwvX4aAlIlMOgvWjz6OFFQ46BJd9M9QkvAPgePmokaA +FQMFqS0JCBzADfMMJQkfHabPxdb98fJzYdtWUXarKvqUWk14IJ5dqLr4fiCeHQcSnR0/4AQKBOgd +iOfm8OGPCILCZLAbJ/ZjgZjA+rjpYp3YA2sFC2AEX/K84Cs4kQrEsxtbD9ZvWAiCxLObQWIHiWen +ODCdHQeJ5wcSz+5TNatvgEjIGnZABNHHe0c8O55BFbDw4cVBVWXBgfsPmVtMBywahU8FWonCp6o9 +p5bUKYMuVF6cbh4RiMJ3xLNrhA2FP9QkCTcIGM4O9GhOGvHsygnk1FuIjEY8uz7QOPX0wnCQhxND +I56d16lMGvHswA1E0jtGPDuwbUh45CDpHgYVqhgYE+dxFxjx7Bau1O0qlf4q4vlJhMaps3TvbSoq +pFWC0SdcIp5defFsu2Ff66nix2uDUOoZA+LH6Unh7QtS/DjXE554k8Sz87j747VIPBlx5uxKIFAF +lYQ+bEcCgRA4kzZK0FHoE7unbCl4IIAREJthGcz2gbK/yIYVUCpmDG3cg9BvC9aXuo2nxOA4IFGb +1MlEEOLJo7Gqun2mvGEkVefLd8sVMeKSUzFSe1iff2bCYvFAQNvBkHBe6eL6fAh9sWFq60UmpaEN +VH5Da8N4TFgxRu/UaazL7TSDhBVDuzcM9EGeyIY1OPXRxJXRymVDohsKKKMUNpGJGEgu5ms9PcW5 +BsLEH1wbxrUN2zBE4mtok5BZgFFYUCSGBsawAmGhTX3DDkQvj7IoaSZSy6YwcjEjmK9QgU0dTbgY +na6E3zdSkiMiGjdsw7oXKLy71YaZFBu2YfZBlKAUgfuLHHScAOsRzAzUUl9KqcY9TAwKbp7u+48C +QYzc//SouzDYwEmLvnwbllCoMpGZg8QRi8CC9YkN27ANMyk2LHbtxqnT2oKm0zatZ2igRm5oBrSL +oW2YogXhOmgnE6Hl84J6kKYDW4TD6gu9tPkw7OTUDzfsibgF2NJfIS7FE1z0fsM636yFGt7BkuyE +Deu8wn8+xHuxTtaxYWWXIlk+CfkqmG0ohHRaLdLZ9NYSfipGNuxbkZoIQYG28JOt1PtKH1bftvPl +6+QBibrARYajDtPnXwe5FVoIwlvQl4KPCWLR2DAtBOEb5lBrRWPDuERCAAW56z0Y0Oy2G7E94Y3R +dhGzSC3a3cL72DCEBE8HHS02kNmbzs5h8XbIQXQMQBvWEu3Pc/0DcqXeP9G1VSgFjbBApzDQYJVL +kCDa2LA6UdBpFBSJobVh3GkRrqDTMImvofnNykh8XJlIKZIi0cmBPHXKqWlBtyCVidwJDQVdA/Pl +uyhOK7TBuREg4vYbBm+YBKXWBtdiQNU4dc7SOrhOA0eFbxi3YRv2Ym3YLNowPqJa7nlECVqB3F/E +wklBLKe/RNe/StbcMO0c6HqFIHJBDwOLkndHePN9ysMYgelH75Z1IaOs+dR10MLgoK8EyE3AXe/H +N+wTS9iGbZgrYcMQemrDQO7ZbdiGRTaMJ0hW170TgeIbtmEfVujjiZLG0Bh1rdAkoQtDQ4FoQztB +tKFxWs/QOMKHoTkwAgpOwoqheRbaxdAEDInFgvYIsIDjMWgrkxAjhtoURgwjF/NtB4hTZzVgS8eE +3hY0oAg6cMMKVpaCzMnRMYIZu+dmgNL9hiVuf6BVC+1gw0in0suaVhV0GGhEatVsGGXDEAqTPJBS +69LGW0mr0SOyIJ28YmIxdUaJQHGP2DAI6+w0PtLIDYRG2dAYEQVD44QuDK1unDqtwjo7zZL4GhqH +HTU0ny4UWqT1DC31Tp0W8U6dtmFmAUahjbeB+T1vSJli5IO46AhFM9hASaK0+T4byqqjEBYBTlaK +DOdkDDZoIlFxfcRzwwRCaoorNsx7mVwPH88pSfCk+IbZhpZm9ZydIL11JCdYqarShnHDQveGaVat +RsENyzggdS2qJXPEFUp8IjWihVWP8YB0HGOjNQ5IXDbkRuL2IwS1g5JWFXSMXKwjcjhoLZLvDBqr +X4ScEdtreVt9JVFc24NIhiDdMHk93PUXIci8r3XDDgimOJhMqHR0BbJcVUKmkBmRGQgEbADTEgAg +GCAWkEkm4+G2ygcUgAI/PChIQkQuKiAoKgxHArFAIBYHxXEYRnIUhqEgqSSS7oYBzTJwbKj80THI +FDbe0gQ5o6CEsYiAd4KJILQ22qx8EYvZra9pgklGwghsUvgkP3S36XZGn+tpo8OKFo6aKmDZAt1t +gsQaHrDmCglLW5VSZeldBba3jYoSAvkQKsKknDewPasCFlR1e4UItHOsMYGOVcmBt58NWi0BVNtz +Bg8lJIgrYBbwBRXeiP+iOD5h9Kx6+Ap2L1sdzr07+K9LZ82q4hWw4sUoag8Lnm+wX0wWwLEdgpBr +MOkKcoFP2LoVOs3QofmRJcQD9CURu07uTVYUT5iuzdntFpnk5lrIWCUyuXLMtaPfdaQC884qXRc5 +j/N8BZyUuYJ38oQ7r09YT/YE2LCsaCrgpZWU1uYJO5jXLHEFF0m8OssyRdhJ7A7uPJgzvm4BEPFF +OtJJV5yQhBNc7itgwwR8swjgACvgZNFgJL4JOKwq4JlpJmbsZQH1R/tl73IF3OTd919C9x/wCoy2 +b2IILh4M2sNF9O/UeZJgHcya13AQSXYFLtihle+MDd1Xv41onID/OAX111k75CinMgRgkJIHZrQn +j05STLi5KfVG45TBDhxHMKNCnmwg3x6xoI3oHWgCSgXsM9eGmmF42DCr695fU5uAEypgluTN2Vc2 +XgGPQNp889G1XipgWf34nQzwYhgvQJHs3ggI5WHPWvb8/aYsdJARLO7TEwBQdqz2a04OIVg5LIDl +Tomqff3aT0q9W+2QThsB3MpFQt0ynh5lQQWsXIg39oC71yc/siqwx3GusWLnczdHbk5eIk6PeHD3 +o+eW/HPA4j5paI8QzjH7YJHER/3tCjFyAJYGR5mWiddxeNK6Iz4zXxinl9PZmcifAYBhlABVb96F +iVo5DqChOYQ8AW+HF9rUxpRlBfxc2lxHakCsF3tz4ZsF1cUsVsSYAfqY4kRjj6UKmFy7uOFiV9au +GtWQLntFLNJoRxhtC62tmvMJecZD3Y19rehol6RcFL9yahYLSg82oirn95LxWnUW0Fm3HS1LIxLy +yD1I4rUpVmF7x54UuvOBNu0oE7HAwhXM+g0My/cmV/OaYN/tImdKsR43GdRm8hXsCAXAYiYvTnlv +clU8V8DtSOCaVfSYAXxXwK3e3HUCZpED/h1Mu8SzDsMKGcHYOzx5NN4ekrL7VcAnTuZeKcxl4daW +h3hHMFHeHUxDoBQEObLVXGsY68APA0kkJ+yu93xXwy9yjPgdXRvlu6bnGtO7v9brMMDFWALGxtRi +RiE6OYzlDlMbFrRnAu6tBtLLrqasYDIV8K+kyfJvzUXA1bpR8HZJH5cDGXKkbA651FRPwFHEg/Op +gP3dxC+Hj5X3Rdh/qrN1TiY/K0SZaqxOuuHysWdM1tHY0oSHFTaNyhE3XcpfAkyUjl2NmhMHWCeO +nWDq3gk4p/gKbiQGHtyWBPJbAdMHekmjMUo32PjriZ00ep72S7DNUiRcAZ+4oDBMqVGpgD2Nt1IB +s56Ae8cVcINWe2jUPFhjv1wPa2tEIunoZ/JSZLGbedpz4FiCLSNzEqnyV8At9g/rDZU6jkrRWTQM +t42j7vBKeH1QiAn3wdy9B64gGUvVZjufIbYnNtzJELvUC7E+bptkU/oai4XsNTLErhNeiHXoDDEN +MUmlXIh1ho9KfWHQScKxDLHPULK2cyGmyg9joD8AmG6hbq9PQTQq9aKy2PVLWKwbaYq6aDZ6KQ0q +NhABtmkeMzo+nQJOZ8+uoMCabGN5sALBxk0PBnP9HS1Mxc8/w97As7M1t+ulDV/QrGJirrekjwHg +NtMYVxWOF8JpZivvpttyx6ZjDbwOVnHkrJk7XWjz6Rx8wZFKXUuil49Bl8RdSuBhSKRoS27fdUZH +aFCVubRq2Z8nWIJvHdTYZ1LQI7594lHaDNvNya8fMd1DrMSAcZmi3jCgOqPq8Qf+y2GrM8Qnb+hn +Rs+nblmpZA+8/XqACU/yfuxomJfRKmHfmlVcCh/PIx6QfOt22A78AI6xUcEHAcfNamSiReDX0Lh2 +houwxWKntr5wzu4Jil2Yhy/qoyP2PvQ8vuKLNCvL/FbHxCNRzqU8WwBvtnJHZzQq0h5qp58a5aVi +BTH8n7DlxIeFl6VmVoFnRy/TZntvFrsIzoG8H5WLWRFtI4L86Xa58YerCDcysR1A2OUSBCRFFAXF +WmoBAA8uaYCSx6l+vCgAYZ5HE9wMRZKrv5B8I/nyY2PXtAjGuiyIPiffc2RrXbsUWD2zrKVLTFFd +zJANvxukrfqOZftiqdUufacJgh0mMlctW0BtlpPKgMmO5YaVQyd6QZNSfT/W00yHWCJ7+9lsKj9n +RXmBF9pUemL2E3q89MSGW48mPASQ6ZYdbXuE01WK/PDDLszzMlafpTHLLuhcVegQck6AoIg/y8/h +2R0/IwvpA5NRyjVeqD26Gn6Q8/kPGCVvJKH4D9eJN/SZLRAigBwpTIfsQGeWWxJ5V4zQCYoAaR7W +QOV5z/VOzpifkB0DIvkndSJlutRofsKMO3ZlI4ulcw3aNsFjn/oW6Yx4LetgbJDUPBzEPxV1QZma +WELLCCIEsngbcyYBJl0+h4FAhkF4+4hFAVQadDZTZaZmWJqsVB7zqoSMO3r+VUUwyQfZSMmWeYWB +DtM33NY6xDRWFO1EGAhEb0g/sY+4QP0/AklOcJMfG0vPjGWvJND7FPR9ozvKnrfJjzeenxlboHBo +z+AAT2o9KxEcyhKqAcqp0yxVbhu37ZOPxGJzBHDNOm4Nthhm8+IGTr4o05UYQnZRuXgjhQ56yVGm +z9Ji4eT/3SwXE2XnXu9SF+mBMyZ4JdkX4v+XYL62F2aFOWiduXz6y5KisftafcDlVGUveRY4OTmX +9iQNIdWh4c1GvuRcVYFUzKjhVIGW+IvO9U1gGB2IK1/D1DTmSJneKRcj+R73PWuXAIhkf31fjfuj +na939DqtY9lqXlC9D7I31pvwDVT5pOlUywT1Q4okAPL0dOlb1UcGxQA55S1dwSpfX3YB2IQvvkP5 +aUccHmz1wl21NLvrcc1O0iXx/VfJ5DiZOWvIQMud4gafHn4vkT7YIrKUGOCYvKeEYWI3CWumGEZc +WLs4HuGZQtPNx8AnaefugBccIFytidzVB/G3iQRKpSvjLqUnpKMpCy2F0isxiSklonyid6w+Jgl1 +HCQy++xvmkhHE9TAHMPbasZu+y9cuEiB54VjvZJz4c7rapKJQ2VbXaHGJLo43IBKwi8WaaMjikpr +17fSVpPB4HKD56RVPosPxIJ63Y1bZOTs75+aGE+yZlZwkY0429qlbxCf/GVJVI0hUBkqVYjWTzTs +l+ZHG+Q3nulh2GR+zSbPwQySM/16hzWIq3XPHAsuydRfKU5ljlUMTKa4eDyi9FzqTxe/5LWE0Xty +jyWf42h+zm1p3lECqZrOGk4tfa3+H3Nsl5kNfN7AHLFDKUh4SQKLFh9GMSqIIEinTHQhHH2chkcN +r5YVpGGFhLUp0lXSH21lQ45V1xC/g4HF9a20JC81jHeI0kecR+Ps4fL2Njn9PHbpGPHk6yihEfUE +0Sn4wESLQMmgE9qNQv3PTFPP9YCHiiPUM3jYEyo2nFMhB/cSl5/Wn4uRR6drV+3RVc5o5v3zvC/s +fi45h+n6R/boJhrmsCKK5DHjisAn5BBX+5KgYEVhM6UCX+41fRXx0jsphx4BhrvxWL2xo5WAJp7o +wAD3THJSKHO2ID1kwvZ8ZxffOqJK36hq3HJ6cSlLJdG4sRQcnf+LkCNxkgvrQX/SIOMWBcnNA+W6 +gCIEfYlCVTlVPBBS9xVmQb6ee4twfdLw2KTJ3TmQeAyBOwH5Ht32f2A9LdM/xpH7P7qZ0FBnJJ/2 +HHH/dRkFDTJVZW0yAmeCVvUVXh3SM+j93e8jUD9B3nGbnCoad0ddvi4nHpTz+Y7jC7yIUKmiRvcP +15po4rT5/ixvRAlkLO6BUttOTlGQWn6Vlh6N6T10FF4OlcmKxJzU+dMB6ieUjfccwFGlyG5YnGyy +ouQx3wUtGCVwqVxil5BE5b7H+UTO4Bs+eMYdECY7eW0CMNGzIqM3dLM4br6gF+uGfsQp9GMOCFpV +DJNgo+uxz+BZmxefuMdUu3skvHWEre3p97TNosTdj/rjad1sVF0U+dmkZ9Bx3fRjQXeX/KPl52d5 +rDQ7Cd09B+/wwUjAkVDJcipUa4JU9wfm8jtFpC93xwGY8VpSNUloKLwLSxxuICjpI/l5JMJK5Hrs +nkzg/WJxSTy0AWxYlV3usqvfIhOiuKBJVat5uXvK8M4Yk+zsBvFpWCy6O35kwhvth3awCSRZ29// +qDa1TtogzO9R90eDrDRzR22T70eo7ciURPYnCmi2FG+1vcJ6ZeePsRIlnym+3Y0kzFyDArXNpawS +pErDPRnOCu6R+ZO2qQDT4ZlL51eEtlLbEYiT27+1AEIDwe399eoBUlkAkrgdvkKC0clW0ITBN+WJ +0Gn/i5C2odxxsZayqUMU3gO3o7aL7ti8jm+SKuwosswbzfs79i6Hmc03i44fTLuj334PQajZ3Y6t +yNFBYo6Y7sBQ4R4qGDaw0a62BvwRWENENghphQUOh61m1rfoeLoig3SmwGcEK4saI1FjF6EShQ3C +wdMfYisJ4MjNIzH6wdLjyD1sEAeEuGeTtGWf/0R6/8asCGcynE6s7Uf2axtbatpGPnFQasR2rsmK +7y32lsxO/IVlb88OfUKofWOeDLdZL3uk8Mf5ylaolau3ZoI3yx62fuOPYZuBdIRR1aMRi5GgB5Id +8mCw6SLUGrx5b4yaycFdi5N8hA9SO0pDXIDVA2tV6IiBhuQVQ49bvCoCUDjB3xzV+ai+DiozpH6+ +nY2D1woQJAtfLmVBXT0SUNMuSbZEF0MUM8MxD+cEpYczZBjVp03Bw46xGd2C141Y6Bmxh0EuH/1M +DrGbxb6afsZ5gk0aLcIOEX0xBIBn9jxfgFrvdrx1xtNJDrcQxl1/ob8D6Q/brhKu3xviPjNEm02F +SLdbgS504BGXNYTRJX/ZJfgQR8PaWESz9VAytCYmJgop8x9//01i/3Rth2y3+5+xBawMUL+i9izY +Mhl1UMvkzakv75Lg/DedhYF1r3jq5016P4qye1qmgBPH+NMkodPYKhZ4LbZ8xTbcH4RsSAwLynx5 +QPYr2NFu1I01zEbAON8IZdR18bkGCIJI65rVnO04E4hShWKnOUzijHKxaN/YCKdPADyQtJ9CzJM/ +19pFaOJjtP0AXDwDtxvV1LJ1YRnejwqKdCCgjcch4i+Hmhl61Y6xHkmvHt7Fg5qOJVY7U9cxopQS +rHYPXYXZD3kBYzBOYoGLUQGscwBDkftoDQuVZc65XkK6ldUddtztNbOUPs79CkfxRj8y2cm4tkmw +5aCNfljIK6LpdcaQLVQabwHA4JpSqf9SChlXVUL6eAAo/m7js+mZH9cH+UOvFuo9QoJtCSgwQaqO +cfDZ7ut7YOXerftrj7QdLRXfG3NWMmD52pu8amjyzmLAEv8amfzS8phmaffLaSctuuw/ctCi1qIz +T8aY9EzH+oSB/fY1KGgXv0+fuJ7r3FcHaRBoi0RLt4FGO+1xsPNEFXnq8+oTXGLLb970sMKH+CQH +zOiBlQhZr2EqCyC6qfVsGmw5lNVZOtD63y62nqWd/AbL13C/tAx+G/B9Y6Uh2OusNnuRjqY9sLGa +DZlFOTnK+tgq4uJ6RZiAaiyFnIk1Qc4nY/CQu4cq/gSQSf49gefmtsipFSON7PlAONVCAPp7oM/B +DCT8jw58/lCzbDmicAmRJI8V7FWBOvs97LjHdnGKZ9mwv9adFnTsKU1KdEEYDczqg5Fc6vh2MpEv +rxgy43AoXHWI7rDbxLoJo+a50LPXKXWGYg+17XK/1utCHVNlRZRsQq8a91SKxH9IVom5IkNAq01/ +hNCFg2qh1XabNhMnjuxhtNYTgZRvhLUG2GqbQt7mu3jFm5Mo2Oevo4o/VOYnWcKc1Mme5O0tBuQn +3AbJtnOL32Q8sPAgfGQMdQIZGJPUR1Wgz94OXb7qs9OEw70rMOLtxMxxN7r24UJVbnjogxUlr7yr +dj2sPTmP4FwiwQElrLdC1bA3XFrLdQfPzP0gunsNBHw9eTUWJ82csdcmN9qkYCvvi7zucLJ4y+/5 +yB1IlJfKhu2UVKW0tspYrOmQw4QMlY94tCBPy7UZi7blV0t5Sj1PHIaRJa2XvPJeb6VpYfiZEKzr +ZztfRir9+zXtdUxyGg8H53RbbjSG69wRYS25jNlxRLFRsCQpLy24FlZ5V4FXl2z3/BUN7ZXIY4MS +rpUPkkYV6ZMvH01hUWUJWjGTOSHnfIkFmAvWnNfjBqgr0FC6u3CSYlYzY7KSxYR8hyr8gj5T8bir +AaYJhjE05l6E9iiDOI6y7f2sxW+GDUqUMMoxY3nJWfIpX8aj9aP8ryOIeoeFw0rUAlm9tFtaYOq5 +QUgdC4RWN9X1h101A8L37FnUXvQumOqRdBu+TIOxMfkhhG4o/f/76F7KHCIa5iupBsQTtyCShL9C +4BeUt74QT06/ByG1sgLtfyeCIIrPY3RZxBPBWhDHPrW8K53PYSPdVS/IjBVPCwVxcX2LTMQTFXxp +hx0B9a5/QjyFgNkpZ/UK2eePdlwYwwruHTySnPh14u6FcWdbQdy2A+Gvoz1Mf9mF1nRP7L+W68hp +9xbKXlaTaiM0GcqedY/aEOp6fbuTjSnlaVCbkSUAeg+gAJlGcRJTULaFzMhWm0Z9TDZ8pxvGFldv +prh4yf7myjom2huALXkfl6UrddeISaQwP9aQ2vE66RsHdn0Lt19wclK4G2lsi3Q3NFdIAeOgTisZ +tOUgi6gjTDhc8SaJ0tv5yo55ORK+STqiYsxF3TbYgic71i85HWNGPw7YpHQspkRoP2m21dsqfNz0 +3kbI7G4Ns5bZXjekNuWYusVgfLI7UYKyfSLqhO/jbjUlUJ4YLNithrmlOOxyT+mJgVX7BOMgPs85 +ahRvNnJiYVzUo/v6nUTLANKcz9vzBYV65E7ptLEh0mWMSuhv40ngmY8nBhRLFjPaHk7ENp5ECDtd +3dJR+f9yWxpPrVCyPB5PesR6nmzoQix1aMKY4zlxGiVF9MpVezzNroSn4WEp3rgfT3v/v/wReKo2 +sWEAESK2//evFoBIZDLyeNruovDL4ws3nkiGPwxYjJ5n9PS0oZOGRfKJhMt5M+/IbAIlTnhnftAc +mGt/kgD87ZIjqTyL1kMSDtuo2H8jtyBiahXIA/4V9oJbliLxnloLsCkLjaAACr+M2h3zLbN57M5M +wViApA4tbGwpnLzNRdiL1wya0dWQqmDBqxIx3FZgOZq8r95APqRogWixxxuViZ8Bz4YewcK28YWG +t/Xr43kDY6Bu22eYCjxvgJeJmdq7K3mM4DlNtH/3bHSX7KB5eKVmuFTpEsKEGWK+3xut+JfvFTXs +SV3WfNEG6/E/d3DqV0Tx4eREOj6IURgccgZMGEKOkpiGtye8z9t9bZ7FMxX4DC4ADnXlX0kD0kWe +URekEDAkMO64ZeYKVSHatTKnVkHHBBl9UVqg3rkCHHeGWUMDWuZqX3mEzdvnIeM4uhp4Nu0RAoSy +vpLoP555Ur9zuAsrKkAJfTBj6tKzWiKScmm0wi4cfAWCx3AxeRPiwmHuZYGet3WB0UsK57IqFOFZ +9hU8Aql7AcMx1UJn4o90ljGVPUf4Q29RyhOuVsYOnhfdCJoIyzk+4CzAh0GQnrolXRtB0OGC1ngo +2BLj8MFNsKxy2FyrDjnB561OWVwwO0qckQqRoRsApYTQnw5Rm8gxp2w4f1wxdmGw0LZ1ct/FCZNu +BdLKraAkQ+Umdx5wp2/F4GS1/l4Cy9yyp0WHueccQTFvpvMLyydUTk7SBmQMt3wdJ6puad+q0tOS +SQLBoi5kPkiMkeFjL1+fqqGVCZ323pdotSHzI1TY8V0z5VPouHaKxqnr95MYO5bAyFQ3dvb3hsFe +/NI08l2aeUdZyiloqlm3+ZOVTt3RWyshSNvJqWyMgh0tO2TzzctXXlh0idpU7O5SmXb1EFwdbk8W +2s6GZVD8+w8TxzWVi/XvnxBwOWu8418w++FP1dR3mBzj32Wb0ulfVTyP4hg6kJ4/8K9Jzsq0Tfg9 +YzHvys3jX2yf/t0Z82YjZ238a7hU/0JWMBJhFi2FIAe22WxuIvQUTHgFp0OgRH+e6Zaer2r8q7AW +29p9I6Yu4N85dPVZEtal4cvlQD6zPv6NLyRU/Ryn+jfEUsRVi6z4zU1NNewPld2OhVIkWYwI9FFw +GSc4Ih4CQ0sR/7qnf0X/8iXgX5ZFBwLByH0Ujh//xpAVzxKgjv5NDKnOiX/bT/+KIjcA/nWfmkqp +qX+XlhG2fqtYOwtVra1/ie2USY0fJf71DX6LEVEPyarR6N9GKW3s9ylwbBH0mXIyPV4NpTanlcLD +7i/dvKU43ouxazG7acuWOEduYo7tVH/R8Y+bCm/yZ7GoiZcpyF/5E+OGaTnPX2CcaCNGZ5J5+1AN +wMag7VbKBgtacQKD+mNkLD15CORLgc+Yx+uqIdxeGFW5nTvOhO7c9ZRhYSHznk0pSBVfxSPK+TfJ +f5ZMxLj+x1jVjKOQn4QqFMPEwOaYxAeakjaE/LGWRDc1ZpXOXBczCN+NygS4v13AETOFrYXJ3jVb +Y2poZXKwjaciLgVhC3hFwFwwUN+08mZj+tH76Wfk9rxQDe1Xk28XTUPvZkUpqS4Fq0BW8zIWdKnU +Rk6+Q4JyZvUzz0UZLw3wInlKlgtykkthu9y+FYhVlxrIEL1X5FwRseBO2rQwQBfqOKo+3KpHhp45 +VQpEBH0uQgrLCs1juGc9WXd8p6bGL4/gArS09NirF5qGqZA4a4hC/06peEeQm1JDMBwq1DHeKXmm +ZOonjCmpyax4H7jWT2hxNEqoJX3Wtt0OnA5lCUHmgZvPRYlSdyhwYCtxqJ1ncIbwEPlJMzZHCuoV +439oB4Dyz4I6qJcmcGigpF5+EjgRoN5kbllg/xGCevtJS5XIXJ2dut/mgvVJ+qReA29CsFBvHpwq +6U4MmW8d0sHXcCj5pbwhE7aE2IqLuwlLGKPXUKwF7KbN0Qsk5TDHFS8aFdu2R7giQSHdx/IYduK2 +PlHQB3u768cfTjt2clVUOiN+sLNd3gd6HGd7+9eXm3NiZyZcMkW59k/R2s+j4lGByHtOtmIlF8uW +8wRbZLKBj8uoUXUpBNxcrUiqX9Pqb+GxYG6U3ZGzGFCFZYsJRor3sC9U9N7031B/sCCuMDhZsthY +k4ZT2DGvEPYHOOGDq38WOjB7FdLrpCmIZlMAM/4SOdOuQXCz9s0yr93BXeHHHddNAuLFUBTHWnhX +xJx9jBzVFfjqYqy8x9RNGYiG7PVVsmAI6tzEw7+0m07ayXJpRBPt5f2SJPvful1Pmmf4Ws9mNEnN +zfRM8Ex5BKDHOuJsUOGCc22qji4iwBxVp9avrBDrL3P6pwmuX3jXm3v4wLkV1as6xsiqd+6ltTBg +GgoDf7PZqt7dYh6Nf/1pe0xUvYmoAGi3LnGdqxfMu7KeVL21Xr2n/27hjVS9/TYZxz6qelvbPmIi +oeO8eiHPBNOxrPJXvQXttKuX0pn6perVMbvY1JV4VhWs6q2QlpBdpU6jioM9pvDw6mVwY2vp6sca +LhzLqwiSLbsU5qLfTNMSzSdoOgUkCHp/pUIS4Ncadb419Yrl30dYXGqwhacRgF5HXLKsce8NENUJ +7BD8y25mBT+vX2cGfxdnS2D9GkCe3U28NRt+7BrT0XhDs2XnZIXIONTR8KfSsPo1I6algTdkLgqh +5KPt9kR4Zn0FmxvORAfdBVYauutMBHQlYcUmhZ6/QDdxdwqq3W7LO5kPaLh0fIt8PHNFxZaxnKjP +bXL1Ur5hbmVv8eXbfgIHID1LQUvF0rDtwf4I/PpSinYmzjFA0QDiB4Dt9xDWTPU3z7t89a3Ayi9A +1hYrRmxqz6etepmp1F11kEQGLtz4SFV41vrpGhlILkUeiGEPz+C8mPdcZcuZp4NRjJAZ+Mc9VPOC +pYi550BB6e6gCziZQOOI1nf3UDyGcI4VRssoNCNTs8wj4OfGcOf9QvYyZPSi3SS0+mXZdmsFrSO+ +hGh9l/j+uTbfkRAFUrZBQdtT2eUwW0/+3I9tV4I77+6BSg33XmOyJ7TGgXeXUju9ey6D493Mxxz9 +ORosWQXTDck2CDJLVmFuFr+7yYz7dsJpguP9HZl3d8Tx7kSPx0npyrtrbrx7ePFE1ODqFGdBpt/d +/Ike5IJm9BqeN2TeXUa5/7Po/i3bcRLj3WkrpxuocNsosBJu0QagAkJDxrmoYu7ZFwkbmTqIt70a +neIAteE5Pj+kNLEq/5kkvRl4W0/atOLzBy6gZ72oAkjKTDLXcikdhtFrF/w6x331go1CmQh5a3PX +WqZpNSfpchdX9kcNmRR8Ksj19F5IWVGL1mbmhsfW39QdQ9VLwRUHexjGt4QSRuLFsmKlb9cItCdI +Hp7JTFsW5XkXfZ64T4oN80SdkOa+yuCYW+wyhYiCFPY3oHJMLINQnda6gWruA27TT/hZfNr3KGAA +hxhiaYdo1cvqlFOtDPekUR0x8TCo4KssQNG83I/zZP3xEYiQY5iZyck2bp0nhoFY/FOve+5Pn/DG +2jT2upmVlATq0K5CN5GVLTtj1XgpfVFpvH8ElyV20thLK8ktjh57QDvrVW0IugCGmDmSVQIIrsTO +OODWkVXZsdylj5ZNJudXH+7GkG5XIeFkqf0bH/qi+jbC7+oSKlvK60OxZKUjZUq7Es31gfdW6bV0 +daM2vv3MWO8/ZtS6smB4sn59/BLrxejVVhvWWzFzI2aG1OuZAMYzS87WCCRcTAVxCQsOfNnNXIsr +yTE1I4QrkGE1sDvpreD5GroHIU3fUDK2hv8gkhRzW/zkgo0pbT1D/oGooQKbIz/UBp90YV8g3Yod +PMigjHPwdcWipPKkOcJPzBvIqymlB7YKNRVO+bix7jb4yABLkNTNrL3EUNjO5Bgt2EuMUxdoF59V +EIrWe9OTdkHbrp1PEUmwSOXg4Bx0ZKYDUsSDG4bUvMShuSenkf3Mfvtpac3/a7yGtgTvNaDdFpcD +JrFzU2g80IctXUOJ9Zs7leCrHgIKmOpBSXiq21aPOAUMk0Jo22chx62dEUMoJoKjq0VES6/zXkY6 +GvG+23ke3Tzq8qSXTPiroL6vGSa+T5rr0R1b5pHJZI4uVGzK+hiMjJb/rTVPD6g3aOMz/n7sz1WI +cHRzNKt1Mjd4idGXSB5d4STKwA4QyQ4VXdc/aKyjG7HMIUWE9quLRxdTfSrLtOoPKQt4bjYOdKIb +Ssq4PfRICurNr56FssVoZ4vY4InisSabTaLid0YmCCEFA+QQ8S0RxUtHziVyg/j4Hjkmq4qxLYp5 +wvikxlRSRPpvKxmJWrviVPxw0zyMd0o9xEVMxQqHNWbD3OaJDuZHsSjPM+fCnIrEmebdxcdIMYiI +WO68Ed9nsHsRDHO7EhKL/yvvim5k0Rqgf17kqMlpwVzU+DZZnJlSOB/IoBSgKgUMoIl1s/+9V4pS ++GpjM1qeL/ncLLYntSwVHlsC+U5nyG/4WDAidIl7K4vQYos7I4Ev6FtZY1ruG8/ALQ0oM/B1D2iW +D+tjGR/G4w9w+lCFPaz3Yau8IBqYddfUWoOxTWnLVcxwNzHG5FhnA07HBYi2E9IhAVlYb2MplTow +z7R5Mglqi4T/QURJ0tgvhYAVhgEybyftM0UT3zq4nDGp8VazeQr0yThWZLKeNJ50O/YjFEPU+pHD +F3J0SKwjVlSPQXUAvuBpsSweqWZT6X4BVozp0qkbU8EphkO1GetKd4K2Mt31U1oHDYSZbtRzJY+w +y4rMMUlSutoa0701pH4ZRQz+oL3n3VAYPxD8HocpXVaf6epXfuaU1znTvRBggeLDv0jI9znxTJdH +TSlR/c4uBjUB3oiIWpjRtBcTZnlOSoSgxdP3ZbeNmvqKUDn/BGqg3YF9kDhtqwxi3yf2oscuWpLp +E9qrW6YymitNd+HlXmU0rZU5kObFPIY7xEAMaV86c6Ag/hc6475d7TImrCuDDMTP9LfNR1YZ7lg5 +LAOfq4zB5vJKgEVKHqwINjMFh+4bhimMrAzt+KxSaLnPxPoVpNF4J7u6mgHYXtIW/LpKfZPi5Ao0 +XDxw1Cg0qGSXeqASCoNGoFWSAzwuOS/11U/GLyn5yIMsEFRcSkv3K69ZefNutnUFqKCyJ5N4gpGB +2f6uShJkS7pAvakCU4lYemFP3KBYoNScxMOWazFueSUcD/89PETc1uhizExEtgT6wsBkk7kMgnD0 +F8omPGfZFRWirLIgjySEsGiYc+jjyQ0s+Zl+61U4tvoF0qGpTgeZOSPUdrfZZXGXhA+ZdJmG2rV0 +q5qIVjzqBxnpF8pkPlzlgtdQUs5j4DqNRqakrImxG1/R0kiowocmNwMqOR2owRbkUML1S0yYLYDy +YXApRo0pg06+v0ZuEeycT+ugWPsFDKa+N9vwONZGWRTwGWoH03uEJsu4GGIA+kto5iN4BZmbfJVj +p32sJM29Hqh3HEH4bjj5iaXauhue+2o0dwkQwXa0FLBBsRJw2S9TgM2wyByD6k6UY4chv8Hnv1m1 +Ud5Z1cMpIcfflfulJ5IWglCEkAylufWR6Oae1eKDJiCFt7jsqxkyk/I4c2Yf4Nj53l+zveMhvvU/ +9KB0s/bR4pV919Tweid8BrAuWoPPTifnBhoJ2jIG51QHgtWMk29RIV64lqkMc4Ra+Hc73yhLy1LQ +oduy7uq0vysd4ix8hmgVlJiHUMp9SCH+fUDiY4GJGQwI3lBkJhNZEtASwjN9J2Nb46J2u2xJ+0qO +8qvyuF9KQcGFBEbjHGVsLYdL6a5cpzRshSI6Vkt3U9TN179CZp3SjfXvCqyUjGpqZljRSmAmWmHG +8q6oUDBhsqACbfDKglxbZ3Udw9+0Gbu5JX0sjMRMBIJu9U2PDJkB68eI4y03c+RLyXG19amcHRWx +nqrbdbsxTk5uQH5ZsmfpMIlH4Wa8PxR5UpQH1hxeXG2Dbe/nc4hed6nYfxG59H5/gehzyBeMx8xF +W8gco/w4jqzm0b3FJztC9kT1DYBeueTLGDb97o74WhDzIEi3j5HLTee4rxXWLXbm5j8wBVcjHOgB +rip5V9+9Q4yxmB42thT7ePVLbPN1m/W/Pp0aclSn0UUPBseVkd5bFLkewB1oKyPU/EMoqotdTJF0 +zEKBgA+29mphXETh7RZ6FZaqqAovxSX4eqFglWZOvX2D6j2vA7E9QzuJqtJrqK8NIVtNNYgoFRZs +Ag8wY0NHLhiketMctz67NDt85+IMMIwnQFE6me1Ex1zAzcopBeC814Q5PedJj+L6E05oOnEbSMm2 +fePhVAaM/eZXHItVITPSUmcQUaSfd5H5OZO582uoTXfuwNRmmQKzwcxzqIbLWytSteskHIQNs6vc +3zg33+V/CY8/uYyBiAgAp9I/KZj0LSJQ+P9cOotlApJEWky36mFa5CzUPpP6iCdN2ckjZqsDkRE7 +SnptTAhs4/MsYXDEeAvhuaSlJ2v9YR4/4nwASmLHiCE32c11AYbGN3jY5A4LKNk8LGQwYj8L6zMX +P8bB8T2/vs4Pe95aOzM2PlXhG7FBKNc+fIRZdATSOoonZTGM5UzOcHveyng/vXf4MSmL6vmK6NoE +8jIrgpA9Isa9IiTe8zvDAHUAwiYxnnEadYMunP6a/j89sIuAkHjZqdeDN9h7KBQSVgtsKTG0MKHL +tB3F580ZIpdWIkLNXUnDVPnNf/wa7B9HEWkAsxfJddMTZ+vD1nHGMrkQdK6B96x29AyenGxJVo32 +4qnBX4M+vsIyCqpxySNfzRfxv5mxNaopOmbqYDVOoIESveI1PVazw90LA+pS4PRbJS7XiZNqkMys +Xej/gvLl53T/NGDa93YpwsDeM9Utzy0FxoP93UlQBOHRh4fGS08lh+xdUwbZrDxJ4xYizTn5X8Ip +yjuP+34V/eCRVZ4hJFw8dhWLkSzKZni5+HGigxE4KXyTyRKWzdkJ5ra3ylVzYJpCRS8nzokSumzn +uAKIzlUNPI77xPHIHOTx+nKFGP0FBK9J4J6bl9xe2BUCm8hmXSckz10/a/2n9MngTAzRn6WH7GTu +R2QEQJFAwRevmUl+Yb+E1qFsxwPvXZi1ZIC1yZuSdmRnvgBYWs10t7sME8lPXxUutJ/6ZDjyCfH/ +Rap22sGCFXJQcznz5rTtSMzgFClpflA9jA0Tap30Bu92pXqa6VHrWn07OIFXeI2wRe7XuIQKR9gz +yJ0Oz3QL2l3tACq8J+LpjFriQ5pDVxwo07xJxlPdVwk8Jqts3jyAvPclgYiOGdZbUZZ1xIbjK9Fs +AlslwdGlph0m4EKwdBY2y7j0yTO7i3nN8N67OgV9eTl5UkBu3qN24J4UjNkuZfny6KoagjmmKG68 +aHEtj/hSmkjLt/y5KZebfQH1lW/FThsThIf//I2bAFPLSA38sujw3tHnjxs0Jz1/N/lxXXsdM5Y7 +49IDfUjm1g3EmQYSPja4mIesbUn1khaD24zX4GXR2SumhwzDq/LTFU6XOMqIAVf92HSxvgjwS81g +kFgB95pQFwiREbfmBRSHgbKmLhhIZw6VEU2RQNiUVsf064NFdOMMCR1E0NeLIZbPtDQzvcxcJCUJ +N21O16LK+faCO7UC7mEslsEd3EHdUFFRVyoIKqEIbagBjHnhj8FPgFwNxsZjiF6aGrM1FfoNlXu6 +kDT9wHT0yaCCX0ZCJoVwQZgrFD/WN6pbDvciB+RatnKE4W8f4/r6W1YHaq3jfaIjI6e3ZGmdxzjA +ZWsaERQRrJ03v8fvdSn4SvIKB6BpOuKvP5rtRiVVatatbLPSw8Eh9aOLQRWW1wzhunNq3JtODBla +vI1ZhftrZqbf+k2dWEg/jIKEGBs74vwDD38ifarBbdH4O3vl7zdG2rwxWWOZO6lQbxWiaNYwbyaS +N7Sg2z6NYjPdmea0SrpEaA8mmB4OvDJisjTcA6kCWHdOK/Yx7bYLaup/pkZqADZBFrBh4NZj6IAN +HMHHJE3eWqAqkh8kussM2r9EbiHqgMGe2cFROOG3N7cbLrbNwoc4Hm94EcFWHolFoy8/FhwAhOjk +re8g0E6n1ruPEKhsPwPee1CnTxl+5tvCxHeJDFwUAhJdmOuz8OwdgqKq00DtsKMSMzw/+is2gboa +PxteSSoZBKD4/gveoHdoqtINBGDMZ5wzHhWG1bm2izTGPE17P+Aqg/HOYhY/2EMBYEabLHhEHYuy +0TFZ2m4+GnL66C6f+ALQ6mi8wbzoFDhpgljifOkmLSKqYFS7Jd2lCULl/NJCSKXgyN0Np3BemD+F +GtPVzegHgE9978D85gEy0ZMNccka32xhpECjPVSSErWqkVa+7qBQ6yy9FKvR7ko2bwxBZRqV7sRs +fNlVn4kj0Mdn7uWBp2tU8AbYkHVSyoL36I/0sQu3Y0By17+jj3EkCAKorhPv/rN3opczC2zNefEQ +dGjoEggqhzcfOOOiN3NZ5Y1X5klM8xvNxYUj9bro0OMb+EhqLEublSXiIRsrfL5l0jn8wrTFsNWh ++mmSNkGy1DAhNmFQySQJrNPSXkFMy3y4SEhpSFca9B5ftV1IpStzpCNTQyVPtRzxaLLAvo9vlQdx +6UCLy55GRgIbT5UfCoQK7OJk+3Q0C1k/aDaBytSsLrjkMsVVU3E4NDS9dJUNfPCU4Wu/EiWAjw2n +wBufYXC5cP5XAHadcZ7xq1Thk+Roq++nlJbfDlwuTZ/Jmma6Sov6QMFFujwuF/pANf7b+5UPpr+E +ePLbNP3JZd4aYL7e5ZTk9CmwTVPyWtjj1LsCrbdRIksDQfltC5CBzi3Jh8vyHPFvLFU0BxCp2ah7 +taUmomecftrscAbeu5LsyByUBa1K8tKXY5ckJN8eN4qVyYE1IEzIzOgLKWeHpLZMzBRpV08L9Gi6 +hBn2DGStPqOrj4u3dbyNy4AgMt0FDZy67lGzL8A0q9HWbDzsgPcJdWkWwWmTMGBpib8VwKdgoCFC +EwyUHgOXuzFjhATRRHqbJvDVVV7oDKjzhuMoHvSjXG+15UH7K7pX7W+mHUgZ6LDzXjI6tbpdz0L4 +x9qKLIoXmBdkkg6NteakLkwf0abBnx8vT+OWiX4zjRpI3QrDvqxzh55KoL2ZDu+g+74866fSg2Wj +Szr6sN5LY6/GI8nwxumsyHyRQR5ZQI/+QHHDSV+3VPg3zPPYoN/1WxCEg2I4DjzTd+oI8BArFuuR +rFzv5KlazaeFoJyoOmBHDcPXjacI3xNSAxE1ecLe1lbehJBNl6+XQ/Smfw9iAlAVRIz3EgUkZhFn +/Dy6VFqB9ctzgpIfBqc7JGbURBoCI8tZJvU79ZfzWorZ4i+6XBJ7eSCBVrktXao5N1pxNmyBhk71 +LpCO7RbWl6mU2EKPXDOjDs1qhZaUpkI8ZQy+kdYtzKJcSHDo9kowiyquOwiUG1s5/o3tYScfrTeJ +n9QlREH9/gqkl3iC2hgpj12zZayZPjZD9Rs6ETFaV6de1gPd0I6HksKly7OHQ1qoX7ioZIU2lOvJ +/IF/i9w1YwIWsopDKj9HpgQQNfjVcAzedFh8evQOmhEcIDrgSKGohCq2DAD3G1reG73oU65XB2N+ +iOIP2cZjs/Vdf44BvgL0sYcdWq9IAf9EdV7gyjw9X1t7a+asspEoluqwgoQGE+sna12vFXDS9P3V +eeJGaSu1R3D2MnWIHCCikSnh9saDr+A+pQ/Aq7c4a1ccewUz0VJ/PwAHnpWXcaQkXPCuslbUb3dD +oUwHezWHqu7S1jU1JZbcXujDrlAfCkpkp2zBD9QzxqXDn5AFhyRMMm27cmjhUvsLEJImYm+cnekS +av1LB10/ExikoIFqkUFnM6l9fE5LTH2KXjutzcTps0XSkXYovl4mj3VUejPmame84Hr8zpwgIeKv +NvpFw41iOZm3dgN5PpOAXFKZm7Q5O/HawKmr0gazmjBD0WjcMDomGVmw1460NwGikIopcpcWJpLA +JlK9cligzqek4JODLgpeeyVAdvs/PUAIXZnmTon3M3I/tpVIxXjuZ5zFmMCOeYnwE4mn/TGyu4pA +mtNK7VQPvvPnvU8y8h9rVxWRPdG0thzRyhcXnqtBNRjLaICD0EsLMrnr/+fjI9g4IWAe11HSPRMR +Wm33LZWg9L/YNmPbS4hh9Jd+qCJWGD6iTJrLHTuBdTEVtqiQ8RqscvC8udgNWWIyPWvhUqJJpQKi +3AFktXB3LrzuKVo9ml/pDmVzUibWChvhw/KbOJ6cvitpBkKhulwkyAEHZHu2lLw/po4XB1B7y9Hd +V49E8c0V3vvj1QOF1HkFGIovZwf59zTEqZG++CZix4822RJjPkBRNl50rGjqnIZ5AXLTsOXB7CyV +4LMalKNQsO/pC7yiqzDIyBH6wdrKKwpTcj9C+TgAftZEukTjZsI5nLHI47AwX0JYPT3ROJkCFBS1 +guJONkDdMFQhn4XnpQc0//kJDSKTpq3VSe3DjuDCkD33pH3UtjXkkFigq3qjsIw9RSErufnZlDGy +vBY3y9DDhnGENu6JyGRgM15s4+FUGABVVabuDCHIOr5TUMjs2jt7JGUpwlx83Go1osDfoIL13En+ +XNY0RmWFxNZtQULZTwyeku/VhBg0rPiNViJ5hMHKQC6AxNpaPl1jAF3TcLAhuBgI+iircqXmpVdm +esUTUqDMW3OZBr3AAdrZrngAaTL/s1F70IZoqmIho9IoMbJaJOyZgQ6sQjOE+/88AVKoGyiFiyQl +v4W1u9rwYoYPJdY3wLXgbUmS/LQxqkbODoCIiQQVkrcPsW2UhIP97eFYNjvcbrzZysI4EKhIaveO +j0D3nHxeKBH3Q9Dvw9qfQ7r8ZmbLJnOEF4DME+g4oPfMuo3bHw0V/DiPYa30hetq4VbmAi+m1Hj4 +uDzOu4k947wMS9wOi72Zg0Po7oYZXq+846fGFQ2em21BzGnKtRasPXJvfIl8VhjpwmL3Krum4x0O +YPxRPDZ08DG/kFzJICKbvuaDyZSBKILmMJQd7Bevtg47kYB8Hn20MF2dyQn/mJFEcAZhf1iusnV2 +XpLyyKtlFh3fdaPlHY6BUXFIyjYNf4PjBCqnJuV15yaRXbUsaiEk8GuKYTRg7DGE97j3A7PCXGu+ +pwFGiakqRxdquBa/n0bd+HRKUBNYFIZsO3ZcZIEmsc7HU9NhMwD8uSWaxORBoSong3xTy3YRrNcQ +LXiYc5EdfJ6ug4GbQTO2lwRLU/oXh+eRzHhiX9v73x65pIcvLOb7tuBrNN7cxxUiWBbHWZOcn1mG +sl/etSyxrpjbYDS07Xa0y0ZM4EE3HhMbGh61IGmLWfZnAHyon/hQ4v0mcmFRyEPt0MOupvKeb/bg +nTmP8Hbv/iFJalsLwLb89O/mqCy4qgqoTr0hi2cNvZfe6U7i5Cnsm3RQfQFQid4wqS9KbWPRC8Au +ZAPprXkr9B7zPbxgoiwpoMz2A9Fx3WBnE0LRgM16gIVa3SrHCnocPjYb04aYpiBxzztD/Pr5atWQ +Md/yQlBtB5wRz93JFy2Ux2D5xhQje6v1+A31o9kmId3uASxe2+xof+qP6B8J+Kj9KrW15OO5rId/ +cpf8c/Mk19Wau21M/MZCgbX/XcMXhqIzKDy4Pvh1C84MZfjINMAeMM+WYGMIaxH90RsHR2X83X+k +Lx5IMnPVHRic1I/4grzJ/14cUDLG/2Ul9LIwwefcdslCNgv9YFeqiK/gezTEVaOIN0jZ5jiY4jUs +Wdx0oWzL/h27R5u/dmoSYdWoyYybf5YBIEaB3RCJ2bZiFklltTPIm5Qw//uD/r8IINB71ghOGKGw +eiY9ZqEryMZVpAL8ao5hb2hOoyKAglE0y4cX/WSRup1xQ61abCcybGUym1E3cVBaBSqFApvXtlYF +wdg6hUt0aVI0YYUuAgqKH/l4wEQ1Fcb3vWkoK9K4seMUqL2BtU9tQ6h93trvxKv2rTP8ajIcVCWN +XblWKF50ilk2e49dlY917tXg25E/QavXb+IM56Pb6TUSf99+yW7IqNE+rk8RKO5RoBc30Y0R9KCC +MnI6oFy6DUlyCXyAikCx2TqU7SWs/F94kY4gaCey3L72egwfZpeCcAHgQ1EVcY/KbZIDgJtypPmC +22At9+KCD8uy4s1hakSztndh9Z7DQuGO39o42YCGC6qOJxorqCZVfH8nJHrtLepYr8YHEtztGov2 +qgYxoAMblDEt6PfiV2AbAl6DzX93C//B9pmenrpFLkD3Kzrh15lWpUEBDkHuGbCNPbfsM7aMuqVs +KQunPrFyva3ufy6ZwE1wosQE673R+oAtFAy8FqEAoUgFvQ4fP6w1lGMSgnX05sNmLK6Educ63Xb/ +JDOl3cHn1ekKeJPesmClSwi2rjRkz43lzi4KmNcV5iytPAKl1/C7oVYRlf2BDDg6eAd0OZuVKVge +E+yZs4WxxVN7VftKf9HBfZ1S5OQyvgWEy4jJyhgVtFxWN2X/Z3nIi68385FJo+pLO+NQw3w504ZJ +v/65cFTR0Gds020ogMxu+hLOwcZeHNac5HHCcO5CHSvZFTPr3J2hrEuhxf4P3P8Rp54SOenxYesC +yFzwMB1VuYaWkcfLXDkP+EY63rs91kJTu0BVyE1BWfApnnJw1CBt+R3afGIfWxeuSY+DjRB7lpc/ +snw9IBC4veT5lUHwaTjsBzrSo1T3xubiXDKMJNMJj0eD+o3vfrYaNY7DhByvKRaVwpdDkApfSPfw +6mTwZNUCWQrxA29cMTJqnl+f8SngI7HYmVvwnE+GCexpZFaWcf+u+Q4UZs8fLa09Iup0xBSt6wrt +uqXWgdVnJuP5u6Zi5yqIlSz5cDbT30bw94ek+7j4KSkw2KAJ5w8FAn4OFLQgYyhsssSeaFqEF7BA +DdxBc9RpFlwT6dDxhh2jhkwMDsPEogUPw1GFCXGk0qTawszUN4Hz9R7XAhuf53cdAd0FUGX2wf8H +YDKt2kcTEgD05f/Wv9/TNJx6YTT/lF8wvlTb6PKt62kOKvdMTKXrlNW8TB9tv81un4FV+N3AR+8s +/jxKtQWO1pgm21q7XivzEDsQnCIRHkFRx4CKhCx+n7uYD/lxYSjmZ5sY6kkAemDEIf5BdquG4sIF +ceDBFcKagzQGvK8gNA28C0w3AJsD0G3/nLNfan/j6I9s+djrotJne16t/MCPH/Q7DLblLHtmrHxd +hv1U/ecTX5LpwpudcdGU23RCUBcfAAaUlkTaIzp6FNAlVEN9UGPxADhkcOr8eZpyYEFOK91i+vMf +rvYJwEC6Vhv5TfUGvEDlsBysdTq9Wzjxb2IKpSvC6L0gXv05hUCMc1zKUy4NvuHjlmLkOE03FiUT +0sCX+cs71xgA+iQFgAil5MEZS62u3tQDjR9Jqq0bvahQpQb1jGmpa9VZJzILHyc6V4631vpCogor +p0GBjZAgymUAVqSUDP5v5Y4Gihtun+YJT78kUKl5/8HPBmUN/WiqpcTyz2TrlJIHDyhkIChqe3mp +92ktOXl62su7QJOiY0Dz6IkUD9dcFlvXNklIwYcWA4aFSUcLUlYVrxYX3L/oF3fU5R8/9mFQ5DUh +FK/Mao4iZWfs85G4UabqFj20UpgQdINZedgVvvN+hEac+/C/ZoTH3GMuK24fYrXWzr3xSX1lj8Lg +/VNNbEVjG5RK10+Rr/vEL+oF0HKbWRn7fHIaO8UEA04ARVMKKqCYSUHawPUET1rb8yQ+Yzpfv0db +jiPhyu6dUkZOBD7ys2jS5HiwYbyEGY8Mmgl/CVKuaRms2wlVyV2mMkrbqiI2u2bnzd/wqYR8RaGP +qyIzqfFIY8qhdpmxWYs4aMTDbcZKNJuGUJmQGNlJN+OMaCDP0XpioiH32lIkvn+DVxDZDNE95dwU +SZHD55G7SLlxyI40d3uEA1F5tpIjHigO9k75yMQ3fsRDCYWQVbnlKz2DjmionnrGOwdfyyJnfuOO +ePhU1VVv3g+6ITubE51HhoaPcDBfmUaplEePeKC+fjbzs49rKIZWO+tPfIfOaYpGGaGBYviSMn1d +9K+iO3+6YRcnkhk9ZzTGqcqFWvqRmNRE9N64i45d5Oiu1ahyIBpsfFQ54twGuaCJjXCYFR2SoaeK +pkFuKG5sv85s/CAXJRXaXmbvKCs4RHbzKRc0nEuNPUdZcayWHY3ikbSPhaoed2zmH+aHguTm1mI3 +NviC3oodeUjKoaGoKZeQDLriasReXbEav4La12dOWhtkhANHTop3Rn9m1IhMJ+p4PPyCpkRHNcXP +GCMcWnRjVz2p40Y8FH4ZlfL71bAXH7b1ukwc5OXQUNjn5Lyzuw9f0eqR2fgVM7TaPs6ipmr2mxZx +0BU+KjLVGA7d7dbPl1EkHEooxsFB/iMzxyO94eKEyIaGqmY3JpqO8+RDCqWEZnykyGi0fYi5HGaG +xEik9gZJNJyQ2Zgk1o6SotvNTOLhkMhchxW3quHIkB0Ns4IilN8no48jHKombZWQeBiphhNz0Yi3 +zwaLY8ksVFZyo1UUVSw+I6UeLco0M6MRW+NVvEhn9Bo1SZmHH1pt0fxWYjZOlFDQYWbqxuwNbZDE +w33Y30bm5UHiYFWqjXBqmO2tV08nHpZyaCg8Y/KUrtrhKownpH20iqmqlsxs1qgWtZrJc+8arKJ8 +eyRk9A4r8cCa+kylzIbVswCyOxkdnefGPdgkclSt2ziOOJSDw32EQrV62Q2pl2f32DCiyRCVlRHJ +OOKPpCPzg8lZjq2pawaJEgo6+P0QkZAMMfFg2jPEu+Koyu13LmJuR82drz6zQzRKNF/tJc34srJp +zBVjnp/MjHODLT60O9rwFa4qCx3OZcSSGE2DJR7mc2VTExkiLDo3aTJGN4TmTjsfCylUd2eWN1qi +oaBKUZXImZ1PxkyykY/396OhGm5xxsrpxLaGOn3busMlHu6rc5nYROibnM5gS6wlljHXYOsiI6Ml +HqYcXqX71dzdpi+6f1UTM+leXqrQZUyLf9hBVTfzNx1TIzuzW6x1V4kI+WP0MVVCQSrRZ1w+G447 +VOvGJmMRGkdCd76PSRyKrMT0mBIPhcldpUrENWYcGgpjSRURmdYrIiuPtjixGxEqZWbQClKKivOP +2GilSEqaf7iEw/nIu46XeCCtMnRVf4f0GMhAwcEGBREjyEAhKDhQr+xulHc0crSjjqGCaBaZIhMa +K9rN3P8gIh6odvY5pa6j6kZCoRkbJPstVr8zklESlmjKaIqjRDw4lEMD4UBxeCihkDsQDe5IzdVF +6uEpaq6vK92QvWg61uAQDvRwWiVENmSIhtdXdHU9f8gUFN+MUvKTwSp4Man7NTbjXszJvxSVSAer +Yrt5iQfrgYpo6E9jnMuNhlHBUqqq7jq5CPt6HL01r89OpsYR8eALWaMaG2cHKaGQN1hJmYeuP5lw +psUpdhw51JVLroYR8TAW09nrhmgo+lD9Jisb9bkpmplt2AsimpLfo3EnMpyuEyqjDg2ZgtTq2X0l +DU4xJrtIchkzq3nJ6JrRIRyK39kXuc7jhORANBQsu7bsijQVazmOonvIR3ejoUFUeK5a1uprIsqg +q91xqDyGpsE23Wc/u2Eqjq+qUMmsLsL767uHqTDyLZJu54ndjegVGiXC4STVanL2GiQ3FLxK63eT +zmAVtNJMWal+g1W0Rmey/2i0CIdixuxeZVcRDUXZuirsZB8OZShWOrkNmiMOGdWHhg3xUELB+82p +ykgeQsRD/w/xdOmNj4PDg4M41FeH4vUlL+qHh3j4PeqKky+16rEbdaKEQn6elFB5SHxj1hvjYqhV +MSOhqmFVzJk0y5FZx7joWc1QanKNq8JCm8507GTjdehlZzPkZenpJakPm9FDItmrDKtxKOikqSIa +ChofR05kZJSwICvfWI4yMvji5rKdLRS66wuTHpHW1LCapSNkzfiJh+Jzs1qdjRyzs1mI90E3Mwt/ +Vql95sdRF8c5iwZZcTkiz1QVlSknV+rYhxlHKJ6r0H26cXOolMyHVCMfUkIhd2goXjdFd/udDV5h +Uzmhj+ofdFGfqpVZzRq+gqbEyEpINOhi6FLanaUfc4XlbsUh0m7w5kuFaFIZdcUczRaxWRq1A9FQ +uCaS504OERY2N809MuS4i2G9duRhDd7nEvGUjHFhYp7pXOGwsLCiWtnfnoNu7mzIatqPIpPjsVB1 +vOZmbEe6bdiNw5XMRVNHNUbqoTK6cpwL69wM51RWxpO5mdxxLnglz2m7McKHgmaj3M5kkLBwx8hH +dJoZZxCYcIEKqEA4OBANBe1X4dmdNF5FkZ0MX3X/OBeuqs15ONMxVfTqZIhXqWEuPkU2az1nY6q4 +dezqIzQ3ysRDQRc5V9nHM6gKO7VMfDzpKJeGFL8MKc7GNH/EuZkrW3ZDiuHd3oskQraTsmJDiAgU +QpRQkGgBQ+EXECTAUAgRgwwUQmAohADBBaIAKLiABQwgkIIDgqAQoSiBASi4gAUMIYDgAqEADIUQ +KzgUHLDYgBCBQyGFTCHFTAsriyuOYAUFgIAkRpgBBg9KIAIuAIQTUKCBDCSgHDDAhBAkACAIQArk +4IMGEzjogFqQABMoDiOMwAEofPCBAzw4wAge4KBGQGEEG7BgBAKMBiigAAOwByJ8cILhggycIIQP +JNCggngAACRoUA08aIEGKggHJ8wIHnhAAhSQQDQ4YYOD0IIUWFCBDjYggPuBB2AIQbVAgAsnIIA3 +mIAJI3gwHpgRngEEGIAEC7RwQYUSVHDCwwZIAR5oIAF1CVzgQQM6oAAOAXSAAUMHHBxwgQEcSoAJ +ZMCEGwEFV4ABFoCCBiuUQAQCGCCFEEoAYQMnLAAFBFgEs4GXAAEobCABFUFTSMEBGgaQAkHA0AEF +EISBQgpCEBVcmBKIgAEGeIEHeoI3kIB+0EEFDqBBP7hAAFLgByV0QAH8gAIiSMFBBCFICGyBDGTg +oLcCBgtgYIEDygQNISgAAVDA0CDCAVAgQSEECmggBGnggAYmAFNBAiKwADJBgwocfIAEBRgR0EAB +2NABPWAAB2MAHHSsYAEEOAMSoAiEAhIIQVrIwAE06HCQwAtAYIAEQhAPGiRwLkjBg8HQASUCJjiY +EIJcID4AwgJM+IAHJJjAgQgmiMMIIchYwAgOCNCgH5AwQgcijBCCiLDBBiMQD2zwES4QHQhhjAYV +5IQZwYMPAkAV5IQZwYMOUtACCTY44YQZoYUOgACC0cABNGgHHgaQwgeMBBcMEEiYDTghNFAGQsAA +KRwAhAwg1AAyfEAWXCA88KAEIjAJHVz4gAgMgMJwwU8YgYVSAAEn0IFOkAWAcEIIJAzghCECC0B4 +CUzg+IAJHmyAggkBcDCBF4gUlMBBCxJgAltgFjjQgQAoASeYEIAWyIABgCANLDhACT5gfeADowo4 +YAgYIIUPPHD4gB5caPiAHbjgPiAHK8gHvEBsYAINPqCQ8AEVQhABBRXGHVSQDzYQQQUQLnSwQgpE +QEAINwkssBRs4AMcnIMdcAAELoAAD1aIwAlCYEEDLbjABWIEET44QQgKQGGEE4SwwgMSQBMysACG +kAAWWGggQYYBJOACAARADwDBACywYEIHl0ALG7gAAA6wDCC0MB9QwAAuEBeIC4QDCCsUgwdkhWIQ +wAYXTuADBRw+YAsfaBABIWAQqCAdOMwKGC4QH3iAAhFI0MAF4gJxgbhAhHCBuEBgcBjFwAIIPCAB +Ei5kCCEDT1ACDiQgJDBABB5QAQdYwQNCYEAJUDCBEtCgAioggQMKAEABvUBocIHQwAUfdHCBYECG +CJATsAAEPqADhmoBCSoowQAqyAotqAAEFeEAIvCAJzyw4AEhiMAAfkAHZBBAMVwgLhAnXCAuEBSI +AAYTsAMJuIAAftCAAB6A4QUlMAACIbRgggZkoAkemgIZwAhaWIABkAIUTCAKLTRgLhAm+OACYQ+g +A5wAwwYEAhFIsAAHVAwXCAiU0MEKGBwGQAIIKsJYwQNCeIEEDKCCtLAChgx0gVlwIAscuEBcIEQF +FEQgwQIrGGAFDApoAQUT2EI7MIELGOEDFAjBAhEIwQTE8OBgAlnQQQchKAFK8IEG0xICc0dXHGIs +xk4hkf3TsAtSDYmNK1bFzuNANO/HFSl0vtqF2WImVOIPlod8SHH6H3SRCPFT/9xuNCUvKdL8IUWZ +VJHdGUJE4AUdUN2Ti50Gb6Q9083nQ2ZaCTsqt7ux46pRfm4kfigyjK6UpUZk3DYnNzKU+piexF7t +GJ6sWDUuPwvHnQmHK7JKvB9laC6TcWbSlKzfhpXUTzykTDxU6fNBZjvcmQ3NvAyi37Ax4VCXRr7R +WsY0jdHQjIYyZHXj6vqR1TAx4XDplcRq43xNQqoOT2FynkxLVqPEVGb8jdEdVn4pnMEq8WBGx9Jx +ZliVaAFDITQRy8XI8XgrHroYyRqrq5HchpCQkEelrlF8Hpy/M1J8qHbOxql0uGmR2mTeY3k+TFrY +VpsdRmQozE51ZL67G0V3m5H7kNWPbkgKu8v5KzmdMtgxkx2VeDpKWlffoIJGWNKged3qMdN4horb +I9YWZbWMzVZHufo4FWXT5YoZR1kak7NpMjod+pRK6IZmet1YXhEysuMwFRdykZ1ZSiIOTxz67UG2 +SEpuSLFV1p7Yh7C08W+Qro5qN4NU3EpmVCPScVIyOdoodQ+TEg4kEplHSdXwPkgF1esjJyShAuHA +sjuj9jiqSDg4dKpqJLw7biQaCtpsz0d8j0/BKcptnLSoupCOTBONz+WEdvXvyF7j5MsGDV1+nYfN +kDg0nz5uihrndqmzGUbXYf01xFzeJP1pSsoP17WI5Ka1TVPrdRAVdqKhcayFNev1P44nCt0wKvw6 +UcaxpDqO3IrHs4jtw9iCTCQjGp4v98TW2yiWyFCwKn/ZSlg2iC1OZuj2cBUlq/vv9sawxdxuS3Fo +0iMZu+NpnDXPW1vtHGbv/NAg+wq5Q3LXOCnxQLQ5KorQKKlJvKCDQqEDQgWi4ayVOfZaOeFAptf2 +0VXnbqolvlKZPywbRUrMLDw3cmRnLINDZKi2ymiIhpOfrnM9kzzmmpXBZbZMbcsQC9FDioVCNiOz +IT765TXoj29GzSvtdkXnl/0nRMMm0TAjV5cx5tV+J3Ji1flBplWvxEzCgY5MdI14/uhw7idDI64Z +Hxbzy+3hoCGRofDw7kijqHBxXrXRWUZRzVxVVpJxEN1Nxfqa2mPoWL3WLY8T1aysPOJhEjIh6/NW +Helo/pl+q3FFMS8zjD5CDztMLOyu5vou9qgpepy69ygyTFK+kw6a4uZVNxuNiL/QXYiOY6aY1tVx +iuRRYkEdn6JUqQ0SWyVlrzM6VSWyHF7V1BXJZOxHxg2JB6qKiBmLaNSoQGQozk6MLQkHosG1sfSI +ZviFhW7IU5gdUYbDJxpusZt+emH3HokRGWhkJy8jGo7KRKPYYjISjt39iRznxSvVzYVYI1dDio7m +ZpaZMlIfUizi2WqxjSOOlM4zlOM4YmtK1uUwYpm9SoOIhWtOSG5b/lRjjiEWRxuh21VQWFPpWA8T +iQzlEFGvvg8bWpk9NmZIOPBs8xkdEg2f3hXVPOS0EqdklDk2Z0MhxePm0XihUV2VDUVsY6JheCG5 +Xw2N1K/WjaGq5+7ydmScTEVsOzbeIPlzNeS4OfEVMpZfVVU0WtOrrhaPmYKcqbotiQxFcSrkXdVu +YprRToZLI5Jdx+YaLosj39V5nKGTKes6YuMl0VAQ+RoxOqml+kjlroPKgmb+lw16cVYhO9WrUWVB +npDJxERqzIvyckbjSuLh7s5zg0biBR2gUCPH6nCdGYlM6zZOruLIyHdk9KLWz52kvOEqiFSTtjIZ +dSsae03sMuxqRtuJzQeLcOB95qwt4uHGnj4znjFTZyHyIDphjWQRD1e+ZadLhpV8hjLEw/vS3XTL +xD40Sg41JlZn/L9Qzzem7GAhiWw+ZR09QyfeIzZcRRXdCJ1o7hUKWXnqFvMUiU2VgwP1ZdMaU8TD +O/btGZ4MdTNnMd/UkKmFStp306fk3M1DSA0/KZJmeuQ4z+QN00VN70f3xiObEvsMm6FI9S6HKm48 +Yz1TGmXRaX1m5M5mDBVm60gh6ckoi7sbu1V+RMNEOBRnSTYx8g5VYzPbEvOYC4U+JCw/7CayaS1k +h0zaOXvdaDlChEOnc8/LIR5eJq2m8nu7sxtmMdLKlNjUSlPKOB3Ok5PbpVBqrKGD0Mdl95R4CIlU +r65yzBsKv6ROtlR4qiNDc+4yz5/RF3XyY9mP6PtUyXX4xIPd8hPfsFyAyi+WUZnkiijnsBYeIb1a +ptoYFvTJ5DSR2qgWc8IWucS+MSzG6sTuZja/N6dzEMXsQyLnya3XqEx6E+mQ9parK2kM61MZMRub +GfyY7SKy8LVoOER9jXIxRZtxRll0sulFbjjMh7Lphe6xjsi2m1LdSMWqaFh9eKPmpHRnstFhpzOU +MXfQ4aamzh2nkMwlGl8JiXhMSBzsTYmHRZnREc2PSIbZ7dKxte5xLK41VyTnk65JVRrSh4J+ndNj +OXLqHF8XcemDJUNjf1lu8MTD0ZxI3dD7MZ9yOA/ZhVM1NoxEQzFGLd+MtrCXxEWZOhvFwr6yf8Mt +XmRy9YiFW9MYyawf04K8mT4iOho/6yRW1YfCqKrOblSlFcutc3WVjIZDCvPITKbMiqhDCk9FjmwP +KYpMnbMy9yZhb7OrhsJUdjWluxiJhThCQ3cyJn0Vndx3um/uKBUt3ZXYbqYuIpUhjZsxEbKL2H/H +Hxk1M3ZqycEf+5KemBxo/bjqcuOwITOP5KO6QTQN8ivTJWcepcK/8/xYQv1VSyonsun9MV9LN0hS +NPUdnvMdyet+40Q43FUSYZVmmE5unApap+zop2LeKymaIevISMmSzCDyz+KNo6joXxNyHBUzv/kq +kdBGtcoRyduJkUPhOo/VD75niixX5j9sOnRSdv/lUUM8lOxUM3KrjZspn3RSDRsiHsrBpmrey3RG +a9pW53QZZ2q+chEPJRS0ODgQDSUXoqKpbUxRtWXSzWVQlUT+o/umg4pwmCESluus5KgiU803o4rH +23KHhuI4tKpBVpQNtcQ1LrKy82aYmX+yOTKjGo9mboSEnfpO46Jx1em9huwejyvCoWpeS4p6w4p4 +MPPkpJ2rg0Y09MZXUiKhYVW4Ld9+Z1ccVhWP/KNKOjaXksioImM7rs/j+yqdEiKzsWquiIcpIomc +2BVTM5sbo2lKaLeZYVeUHJlQ7HMyPxl3P7K+LuOMu4fTGFsxktQNHxXk3pGrdCWTmesV/TXo6EIP +yagzmwx/u3nUEQ9kUmSLiBzhUBBpynqzCMf/4HKgdM5h3fEiGsryM+m3DqmqiVPnudCQIpEx3b6i +jS9q5fjXjE3DoUqHRhGT3w1fVg7yy1zjyBWRscRqk7GR87gjp5MxxyFPp+bpJJ4jK6OssJzdbbTJ +jEyGOGPI4puZoesHsSZVV7uOsWLsQ84YC9Xriir9TMtIUjUiEbvXvarjZjMru9GMbSlhzYRmo6wY +2s+R4SjXbPaS/YPq9XQMDdGopKzI41b4InTjd2Hhy1RmFRq24nwXo3EzGiIiF/EqVPcmJhVPas38 +SPfwYo+NzY3V8P3j3ZUZtWLuQ5LLxOhR48jt6nYkJB0d2k5XHW4dWyajVtjzjpwcGvvWBq0gobM6 +rKf+O4cqSyV27htInWtrehlVZLo5MaNBK27WVQmtOojmbSf1Bmmpb5oxQ2Xah85msZxIxWdnUx+1 +4lJmK+to49Tzfq0gOonGx4j+3iY2asUJ3amXoo9X27tRK2yGrFdSK57Z7zR1zk+i15nQw1b4Oixp +0ZCUfTobtqLMVxHzjNuVccfMEWtmdvRB7fU8yooaD8kMT50lw6w4ntVK2USGot5xhz7blLXsjNXk +zaqGWVHjkhTxxkMmmiQ3pHHXCZXGd0J0D90NmVnmJdK7FHtt3C4odVP5iz5FGt24a0Q624y3/EzG +jG3WK0tFunBsF4/O1NMda6Lhdd7j+z6ysgy5qn6kPJ2S2DgrLmMcUu+jlsdZUZZ1PlwpSsnpjqdK +rc/wTVRHacdZUWWlk2+i4dtMMs4Ks/E595vrdsOs8BW15ZJv+CYeCtvZVFdmxWlph2Um4zfbj53P +vNXHHWYdFBxAYAPCwcgmNY434qHo2ZDXIVbU9L68mq10eU88tM4KeX4FCIcamnmcSDxc8X4MDVVU +VTHbenZomLoOpRYSmQzFKTth0aiaqqI7B7I6GVYmGorKapK1L8V6HrfK3H3cXKlcrqxxs8NpQtUp +OQ+qurOPKkuLrFFlo9/MQXp0RuTdqDLRMKSLxtiwxPQTzRg7OhMq0zvG3JaNmHrjZikJOZTM0b/i +uJl4oFLJvu6Dyi2KnIg01Wj5QaZFOhos16o0Pi0qumZ8NHdyQxnV0dHpwzIaJHemlfF8kEw1uh1K +tVyEeJBiX265TC7SUbJtxxkkG1/jCo3N5iC5ynPOh4dosCpvxsdi2scvzY2PW7sj48iYMeEgnF5I +9GHjIsucyOgeJIuJkZEeGzemqynvILklvBwRDZJtnbIbJPNVYZWUeJQsdZ1VGiWXXhul4ZnPRAYS +IzGeozfN2DtqUxX5yYmGK+PHZMNu8xwPu02zaVGGTlW0s+8kG3Lzx8+pZh285aZum9DgPeVbb/Am +HBo4/8mQ4Zj4xn2EYsP/xjZzy3XcPSPWV+ocyhKx7s+wm3igESOT3vWZSq5B7mgu4qq/LrYZGlaH +VU6GqFYeVhlqkV06/0hulHG12VKbce128SJFNNjdvbwhz4FKxuxxZecfV9+UGVf/fFdjQ/5QNdgd +3fzx3BjPy5a1h0fEQT7JSa4O8uXutJgH+cxX3rT+UTajs5Eyk2vYuKQRMfHDylNVYg1nDmuMdbJZ +Uaqs5oiWutVrcycaeEVFY1g8H5ltVmNInslNOIi3WXl16wfRY0Jm9vNUmXDMsaY4qA0kdPVnLYxS +YmpZzSwmmcpwJUWhEX+8vrMLOV47EA03uhUcS3nzdcp2VkfaFhvXyrmsRXjjalQn9xZRTHc5pDeS +o429BtG3ztggunbkHOkG0WWHjMTB4ymOookGo4Xomq7zrXVtqhmu7yUjG1E9xTLL1TBpaurHlm/w +YXqafv0Pr+jY+Q2LTaZGaBOjmVjKGPFDzclY8vIoTTS4choPnshV70gfPLKXiElqNXj97xWOnoND +A+nEylxzHytXhNz2o9c565HPOqMn/3WExjR6lZbEfTmUyN1Gr8RDUegZIiYSGWhlNHFt46rqzDeu +evUqmotDO3Xi+gdZrUiYQYgsIRpkvZnry2cGWW/lTzSYtfSwqs/scvJQDat2TCTj6pcZ+bgqqSU0 +rXFVwqGB7hHR+LZR1vo1Q9UaZUc1nbGy0mad8naSe5BVR27lDodYTTKj05ijqGaWVnffKhJ7Y5k7 +NJTvpIplOq9iBpK1nDrRZDWpmlg+mmvM4cZIph7o5ipGomGMwxqvtqo8npzHqzfRpMRBOpefhqsz +RfMtRDQYScfqrDKK+svdo6jnie4181HU86UZRSUczqZuSPU1NlwdOk+qh+TRKtHAGrNkarhaHNbt +VRwv38um7mcSVg0VbbxaJ9arVpljqnXyMev/jpmGBiLDfR6fHuVKimo+fH80SD2P1BOxDHfS+GK1 +58652dXwlG5GNj49ktWUjXHMtEdfHa7GpN55zJRo+MjNlCbDVNa8LsORTd1OvTmh2vn2KJWKLJVw +oDqSfMpmkEo8eKaEPtPyMqZRJpVZcy+qMWTUsfNvG+SzkUeaGX6Fej15p/o3/hIOM/KxtWhUVSob +vpw3GlN5hm00k173XKwad6Cx/qW5sSHuq1NGdLMaekddhxMWpReaYVLXzNkwS2UkYzjiKZGM5UNa +wsFC04eSzPR4xlkmwvqminxGo5kZm6nIeGfyNGMsqS/3l9iYx9NHWcmtPZOaUUexaxHHanq2S3dX +04zReGbl08Jmfn4iw5WH5FOv49LyGfVOvtj0ShrIzMTX/u4mosF415RGroOOdB5bb50HHc2IZbtY +g44mnZW+LKOOdZdFMjV2aCiO7vjWpCJjejOXkiO2HtOiltdZBXHensaUDGqrRB8jFX+qbG48Rkpk +qJmzjJHebOr8scal4juPS2umdcNSsRmr6q1GtciM9qIaN//6snFzaLArlalF/IllELFhVWrw+L5s +Bo/GsVbsszu4UjTjOo2Moyk3V6IMxavaOv7W24QidWtJVSujR9cd544qVSuPZTPlrbXZ55thYylE +48af0U8nduPGk3cqkzFGwqFIfhxjPV7FaExomJk+++CxHPYiNRp3sLkbZyQaOBVfeVM3v8hPbPDK +P7JfOXr++bvm/tGjnA159B7kbvObykaP0+DQ4Ft5c/X5HxEaKlNOTi6GxmN0R1J3+UKjbAn98rxm +Nw5zExMiLcNFouEqxdKR6nElvT+uWtZ7rppRz4dXj2/K7kx2eJDfq6XTuFKBcCCPvB6clme1eGrG +T/WJR4t3QtZocVrkTlXRHEj190aLRAOdydK2dDKsBUnm7D6sRIZizi3rDOvtysS3YS06J1ZHRRlN +byKaSEak0vxqd11tTGo6JjeaIympkxDRiBdpSUJWdx9iJDL8bgrEAiKggAsXLlwgSFCCFFgQgxWY +oIWCBCyswAUtkICFEhQkKEEKLCCBC1IoSACDFFooAcECCVRwghRYsAAIILBAAhmk4OBAxHr+UExd +TzK/G/RaUa28aBCtgiGzwaMMmjb4MSOFzI/+7qeSlGP+e8zErMgmJhuRq4BSZqGp/xLLwRO5TMSr +Ya6ltLnD1UtuK82Qn3goytWbmxZ/8k46yD8CBUIFwoFzIs0GVasUs0Ej1/Nc7KoS2Ti5VpkyH5Ht +7ldm1vuNlu6GZh9zqg8uOrfKdpgOs+pYDY1z2b9/RpkJBxFL7WODxyqaX809eG7R6uq5X5WOHnJv +yRiRfpevxhnv5md23SdGqEA4lIuOSOaG5VdVc0Q3Sz3Dvvfmcr+TY4etsEF2JKKxRI+daXcyfDdS +Jp9BdCVEMzXGTDjYkIyLZOoX4+XDNh4f6SX0MSWcsqeMZPA8nhvSuT6qSGj0Y8i25qiGz6dDT/5Z +EX/tsV5imateY/3NpaoG/eJsiuUnuUHybPlMhmLKp5lWqmKj4ylmdSdDfFarZfS43mP08edmmszV +SEWG9cVUXzVytj2qL+RUZMW1qITGRjoc1B+NT6MutKumjKamG7f0JyTpkzsb7YkG+czdeF/09tTD +MX0xV6d6jav2Y+hybIwslY9LyJsac5WnGfaSK78a1BcWsdpkPvJH9YQD2W9MlH9Y3145Q3wn0md3 +knF7uHrKXp7eoF+cky4VX5nnrig9ul/Ro7ytZj6UGeVdmc+5OqZeia4hMnvKhvE1jut47q6qVzN3 +NNWqYj+n8D7F6myhI9nOUh/Huy5VmnE8zQz9w6rL2Ay1JpQL+RExEnlUb6q1DZEodpf6kO8j1Yfx +QmLjuaoxy700zFuZb940X/GsaJQfmptYG49SWdVG5K2xo1LMqbOhsxuXhObm4WwJyShf3toaj2tI +PyeqWobi5DKy1xWZkdBK13Mvimmy+3EU+5/okjPY22fWktYd7Hsyam8r809jyYruNrSdsTy3n4+d +W96jUsuQviotjtk4fkzH1/KfjOP7ynyG8SbCGr6IhrPJXj0rKecofxO5jvJyPupPPaHVWyGZPUT2 +yGmulVGo4pP1Tub3rRrCFz/z7lFd7RIRDeGtx6o5JbPj2Z2js7JNvs/LKaJVpeIZJ6MZk0UjQ3gO +hWRlpIfw9rGRtDah3PednrozyN+96SD/ssyUTHmQZ40zyA/NnFZzpkH+5urIdJSXI9NuyrUZ5omG ++3aj+LEpE52khvFHZFXpcTzd1JEs8rbI1V0Xj2OJnfQF6TSV2pDKWQndSdIqOg+pbcTupIZl6n1I +T2JTj2lIfyXUqs1p8UuIg8SnVWTIOXxMJTQ58VDMDO2zQkYyduIguQpGKpmYCW9HNlKV8jzhIC0a +dOjVmXgoeqcZkWE1Z0TDZ59Qj2yIvLENsf969CsbQpYUWyaTdUaaaEyGzKzWn40fmZ1xzIiMz6qd +KU9jx+JgazIcJUfu2bxMvvUnWlk228qs5FN1bmtX3X5EdVdt1aUh7unmEhKJUWeICZVnrLYhk09b +HnJTn7JmJqZQ7L7xlBFpY5sOxW46GyKVyGj2oYnZjCMaGaIrEw0ec2hcsXbr8axCxSqhoqP1PPIQ ++0lPzlqmAcvU/UcZEVlH5vhR9A3NyNUQkb185GS2ElEVS05DIvkguqXKlqqOERkhCznjo1SxyDb0 +I77msLHmPJn+MmwuejTevS654aLGcp0ZnkqNWg1NO0w0Jh4RIzqhjNFUruod0txoZfwqGenUlRFL +ilyM9MdK6K4rlg2azQxFaMq2r+O5adDI3q4zWC+Kiy0JL+8HrUpK8f/Jyek7E5I9U2PFPGSjOSNP +dkI4WGjb7qy1moZso1hsqpsUXaYNNawiV1w8F9VcWJ2qV0X+PfTJoJnIUJDOe23CugaNNB1Hppa5 +oNVRzl4vlJue7ldjH/ah5Xye6yoXq6q7dERSY6+zSWetZxTWFOlKXT3iiqXm56JR851lysR1V5/f +1ah5Pj06StmoqWm0mE92ViTCQupKTqHhb9S+j72VFSeJ0aikG7VTgXAguyzTkboySscOYu+NJPFW +u6TDaMyKyiwj6e7MhqrkdS02aB/ejQwjF/MastmgtVMm3SgaCmVI2lKNohHzfUaJ5nJGxVjJOWzF +9E5cMtYHkQsLlZ1suGgoJkdjyPW8t6khObvjQqyLSamcUbIxjXpZiSLT00zuG48bEw1STpmWMukV +/WwlNabKTfJj5BuK2CezltkMx9nZpkpPmZBp6kgcJhdlRBEzlsiG9RsmExoo6NacScmV5ymJlLRx +ctEZYyoNqvm0wjFWGBnfEm+k+g4jH6GBYk5ei1lfHWWfW4blbbbyyVP/NFM2s6S76d37VE/uQMtd +V0rlo3yrsaOxYmlWH+mkxuL+rOreM4+HXDtTSY06ajx1KqnpSG2hOu88HaK7E3LUuLC6+7ZRI/p9 +l1F17FhKrq58ozOX7v4Td668RcZG0kqa0pw6RoNGzoZYsZ7t2QfRd6WdQ+V40LigW1UsnZOHNA4a +G/FoKYvuflvT3ZXMKrGjOxus2ziks/fUoxqbDEV9urFKWDXltvTdNnaW6Dqf/HGwxZfXVjatnfpx +dzEityO580M9Oe4kNWjFuKjTO5uR1csaZmTkVFqWMqGrfWI1nZfEi4fRkEVMi/EjMzL/zyaf2+qq +FfJ9yKYX3Yy6bUzuOGIXqV7/OqFbd+FzeC/STjjqM5YL7XyD7uLkaKzufWrUCpLNPYMu86HWlIet +lRO7Fk1J0W75HW1EJEO7lbwU28cYj+4spVrtoNsdOYvo5MYn/x+VSR2iXS3xsKNyx8rH9/awm8g3 +FGKdiVz184j92vGv92H3XNWtdSfyorcduvyEVCNT5v1jZyNzNya0sX6UMUNCZyI0tLVcwzHjgnyu +Eo6ZG1X1RZO5+CrnIr8jrfDiMfOocX1HGtnkuvGCaorMZjVVq4hZfSvKcq0f0aYVjR+ioRpDexHF +hqxZXTV3mXPcit6ce2TO1UnFDp3d0V3nZBGO3UxmndNsM3c1KrFSMyuFqNibpx618dXZbCQz/Uiu +59DRtWqN1sjH6qJJfzX6W5F5d0F+3c02bsXdUYt1pGU8Mubmpvhy9Jg6U9lPWPZ60SDr7T73s6NV +jUqro97orbzJERn6RshGTzdDoY7Rx3yRW6NnkYR8H23ZSNIyGYlcnd+cnUWhtoxv1YXoZjQf13J3 +ESraZNcZL5bBqMQRBiOJPBpmUQ7kQGixGm0CAPMSAAAAdBKRiGRCTRJW7xQAB4c8GBwUEAgKDhQc +PnBWMCspCiAAACDKAEKRAMBVBcji/fj1smis6KusZsQXfXdQL33xS2WqpP0i0u5jnNa2WOZAxkdp +HokvZdNdqGedzegt5KFN1DVRN9bH2UjM2eLt+sEXY9zIxLktTsMXmPM+VK7+rWcRy4ltjAD/v+ql +EouVKXmAqNuhpsQjHF0LSfdzvE5noNVi02asFNgjebWfxQPnUjQ4oqp6Jr68D8T2B90+XSSz3WN/ +JUZf6J3jJbiUEAO6sJSjHb3G4PuMipnHqYZnQQLW5xue9A8MoVVpkh4ZB4578TBV8G97TE5ygUbO +9fA2Mb2lBgofd3R74P8jd/96LiPi5Rowfz8bTr7NhH047oV3ny8FCGp20Ycnq0cYjwvk30aaIeqk +U57FX3JPCeXO7KikEnAwT/5lW22tCogtg1FaoxMsyEB5Fy2YQDf+4bIEvMVM2YLxQGTBVp+vyFtt +gBdVsSX0NSlrtkxoPCBdjhJ+D0EJ/RfBLe8aWmmOebIsgePuDixr9l97SWKD5cIbGf/crqoI2h/H +lO5UwfMTtfC8F1xR44vvvUMFSAFkfCjch8zrt/CdsM3MxiMCvUyrDJKoBuJV5pHRHswfM/uSURcD +CLQVfjqPds9JuhNo+Vx9Oz70+nlqv1VKSxUL4W4AArMbnHosiEE9pyIDJONrVs+MWX0Osolj5VYO +GRN3AScHkSdistZ1oXMsntXr1BaL42agX2pe8IE0xWsQnSDb4JA/r7r2AKYnIVCWwcGY6RBCjuX/ ++GKx6sPajkw+9V8OjwKyl3dG5zTprvRabUAPV9DeWXrIN6Gee1H6oO8rX8yHSeBwLgGbIgPcrn2K +7lC1+Ks+WGwQS4zcCZ4VRgaGWmQb//hF6p3g7UuK8kIwGZ4BMeIiL3VadScvxOSTuGttKFGm8IzB +fWlmRLRKv0xpp6oWefhdu1i4tJP/CxivYjmkDkKxV6njEbpf5YvvrfIeZEk9XsUrLoNeRa10QV5M +EV7LV1lRxSkU7lOCZzo/DVBOfCEl8zJAPjSvxT2xy5YQmcFMsgqFwFqdlhUv+So+icrf5CxgfBVp +bdz7B2zzF+NnOaXTf0CKSiWIXcinCtrdTkjgq7xMH85HMtobBcdndsVjRoWnYfYxWCcurSj/KsBp +hZDFcndtX0W0DUmuQAkRIlAyyVNxcdfri8GPyNu0Z5Ht7Sk+b0QKgpWRwBBn6sANK5gVP0xS53u9 +orcO8T99KSZtEyQeYq0sDAkaSGxhRQ34cadaYYWyKwBPpO942b67Tcy2gfesISAMFg0Z3v5mhFhx +BbplPhDGitF5COS3cXys4G4wsqTqxVh5+Cz0+zdh40bWsQJWV00EMERAAIJ/ptpjJRIySVV6KZEI +joUDOfcg2UWiiXAL5SBXbz2y61SujhXjkSVW7MoDCyumAF6wEuNGToRkk6VS1dBT99FEtdeCQ+5K +jGDCKbcQfhWrK2XecSL4s/lE/x7NhE8z25Uc/pCgnRbi/4Snr6LAj0gSYFj0qxgOtmv3iMw5Yo6p +e3taPaCwD0R2DQqL0OtzaitYAXWOABRWIPb1Y0D7dh7ACtgW6fxPbzo6vumWhlzb6lU+CYKKcNFy +cRX3zC5Mf46XlXaUoVeJ7x4FLf6w3lpEAH3UguV++Eyu9ipRBPrUIAX+jhAVvMrjXaNF4lXu9TUq +ZPAqtfqfOYbCV4khZcK/oNTE7r+Km+q16dnRDHj6AgTquqDveaPwpf52ZX+9yqvypL0KmmwvMkVl +NMWYYDkiUY1Bs6bA/cEmeYxxADJLXQq93JTYoy+FVR1wg5TuJiAwHGP8P0AebP1fxDCubSl+S/bj +iCHjzXrs4+CFEMZjUCbljRPI6toGHJ7A/g07eOdOW8gI0W0+TGr1z+bCw/L/We2y4ODofmFpNk7R +7B5spSoyvPQTWcVISTYZ4L/nepul9A5QAhBrGTto7NEHMF79MjYxCsxT0xm7gMag3LGjRiiLCkd0 +lrwoRcD6wM5SJzUf+Wjhw7JjscB7/lvhaXEN3smaTmltmKLqMB1FclGTpdN7/NH7AqMUAecK3898 +NJDzwiH5ToHg2h87u8obRXb90wC0oKOHenl71ODW37ieYPdRUhWotsGi4STRmRB46E0LNy7ZPn8J +eFqsLRi7PQScr1WBcPBoc1GuwELka5ocy/CCVJx5sgKDTVc636eXtLSXy0ByyUp3hAQSLTSrOr5P +ABLmpmjg0a7Y4xpRlK1+BO2ZQAgBfDjNsb7ax5rvInrouChdCvi0L9LzWcBoBeAJz8A9vbcWs6HA +v5+4uC4AaZNhAWGZybRAHJ0JmHY4JXofMJWbSciHYwEINV7fqA2qg1bt03ywg6jDJAwZGZVijQ3X +GcrGe3CuZy8kLsy3VeiUiKSm4BYSa2OAL8qLtBYv7XYMGO7x9AYwqF84X3oJZkRQEqToaJNt8wCo +sQmp+hPzl5oITUIlRv9xDhfRglTJcDia1lrLeYr8hScgYxJqqObBm+PaU+gZ748BLNrWdLoQGMa8 +kNC1ZuxhF9Z9KixwZAg2xutp/OTQnmc0meP3bt2hRTdnlPrUD0iKwqs1B8LMFefh1iFNcfb66EWC +BBuSINYxr5f0MTxCeGkkEmAGUQlPJQACYOnkrYGdRwEvnoyUwo6+dKgtD5zXGcOSP4UTUiew9jIb +2guuTd0RuBk+NG7VcvlGskdJDA7UanZ9QLeWabP6oJLSRS5UN00GJsn1ZhLJe0yUW4j1VXtAbQaR +i/KoEgis+HmWP9yh7aEPsOLb0h+M4a942kBz8+a1I0WTuG8r+NtFPtOKDZM5QsGiV0q+Gk8tWU8g +T/kAV2PxNNtHwVLTDlNkSULR6Y5DxRJvranN1QR9si72AJCMC0DIpKrXVVkaEZHJ3jlEwis/9hzx +oLd9jlDX4UFERshSyyxrJN/n+Ok0rmTnymF6vjPdK3m/VRHZpC93HDYqvun17fcc3yWONaGblJaG +NKvyKFJkclOeny49LFZJtOK8sfzwpcwSDHgmOsWavHmj8wYfiJb6zuiUWPRahpCo02oKLe8IHVFW +WdWEesxYicwQcpgHFnZ1hNEHygOplARzyo+QeqA96hnBc8dxNeP1I4qSwg0pIfww3kL8bP/G0TYf +8JnjWGOPEkvoD4GBQGjvliIFPSFa7JkN2ff1+RGDGLp3ii+XMhgRQGKHFY1iYtgu8sU+xUCEYU/4 +KvavMB3UFjXmgxh2zH1C/Rivu/zarueAq31HbxqKx8bUpsW3y9DtGazaBmX8PbtjqNyanzQsh7gz +hOjHha2qTch7TxyAuSwndAA9QZif0lMl0mikH/5BydhNj09JID6T4x4LbBxHyRDOYxihCQbuO0qf +BkQWOfVk1fCnjZtS+nUpbFH89RG6VqQio5D3HzTMDvVKs2MrXV42enAaigRwZAH7PUq/gG9aJDfp +Q7Afrg95FF2UpjzNodVdOGAHZFjkbjA3Np8hAdDAqa9ISnA3SNER32J5CTGM0pLI1iVJnjuUDtkI +8JGx5i8h7BeOD7xR89OiHAr4x9DQIf02py959Qd2LZ47PfnByiQn78jmcmEgWgCfBNWdaAS2FtrD +bqm4lz8pNXVCehCZFS3jBXrXHfPktFpcVFSZWIA+6QzvuqtgEgeNGM+NlzIcN7geq7D65K2Zqvar +zsoLCJgzAavUgiDSkpRpVpeaKOpjNjMNboEdDWAsHFzMVK5VHI3T9+05fPiCxLgo2+KCg6owIHB6 +6MTzFBFLgaG3tl8G8IJ4YlEmplqYFF5mBQdNGaIt2MUiYsGlAqnFOFpXqB34O1De+ZhPFIKiiErf ++jOgh5dPHxG73Cq48GrLnzY9fYUkzKGiiHpaybUVFEXfSWJlZbQvA+tuYSYVIHCCB1xEMPQ9sBcI +K9XpVpVIRLpbLqDtQjOM48dH2F9EuWYsBgfLiTH3AjU9iQ8Onz1w/s87vECvLk5I4rA+ry1iva9k +nS6lcoNZY7AYeJivDV6jPOLYqh0Dbrecbg9YunpyIkj91nUWNMwi9LhfgV4iRbX+7HvHQJlnMtEB +a+YY08850+0DzQsLyCoIxK+v5y0ISaBiUwg/WfHW+hGf7YL+L+xE50+2RKDTeU/n2ddEzZ4QHXR5 +XbLsMyeoHHbcjtZXKqdZEGDNU6RpIjgeCg4Sdf69+n5LURWwjB9r90pNd/3bOZCXqsalUFoPeGbh +pMDKFgYK+gFFCPtadmBYF2M7XOyeGysG8yDlNfId1H/bxfg0FpY7jLwhcblN6pOLaSEwrxe4SVqL +S49sCZ15yihkqq+zeFAl3DyV1Hsc2fab6doWRsAr+ATMibpjVK9sprsnkq5qCSeBHKLEPJ5QlqV3 +mUhyAlwj7eBX3jtRXI1QSdGJCfsDKFVQOjOmwGllbRd8g7x+dTKwrS3MkvTq7sW2pY2vzW9v11Je +UiX8nk9Axcpr9nfBN5Z9ispI+1U9YV+kijCRji9tzeVqop33qJOlrSTQnE0aiFfiW6jsZEFXwVtW +OrkhZjK8rArcTZp94hIS+3OcpED7HXa2Po2LKGkVxtIXhjTT7f+jDEJncC7/P60omJu1+toJqQH2 +EgWkQ01/LZmdCUzMucWrJynuxlRFXfcTYZyKmG+dcTDa+k+rhIsGApUbu02jJQr2vrvwD67ooaCa +YPTAjz/lB9h/n0EQUycznTlPmvQPS/9KCq4dL7YDgles09TFhAKToMlhwaDOUseYJbCp+8BlZmlz +TJYtBwyyO9jm+OqLGlPkE3hWjzbYhrCJ64fCIGeQnwMZ1W5HIseLvBtood7ojXNZ2ApC2vcFKPWt +2aTMF6qfi+JqZfv8wR4f/Ica2SlDGWPSAhdAex6TbW7FnPQ4MA0Q1FSUjWGS7CAEULCYYgN/iCTO +vUn7YmyLFYlrd1abcHj6uYavguw/bDLXbJ2HGWBxH9PrXLNl3LX9dntRjNsSrXX3IrGL7rJizz3L +P81SXmH6NDv08z/zpk14zJh+DBEDF8DENqlF95bkTqfj4828BEiXEIvJ8mDQmIXgZAnRwik4fsNT +qD+Mb3GHNfyECnc009evbOMvBoo2gLGPLp1Fo/kyIpmHBo1MZlN0fql4gHKBhcdm/VWv35yWrSJC +EE2MGDbGZ2nT8n1y370WtzD/fOCMDxGmXGC6QiR8pB83x+Vl+neRHx2QemYa2M6y8x0kHLzDIZmi +TQFNsB9Thgxuj7KImRL4epw+qNHTbEGGNqCOQulvAIidEygoK6WEA9Z24caGAOk0qSCa4mhxBFYP +mHUBDAgVcDbqy8F7kr8vviylb5irx1ChlL764psa28xgHIXIHRLd9AN+wb2OqHicNVpD+Lv1zu/P +9OrR8JTJm5ignMcAXMLMPfmSqZEGofijWtDHEb+xp+XhOWnA+7T0kwYmQBLpYPL9O1ySc2bagilp +C+w54h6Djaw1hb8ZrBGZdCDl5EjKIrBr947OQnqoajZfl6UJlHzTRnBDFH1IH5GQmE/htB2S/KMG +ljqPq95nBthEr+GO+tYe0zQgBb+Ka/K+YhFjuEB+snu8FHIwno++Z+0IW4YohYXkEMbyVV+tHXHh +KADAlCjo7sQpCJmARZse13UeJvI2n4w57UiQyRVYsBOX515M7eJg6/cV08B7oiKMqNdBGQ0u5ic2 +KMvxSX2PP/SQP6iF3JmpjtvmBMGnQ64OZrCMR3p+Gci2H5FyytoEKgEB/VPzkLQ9dPkEW/iwF/di +odXM/zYIMAwtr/B3Rp+7CjzmtDELnQhBkWt9J/2qYFkT5DOX6eYBYd3DzmgULEYDPU5f0F5MwxED +L5af5CpCeTpgeam9J+GWMQeGnf4++d2j4pRphxeUI/N99GoDwOw88qqgMVNyjNetg74MlOYxKTpB +UrIQbvD5sKeRcsZ2m7BEIqwqv6ivlKsCK/FPwb4GAbaqwRdcdyZ2DvwXx+bRNd61FscumwdEwWw6 +jqDFVzDoQeBbmmUCNHC3/nXHbH8F5j5cGmcmif0ffiU+CUpqQypAyUVsVDVRhRw7cSjA157Y3G7t +SuJIEdxFVRdvoYlkEhvsVZapZXiegge/+AeZ7fNDUR2ZD7qlRHLEhwbMTrCf6KAwd68/UdzcZCvv +iM/cO2kMC6IvzDVEhXnKIXujApPUSf8DuMgBQ/P0DhTtElh3SSjqbmMc+PGa2S1K9ecR4GHYtGXP +WG8Ql93i0/mFVroLvXhZKWWF3SGpzP5w5qMojYegS4Dnx0FXzqJkZkOEh5TNKOaALEFRGv6XllHH +sAjrZ2Ikf/ij+nbHtI0iL3b0cRYouPKHOdloBTrtjj+slOLtB9hTTGnP+dpoYavi1DrAcHmt+GUm +evI49GUVSh3Z3b2TLrODPdomdgt+7SHjrX31gDd3rOkKsaWguW0PWAc7T5fi/eYm5pFnCfeumrL3 +F+xTw4LiqTrVKsfjD2yCauo4asEJUMevR2iR34+OX8uPh57Q2+653EbspLEXYy6cotDvDmq8UvvY +EFhCzV7BYb2XdgnsCWQzjzvu4HUZLV6r3rr2wYV73P3tOwvY+lJuFpT53YZcJ7SejD5gGW8J0HF+ +raSjEDjPlqOPHYfL8LkoI6ZV7Ltdvpz+fDPwQusTLXpjf1tNw8g+v5PkipmoG7UBfSYbafBoini+ +uf18jwnMsKN0qWwyzDGE50N6HhiPzxUvDAgMUxA8KRWtxCaYLqvkxBadHxvfaDAambZ20VyWXvIo +PgHOAVqqxqljhRwGiFymBXd161bwaJZ+i5adTkNxD6jDMwY2ucWTcPJbG8oqHrxAKlrdpZMgCkft +SGHzrHu4IQcOxaHDHbPaOpdCINc6Rmdod0wqR78O6StPwPJnNbGo0aftGg2kfD4bEfaeHYm5sCSo +mDKD0gpgPU0593YAdBJy+gtA+ilEAel/gARA91P7dTkAYk6BgOFdnBJvynT+KdO8DxGTcooxZcCP +kygqAdRwDG+2DxXjPyFpUBKj3wDgDxUfPHbigPeKe7CPAY03tK6Z4j/bulAqG4bPEXDaewLptmMp +2APX2xSAJ4L+dcfPevgig7YMUlgeZXYQjGvMelU6DyiHPIaXp1+ffRu1wHmewOPrH6wWlFLqW5p+ +0XP0LXSod54nkKFNo3BiKhl36NAA8zLlBrXiuS7RYYBhvgxDHikuErQHa/pFFK+XE57C+z5dpOSz +ML3BPx31LWwv7QbiETKwT+ZSCwRdmrj4z5H17I14uZJt/LkDeC0lDybtHsdSUmk/ixwJhgwpavdl +ozyRJ2N0SScQJllqXLkCp49CHYJsLB7uFz+PEPNK4gDFLncXa7CvwiPcOg614XKvoJ/JMZOwt4qO +KEdn//BZYs13pfWXTEawgl+OkemBrEukA6/zJAsDlOq0tWBECCDGXrrtL2uCRXlEnneF9vkQE/c8 +BrNoyZZv85/p3HJiuqZYygTMn+hY1cqzDeFfU65YAv5N4MmN0IwvmlFIDaGcNl/Alp/Pu3LFe7kR +umiZEoxd5Ix9Yi1Yx7IXKxdi3tXhweeEWQplZvzLZjxDLw6jyi8LeITH3rCRbx5WNNiPAow2KT67 +6Ffjn/mfwhGBgR3C7PFsJwscrUSH5uYeKDUBji7zKccXJuVtWfToH4eSbg36mHRktKnOpeQ9ihZE +sfUT+G6RfveREH3zcC4Wc0VLw9MbVwBoP6wVujxU8w5jPfbZOpfXTtfmJSgWiD3MG0rHSl494GAV +R0IIoAa8c2fRFi3mrLeaIsBKmvCXy2DLfGI4+fj6Z912XLncOwwMsSOToyoZT+tAFnFov0Wh4Yu6 +9/MahstZszaoPQ6IZvSOGH8yfblcGryD9JJgC39gWavO5Nisy5hDAbSg7u/bdfOrmApT2cAjFpV+ +mWu0DMTCf//BQtztGw0O3EYeV9OugPuZVqJD+6nqfnB0aiTJAU9NOb38TAnjx90rT7xM5ytQiwK2 +MaNnpgtaHfUDhqXJJ9yWGzX8vtiFR5sLeJpxpPB2eoknqXh5v6xSHJGAmaEhCHpeHwePQEt1BDW7 +9QwcVZDn3m4VreHVPQhDnFwtH8QNDVV1P78RSxalI0+n3ynZWemQeF7sWDXJHEVkfDYpCpXtrTHC +eIsYf2VOX9V4NZD8JB/Ul6bcpw1FUxz0mTYJ3wa1UvLdcd6EOjlWvVycrKySluai1N8+iocoLKvA +Mauie3hlAl/88cWaYSGBxdZOWfJ0wQAEvcrTMTF3DKmOFdmqPIy2RuomFW8QfcfhDcE5+eyf598Y +KYKxkQai5NS5HyBw3vHc8A2df9SGnlOYbc8/Q/iIOrAL9mNylxirU+gd2OpFvA/myTwr3kd1b9O3 +3At7c2fHwc3xv7CQo2yqezm4fKybNS12ZedyV/gn1wDgYgOm5fL93yoMdWKqqhGgRaAzWvAuV4zs +htgoP2JYE8RBQV4eNhs8Fs9YA8l1x5w0KHIptVnbVsqTQX4Ejw5m0r+plA1gUpjhvDyIgu7PnTow +20IdDV4d3wx9mkQ2g5bKSAMDFiyBXDi1F65Vxa7YdHyN0xItiTwqY8zxMoCfYP2BxuLneet7AD9h +8+nm1R999/0xGq6vbJjWNgZ2Rn1n6WkxvhzDN1cPwz9XiTcWi/wilHhAx2hDLxmwdCIKO1o0gCzi +xbVEp/DPzHb/3IAfPMm7YyuULaE9YJSXxi6D7KQP05mYpC0N8kionlJNgTr71t0w/ly01QLJvit5 +rA6Cf+HPX2FA7ukb+nJ2vn9+zHJZrGcs635/o2dCsPA4zgRFYDzk2B3D0+N21mNsLJBKdV4wRQmL +DGDGD6GnGX6+oO51lKSdQSK28l+UqBHgWdnACXBK4uJ/m5odRbb2K53hIjmpGRJ1nG95BVXzQ9ob +jBnZcGD/sI4WyTJMqMkE9h9BRwInSiwAT9rXtWsrRThzpM0GtLR+mF8PrhZs9RQWzYP4Uo26PMkq +j4C7U0osCL55VprSwjLdx26EI2IamWo+uT9fkKkrEgee3MBHdOVQ7aNlA47jlpvVzRdXloU5HV9R +b4D3Uj0RzRMAEgmFM/gZWn315v6ynNr0fVEKOypC693Ec53b3jzVQGa/hsEjsrUeWWGJjaV+G7kU +ZClQf8lid6l0DI+Gbu4AetLxxVtMrYvspXJFOZPgYIg2r3ljt5I5QM7fjTKSx2N8jvDX6ruEXeBj +qsuJHiTr3zKFhJRYSZYK3zCmX7Zt/4fmFrBTb/IvM4xPu4FD5R0Ye3jKUUw3ZhJ4jiBYQ0FoyQHB +24kPI3+ifR72cc4hkZwfeNiKr6HieasTxlA+PhosMiaNEbsWTQUYMQ4urhSUNGd6UDk5ylcHH+We +uAcnK3YOXOE/UY8rxO8o7GihY81UJKi4TrTgLyLg1aXekVfI762PiNWQwxojOwYcsVlU5/nImjTR +F+QAjqUQtHDiIWbpWz6UxYjhbpY/dVdRhycDC2VIzgzUZtspPqoAxihcaupw7joH8k+HAgdv2wX4 +hm8X11Dbs1CdY7Y+eTMAXSt/9QgQcfwUzi8l0zCxp0mf43UEIGz7z1qgGhE6SS5EmXNBCn5hBSOf +ZSTzwDgvWEgEAc3yIUrLeypcOVxxTKspjzwUEk/BfZ4IMfe+3lYyeUoAPfoqNJOPyoPJo1KZ3+hT +/BlEy6ybkyQegpYjSt57u0BLH6MUVYATto9JbmxYihcDvMfmyA5fOU2zpgt6p2Mf70FHfiK7CyTA +4f8eGZWNvXrNfLA4jo4TCQzd0viZJ1trvyMWhTJSTip7Z7JKOSoR8tE4R/ND+2+kGwdzsjMrOaUT +myrLsRyqbHF4tD3446z6NBCZ6+BlZvej4cVjwNQK/RgYfg4wetMdRDJcmhEY5Vo+S2wEeleDvK4Y +Ag1Ymi4tRwmAgpsXDjIKZnjiMsZqRovdxPqZAmVMVoaX1qLhpSHGBQvUiu5tbCIFKKcD8uOQuDGO +sfb7+Bhxd+n0bGDgnvvwAJL0krYbpQTpdFmoiLRORNV8r1G6mOE8D+oTIrRCynCWjBKOjE2nr/J/ +mRzAM4KJyVrEJas8ybh/Dr2Dn9wpfk9nGptHsZeh64kDOD0VvqFV0zyV270/hi3//Hsl0tKdzqfl +Rv4mKFq2SqlzDR2p5Qhxo+m2gFD5L4MiffwjXiVd7ijTnoB+dpV0y7PqR3xo9KJMP9XrpldYIQ/5 +zZljAFEavBYCnxC/0fDskUjxDmXYXGDy4ECJgbpM+fyOg12/ODdq83ud+EPa2ExKAt6jGAoEP0kr +gQxmpH78QgzuQR/vdMrIBZLRdSvYklAaPSQsd0+YBWUD4O3S0eAEYvEsnuf4OtJ/DQxLBKxs4ZXa +f3jCU02IkIXLNF1qKCecxrayGJQUQ/SogbyILvuSvKvkHpnOMK+Bx9TS+yHEAK82ngplexev/9hN +LDm/5Ja2ZI5siUoojIiF9qNXmmDgEp5VuzL2c/douAIU4G+i/FLiWFXaCyjBQXyFEHAGtJRUw1SF +FaXk9L3CPvx31qXMRD3cS5cQqXGpF1PIBAikW/B8VZo1AECOY5L/03S8As9zMegcoZJvTW9EABhN +s18vSkFgY1HOvJiXvHg8OA/SGlVfkUZvSqNhTqN+esu81JeBVUAVGrOvbrceSNSFaLSgICpAc7xl ++mPtFSr32UD0KNTLyrKpkQObeXEyPM7ee4VomGMYAfuzQs3zZlogjspyQbGmpRMe7j6Nw6rULaro +oCbO1aw0o2ExwRU6d0ZXftegF10XkMsvutguSbrq7kj3DBMZWMepnfNmqyGOIJIs6tsxIraoli4Q +x7YOQdB5sN3ZTYIpgPWTRfdwrJc/smeW6VPXX0NfjXev6dBQcR7uC/pqTjBnBGhkOllWf710BHDu +WUAxpCZAWgimMje4m7odDg5qBke0i8jX/q8qoPogId2AxgwxF1nqe1XoXN2H8hacHb76AjYyS5oz +jZgzW9LedC0JFXhJCoRs/tSkfAF0QbdS9I8CWKSFyW69iH/r4rcfOokv0r/jIVidBtDzxUfQHdW2 +9gpgek/TJoVDkWNXyqMBvcrKqo/YCkL7QmQfs+cxOk5TuC94T91+ng8pzkzkGi0+WwXsUYe/J6iT +Qbe5o0KWPJV2fTvjo5+XGKe/EDob9IRG3yz+60jZH9/ezblQU/xses+pTNUPdgfw4vik4BOPAJRW +BmfJYYyHIPlY6bG0B9r2fUQq6WbygfCfEc+lsL5CVbUAx0mKWEyMulUKY2gFn17NI76AebpeZ8zq +idhL6KltD7UyyAE/qVBw4W0cmW4UDUqzzN/uCU0h4mfdj9hsb1gyx3t8wL4RNYY3wPgIsq5kUttK +24s/dx0trytOVCv0BBuhxlDLzdI4h2CfgoX0vDQYexLCntoj0aPbgIKQ2CoAFBhbCKCO/hLCHEfp +9dAxUOvTP8Z6+5FSHsbNa8GrT6umeolJfmEyj4dMeg2sZukKdJ7FndM6ys88gNqEDMubp9ktU8xE +X+CL01ThqTeIbkvXjue1/r7p4CSnqsNYSIx7INqQVhTayx94n42HvCtyNspMolPPmP3gIT73KmCx +kWrRmjsjAWFnRtxiUZMpZFZheg5TuMtL/tDMAA+iB6xiiKcj/xAD8oc4rAuoyigxBpIwPlsk9Ezw +4AkcWMbNKdoIy2LNrpp65dxsQPFX2DOkAE+mi4SBza49V4ki8CMDV80wh//l8wMaH5WVynA1MT+C +D8zuIH/1N7D4mmLHR5yFJfLiP0k/r9Ve78vxE0HKOmJNvxwQfknSVQY/ySxP87qGekvGQy87wgCc +yJwQwEE0hznsr+pzYwC0NNSRIPHZTFqeeK1NqVy/WKe9eaTXk9FLpg1PFtInOH6Jpl4t6feTcw23 +ri/2PdJq1SlajYDoA++0UC914DSfG5M2UAA+QAGgfUZhkvyBQb/qE8D+k3AO/vXDUZZT6GdoMyjm +Wc/TBpodhfnjxZHrx4a1iUNMSL8NpH2FXDmlU8Z3FfuHQs7qR4B9GDt8n/B98p287+GZTcQTFwO+ +89MMDp+39AxbdRFfLhiWoZSDPnKcucNvsUedUV/qPMlzjqxkO0hHr7uLfgNyIpA0lfUcoBfekLk1 +ja6qRtadj+r6NBAKNrRFFzkAMgA8WxecnG4OVqvNn2bTuoQp/BvEVQRgnuznfOalXgY4KYqYigZH +hfePNd9ySR43quzDZhxJbbV9Q6m3IPg6n0gO11jPlwp5uL1nmokeTuZydloquCBK6k6P3/OrIjjy +Vosx5s5SCzqkdCPMaeLSVLfq2ZKOkK4K6mpuYbBemWN9EvPOh0f7MEbdcj1q+1rUBns8P8yxHJph +03Lh8Ejdk3bghyUHGxWLjOQ6+MOwTw/8ubCi0S/5xP/z3sk/Qzr2MeQQYvlflTz7qJFvyer+PrGa +McNm56RO7S3wSbMbjxsYv1K+VEUBeab6e+43xjgd+Pt874EeHA8ZM1Dnhzq/SvxkI3ugCXTJ4Rgc +apskCHs4DsXYeQM1ScyqHXEKZepYKyMXyPfgHGvGMsLq5mo4VhGE86WMrBzoMrHckXy/PCMyWT/Z +2QnwWdKJ8NQxMl2KXFbDLPGTTMjxMACzLc9VTNbKUMqk8frgO/jx6nrQFvngseyfWp+03vXpaVp/ +B8kiUMODEV4rUzISrSkbhMdcc5er7Begpwm94gI0BrPxoHxyPbDE+redI2A+8zPSTXk/3cNIVw7O +iO4YvKYewarLhG6xgvt0IyMKSZkzTWTix69vuaPsmWVcGZvxHo3Rsm8RTByAr1B+EdODP+bmq88C +uwgOiBckftoPXteTlnqJfVsbFEgMEo4dN6MXf0MrjRdrt5SmJzuS8jrtd8epGk3dVvhWYOTIVpIT +2Bubqg/Jo1+DhPdxrQGD45gHq03CrO/AG4Aj58tK3aJQHLvPAhqY/90cKnbaFn6RWIebeSCz/WvZ +ZDYjOBr4Dx4dSfBWn9X/f5zCAeLcb+oBaAmsKBaKWkeqcRARMbmhzTfkHMaTwQhPea1TRUnQ/UB0 +nW0GhWm+YqRzut3yVQqDW8K+U94XwKEHIS5N7gsG4Th0QjAB0ywzMmsJdgcMM9tVjnCouQ6ImwhQ +NpUsbUFK4k+EU3zgxwiT9hqqughIhr7rggsJY45E5UnAeBOAlgFg5uHlu/6FwXnLdYp0MJgAE0Gn +pTYYWFu8m+vSrZN2+SpNMo0uNBiZmDwkjftCr7RPW2oqgRWr8KOqsockihu3Mte0eg7l4ksTtYgR +YraY/VtDzMsr2HU9Y/Ii3vVOwMyjUQjHzRzDdHOrCtykDqepNKdnKPnxo+Dx7En0cIXNd6tj6JC5 +taOek1RnQjZoZfTc36ATWZfgAJAZlKhFh9Z+nzC8O1hatLBVJoFW+af0cxI+/CuVoJMjbBz4R+HI +u0BsinHbGbgzYnpavwz3iQnIS6VQUO703seSG8tr8wY3CuqBdwQeZucTqzNsLfevHirCQLuL85Zr +xIUU4UZ2t6jKbeNi0bdljTGAZczIFrcLSQ1u5zgKYAgtZycvltxfItCS2rSTJPt6lW4xhpOVAUbM +4gEl1bmfhf/JeoMpWyhHHxuY8nhCRZ+cZpl0G3fUmmDE16X2v+qCvtrijNI7ZE6gnGWeio+x5WHB +TfQVx0jBeDco55oQ+CoZuLZJB6zQWCl/2q1/vO6mCp0cRApdzZkoi6cjEDG6mT+6YXUQSKWaaC5R +GFIXLvjFuMpj3D7SWzuNd8RJ4Ty0rohWPQpybqrQlZPLZMmhJymwgNoycyaWCsujiV7KQeaifsap +YtfW6wT4VZpRx/YgTq0Rh+Hqyg/fpOngwUf0AUOzaPvzNbvkuiEIN8RhuKnznDnQteiUJvYYNCIn +UF4a5p0hHHHvvcWH8tzxG4zgiPdJDVxXjyTBmO/eNr7Zab62TU9jyP/kTMYZSvs64BXo0J0Axc/h +kKOQGeU8iuoOGx4BGK8LGI8WRDUx/BAGZM5P/kR7h+vamsV1vkpHM86jMnd6laL7SOqoK3Oc+J+5 +pb/EDjhYPjCy+DD0LeCreKc7xvArfxLi3dDuzHsS61fw/J/rPzr/B8KEvAx36kzOQ9rE/QswuQfD +OSQ9Ct+28vxlBz2+kJeVRyyrb1h23TUS3lm2uWUgew9MPWT3gl9qnxiJmRfocVnBeBej2A+85t8+ +H56hyZjXHSN58s52nIm/EMaAxWug8tQZsnCfAWx372qMHrFegnz4nw/6lTsNNLOFfHioy7XO6In7 +HbZEdalePd+v9JV4Ajdo/bkZ8px/f+/PyMiN37Ntn4EjOF6KDbOjwfNevcuWwMRbS1m7e0lmawcN +F0Ofdl5BVVie2V1c7ekIJvW+qzwKs5MsotOlz1C6qxi5QSgx5V1kLTj4cAGNOUfjvfyM1ExjWDo4 +3xCDonMXb/OOupwZyBI+B208oVYzoPCuXb5PxHZsFQMOMA6zT1BRaN85KvV7rkmGOyqcK6msXs/u +3C/YsW7AEs4y6knExpydQDoIyeMFox9Vi/zDfkCmPtCwWE1SGbSr73SWCsfCTaUcBQdv1n1SS2NZ +qlz7zAUgXukEq3x9DxjUfIOk5v7Re60zjmA4ffDWkIpub8CyQWInZ9m7CKTIxIlriIqOF7K93/fV +EZYDS2P8SczMXShMN3G7W4Nx9btawUxUvI7OZ8C7Xaw7ZaDPtNeZt2dMdiLabIHsJC7ho3qNTinj +F/DhNN4m7yzvA6cu3nZAUwewoDsdykp9iNNWMJNt2dN6RDVpYeKVnC95ZnqsI+5m0yaYCQBCz/ve +FUOqEOVMCodjTA/sOsLjP/8ZgVxznbc1j+1VHlQLTtjYrctt9MNEok6YEOMUV4yM/HMLdXebifol +noh/MmRYqqrBWb1nUwqeVDMQky1AWRtRAEyfd2HvPZDn0uRqBR0ALpU9dFSA94fpZZ8vMRVEWSmR +A1ifcpTm09L7AF3RUwMGBBLUbkeTaQZGUmhqnVxLVLdm/5wyIpWgCcAg243KE/3IZrDKytkGYTuy +qeuNzUbpsiFPyB1PGeJNzCyptFkCjoGziDeonZw9KyD683+3wPBBdDvBkI/ibldTS1eY85n7eF9i +QSjgqEjFeXAyOVjoSN3jOXN01MKnXzbLBnDqDhHNpxLjVhjdHRJQR0ObsX83IM0cAjjbr0mNw2DM +L2kLBuBLPSZN9f/zLs1rwSukQ2dByrt/FFfZ2cV/ssYWmRgrKD+V5c7wuMTylqubPDhPnoFrksOS +QJ5WRXxXmGFKgROREt/2jKhmLhqmiE+9Z9sCtzmo7w5GFsXCwq0V4Kv4dNKHqUrZNorSjK15P1xt +RSG2SKWEGtA9cgLL8YPLNi4t4SWia3UD95TdHiU5B9LIcBabk9A5SNArthzmzZfzR5tD47twstrE +NhC3Z6v/YfYNRTWU1BjphNsgSK8R71mKZcSDrgAHMlf7CRuHYdds4k7jUNhBdiJOnlVPJ5PdVQzn +6Xkuvko+JTk+RtLTZBhvgAb/F17U5ftE3I65VPhAY0EOgSnkw7iHurvt15BH6rkUyneYvfHStyZ5 +jQA0ektF2OPOEAtdA13XoJjkQQbh1F+RmcbB/oAsE1ZESTp9PjQKw00YRAPAzqam7AlDA5s7l2g+ +JUUn3yo5S+v9GqRoNyZNvMAMscnpgwkQhA8BzW9J1NL319kqnE45Zs1iSpaYcQyv+dDC422K+d56 +CWhgrxsWe4sT5qGP6R7OTUKF3EEFqE0w2qA8xcgaiLOnEVOfDFw3qIOrEPtGtYPUx16feBGkRyTC +uNEr1kNvZig8T3dooTcPmINuGBAd4gl8JjHI7LeWMzXLgIOMfXDfmLtAz91L4V/Q8fWjq/9kBbRr +dBMADTo0SBGi+Ikey3iy94fnRRhe0t7hnF8Zsl0bfPpPV/kLXispJ/A4MajaXji9u+pjq401BNSc +TyXjDDAOpo9RF8Wtuz48bofEWW3zExNgEzVeosv8ib4d2uQ3bYb7stbu+ELzhV5hny4Tv3GYbnT4 +HvzWbOAD71eKL3d1fNpaCJgbh43Km0EAsiFdK1GupQ38UzbWQ21P8GdqLSTaov3LMIu6maTy1uZ9 +dq6zswiJrrSeC5wPSZaeCbyak8ZZcc1nqhc94k6svuN453Gmj4hFlUF3RFri5IC/poEwMVCuxOQ4 +sZgCifhy56ZP0cWQa86ffyyd+jepSR72XN33zMX+QlUqAo526AadaSqvDFZjTzYW7wgyLR3J/pDF +M7celn+viNtzlv0/pUeb/6DJ5FQosIgWR4gh7I/VpNph1/gDIhS6hMZxRT8p3JDKSozaxpE6arFi +9oLOvxd6Q9EBXiaIjg7h/sUpuMrmcKXDw4WuDhey1VOmg26SjDnQQ+AcutdoQHRLoR+V9JiDPrrK +QaPvH4euoEe+QaekC2XS8wiAmiu4f+n3JaObUh7zd6eNbpIbuqK7Ixg4Q5ePM2gx8dwpQote7fa1 +Mr0EQ2YTZPlrKa6JXgx4IYSknQkAnY7RWNPEeay/7HOH217mQtCTEnmQqgMWwqmM3SIMivbAGBjt +RvEPH+9QUb8Xu5rFcIXFmyPPTXiGC8qJxsu6YH2jwB1YejqeykpJ2hUJLmUchPaLgYeYBc3A3EWe +WsrU6ks6d+UwcljjbveGMGvO07rmVXTxIipU5h3p3Hh7tqPO4uMl3yN9w+v5XXzLeu/Jw40iqLE8 ++qa7UqHL8HOs4Fv7v3/24DX1n9TwO6BUuAD3zEWMOJEdsSuIm24sNQoLFbflPhvUsyXb+roxKu5P +AKfOjw4He60Khi5PUdbwALAYnaamffi/skBVZ6GKjKxeh4ND0xRQ4PYVYVXhPZiv1dz2liggaqhB +triKZztFhLdgcX3PnKequ1qdAhEG9VjX/IkAtn9t/nw5L5C8scyrAHnoX8Gy0F2bvqp+QI7wrWQe +v5HpcCI1P5e+EWzVl4JJ1VtEngWw49zX5nALiL1aqebmhZlROUtz3CZd2mhpZ90nkH5o9Y1uy2T/ +Bu5vU7Chcl6pwjunNZmbkCeRm6o1/R38f0VxFv8yu8aM6Ijtv2gFr+LSay/EQAFBpmuqJ1tG9Rhy +NVGiZ8hLsp/Ko7q8EEFEev60crAkV3njFXglFs3Q10zgxdrYoUYnELXKXTsTn+f0PRjmyIkVigj9 +w86U5gdfzGc0wUqDx2ntBeXCGQuSlpXkh7w5sA+kHZCe0a3CifoyLD8SWpM8aq8JQs0Iawxembgu +u9DE6KWCBMh/KHae0Y/iomGYe0NH/tvvCGsvGBsExsthU69muxpW8syKZWvoK19NlAAbQToB5mD8 +1Ac1Gmx4F/H4OgGw0pdJjN6w9zLsuEJACo4BpX5nivA1iXKYpsuyHAhmn1tFQL6wDFchUTxOXCSS +ncxQLNytLyKrnnZzE8kFt0f4NHXjdx8XuDpod3rAKlfFhGwiOPHVhOQU7gjPI8bBq2AsfIgeW6wX +7BGKNJTUB+edmTH1TtZlXKWEBzmQKvdlwJ2pVasYf7a51h4L3hsX82yUANGTGYBCACFp0o8mqJ5B +OHvVjLzH9Ex/EckMNolAOQX7XThsZRej1NRdKklryVHZSnXWQOWXtF1yW9Wj9BbWldJ1Vi1JLtgz +dgpsyZ0KQmliei+IlOIWWqeXfDmyLmJuj8Zy6ZiC+knjy5ZzS6IqdUuBWLd5K+52uCzDqTXUTlEA +Dm26Rr+unAD/cs+jr+96tvcAuaM1uWcEbK306IpzC/+CMsLdDLdEBCRkh9/GUdZCZSopdS/YKtBP +H9NCyAq4aUDXdE7A7fYVsOjjkJyAYSUr4N3qzrgpvaQCxm4CpntVwKdH0hrp6GIT0FXA8KOlSAUM +nYCnUdXOwRUwVwhqpz9gqibLpqF7UgGjh1uTChg93L5UwNBNwHOnCvjQsBbOTx6cnG8VMNwPv/tT +YNeGUcrPgQ2wK+DTuQlyTcD74Ar49JX66QTMMV4BKz0t/J1ziuy5Ag7llnVwMSIVcHcTsOIcbYE0 +biE8EFkBP38Cln4FDB0LcNtCqLJYDX71qoAVrwdanID1GRVw612GmjR9MBPwECqzeWRM/4TExbis +WNlW+b+Kya2rklige5C7K+Be7XvOS9L0F2rfJ/B/n3iirRypgKWXhpz/h2BPVAxsVNS3TJbFXbOU +x1kpLNW0OmxLlXzHrdEX93FpM1vv4rMaqHmq1VJmTqUDi9RxTM8CUHOYxgG+VAVJyQAOU1Vmbp2A +A4Aq4NEzglJoAn5JZSVgBQzUUcrUMubuHL3LSH9VwIq+8MA/pBcKd5fC9Jt9RFmqulakMyB05+dH +0GpR2xDCCLIortU/XGkTzSCF7IFm+ZP6lY+ogEFPUc8yxgCFxrzepf+e2W3SDak7qeQtyfeIjBwV +mXeBFSfD624Et9R8c5CMwOtAl3iQA1erbfeA0Ccq4Pj+E/ppL9z/z6iv34n7cHKioO5yRwXMlRTe +6Z8YwK+e039PeL9e1KiARwbNNkWQYnyuUt4Pxo9NVchCu8fa0yH/GdITj1xcAYO/CWkp+82fpvii +14oAuwBvauFGnu/uikdIlChbrAD/8QLJbgFDhhWT0FoG+Mu5QNhXBsSpLtTBo2XhT0Q5/N1d33j8 +pEnTfF8FnH97aBfgcB10iwy67VQDHsNpmN1x3d3QO/kN8yfJrrBL/DLsawSfonjS9s8UGn5GVOYX +HT0BH7oKGBOOT/DcbpG2xa0k8V9zO8+u4R8cWMxJbM3mp8Z41wVDGnaElfRK3FHbagXfFgJvCAi1 +rYfbpSLo6Bpta5q3hXXfVk/4ahuuOMxqdPj9/grO3gBQ0qRtfr0Alnm95FpQ4jPQCnjjC5CHdPcl +ou3nnmxplEHDLyWIBmr7t9zGezjhSgmkfCm5nUMGQ5f5wlu7jyAV8PoJGNxUwBsulbXAP6A21Cih +efjj9+8pLdl4pvl63yTR4r2oGVkD +]]> + </i:aipgf> + </metadata> +</svg> \ No newline at end of file diff --git a/.github/scripts/dashboard_tiers/templates/index.html b/.github/scripts/dashboard_tiers/templates/index.html new file mode 100644 index 00000000000..14a2120621b --- /dev/null +++ b/.github/scripts/dashboard_tiers/templates/index.html @@ -0,0 +1,484 @@ +<!DOCTYPE html> +<html lang="en" data-bs-theme="light"> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>OpenHW CVA6 Tier CI Dashboard + + + + + + + + + + + +
+ + + + +
+
Latest Run Status
+
+ {% for wf in workflows %} +
+
+
+
+
{{ wf.display_name }}
+ {% if wf.latest.conclusion == 'success' %} + PASS + {% elif wf.latest.conclusion == 'failure' %} + FAIL + {% else %} + {{ wf.latest.conclusion|upper }} + {% endif %} +
+
+
+ Branch: {{ wf.latest.head_branch }} + · {{ wf.latest.head_sha }} +
+
+ Jobs: + {{ wf.latest.passed_jobs }} passed + {% if wf.latest.failed_jobs > 0 %} + / {{ wf.latest.failed_jobs }} failed + {% endif %} + {% if wf.latest.skipped_jobs > 0 %} + / {{ wf.latest.skipped_jobs }} skipped + {% endif %} + ({{ wf.latest.total_jobs }} total) +
+
+ Duration: {{ wf.latest.duration_display }} + · Run: #{{ wf.latest.run_number }} +
+
+ +
+
+
+ {% endfor %} +
+
+ + + + +
+
+
Test Coverage Matrix
+ +
+ {% for wf in workflows %} + + + {% endfor %} +
+ +
+ + {% if matrix_data %} +
+
+
+ Legend: + ✓ Pass + ✗ Fail + – Not in matrix +
+
+ + + +
+
+
+
+ {% else %} +
No CI run data available yet.
+ {% endif %} +
+ + + + +
+
Trends (Last {{ trend_count }} Runs)
+
+ {% for wf in workflows %} +
+
+
{{ wf.display_name }}
+
+
+ +
+
+
+
+ {% endfor %} +
+
+ + + + +
+
Run History
+
+ {% for wf in workflows %} +
+

+ +

+
+
+ {% if wf.runs %} +
+ {% for run in wf.runs[:20] %} +
+

+ +

+
+
+
+ View on GitHub + · Event: {{ run.event }} + · Jobs: {{ run.passed_jobs }}/{{ run.total_jobs }} passed +
+ {% if run.jobs %} +
+ + + + + + + + + + + + {% for job in run.jobs %} + + + + + + + + {% endfor %} + +
ArchConfigTest SuiteStatusDuration
{{ job.arch|upper }}{{ job.config }}{{ job.testcase }} + {% if job.conclusion == 'success' %} + PASS + {% elif job.conclusion == 'failure' %} + FAIL + {% else %} + {{ job.conclusion|upper }} + {% endif %} + {{ job.duration_display }}
+
+ {% else %} +
No job data available.
+ {% endif %} +
+
+
+ {% endfor %} +
+ {% else %} +
No run history available.
+ {% endif %} +
+
+
+ {% endfor %} +
+
+ +
+ + + + + + + + + + diff --git a/.github/scripts/run-tier-regression.sh b/.github/scripts/run-tier-regression.sh new file mode 100755 index 00000000000..1cf17b4755e --- /dev/null +++ b/.github/scripts/run-tier-regression.sh @@ -0,0 +1,199 @@ +#!/usr/bin/env bash +# Copyright 2026 OpenHW Group +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + +set -o pipefail + +RUN_LOG="$(pwd)/ci-results/run.log" +FAILURE_SUMMARY="$(pwd)/ci-results/failure_summary.log" +EXIT_CODE_FILE="$(pwd)/ci-results/exit_code" + +mkdir -p ci-results +: > "${RUN_LOG}" +: > "${FAILURE_SUMMARY}" +echo "1" > "${EXIT_CODE_FILE}" + +TIER_NAME="${TIER_NAME:-Tier}" +TIER_MODE="${TIER_MODE:-script}" +TIER_CONFIG="${TIER_CONFIG:?TIER_CONFIG is required}" +TIER_TESTCASE="${TIER_TESTCASE:?TIER_TESTCASE is required}" +TIER_SIMULATOR="${TIER_SIMULATOR:?TIER_SIMULATOR is required}" +TIER_INSTALL_SCRIPT="${TIER_INSTALL_SCRIPT:-}" +TIER_TESTLIST="${TIER_TESTLIST:-}" +TIER_TEST_NAME="${TIER_TEST_NAME:-}" +TIER_LINKER="${TIER_LINKER:-}" +TIER_HWCONFIG_OPTS="${TIER_HWCONFIG_OPTS:-}" + +log_info() { + echo "$*" | tee -a "${RUN_LOG}" +} + +run_logged() { + set +e + "$@" > >(tee -a "${RUN_LOG}") 2>&1 + local cmd_rc=$? + return "${cmd_rc}" +} + +source_logged() { + local script_path="$1" + set +e + # shellcheck source=/dev/null + source "${script_path}" > >(tee -a "${RUN_LOG}") 2>&1 + local source_rc=$? + return "${source_rc}" +} + +record_rc() { + local step_rc="$1" + if [ "${step_rc}" -ne 0 ] && [ "${rc}" -eq 0 ]; then + rc="${step_rc}" + fi +} + +append_failure() { + echo "$*" | tee -a "${FAILURE_SUMMARY}" >&2 +} + +collect_reports() { + find verif/sim -name "iss_regr.log" -exec cp {} ci-results/ \; 2>/dev/null || true +} + +scan_for_failures() { + local matches + local -a scan_files=("${RUN_LOG}") + + while IFS= read -r -d '' file_path; do + scan_files+=("${file_path}") + done < <( + find verif/sim -type f \ + \( -name "*.log" -o -name "*.txt" -o -name "iss_regr.log" \) \ + -print0 2>/dev/null || true + ) + + matches="$( + grep -HnE \ + "\\[FAILED\\]|SIMULATION FAILED|(^|[^0-9])[1-9][0-9]* FAILED|ERROR return code:|bad syscall|unrecognized opcode|extension .* required|make(\\[[0-9]+\\])?: \\*\\*\\*.*Error|terminate called|Traceback \\(most recent call last\\)" \ + "${scan_files[@]}" 2>/dev/null || true + )" + + if [ -n "${matches}" ]; then + append_failure "ERROR: ${TIER_NAME} job reported success, but failure patterns were found in logs." + echo "${matches}" | tee -a "${FAILURE_SUMMARY}" >&2 + return 1 + fi + + return 0 +} + +scan_iss_traces() { + local matches="" + local critical_patterns + critical_patterns="ERROR return code:|bad syscall|unrecognized opcode|extension .* required|terminate called|Traceback \\(most recent call last\\)" + + while IFS= read -r -d '' file_path; do + local critical_matches + local last_status + + critical_matches="$(grep -HnE "${critical_patterns}" "${file_path}" 2>/dev/null || true)" + if [ -n "${critical_matches}" ]; then + matches+="${critical_matches}"$'\n' + fi + + last_status="$( + grep -nE "\\*\\*\\*[[:space:]]+(FAILED|SUCCESS)[[:space:]]+\\*\\*\\*|SIMULATION FAILED" "${file_path}" 2>/dev/null | tail -n 1 || true + )" + if [[ -n "${last_status}" && "${last_status}" != *"SUCCESS"* ]]; then + matches+="${file_path}:${last_status}"$'\n' + fi + done < <(find verif/sim -type f -name "*.iss" -print0 2>/dev/null || true) + + if [ -n "${matches}" ]; then + append_failure "ERROR: ${TIER_NAME} job reported success, but ISS trace failure patterns were found." + printf "%s" "${matches}" | tee -a "${FAILURE_SUMMARY}" >&2 + return 1 + fi + + return 0 +} + +rc=0 + +log_info "Running ${TIER_NAME}: ${TIER_CONFIG} / ${TIER_TESTCASE} (${TIER_MODE})" + +source_logged verif/sim/setup-env.sh +record_rc "$?" + +if [ "${rc}" -eq 0 ]; then + if [ "${TIER_MODE}" = "testlist" ]; then + if [[ "${TIER_SIMULATOR}" == *"veri-testharness"* ]]; then + source_logged verif/regress/install-verilator.sh + record_rc "$?" + fi + + if [ "${rc}" -eq 0 ]; then + source_logged verif/regress/install-spike.sh + record_rc "$?" + fi + + if [ "${rc}" -eq 0 ] && [ -n "${TIER_INSTALL_SCRIPT}" ]; then + source_logged "verif/regress/${TIER_INSTALL_SCRIPT}.sh" + record_rc "$?" + fi + + if [ "${rc}" -eq 0 ]; then + cva6_cmd=( + python3 cva6.py + "--testlist=${TIER_TESTLIST}" + --target "${TIER_CONFIG}" + --iss_yaml=cva6.yaml + "--iss=${TIER_SIMULATOR}" + "--issrun_opts=+tb_performance_mode+debug_disable=1+UVM_VERBOSITY=UVM_NONE" + ) + + if [ -n "${TIER_LINKER}" ]; then + cva6_cmd+=("--linker=${TIER_LINKER}") + fi + + if [ -n "${TIER_TEST_NAME}" ]; then + cva6_cmd+=(--test "${TIER_TEST_NAME}") + fi + + pushd verif/sim > /dev/null || rc=$? + if [ "${rc}" -eq 0 ]; then + run_logged "${cva6_cmd[@]}" + record_rc "$?" + fi + popd > /dev/null || true + fi + else + if [ -n "${TIER_HWCONFIG_OPTS}" ]; then + export DV_HWCONFIG_OPTS="${TIER_HWCONFIG_OPTS}" + fi + + run_logged env \ + DV_SIMULATORS="${TIER_SIMULATOR}" \ + DV_TARGET="${TIER_CONFIG}" \ + bash -e "verif/regress/${TIER_TESTCASE}.sh" + record_rc "$?" + fi +fi + +collect_reports + +if [ "${rc}" -eq 0 ] && ! compgen -G "verif/sim/out*" > /dev/null; then + append_failure "ERROR: ${TIER_NAME} job reported success but produced no verif/sim/out* results." + rc=1 +fi + +if [ "${rc}" -eq 0 ] && ! scan_for_failures; then + rc=1 +fi + +if [ "${rc}" -eq 0 ] && ! scan_iss_traces; then + rc=1 +fi + +echo "${rc}" > "${EXIT_CODE_FILE}" +exit "${rc}" diff --git a/.github/workflows/bender-up-to-date.yml b/.github/workflows/bender-up-to-date.yml index bc3f38c79c6..89b2982de5f 100644 --- a/.github/workflows/bender-up-to-date.yml +++ b/.github/workflows/bender-up-to-date.yml @@ -13,4 +13,4 @@ jobs: runs-on: ubuntu-latest steps: - name: Check Bender up-to-date - uses: pulp-platform/pulp-actions/bender-up-to-date@v2 + uses: pulp-platform/pulp-actions/bender-up-to-date@v2.4.4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b18be59f85..a95ad038b8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: env: NUM_JOBS: 8 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: submodules: recursive @@ -25,7 +25,7 @@ jobs: - name: Cache toolchain id: cache-toolchain - uses: actions/cache@v3 + uses: actions/cache@v6 env: cache-name: cache-toolchain with: @@ -34,7 +34,7 @@ jobs: - name: Cache verilator id: cache-verilator - uses: actions/cache@v3 + uses: actions/cache@v6 env: cache-name: cache-verilator with: @@ -43,7 +43,7 @@ jobs: - name: Cache Spike id: cache-spike - uses: actions/cache@v3 + uses: actions/cache@v6 env: cache-name: cache-spike with: @@ -72,10 +72,13 @@ jobs: - testcase: dv-riscv-arch-test config: cv64a6_imafdc_sv39_hpdcache_wb simulator: veri-testharness + - testcase: pmp_lsu_transaction + config: cv64a6_imafdc_sv39 + simulator: veri-testharness needs: build-riscv-tests steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: submodules: recursive @@ -87,7 +90,7 @@ jobs: - name: Cache toolchain id: cache-toolchain - uses: actions/cache@v3 + uses: actions/cache@v6 env: cache-name: cache-toolchain with: @@ -96,7 +99,7 @@ jobs: - name: Cache verilator id: cache-verilator - uses: actions/cache@v3 + uses: actions/cache@v6 env: cache-name: cache-verilator with: @@ -105,7 +108,7 @@ jobs: - name: Cache Spike id: cache-spike - uses: actions/cache@v3 + uses: actions/cache@v6 env: cache-name: cache-spike with: @@ -141,7 +144,7 @@ jobs: needs: build-riscv-tests steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: submodules: recursive @@ -153,7 +156,7 @@ jobs: - name: Cache toolchain id: cache-toolchain - uses: actions/cache@v3 + uses: actions/cache@v6 env: cache-name: cache-toolchain with: @@ -162,7 +165,7 @@ jobs: - name: Cache verilator id: cache-verilator - uses: actions/cache@v3 + uses: actions/cache@v6 env: cache-name: cache-verilator with: @@ -171,7 +174,7 @@ jobs: - name: Cache Spike id: cache-spike - uses: actions/cache@v3 + uses: actions/cache@v6 env: cache-name: cache-spike with: diff --git a/.github/workflows/openhw-cva6-ci-tier1.yml b/.github/workflows/openhw-cva6-ci-tier1.yml new file mode 100644 index 00000000000..c11b2796ee9 --- /dev/null +++ b/.github/workflows/openhw-cva6-ci-tier1.yml @@ -0,0 +1,197 @@ +# Copyright 2026 OpenHW Group +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 +# ================================================================================ +# OpenHW CVA6 CI - Tier 1: Fast Verilator Sanity +# ================================================================================ +# +# PURPOSE: +# Fast Verilator-based sanity regression for the three phase-1 "green" +# configurations selected for the first GitHub CI rollout. +# Runs one representative smoke or directed test per approved +# configuration to provide automatic sanity checks for pull-requests. +# +# TRIGGER POLICY: +# pull_request -> Automatic sanity checks for PRs targeting master +# workflow_dispatch -> On-demand rerun for manual validation +# +# COVERED CONFIGURATIONS (Phase-1 Green Config subset): +# RV32: +# - cv32a65x (dual-issue, no MMU) +# - cv32a60x (single-issue, no MMU) +# RV64: +# - cv64a6_imafdc_sv39_hpdcache_wb (HPDcache + write-back) +# +# TEST SUITES PER CONFIG: +# - cv32a65x -> smoke-tests-cv32a65x +# - cv32a60x -> cv32a6_tests +# - cv64a6_imafdc_sv39_hpdcache_wb -> cv64a6_imafdc_tests +# +# NOTES: +# - Phase 1 Tier 1 is Verilator-only. +# - Tier 1 is intentionally narrower than Tier 2: the goal is fast signal, +# not broad regression depth. +# ================================================================================ + +name: openhw-cva6-ci-tier1 + +on: + pull_request: + branches: + - master + workflow_dispatch: + +concurrency: + group: openhw-cva6-ci-tier1-${{ github.ref }} + cancel-in-progress: true + +env: + SPIKE_TANDEM: 1 + NUM_JOBS: 8 + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" + +jobs: + # ============================================================ + # Stage 1: Populate tool cache + # ============================================================ + setup-tools: + name: Setup Tools + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + with: + submodules: recursive + + - name: Setup CVA6 Environment + uses: ./.github/actions/setup-cva6-env + with: + install-tools: "true" + + # ============================================================ + # Stage 2: RV32 Fast Sanity (parallel matrix jobs) + # ============================================================ + execute-rv32-tier1: + name: RV32 Tier1 ${{ matrix.config }} / ${{ matrix.testcase }} + runs-on: ubuntu-latest + needs: setup-tools + strategy: + fail-fast: false + matrix: + include: + # ---------------------------------------------------------- + # cv32a65x - dual-issue RV32, no MMU + # ---------------------------------------------------------- + # Quickest RV32 sanity signal for the higher-feature RV32 core + - config: cv32a65x + testcase: smoke-tests-cv32a65x + mode: script + simulator: veri-testharness,spike + install_script: "" + testlist: "" + test_name: "" + linker: "" + + # ---------------------------------------------------------- + # cv32a60x - single-issue RV32, no MMU + # ---------------------------------------------------------- + # Directed sanity regression; no dedicated workflow-native smoke exists + - config: cv32a60x + testcase: cv32a6_tests + mode: script + simulator: veri-testharness,spike + install_script: "" + testlist: "" + test_name: "" + linker: "" + + steps: + - uses: actions/checkout@v7 + with: + submodules: recursive + + - name: Setup CVA6 Environment + uses: ./.github/actions/setup-cva6-env + + - name: Install prerequisites + run: source ci/install-prereq.sh + + - name: Run Tier 1 for ${{ matrix.config }} / ${{ matrix.testcase }} + env: + TIER_NAME: Tier 1 + TIER_MODE: ${{ matrix.mode }} + TIER_CONFIG: ${{ matrix.config }} + TIER_TESTCASE: ${{ matrix.testcase }} + TIER_SIMULATOR: ${{ matrix.simulator }} + TIER_INSTALL_SCRIPT: ${{ matrix.install_script }} + TIER_TESTLIST: ${{ matrix.testlist }} + TIER_TEST_NAME: ${{ matrix.test_name }} + TIER_LINKER: ${{ matrix.linker }} + run: bash .github/scripts/run-tier-regression.sh + + - name: Upload Results + if: always() + uses: actions/upload-artifact@v4 + with: + name: tier1-rv32-${{ matrix.config }}-${{ matrix.testcase }} + path: | + ci-results/ + verif/sim/out*/ + retention-days: 14 + + # ============================================================ + # Stage 3: RV64 Fast Sanity + # ============================================================ + execute-rv64-tier1: + name: RV64 Tier1 ${{ matrix.config }} / ${{ matrix.testcase }} + runs-on: ubuntu-latest + needs: setup-tools + strategy: + fail-fast: false + matrix: + include: + # ---------------------------------------------------------- + # cv64a6_imafdc_sv39_hpdcache_wb - RV64 HPDcache + write-back + # ---------------------------------------------------------- + # Fast RV64 sanity using the existing directed script + - config: cv64a6_imafdc_sv39_hpdcache_wb + testcase: cv64a6_imafdc_tests + mode: script + simulator: veri-testharness,spike + install_script: "" + testlist: "" + test_name: "" + linker: "" + + steps: + - uses: actions/checkout@v7 + with: + submodules: recursive + + - name: Setup CVA6 Environment + uses: ./.github/actions/setup-cva6-env + + - name: Install prerequisites + run: source ci/install-prereq.sh + + - name: Run Tier 1 for ${{ matrix.config }} / ${{ matrix.testcase }} + env: + TIER_NAME: Tier 1 + TIER_MODE: ${{ matrix.mode }} + TIER_CONFIG: ${{ matrix.config }} + TIER_TESTCASE: ${{ matrix.testcase }} + TIER_SIMULATOR: ${{ matrix.simulator }} + TIER_INSTALL_SCRIPT: ${{ matrix.install_script }} + TIER_TESTLIST: ${{ matrix.testlist }} + TIER_TEST_NAME: ${{ matrix.test_name }} + TIER_LINKER: ${{ matrix.linker }} + run: bash .github/scripts/run-tier-regression.sh + + - name: Upload Results + if: always() + uses: actions/upload-artifact@v4 + with: + name: tier1-rv64-${{ matrix.config }}-${{ matrix.testcase }} + path: | + ci-results/ + verif/sim/out*/ + retention-days: 14 diff --git a/.github/workflows/openhw-cva6-ci-tier2.yml b/.github/workflows/openhw-cva6-ci-tier2.yml new file mode 100644 index 00000000000..72c493a8801 --- /dev/null +++ b/.github/workflows/openhw-cva6-ci-tier2.yml @@ -0,0 +1,370 @@ +# Copyright 2026 OpenHW Group +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 +# ================================================================================ +# OpenHW CVA6 CI - Tier 2: Daily Verilator Regression +# ================================================================================ +# +# PURPOSE: +# Nightly Verilator regression for the three phase-1 "green" +# configurations selected for the first GitHub CI rollout. +# Runs a curated Tier 2 set of functional and workload-oriented tests, +# expanding coverage beyond Tier 1. +# +# SCHEDULE: Daily at 22:00 UTC +# +# TRIGGER POLICY: +# schedule -> Automatic daily regression (22:00 UTC) +# workflow_dispatch -> On-demand Tier 2 regression for manual validation +# +# COVERED CONFIGURATIONS (Green Config subset from Jerome's color-coded figure): +# RV32: +# - cv32a65x (dual-issue, no MMU) [ 8 testcases] +# - cv32a60x (single-issue, no MMU) [ 4 testcases] +# RV64: +# - cv64a6_imafdc_sv39_hpdcache_wb (HPDcache + write-back) [ 5 testcases] +# +# TEST SUITES PER CONFIG: +# cv32a65x (8 jobs): +# smoke-tests, cv32a6_tests, dv-riscv-arch-test, dv-riscv-tests-p, +# dv-riscv-compliance, dv-csr-embedded-tests, +# hwconfig_tests, coremark +# +# cv32a60x (4 jobs): +# cv32a6_tests, dv-riscv-arch-test, dv-riscv-tests-p, +# dv-riscv-compliance +# (Note: hwconfig/coremark/dv-csr-embedded-tests are cv32a65x-specific) +# +# cv64a6_imafdc_sv39_hpdcache_wb (5 jobs): +# cv64a6_imafdc_tests, dv-riscv-arch-test, +# dv-riscv-tests-v [testlist], dv-riscv-tests-p [testlist], +# dv-riscv-compliance [testlist] +# +# NOTES: +# - "dv-riscv-tests-v" / "dv-riscv-tests-p" are job label names, not script +# names. They run via python3 cva6.py --testlist= (no .sh equivalent). +# Splitting v (virtual mode) / p (physical mode) into separate jobs enables +# per-mode failure isolation. +# - dv-csr-embedded-tests uses veri-testharness only: spike does not emulate +# embedded CSR side effects. +# - hwconfig_tests and coremark require DV_HWCONFIG_OPTS, encoded via the +# matrix hwconfig_opts field and applied in the run step. +# - coremark uses veri-testharness only: spike times out on long benchmark loops. +# - benchmark and dv-riscv-csr-access-test are intentionally excluded from +# Phase 1 Tier 2 until their legacy regression scripts propagate failures +# and produce trustworthy artifacts. +# ================================================================================ + +name: openhw-cva6-ci-tier2 + +on: + schedule: + - cron: "0 22 * * *" # 22:00 UTC + workflow_dispatch: + +concurrency: + group: openhw-cva6-ci-tier2-${{ github.ref }} + cancel-in-progress: true + +env: + SPIKE_TANDEM: 1 + NUM_JOBS: 8 + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" + +jobs: + # ============================================================ + # Stage 1: Populate tool cache + # ============================================================ + setup-tools: + name: Setup Tools + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + with: + submodules: recursive + + - name: Setup CVA6 Environment + uses: ./.github/actions/setup-cva6-env + with: + install-tools: "true" + + # ============================================================ + # Stage 2: RV32 Regression (parallel matrix jobs) + # ============================================================ + execute-rv32-tier2: + name: RV32 Tier2 ${{ matrix.config }} / ${{ matrix.testcase }} + runs-on: ubuntu-latest + needs: setup-tools + strategy: + fail-fast: false + matrix: + include: + # ---------------------------------------------------------- + # cv32a65x - dual-issue RV32, no MMU + # ---------------------------------------------------------- + + # Quick sanity check (~1 test) + - config: cv32a65x + testcase: smoke-tests-cv32a65x + mode: script + simulator: veri-testharness,spike + install_script: "" + testlist: "" + test_name: "" + linker: "" + + # CVA6-specific directed tests + - config: cv32a65x + testcase: cv32a6_tests + mode: script + simulator: veri-testharness,spike + install_script: "" + testlist: "" + test_name: "" + linker: "" + + # RISC-V architecture test suite (~105 tests) + - config: cv32a65x + testcase: dv-riscv-arch-test + mode: testlist + simulator: veri-testharness,spike + install_script: install-riscv-arch-test + testlist: "../tests/testlist_riscv-arch-test-cv32a65x.yaml" + test_name: "" + linker: "../tests/riscv-arch-test/riscv-target/spike/link.ld" + + # Standard RISC-V tests, p-mode only (no MMU on cv32a65x, ~94 tests) + - config: cv32a65x + testcase: dv-riscv-tests-p + mode: testlist + simulator: veri-testharness,spike + install_script: install-riscv-tests + testlist: "../tests/testlist_riscv-tests-cv32a65x-p.yaml" + test_name: "" + linker: "" + + # RISC-V compliance suite (~183 tests) + - config: cv32a65x + testcase: dv-riscv-compliance + mode: testlist + simulator: veri-testharness,spike + install_script: install-riscv-compliance + testlist: "../tests/testlist_riscv-compliance-cv32a65x.yaml" + test_name: "" + linker: "" + + # Embedded CSR behavior (~5 tests); veri-testharness only - + # spike does not emulate embedded CSR side effects + - config: cv32a65x + testcase: dv-csr-embedded-tests + mode: script + simulator: veri-testharness + install_script: "" + testlist: "" + test_name: "" + linker: "" + + # hwconfig toolchain sanity (requires DV_HWCONFIG_OPTS) + - config: cv32a65x + testcase: hwconfig_tests + mode: script + simulator: veri-testharness,spike + install_script: "" + testlist: "" + test_name: "" + linker: "" + hwconfig_opts: cv32a65x + + # CoreMark benchmark on hwconfig; veri-testharness only - + # spike times out on long-running benchmark loops + - config: cv32a65x + testcase: coremark + mode: script + simulator: veri-testharness + install_script: "" + testlist: "" + test_name: "" + linker: "" + hwconfig_opts: cv32a65x + + # ---------------------------------------------------------- + # cv32a60x - single-issue RV32, no MMU + # ---------------------------------------------------------- + + # CVA6-specific directed tests + - config: cv32a60x + testcase: cv32a6_tests + mode: script + simulator: veri-testharness,spike + install_script: "" + testlist: "" + test_name: "" + linker: "" + + # RISC-V architecture test suite + - config: cv32a60x + testcase: dv-riscv-arch-test + mode: testlist + simulator: veri-testharness,spike + install_script: install-riscv-arch-test + testlist: "../tests/testlist_riscv-arch-test-cv32a60x.yaml" + test_name: "" + linker: "../tests/riscv-arch-test/riscv-target/spike/link.ld" + + # Standard RISC-V tests, p-mode only (no MMU on cv32a60x) + - config: cv32a60x + testcase: dv-riscv-tests-p + mode: testlist + simulator: veri-testharness,spike + install_script: install-riscv-tests + testlist: "../tests/testlist_riscv-tests-cv32a60x-p.yaml" + test_name: "" + linker: "" + + # RISC-V compliance suite + - config: cv32a60x + testcase: dv-riscv-compliance + mode: testlist + simulator: veri-testharness,spike + install_script: install-riscv-compliance + testlist: "../tests/testlist_riscv-compliance-cv32a60x.yaml" + test_name: "" + linker: "" + + steps: + - uses: actions/checkout@v7 + with: + submodules: recursive + + - name: Setup CVA6 Environment + uses: ./.github/actions/setup-cva6-env + + - name: Install prerequisites + run: source ci/install-prereq.sh + + - name: Run Tier 2 for ${{ matrix.config }} / ${{ matrix.testcase }} + env: + TIER_NAME: Tier 2 + TIER_MODE: ${{ matrix.mode }} + TIER_CONFIG: ${{ matrix.config }} + TIER_TESTCASE: ${{ matrix.testcase }} + TIER_SIMULATOR: ${{ matrix.simulator }} + TIER_INSTALL_SCRIPT: ${{ matrix.install_script }} + TIER_TESTLIST: ${{ matrix.testlist }} + TIER_TEST_NAME: ${{ matrix.test_name }} + TIER_LINKER: ${{ matrix.linker }} + TIER_HWCONFIG_OPTS: ${{ matrix.hwconfig_opts }} + run: bash .github/scripts/run-tier-regression.sh + + - name: Upload Results + if: always() + uses: actions/upload-artifact@v4 + with: + name: tier2-rv32-${{ matrix.config }}-${{ matrix.testcase }} + path: | + ci-results/ + verif/sim/out*/ + retention-days: 14 + + # ============================================================ + # Stage 3: RV64 Regression (parallel matrix jobs) + # ============================================================ + execute-rv64-tier2: + name: RV64 Tier2 ${{ matrix.config }} / ${{ matrix.testcase }} + runs-on: ubuntu-latest + needs: setup-tools + strategy: + fail-fast: false + matrix: + include: + # ---------------------------------------------------------- + # cv64a6_imafdc_sv39_hpdcache_wb - RV64 HPDcache + write-back + # ---------------------------------------------------------- + + # CVA6-specific directed tests + - config: cv64a6_imafdc_sv39_hpdcache_wb + testcase: cv64a6_imafdc_tests + mode: script + simulator: veri-testharness,spike + install_script: "" + testlist: "" + test_name: "" + linker: "" + + # RISC-V architecture test suite + - config: cv64a6_imafdc_sv39_hpdcache_wb + testcase: dv-riscv-arch-test + mode: testlist + simulator: veri-testharness,spike + install_script: install-riscv-arch-test + testlist: "../tests/testlist_riscv-arch-test-cv64a6_imafdc_sv39.yaml" + test_name: "" + linker: "../tests/riscv-arch-test/riscv-target/spike/link.ld" + + # Standard RISC-V tests, virtual-mode (SV39 MMU) + # "dv-riscv-tests-v" is a job label - runs via cva6.py --testlist, + # there is no verif/regress/dv-riscv-tests-v.sh + - config: cv64a6_imafdc_sv39_hpdcache_wb + testcase: dv-riscv-tests-v + mode: testlist + simulator: veri-testharness,spike + install_script: install-riscv-tests + testlist: "../tests/testlist_riscv-tests-cv64a6_imafdc_sv39-v.yaml" + test_name: "" + linker: "" + + # Standard RISC-V tests, physical-mode + # "dv-riscv-tests-p" is a job label - same note as dv-riscv-tests-v above + - config: cv64a6_imafdc_sv39_hpdcache_wb + testcase: dv-riscv-tests-p + mode: testlist + simulator: veri-testharness,spike + install_script: install-riscv-tests + testlist: "../tests/testlist_riscv-tests-cv64a6_imafdc_sv39-p.yaml" + test_name: "" + linker: "" + + # RISC-V compliance suite (uses sv39 testlist - valid for hpdcache_wb) + - config: cv64a6_imafdc_sv39_hpdcache_wb + testcase: dv-riscv-compliance + mode: testlist + simulator: veri-testharness,spike + install_script: install-riscv-compliance + testlist: "../tests/testlist_riscv-compliance-cv64a6_imafdc_sv39.yaml" + test_name: "" + linker: "" + + steps: + - uses: actions/checkout@v7 + with: + submodules: recursive + + - name: Setup CVA6 Environment + uses: ./.github/actions/setup-cva6-env + + - name: Install prerequisites + run: source ci/install-prereq.sh + + - name: Run Tier 2 for ${{ matrix.config }} / ${{ matrix.testcase }} + env: + TIER_NAME: Tier 2 + TIER_MODE: ${{ matrix.mode }} + TIER_CONFIG: ${{ matrix.config }} + TIER_TESTCASE: ${{ matrix.testcase }} + TIER_SIMULATOR: ${{ matrix.simulator }} + TIER_INSTALL_SCRIPT: ${{ matrix.install_script }} + TIER_TESTLIST: ${{ matrix.testlist }} + TIER_TEST_NAME: ${{ matrix.test_name }} + TIER_LINKER: ${{ matrix.linker }} + TIER_HWCONFIG_OPTS: ${{ matrix.hwconfig_opts }} + run: bash .github/scripts/run-tier-regression.sh + + - name: Upload Results + if: always() + uses: actions/upload-artifact@v4 + with: + name: tier2-rv64-${{ matrix.config }}-${{ matrix.testcase }} + path: | + ci-results/ + verif/sim/out*/ + retention-days: 14 diff --git a/.github/workflows/openhw-cva6-tier-dashboard.yml b/.github/workflows/openhw-cva6-tier-dashboard.yml new file mode 100644 index 00000000000..18bc892f9a4 --- /dev/null +++ b/.github/workflows/openhw-cva6-tier-dashboard.yml @@ -0,0 +1,137 @@ +name: openhw-cva6-tier-dashboard + +on: + workflow_run: + workflows: + - ci + - openhw-cva6-ci-tier1 + - openhw-cva6-ci-tier2 + types: + - completed + workflow_dispatch: + +concurrency: + group: openhw-cva6-tier-dashboard + cancel-in-progress: false + +permissions: + actions: read + contents: write + pages: write + id-token: write + +jobs: + build: + name: Build Tier Dashboard + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v7 + + - name: Restore tier dashboard history from gh-pages-cva6-tier-dashboard-data + run: | + mkdir -p /tmp/tier-data + if git ls-remote --heads origin gh-pages-cva6-tier-dashboard-data | grep -q gh-pages-cva6-tier-dashboard-data; then + git fetch origin gh-pages-cva6-tier-dashboard-data --depth=1 + git checkout origin/gh-pages-cva6-tier-dashboard-data -- data/ 2>/dev/null && \ + cp -r data/* /tmp/tier-data/ 2>/dev/null || \ + echo "No existing data on gh-pages-cva6-tier-dashboard-data, starting fresh" + else + echo "gh-pages-cva6-tier-dashboard-data branch does not exist yet, starting fresh" + fi + + - name: Collect tier dashboard CI data + env: + GH_TOKEN: ${{ github.token }} + run: | + python3 .github/scripts/dashboard_tiers/collect_data.py \ + --repo "${{ github.repository }}" \ + --data-dir /tmp/tier-data \ + --fetch-count 20 + + - name: Install Jinja2 + run: pip install jinja2 + + - name: Generate tier dashboard HTML + run: | + python3 .github/scripts/dashboard_tiers/generate_dashboard.py \ + --data-dir /tmp/tier-data \ + --output-dir /tmp/dash-site \ + --repo "${{ github.repository }}" + + - name: Prepare Pages artifact + run: | + cp -r /tmp/tier-data /tmp/dash-site/data + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: /tmp/dash-site + + - name: Upload preview artifact + uses: actions/upload-artifact@v4 + with: + name: cva6-tier-dashboard-site + path: /tmp/dash-site + retention-days: 14 + + - name: Upload data for persistence job + uses: actions/upload-artifact@v4 + with: + name: cva6-tier-dashboard-data + path: /tmp/tier-data/ + retention-days: 7 + + deploy: + name: Deploy to Pages + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + + persist-tier-data: + name: Persist Tier Dashboard Data + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v7 + + - name: Prepare gh-pages-cva6-tier-dashboard-data branch + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + if git ls-remote --exit-code --heads origin gh-pages-cva6-tier-dashboard-data >/dev/null 2>&1; then + git fetch origin gh-pages-cva6-tier-dashboard-data --depth=1 + git checkout -B gh-pages-cva6-tier-dashboard-data origin/gh-pages-cva6-tier-dashboard-data + else + git checkout --orphan gh-pages-cva6-tier-dashboard-data + git rm -rf . >/dev/null 2>&1 || true + find . -mindepth 1 -maxdepth 1 ! -name .git -exec rm -rf {} + + echo "# CVA6 Tier Dashboard Data" > README.md + git add README.md + git commit -m "Initialize gh-pages-cva6-tier-dashboard-data branch" + fi + + - name: Download updated tier data + uses: actions/download-artifact@v4 + with: + name: cva6-tier-dashboard-data + path: data/ + + - name: Commit and push tier data + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add data/ + if git diff --cached --quiet; then + echo "No data changes to commit" + else + git commit -m "Update cva6 tier dashboard data [skip ci]" + git push origin HEAD:gh-pages-cva6-tier-dashboard-data + fi diff --git a/.github/workflows/verible.yml b/.github/workflows/verible.yml index 87496bc03a3..c36eccc1784 100644 --- a/.github/workflows/verible.yml +++ b/.github/workflows/verible.yml @@ -4,20 +4,21 @@ name: Verible on: - pull_request_target: + pull_request: jobs: format: runs-on: ubuntu-latest - permissions: - checks: write - contents: read - pull-requests: write steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} + - uses: actions/checkout@v7 - uses: chipsalliance/verible-formatter-action@main with: github_token: ${{ secrets.GITHUB_TOKEN }} - files: '$(find core -regex ".*\.\(v\|sv\)$" | grep -v "^core/include/.*_config_pkg.sv$")' + verible_version: v0.0-4084-gf3e4d98b + files: '$(find core -regex ".*\.\(v\|sv\)$" | grep -v "^core/include/.*_config_pkg\.sv$")' + fail_on_formatting_suggestions: true + - name: CVA6Cfg's XLEN attribute usage verificatory script + if: always() + run: | + chmod +x util/sanitize/systemverilog/xlen_misuse.sh + util/sanitize/systemverilog/xlen_misuse.sh diff --git a/.gitignore b/.gitignore index 962e0666325..0ae122fe666 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +*.swp +*.swo site/* *.ucdb covhtmlreport/* @@ -50,3 +52,8 @@ Bender.lock # Both following lines are needed to list contents of ISA manual build dir. !/vendor/riscv/riscv-isa-manual/build/ !/vendor/riscv/riscv-isa-manual/build/* +/config/gen_from_riscv_config/hwconfig/linker/link.ld +/config/gen_from_riscv_config/hwconfig/spike/spike.yaml +/verif/sim/encaps.traces +/verif/sim/iti.traces +/verif/sim/verilator.fst.hier diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d108464c673..5c6bc2dc1c5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -124,7 +124,7 @@ build_tools: stage: light tests rules: *on_dev before_script: - - git -C verif/core-v-verif fetch --unshallow + - git -C verif/core-v-verif fetch --unshallow || git -C verif/core-v-verif fetch --all - !reference [.copy_spike_artifacts] - rm -rf artifacts/ - mkdir -p artifacts/{reports,logs} @@ -141,7 +141,7 @@ smoke-tests: - .fe_smoke_test variables: DASHBOARD_JOB_TITLE: "Smoke test $DV_SIMULATORS $DV_TARGET" - DASHBOARD_JOB_DESCRIPTION: "Short tests to challenge most architectures with most testbenchs configurations" + DASHBOARD_JOB_DESCRIPTION: "Short tests to challenge most architectures with most testbenches configurations" DASHBOARD_SORT_INDEX: 0 DASHBOARD_JOB_CATEGORY: "Basic" SPIKE_TANDEM: 1 @@ -156,6 +156,29 @@ smoke-tests: - if [[ $DV_SIMULATORS == *"questa"* ]]; then source $QUESTA_BASHRC; fi - bash verif/regress/smoke-tests-$DV_TARGET.sh - !reference [.simu_after_script] + rules: + - allow_failure: true + +sdtrig-tests: + extends: + - .fe_smoke_test + variables: + DASHBOARD_JOB_TITLE: "Sdtrig test $DV_SIMULATORS $DV_TARGET" + DASHBOARD_JOB_DESCRIPTION: "Short tests to challenge sdtrig features in cv32a65x configuration" + DASHBOARD_SORT_INDEX: 0 + DASHBOARD_JOB_CATEGORY: "Basic" + COLLECT_SIMU_LOGS: 1 + parallel: + matrix: + - DV_SIMULATORS: "vcs-uvm" + DV_TARGET: "cv32a65x" + - DV_SIMULATORS: "vcs-uvm" + DV_TARGET: "cv32a60x" + script: + - bash verif/regress/triggers-tests-$DV_TARGET.sh + - python3 .gitlab-ci/scripts/report_pass.py + rules: + - allow_failure: true smoke-gen: extends: @@ -208,6 +231,19 @@ smoke-hwconfig: - source verif/regress/hwconfig_tests.sh - python3 .gitlab-ci/scripts/report_pass.py +hello-pk: + extends: + - .fe_smoke_test + variables: + DASHBOARD_JOB_TITLE: "Hello world with veri-testharness-pk on multiple RTL targets." + DASHBOARD_JOB_DESCRIPTION: "Short tests to challenge target configurations" + DASHBOARD_SORT_INDEX: 1 + DASHBOARD_JOB_CATEGORY: "Basic" + COLLECT_SIMU_LOGS: 1 + script: + - bash verif/regress/veri-testharness-pk-tests.sh + - python3 .gitlab-ci/scripts/report_pass.py + .synthesis_test: stage: heavy tests timeout: 2 hours @@ -225,6 +261,21 @@ smoke-hwconfig: - when: manual allow_failure: true +it-test: + extends: + - .synthesis_test + variables: + DASHBOARD_JOB_TITLE: "Instruction Trace test" + DASHBOARD_JOB_DESCRIPTION: "Test to Challenge the Hardware flow of the Instruction Tracer" + DASHBOARD_SORT_INDEX: 0 + DASHBOARD_JOB_CATEGORY: "Basic" + DV_SIMULATORS: "vcs-testharness" + script: + - python3 .gitlab-ci/scripts/report_fail.py + - bash verif/regress/Instr_tracing_test.sh ../tests/custom/ITI/test_iti_asm.o + - python3 .gitlab-ci/scripts/report_pass.py + - cp -r verif/sim/Instr_tracing_artifact artifacts/ + spyglass: extends: - .synthesis_test @@ -243,7 +294,7 @@ spyglass: - cp spyglass/reference_summary.rpt artifacts/lint_reports - python3 .gitlab-ci/scripts/report_spyglass_lint.py spyglass/reference_summary.rpt artifacts/lint_reports/cva6_lint_lint_rtl/summary.rpt -cvxif-regression: +.cvxif-regression: extends: - .synthesis_test variables: @@ -273,7 +324,7 @@ asic-synthesis: - echo $DV_TARGET - source ./verif/sim/setup-env.sh - git clone ${SYNTH_SCRIPT} ${SYNTH_SCRIPT_PATH} -b ${SYNTH_SCRIPT_BRANCH} - - git -C ${SYNTH_SCRIPT_PATH} checkout cce5ea41 + - git -C ${SYNTH_SCRIPT_PATH} checkout 3c0dd72d - cp -r ${SYNTH_SCRIPT_PATH}/cva6/ ../ - git apply ${SYNTH_SCRIPT_PATH}/patches/*.patch - echo $SYN_DCSHELL_BASHRC; source $SYN_DCSHELL_BASHRC @@ -304,6 +355,20 @@ fpga-build: - mv corev_apu/fpga/work-fpga/ariane_xilinx.bit artifacts/ariane_xilinx_$TARGET.bit - python3 .gitlab-ci/scripts/report_fpga.py corev_apu/fpga/reports/ariane.utilization.rpt +pmp_tests: + timeout : 2 hours + extends: + - .synthesis_test + variables: + DASHBOARD_JOB_TITLE: "PMP $DV_TARGET" + DASHBOARD_JOB_DESCRIPTION: "Physical Memory Protection tests" + DASHBOARD_SORT_INDEX: 2 + DASHBOARD_JOB_CATEGORY: "Test suites" + DV_SIMULATORS: "vcs-uvm" + SPIKE_TANDEM: 1 + script: source verif/regress/pmp_cv32a65x_tests.sh + after_script: *simu_after_script + .regress_test: stage: heavy tests before_script: @@ -323,20 +388,21 @@ benchmarks: DASHBOARD_SORT_INDEX: 5 DASHBOARD_JOB_CATEGORY: "Performance" SPIKE_TANDEM: 1 + RISCV: "${RISCV_GCC15}" parallel: matrix: - BENCH: "dhrystone" ISSUE: "single" - DV_HWCONFIG_OPTS: ["cv32a60x IcacheByteSize=16384 IcacheSetAssoc=8 DcacheByteSize=32768 DcacheSetAssoc=8 BHTEntries=128 NrScoreboardEntries=8 DCacheType=config_pkg::WT"] + DV_HWCONFIG_OPTS: ["cv32a60x IcacheByteSize=16384 IcacheSetAssoc=8 DcacheByteSize=32768 DcacheSetAssoc=8 BHTEntries=128 NrScoreboardEntries=8 DCacheType=config_pkg::WT BPType=config_pkg::PH_BHT"] - BENCH: "dhrystone" ISSUE: "dual" - DV_HWCONFIG_OPTS: ["cv32a65x IcacheByteSize=16384 IcacheSetAssoc=8 DcacheByteSize=32768 DcacheSetAssoc=8 BHTEntries=128 NrScoreboardEntries=8 DCacheType=config_pkg::WT"] + DV_HWCONFIG_OPTS: ["cv32a65x IcacheByteSize=16384 IcacheSetAssoc=8 DcacheByteSize=32768 DcacheSetAssoc=8 BHTEntries=128 NrScoreboardEntries=8 DCacheType=config_pkg::WT BPType=config_pkg::PH_BHT"] - BENCH: "coremark" ISSUE: "single" - DV_HWCONFIG_OPTS: ["cv32a60x IcacheByteSize=16384 IcacheSetAssoc=8 DcacheByteSize=32768 DcacheSetAssoc=8 BHTEntries=128 NrScoreboardEntries=8 DCacheType=config_pkg::WT"] + DV_HWCONFIG_OPTS: ["cv32a60x IcacheByteSize=16384 IcacheSetAssoc=8 DcacheByteSize=32768 DcacheSetAssoc=8 BHTEntries=128 NrScoreboardEntries=8 DCacheType=config_pkg::WT BPType=config_pkg::PH_BHT"] - BENCH: "coremark" ISSUE: "dual" - DV_HWCONFIG_OPTS: ["cv32a65x IcacheByteSize=16384 IcacheSetAssoc=8 DcacheByteSize=32768 DcacheSetAssoc=8 BHTEntries=128 NrScoreboardEntries=8 DCacheType=config_pkg::WT"] + DV_HWCONFIG_OPTS: ["cv32a65x IcacheByteSize=16384 IcacheSetAssoc=8 DcacheByteSize=32768 DcacheSetAssoc=8 BHTEntries=128 NrScoreboardEntries=8 DCacheType=config_pkg::WT BPType=config_pkg::PH_BHT"] script: - bash verif/regress/"$BENCH".sh - python3 .gitlab-ci/scripts/report_benchmark.py --"$BENCH"_"$ISSUE" verif/sim/out_*/vcs-uvm_sim/"$BENCH"_main.*.log @@ -543,12 +609,12 @@ simu-gate: PERIOD: "15" # 66 Mhz script: - mkdir -p artifacts/{reports,logs} - - git -C verif/core-v-verif fetch --unshallow + - git -C verif/core-v-verif fetch --unshallow || git -C verif/core-v-verif fetch --all - !reference [.copy_spike_artifacts] - echo $PERIOD - source ./verif/sim/setup-env.sh - git clone ${SYNTH_SCRIPT} ${SYNTH_SCRIPT_PATH} -b ${SYNTH_SCRIPT_BRANCH} - - git -C ${SYNTH_SCRIPT_PATH} checkout cce5ea41 + - git -C ${SYNTH_SCRIPT_PATH} checkout 3c0dd72d - cp -r ${SYNTH_SCRIPT_PATH}/cva6/ ../ - git apply ${SYNTH_SCRIPT_PATH}/patches/*.patch - source verif/regress/install-riscv-tests.sh diff --git a/.gitlab-ci/README.md b/.gitlab-ci/README.md index 0a1d7678246..5af80202b26 100644 --- a/.gitlab-ci/README.md +++ b/.gitlab-ci/README.md @@ -144,7 +144,7 @@ import report_builder as rb # Create metrics metric = rb.TableMetric('Metric name') -metric.add_value('colomn 1', 'colomn 2', 'etc') +metric.add_value('column 1', 'column 2', 'etc') # Gather them into a report report = rb.Report('report label') @@ -159,12 +159,12 @@ There are 3 kinds of metric: ```python # A simple table metric = rb.TableMetric('Metric name, actually not displayed yet') -metric.add_value('colomn 1', 'colomn 2', 'etc') +metric.add_value('column 1', 'column 2', 'etc') # A table with a pass/fail label on each line metric = rb.TableStatusMetric('Metric name, actually not displayed yet') -metric.add_pass('colomn 1', 'colomn 2', 'etc') -metric.add_fail('colomn 1', 'colomn 2', 'etc') +metric.add_pass('column 1', 'column 2', 'etc') +metric.add_fail('column 1', 'column 2', 'etc') # A log metric = rb.LogMetric('Metric name, actually not displayed yet') diff --git a/.gitlab-ci/expected_synth.yml b/.gitlab-ci/expected_synth.yml index 72ae96f3981..49cb562e554 100644 --- a/.gitlab-ci/expected_synth.yml +++ b/.gitlab-ci/expected_synth.yml @@ -1,2 +1,2 @@ cv32a65x: - gates: 184679 + gates: 182900 diff --git a/.gitlab-ci/scripts/github_integration.py b/.gitlab-ci/scripts/github_integration.py index c49c5b79838..d91016ebd7c 100644 --- a/.gitlab-ci/scripts/github_integration.py +++ b/.gitlab-ci/scripts/github_integration.py @@ -3,6 +3,7 @@ """ from os import environ as env +import time import requests def api_url(owner, repo): @@ -52,6 +53,7 @@ def send(self, pr, success): 'pr_number': str(pr), 'success': success, } + time.sleep(120) return self._trigger(inputs) def send_success(self, pr): diff --git a/.gitlab-ci/scripts/report_benchmark.py b/.gitlab-ci/scripts/report_benchmark.py index cec2c10fdc1..a29f3ec93a5 100644 --- a/.gitlab-ci/scripts/report_benchmark.py +++ b/.gitlab-ci/scripts/report_benchmark.py @@ -19,12 +19,12 @@ # Keep it up-to-date with compiler version and core performance improvements # Will fail if the number of cycles is different from this one valid_cycles = { - "dhrystone_dual": 18935, - "dhrystone_single": 24127, - "coremark_dual": 1001191, - "coremark_single": 1300030, - "dhrystone_cv32a65x": 31976, - "dhrystone_cv32a60x": 39449, + "dhrystone_dual": 16990, + "dhrystone_single": 23866, + "coremark_dual": 199928, + "coremark_single": 290690, + "dhrystone_cv32a65x": 27329, + "dhrystone_cv32a60x": 36629, } for arg in sys.argv[1:]: @@ -33,7 +33,7 @@ iterations = 50 else: if "--coremark" in arg: - iterations = 4 + iterations = 1 mode = arg.replace("-", "") else: path = arg diff --git a/.gitlab-ci/scripts/report_synth.py b/.gitlab-ci/scripts/report_synth.py index 06cf9833b04..bd33df72f4a 100644 --- a/.gitlab-ci/scripts/report_synth.py +++ b/.gitlab-ci/scripts/report_synth.py @@ -45,7 +45,7 @@ warning_log.append(line) log_metric.values = error_log + warning_log -# Area repport: +# Area report: pattern = re.compile( "^(Combinational area|Buf/Inv area|Noncombinational area|Macro/Black Box area):\ *(\d*\.\d*)$", re.MULTILINE) @@ -82,7 +82,7 @@ for i in hier: hier_metric.add_value( i[0], # hier - f"{int(float(i[1])/kgate_ratio)} kGates", # area + f"{float(i[1])/kgate_ratio:.3f} kGates", # area f"{int(float(i[2]))} %", # % #int(float(i[3]))/int(float(i[1])*100), # % combi #int(float(i[4]))/int(float(i[1])*100), # % reg diff --git a/.gitmodules b/.gitmodules index ef0f5995179..e87394db64e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,9 +19,6 @@ [submodule "corev_apu/fpga/src/ariane-ethernet"] path = corev_apu/fpga/src/ariane-ethernet url = https://github.com/lowRISC/ariane-ethernet.git -[submodule "corev_apu/src/axi_riscv_atomics"] - path = corev_apu/src/axi_riscv_atomics - url = https://github.com/pulp-platform/axi_riscv_atomics.git [submodule "corev_apu/riscv-dbg"] path = corev_apu/riscv-dbg url = https://github.com/pulp-platform/riscv-dbg.git diff --git a/.readthedocs.yaml b/.readthedocs.yaml index d9241c38438..394ddbbd995 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,7 +10,7 @@ submodules: recursive: true build: - os: "ubuntu-20.04" + os: "ubuntu-26.04" tools: python: "3.9" nodejs: "20" diff --git a/Bender.yml b/Bender.yml index 5ef388dad7b..966c56388ab 100644 --- a/Bender.yml +++ b/Bender.yml @@ -1,5 +1,5 @@ package: - name: ariane + name: cva6 authors: - "Florian Zaruba " - "Michael Schaffner " @@ -10,12 +10,14 @@ dependencies: axi: { git: "https://github.com/pulp-platform/axi.git", version: 0.31.0 } common_cells: { git: "https://github.com/pulp-platform/common_cells", version: 1.23.0 } - fpnew: { git: "https://github.com/openhwgroup/cvfpu.git", version: 0.7.0 } + fpnew: { git: "https://github.com/openhwgroup/cvfpu.git", rev: 3eb6afe } # branch: develop tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.13 } export_include_dirs: - core/include + - core/cache_subsystem/hpdcache/rtl/include + - core/cache_subsystem/hpdcache/rtl/src/utils/ecc sources: - include_dirs: @@ -35,6 +37,14 @@ sources: files: - core/include/cv64a6_imafdc_sv39_wb_config_pkg.sv + - target: cv64a6_imafdc_sv39_hpdcache + files: + - core/include/cv64a6_imafdc_sv39_hpdcache_config_pkg.sv + + - target: cv64a6_imafdc_sv39_hpdcache_wb + files: + - core/include/cv64a6_imafdc_sv39_hpdcache_wb_config_pkg.sv + - target: cv64a6_imafdch_sv39 files: - core/include/cv64a6_imafdch_sv39_config_pkg.sv @@ -55,6 +65,18 @@ sources: files: - core/include/cv32a6_imafc_sv32_config_pkg.sv + - target: cv32a60x + files: + - core/include/cv32a60x_config_pkg.sv + + - target: cv32a65x + files: + - core/include/cv32a65x_config_pkg.sv + + - target: cv64a60ax_cvfpu_uvm + files: + - core/include/cv64a60ax_config_pkg_cvfpu-uvm.sv + # General config infrastructure - core/include/riscv_pkg.sv - core/include/ariane_pkg.sv @@ -65,19 +87,24 @@ sources: - core/cva6_accel_first_pass_decoder_stub.sv # MMU - - target: any(cv64a6_imafdcv_sv39, cv64a6_imafdc_sv39, cv64a6_imafdc_sv39_wb, cv64a6_imafdch_sv39, cv64a6_imafdch_sv39_wb, cv32a6_imac_sv0, cv32a6_imac_sv32, cv32a6_imafc_sv32) + - target: any(cv64a6_imafdcv_sv39, cv64a6_imafdc_sv39, cv64a6_imafdc_sv39_wb, cv64a6_imafdch_sv39, cv64a6_imafdc_sv39_hpdcache, cv64a6_imafdc_sv39_hpdcache_wb, cv64a6_imafdch_sv39_wb, cv32a6_imac_sv0, cv32a6_imac_sv32, cv32a6_imafc_sv32) files: - core/cva6_mmu/cva6_tlb.sv + - core/cva6_mmu/cva6_shared_tlb.sv - core/cva6_mmu/cva6_mmu.sv - core/cva6_mmu/cva6_ptw.sv # Packages + - core/include/dummy_l15_pkg.sv - core/include/wt_cache_pkg.sv - core/include/std_cache_pkg.sv + - core/include/aes_pkg.sv # Extension Interface - core/cvxif_example/include/cvxif_instr_pkg.sv - core/cvxif_fu.sv + - core/cvxif_issue_register_commit_if_driver.sv + - core/cvxif_compressed_if_driver.sv - core/cvxif_example/cvxif_example_coprocessor.sv - core/cvxif_example/instr_decoder.sv @@ -86,7 +113,9 @@ sources: - core/cva6_fifo_v3.sv # Top-level source files (not necessarily instantiated at the top of the cva6). - core/cva6.sv + - core/aes.sv - core/alu.sv + - core/alu_wrapper.sv - core/fpu_wrap.sv # depends on fpnew_pkg, above - core/branch_unit.sv - core/compressed_decoder.sv @@ -95,6 +124,7 @@ sources: - core/csr_regfile.sv - core/decoder.sv - core/ex_stage.sv + - core/acc_dispatcher.sv - core/instr_realign.sv - core/id_stage.sv - core/issue_read_operands.sv @@ -109,6 +139,7 @@ sources: - core/ariane_regfile_ff.sv - core/ariane_regfile_fpga.sv - core/scoreboard.sv + - core/raw_checker.sv - core/store_buffer.sv - core/amo_buffer.sv - core/store_unit.sv @@ -118,6 +149,7 @@ sources: # Frontend (i.e., fetch, decode, dispatch) - core/frontend/btb.sv - core/frontend/bht.sv + - core/frontend/bht2lvl.sv - core/frontend/ras.sv - core/frontend/instr_scan.sv - core/frontend/instr_queue.sv @@ -138,10 +170,81 @@ sources: - core/cache_subsystem/cache_ctrl.sv - core/cache_subsystem/std_nbdcache.sv - core/cache_subsystem/std_cache_subsystem.sv + # HPDCache sources + - core/cache_subsystem/hpdcache/rtl/src/hpdcache_pkg.sv + - core/cache_subsystem/hpdcache/rtl/src/utils/hpdcache_mem_resp_demux.sv + - core/cache_subsystem/hpdcache/rtl/src/utils/hpdcache_mem_to_axi_read.sv + - core/cache_subsystem/hpdcache/rtl/src/utils/hpdcache_mem_to_axi_write.sv + - core/cache_subsystem/hpdcache/rtl/src/utils/hpdcache_mem_req_read_arbiter.sv + - core/cache_subsystem/hpdcache/rtl/src/utils/hpdcache_mem_req_write_arbiter.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_demux.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_lfsr.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_sync_buffer.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_fifo_reg.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_fifo_reg_initialized.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_fxarb.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_rrarb.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_mux.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_decoder.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_1hot_to_binary.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_prio_1hot_encoder.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_prio_bin_encoder.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_sram.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_sram_wbyteenable.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_sram_wmask.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_regbank_wbyteenable_1rw.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_regbank_wmask_1rw.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_data_downsize.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_data_upsize.sv + - core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_data_resize.sv + - core/cache_subsystem/hpdcache/rtl/src/hwpf_stride/hwpf_stride_pkg.sv + - core/cache_subsystem/hpdcache/rtl/src/hwpf_stride/hwpf_stride.sv + - core/cache_subsystem/hpdcache/rtl/src/hwpf_stride/hwpf_stride_arb.sv + - core/cache_subsystem/hpdcache/rtl/src/hwpf_stride/hwpf_stride_wrapper.sv + - core/cache_subsystem/hpdcache/rtl/src/hpdcache.sv + - core/cache_subsystem/hpdcache/rtl/src/hpdcache_amo.sv + - core/cache_subsystem/hpdcache/rtl/src/hpdcache_cmo.sv + - core/cache_subsystem/hpdcache/rtl/src/hpdcache_core_arbiter.sv + - core/cache_subsystem/hpdcache/rtl/src/hpdcache_ctrl.sv + - core/cache_subsystem/hpdcache/rtl/src/hpdcache_ctrl_pe.sv + - core/cache_subsystem/hpdcache/rtl/src/hpdcache_memctrl.sv + - core/cache_subsystem/hpdcache/rtl/src/hpdcache_miss_handler.sv + - core/cache_subsystem/hpdcache/rtl/src/hpdcache_mshr.sv + - core/cache_subsystem/hpdcache/rtl/src/hpdcache_rtab.sv + - core/cache_subsystem/hpdcache/rtl/src/hpdcache_uncached.sv + - core/cache_subsystem/hpdcache/rtl/src/hpdcache_victim_plru.sv + - core/cache_subsystem/hpdcache/rtl/src/hpdcache_victim_random.sv + - core/cache_subsystem/hpdcache/rtl/src/hpdcache_victim_sel.sv + - core/cache_subsystem/hpdcache/rtl/src/hpdcache_wbuf.sv + - core/cache_subsystem/hpdcache/rtl/src/hpdcache_flush.sv + - core/cache_subsystem/hpdcache/rtl/src/hpdcache_cbuf.sv + # HPDCache integration + - core/cache_subsystem/cva6_hpdcache_if_adapter.sv + - core/cache_subsystem/cva6_hpdcache_subsystem_axi_arbiter.sv + - core/cache_subsystem/cva6_hpdcache_subsystem.sv + - core/cache_subsystem/cva6_hpdcache_wrapper.sv + # HPDCache ECC + - core/cache_subsystem/hpdcache/rtl/src/utils/ecc/prim_secded_pkg.sv + - core/cache_subsystem/hpdcache/rtl/src/utils/ecc/prim_secded_36_29_dec.sv + - core/cache_subsystem/hpdcache/rtl/src/utils/ecc/prim_secded_36_29_enc.sv + - core/cache_subsystem/hpdcache/rtl/src/utils/ecc/prim_secded_39_32_dec.sv + - core/cache_subsystem/hpdcache/rtl/src/utils/ecc/prim_secded_39_32_enc.sv + - core/cache_subsystem/hpdcache/rtl/src/utils/ecc/prim_secded_55_48_dec.sv + - core/cache_subsystem/hpdcache/rtl/src/utils/ecc/prim_secded_55_48_enc.sv + - core/cache_subsystem/hpdcache/rtl/src/utils/ecc/prim_secded_72_64_dec.sv + - core/cache_subsystem/hpdcache/rtl/src/utils/ecc/prim_secded_72_64_enc.sv + # HPDCache SRAM models + - core/cache_subsystem/hpdcache/rtl/src/common/macros/behav/hpdcache_sram_1rw.sv + - core/cache_subsystem/hpdcache/rtl/src/common/macros/behav/hpdcache_sram_ecc_1rw.sv + - core/cache_subsystem/hpdcache/rtl/src/common/macros/behav/hpdcache_sram_wbyteenable_1rw.sv + - core/cache_subsystem/hpdcache/rtl/src/common/macros/behav/hpdcache_sram_wbyteenable_ecc_1rw.sv + - core/cache_subsystem/hpdcache/rtl/src/common/macros/behav/hpdcache_sram_wmask_1rw.sv + - core/cache_subsystem/hpdcache/rtl/src/common/macros/behav/hpdcache_sram_wmask_ecc_1rw.sv # Physical Memory Protection - core/pmp/src/pmp.sv - core/pmp/src/pmp_entry.sv + - core/pmp/src/pmp_data_if.sv - include_dirs: - common/local/util @@ -153,12 +256,16 @@ sources: - common/local/util files: - common/local/util/tc_sram_wrapper.sv + - common/local/util/sram_cache.sv + - common/local/util/tc_sram_wrapper_cache_techno.sv - target: all(fpga, xilinx) include_dirs: - common/local/util files: + - common/local/util/sram_cache.sv - common/local/util/tc_sram_fpga_wrapper.sv + - vendor/pulp-platform/fpga-support/rtl/SyncSpRamBeNx64.sv - target: not(synthesis) include_dirs: diff --git a/CHANGELOG.md b/CHANGELOG.md index 3046b001e78..e58658fd622 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -218,7 +218,7 @@ src/util/axi_slave_connect_rev.sv ### Added -- Improved instruction fetch fronten-end +- Improved instruction fetch front-end - Add RAS - Add support for Bender hardware management diff --git a/CODEOWNERS b/CODEOWNERS index 9a4976dad47..67589d40d8e 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,5 +1,5 @@ # Global Owners -* @JeanRochCoulon @zarubaf +* @JeanRochCoulon # Core @@ -7,9 +7,18 @@ core/mmu_sv39 @sjthales core/cvxif_example @Gchauvon core/cvxif_fu.sv @Gchauvon -# APU +# HPDCache + +core/cache_subsystem/hpdcache @cfuguet +core/cache_subsystem/cva6_hpdcache* @cfuguet +core/include/cv64a6_imafdc_sv39_hpdcache_config_pkg.sv @cfuguet +core/include/cv64a6_imafdc_sv39_hpdcache_wb_config_pkg.sv @cfuguet + +# OpenPiton corev_apu/openpiton @Jbalkind +core/cache_subsystem/wt_l15_adapter.sv @Jbalkind +core/include/cv64a6_imafdc_sv39_openpiton_config_pkg.sv @Jbalkind ## Documentation diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 51b182403c2..3d8d0008fa9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,39 +1,55 @@ # Contributing -New Contributors are always welcome. + +New motivated Contributors are always welcome. Note that Contributors are required to be covered by an [Eclipse Contributor Agreement](https://www.eclipse.org/legal/ECA.php). -Contributors are encouraged, but not required, to be a [member](https://www.openhwgroup.org/membership/) of the OpenHW Group. +If a pull request has been open with no ECA for more than 24 hours, we consider it as either an automated pull request, which is not allowed, or an unmotivated pull request, which is rejected. +Such pull requests will be closed by maintainers. +So, if you encounter any issues, with the signing process, please tell us! +We will be glad to help. +Drop a comment in your pull request so we know about your problem and we do not close your pull request. + +Contributors are encouraged, but not required, to be a [member](https://openhwfoundation.org/membership/become-a-member/) of the OpenHW Foundation, part of the Eclipse Foundation. -## Read this before +## Read this first ### Major evolutions CVA6 has turned into an industrial project, where the core is being verified to be integrated in production ICs. -In the same time, we'd like to continue integrating some new contributions to keep CVA6 a vivid and innovative ecosystem. -But this comes with constraints to ensure that new contributions do not put the industrial project at risk. +At the same time, we'd like to continue integrating some new contributions to keep CVA6 a vivid and innovative ecosystem. +This comes with constraints to ensure that new contributions do not put the industrial project at risk. -Therefore here are guidelines to help the CVA6 team accept new contributions: +Past experience indicates that a workplan shared early with the CVA6 project team and regular synchronization improves the project's ability to integrate major contributions. +Early discussions with the CVA6 team will help us to develop a strategy to integrate your contribution onto a specific development branch, with the goal of upstreaming to the master branch. +Here are some guidelines to help the CVA6 team accept new contributions of major features: - Get in touch early with the CVA6 team, present your initiative, get feedback, synchronize with the team... * The CVA6 team wants to assess the potential of your contribution. + * The CVA6 team plans the next evolutions, and your contributions could be incompatible with them. * The CVA6 team can provide you recommendations to ease the upcoming contribution. * This can help save significant review and overhauling effort for you and us when dealing with the pull request review. * Together, we can anticipate specific cases that are not addressed here. - * If you do not know how to contact us already, get in touch through info@openhwgroup.org or open an issue in GitHub. + * If you do not know how to contact us already, get in touch through info@eclipse-foundation.org or open an issue in GitHub. - Specific recommendations: - * Always consider using the CV-X-IF interface if your contribution is an instruction-set extension. - - and talk to the team if it's not possible. + * For instruction set extensions, talk to the team to assess the relevance of including it into the core or as a coprocessor on the CV-X-IF interface. + - If the extension is custom (not a RISC-V specified extension), a coprocessor on CV-X-IF is definitely its place. * Your contribution shall be optional and fully disabled by default. - so that projects already using CVA6 are not impacted (no functionality change, no extra silicon...). - * To configure your contribution, System Verilog top-level parameters are preferred. - - Synchronize with CVA6 team if this is not possible and you need other means (`directives, ariane_pkg parameters, templating...) - - Synchronize with CVA6 team (again) because this rule is likely to change over time as we are considering templating. + * To configure your contribution, System Verilog top-level parameters are strongly advised. + - Conditional compiler directives such as `ifdef, etc. are strongly discouraged. + - Please review our wiki on the topic of [Configuring SystemVerilog RTL Models](https://github.com/openhwgroup/cva6/wiki/Configuring-SystemVerilog-RTL-Models), in particular the [CVA6 use case](https://github.com/openhwgroup/cva6/wiki/Configuring-SystemVerilog-RTL-Models#use-case-the-openhw-foundation-cva6). + - Synchronize with CVA6 team if you do not find an appropriate solution. * Commit to maintain your contribution 2 years after the pull request - We know it's not always possible, so refer to the next rule. - * Your complete contribution shall be identifiable with parameters (or `directives / templating if together we decide to go this way). + * Your complete contribution shall be identifiable with parameters. - If at some point we need to revert it, e.g. if there is no-one maintaining nor using it and it has become a burden to the project. - We call this the "parachute" rule: The CVA6 team does not want to use it but is far more comfortable getting one. + - Also, this allows not to lose code coverage in verification when your contribution is not enabled (with some tweaks in the coverage tool). + - This rule also applies to CSRs which are specific to your contribution. + * To ease maintenance, all common code lines shall exist only once. + - Counter-example: CVA6 used to have two different MMU modules (Sv32 and Sv39) for CV32A6 and CV64A6. It took time to refactor both in a joint design to ease maintenance. + - Related reading for reference: [DRY principle](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself) * Your contribution shall pass the Continuous Integration (CI) flow - When the contribution is disabled: in all cases, to ensure you have not broken the design. - When the contribution is disabled: the line and condition code coverage shall not be impacted. @@ -44,12 +60,34 @@ Therefore here are guidelines to help the CVA6 team accept new contributions: - So that we can detect quickly if future updates break your contribution. - To avoid impacting those users who use your contribution in their project. - At this point, we do not request a 100%-coverage verification suite. + * Please consider adding related documentation in the user's guide and design document. + * Be kind to the people who process your pull request(s) + - Explain your contribution in the pull request. + - If your contribution solves an issue, fill in an issue and cross link it in the pull-request. + - The reviewer(s) prefer to review several small pull requests rather one large pull request. Synchronize with the team to identify the right breakdown. If you encounter difficulties with these guidelines, get in touch with the team! ### Bug fixing -Bug fixing is always welcome. You can issue a GitHub issue. Better: solve the bug and trigger a pull request. +Bug fixing is always welcome. You can open a GitHub issue. +Better: in addition to the issue, solve the bug and trigger a pull request. +Ideally, your pull request will include a testcase that illustrates the bug. + +### Use of AI + +We understand that some developers are assisted by large language models to help write code. However, AI-generated code shall always be reviewed and endorsed **by the human contributor** before submitting the pull request. +The review by the human contributor shall be as thorough as if they had written the code themselves. Notably the human contributor shall understand and explain all generated code and assess the relevance of comments. + +Contributions through code/documentation (pull requests) or feedback (issues) are highly appreciated, but keep in mind that each contribution has a cost for the project, as reviewers will spend time discussing the contributions. +For more information on this topic, see: + +This is why **automated pull requests, directly generated by large language models or AI coding assistants, are not permitted in this repository**. +Such contributions will be closed without review. + +Also, note that the review process implies discussing the contribution between the reviewers and the author. +We consider that it would be particularly rude if the author lets an AI answer instead of answering themselves. +We are not expecting long answers with a perfect English. We are expecting *the author's* thoughts on a specific topic. ## The Mechanics 1. From GitHub: [fork](https://help.github.com/articles/fork-a-repo/) the [cva6](https://github.com/openhwgroup/cva6) repository @@ -59,7 +97,7 @@ See the [Git Cheats](https://github.com/openhwgroup/core-v-verif/blob/master/Git 4. Make your edits... 5. Commit your changes: `git commit -m 'Add some feature'` 6. Push feature branch: `git push origin ` -7. From GitHub: submit a pull request +7. From GitHub: submit a pull request. The description must tell the reviewers why these changes are important for the project. More advice is provided in the pull request template. Please note that we do not accept outdated pull requests. This makes sure the CI flow has run in the to-be version of the master. @@ -67,12 +105,16 @@ This makes sure the CI flow has run in the to-be version of the master. To allow us to update the pull request before merging it, please consider checking the "Allow edits from maintainers" checkbox. Note that this can only be done with pull requests from your personal repository (it is impossible from organization repositories). +One last note: use the same email address for your GitHub and Eclipse accounts, to ensure a smooth Eclipse Contributor Agreement +check for your pull request. + ## Coding Style -For RTL coding, the OpenHW Group has adopted the [lowRISC Style Guides](https://github.com/lowRISC/style-guides/). +For RTL coding, the OpenHW Foundation has adopted the [lowRISC Style Guides](https://github.com/lowRISC/style-guides/). ## Git Considerations +- The pull request must be rebased on the master branch to be merged on GitHub. That is why we are requesting permissions on the PR branch to allow the committer to perform the rebasing. - Do not push to master, if you want to add a feature do it in your branch. - Separate subject from body with a blank line. - Limit the subject line to 50 characters. @@ -99,3 +141,5 @@ To format RTL files checked by GitHub , use the following command: ``` verible-verilog-format --inplace $(git ls-tree -r HEAD --name-only core |grep '\.sv$' |grep -v '^core/include/std_cache_pkg.sv$' |grep -v cvfpu) ``` + +The Verible version currently used in the GitHub CI worflow can be found in [`.github/workflows/verible.yml`](.github/workflows/verible.yml). diff --git a/Flist.ariane b/Flist.ariane index 0edfa8e4f59..d26530549d3 100644 --- a/Flist.ariane +++ b/Flist.ariane @@ -20,24 +20,40 @@ +incdir+common/local/util/ +incdir+corev_apu/register_interface/include/ +core/include/config_pkg.sv core/include/cv64a6_imafdc_sv39_openpiton_config_pkg.sv core/include/riscv_pkg.sv corev_apu/riscv-dbg/src/dm_pkg.sv -vendor/openhwgroup/cvfpu/src/fpnew_pkg.sv +core/cvfpu/src/fpnew_pkg.sv core/include/ariane_pkg.sv -core/include/acc_pkg.sv corev_apu/tb/ariane_soc_pkg.sv vendor/pulp-platform/axi/src/axi_pkg.sv corev_apu/tb/ariane_axi_pkg.sv core/include/wt_cache_pkg.sv corev_apu/tb/axi_intf.sv -core/include/cvxif_pkg.sv vendor/pulp-platform/common_cells/src/cf_math_pkg.sv core/include/instr_tracer_pkg.sv core/cvxif_example/include/cvxif_instr_pkg.sv core/acc_dispatcher.sv corev_apu/rv_plic/rtl/rv_plic_reg_pkg.sv +core/cache_subsystem/cva6_hpdcache_wrapper.sv +core/cache_subsystem/cva6_hpdcache_subsystem.sv +core/cache_subsystem/cva6_hpdcache_subsystem_axi_arbiter.sv +core/cache_subsystem/cva6_hpdcache_subsystem_l15_adapter.sv +core/cache_subsystem/cva6_hpdcache_if_adapter.sv +core/cache_subsystem/hpdcache/rtl/src/common/macros/behav/hpdcache_sram_1rw.sv +core/cache_subsystem/hpdcache/rtl/src/common/macros/behav/hpdcache_sram_wbyteenable_1rw.sv +core/cache_subsystem/hpdcache/rtl/src/common/macros/behav/hpdcache_sram_wmask_1rw.sv +core/cache_subsystem/hpdcache/rtl/src/utils/hpdcache_l15_req_arbiter.sv +core/cache_subsystem/hpdcache/rtl/src/utils/hpdcache_l15_resp_demux.sv +core/cache_subsystem/hpdcache/rtl/src/utils/hpdcache_to_l15.sv +core/cache_subsystem/hpdcache/rtl/src/utils/hpdcache_mem_req_read_arbiter.sv +core/cache_subsystem/hpdcache/rtl/src/utils/hpdcache_mem_resp_demux.sv +core/cache_subsystem/hpdcache/rtl/src/utils/hpdcache_mem_req_write_arbiter.sv +core/cache_subsystem/hpdcache/rtl/src/utils/hpdcache_mem_to_axi_write.sv +core/cache_subsystem/hpdcache/rtl/src/utils/hpdcache_mem_to_axi_read.sv common/local/util/sram.sv +common/local/util/sram_cache.sv vendor/pulp-platform/common_cells/src/deprecated/rrarbiter.sv vendor/pulp-platform/common_cells/src/deprecated/fifo_v1.sv vendor/pulp-platform/common_cells/src/deprecated/fifo_v2.sv @@ -60,8 +76,11 @@ vendor/pulp-platform/tech_cells_generic/src/rtl/tc_sram.sv vendor/pulp-platform/tech_cells_generic/src/rtl/tc_clk.sv core/cache_subsystem/axi_adapter.sv core/alu.sv +core/alu_wrapper.sv core/fpu_wrap.sv corev_apu/src/ariane.sv +core/include/build_config_pkg.sv +core/cva6_rvfi_probes.sv core/cva6.sv core/branch_unit.sv core/compressed_decoder.sv @@ -72,6 +91,7 @@ core/decoder.sv core/ex_stage.sv core/frontend/btb.sv core/frontend/bht.sv +core/frontend/bht2lvl.sv core/frontend/ras.sv core/frontend/instr_scan.sv core/frontend/instr_queue.sv @@ -83,22 +103,21 @@ core/issue_stage.sv core/load_unit.sv core/load_store_unit.sv core/lsu_bypass.sv -core/mmu_sv39/mmu.sv -core/mmu_sv39x4/cva6_mmu_sv39x4.sv +core/cva6_mmu/cva6_shared_tlb.sv +core/cva6_mmu/cva6_mmu.sv core/mult.sv core/multiplier.sv core/serdiv.sv core/perf_counters.sv -core/mmu_sv39/ptw.sv -core/mmu_sv39x4/ptw_sv39x4.sv +core/cva6_mmu/cva6_ptw.sv core/ariane_regfile_ff.sv -core/re_name.sv core/scoreboard.sv +core/raw_checker.sv core/store_buffer.sv +core/cva6_fifo_v3.sv core/amo_buffer.sv core/store_unit.sv -core/mmu_sv39/tlb.sv -core/mmu_sv39x4/tlb_sv39x4.sv +core/cva6_mmu/cva6_tlb.sv core/commit_stage.sv core/cache_subsystem/wt_dcache_ctrl.sv core/cache_subsystem/wt_dcache_mem.sv @@ -112,7 +131,6 @@ core/cache_subsystem/wt_cache_subsystem.sv corev_apu/clint/clint.sv corev_apu/clint/axi_lite_interface.sv corev_apu/riscv-dbg/debug_rom/debug_rom.sv -corev_apu/riscv-dbg/src/dm_pkg.sv corev_apu/riscv-dbg/src/dm_csrs.sv corev_apu/riscv-dbg/src/dm_mem.sv corev_apu/riscv-dbg/src/dm_top.sv @@ -139,25 +157,38 @@ corev_apu/fpga/src/axi_slice/src/axi_r_buffer.sv corev_apu/fpga/src/axi_slice/src/axi_aw_buffer.sv corev_apu/register_interface/src/apb_to_reg.sv corev_apu/register_interface/src/reg_intf.sv -vendor/openhwgroup/cvfpu/src/fpu_div_sqrt_mvp/hdl/defs_div_sqrt_mvp.sv -vendor/openhwgroup/cvfpu/src/fpu_div_sqrt_mvp/hdl/control_mvp.sv -vendor/openhwgroup/cvfpu/src/fpu_div_sqrt_mvp/hdl/div_sqrt_mvp_wrapper.sv -vendor/openhwgroup/cvfpu/src/fpu_div_sqrt_mvp/hdl/div_sqrt_top_mvp.sv -vendor/openhwgroup/cvfpu/src/fpu_div_sqrt_mvp/hdl/iteration_div_sqrt_mvp.sv -vendor/openhwgroup/cvfpu/src/fpu_div_sqrt_mvp/hdl/norm_div_sqrt_mvp.sv -vendor/openhwgroup/cvfpu/src/fpu_div_sqrt_mvp/hdl/nrbd_nrsc_mvp.sv -vendor/openhwgroup/cvfpu/src/fpu_div_sqrt_mvp/hdl/preprocess_mvp.sv -vendor/openhwgroup/cvfpu/src/fpnew_cast_multi.sv -vendor/openhwgroup/cvfpu/src/fpnew_classifier.sv -vendor/openhwgroup/cvfpu/src/fpnew_divsqrt_multi.sv -vendor/openhwgroup/cvfpu/src/fpnew_fma_multi.sv -vendor/openhwgroup/cvfpu/src/fpnew_fma.sv -vendor/openhwgroup/cvfpu/src/fpnew_noncomp.sv -vendor/openhwgroup/cvfpu/src/fpnew_opgroup_block.sv -vendor/openhwgroup/cvfpu/src/fpnew_opgroup_fmt_slice.sv -vendor/openhwgroup/cvfpu/src/fpnew_opgroup_multifmt_slice.sv -vendor/openhwgroup/cvfpu/src/fpnew_rounding.sv -vendor/openhwgroup/cvfpu/src/fpnew_top.sv +core/cvfpu/src/fpu_div_sqrt_mvp/hdl/defs_div_sqrt_mvp.sv +core/cvfpu/src/fpu_div_sqrt_mvp/hdl/control_mvp.sv +core/cvfpu/src/fpu_div_sqrt_mvp/hdl/div_sqrt_mvp_wrapper.sv +core/cvfpu/src/fpu_div_sqrt_mvp/hdl/div_sqrt_top_mvp.sv +core/cvfpu/src/fpu_div_sqrt_mvp/hdl/iteration_div_sqrt_mvp.sv +core/cvfpu/src/fpu_div_sqrt_mvp/hdl/norm_div_sqrt_mvp.sv +core/cvfpu/src/fpu_div_sqrt_mvp/hdl/nrbd_nrsc_mvp.sv +core/cvfpu/src/fpu_div_sqrt_mvp/hdl/preprocess_mvp.sv +core/cvfpu/src/fpnew_cast_multi.sv +core/cvfpu/src/fpnew_classifier.sv +core/cvfpu/src/fpnew_divsqrt_multi.sv +core/cvfpu/src/fpnew_divsqrt_th_64_multi.sv +core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/clk/rtl/gated_clk_cell.v +core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_ctrl.v +core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_double.v +core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_ff1.v +core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_pack.v +core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_prepare.v +core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_round.v +core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_scalar_dp.v +core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_srt.v +core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_srt_radix16_bound_table.v +core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_srt_radix16_with_sqrt.v +core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_top.v +core/cvfpu/src/fpnew_fma_multi.sv +core/cvfpu/src/fpnew_fma.sv +core/cvfpu/src/fpnew_noncomp.sv +core/cvfpu/src/fpnew_opgroup_block.sv +core/cvfpu/src/fpnew_opgroup_fmt_slice.sv +core/cvfpu/src/fpnew_opgroup_multifmt_slice.sv +core/cvfpu/src/fpnew_rounding.sv +core/cvfpu/src/fpnew_top.sv core/pmp/src/pmp.sv core/pmp/src/pmp_entry.sv core/pmp/src/pmp_data_if.sv @@ -167,3 +198,5 @@ core/cvxif_example/instr_decoder.sv vendor/pulp-platform/common_cells/src/counter.sv vendor/pulp-platform/common_cells/src/delta_counter.sv core/cvxif_fu.sv +core/cvxif_issue_register_commit_if_driver.sv +core/cvxif_compressed_if_driver.sv diff --git a/Makefile b/Makefile index 915b2df775b..eff5f790801 100644 --- a/Makefile +++ b/Makefile @@ -167,9 +167,9 @@ src := $(if $(spike-tandem),verif/tb/core/uvma_core_cntrl_pkg.sv) $(wildcard corev_apu/fpga/src/axi2apb/src/*.sv) \ $(wildcard corev_apu/fpga/src/apb_timer/*.sv) \ $(wildcard corev_apu/fpga/src/axi_slice/src/*.sv) \ - $(wildcard corev_apu/src/axi_riscv_atomics/src/*.sv) \ + $(wildcard vendor/pulp-platform/axi_riscv_atomics/src/*.sv) \ $(wildcard corev_apu/axi_mem_if/src/*.sv) \ - $(wildcard corev_apu/riscv-dbg/src/*.sv) \ + $(wildcard corev_apu/riscv-dbg/src/*.sv) \ corev_apu/rv_plic/rtl/rv_plic_target.sv \ corev_apu/rv_plic/rtl/rv_plic_gateway.sv \ corev_apu/rv_plic/rtl/plic_regmap.sv \ @@ -201,13 +201,34 @@ src := $(if $(spike-tandem),verif/tb/core/uvma_core_cntrl_pkg.sv) vendor/pulp-platform/tech_cells_generic/src/deprecated/cluster_clk_cells.sv \ vendor/pulp-platform/tech_cells_generic/src/deprecated/pulp_clk_cells.sv \ vendor/pulp-platform/tech_cells_generic/src/rtl/tc_clk.sv \ + corev_apu/instr_tracing/ITI/include/iti_pkg.sv \ + corev_apu/instr_tracing/rv_tracer-main/include/te_pkg.sv \ + corev_apu/instr_tracing/rv_encapsulator-main/src/include/encap_pkg.sv \ corev_apu/tb/ariane_testharness.sv \ corev_apu/tb/ariane_peripherals.sv \ corev_apu/tb/rvfi_tracer.sv \ corev_apu/tb/common/uart.sv \ corev_apu/tb/common/SimDTM.sv \ - corev_apu/tb/common/SimJTAG.sv - + corev_apu/tb/common/SimJTAG.sv \ + corev_apu/instr_tracing/ITI/cva6_iti/iti.sv \ + corev_apu/instr_tracing/ITI/cva6_iti/block_retirement.sv \ + corev_apu/instr_tracing/ITI/cva6_iti/single_retirement.sv \ + corev_apu/instr_tracing/ITI/cva6_iti/itype_detector.sv \ + vendor/pulp-platform/common_cells/src/counter.sv \ + vendor/pulp-platform/common_cells/src/sync.sv \ + vendor/pulp-platform/common_cells/src/sync_wedge.sv \ + vendor/pulp-platform/common_cells/src/edge_detect.sv \ + corev_apu/instr_tracing/rv_tracer-main/rtl/lzc.sv \ + corev_apu/instr_tracing/rv_tracer-main/rtl/te_branch_map.sv \ + corev_apu/instr_tracing/rv_tracer-main/rtl/te_filter.sv \ + corev_apu/instr_tracing/rv_tracer-main/rtl/te_packet_emitter.sv \ + corev_apu/instr_tracing/rv_tracer-main/rtl/te_priority.sv \ + corev_apu/instr_tracing/rv_tracer-main/rtl/te_reg.sv \ + corev_apu/instr_tracing/rv_tracer-main/rtl/te_resync_counter.sv \ + corev_apu/instr_tracing/rv_tracer-main/rtl/rv_tracer.sv \ + vendor/pulp-platform/common_cells/src/fifo_v3.sv \ + corev_apu/instr_tracing/DPTI/slicer_DPTI.sv \ + corev_apu/instr_tracing/rv_encapsulator-main/src/rtl/encapsulator.sv src := $(addprefix $(root-dir), $(src)) copro_src := core/cvxif_example/include/cvxif_instr_pkg.sv \ @@ -217,6 +238,9 @@ copro_src := $(addprefix $(root-dir), $(copro_src)) uart_src := $(wildcard corev_apu/fpga/src/apb_uart/src/vhdl_orig/*.vhd) uart_src := $(addprefix $(root-dir), $(uart_src)) +dpti_src := $(wildcard corev_apu/instr_tracing/DPTI/*.vhd) +dpti_src := $(addprefix $(root-dir), $(dpti_src)) + uart_src_sv:= corev_apu/fpga/src/apb_uart/src/slib_clock_div.sv \ corev_apu/fpga/src/apb_uart/src/slib_counter.sv \ corev_apu/fpga/src/apb_uart/src/slib_edge_detect.sv \ @@ -279,7 +303,8 @@ xil_debug_filter += $(addprefix $(root-dir), corev_apu/riscv-dbg/src/dmi_vjtag_t xil_debug_filter += $(addprefix $(root-dir), corev_apu/riscv-dbg/src/dmi_vjtag.sv) src := $(filter-out $(xil_debug_filter), $(src)) -fpga_src := $(addprefix $(root-dir), $(fpga_src)) src/bootrom/bootrom_$(XLEN).sv +fpga_src += corev_apu/fpga/src/bootrom/bootrom_$(XLEN).sv +fpga_src := $(addprefix $(root-dir), $(fpga_src)) # look for testbenches tbs := $(top_level_path) corev_apu/tb/ariane_testharness.sv core/cva6_rvfi.sv @@ -287,7 +312,7 @@ tbs := $(top_level_path) corev_apu/tb/ariane_testharness.sv core/cva6_rvfi.sv tbs := $(addprefix $(root-dir), $(tbs)) # RISCV asm tests and benchmark setup (used for CI) -# there is a definesd test-list with selected CI tests +# there is a defined test-list with selected CI tests riscv-test-dir := tmp/riscv-tests/build/isa/ riscv-benchmarks-dir := tmp/riscv-tests/build/benchmarks/ riscv-asm-tests-list := ci/riscv-asm-tests.list @@ -311,6 +336,9 @@ incdir := $(CVA6_REPO_DIR)/vendor/pulp-platform/common_cells/include/ $(CVA6_REP $(CVA6_REPO_DIR)/verif/core-v-verif/lib/uvm_agents/uvma_core_cntrl/ \ $(CVA6_REPO_DIR)/verif/tb/core/ \ $(CVA6_REPO_DIR)/core/include/ \ + $(HPDCACHE_DIR)/rtl/include \ + $(HPDCACHE_DIR)/rtl/src/utils/ecc \ + $(CVA6_REPO_DIR)/corev_apu/instr_tracing/ITI/include \ $(SPIKE_INSTALL_DIR)/include/disasm/ # Compile and sim flags @@ -507,6 +535,8 @@ XRUN_RUN_LOG ?= xrun_run.log CVA6_HOME ?= $(realpath -s $(root-dir)) XRUN_INCDIR :=+incdir+$(CVA6_HOME)/core/include \ + +incdir+$(HPDCACHE_DIR)/rtl/include \ + +incdir+$(HPDCACHE_DIR)/rtl/src/utils/ecc \ +incdir+$(CVA6_HOME)/vendor/pulp-platform/axi/include/ \ +incdir+$(CVA6_HOME)/corev_apu/register_interface/include @@ -780,12 +810,13 @@ fpga_filter += $(addprefix $(root-dir), core/cache_subsystem/hpdcache/rtl/src/co fpga_filter += $(addprefix $(root-dir), core/cache_subsystem/hpdcache/rtl/src/common/macros/behav/hpdcache_sram_wbyteenable_1rw.sv) fpga_filter += $(addprefix $(root-dir), core/cache_subsystem/hpdcache/rtl/src/common/macros/behav/hpdcache_sram_wmask_1rw.sv) -src/bootrom/bootrom_$(XLEN).sv: +$(addprefix $(root-dir), corev_apu/fpga/src/bootrom/bootrom_$(XLEN).sv): $(MAKE) -C corev_apu/fpga/src/bootrom BOARD=$(BOARD) XLEN=$(XLEN) PLATFORM=$(PLATFORM) bootrom_$(XLEN).sv -fpga: $(ariane_pkg) $(src) $(fpga_src) $(uart_src) $(src_flist) +fpga: $(ariane_pkg) $(src) $(fpga_src) $(uart_src) $(dpti_src) $(src_flist) @echo "[FPGA] Generate sources" @echo read_vhdl {$(uart_src)} > corev_apu/fpga/scripts/add_sources.tcl + @echo read_vhdl {$(dpti_src)} >> corev_apu/fpga/scripts/add_sources.tcl @echo read_verilog -sv {$(ariane_pkg)} >> corev_apu/fpga/scripts/add_sources.tcl @echo read_verilog -sv {$(filter-out $(fpga_filter), $(src_flist))} >> corev_apu/fpga/scripts/add_sources.tcl @echo read_verilog -sv {$(filter-out $(fpga_filter), $(src))} >> corev_apu/fpga/scripts/add_sources.tcl diff --git a/README.md b/README.md index 6e8c9e54bd8..cf49306f4af 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,17 @@ -# CVA6 RISC-V CPU [![Build Status](https://github.com/openhwgroup/cva6/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/openhwgroup/cva6/actions/workflows/ci.yml) [![CVA6 dashboard](https://riscv-ci.pages.thales-invia.fr/dashboard/badge.svg)](https://riscv-ci.pages.thales-invia.fr/dashboard/) [![Documentation Status](https://readthedocs.com/projects/openhw-group-cva6-user-manual/badge/?version=latest)](https://docs.openhwgroup.org/projects/cva6-user-manual/?badge=latest) [![GitHub release](https://img.shields.io/github/release/openhwgroup/cva6?include_prereleases=&sort=semver&color=blue)](https://github.com/openhwgroup/cva6/releases/) +# CVA6 RISC-V CPU [![Build Status](https://github.com/openhwgroup/cva6/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/openhwgroup/cva6/actions/workflows/ci.yml) [![CVA6 dashboard](https://riscv-ci.pages.thales-invia.fr/dashboard/badge_master.svg)](https://riscv-ci.pages.thales-invia.fr/dashboard/dashboard_cva6.html) [![Documentation Status](https://readthedocs.com/projects/openhw-group-cva6-user-manual/badge/?version=latest)](https://docs.openhwgroup.org/projects/cva6-user-manual/?badge=latest) [![GitHub release](https://img.shields.io/github/release/openhwgroup/cva6?include_prereleases=&sort=semver&color=blue)](https://github.com/openhwgroup/cva6/releases/) + +> [!IMPORTANT] +> This ``master`` branch is protected and does not accept new pull requests. It is kept online for users who want to continue integrating legacy versions. Please direct new contributions to the ``main`` branch, which has become the default CVA6 branch. CVA6 is a 6-stage, single-issue, in-order CPU which implements the 64-bit RISC-V instruction set. It fully implements I, M, A and C extensions as specified in Volume I: User-Level ISA V 2.3 as well as the draft privilege extension 1.10. It implements three privilege levels M, S, U to fully support a Unix-like operating system. Furthermore, it is compliant to the draft external debug spec 0.13. It has a configurable size, separate TLBs, a hardware PTW and branch-prediction (branch target buffer and branch history table). The primary design goal was on reducing critical path length. +The CVA6 core is part of a vivid ecosystem. In [this document](RESOURCES.md), we gather pointers to this ecosystem (building blocks, designs, partners...). + +A performance model of CVA6 is available in the `perf-model/` folder of this repository. +It can be used to investigate performance-related micro-architecture changes. + @@ -56,403 +64,15 @@ export DV_SIMULATORS=veri-testharness,spike bash verif/regress/smoke-tests.sh ``` -# Running standalone simulations - -Simulating the CVA6 is done by using `verif/sim/cva6.py`. - -The environment variable `DV_SIMULATORS` allows you to specify which simulator to use. - -Four simulation types are supported: -- **veri-testharness**: verilator with corev_apu/testharness testbench -- **vcs-testharness**: vcs with corev_apu/testharness testbench -- **vcs-uvm**: vcs with UVM testbench -- **Spike** ISS - -You can set several simulators, such as : - -```sh -export DV_SIMULATORS=veri-testharness,vcs-testharness,vcs_uvm -``` - -If exactly 2 simulators are given, their trace is compared ([see the Regression tests section](#running-regression-tests-simulations)). - -Here is how you can run the hello world C program with the Verilator model: - -```sh -# Make sure to source this script from the root directory -# to correctly set the environment variables related to the tools -source verif/sim/setup-env.sh - -# Set the NUM_JOBS variable to increase the number of parallel make jobs -# export NUM_JOBS= - -export DV_SIMULATORS=veri-testharness - -cd ./verif/sim - -python3 cva6.py --target cv32a60x --iss=$DV_SIMULATORS --iss_yaml=cva6.yaml \ ---c_tests ../tests/custom/hello_world/hello_world.c \ ---linker=../../config/gen_from_riscv_config/linker/link.ld \ ---gcc_opts="-static -mcmodel=medany -fvisibility=hidden -nostdlib \ --nostartfiles -g ../tests/custom/common/syscalls.c \ -../tests/custom/common/crt.S -lgcc \ --I../tests/custom/env -I../tests/custom/common" -``` - -You can run either assembly programs (check `verif/test/custom/hello_world/custom_test_template.S`) or C programs. Run `python3 cva6.py --help` to have more informations on the available parameters. - -## Simulating with VCS and Verdi - -You can set the environment variable `VERDI` as such if you want to launch Verdi while simulating with VCS: - -```sh -export VERDI=1 -``` - - -# Running regression tests simulations - -The smoke-tests script installs a random instruction generator and several tests suites: -- [riscv-dv](https://github.com/chipsalliance/riscv-dv) -- [riscv-compliance](https://github.com/lowRISC/riscv-compliance) -- [riscv-tests](https://github.com/riscv-software-src/riscv-tests) -- [riscv-arch-test](https://github.com/riscv-non-isa/riscv-arch-test) - - -The regression tests are done by comparing a model simulation trace with the Spike trace. - -Several tests scripts can be found in `./verif/regress` - -For example, here is how would run the riscv-arch-test regression test suite with the Verilator model: - -```sh -export DV_SIMULATORS=veri-testharness,spike -bash verif/regress/dv-riscv-arch-test.sh -``` - - -# Logs - -The logs from cva6.py are located in `./verif/sim/out_YEAR-MONTH-DAY`. - -Assuming you ran the smoke-tests scripts in the previous step, here is the log directory hierarchy: - -- **directed_asm_tests/**: The compiled (to .o then .bin) assembly tests -- **directed_c_tests/**: The compiled (to .o then .bin) c tests -- **spike_sim/**: Spike simulation log and trace files -- **veri_testharness_sim**: Verilator simulation log and trace files -- **iss_regr.log**: The regression test log - -The regression test log summarizes the comparison between the simulator trace and the Spike trace. Beware that a if a test fails before the comparison step, it will not appear in this log, check the output of cva6.py and the logs of the simulation instead. - - -# Waveform generation - -Waveform generation is currently supported for Verilator (`veri-testharness`) -and VCS with full UVM testbench (`vcs-uvm`) simulation types. It is disabled -by default to save simulation time and storage space. - -To enable waveform generation for a supported simulation mode, set either -of the two shell variables that control tracing before running any of the -test scripts under `verif/regress`: -- `export TRACE_FAST=1` enables "fast" waveform generation (keep simulation - time low at the expense of space). This will produce VCD files when using - Verilator, and VPD files when using Synopsys VCS with UVM testbench (`vcs-uvm`). -- `export TRACE_COMPACT=1` enables "compact" waveform generation (keep waveform - files smaller at the expense of increased simulation time). This will - produce FST files when using Verilator, and FSDB files when using Synopsys - VCS with UVM testbench (`vcs-uvm`). - -To generate VCD waveforms of the `smoke-tests` regression suite using Verilator, use: -```sh -export DV_SIMULATORS=veri-testharness,spike -export TRACE_FAST=1 -bash verif/regress/smoke-tests-.sh -``` - -Where `` is one of the following, depending on the CPU variant you want to use. -- `cv32a65x`. -- `cv32a6_imac_sv32`. -- `cv64a6_imafdc_sv39`. - -After each simulation run involving Verilator or VCS, the generated waveforms -will be copied to the directory containing the log files (see above,) with -the name of the current HW configuration added to the file name right before -the file type suffix (e.g., `I-ADD-01.cv32a60x.vcd`). - - -# Physical Implementation - -## ASIC Synthesis - -How to make cva6 synthesis ? -``` -make -C pd/synth cva6_synth FOUNDRY_PATH=/your/techno/basepath/ TECH_NAME=yourTechnoName TARGET_LIBRARY_FILES="yourLib1.db\ yourLib2.db" PERIOD=10 NAND2_AREA=650 TARGET=cv64a6_imafdc_sv39 ADDITIONAL_SEARCH_PATH="others/libs/paths/one\ others/libs/paths/two" -``` -Don't forget to escape spaces in lists. -Reports are under: pd/synth/ariane/reports - - -## ASIC Gate Simulation with `core-v-verif` repository - -> :warning: **Warning**: this chapter needs to be updated. See Github issue https://github.com/openhwgroup/cva6/issues/1358. - -```sh -export DV_SIMULATORS=veri-testharness,spike -cva6/regress/smoke-tests.sh -make -C pd/synth cva6_synth FOUNDRY_PATH=/your/techno/basepath/ TECH_NAME=yourTechnoName TARGET_LIBRARY_FILES="yourLib1.db\ yourLib2.db" PERIOD=10 NAND2_AREA=650 TARGET=cv64a6_imafdc_sv39 ADDITIONAL_SEARCH_PATH="others/libs/paths/one\ others/libs/paths/two" -sed 's/module SyncSpRamBeNx64_1/module SyncSpRamBeNx64_2/' pd/synth/ariane_synth.v > pd/synth/ariane_synth_modified.v -cd cva6/sim -make vcs_clean -python3 cva6.py --testlist=../tests/testlist_riscv-tests-cv64a6_imafdc_sv39-p.yaml --test rv64ui-p-ld --iss_yaml cva6.yaml --target cv64a6_imafdc_sv39 --iss=spike,vcs-core-gate $DV_OPTS -``` - - -# COREV-APU FPGA Emulation - -We currently provide support for the [Genesys 2 board](https://reference.digilentinc.com/reference/programmable-logic/genesys-2/reference-manual) and the [Agilex 7 Development Kit](https://www.intel.la/content/www/xl/es/products/details/fpga/development-kits/agilex/agf014.html). - -- **Genesys 2** - - We provide pre-build bitstream and memory configuration files for the Genesys 2 [here](https://github.com/openhwgroup/cva6/releases). - - Tested on Vivado 2018.2. The FPGA currently contains the following peripherals: - - - DDR3 memory controller - - SPI controller to conncet to an SDCard - - Ethernet controller - - JTAG port (see debugging section below) - - Bootrom containing zero stage bootloader and device tree. - - UART - - GPIOs connected to LEDs - -> The ethernet controller and the corresponding network connection is still work in progress and not functional at the moment. Expect some updates soon-ish. - -- **Agilex 7** - - Tested on Quartus Prime Version 24.1.0 Pro Edition. The FPGA currently contains the following peripherals: - - - DDR4 memory controller - - JTAG port (see debugging section below) - - Bootrom containing zero stage bootloader - - UART - - GPIOs connected to LEDs - -> The ethernet controller and the corresponding network connection, as well as the SD Card connection and the capability to boot linux are still work in progress and not functional at the moment. Expect some updates soon-ish. - - -## Programming the Memory Configuration File or bitstream - -- **Genesys 2** - - - Open Vivado - - Open the hardware manager and open the target board (Genesys II - `xc7k325t`) - - Tools - Add Configuration Memory Device - - Select the following Spansion SPI flash `s25fl256xxxxxx0` - - Add `ariane_xilinx.mcs` - - Press Ok. Flashing will take a couple of minutes. - - Right click on the FPGA device - Boot from Configuration Memory Device (or press the program button on the FPGA) - -- **Agilex 7** - - - Open Quartus programmer - - Configure HW Setup by selecting the AGF FPGA Development Kit - - Click Auto-Detect to scan the JTAG chain - - In the device list, right click over device AGFB014R24B and add file (.sof) - - Click on Start button to program the FPGA - - Right now only baremetal is supported, so right after programming you can connect to the UART and see your CVA6 alive on Agilex! - - For this you need to use the JTAG UART provided with Quartus installation - -``` -.$quartus_installation_path/qprogrammer/quartus/bin/juart-terminal -juart-terminal: connected to hardware target using JTAG UART on cable -juart-terminal: "AGF FPGA Development Kit [1-3]", device 1, instance 0 -juart-terminal: (Use the IDE stop button or Ctrl-C to terminate) - -Hello World! -``` - -## Preparing the SD Card - -The first stage bootloader will boot from SD Card by default. Get yourself a suitable SD Card (we use [this](https://www.amazon.com/Kingston-Digital-Mobility-MBLY10G2-32GB/dp/B00519BEQO) one). Either grab a pre-built Linux image from [here](https://github.com/pulp-platform/ariane-sdk/releases) or generate the Linux image yourself following the README in the [ariane-sdk repository](https://github.com/pulp-platform/ariane-sdk). Prepare the SD Card by following the "Booting from SD card" section in the ariane-sdk repository. - -Connect a terminal to the USB serial device opened by the FTDI chip e.g.: -``` -screen /dev/ttyUSB0 115200 -``` - -Default baudrate set by the bootlaoder and Linux is `115200`. - -After you've inserted the SD Card and programmed the FPGA you can connect to the serial port of the FPGA and should see the bootloader and afterwards Linux booting. Default username is `root`, no password required. - -## Generating a Bitstream - -- **Genesys 2** - -To generate the FPGA bitstream (and memory configuration) yourself for the Genesys II board run: - -``` -make fpga -``` +# Tutorials -This will produce a bitstream file and memory configuration file (in `fpga/work-fpga`) which you can permanently flash by running the above commands. - -- **Agilex 7** - -To generate the FPGA bitstream yourself for the Agilex 7 board run: - -``` -make altera -``` - -We recommend to set the parameter FpgaAlteraEn (and also FpgaEn) to benefit from the FPGA optimizations. - -This will produce a bitstream file (in `altera/output_files`) which you can program following the previous instructions. **Note: Bear in mind that you need a Quartus Pro Licence to be able to generate this bitstream** - -To clean the project after generating the bitstream, use - -``` -make clean-altera -``` - -## Debugging - -- **Genesys 2** -You can debug (and program) the FPGA using [OpenOCD](http://openocd.org/doc/html/Architecture-and-Core-Commands.html). We provide two example scripts for OpenOCD below. - -To get started, connect the micro USB port that is labeled with JTAG to your machine. This port is attached to the FTDI 2232 USB-to-serial chip on the Genesys 2 board, and is usually used to access the native JTAG interface of the Kintex-7 FPGA (e.g. to program the device using Vivado). However, the FTDI chip also exposes a second serial link that is routed to GPIO pins on the FPGA, and we leverage this to wire up the JTAG from the RISC-V debug module. - ->If you are on an Ubuntu based system you need to add the following udev rule to `/etc/udev/rules.d/99-ftdi.rules` ->``` -> SUBSYSTEM=="usb", ACTION=="add", ATTRS{idProduct}=="6010", ATTRS{idVendor}=="0403", MODE="664", GROUP="plugdev" ->``` - -Once attached to your system, the FTDI chip should be listed when you type `lsusb`: - -``` -Bus 005 Device 019: ID 0403:6010 Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC -``` +* **[Running Simulations](tutorials/running_sim.md)** +* **[ASIC Implementation](tutorials/asic.md)** +* **[FPGA Implementation and running an OS](tutorials/fpga.md)** +* **[Instruction Tracing](corev_apu/instr_tracing/README.md)** -If this is the case, you can go on and start openocd with the `fpga/ariane.cfg` configuration file: - -``` -openocd -f fpga/ariane.cfg - -Open On-Chip Debugger 0.10.0+dev-00195-g933cb87 (2018-09-14-19:32) -Licensed under GNU GPL v2 -For bug reports, read - http://openocd.org/doc/doxygen/bugs.html -adapter speed: 1000 kHz -Info : auto-selecting first available session transport "jtag". To override use 'transport select '. -Info : clock speed 1000 kHz -Info : TAP riscv.cpu does not have IDCODE -Info : datacount=2 progbufsize=8 -Info : Examined RISC-V core; found 1 harts -Info : hart 0: XLEN=64, misa=0x8000000000141105 -Info : Listening on port 3333 for gdb connections -Ready for Remote Connections -Info : Listening on port 6666 for tcl connections -Info : Listening on port 4444 for telnet connections -Info : accepting 'gdb' connection on tcp/3333 -``` -- **Agilex 7** - -You can debug (and program) the FPGA using a modified version of OpenOCD included with Quartus installation ($quartus_installation_path/qprogrammer/quartus/bin/openocd). - -To get started, connect the micro USB port that is labeled with J13 to your machine. It is the same port that is used for the UART. Both use the JTAG interface and connect to the System Level Debugging (SLD) Hub instantiated inside the FPGA. Then the debugger connection goes to the virtual JTAG IP (vJTAG) which can be accessed with the modified version of OpenOCD. - -You can start openocd with the `altera/cva6.cfg` configuration file: - -``` -./$quartus_installation_path/qprogrammer/quartus/bin/openocd -f altera/cva6.cfg -Open On-Chip Debugger 0.11.0-R22.4 -Licensed under GNU GPL v2 -For bug reports, read - http://openocd.org/doc/doxygen/bugs.html -Info : only one transport option; autoselect 'jtag' -Info : Application name is OpenOCD.20241016093010 -Info : No cable specified, so will be searching for cables - -Info : At present, The first hardware cable will be used [1 cable(s) detected] -Info : Cable 1: device_name=(null), hw_name=AGF FPGA Development Kit, server=(null), port=1-3, chain_id=0x559319c8cde0, persistent_id=1, chain_type=1, features=34816, server_version_info=Version 24.1.0 Build 115 03/21/2024 SC Pro Edition -Info : TAP position 0 (C341A0DD) has 3 SLD nodes -Info : node 0 idcode=00406E00 position_n=0 -Info : node 1 idcode=30006E00 position_n=0 -Info : node 2 idcode=0C006E00 position_n=0 -Info : TAP position 1 (20D10DD) has 1 SLD nodes -Info : node 0 idcode=0C206E00 position_n=0 -Info : Discovered 2 TAP devices -Info : Detected device (tap_position=0) device_id=c341a0dd, instruction_length=10, features=12, device_name=AGFB014R24A(.|R1|R2)/.. -Info : Found an Intel device at tap_position 0.Currently assuming it is SLD Hub -Info : Detected device (tap_position=1) device_id=020d10dd, instruction_length=10, features=4, device_name=VTAP10 -Info : Found an Intel device at tap_position 1.Currently assuming it is SLD Hub -Info : This adapter doesn't support configurable speed -Info : JTAG tap: agilex7.fpga.tap tap/device found: 0xc341a0dd (mfg: 0x06e (Altera), part: 0x341a, ver: 0xc) -Info : JTAG tap: auto0.tap tap/device found: 0x020d10dd (mfg: 0x06e (Altera), part: 0x20d1, ver: 0x0) -Info : JTAG tap: agilex7.fpga.tap Parent Tap found: 0xc341a0dd (mfg: 0x06e (Altera), part: 0x341a, ver: 0xc) -Info : Virtual Tap/SLD node 0x00406E00 found at tap position 0 vtap position 0 -Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 10 -expected-id 0x020d10dd" -Info : datacount=2 progbufsize=8 -Info : Examined RISC-V core; found 1 harts -Info : hart 0: XLEN=32, misa=0x40141107 -Info : starting gdb server for agilex7.cva6.0 on 3333 -Info : Listening on port 3333 for gdb connections -Ready for Remote Connections -Info : Listening on port 6666 for tcl connections -Info : Listening on port 4444 for telnet connections -``` - -- **Common for both boards** - -Then you will be able to either connect through `telnet` or with `gdb`: - -``` -riscv64-unknown-elf-gdb /path/to/elf - -(gdb) target remote localhost:3333 -(gdb) load -Loading section .text, size 0x6508 lma 0x80000000 -Loading section .rodata, size 0x900 lma 0x80006508 -(gdb) b putchar -(gdb) c -Continuing. - -Program received signal SIGTRAP, Trace/breakpoint trap. -0x0000000080009126 in putchar (s=72) at lib/qprintf.c:69 -69 uart_sendchar(s); -(gdb) si -0x000000008000912a 69 uart_sendchar(s); -(gdb) p/x $mepc -$1 = 0xfffffffffffdb5ee -``` - -You can read or write device memory by using: -``` -(gdb) x/i 0x1000 - 0x1000: lui t0,0x4 -(gdb) set {int} 0x1000 = 22 -(gdb) set $pc = 0x1000 -``` - - -## Preliminary Support for OpenPiton Cache System - -CVA6 has preliminary support for the OpenPiton distributed cache system from Princeton University. To this end, a different L1 cache subsystem (`src/cache_subsystem/wt_cache_subsystem.sv`) has been developed that follows a write-through protocol and that has support for cache invalidations and atomics. - -The corresponding integration patches will be released on [OpenPiton GitHub repository](https://github.com/PrincetonUniversity/openpiton). Check the `README` in that repository to see how to use CVA6 in the OpenPiton setting. - -To activate the different cache system, compile your code with the macro `DCACHE_TYPE`. - - -## Re-generating the Bootcode (ZSBL) - -The zero stage bootloader (ZSBL) for RTL simulation lives in `bootrom/` while the bootcode for the FPGA is in `fpga/src/bootrom`. The RTL bootcode simply jumps to the base of the DRAM where the FSBL takes over. For the FPGA the ZSBL performs additional housekeeping. Both bootloader pass the hartid as well as address to the device tree in argumen register `a0` and `a1` respectively. - -To re-generate the bootcode you can use the existing makefile within those directories. To generate the SystemVerilog files you will need the `bitstring` python package installed on your system. - - -# Directory Structure: +# Directory Structure The directory structure separates the [CVA6 RISC-V CPU](#cva6-risc-v-cpu) core from the [CORE-V-APU FPGA Emulation Platform](#corev-apu-fpga-emulation). Files, directories and submodules under `cva6` are for the core _only_ and should not have any dependencies on the APU. @@ -480,21 +100,17 @@ This BSP is used by both `core` testbench and `uvmt_cva6` UVM verification envir - **tb**: testbench module instancing the core - **tests**: source of test cases and test lists -# Planned Improvements - -Go to the CVA6 Kanban Board which also loosely tracks planned improvements. - # Contributing We highly appreciate community contributions. -

To ease the work of reviewing contributions, please review [CONTRIBUTING](CONTRIBUTING.md). - +To ease the work of reviewing contributions, please review [CONTRIBUTING](CONTRIBUTING.md). -# Issues and Troubleshooting +Contributions to the documentation (`docs/` and `tutorials/` directories) are very welcome as well. If you find any problems or issues with CVA6 or the documentation, please check out the [issue tracker](https://github.com/openhwgroup/cva6/issues) -and create a new issue if your problem is not yet tracked. +and create a new issue if your problem is not yet tracked. \ +[The CVA6 Kanban Board](https://github.com/orgs/openhwgroup/project/3/view/7) loosely tracks planned improvements. # Publication @@ -503,7 +119,7 @@ If you use CVA6 in your academic work you can cite us:
CVA6 Publication -

+ ``` @article{zaruba2019cost, author={F. {Zaruba} and L. {Benini}}, @@ -518,15 +134,11 @@ If you use CVA6 in your academic work you can cite us: month={Nov}, } ``` -

-
-
- -# Resources and Ecosystem - -The CVA6 core is part of a vivid ecosystem. In [this document](RESOURCES.md), we gather pointers to this ecosystem (building blocks, designs, partners...) + # Acknowledgements Check out the [acknowledgements](ACKNOWLEDGEMENTS.md). + + diff --git a/RESOURCES.md b/RESOURCES.md index 659c7c48c9d..3272f27f8f3 100644 --- a/RESOURCES.md +++ b/RESOURCES.md @@ -9,7 +9,7 @@ Please help improve this page, by filing an [issue](https://github.com/openhwgro > Resources that reach the TRL-5 maturity (ready to integrate into productions ICs) are clearly mentioned. > Otherwise, you can assume a TRL-4 maturity. -> [!WARNING] +> [!WARNING] > The CVA6 team is not liable for the other repositories. > Assess their content and make sure they fit your needs and are mature enough for your design. > Plese direct your issues or pull requests to these external repositories. @@ -70,6 +70,8 @@ The [technical kits](https://github.com/thalesgroup/cva6-softcore-contest) of a **[CVA6 with Xilinx Ethernet](https://github.com/cispa/CVA6-Vivado-Project-with-Xilinx-AXI-Ethernet/)** is an alternative design which implements Xilinx 1G/2.5G Ethernet Subsystem on the Digilent Genesys 2 FPGA board. It has been tested with TFTP boot in u-boot and SSH in Linux. +**[CVA6-MPSoC](https://github.com/NicolasDerumigny/cva6)** is an alternative design for AMD PYNQ-Z2 and ZCU104 boards, which optionnally includes Xilinx 1G/2.5G Ethernet Subsystem and an experimental dual-core, shared-L1 configuration. It has been tested to boot to Linux 6.6 through u-boot. + ### Platforms, subsystems and systems These are large subsystems and systems that are more complex than the "APU". They can be a starting point for your design: diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000000..7c46cccd358 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,14 @@ +# CVA6 Security Policy + +## Reporting a Vulnerability + +If you think you have found a vulnerability in a specific configuration of the CVA6 you can report it using one of the following ways: + +* Contact the [Eclipse Foundation Security Team](mailto:security@eclipse-foundation.org) +* [Report a Vulnerability](https://github.com/openhwgroup/cva6/security/advisories/new) + +You can find more information about reporting and disclosure at the [Eclipse Foundation Security page](https://www.eclipse.org/security/). + +## Security Policy + +This project follows [Eclipse Foundation Vulnerability Reporting Policy](https://www.eclipse.org/security/policy/). diff --git a/ci/install-prereq.sh b/ci/install-prereq.sh index 0f99c37f57f..5b58291f9a9 100644 --- a/ci/install-prereq.sh +++ b/ci/install-prereq.sh @@ -1,8 +1,4 @@ #!/bin/bash -echo 'deb http://download.opensuse.org/repositories/home:/phiwag:/edatools/xUbuntu_20.04/ /' | sudo tee /etc/apt/sources.list.d/home:phiwag:edatools.list -curl -fsSL https://download.opensuse.org/repositories/home:phiwag:edatools/Debian_Unstable/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_phiwag_edatools.gpg > /dev/null - sudo apt update sudo apt install device-tree-compiler libfl-dev help2man - diff --git a/common/local/util/hpdcache_sram_1rw.sv b/common/local/util/hpdcache_sram_1rw.sv index 7893a4bad14..5bc12be96e1 100644 --- a/common/local/util/hpdcache_sram_1rw.sv +++ b/common/local/util/hpdcache_sram_1rw.sv @@ -12,22 +12,23 @@ module hpdcache_sram_1rw #( parameter int unsigned ADDR_SIZE = 0, parameter int unsigned DATA_SIZE = 0, - parameter int unsigned DEPTH = 2**ADDR_SIZE + parameter int unsigned DEPTH = 2**ADDR_SIZE, + parameter int unsigned NDATA = 1 ) ( - input logic clk, - input logic rst_n, - input logic cs, - input logic we, - input logic [ADDR_SIZE-1:0] addr, - input logic [DATA_SIZE-1:0] wdata, - output logic [DATA_SIZE-1:0] rdata + input logic clk, + input logic rst_n, + input logic cs, + input logic we, + input logic [ADDR_SIZE-1:0] addr, + input logic [NDATA-1:0][DATA_SIZE-1:0] wdata, + output logic [NDATA-1:0][DATA_SIZE-1:0] rdata ); SyncSpRam #( .ADDR_WIDTH(ADDR_SIZE), .DATA_DEPTH(DEPTH), // usually 2**ADDR_WIDTH, but can be lower - .DATA_WIDTH(DATA_SIZE), + .DATA_WIDTH(NDATA*DATA_SIZE), .OUT_REGS (0), .SIM_INIT (1) // for simulation only, will not be synthesized // 0: no init, 1: zero init, 2: random init diff --git a/common/local/util/hpdcache_sram_wbyteenable_1rw.sv b/common/local/util/hpdcache_sram_wbyteenable_1rw.sv index d9f29961014..4c5641347fb 100644 --- a/common/local/util/hpdcache_sram_wbyteenable_1rw.sv +++ b/common/local/util/hpdcache_sram_wbyteenable_1rw.sv @@ -12,28 +12,28 @@ module hpdcache_sram_wbyteenable_1rw #( parameter int unsigned ADDR_SIZE = 0, parameter int unsigned DATA_SIZE = 0, - parameter int unsigned DEPTH = 2**ADDR_SIZE + parameter int unsigned DEPTH = 2**ADDR_SIZE, + parameter int unsigned NDATA = 1 ) ( - input logic clk, - input logic rst_n, - input logic cs, - input logic we, - input logic [ADDR_SIZE-1:0] addr, - input logic [DATA_SIZE-1:0] wdata, - input logic [DATA_SIZE/8-1:0] wbyteenable, - output logic [DATA_SIZE-1:0] rdata + input logic clk, + input logic rst_n, + input logic cs, + input logic we, + input logic [ADDR_SIZE-1:0] addr, + input logic [NDATA-1:0][DATA_SIZE-1:0] wdata, + input logic [NDATA-1:0][DATA_SIZE/8-1:0] wbyteenable, + output logic [NDATA-1:0][DATA_SIZE-1:0] rdata ); -if (DATA_SIZE == 128) begin - // Découpage des données en deux moitiés de 64 bits - logic [DATA_SIZE/2-1:0] wdata_low, wdata_high; - logic [DATA_SIZE/2-1:0] rdata_low, rdata_high; - logic [7:0] be_low, be_high; - assign wdata_low = wdata[63:0]; - assign wdata_high = wdata[127:64]; - assign be_low = wbyteenable[7:0]; - assign be_high = wbyteenable[15:8]; +if (NDATA*DATA_SIZE == 128) begin + // split in two 64-bits wide SRAMs + logic [127:0] __wdata; + logic [127:0] __rdata; + logic [15:0] __be; + + assign __wdata = wdata; + assign __be = wbyteenable; SyncSpRamBeNx64 #( .ADDR_WIDTH(ADDR_SIZE), @@ -44,11 +44,11 @@ if (DATA_SIZE == 128) begin .Clk_CI (clk), .Rst_RBI (rst_n), .CSel_SI (cs), - .WrEn_SI (we), // Ecriture sur la banque basse - .BEn_SI (be_low), + .WrEn_SI (we), + .BEn_SI (__be[0 +: 8]), // write LSBs .Addr_DI (addr), - .WrData_DI(wdata_low), - .RdData_DO(rdata_low) + .WrData_DI(__wdata[0 +: 64]), + .RdData_DO(__rdata[0 +: 64]) ); SyncSpRamBeNx64 #( @@ -60,16 +60,16 @@ if (DATA_SIZE == 128) begin .Clk_CI (clk), .Rst_RBI (rst_n), .CSel_SI (cs), - .WrEn_SI (we), // Ecriture sur la banque haute - .BEn_SI (be_high), + .WrEn_SI (we), + .BEn_SI (__be[8 +: 8]), // write MSbs .Addr_DI (addr), - .WrData_DI(wdata_high), - .RdData_DO(rdata_high) + .WrData_DI(__wdata[64 +: 64]), + .RdData_DO(__rdata[64 +: 64]) ); - assign rdata = {rdata_high, rdata_low}; + assign rdata = __rdata; -end else if (DATA_SIZE == 64) begin +end else if (NDATA*DATA_SIZE == 64) begin SyncSpRamBeNx64 #( .ADDR_WIDTH(ADDR_SIZE), .DATA_DEPTH(DEPTH), // usually 2**ADDR_WIDTH, but can be lower @@ -87,7 +87,7 @@ end else if (DATA_SIZE == 64) begin .WrData_DI(wdata), .RdData_DO(rdata) ); -end else if (DATA_SIZE == 32) begin +end else if (NDATA*DATA_SIZE == 32) begin SyncSpRamBeNx32 #( .ADDR_WIDTH(ADDR_SIZE), .DATA_DEPTH(DEPTH), // usually 2**ADDR_WIDTH, but can be lower @@ -107,7 +107,7 @@ end else if (DATA_SIZE == 32) begin ); end else begin - $fatal(1, "DATASIZE=%d, in not supported " ,DATA_SIZE); + $fatal(1, "DATASIZE=%d, in not supported", NDATA*DATA_SIZE); end diff --git a/common/local/util/instr_trace_item.svh b/common/local/util/instr_trace_item.svh index c1ea36e2977..7bcbdc3dda0 100644 --- a/common/local/util/instr_trace_item.svh +++ b/common/local/util/instr_trace_item.svh @@ -41,6 +41,8 @@ class instr_trace_item #( logic result_fpr [$]; logic [63:0] imm; logic [63:0] result; + logic dest_we_valid; + logic dest_is_fp; logic [CVA6Cfg.PLEN-1:0] paddr; string priv_lvl; bp_resolve_t bp; @@ -49,7 +51,7 @@ class instr_trace_item #( // constructor creating a new instruction trace item, e.g.: a single instruction with all relevant information function new (time simtime, longint unsigned cycle, scoreboard_entry_t sbe, logic [31:0] instr, logic [63:0] gp_reg_file [32], - logic [63:0] fp_reg_file [32], logic [63:0] result, logic [CVA6Cfg.PLEN-1:0] paddr, riscv::priv_lvl_t priv_lvl, logic debug_mode, bp_resolve_t bp); + logic [63:0] fp_reg_file [32], logic [63:0] result, logic dest_we_valid, logic dest_is_fp, logic [CVA6Cfg.PLEN-1:0] paddr, riscv::priv_lvl_t priv_lvl, logic debug_mode, bp_resolve_t bp); this.simtime = simtime; this.cycle = cycle; this.pc = sbe.pc; @@ -57,6 +59,8 @@ class instr_trace_item #( this.gp_reg_file = gp_reg_file; this.fp_reg_file = fp_reg_file; this.result = result; + this.dest_we_valid = dest_we_valid; + this.dest_is_fp = dest_is_fp; this.paddr = paddr; this.bp = bp; this.priv_lvl = (debug_mode) ? "D" : getPrivLevel(priv_lvl); @@ -195,6 +199,68 @@ class instr_trace_item #( endcase endfunction + function logic scoreboardDestIsFp(); + if (sbe.fu inside {ariane_pkg::FPU, ariane_pkg::FPU_VEC}) begin + return ariane_pkg::fd_changes_rd_state(sbe.op); + end + return ariane_pkg::is_rd_fpr(sbe.op); + endfunction + + function logic rawDestIsFp(); + if (dest_we_valid) begin + return dest_is_fp; + end + return scoreboardDestIsFp(); + endfunction + + function logic fpInstrForcesGprDest(); + logic [6:0] opcode = instr[6:0]; + logic [4:0] funct5 = instr[31:27]; + logic [2:0] rm = instr[14:12]; + + if (opcode == riscv::OpcodeOpFp) begin + if (funct5 == 5'b11000) begin + // fcvt.*.* instructions that target an integer register + return 1'b1; + end + + if (funct5 == 5'b10100) begin + // fle.*, flt.*, feq.* comparisons produce integer results. + return 1'b1; + end + + if (funct5 == 5'b11100) begin + // fmv.x.* (rm == 000) and fclass (rm == 001) always write GPRs. + if ((rm == 3'b000) || (rm == 3'b001)) begin + return 1'b1; + end + // Alternate encodings when FP16ALT is enabled mirror rm encodings. + if (CVA6Cfg.XF16ALT && ((rm == 3'b100) || (rm == 3'b101))) begin + return 1'b1; + end + end + end + + return 1'b0; + endfunction + + function logic effectiveDestIsFp(); + logic dest_is_fp_raw = rawDestIsFp(); + + if (fpInstrForcesGprDest()) begin + return 1'b0; + end + + return dest_is_fp_raw; + endfunction + + function void adjustResultRegKinds(); + logic final_dest_is_fp = effectiveDestIsFp(); + foreach (result_fpr[i]) begin + result_fpr[i] = final_dest_is_fp; + end + endfunction + function string printInstr(); string s; @@ -379,6 +445,8 @@ class instr_trace_item #( // instr, // s); + adjustResultRegKinds(); + foreach (result_regs[i]) begin if (result_fpr[i]) s = $sformatf("%s %-4s:%16x", s, fpRegAddrToStr(result_regs[i]), this.result); @@ -466,45 +534,48 @@ class instr_trace_item #( function string printRFBCInstr(input string mnemonic, input bit use_rnd); + logic dest_fp = effectiveDestIsFp(); result_regs.push_back(rd); - result_fpr.push_back(ariane_pkg::is_rd_fpr(sbe.op)); + result_fpr.push_back(dest_fp); read_regs.push_back(rs2); read_fpr.push_back(ariane_pkg::is_rs2_fpr(sbe.op)); read_regs.push_back(sbe.result[4:0]); read_fpr.push_back(ariane_pkg::is_imm_fpr(sbe.op)); if (use_rnd && instr[14:12]!=3'b111) - return $sformatf("%-12s %4s, %s, %s, %s", $sformatf("%s.%s",mnemonic, fpFmtToStr(instr[26:25])), ariane_pkg::is_rd_fpr(sbe.op)?fpRegAddrToStr(rd):regAddrToStr(rd), ariane_pkg::is_rs2_fpr(sbe.op)?fpRegAddrToStr(rs2):regAddrToStr(rs2), ariane_pkg::is_imm_fpr(sbe.op)?fpRegAddrToStr(sbe.result[4:0]):regAddrToStr(sbe.result[4:0]), fpRmToStr(instr[14:12])); + return $sformatf("%-12s %4s, %s, %s, %s", $sformatf("%s.%s",mnemonic, fpFmtToStr(instr[26:25])), dest_fp?fpRegAddrToStr(rd):regAddrToStr(rd), ariane_pkg::is_rs2_fpr(sbe.op)?fpRegAddrToStr(rs2):regAddrToStr(rs2), ariane_pkg::is_imm_fpr(sbe.op)?fpRegAddrToStr(sbe.result[4:0]):regAddrToStr(sbe.result[4:0]), fpRmToStr(instr[14:12])); else - return $sformatf("%-12s %4s, %s, %s", $sformatf("%s.%s",mnemonic, fpFmtToStr(instr[26:25])), ariane_pkg::is_rd_fpr(sbe.op)?fpRegAddrToStr(rd):regAddrToStr(rd), ariane_pkg::is_rs2_fpr(sbe.op)?fpRegAddrToStr(rs2):regAddrToStr(rs2), ariane_pkg::is_imm_fpr(sbe.op)?fpRegAddrToStr(sbe.result[4:0]):regAddrToStr(sbe.result[4:0])); + return $sformatf("%-12s %4s, %s, %s", $sformatf("%s.%s",mnemonic, fpFmtToStr(instr[26:25])), dest_fp?fpRegAddrToStr(rd):regAddrToStr(rd), ariane_pkg::is_rs2_fpr(sbe.op)?fpRegAddrToStr(rs2):regAddrToStr(rs2), ariane_pkg::is_imm_fpr(sbe.op)?fpRegAddrToStr(sbe.result[4:0]):regAddrToStr(sbe.result[4:0])); endfunction // printRFInstr function string printRFInstr(input string mnemonic, input bit use_rnd); + logic dest_fp = effectiveDestIsFp(); result_regs.push_back(rd); - result_fpr.push_back(ariane_pkg::is_rd_fpr(sbe.op)); + result_fpr.push_back(dest_fp); read_regs.push_back(rs1); read_fpr.push_back(ariane_pkg::is_rs1_fpr(sbe.op)); read_regs.push_back(rs2); read_fpr.push_back(ariane_pkg::is_rs2_fpr(sbe.op)); if (use_rnd && instr[14:12]!=3'b111) - return $sformatf("%-12s %4s, %s, %s, %s", $sformatf("%s.%s",mnemonic, fpFmtToStr(instr[26:25])), ariane_pkg::is_rd_fpr(sbe.op)?fpRegAddrToStr(rd):regAddrToStr(rd), ariane_pkg::is_rs1_fpr(sbe.op)?fpRegAddrToStr(rs1):regAddrToStr(rs1), ariane_pkg::is_rs2_fpr(sbe.op)?fpRegAddrToStr(rs2):regAddrToStr(rs2), fpRmToStr(instr[14:12])); + return $sformatf("%-12s %4s, %s, %s, %s", $sformatf("%s.%s",mnemonic, fpFmtToStr(instr[26:25])), dest_fp?fpRegAddrToStr(rd):regAddrToStr(rd), ariane_pkg::is_rs1_fpr(sbe.op)?fpRegAddrToStr(rs1):regAddrToStr(rs1), ariane_pkg::is_rs2_fpr(sbe.op)?fpRegAddrToStr(rs2):regAddrToStr(rs2), fpRmToStr(instr[14:12])); else - return $sformatf("%-12s %4s, %s, %s", $sformatf("%s.%s",mnemonic, fpFmtToStr(instr[26:25])), ariane_pkg::is_rd_fpr(sbe.op)?fpRegAddrToStr(rd):regAddrToStr(rd), ariane_pkg::is_rs1_fpr(sbe.op)?fpRegAddrToStr(rs1):regAddrToStr(rs1), ariane_pkg::is_rs2_fpr(sbe.op)?fpRegAddrToStr(rs2):regAddrToStr(rs2)); + return $sformatf("%-12s %4s, %s, %s", $sformatf("%s.%s",mnemonic, fpFmtToStr(instr[26:25])), dest_fp?fpRegAddrToStr(rd):regAddrToStr(rd), ariane_pkg::is_rs1_fpr(sbe.op)?fpRegAddrToStr(rs1):regAddrToStr(rs1), ariane_pkg::is_rs2_fpr(sbe.op)?fpRegAddrToStr(rs2):regAddrToStr(rs2)); endfunction // printRFInstr function string printRFInstr1Op(input string mnemonic, input bit use_rnd); + logic dest_fp = effectiveDestIsFp(); result_regs.push_back(rd); - result_fpr.push_back(ariane_pkg::is_rd_fpr(sbe.op)); + result_fpr.push_back(dest_fp); read_regs.push_back(rs1); read_fpr.push_back(ariane_pkg::is_rs1_fpr(sbe.op)); if (use_rnd && instr[14:12]!=3'b111) - return $sformatf("%-12s %4s, %s, %s", $sformatf("%s.%s",mnemonic, fpFmtToStr(instr[26:25])), ariane_pkg::is_rd_fpr(sbe.op)?fpRegAddrToStr(rd):regAddrToStr(rd), ariane_pkg::is_rs1_fpr(sbe.op)?fpRegAddrToStr(rs1):regAddrToStr(rs1), fpRmToStr(instr[14:12])); + return $sformatf("%-12s %4s, %s, %s", $sformatf("%s.%s",mnemonic, fpFmtToStr(instr[26:25])), dest_fp?fpRegAddrToStr(rd):regAddrToStr(rd), ariane_pkg::is_rs1_fpr(sbe.op)?fpRegAddrToStr(rs1):regAddrToStr(rs1), fpRmToStr(instr[14:12])); else - return $sformatf("%-12s %4s, %s", $sformatf("%s.%s",mnemonic, fpFmtToStr(instr[26:25])), ariane_pkg::is_rd_fpr(sbe.op)?fpRegAddrToStr(rd):regAddrToStr(rd), ariane_pkg::is_rs1_fpr(sbe.op)?fpRegAddrToStr(rs1):regAddrToStr(rs1)); + return $sformatf("%-12s %4s, %s", $sformatf("%s.%s",mnemonic, fpFmtToStr(instr[26:25])), dest_fp?fpRegAddrToStr(rd):regAddrToStr(rd), ariane_pkg::is_rs1_fpr(sbe.op)?fpRegAddrToStr(rs1):regAddrToStr(rs1)); endfunction // printRFInstr1Op function string printR4Instr(input string mnemonic); @@ -523,8 +594,9 @@ class instr_trace_item #( function string printFpSpecialInstr(); + logic dest_fp = effectiveDestIsFp(); result_regs.push_back(rd); - result_fpr.push_back(ariane_pkg::is_rd_fpr(sbe.op)); + result_fpr.push_back(dest_fp); read_regs.push_back(rs1); read_fpr.push_back(ariane_pkg::is_rs1_fpr(sbe.op)); @@ -634,8 +706,9 @@ class instr_trace_item #( endfunction // printCSRInstr function string printLoadInstr(input string mnemonic); + logic dest_fp = effectiveDestIsFp(); result_regs.push_back(rd); - result_fpr.push_back(ariane_pkg::is_rd_fpr(sbe.op)); + result_fpr.push_back(dest_fp); read_regs.push_back(rs1); read_fpr.push_back(1'b0); // save the immediate for calculating the virtual address diff --git a/common/local/util/instr_tracer.sv b/common/local/util/instr_tracer.sv index 9083664069d..dad2f29ceb7 100644 --- a/common/local/util/instr_tracer.sv +++ b/common/local/util/instr_tracer.sv @@ -25,32 +25,33 @@ module instr_tracer #( parameter type exception_t = logic, parameter interrupts_t INTERRUPTS = '0 )( - input logic pck, - input logic rstn, - input logic flush_unissued, - input logic flush_all, - input logic [31:0] instruction, - input logic fetch_valid, - input logic fetch_ack, - input logic issue_ack, // issue acknowledged - input scoreboard_entry_t issue_sbe, // issue scoreboard entry - input logic [1:0][4:0] waddr, // WB stage - input logic [1:0][63:0] wdata, - input logic [1:0] we_gpr, - input logic [1:0] we_fpr, - input scoreboard_entry_t [1:0] commit_instr, // commit instruction - input logic [1:0] commit_ack, - input logic st_valid, // stores - address translation - input logic [CVA6Cfg.PLEN-1:0] st_paddr, - input logic ld_valid, // loads - input logic ld_kill, - input logic [CVA6Cfg.PLEN-1:0] ld_paddr, - input bp_resolve_t resolve_branch, // misprediction - input exception_t commit_exception, - input riscv::priv_lvl_t priv_lvl, // current privilege level - input logic debug_mode, + input logic pck, + input logic rstn, + input logic flush_unissued, + input logic flush_all, + input logic [31:0] instruction [CVA6Cfg.NrIssuePorts-1:0], + input logic [CVA6Cfg.NrIssuePorts-1:0] fetch_valid, + input logic [CVA6Cfg.NrIssuePorts-1:0] fetch_ack, + input logic [CVA6Cfg.NrIssuePorts-1:0] issue_ack, // issue acknowledged + input scoreboard_entry_t [CVA6Cfg.NrIssuePorts-1:0] issue_sbe, // issue scoreboard entry + input logic [CVA6Cfg.NrCommitPorts-1:0][4:0] waddr, // WB stage + input logic [CVA6Cfg.NrCommitPorts-1:0][63:0] wdata, + input logic [CVA6Cfg.NrCommitPorts-1:0] we_gpr, + input logic [CVA6Cfg.NrCommitPorts-1:0] we_fpr, + input scoreboard_entry_t [CVA6Cfg.NrCommitPorts-1:0] commit_instr, // commit instruction + input logic [CVA6Cfg.NrCommitPorts-1:0] commit_ack, + input logic [CVA6Cfg.NrCommitPorts-1:0] commit_drop, + input logic st_valid, // stores - address translation + input logic [CVA6Cfg.PLEN-1:0] st_paddr, + input logic ld_valid, // loads + input logic ld_kill, + input logic [CVA6Cfg.PLEN-1:0] ld_paddr, + input bp_resolve_t resolve_branch, // misprediction + input exception_t commit_exception, + input riscv::priv_lvl_t priv_lvl, // current privilege level + input logic debug_mode, - input logic[CVA6Cfg.XLEN-1:0] hart_id_i + input logic[CVA6Cfg.XLEN-1:0] hart_id_i ); // keep the decoded instructions in a queue @@ -59,7 +60,6 @@ module instr_tracer #( logic [31:0] issue_queue [$]; // issue scoreboard entries scoreboard_entry_t issue_sbe_queue [$]; - scoreboard_entry_t issue_sbe_item; // store resolved branches, get (mis-)predictions bp_resolve_t bp [$]; // shadow copy of the register files @@ -87,6 +87,7 @@ module instr_tracer #( task trace(); automatic logic [31:0] decode_instruction, issue_instruction, issue_commit_instruction; automatic scoreboard_entry_t commit_instruction; + automatic scoreboard_entry_t issue_sbe_item; // initialize register 0 gp_reg_file = '{default:0}; fp_reg_file = '{default:0}; @@ -94,7 +95,7 @@ module instr_tracer #( forever begin automatic bp_resolve_t bp_instruction = '0; // new cycle, we are only interested if reset is de-asserted - @(pck) if (rstn !== 1'b1) begin + @(posedge pck) if (rstn !== 1'b1) begin flush(); continue; end @@ -106,20 +107,24 @@ module instr_tracer #( // Instruction Decode // ------------------- // we are decoding an instruction - if (fetch_valid && fetch_ack) begin - decode_instruction = instruction; - decode_queue.push_back(decode_instruction); + for (int unsigned i = 0; i < CVA6Cfg.NrIssuePorts; ++i) begin + if (fetch_valid[i] && fetch_ack[i]) begin + decode_instruction = instruction[i]; + decode_queue.push_back(decode_instruction); + end end // ------------------- // Instruction Issue // ------------------- // we got a new issue ack, so put the element from the decode queue to // the issue queue - if (issue_ack && !flush_unissued) begin - issue_instruction = decode_queue.pop_front(); - issue_queue.push_back(issue_instruction); - // also save the scoreboard entry to a separate issue queue - issue_sbe_queue.push_back(scoreboard_entry_t'(issue_sbe)); + for (int unsigned i = 0; i < CVA6Cfg.NrIssuePorts; ++i) begin + if (issue_ack[i] && !flush_unissued) begin + issue_instruction = decode_queue.pop_front(); + issue_queue.push_back(issue_instruction); + // also save the scoreboard entry to a separate issue queue + issue_sbe_queue.push_back(scoreboard_entry_t'(issue_sbe[i])); + end end // -------------------- @@ -138,11 +143,11 @@ module instr_tracer #( if (resolve_branch.valid) begin bp.push_back(resolve_branch); end - // -------------- - // Commit - // -------------- - // we are committing an instruction - for (int i = 0; i < 2; i++) begin + for (int i = 0; i < CVA6Cfg.NrCommitPorts; i++) begin + // -------------- + // Commit + // -------------- + // we are committing an instruction if (commit_ack[i]) begin commit_instruction = scoreboard_entry_t'(commit_instr[i]); issue_commit_instruction = issue_queue.pop_front(); @@ -155,30 +160,62 @@ module instr_tracer #( if (commit_instr[i].fu == ariane_pkg::CTRL_FLOW) bp_instruction = bp.pop_front(); + + // all the queues have been popped + // if the commit is to be dropped, we can do it now + if (commit_drop[i]) continue; // the scoreboards issue entry still contains the immediate value as a result // check if the write back is valid, if not we need to source the result from the register file // as the most recent version of this register will be there. if (we_gpr[i] || we_fpr[i]) begin - printInstr(issue_sbe_item, issue_commit_instruction, wdata[i], address_mapping, priv_lvl, debug_mode, bp_instruction); + printInstr( + issue_sbe_item, + issue_commit_instruction, + wdata[i], + we_gpr[i] || we_fpr[i], + we_fpr[i], + address_mapping, + priv_lvl, + debug_mode, + bp_instruction + ); end else if (ariane_pkg::is_rd_fpr(commit_instruction.op)) begin - printInstr(issue_sbe_item, issue_commit_instruction, fp_reg_file[commit_instruction.rd], address_mapping, priv_lvl, debug_mode, bp_instruction); + printInstr( + issue_sbe_item, + issue_commit_instruction, + fp_reg_file[commit_instruction.rd], + 1'b0, + 1'b1, + address_mapping, + priv_lvl, + debug_mode, + bp_instruction + ); end else begin - printInstr(issue_sbe_item, issue_commit_instruction, gp_reg_file[commit_instruction.rd], address_mapping, priv_lvl, debug_mode, bp_instruction); + printInstr( + issue_sbe_item, + issue_commit_instruction, + gp_reg_file[commit_instruction.rd], + 1'b0, + 1'b0, + address_mapping, + priv_lvl, + debug_mode, + bp_instruction + ); end end - end - // -------------- - // Exceptions - // -------------- - if (commit_exception.valid && !(debug_mode && commit_exception.cause == riscv::BREAKPOINT)) begin - // print exception - printException(commit_instr[0].pc, commit_exception.cause, commit_exception.tval); - end - // ---------------------- - // Commit Registers - // ---------------------- - // update shadow reg files here - for (int i = 0; i < 2; i++) begin + // -------------- + // Exceptions + // -------------- + if (i == 0 && commit_exception.valid && !(debug_mode && commit_exception.cause == riscv::BREAKPOINT)) begin + // print exception + printException(commit_instr[0].pc, commit_exception.cause, commit_exception.tval); + end + // ---------------------- + // Commit Registers + // ---------------------- + // update shadow reg files here if (we_gpr[i] && waddr[i] != 5'b0) begin gp_reg_file[waddr[i]] = wdata[i]; end else if (we_fpr[i]) begin @@ -217,16 +254,31 @@ module instr_tracer #( bp = {}; endfunction - function void printInstr(scoreboard_entry_t sbe, logic [31:0] instr, logic [63:0] result, logic [CVA6Cfg.PLEN-1:0] paddr, riscv::priv_lvl_t priv_lvl, logic debug_mode, bp_resolve_t bp); + function void printInstr(scoreboard_entry_t sbe, logic [31:0] instr, logic [63:0] result, logic dest_we_valid, logic dest_is_fp, logic [CVA6Cfg.PLEN-1:0] paddr, riscv::priv_lvl_t priv_lvl, logic debug_mode, bp_resolve_t bp); automatic instr_trace_item #( .CVA6Cfg(CVA6Cfg), .bp_resolve_t(bp_resolve_t), .scoreboard_entry_t(scoreboard_entry_t) - ) iti = new ($time, clk_ticks, sbe, instr, gp_reg_file, fp_reg_file, result, paddr, priv_lvl, debug_mode, bp); + ) iti = new ( + $time, + clk_ticks, + sbe, + instr, + gp_reg_file, + fp_reg_file, + result, + dest_we_valid, + dest_is_fp, + paddr, + priv_lvl, + debug_mode, + bp + ); // print instruction to console automatic string print_instr = iti.printInstr(); + automatic logic commit_is_fp = dest_we_valid ? dest_is_fp : ariane_pkg::is_rd_fpr(sbe.op); if (ariane_pkg::ENABLE_SPIKE_COMMIT_LOG && !debug_mode) begin - $fwrite(commit_log, riscv::spikeCommitLog(sbe.pc, priv_lvl, instr, sbe.rd, result, ariane_pkg::is_rd_fpr(sbe.op))); + $fwrite(commit_log, riscv::spikeCommitLog(sbe.pc, priv_lvl, instr, sbe.rd, result, commit_is_fp)); end $fwrite(f, {print_instr, "\n"}); endfunction diff --git a/config/gen_from_riscv_config/README.md b/config/gen_from_riscv_config/README.md index 2422c973e03..6eb8a8dc2de 100644 --- a/config/gen_from_riscv_config/README.md +++ b/config/gen_from_riscv_config/README.md @@ -18,7 +18,7 @@ # Gen From Risc-V Config -This software takes a `Risc -V Config Yaml` description of CSR Registers, and generates ReStructuredText documents and Mardown Documents for CSR Registers and ISA Extensions. In the example/tb directory there is an example of how to generate +This software takes a `Risc-V Config Yaml` description of CSR Registers, and generates ReStructuredText documents and Markdown Documents for CSR Registers and ISA Extensions. In the example/tb directory there is an example of how to generate the packages. For more details about RISC-V Config Yaml, see [Annexes](##Annexes) section @@ -33,13 +33,13 @@ pip3 install -r requirements.txt ## Usage ```bash -#Generate Restructred-text documentation for Control and Status Registers (CSR) +#Generate Restructured-text documentation for Control and Status Registers (CSR) python3 .py -s <../riscv-config/Config_Name/generated/isa_gen>.yaml -c <../riscv-config/Config_Name/generated/custom_gen>.yaml -d <../riscv-config/Config_Name/generated/debug_gen>.yaml -m .yaml -t < Config_Name> -#Generate Restructred-text documentation for ISA extensions +#Generate Restructured-text documentation for ISA extensions python3 .py -s <../riscv-config/Config_Name/generated/isa_gen>.yaml -i .yaml -m .yaml -t < Config_Name> -#Generate the Yaml spike configuration file +#Generate the Yaml spike configuration file python3 .py -s <../riscv-config/Config_Name/generated/isa_gen>.yaml -c <../riscv-config/Config_Name/generated/custom_gen>.yaml -i .mako -m .yaml -t < Config_Name> ``` @@ -47,13 +47,13 @@ python3 .py -s <../riscv-config/Config_Name/generated/ ## Usage with cv32a65x ```bash -#Generate the Restructred-text documentation for Control and Status Registers (CSR) +#Generate the Restructured-text documentation for Control and Status Registers (CSR) python3 scripts/riscv_config_gen.py -s ../riscv-config/cv32a65x/generated/isa_gen.yaml -c ../riscv-config/cv32a65x/generated/custom_gen.yaml -d ../riscv-config/cv32a65x/generated/debug_gen.yaml -m updaters/cv32a65x/csr_updater.yaml -t cv32a65x -#Generate the Restructred-text documentation for ISA extensions +#Generate the Restructured-text documentation for ISA extensions python3 scripts/riscv_config_gen.py -s ../riscv-config/cv32a65x/generated/isa_gen.yaml -i templates/isa_template.yaml -m updaters/cv32a65x/isa_updater.yaml -t cv32a65x -#Generate the Yaml spike configuration file +#Generate the Yaml spike configuration file python3 scripts/riscv_config_gen.py -s ../riscv-config/cv32a65x/generated/isa_gen.yaml -c ../riscv-config/cv32a65x/generated/custom_gen.yaml -i templates/spike.mako -m updaters/cv32a65x/spike_updater.yaml -t cv32a65x ``` @@ -167,7 +167,7 @@ Example : ISA_Updater.yaml sub_key : sub_value (if exist if not dont include it ) cond: value -- Exemple : +- Example : exclude : @@ -185,7 +185,7 @@ Example : ISA_Updater.yaml Register Name : range : number -- Exemple : +- Example : pmpaddr : @@ -217,10 +217,10 @@ CSR/ISA Updater read RISC-CONFIG.yaml and update the registers so if you want to cores: : -- Exemple : +- Example : Bootroom : true -- Exemple : +- Example : cores: isa: rv32imc_zba_zbb_zbs_zbc_zicsr_zifencei @@ -260,7 +260,7 @@ Risc-V Config Yaml file is generated based on Risc-Config tool which include all You can execute the tool from `../config/riscv-config` repo : -- It needs python dependancies with : +- It needs python dependencies with : 'pip3 install -r ../../vendor/riscv-config/Requirements.txt' . @@ -311,7 +311,7 @@ __Format__ : Pseudocode: Invalid_Values: Exception_Raised: -__Exemple__: +__Example__: RV32I Base Integer Instructions: Description : | diff --git a/config/gen_from_riscv_config/cv32a60x/linker/link.ld b/config/gen_from_riscv_config/cv32a60x/linker/link.ld index a134ec289a8..5722241bef6 100644 --- a/config/gen_from_riscv_config/cv32a60x/linker/link.ld +++ b/config/gen_from_riscv_config/cv32a60x/linker/link.ld @@ -9,7 +9,7 @@ /* The OUTPUT_ARCH command specifies the machine architecture where the argument is one of the names used in the BFD library. More - specifically one of the entires in bfd/cpu-mips.c */ + specifically one of the entries in bfd/cpu-*.c */ OUTPUT_ARCH( "riscv" ) ENTRY(_start) @@ -76,7 +76,7 @@ SECTIONS _tbss_end = .; } - /* End of uninitalized data segement */ + /* End of uninitialized data segment */ _end = .; } diff --git a/config/gen_from_riscv_config/cv32a65x/isa/isa.adoc b/config/gen_from_riscv_config/cv32a65x/isa/isa.adoc index f7c8f5aeea3..816d9f93a87 100644 --- a/config/gen_from_riscv_config/cv32a65x/isa/isa.adoc +++ b/config/gen_from_riscv_config/cv32a65x/isa/isa.adoc @@ -12,7 +12,7 @@ |=== |Subset Name | Name | Description -|I | RV32I Base Integer Instructions | the base integer instruction set, also known as the 'RV32I' or 'RV64I' instruction set , depending on the address space size, provides the core functionality required for general-purpose computing .it includes instructions for arithmetic, logical, and control operations, as well as memory accessand manipulation +|I | RV32I Base Integer Instructions | the base integer instruction set, also known as the 'RV32I' or 'RV64I' instruction set, depending on the address space size, provides the core functionality required for general-purpose computing. It includes instructions for arithmetic, logical, and control operations, as well as memory access and manipulation. |M | RV32M Multiplication and Division Instructions | the standard integer multiplication and division instruction extension, which is named “M” and contains instructions that multiply or divide values held in two integer registers. |C | RV32C Compressed Instructions | RVC uses a simple compression scheme that offers shorter 16-bit versions of common 32-bit RISC-V instructions when: the immediate or address offset is small; one of the registers is the zero register (x0), the ABI link register (x1), or the ABI stack pointer (x2); the destination register and the first source register are identical; the registers used are the 8 most popular ones.The C extension is compatible with all other standard instruction extensions. The C extension allows 16-bit instructions to be freely intermixed with 32-bit instructions, with the latter now able to start on any 16-bit boundary. With the addition of the C extension, JAL and JALR instructions will no longer raise an instruction misaligned exception |Zicsr | RV32Zicsr Control and Status Register Instructions | All CSR instructions atomically read-modify-write a single CSR, whose CSR specifier is encoded in the 12-bit csr field of the instruction held in bits 31–20. The immediate forms use a 5-bit zero-extended immediate encoded in the rs1 field. diff --git a/config/gen_from_riscv_config/cv32a65x/linker/link.ld b/config/gen_from_riscv_config/cv32a65x/linker/link.ld index a134ec289a8..5722241bef6 100644 --- a/config/gen_from_riscv_config/cv32a65x/linker/link.ld +++ b/config/gen_from_riscv_config/cv32a65x/linker/link.ld @@ -9,7 +9,7 @@ /* The OUTPUT_ARCH command specifies the machine architecture where the argument is one of the names used in the BFD library. More - specifically one of the entires in bfd/cpu-mips.c */ + specifically one of the entries in bfd/cpu-*.c */ OUTPUT_ARCH( "riscv" ) ENTRY(_start) @@ -76,7 +76,7 @@ SECTIONS _tbss_end = .; } - /* End of uninitalized data segement */ + /* End of uninitialized data segment */ _end = .; } diff --git a/config/gen_from_riscv_config/scripts/libs/isa_updater.py b/config/gen_from_riscv_config/scripts/libs/isa_updater.py index aea4245910a..b19eeb000a4 100644 --- a/config/gen_from_riscv_config/scripts/libs/isa_updater.py +++ b/config/gen_from_riscv_config/scripts/libs/isa_updater.py @@ -71,12 +71,12 @@ def isa_recursive_update(original_dict, isa_dict): # Extracting subset names from the YAML data def isa_filter(parsed_data, updater, template): """ - create dict of filtred data from isa_template based on supported extensions + create dict of filtered data from isa_template based on supported extensions read from ISA String from RISC-V Yaml file :param parsed_data : parsed data of RISC-V Config Yaml file updater : parsed data of updater template : parsed data of isa_template - :return: dict of filtred data from isa_template + :return: dict of filtered data from isa_template """ # Define the regular expression pattern isa_regex = re.compile( diff --git a/config/gen_from_riscv_config/scripts/libs/utils.py b/config/gen_from_riscv_config/scripts/libs/utils.py index 796a6057ce3..93a57452e67 100644 --- a/config/gen_from_riscv_config/scripts/libs/utils.py +++ b/config/gen_from_riscv_config/scripts/libs/utils.py @@ -1273,7 +1273,11 @@ def returnDocument(self): if isinstance(RegElement.get("address", None), str) else hex(RegElement.get("address", None)) ) - reset = hex(RegElement.get("reset-val", "")) + + if RegElement.get("reset-val", "") != "": + reset = hex(RegElement.get("reset-val", "")) + else: + print(regName, "reset val not defined") access = RegElement.get("priv_mode", "") if Registers.get(register, {}).get("description", "") is not None: diff --git a/config/gen_from_riscv_config/scripts/riscv_config_gen.py b/config/gen_from_riscv_config/scripts/riscv_config_gen.py index ea5a58e5552..919a472eca4 100644 --- a/config/gen_from_riscv_config/scripts/riscv_config_gen.py +++ b/config/gen_from_riscv_config/scripts/riscv_config_gen.py @@ -39,8 +39,8 @@ parser.add_argument("-d", "--debugFile", help=" debug_gen yaml input file") parser.add_argument("-m", "--modif", help="ISA /CSR Formatter if exist") parser.add_argument("-i", "--temp", help="Full ISA /SPIKETemplate") - parser.add_argument("-t", "--target", help="Specifiy Config Name") - parser.add_argument("-f", "--format", help="Specifiy format output") + parser.add_argument("-t", "--target", help="Specify Config Name") + parser.add_argument("-f", "--format", help="Specify format output") args, unknown_args = parser.parse_known_args() if args.format in ['rst']: diff --git a/config/riscv-config/cv64a60ax/spec/custom_spec.yaml b/config/riscv-config/cv64a60ax/spec/custom_spec.yaml new file mode 100644 index 00000000000..ec2c1f8449c --- /dev/null +++ b/config/riscv-config/cv64a60ax/spec/custom_spec.yaml @@ -0,0 +1,55 @@ +# Copyright 2024 Thales DIS France SAS +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# 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. +# +# Original Author: Zbigniew CHAMSKI - Thales + +hart_ids: [0] +hart0: + icache: + reset-val: 0x1 + rv32: + accessible: false + rv64: + accessible: true + icache: + implemented: true + type: + rw: true + description: bit for cache-enable of instruction cache + msb: 0 + lsb: 0 + shadow: + shadow_type: + description: the register controls the operation of the i-cache unit. + address: 0x7c0 + priv_mode: M + dcache: + reset-val: 0x1 + rv32: + accessible: false + rv64: + accessible: true + dcache: + implemented: true + type: + rw: true + description: bit for cache-enable of data cache + shadow: + shadow_type: + msb: 0 + lsb: 0 + description: the register controls the operation of the d-cache unit. + address: 0x7c1 + priv_mode: M + diff --git a/config/riscv-config/cv64a60ax/spec/debug_spec.yaml b/config/riscv-config/cv64a60ax/spec/debug_spec.yaml new file mode 100644 index 00000000000..7c1f981a689 --- /dev/null +++ b/config/riscv-config/cv64a60ax/spec/debug_spec.yaml @@ -0,0 +1,168 @@ +# Copyright 2024 Thales DIS France SAS +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# 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. +# +# Original Author: Zbigniew CHAMSKI - Thales +# Updated from CV66 64 CEA - Tanuj Khandelwal - Thales + +hart_ids: [0] +hart0: &hart0 + Debug_Spec_Version: '1.0.0' + supported_xlen: [64] + debug_mode: true + parking_loop: 0x800 + dcsr: + reset-val: 0x40000413 + rv64: + accessible: true + debugver: + implemented: true + type: + ro_constant: 0x4 + ebreakvs: + implemented: false + ebreakvu: + implemented: false + ebreakm: + implemented: true + ebreaks: + implemented: true + ebreaku: + implemented: true + stepie: + implemented: true + stopcount: + implemented: true + stoptime: + implemented: true + cause: + implemented: true + type: + ro_variable: true + v: + implemented: true + mprven: + implemented: true + nmip: + implemented: true + type: + ro_variable: true + step: + implemented: true + prv: + implemented: true + rv32: + accessible: false + dpc: + rv64: + accessible: true + rv32: + accessible: false + tselect: + rv32: + accessible: False + rv64: + accessible: True + type: + warl: + dependency_fields: [] + legal: + - tselect[63:0] in [0x00000000:0x3] + wr_illegal: + - unchanged + tinfo: #FIXME + rv32: + accessible: False + rv64: + accessible: True + index_select_reg: tselect + index_list: + - reset-val: 0x78 + index_val: 0 + shadow: + shadow_type: + type: + ro_constant: 0x78 + - reset-val: 0x8 + index_val: 1 + shadow: + shadow_type: + type: + ro_constant: 0x8 + - reset-val: 0x10 + index_val: 2 + shadow: + shadow_type: + type: + ro_constant: 0x10 + tdata1: + rv32: + accessible: False + rv64: + accessible: True + index_select_reg: tselect + index_list: + - reset-val: 0xdeadbeef + index_val: 0 + shadow: + shadow_type: + type: + ro_constant: 0xdeadbeef + - reset-val: 0 + index_val: 1 + shadow: + shadow_type: + type: &mywarl + warl: + dependency_fields: [] + legal: + - writeval[63:0] in [0x0000000000000000:0xFFFFFFFFFFFFFFFF] + wr_illegal: + - Unchanged + - reset-val: 0 + index_val: 2 + shadow: + shadow_type: + type: + warl: + dependency_fields: [] + legal: + - writeval[63:0] in [0x0000000000000000:0xFFFFFFFFFFFFFFFF] + wr_illegal: + - Unchanged + + #FIXME NTO SUPPORTED BY RISCV CNFIG + # tdata2: + # rv64: + # accessible: true + # type: + # ro_variable: true + # rv32: + # accessible: false + # tdata3: + # rv64: + # accessible: true + # type: + # ro_variable: true + # rv32: + # accessible: false + dscratch0: + rv64: + accessible: true + rv32: + accessible: false + dscratch1: + rv64: + accessible: true + rv32: + accessible: false diff --git a/config/riscv-config/cv64a60ax/spec/isa_spec.yaml b/config/riscv-config/cv64a60ax/spec/isa_spec.yaml new file mode 100644 index 00000000000..cef6c746bc8 --- /dev/null +++ b/config/riscv-config/cv64a60ax/spec/isa_spec.yaml @@ -0,0 +1,1863 @@ +# Copyright 2024 Thales DIS France SAS +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# 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. +# +# Original Author: Zbigniew CHAMSKI - Thales +# Updated from CV6A60AX 64 CEA - Tanuj Khandelwal - Thales + +hart_ids: [0] +hart0: &hart0 + ISA: RV64IMAFDCNSUZicsr_Zicbom_Zicbop_Zicboz_Zifencei_Zcb_Zba_Zbb_Zbc_Zbs + User_Spec_Version: '2.3' + supported_xlen: [64] + physical_addr_sz: 39 + pmp_granularity: 10 # FIXME: To verify + misa: + reset-val: 0x800000000014312D # B: bit 1, C: bit 2, I = bit 8, M = bit 12, Z = bit 25 + rv64: + accessible: true + mxl: + implemented: true + type: + warl: + dependency_fields: [] + legal: + - mxl[1:0] in [0x2] + wr_illegal: + - unchanged + extensions: + implemented: true + type: + # ro_constant: 0x214312F + mvendorid: + reset-val: 0x00000602 + rv64: + accessible: true + type: + ro_constant: 0x00000602 + rv32: + accessible: false + fcsr: + rv32: + accessible: false + rv64: + accessible: true + fflags: + implemented: true + type: + warl: + dependency_fields: [] + legal: + - fflags[4:0] in [0x00:0x1F] + wr_illegal: + - Unchanged + mtvec: + reset-val: 0x80010000 + rv64: + accessible: true + base: + implemented: true + type: + warl: + dependency_fields: [] + legal: + # The 62 bits of 'base' are suffixed with 2'b00 + # ==> all values are legal, alignment 4 bytes is implied + - base[61:0] in [0x00000000:0x3FFFFFFFFFFFFFFF] + wr_illegal: + - Unchanged + mode: + implemented: true + type: + warl: + dependency_fields: [] + legal: + # Only Direct mode. + - mode[1:0] in [0x0] + wr_illegal: + - Unchanged + vsstatus: + reset-val: 0x0 + rv64: + accessible: false + rv32: + accessible: false + mstatus: # FIXME verify details + reset-val: 0xA00001800 # .mpp = 0x3 + rv64: + accessible: true + uie: + implemented: true + sie: + implemented: true + mie: + implemented: true + upie: + implemented: true + spie: + implemented: true + sxl: + implemented: true + type: + warl: + dependency_fields: [] + legal: + - sxl[1:0] in [0x2] + wr_illegal: + - unchanged + uxl: + implemented: true + type: + warl: + dependency_fields: [] + legal: + - uxl[1:0] in [0x2] + wr_illegal: + - unchanged + mpie: + implemented: true + mpp: + implemented: true + type: + warl: + dependency_fields: [] + legal: + - mpp[1:0] in [0x3] + wr_illegal: + - Unchanged + fs: + implemented: true + xs: + implemented: true + mprv: + implemented: false + sum: + implemented: true + mxr: + implemented: true + tvm: + implemented: false + tw: + implemented: false + tsr: + implemented: false + rv32: + accessible: false + mip: # Check if readonly or not + reset-val: 0 + rv64: + accessible: true + usip: + implemented: true + ssip: + implemented: true + msip: + implemented: true + utip: + implemented: true + stip: + implemented: true + mtip: + implemented: true + type: + ro_variable: true + ueip: + implemented: true + seip: + implemented: true + meip: + implemented: true + type: + ro_variable: true + rv32: + accessible: false + hip: + reset-val: 0 + rv64: + accessible: false + vssip: + implemented: false + vstip: + implemented: false + vseip: + implemented: false + sgeip: + implemented: false + rv32: + accessible: false + mie: + reset-val: 0 + rv64: + accessible: true + usie: + implemented: true + ssie: + implemented: true + msie: + implemented: true + utie: + implemented: true + stie: + implemented: true + mtie: + implemented: true + ueie: + implemented: true + seie: + implemented: true + meie: + implemented: true + rv32: + accessible: false + hie: + reset-val: 0 + rv64: + accessible: false + vssie: + implemented: false + vstie: + implemented: false + vseie: + implemented: false + sgeie: + implemented: false + rv32: + accessible: false + mepc: + reset-val: 0x0 + rv64: + accessible: true + rv32: + accessible: false + mtval: + reset-val: 0x0 + rv64: + accessible: true + rv32: + accessible: false + mcause: + reset-val: 0 + rv64: + accessible: true + interrupt: + implemented: true + exception_code: + implemented: true + rv32: + accessible: false + medeleg: + reset-val: 0 + rv64: + accessible: true + rv32: + accessible: false + mideleg: + reset-val: 0 + rv64: + accessible: true + rv32: + accessible: false + menvcfg: #FIXME: not convinced if it is needed + reset-val: 0 + rv64: + accessible: true + rv32: + accessible: false + marchid: + rv64: + accessible: true + type: + ro_constant: 0x00000003 + rv32: + accessible: false + reset-val: 0x00000003 + # FIXME not supported yet + # mconfigptr: + # rv64: + # accessible: true + # type: + # ro_constant: 0x0 + # rv32: + # accessible: false + # reset-val: 0x0 + mhartid: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x00 + mhpmcounter3: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter4: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter5: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter6: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter7: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter8: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter9: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter10: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter11: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter12: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter13: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter14: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter15: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter16: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter17: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter18: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter19: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter20: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter21: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter22: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter23: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter24: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter25: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter26: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter27: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter28: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter29: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter30: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmcounter31: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + # FIXME NOT SUPPORTED + # instret: + # rv64: + # accessible: true + # type: + # warl: + # dependency_fields: [] + # legal: + # - instret[31:0] in [0x00000000:0xFFFFFFFF] + # wr_illegal: + # - unchanged + # rv32: + # accessible: false + # reset-val: 0 + mcountinhibit: #FIXME Details + rv64: + accessible: true + rv32: + accessible: false + reset-val: 0x0 + mhpmevent3: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent4: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent5: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent6: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent7: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent8: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent9: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent10: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent11: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent12: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent13: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent14: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent15: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent16: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent17: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent18: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent19: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent20: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent21: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent22: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent23: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent24: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent25: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent26: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent27: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent28: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent29: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent30: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mhpmevent31: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0x0 + mimpid: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + mcounteren: #FIXME Check details + rv64: + accessible: true + rv32: + accessible: false + reset-val: 0 + pmpcfg0: + reset-val: 0 + rv32: + accessible: false + rv64: + accessible: true + pmp0cfg: + implemented: true + type: + warl: + dependency_fields: [pmpcfg0::pmp0cfg] + legal: + - "pmp0cfg[7] in [0] -> pmp0cfg[7] in [0x0:0x1] pmp0cfg[6:5] in [0] pmp0cfg[4:3] not in [2] pmp0cfg[2:0] not in [2,6]" + wr_illegal: + - Unchanged + pmp1cfg: + implemented: true + type: + warl: + dependency_fields: [pmpcfg0::pmp1cfg] + legal: + - "pmp1cfg[7] in [0] -> pmp1cfg[7] in [0x0,0x1] pmp1cfg[6:5] in [0] pmp1cfg[4:3] not in [2] pmp1cfg[2:0] not in [2,6]" + wr_illegal: + - Unchanged + pmp2cfg: + implemented: true + type: + warl: + dependency_fields: [pmpcfg0::pmp2cfg] + legal: + - "pmp2cfg[7] in [0] -> pmp2cfg[7] in [0x0,0x1] pmp2cfg[6:5] in [0] pmp2cfg[4:3] not in [2] pmp2cfg[2:0] not in [2,6]" + wr_illegal: + - Unchanged + pmp3cfg: + implemented: true + type: + warl: + dependency_fields: [pmpcfg0::pmp3cfg] + legal: + - "pmp3cfg[7] in [0] -> pmp3cfg[7] in [0x0,0x1] pmp3cfg[6:5] in [0] pmp3cfg[4:3] not in [2] pmp3cfg[2:0] not in [2,6]" + wr_illegal: + - Unchanged + pmp4cfg: + implemented: true + type: + ro_constant: 0 + pmp5cfg: + implemented: true + type: + ro_constant: 0 + pmp6cfg: + implemented: true + type: + ro_constant: 0 + pmp7cfg: + implemented: true + type: + ro_constant: 0 + pmpcfg2: + reset-val: 0 + rv32: + accessible: false + rv64: + accessible: true + pmp8cfg: + implemented: true + type: + ro_constant: 0 + pmp9cfg: + implemented: true + type: + ro_constant: 0 + pmp10cfg: + implemented: true + type: + ro_constant: 0 + pmp11cfg: + implemented: true + type: + ro_constant: 0 + pmp12cfg: + implemented: true + type: + ro_constant: 0 + pmp13cfg: + implemented: true + type: + ro_constant: 0 + pmp14cfg: + implemented: true + type: + ro_constant: 0 + pmp15cfg: + implemented: true + type: + ro_constant: 0 + pmpcfg4: + reset-val: 0 + rv32: + accessible: false + rv64: + accessible: true + pmp16cfg: + implemented: true + type: + ro_constant: 0 + pmp17cfg: + implemented: true + type: + ro_constant: 0 + pmp18cfg: + implemented: true + type: + ro_constant: 0 + pmp19cfg: + implemented: true + type: + ro_constant: 0 + pmp20cfg: + implemented: true + type: + ro_constant: 0 + pmp21cfg: + implemented: true + type: + ro_constant: 0 + pmp22cfg: + implemented: true + type: + ro_constant: 0 + pmp23cfg: + implemented: true + type: + ro_constant: 0 + pmpcfg6: + reset-val: 0 + rv32: + accessible: false + rv64: + accessible: true + pmp24cfg: + implemented: true + type: + ro_constant: 0 + pmp25cfg: + implemented: true + type: + ro_constant: 0 + pmp26cfg: + implemented: true + type: + ro_constant: 0 + pmp27cfg: + implemented: true + type: + ro_constant: 0 + pmp28cfg: + implemented: true + type: + ro_constant: 0 + pmp29cfg: + implemented: true + type: + ro_constant: 0 + pmp30cfg: + implemented: true + type: + ro_constant: 0 + pmp31cfg: + implemented: true + type: + ro_constant: 0 + pmpcfg8: + reset-val: 0 + rv32: + accessible: false + rv64: + accessible: true + pmp32cfg: + implemented: true + type: + ro_constant: 0 + pmp33cfg: + implemented: true + type: + ro_constant: 0 + pmp34cfg: + implemented: true + type: + ro_constant: 0 + pmp35cfg: + implemented: true + type: + ro_constant: 0 + pmp36cfg: + implemented: true + type: + ro_constant: 0 + pmp37cfg: + implemented: true + type: + ro_constant: 0 + pmp38cfg: + implemented: true + type: + ro_constant: 0 + pmp39cfg: + implemented: true + type: + ro_constant: 0 + pmpcfg10: + reset-val: 0 + rv32: + accessible: false + rv64: + accessible: true + pmp40cfg: + implemented: true + type: + ro_constant: 0 + pmp41cfg: + implemented: true + type: + ro_constant: 0 + pmp42cfg: + implemented: true + type: + ro_constant: 0 + pmp43cfg: + implemented: true + type: + ro_constant: 0 + pmp44cfg: + implemented: true + type: + ro_constant: 0 + pmp45cfg: + implemented: true + type: + ro_constant: 0 + pmp46cfg: + implemented: true + type: + ro_constant: 0 + pmp47cfg: + implemented: true + type: + ro_constant: 0 + pmpcfg12: + reset-val: 0 + rv32: + accessible: false + rv64: + accessible: true + pmp48cfg: + implemented: true + type: + ro_constant: 0 + pmp49cfg: + implemented: true + type: + ro_constant: 0 + pmp50cfg: + implemented: true + type: + ro_constant: 0 + pmp51cfg: + implemented: true + type: + ro_constant: 0 + pmp52cfg: + implemented: true + type: + ro_constant: 0 + pmp53cfg: + implemented: true + type: + ro_constant: 0 + pmp54cfg: + implemented: true + type: + ro_constant: 0 + pmp55cfg: + implemented: true + type: + ro_constant: 0 + pmpcfg14: + reset-val: 0 + rv32: + accessible: false + rv64: + accessible: true + pmp56cfg: + implemented: true + type: + ro_constant: 0 + pmp57cfg: + implemented: true + type: + ro_constant: 0 + pmp58cfg: + implemented: true + type: + ro_constant: 0 + pmp59cfg: + implemented: true + type: + ro_constant: 0 + pmp60cfg: + implemented: true + type: + ro_constant: 0 + pmp61cfg: + implemented: true + type: + ro_constant: 0 + pmp62cfg: + implemented: true + type: + ro_constant: 0 + pmp63cfg: + implemented: true + type: + ro_constant: 0 + mcycle: + rv64: + accessible: true + type: + warl: + dependency_fields: [] + legal: + - mcycle[63:0] in [0x0000000000000000:0xFFFFFFFFFFFFFFFF] + wr_illegal: + - unchanged + rv32: + accessible: false + reset-val: 0 + minstret: + rv64: + accessible: true + type: + warl: + dependency_fields: [] + legal: + - minstret[63:0] in [0x0000000000000000:0xFFFFFFFFFFFFFFFF] + wr_illegal: + - unchanged + rv32: + accessible: false + reset-val: 0 + pmpaddr0: + rv64: + accessible: true + type: + warl: + dependency_fields: [] + legal: + - pmpaddr0[63:0] bitmask [0xFFFFFFFFFFFFFFFE, 0x0000000000000000] + wr_illegal: + - unchanged + rv32: + accessible: false + reset-val: 0 + pmpaddr1: + rv64: + accessible: true + type: + warl: + dependency_fields: [] + legal: + - pmpaddr1[63:0] bitmask [0xFFFFFFFFFFFFFFFE, 0x0000000000000000] + wr_illegal: + - unchanged + rv32: + accessible: false + reset-val: 0 + pmpaddr2: + rv64: + accessible: true + type: + warl: + dependency_fields: [] + legal: + - pmpaddr2[63:0] bitmask [0xFFFFFFFFFFFFFFFE, 0x0000000000000000] + wr_illegal: + - unchanged + rv32: + accessible: false + reset-val: 0 + pmpaddr3: + rv64: + accessible: true + type: + warl: + dependency_fields: [] + legal: + - pmpaddr3[63:0] bitmask [0xFFFFFFFFFFFFFFFE, 0x0000000000000000] + wr_illegal: + - unchanged + rv32: + accessible: false + reset-val: 0 + pmpaddr4: + rv64: + accessible: true + type: + warl: + dependency_fields: [] + legal: + - pmpaddr4[63:0] bitmask [0xFFFFFFFFFFFFFFFE, 0x0000000000000000] + wr_illegal: + - unchanged + rv32: + accessible: false + reset-val: 0 + pmpaddr5: + rv64: + accessible: true + type: + warl: + dependency_fields: [] + legal: + - pmpaddr5[63:0] bitmask [0xFFFFFFFFFFFFFFFE, 0x0000000000000000] + wr_illegal: + - unchanged + rv32: + accessible: false + reset-val: 0 + pmpaddr6: + rv64: + accessible: true + type: + warl: + dependency_fields: [] + legal: + - pmpaddr6[63:0] bitmask [0xFFFFFFFFFFFFFFFE, 0x0000000000000000] + wr_illegal: + - unchanged + rv32: + accessible: false + reset-val: 0 + pmpaddr7: + rv64: + accessible: true + type: + warl: + dependency_fields: [] + legal: + - pmpaddr7[63:0] bitmask [0xFFFFFFFFFFFFFFFE, 0x0000000000000000] + wr_illegal: + - unchanged + rv32: + accessible: false + reset-val: 0 + pmpaddr8: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr9: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr10: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr11: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr12: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr13: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr14: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr15: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr16: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr17: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr18: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr19: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr20: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr21: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr22: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr23: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr24: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr25: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr26: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr27: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr28: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr29: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr30: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr31: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr32: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr33: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr34: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr35: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr36: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr37: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr38: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr39: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr40: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr41: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr42: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr43: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr44: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr45: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr46: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr47: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr48: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr49: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr50: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr51: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr52: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr53: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr54: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr55: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr56: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr57: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr58: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr59: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr60: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr61: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr62: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + pmpaddr63: + rv64: + accessible: true + type: + ro_constant: 0x0 + rv32: + accessible: false + reset-val: 0 + satp: + rv32: + accessible: false + rv64: + accessible: true + ppn: + type: + warl: + dependency_fields: [] + legal: + - "ppn[43:0] in [0x00000000000:0xFFFFFFFFFFF]" + wr_illegal: + - Unchanged + asid: + type: + warl: + dependency_fields: [] + legal: + - "asid[15:0] in [0x0000:0x00FF]" + wr_illegal: + - Unchanged + mode: + type: + warl: + dependency_fields: [] + legal: + - "mode[3:0] in [0,8]" + wr_illegal: + - Unchanged + reset-val: 0x0000000000000000 + scause: + rv32: + accessible: false + rv64: + accessible: true + exception_code: + implemented: True + interrupt: + implemented: True + reset-val: 0 + senvcfg: + rv32: + accessible: false + rv64: + accessible: true + reset-val: 0 + sepc: + rv32: + accessible: false + rv64: + accessible: true + reset-val: 0 + sie: #FIXME Check if readonly or not + reset-val: 0 + rv64: + accessible: true + ssie: + implemented: true + stie: + implemented: true + seie: + implemented: true + rv32: + accessible: false + sip: #FIXME Check if readonly or not + reset-val: 0 + rv64: + accessible: true + ssip: + implemented: true + stip: + implemented: true + seip: + implemented: true + rv32: + accessible: false + sscratch: + rv64: + accessible: true + rv32: + accessible: false + sstatus: + reset-val: 0x0 + rv64: + accessible: true + uie: + implemented: false + sie: + implemented: true + upie: + implemented: false + spie: + implemented: true + spp: + implemented: true + fs: + implemented: false + xs: + implemented: true + sum: + implemented: true + mxr: + implemented: true + # FIXME not supported yet + #uxl: + # implemented: true + # type: + # warl: + # dependency_fields: [] + # legal: + # - uxl[1:0] in [0x2] + # wr_illegal: + # - unchanged + sd: + implemented: true + rv32: + accessible: false + stval: + rv32: + accessible: false + rv64: + accessible: true + type: + warl: + dependency_fields: [] + legal: + - stval[63:0] in [0x0000000000000000:0xFFFFFFFFFFFFFFFF] + wr_illegal: + - Unchanged + reset-val: 0 + stvec: + reset-val: 0x80010000 + rv64: + accessible: true + base: + implemented: true + type: + warl: + dependency_fields: [] + legal: + # The 62 bits of 'base' are suffixed with 2'b00 + # ==> all values are legal, alignment 4 bytes is implied + - base[61:0] in [0x00000000:0x3FFFFFFFFFFFFFFF] + wr_illegal: + - Unchanged + mode: + implemented: true + type: + warl: + dependency_fields: [] + legal: + # Only Direct mode. + - mode[1:0] in [0x0] + wr_illegal: + - Unchanged + time: + rv64: + accessible: true + type: + ro_variable: true + rv32: + accessible: false + reset-val: 0 diff --git a/config/riscv-config/cv64a60ax/spec/platform_spec.yaml b/config/riscv-config/cv64a60ax/spec/platform_spec.yaml new file mode 100644 index 00000000000..23d847bf398 --- /dev/null +++ b/config/riscv-config/cv64a60ax/spec/platform_spec.yaml @@ -0,0 +1,53 @@ +# Copyright 2024 Thales DIS France SAS +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# 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. +# +# Original Author: Tanuj Khandelwal CEA (copied from riscv-config examples) + +nmi: + label: nmi_vector + # address: 12288 +reset: + label: reset_vector + # address: 16384 +mtime: + implemented: false +mtimecmp: + implemented: false + #mcause_non_standard: + # implemented: true +mtval_condition_writes: + implemented: false +scause_non_standard: + implemented: false +stval_condition_writes: + implemented: false +zicbo_cache_block_sz : + implemented: true + zicbom_sz: 64 + zicboz_sz: 64 + +#memory_map: +# - memory_region: +# name: bootrom +# base_addr: 0x10000 +# size: 0x10000 +# description: System boot ROM +# attributes: +# read_only: true +# cached: false +# - memory_region: +# name: dram +# base_addr: 0x80000000 +# size: 0x40000000 +# description: System (D)RAM diff --git a/core/Flist.cva6 b/core/Flist.cva6 index e82365d12bb..8511533159c 100644 --- a/core/Flist.cva6 +++ b/core/Flist.cva6 @@ -20,7 +20,7 @@ // // Manifest for the CVA6 CORE RTL model. // - This is a CORE-ONLY manifest. -// - Relevent synthesis and simulation scripts/Makefiles must set the shell +// - Relevant synthesis and simulation scripts/Makefiles must set the shell // ENV variable CVA6_REPO_DIR. // /////////////////////////////////////////////////////////////////////////////// @@ -37,11 +37,37 @@ ${CVA6_REPO_DIR}/vendor/pulp-platform/fpga-support/rtl/SyncDpRam_ind_r_w.sv +incdir+${CVA6_REPO_DIR}/vendor/pulp-platform/common_cells/src/ +incdir+${CVA6_REPO_DIR}/vendor/pulp-platform/axi/include/ +incdir+${CVA6_REPO_DIR}/common/local/util/ ++incdir+${HPDCACHE_DIR}/rtl/src/utils/ecc // Floating point unit ${CVA6_REPO_DIR}/core/cvfpu/src/fpnew_pkg.sv ${CVA6_REPO_DIR}/core/cvfpu/src/fpnew_cast_multi.sv ${CVA6_REPO_DIR}/core/cvfpu/src/fpnew_classifier.sv +${CVA6_REPO_DIR}/core/cvfpu/vendor/opene906/E906_RTL_FACTORY/gen_rtl/clk/rtl/gated_clk_cell.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/opene906/E906_RTL_FACTORY/gen_rtl/fdsu/rtl/pa_fdsu_ctrl.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/opene906/E906_RTL_FACTORY/gen_rtl/fdsu/rtl/pa_fdsu_ff1.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/opene906/E906_RTL_FACTORY/gen_rtl/fdsu/rtl/pa_fdsu_pack_single.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/opene906/E906_RTL_FACTORY/gen_rtl/fdsu/rtl/pa_fdsu_prepare.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/opene906/E906_RTL_FACTORY/gen_rtl/fdsu/rtl/pa_fdsu_round_single.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/opene906/E906_RTL_FACTORY/gen_rtl/fdsu/rtl/pa_fdsu_special.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/opene906/E906_RTL_FACTORY/gen_rtl/fdsu/rtl/pa_fdsu_srt_single.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/opene906/E906_RTL_FACTORY/gen_rtl/fdsu/rtl/pa_fdsu_top.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/opene906/E906_RTL_FACTORY/gen_rtl/fpu/rtl/pa_fpu_dp.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/opene906/E906_RTL_FACTORY/gen_rtl/fpu/rtl/pa_fpu_frbus.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/opene906/E906_RTL_FACTORY/gen_rtl/fpu/rtl/pa_fpu_src_type.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_ctrl.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_double.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_ff1.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_pack.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_prepare.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_round.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_scalar_dp.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_srt_radix16_bound_table.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_srt_radix16_with_sqrt.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_srt.v +${CVA6_REPO_DIR}/core/cvfpu/vendor/openc910/C910_RTL_FACTORY/gen_rtl/vfdsu/rtl/ct_vfdsu_top.v +${CVA6_REPO_DIR}/core/cvfpu/src/fpnew_divsqrt_th_32.sv +${CVA6_REPO_DIR}/core/cvfpu/src/fpnew_divsqrt_th_64_multi.sv ${CVA6_REPO_DIR}/core/cvfpu/src/fpnew_divsqrt_multi.sv ${CVA6_REPO_DIR}/core/cvfpu/src/fpnew_fma_multi.sv ${CVA6_REPO_DIR}/core/cvfpu/src/fpnew_fma.sv @@ -71,6 +97,8 @@ ${CVA6_REPO_DIR}/core/include/wt_cache_pkg.sv ${CVA6_REPO_DIR}/core/include/std_cache_pkg.sv ${CVA6_REPO_DIR}/core/include/instr_tracer_pkg.sv ${CVA6_REPO_DIR}/core/include/build_config_pkg.sv +${CVA6_REPO_DIR}/core/include/aes_pkg.sv +${CVA6_REPO_DIR}/core/include/triggers_pkg.sv //CVXIF ${CVA6_REPO_DIR}/core/cvxif_compressed_if_driver.sv @@ -106,6 +134,8 @@ ${CVA6_REPO_DIR}/vendor/pulp-platform/common_cells/src/delta_counter.sv ${CVA6_REPO_DIR}/core/cva6.sv ${CVA6_REPO_DIR}/core/cva6_rvfi_probes.sv ${CVA6_REPO_DIR}/core/alu.sv +${CVA6_REPO_DIR}/core/alu_wrapper.sv +${CVA6_REPO_DIR}/core/aes.sv // Note: depends on fpnew_pkg, above ${CVA6_REPO_DIR}/core/fpu_wrap.sv ${CVA6_REPO_DIR}/core/branch_unit.sv @@ -115,6 +145,7 @@ ${CVA6_REPO_DIR}/core/controller.sv ${CVA6_REPO_DIR}/core/zcmt_decoder.sv ${CVA6_REPO_DIR}/core/csr_buffer.sv ${CVA6_REPO_DIR}/core/csr_regfile.sv +${CVA6_REPO_DIR}/core/trigger_module.sv ${CVA6_REPO_DIR}/core/decoder.sv ${CVA6_REPO_DIR}/core/ex_stage.sv ${CVA6_REPO_DIR}/core/instr_realign.sv @@ -132,6 +163,7 @@ ${CVA6_REPO_DIR}/core/ariane_regfile_ff.sv ${CVA6_REPO_DIR}/core/ariane_regfile_fpga.sv // NOTE: scoreboard.sv modified for DSIM (unchanged for other simulators) ${CVA6_REPO_DIR}/core/scoreboard.sv +${CVA6_REPO_DIR}/core/raw_checker.sv ${CVA6_REPO_DIR}/core/store_buffer.sv ${CVA6_REPO_DIR}/core/amo_buffer.sv ${CVA6_REPO_DIR}/core/store_unit.sv @@ -144,6 +176,7 @@ ${CVA6_REPO_DIR}/core/cva6_fifo_v3.sv // What is "frontend"? ${CVA6_REPO_DIR}/core/frontend/btb.sv ${CVA6_REPO_DIR}/core/frontend/bht.sv +${CVA6_REPO_DIR}/core/frontend/bht2lvl.sv ${CVA6_REPO_DIR}/core/frontend/ras.sv ${CVA6_REPO_DIR}/core/frontend/instr_scan.sv ${CVA6_REPO_DIR}/core/frontend/instr_queue.sv @@ -166,9 +199,19 @@ ${CVA6_REPO_DIR}/core/cache_subsystem/cva6_icache_axi_wrapper.sv ${CVA6_REPO_DIR}/core/cache_subsystem/std_cache_subsystem.sv ${CVA6_REPO_DIR}/core/cache_subsystem/std_nbdcache.sv -F ${HPDCACHE_DIR}/rtl/hpdcache.Flist +${HPDCACHE_DIR}/rtl/src/utils/ecc/prim_secded_36_29_dec.sv +${HPDCACHE_DIR}/rtl/src/utils/ecc/prim_secded_36_29_enc.sv +${HPDCACHE_DIR}/rtl/src/utils/ecc/prim_secded_39_32_dec.sv +${HPDCACHE_DIR}/rtl/src/utils/ecc/prim_secded_39_32_enc.sv +${HPDCACHE_DIR}/rtl/src/utils/ecc/prim_secded_55_48_dec.sv +${HPDCACHE_DIR}/rtl/src/utils/ecc/prim_secded_55_48_enc.sv +${HPDCACHE_DIR}/rtl/src/utils/ecc/prim_secded_72_64_dec.sv +${HPDCACHE_DIR}/rtl/src/utils/ecc/prim_secded_72_64_enc.sv +${HPDCACHE_DIR}/rtl/src/utils/ecc/prim_secded_pkg.sv ${HPDCACHE_DIR}/rtl/src/utils/hpdcache_mem_resp_demux.sv ${HPDCACHE_DIR}/rtl/src/utils/hpdcache_mem_to_axi_read.sv ${HPDCACHE_DIR}/rtl/src/utils/hpdcache_mem_to_axi_write.sv +${CVA6_REPO_DIR}/core/include/dummy_l15_pkg.sv ${CVA6_REPO_DIR}/core/cache_subsystem/cva6_hpdcache_subsystem.sv ${CVA6_REPO_DIR}/core/cache_subsystem/cva6_hpdcache_subsystem_axi_arbiter.sv ${CVA6_REPO_DIR}/core/cache_subsystem/cva6_hpdcache_if_adapter.sv @@ -176,6 +219,9 @@ ${CVA6_REPO_DIR}/core/cache_subsystem/cva6_hpdcache_wrapper.sv ${HPDCACHE_DIR}/rtl/src/common/macros/behav/hpdcache_sram_1rw.sv ${HPDCACHE_DIR}/rtl/src/common/macros/behav/hpdcache_sram_wbyteenable_1rw.sv ${HPDCACHE_DIR}/rtl/src/common/macros/behav/hpdcache_sram_wmask_1rw.sv +${HPDCACHE_DIR}/rtl/src/common/macros/behav/hpdcache_sram_ecc_1rw.sv +${HPDCACHE_DIR}/rtl/src/common/macros/behav/hpdcache_sram_wbyteenable_ecc_1rw.sv +${HPDCACHE_DIR}/rtl/src/common/macros/behav/hpdcache_sram_wmask_ecc_1rw.sv // Physical Memory Protection // NOTE: pmp.sv modified for DSIM (unchanged for other simulators) diff --git a/core/Flist.cva6_gate b/core/Flist.cva6_gate index a6e76e48f44..50eb099e80e 100644 --- a/core/Flist.cva6_gate +++ b/core/Flist.cva6_gate @@ -61,8 +61,8 @@ ${CVA6_REPO_DIR}/pd/synth/cva6_${TARGET_CFG}_synth.v # Dedicated to black box in caches, cv32a65x only ${CVA6_REPO_DIR}/pd/synth/tc_sram_wrapper_256_64_00000008_00000001_00000001_none_0.sv -${CVA6_REPO_DIR}/pd/synth/hpdcache_sram_wbyteenable_1rw_00000007_00000040_00000080.sv -${CVA6_REPO_DIR}/pd/synth/hpdcache_sram_1rw_00000006_0000001c_00000040.sv +${CVA6_REPO_DIR}/pd/synth/hpdcache_sram_wbyteenable_1rw_00000007_00000020_00000080_00000002.sv +${CVA6_REPO_DIR}/pd/synth/hpdcache_sram_1rw_00000006_0000001c_00000040_00000001.sv ${CVA6_REPO_DIR}/common/local/util/tc_sram_wrapper.sv ${CVA6_REPO_DIR}/common/local/util/tc_sram_wrapper_cache_techno.sv diff --git a/core/acc_dispatcher.sv b/core/acc_dispatcher.sv index d00e7eb5f03..5309b2fc43d 100644 --- a/core/acc_dispatcher.sv +++ b/core/acc_dispatcher.sv @@ -23,36 +23,12 @@ module acc_dispatcher parameter type exception_t = logic, parameter type fu_data_t = logic, parameter type scoreboard_entry_t = logic, - localparam type accelerator_req_t = struct packed { - logic req_valid; - logic resp_ready; - riscv::instruction_t insn; - logic [CVA6Cfg.XLEN-1:0] rs1; - logic [CVA6Cfg.XLEN-1:0] rs2; - fpnew_pkg::roundmode_e frm; - logic [CVA6Cfg.TRANS_ID_BITS-1:0] trans_id; - logic store_pending; - // Invalidation interface - logic acc_cons_en; - logic inval_ready; - }, - parameter type acc_req_t = accelerator_req_t, - parameter type acc_resp_t = struct packed { - logic req_ready; - logic resp_valid; - logic [CVA6Cfg.XLEN-1:0] result; - logic [CVA6Cfg.TRANS_ID_BITS-1:0] trans_id; - exception_t exception; - // Metadata - logic store_pending; - logic store_complete; - logic load_complete; - logic [4:0] fflags; - logic fflags_valid; - // Invalidation interface - logic inval_valid; - logic [63:0] inval_addr; - }, + parameter type acc_req_t = logic, + parameter type acc_resp_t = logic, + parameter type accelerator_req_t = logic, + parameter type accelerator_resp_t = logic, + parameter type acc_mmu_req_t = logic, + parameter type acc_mmu_resp_t = logic, parameter type acc_cfg_t = logic, parameter acc_cfg_t AccCfg = '0 ) ( @@ -65,10 +41,11 @@ module acc_dispatcher // Interface with the CSRs input priv_lvl_t ld_st_priv_lvl_i, input logic sum_i, - input pmpcfg_t [CVA6Cfg.NrPMPEntries-1:0] pmpcfg_i, - input logic [CVA6Cfg.NrPMPEntries-1:0][CVA6Cfg.PLEN-3:0] pmpaddr_i, + input pmpcfg_t [avoid_neg(CVA6Cfg.NrPMPEntries-1):0] pmpcfg_i, + input logic [avoid_neg(CVA6Cfg.NrPMPEntries-1):0][CVA6Cfg.PLEN-3:0] pmpaddr_i, input logic [2:0] fcsr_frm_i, output logic dirty_v_state_o, + input logic acc_mmu_en_i, // Interface with the issue stage input scoreboard_entry_t issue_instr_i, input logic issue_instr_hs_i, @@ -83,11 +60,14 @@ module acc_dispatcher output logic acc_valid_ex_o, // FU executed // Interface with the commit stage input logic [CVA6Cfg.NrCommitPorts-1:0] commit_ack_i, - input logic commit_st_barrier_i, // A store barrier was commited + input logic commit_st_barrier_i, // A store barrier was committed // Interface with the load/store unit output logic acc_stall_st_pending_o, input logic acc_no_st_pending_i, input dcache_req_i_t [2:0] dcache_req_ports_i, + // Interface with the MMU + output acc_mmu_req_t acc_mmu_req_o, + input acc_mmu_resp_t acc_mmu_resp_i, // Interface with the controller output logic ctrl_halt_o, input logic [11:0] csr_addr_i, @@ -209,8 +189,6 @@ module acc_dispatcher // We received a new instruction if (acc_valid_q) insn_pending_d[acc_data.trans_id] = 1'b1; - // Flush all received instructions - if (flush_ex_i) insn_pending_d = '0; // An accelerator instruction is no longer speculative. if (acc_commit && insn_pending_q[acc_commit_trans_id]) begin @@ -219,7 +197,16 @@ module acc_dispatcher end // An accelerator instruction was issued. - if (acc_req_o.req_valid) insn_ready_d[acc_req_o.trans_id] = 1'b0; + if (acc_req_o.acc_req.req_valid) insn_ready_d[acc_req_o.acc_req.trans_id] = 1'b0; + + // Flush all received instructions. This branch must appear LAST so that + // it wins the lexical-priority contest against a simultaneous acc_commit + // (which reads the registered insn_pending_q and would otherwise leave a + // stale insn_ready bit set for a just-flushed trans_id). + if (flush_ex_i) begin + insn_pending_d = '0; + insn_ready_d = '0; + end end : p_non_speculative_ff /************************* @@ -231,29 +218,31 @@ module acc_dispatcher logic acc_req_ready; accelerator_req_t acc_req_int; - fall_through_register #( + spill_register #( .T(accelerator_req_t) ) i_accelerator_req_register ( - .clk_i (clk_i), - .rst_ni (rst_ni), - .clr_i (1'b0), - .testmode_i(1'b0), - .data_i (acc_req), - .valid_i (acc_req_valid), - .ready_o (acc_req_ready), - .data_o (acc_req_int), - .valid_o (acc_req_o.req_valid), - .ready_i (acc_resp_i.req_ready) + .clk_i (clk_i), + .rst_ni (rst_ni), + .data_i (acc_req), + .valid_i(acc_req_valid), + .ready_o(acc_req_ready), + .data_o (acc_req_int), + .valid_o(acc_req_o.acc_req.req_valid), + .ready_i(acc_resp_i.acc_resp.req_ready) ); - assign acc_req_o.insn = acc_req_int.insn; - assign acc_req_o.rs1 = acc_req_int.rs1; - assign acc_req_o.rs2 = acc_req_int.rs2; - assign acc_req_o.frm = acc_req_int.frm; - assign acc_req_o.trans_id = acc_req_int.trans_id; - assign acc_req_o.store_pending = !acc_no_st_pending_i && acc_cons_en_i; - assign acc_req_o.acc_cons_en = acc_cons_en_i; - assign acc_req_o.inval_ready = inval_ready_i; + assign acc_req_o.acc_req.insn = acc_req_int.insn; + assign acc_req_o.acc_req.rs1 = acc_req_int.rs1; + assign acc_req_o.acc_req.rs2 = acc_req_int.rs2; + assign acc_req_o.acc_req.frm = acc_req_int.frm; + assign acc_req_o.acc_req.trans_id = acc_req_int.trans_id; + assign acc_req_o.acc_req.store_pending = !acc_no_st_pending_i && acc_cons_en_i; + assign acc_req_o.acc_req.acc_cons_en = acc_cons_en_i; + assign acc_req_o.acc_req.inval_ready = inval_ready_i; + + // MMU interface + assign acc_req_o.acc_mmu_resp = acc_mmu_resp_i; + assign acc_req_o.acc_mmu_en = acc_mmu_en_i; always_comb begin : accelerator_req_dispatcher // Do not fetch from the instruction queue @@ -263,7 +252,7 @@ module acc_dispatcher acc_req = '0; acc_req_valid = 1'b0; - // Unpack fu_data_t into accelerator_req_t + // Unpack fu_data_t into acc_req_t if (!acc_insn_queue_empty) begin acc_req = '{ // Instruction is forwarded from the decoder as an immediate @@ -297,23 +286,27 @@ module acc_dispatcher logic acc_ld_disp; logic acc_st_disp; - assign acc_trans_id_o = acc_resp_i.trans_id; - assign acc_result_o = acc_resp_i.result; - assign acc_valid_o = acc_resp_i.resp_valid; - assign acc_exception_o = acc_resp_i.exception; + assign acc_trans_id_o = acc_resp_i.acc_resp.trans_id; + assign acc_result_o = acc_resp_i.acc_resp.result; + assign acc_valid_o = acc_resp_i.acc_resp.resp_valid; + assign acc_exception_o = acc_resp_i.acc_resp.exception; // Unpack the accelerator response - assign acc_fflags_valid_o = acc_resp_i.fflags_valid; - assign acc_fflags_o = acc_resp_i.fflags; + assign acc_fflags_valid_o = acc_resp_i.acc_resp.fflags_valid; + assign acc_fflags_o = acc_resp_i.acc_resp.fflags; + + // MMU interface + assign acc_mmu_req_o = acc_resp_i.acc_mmu_req; + // Always ready to receive responses - assign acc_req_o.resp_ready = 1'b1; + assign acc_req_o.acc_req.resp_ready = 1'b1; // Signal dispatched load/store to issue stage - assign acc_ld_disp = acc_req_valid && (acc_insn_queue_o.operation == ACCEL_OP_LOAD); - assign acc_st_disp = acc_req_valid && (acc_insn_queue_o.operation == ACCEL_OP_STORE); + assign acc_ld_disp = acc_req_valid && (acc_insn_queue_o.operation == ACCEL_OP_LOAD); + assign acc_st_disp = acc_req_valid && (acc_insn_queue_o.operation == ACCEL_OP_STORE); // Cache invalidation - assign inval_valid_o = acc_resp_i.inval_valid; - assign inval_addr_o = acc_resp_i.inval_addr; + assign inval_valid_o = acc_resp_i.acc_resp.inval_valid; + assign inval_addr_o = acc_resp_i.acc_resp.inval_addr; /************************** * Accelerator commit * @@ -344,15 +337,15 @@ module acc_dispatcher * Accelerator barriers * **************************/ - // On a store barrier (i.e. any barrier that requires preceeding stores to complete + // On a store barrier (i.e. any barrier that requires preceding stores to complete // before continuing execution), halt execution while there are pending stores in // the accelerator pipeline. logic wait_acc_store_d, wait_acc_store_q; `FF(wait_acc_store_q, wait_acc_store_d, '0) // Set on store barrier. Clear when no store is pending. - assign wait_acc_store_d = (wait_acc_store_q | commit_st_barrier_i) & acc_resp_i.store_pending; - assign ctrl_halt_o = wait_acc_store_q; + assign wait_acc_store_d = (wait_acc_store_q | commit_st_barrier_i) & acc_resp_i.acc_resp.store_pending; + assign ctrl_halt_o = wait_acc_store_q; /************************** * Load/Store tracking * @@ -390,9 +383,9 @@ module acc_dispatcher .clk_i (clk_i), .rst_ni (rst_ni), .clear_i (1'b0), - .en_i (acc_ld_disp ^ acc_resp_i.load_complete), + .en_i (acc_ld_disp ^ acc_resp_i.acc_resp.load_complete), .load_i (1'b0), - .down_i (acc_resp_i.load_complete), + .down_i (acc_resp_i.acc_resp.load_complete), .d_i ('0), .q_o (acc_disp_loads_pending), .overflow_o(acc_disp_loads_overflow) @@ -435,9 +428,9 @@ module acc_dispatcher .clk_i (clk_i), .rst_ni (rst_ni), .clear_i (1'b0), - .en_i (acc_st_disp ^ acc_resp_i.store_complete), + .en_i (acc_st_disp ^ acc_resp_i.acc_resp.store_complete), .load_i (1'b0), - .down_i (acc_resp_i.store_complete), + .down_i (acc_resp_i.acc_resp.store_complete), .d_i ('0), .q_o (acc_disp_stores_pending), .overflow_o(acc_disp_stores_overflow) diff --git a/core/aes.sv b/core/aes.sv new file mode 100644 index 00000000000..d79a5dd9764 --- /dev/null +++ b/core/aes.sv @@ -0,0 +1,234 @@ +// Licensed under the Solderpad Hardware Licence, Version 2.1 (the "License"); +// you may not use this file except in compliance with the License. +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +// You may obtain a copy of the License at https://solderpad.org/licenses/ +// +// Author: Munail Waqar, 10xEngineers +// Date: 03.05.2025 +// Description: The Zkn extension including its subsets accelerates cryptographic workloads by introducing dedicated +// scalar instructions compliant with the RISC-V Scalar Cryptography specification. The subsets include: +// Zknd (AES Decryption and related instructions), Zkne (AES Encryption support, including AES rounds and key expansion steps), +// Zknh (SHA-256 and SHA-512 hash functions for secure hashing operations). +// +module aes + import ariane_pkg::*; + import aes_pkg::*; +#( + parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty, + parameter type fu_data_t = logic +) ( + // Subsystem Clock - SUBSYSTEM + input logic clk_i, + // Asynchronous reset active low - SUBSYSTEM + input logic rst_ni, + // FU data needed to execute instruction - ISSUE_STAGE + input fu_data_t fu_data_i, + // Original instruction bits for aes + input logic [ 5:0] orig_instr_aes, + // AES result - ISSUE_STAGE + output logic [CVA6Cfg.XLEN-1:0] result_o +); + + logic [63:0] sr; + logic [ 7:0] sbox_in; + logic [31:0] aes32esi_gen; + logic [31:0] aes32esmi_gen; + logic [63:0] aes64es_gen; + logic [63:0] aes64esm_gen; + logic [31:0] aes32dsi_gen; + logic [31:0] aes32dsmi_gen; + logic [63:0] sr_inv; + logic [63:0] aes64ds_gen; + logic [63:0] aes64dsm_gen; + logic [63:0] aes64im_gen; + logic [63:0] aes64ks1i_gen; + logic [63:0] aes64ks2_gen; + + logic [31:0] sha256sig0_gen; + logic [31:0] sha256sig1_gen; + logic [31:0] sha256sum0_gen; + logic [31:0] sha256sum1_gen; + + logic [31:0] sha512sig0h_gen; + logic [31:0] sha512sig0l_gen; + logic [31:0] sha512sig1h_gen; + logic [31:0] sha512sig1l_gen; + logic [31:0] sha512sum0r_gen; + logic [31:0] sha512sum1r_gen; + + logic [63:0] sha512sig0_gen; + logic [63:0] sha512sig1_gen; + logic [63:0] sha512sum0_gen; + logic [63:0] sha512sum1_gen; + + // AES gen block + if (CVA6Cfg.ZKN && CVA6Cfg.RVB) begin : aes_gen_block + // SHA256 sigma0 transformation function by rotating, shifting and XORing rs1 + assign sha256sig0_gen = (fu_data_i.operand_a[31:0] >> 7 | fu_data_i.operand_a[31:0] << 25) ^ (fu_data_i.operand_a[31:0] >> 18 | fu_data_i.operand_a[31:0] << 14) ^ (fu_data_i.operand_a[31:0] >> 3); + // SHA256 sigma1 transformation function by rotating, shifting and XORing rs1 + assign sha256sig1_gen = (fu_data_i.operand_a[31:0] >> 17 | fu_data_i.operand_a[31:0] << 15) ^ (fu_data_i.operand_a[31:0] >> 19 | fu_data_i.operand_a[31:0] << 13) ^ (fu_data_i.operand_a[31:0] >> 10); + // SHA256 sum0 transformation function by rotating, shifting and XORing rs1 + assign sha256sum0_gen = (fu_data_i.operand_a[31:0] >> 2 | fu_data_i.operand_a[31:0] << 30) ^ (fu_data_i.operand_a[31:0] >> 13 | fu_data_i.operand_a[31:0] << 19) ^ (fu_data_i.operand_a[31:0] >> 22 | fu_data_i.operand_a[31:0] << 10); + // SHA256 sum1 transformation function by rotating, shifting and XORing rs1 + assign sha256sum1_gen = (fu_data_i.operand_a[31:0] >> 6 | fu_data_i.operand_a[31:0] << 26) ^ (fu_data_i.operand_a[31:0] >> 11 | fu_data_i.operand_a[31:0] << 21) ^ (fu_data_i.operand_a[31:0] >> 25 | fu_data_i.operand_a[31:0] << 7); + if (CVA6Cfg.IS_XLEN32) begin + assign sbox_in = fu_data_i.operand_b >> {orig_instr_aes[5:4], 3'b000}; + // AES 32-bit final round encryption by applying rotations and the forward sbox to a single byte of rs2 based on the MSB byte of the instruction itself + assign aes32esi_gen = (fu_data_i.operand_a ^ ({24'b0, aes_sbox_fwd( + sbox_in[7:0] + )} << {orig_instr_aes[5:4], 3'b000}) | ({24'b0, aes_sbox_fwd( + sbox_in[7:0] + )} >> (32 - {orig_instr_aes[5:4], 3'b000}))); + // AES 32-bit middle round encryption by applying rotations, forward mix-columns and the forward sbox to a single byte of rs2 based on the MSB byte of the instruction itself + assign aes32esmi_gen = fu_data_i.operand_a ^ ((aes_mixcolumn_fwd( + {24'h000000, aes_sbox_fwd(sbox_in[7:0])} + ) << {orig_instr_aes[5:4], 3'b000}) | (aes_mixcolumn_fwd( + {24'h000000, aes_sbox_fwd(sbox_in[7:0])} + ) >> (32 - {orig_instr_aes[5:4], 3'b000}))); + // AES 32-bit final round decryption by applying rotations and the inverse sbox to a single byte of rs2 based on the MSB byte of the instruction itself + assign aes32dsi_gen = (fu_data_i.operand_a ^ ({24'b0, aes_sbox_inv( + sbox_in[7:0] + )} << {orig_instr_aes[5:4], 3'b000}) | ({24'b0, aes_sbox_inv( + sbox_in[7:0] + )} >> (32 - {orig_instr_aes[5:4], 3'b000}))); + // AES 32-bit middle round decryption by applying rotations, inverse mix-columns and the inverse sbox to a single byte of rs2 based on the MSB byte of the instruction itself + assign aes32dsmi_gen = fu_data_i.operand_a ^ ((aes_mixcolumn_inv( + {24'h000000, aes_sbox_inv(sbox_in[7:0])} + ) << {orig_instr_aes[5:4], 3'b000}) | (aes_mixcolumn_inv( + {24'h000000, aes_sbox_inv(sbox_in[7:0])} + ) >> (32 - {orig_instr_aes[5:4], 3'b000}))); + // SHA512 32-bit shifting and XORing rs1 and rs2 + assign sha512sig0h_gen = (fu_data_i.operand_a >> 1) ^ (fu_data_i.operand_a >> 7) ^ (fu_data_i.operand_a >> 8) ^ (fu_data_i.operand_b << 31) ^ (fu_data_i.operand_b << 24); + assign sha512sig0l_gen = (fu_data_i.operand_a >> 1) ^ (fu_data_i.operand_a >> 7) ^ (fu_data_i.operand_a >> 8) ^ (fu_data_i.operand_b << 31) ^ (fu_data_i.operand_b << 25) ^ (fu_data_i.operand_b << 24); + assign sha512sig1h_gen = (fu_data_i.operand_a << 3) ^ (fu_data_i.operand_a >> 6) ^ (fu_data_i.operand_a >> 19) ^ (fu_data_i.operand_b >> 29) ^ (fu_data_i.operand_b << 13); + assign sha512sig1l_gen = (fu_data_i.operand_a << 3) ^ (fu_data_i.operand_a >> 6) ^ (fu_data_i.operand_a >> 19) ^ (fu_data_i.operand_b >> 29) ^ (fu_data_i.operand_b << 26) ^ (fu_data_i.operand_b << 13); + assign sha512sum0r_gen = (fu_data_i.operand_a << 25) ^ (fu_data_i.operand_a << 30) ^ (fu_data_i.operand_a >> 28) ^ (fu_data_i.operand_b >> 7) ^ (fu_data_i.operand_b >> 2) ^ (fu_data_i.operand_b << 4); + assign sha512sum1r_gen = (fu_data_i.operand_a << 23) ^ (fu_data_i.operand_a >> 14) ^ (fu_data_i.operand_a >> 18) ^ (fu_data_i.operand_b >> 9) ^ (fu_data_i.operand_b << 18) ^ (fu_data_i.operand_b << 14); + end else if (CVA6Cfg.IS_XLEN64) begin + // AES Shift rows forward and inverse step + assign sr = { + fu_data_i.operand_a[31:24], + fu_data_i.operand_b[55:48], + fu_data_i.operand_b[15:8], + fu_data_i.operand_a[39:32], + fu_data_i.operand_b[63:56], + fu_data_i.operand_b[23:16], + fu_data_i.operand_a[47:40], + fu_data_i.operand_a[7:0] + }; + assign sr_inv = { + fu_data_i.operand_b[31:24], + fu_data_i.operand_b[55:48], + fu_data_i.operand_a[15:8], + fu_data_i.operand_a[39:32], + fu_data_i.operand_a[63:56], + fu_data_i.operand_b[23:16], + fu_data_i.operand_b[47:40], + fu_data_i.operand_a[7:0] + }; + // AES 64-bit final round encryption by applying forward shift-rows and the forward sbox to each byte + assign aes64es_gen = { + aes_sbox_fwd(sr[63:56]), + aes_sbox_fwd(sr[55:48]), + aes_sbox_fwd(sr[47:40]), + aes_sbox_fwd(sr[39:32]), + aes_sbox_fwd(sr[31:24]), + aes_sbox_fwd(sr[23:16]), + aes_sbox_fwd(sr[15:8]), + aes_sbox_fwd(sr[7:0]) + }; + // AES 64-bit middle round encryption by applying forward shift-rows, forward sbox and forward mix-columns to all bytes + assign aes64esm_gen = { + aes_mixcolumn_fwd(aes64es_gen[63:32]), aes_mixcolumn_fwd(aes64es_gen[31:0]) + }; + // AES 64-bit final round decryption by applying inverse shift-rows and the inverse sbox to each byte + assign aes64ds_gen = { + aes_sbox_inv(sr_inv[63:56]), + aes_sbox_inv(sr_inv[55:48]), + aes_sbox_inv(sr_inv[47:40]), + aes_sbox_inv(sr_inv[39:32]), + aes_sbox_inv(sr_inv[31:24]), + aes_sbox_inv(sr_inv[23:16]), + aes_sbox_inv(sr_inv[15:8]), + aes_sbox_inv(sr_inv[7:0]) + }; + // AES 64-bit middle round decryption by applying inverse shift-rows, inverse sbox and inverse mix-columns to all bytes + assign aes64dsm_gen = { + aes_mixcolumn_inv(aes64ds_gen[63:32]), aes_mixcolumn_inv(aes64ds_gen[31:0]) + }; + // AES 64-bit keySchedule decryption by applying inverse mix-columns on rs1 + assign aes64im_gen = { + aes_mixcolumn_inv(fu_data_i.operand_a[63:32]), aes_mixcolumn_inv(fu_data_i.operand_a[31:0]) + }; + // AES Key Schedule part by XORing different slices of rs1 and rs2 + assign aes64ks2_gen = { + (fu_data_i.operand_a[63:32] ^ fu_data_i.operand_b[31:0] ^ fu_data_i.operand_b[63:32]), + (fu_data_i.operand_a[63:32] ^ fu_data_i.operand_b[31:0]) + }; + // AES Key Schedule part by substituting round constant based on round number(from instruction), rotations and forward subword substitutions + assign aes64ks1i_gen = (orig_instr_aes[3:0] <= 4'hA) ? {((aes_subword_fwd( + (orig_instr_aes[3:0] == 4'hA) ? fu_data_i.operand_a[63:32] : ((fu_data_i.operand_a[63:32] >> 8) | (fu_data_i.operand_a[63:32] << 24)) + )) ^ (aes_decode_rcon( + orig_instr_aes[3:0] + ))), ((aes_subword_fwd( + (orig_instr_aes[3:0] == 4'hA) ? fu_data_i.operand_a[63:32] : ((fu_data_i.operand_a[63:32] >> 8) | (fu_data_i.operand_a[63:32] << 24)) + )) ^ (aes_decode_rcon( + orig_instr_aes[3:0] + )))} : 64'h0; + // SHA512 64bit rotating, shifting and XORing rs1 + assign sha512sig0_gen = (fu_data_i.operand_a >> 1 | fu_data_i.operand_a << 63) ^ (fu_data_i.operand_a >> 8 | fu_data_i.operand_a << 56) ^ (fu_data_i.operand_a >> 7); + assign sha512sig1_gen = (fu_data_i.operand_a >> 19 | fu_data_i.operand_a << 45) ^ (fu_data_i.operand_a >> 61 | fu_data_i.operand_a << 3) ^ (fu_data_i.operand_a >> 6); + assign sha512sum0_gen = (fu_data_i.operand_a >> 28 | fu_data_i.operand_a << 36) ^ (fu_data_i.operand_a >> 34 | fu_data_i.operand_a << 30) ^ (fu_data_i.operand_a >> 39 | fu_data_i.operand_a << 25); + assign sha512sum1_gen = (fu_data_i.operand_a >> 14 | fu_data_i.operand_a << 50) ^ (fu_data_i.operand_a >> 18 | fu_data_i.operand_a << 46) ^ (fu_data_i.operand_a >> 41 | fu_data_i.operand_a << 23); + end + end + + // ----------- + // Result MUX + // ----------- + always_comb begin + result_o = '0; + // AES instructions + if (CVA6Cfg.ZKN && CVA6Cfg.RVB) begin + if (CVA6Cfg.IS_XLEN32) begin + unique case (fu_data_i.operation) + AES32ESI: result_o = aes32esi_gen; + AES32ESMI: result_o = aes32esmi_gen; + AES32DSI: result_o = aes32dsi_gen; + AES32DSMI: result_o = aes32dsmi_gen; + SHA256SIG0: result_o = sha256sig0_gen; + SHA256SIG1: result_o = sha256sig1_gen; + SHA256SUM0: result_o = sha256sum0_gen; + SHA256SUM1: result_o = sha256sum1_gen; + SHA512SIG0H: result_o = sha512sig0h_gen; + SHA512SIG0L: result_o = sha512sig0l_gen; + SHA512SIG1H: result_o = sha512sig1h_gen; + SHA512SIG1L: result_o = sha512sig1l_gen; + SHA512SUM0R: result_o = sha512sum0r_gen; + SHA512SUM1R: result_o = sha512sum1r_gen; + default: ; + endcase + end + if (CVA6Cfg.IS_XLEN64) begin + unique case (fu_data_i.operation) + AES64ES: result_o = aes64es_gen; + AES64ESM: result_o = aes64esm_gen; + AES64DS: result_o = aes64ds_gen; + AES64DSM: result_o = aes64dsm_gen; + AES64IM: result_o = aes64im_gen; + AES64KS1I: result_o = aes64ks1i_gen; + AES64KS2: result_o = aes64ks2_gen; + SHA256SIG0: result_o = {{32{sha256sig0_gen[31]}}, sha256sig0_gen}; + SHA256SIG1: result_o = {{32{sha256sig1_gen[31]}}, sha256sig1_gen}; + SHA256SUM0: result_o = {{32{sha256sum0_gen[31]}}, sha256sum0_gen}; + SHA256SUM1: result_o = {{32{sha256sum1_gen[31]}}, sha256sum1_gen}; + SHA512SIG0: result_o = sha512sig0_gen; + SHA512SIG1: result_o = sha512sig1_gen; + SHA512SUM0: result_o = sha512sum0_gen; + SHA512SUM1: result_o = sha512sum1_gen; + default: ; + endcase + end + end + end +endmodule diff --git a/core/alu.sv b/core/alu.sv index 9f69f6ef93f..2a83c8c4a03 100644 --- a/core/alu.sv +++ b/core/alu.sv @@ -31,14 +31,18 @@ module alu input logic rst_ni, // FU data needed to execute instruction - ISSUE_STAGE input fu_data_t fu_data_i, + // FU data needed to execute CPOP/CPOPW - ISSUE_STAGE + input fu_data_t fu_data_cpop_i, // ALU result - ISSUE_STAGE output logic [CVA6Cfg.XLEN-1:0] result_o, // ALU branch compare result - branch_unit output logic alu_branch_res_o ); + logic [CVA6Cfg.XLEN-1:0] operand_a; logic [CVA6Cfg.XLEN-1:0] operand_a_rev; logic [ 31:0] operand_a_rev32; + logic [CVA6Cfg.XLEN-1:0] operand_b; logic [ CVA6Cfg.XLEN:0] operand_b_neg; logic [CVA6Cfg.XLEN+1:0] adder_result_ext_o; logic less; // handles both signed and unsigned forms @@ -54,13 +58,18 @@ module alu logic [CVA6Cfg.XLEN-1:0] brev8_reversed; logic [ 31:0] unzip_gen; logic [ 31:0] zip_gen; + logic [CVA6Cfg.XLEN-1:0] xperm8_result; + logic [CVA6Cfg.XLEN-1:0] xperm4_result; + + assign operand_a = fu_data_i.operand_a; + assign operand_b = fu_data_i.operand_b; + // bit reverse operand_a for left shifts and bit counting generate genvar k; - for (k = 0; k < CVA6Cfg.XLEN; k++) - assign operand_a_rev[k] = fu_data_i.operand_a[CVA6Cfg.XLEN-1-k]; + for (k = 0; k < CVA6Cfg.XLEN; k++) assign operand_a_rev[k] = operand_a[CVA6Cfg.XLEN-1-k]; - for (k = 0; k < 32; k++) assign operand_a_rev32[k] = fu_data_i.operand_a[31-k]; + for (k = 0; k < 32; k++) assign operand_a_rev32[k] = operand_a[31-k]; endgenerate // ------ @@ -71,27 +80,30 @@ module alu logic [CVA6Cfg.XLEN:0] adder_in_a, adder_in_b; logic [CVA6Cfg.XLEN-1:0] adder_result; logic [CVA6Cfg.XLEN-1:0] operand_a_bitmanip, bit_indx; + logic [CVA6Cfg.XLEN-1:0] operand_a_cpop; assign adder_op_b_negate = fu_data_i.operation inside {EQ, NE, SUB, SUBW, ANDN, ORN, XNOR}; always_comb begin - operand_a_bitmanip = fu_data_i.operand_a; + operand_a_bitmanip = operand_a; + operand_a_cpop = fu_data_cpop_i.operand_a; if (CVA6Cfg.RVB) begin if (CVA6Cfg.IS_XLEN64) begin unique case (fu_data_i.operation) - SH1ADDUW: operand_a_bitmanip = fu_data_i.operand_a[31:0] << 1; - SH2ADDUW: operand_a_bitmanip = fu_data_i.operand_a[31:0] << 2; - SH3ADDUW: operand_a_bitmanip = fu_data_i.operand_a[31:0] << 3; - CTZW: operand_a_bitmanip = operand_a_rev32; - ADDUW, CPOPW, CLZW: operand_a_bitmanip = fu_data_i.operand_a[31:0]; - default: ; + SH1ADDUW: operand_a_bitmanip = operand_a[31:0] << 1; + SH2ADDUW: operand_a_bitmanip = operand_a[31:0] << 2; + SH3ADDUW: operand_a_bitmanip = operand_a[31:0] << 3; + CTZW: operand_a_bitmanip = operand_a_rev32; + ADDUW, CLZW: operand_a_bitmanip = operand_a[31:0]; + CPOPW: operand_a_cpop = fu_data_cpop_i.operand_a[31:0]; + default: ; endcase end unique case (fu_data_i.operation) - SH1ADD: operand_a_bitmanip = fu_data_i.operand_a << 1; - SH2ADD: operand_a_bitmanip = fu_data_i.operand_a << 2; - SH3ADD: operand_a_bitmanip = fu_data_i.operand_a << 3; + SH1ADD: operand_a_bitmanip = operand_a << 1; + SH2ADD: operand_a_bitmanip = operand_a << 2; + SH3ADD: operand_a_bitmanip = operand_a << 3; CTZ: operand_a_bitmanip = operand_a_rev; default: ; endcase @@ -102,7 +114,7 @@ module alu assign adder_in_a = {operand_a_bitmanip, 1'b1}; // prepare operand b - assign operand_b_neg = {fu_data_i.operand_b, 1'b0} ^ {CVA6Cfg.XLEN + 1{adder_op_b_negate}}; + assign operand_b_neg = {operand_b, 1'b0} ^ {CVA6Cfg.XLEN + 1{adder_op_b_negate}}; assign adder_in_b = operand_b_neg; // actual adder @@ -147,7 +159,7 @@ module alu logic [CVA6Cfg.XLEN-1:0] shift_left_result; logic [ 31:0] shift_left_result32; - assign shift_amt = fu_data_i.operand_b; + assign shift_amt = operand_b; assign shift_left = (fu_data_i.operation == SLL) | (CVA6Cfg.IS_XLEN64 && fu_data_i.operation == SLLW); @@ -158,8 +170,8 @@ module alu logic [32:0] shift_op_a_32; // choose the bit reversed or the normal input for shift operand a - assign shift_op_a = shift_left ? operand_a_rev : fu_data_i.operand_a; - assign shift_op_a32 = shift_left ? operand_a_rev32 : fu_data_i.operand_a[31:0]; + assign shift_op_a = shift_left ? operand_a_rev : operand_a; + assign shift_op_a32 = shift_left ? operand_a_rev32 : operand_a[31:0]; assign shift_op_a_64 = {shift_arithmetic & shift_op_a[CVA6Cfg.XLEN-1], shift_op_a}; assign shift_op_a_32 = {shift_arithmetic & shift_op_a[31], shift_op_a32}; @@ -195,8 +207,8 @@ module alu (fu_data_i.operation == MIN)) sgn = 1'b1; - less = ($signed({sgn & fu_data_i.operand_a[CVA6Cfg.XLEN-1], fu_data_i.operand_a}) < - $signed({sgn & fu_data_i.operand_b[CVA6Cfg.XLEN-1], fu_data_i.operand_b})); + less = ($signed({sgn & operand_a[CVA6Cfg.XLEN-1], operand_a}) < + $signed({sgn & operand_b[CVA6Cfg.XLEN-1], operand_b})); end if (CVA6Cfg.RVB) begin : gen_bitmanip @@ -205,7 +217,7 @@ module alu popcount #( .INPUT_WIDTH(CVA6Cfg.XLEN) ) i_cpop_count ( - .data_i (operand_a_bitmanip), + .data_i (operand_a_cpop), .popcount_o(cpop) ); @@ -234,31 +246,19 @@ module alu if (CVA6Cfg.RVB) begin : gen_orcbw_rev8w_results assign orcbw = { - {8{|fu_data_i.operand_a[31:24]}}, - {8{|fu_data_i.operand_a[23:16]}}, - {8{|fu_data_i.operand_a[15:8]}}, - {8{|fu_data_i.operand_a[7:0]}} - }; - assign rev8w = { - {fu_data_i.operand_a[7:0]}, - {fu_data_i.operand_a[15:8]}, - {fu_data_i.operand_a[23:16]}, - {fu_data_i.operand_a[31:24]} + {8{|operand_a[31:24]}}, {8{|operand_a[23:16]}}, {8{|operand_a[15:8]}}, {8{|operand_a[7:0]}} }; + assign rev8w = {{operand_a[7:0]}, {operand_a[15:8]}, {operand_a[23:16]}, {operand_a[31:24]}}; if (CVA6Cfg.IS_XLEN64) begin : gen_64b assign orcbw_result = { - {8{|fu_data_i.operand_a[63:56]}}, - {8{|fu_data_i.operand_a[55:48]}}, - {8{|fu_data_i.operand_a[47:40]}}, - {8{|fu_data_i.operand_a[39:32]}}, + {8{|operand_a[63:56]}}, + {8{|operand_a[55:48]}}, + {8{|operand_a[47:40]}}, + {8{|operand_a[39:32]}}, orcbw }; assign rev8w_result = { - rev8w, - {fu_data_i.operand_a[39:32]}, - {fu_data_i.operand_a[47:40]}, - {fu_data_i.operand_a[55:48]}, - {fu_data_i.operand_a[63:56]} + rev8w, {operand_a[39:32]}, {operand_a[47:40]}, {operand_a[55:48]}, {operand_a[63:56]} }; end else begin : gen_32b assign orcbw_result = orcbw; @@ -268,23 +268,29 @@ module alu // ZKN gen block if (CVA6Cfg.ZKN && CVA6Cfg.RVB) begin : zkn_gen_block - genvar i, m, n; - // Generate brev8_reversed by reversing bits within each byte - for (i = 0; i < (CVA6Cfg.XLEN / 8); i++) begin : brev8_gen + genvar i, m, n, q; + for (i = 0; i < (CVA6Cfg.XLEN / 8); i++) begin : brev8_xperm8_gen + // Generating xperm8_result by extracting bytes from operand a based on indices from operand b + assign xperm8_result[i << 3 +: 8] = (operand_b[i << 3 +: 8] < (CVA6Cfg.XLEN / 8)) ? operand_a[operand_b[i << 3 +: 8] << 3 +: 8] : 8'b0; + // Generate brev8_reversed by reversing bits within each byte for (m = 0; m < 8; m++) begin : reverse_bits // Reversing the order of bits within a single byte - assign brev8_reversed[(i<<3)+m] = fu_data_i.operand_a[(i<<3)+(7-m)]; + assign brev8_reversed[(i<<3)+m] = operand_a[(i<<3)+(7-m)]; end end - // Generate zip and unzip results + for (q = 0; q < (CVA6Cfg.XLEN / 4); q++) begin : xperm4_gen + // Generating xperm4_result by extracting nibbles from operand a based on indices from operand b + assign xperm4_result[q << 2 +: 4] = (operand_b[q << 2 +: 4] < (CVA6Cfg.XLEN / 4)) ? operand_a[{2'b0, operand_b[q << 2 +: 4]} << 2 +: 4] : 4'b0; + end if (CVA6Cfg.IS_XLEN32) begin + // Generate zip and unzip results for (n = 0; n < 16; n++) begin : zip_unzip_gen // Assigning lower and upper half of operand into the even and odd positions of result - assign zip_gen[n<<1] = fu_data_i.operand_a[n]; - assign zip_gen[(n<<1)+1] = fu_data_i.operand_a[n+16]; + assign zip_gen[n<<1] = operand_a[n]; + assign zip_gen[(n<<1)+1] = operand_a[n+16]; // Assigning even and odd bits of operand into lower and upper halves of result - assign unzip_gen[n] = fu_data_i.operand_a[n<<1]; - assign unzip_gen[n+16] = fu_data_i.operand_a[(n<<1)+1]; + assign unzip_gen[n] = operand_a[n<<1]; + assign unzip_gen[n+16] = operand_a[(n<<1)+1]; end end end @@ -307,13 +313,13 @@ module alu end unique case (fu_data_i.operation) // Standard Operations - ANDL, ANDN: result_o = fu_data_i.operand_a & operand_b_neg[CVA6Cfg.XLEN:1]; - ORL, ORN: result_o = fu_data_i.operand_a | operand_b_neg[CVA6Cfg.XLEN:1]; - XORL, XNOR: result_o = fu_data_i.operand_a ^ operand_b_neg[CVA6Cfg.XLEN:1]; + ANDL, ANDN: result_o = operand_a & operand_b_neg[CVA6Cfg.XLEN:1]; + ORL, ORN: result_o = operand_a | operand_b_neg[CVA6Cfg.XLEN:1]; + XORL, XNOR: result_o = operand_a ^ operand_b_neg[CVA6Cfg.XLEN:1]; // Adder Operations ADD, SUB, ADDUW, SH1ADD, SH2ADD, SH3ADD: result_o = adder_result; // Shift Operations - SLL, SRL, SRA: result_o = (CVA6Cfg.IS_XLEN64) ? shift_result : shift_result32; + SLL, SRL, SRA: result_o = CVA6Cfg.IS_XLEN64 ? shift_result : shift_result32; // Comparison Operations SLTS, SLTU: result_o = {{CVA6Cfg.XLEN - 1{1'b0}}, less}; default: ; // default case to suppress unique warning @@ -321,11 +327,11 @@ module alu if (CVA6Cfg.RVB) begin // Index for Bitwise Rotation - bit_indx = 1 << (fu_data_i.operand_b & (CVA6Cfg.XLEN - 1)); + bit_indx = 1 << (operand_b & (CVA6Cfg.XLEN - 1)); if (CVA6Cfg.IS_XLEN64) begin // rolw, roriw, rorw - rolw = ({{CVA6Cfg.XLEN-32{1'b0}},fu_data_i.operand_a[31:0]} << fu_data_i.operand_b[4:0]) | ({{CVA6Cfg.XLEN-32{1'b0}},fu_data_i.operand_a[31:0]} >> (CVA6Cfg.XLEN-32-fu_data_i.operand_b[4:0])); - rorw = ({{CVA6Cfg.XLEN-32{1'b0}},fu_data_i.operand_a[31:0]} >> fu_data_i.operand_b[4:0]) | ({{CVA6Cfg.XLEN-32{1'b0}},fu_data_i.operand_a[31:0]} << (CVA6Cfg.XLEN-32-fu_data_i.operand_b[4:0])); + rolw = ({{CVA6Cfg.XLEN-32{1'b0}},operand_a[31:0]} << operand_b[4:0]) | ({{CVA6Cfg.XLEN-32{1'b0}},operand_a[31:0]} >> (CVA6Cfg.XLEN-32-operand_b[4:0])); + rorw = ({{CVA6Cfg.XLEN-32{1'b0}},operand_a[31:0]} >> operand_b[4:0]) | ({{CVA6Cfg.XLEN-32{1'b0}},operand_a[31:0]} << (CVA6Cfg.XLEN-32-operand_b[4:0])); unique case (fu_data_i.operation) CLZW, CTZW: result_o = (lz_tz_wempty) ? 32 : {{CVA6Cfg.XLEN - 5{1'b0}}, lz_tz_wcount}; // change @@ -336,16 +342,16 @@ module alu end unique case (fu_data_i.operation) // Integer minimum/maximum - MAX: result_o = less ? fu_data_i.operand_b : fu_data_i.operand_a; - MAXU: result_o = less ? fu_data_i.operand_b : fu_data_i.operand_a; - MIN: result_o = ~less ? fu_data_i.operand_b : fu_data_i.operand_a; - MINU: result_o = ~less ? fu_data_i.operand_b : fu_data_i.operand_a; + MAX: result_o = less ? operand_b : operand_a; + MAXU: result_o = less ? operand_b : operand_a; + MIN: result_o = ~less ? operand_b : operand_a; + MINU: result_o = ~less ? operand_b : operand_a; // Single bit instructions operations - BCLR, BCLRI: result_o = fu_data_i.operand_a & ~bit_indx; - BEXT, BEXTI: result_o = {{CVA6Cfg.XLEN - 1{1'b0}}, |(fu_data_i.operand_a & bit_indx)}; - BINV, BINVI: result_o = fu_data_i.operand_a ^ bit_indx; - BSET, BSETI: result_o = fu_data_i.operand_a | bit_indx; + BCLR, BCLRI: result_o = operand_a & ~bit_indx; + BEXT, BEXTI: result_o = {{CVA6Cfg.XLEN - 1{1'b0}}, |(operand_a & bit_indx)}; + BINV, BINVI: result_o = operand_a ^ bit_indx; + BSET, BSETI: result_o = operand_a | bit_indx; // Count Leading/Trailing Zeros CLZ, CTZ: @@ -356,31 +362,31 @@ module alu CPOP, CPOPW: result_o = {{(CVA6Cfg.XLEN - ($clog2(CVA6Cfg.XLEN) + 1)) {1'b0}}, cpop}; // Sign and Zero Extend - SEXTB: result_o = {{CVA6Cfg.XLEN - 8{fu_data_i.operand_a[7]}}, fu_data_i.operand_a[7:0]}; - SEXTH: result_o = {{CVA6Cfg.XLEN - 16{fu_data_i.operand_a[15]}}, fu_data_i.operand_a[15:0]}; - ZEXTH: result_o = {{CVA6Cfg.XLEN - 16{1'b0}}, fu_data_i.operand_a[15:0]}; + SEXTB: result_o = {{CVA6Cfg.XLEN - 8{operand_a[7]}}, operand_a[7:0]}; + SEXTH: result_o = {{CVA6Cfg.XLEN - 16{operand_a[15]}}, operand_a[15:0]}; + ZEXTH: result_o = {{CVA6Cfg.XLEN - 16{1'b0}}, operand_a[15:0]}; // Bitwise Rotation ROL: - result_o = (CVA6Cfg.IS_XLEN64) ? ((fu_data_i.operand_a << fu_data_i.operand_b[5:0]) | (fu_data_i.operand_a >> (CVA6Cfg.XLEN-fu_data_i.operand_b[5:0]))) : ((fu_data_i.operand_a << fu_data_i.operand_b[4:0]) | (fu_data_i.operand_a >> (CVA6Cfg.XLEN-fu_data_i.operand_b[4:0]))); + result_o = CVA6Cfg.IS_XLEN64 ? ((operand_a << operand_b[5:0]) | (operand_a >> (CVA6Cfg.XLEN-operand_b[5:0]))) : ((operand_a << operand_b[4:0]) | (operand_a >> (CVA6Cfg.XLEN-operand_b[4:0]))); ROR, RORI: - result_o = (CVA6Cfg.IS_XLEN64) ? ((fu_data_i.operand_a >> fu_data_i.operand_b[5:0]) | (fu_data_i.operand_a << (CVA6Cfg.XLEN-fu_data_i.operand_b[5:0]))) : ((fu_data_i.operand_a >> fu_data_i.operand_b[4:0]) | (fu_data_i.operand_a << (CVA6Cfg.XLEN-fu_data_i.operand_b[4:0]))); + result_o = CVA6Cfg.IS_XLEN64 ? ((operand_a >> operand_b[5:0]) | (operand_a << (CVA6Cfg.XLEN-operand_b[5:0]))) : ((operand_a >> operand_b[4:0]) | (operand_a << (CVA6Cfg.XLEN-operand_b[4:0]))); ORCB: result_o = orcbw_result; REV8: result_o = rev8w_result; default: if (fu_data_i.operation == SLLIUW && CVA6Cfg.IS_XLEN64) - result_o = {{CVA6Cfg.XLEN-32{1'b0}}, fu_data_i.operand_a[31:0]} << fu_data_i.operand_b[5:0]; // Left Shift 32 bit unsigned + result_o = {{CVA6Cfg.XLEN-32{1'b0}}, operand_a[31:0]} << operand_b[5:0]; // Left Shift 32 bit unsigned endcase end if (CVA6Cfg.RVZiCond) begin unique case (fu_data_i.operation) CZERO_EQZ: - result_o = (|fu_data_i.operand_b) ? fu_data_i.operand_a : '0; // move zero to rd if rs2 is equal to zero else rs1 + result_o = (|operand_b) ? operand_a : '0; // move zero to rd if rs2 is equal to zero else rs1 CZERO_NEZ: - result_o = (|fu_data_i.operand_b) ? '0 : fu_data_i.operand_a; // move zero to rd if rs2 is nonzero else rs1 + result_o = (|operand_b) ? '0 : operand_a; // move zero to rd if rs2 is nonzero else rs1 default: ; // default case to suppress unique warning endcase end @@ -388,18 +394,20 @@ module alu if (CVA6Cfg.ZKN && CVA6Cfg.RVB) begin unique case (fu_data_i.operation) PACK: - result_o = (CVA6Cfg.IS_XLEN32) ? ({fu_data_i.operand_b[15:0], fu_data_i.operand_a[15:0]}) : ({fu_data_i.operand_b[31:0], fu_data_i.operand_a[31:0]}); + result_o = CVA6Cfg.IS_XLEN32 ? ({operand_b[15:0], operand_a[15:0]}) : ({operand_b[31:0], operand_a[31:0]}); PACK_H: - result_o = (CVA6Cfg.IS_XLEN32) ? ({16'b0, fu_data_i.operand_b[7:0], fu_data_i.operand_a[7:0]}) : ({48'b0, fu_data_i.operand_b[7:0], fu_data_i.operand_a[7:0]}); + result_o = CVA6Cfg.IS_XLEN32 ? ({16'b0, operand_b[7:0], operand_a[7:0]}) : ({48'b0, operand_b[7:0], operand_a[7:0]}); BREV8: result_o = brev8_reversed; + XPERM8: result_o = xperm8_result; + XPERM4: result_o = xperm4_result; default: ; endcase if (fu_data_i.operation == PACK_W && CVA6Cfg.IS_XLEN64) - result_o = { - {32{fu_data_i.operand_b[15]}}, {fu_data_i.operand_b[15:0]}, {fu_data_i.operand_a[15:0]} - }; - if (fu_data_i.operation == UNZIP && CVA6Cfg.IS_XLEN32) result_o = unzip_gen; - if (fu_data_i.operation == ZIP && CVA6Cfg.IS_XLEN32) result_o = zip_gen; + result_o = {{32{operand_b[15]}}, {operand_b[15:0]}, {operand_a[15:0]}}; + if (CVA6Cfg.IS_XLEN32) begin + if (fu_data_i.operation == UNZIP) result_o = unzip_gen; + if (fu_data_i.operation == ZIP) result_o = zip_gen; + end end end endmodule diff --git a/core/alu_wrapper.sv b/core/alu_wrapper.sv new file mode 100644 index 00000000000..461b7d0898e --- /dev/null +++ b/core/alu_wrapper.sv @@ -0,0 +1,71 @@ +// Copyright 2025 ETH Zurich and University of Bologna. +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. +// +// Original authors: Gianmarco Ottavi, University of Bologna +// Riccardo Tedeschi, University of Bologna +// Description: ALU(s) wrapper + +module alu_wrapper + import ariane_pkg::*; +#( + parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty, + parameter type fu_data_t = logic +) ( + input logic clk_i, + input logic rst_ni, + input alu_bypass_t alu_bypass_i, + input fu_data_t [CVA6Cfg.NrALUs-1:0] fu_data_i, + output logic [CVA6Cfg.NrALUs-1:0][CVA6Cfg.XLEN-1:0] result_o, + output logic alu_branch_res_o +); + + alu #( + .CVA6Cfg (CVA6Cfg), + .HasBranch(1'b1), + .fu_data_t(fu_data_t) + ) alu_i ( + .clk_i (clk_i), + .rst_ni (rst_ni), + .fu_data_i (fu_data_i[0]), + .fu_data_cpop_i (fu_data_i[0]), + .result_o (result_o[0]), + .alu_branch_res_o(alu_branch_res_o) + ); + + if (CVA6Cfg.SuperscalarEn) begin : gen_alu2 + + fu_data_t fu_data_bypass; + + always_comb begin + fu_data_bypass = fu_data_i[1]; + + if (alu_bypass_i.rs1_from_rd) begin + fu_data_bypass.operand_a = result_o[0]; + end + if (alu_bypass_i.rs2_from_rd) begin + fu_data_bypass.operand_b = result_o[0]; + end + end + + alu #( + .CVA6Cfg (CVA6Cfg), + .HasBranch(1'b0), + .fu_data_t(fu_data_t) + ) alu2_i ( + .clk_i (clk_i), + .rst_ni (rst_ni), + .fu_data_i (fu_data_bypass), + .fu_data_cpop_i (fu_data_i[1]), + .result_o (result_o[1]), + .alu_branch_res_o( /* Unconnected */) + ); + end + +endmodule diff --git a/core/amo_buffer.sv b/core/amo_buffer.sv index 8aca2a13eb0..d489dde5017 100644 --- a/core/amo_buffer.sv +++ b/core/amo_buffer.sv @@ -11,7 +11,7 @@ // Author: Florian Zaruba, ETH Zurich // Date: 20.09.2018 // Description: Buffers AMO requests -// This unit buffers an atomic memory operations for the cache subsyste. +// This unit buffers an atomic memory operation for the cache subsystem. // Furthermore it handles interfacing with the commit stage module amo_buffer #( @@ -28,10 +28,10 @@ module amo_buffer #( input logic [CVA6Cfg.XLEN-1:0] data_i, // data which is placed in the queue input logic [1:0] data_size_i, // type of request we are making (e.g.: bytes to write) // D$ - output ariane_pkg::amo_req_t amo_req_o, // request to cache subsytem + output ariane_pkg::amo_req_t amo_req_o, // request to cache subsystem input ariane_pkg::amo_resp_t amo_resp_i, // response from cache subsystem // Auxiliary signals - input logic amo_valid_commit_i, // We have a vaild AMO in the commit stage + input logic amo_valid_commit_i, // We have a valid AMO in the commit stage input logic no_st_pending_i // there is currently no store pending anymore ); logic flush_amo_buffer; diff --git a/core/ariane_regfile.sv b/core/ariane_regfile.sv deleted file mode 100644 index 653b7ede4e7..00000000000 --- a/core/ariane_regfile.sv +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2018 ETH Zurich and University of Bologna. -// Copyright and related rights are licensed under the Solderpad Hardware -// License, Version 0.51 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law -// or agreed to in writing, software, hardware and materials distributed under -// this 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. -// -// Author: Antonio Pullini - pullinia@iis.ee.ethz.ch -// -// Additional contributions by: -// Sven Stucki - svstucki@student.ethz.ch -// Markus Wegmann - markus.wegmann@technokrat.ch -// -// Design Name: RISC-V register file -// Project Name: zero-riscy -// Language: SystemVerilog -// -// Description: Register file with 31 or 15x 32 bit wide registers. -// Register 0 is fixed to 0. This register file is based on -// latches and is thus smaller than the flip-flop based RF. -// - -module ariane_regfile_lol #( - parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty, - parameter int unsigned DATA_WIDTH = 32, - parameter int unsigned NR_READ_PORTS = 2, - parameter bit ZERO_REG_ZERO = 0 -) ( - // clock and reset - input logic clk_i, - input logic rst_ni, - // disable clock gates for testing - input logic test_en_i, - // read port - input logic [ NR_READ_PORTS-1:0][ 4:0] raddr_i, - output logic [ NR_READ_PORTS-1:0][DATA_WIDTH-1:0] rdata_o, - // write port - input logic [CVA6Cfg.NrCommitPorts-1:0][ 4:0] waddr_i, - input logic [CVA6Cfg.NrCommitPorts-1:0][DATA_WIDTH-1:0] wdata_i, - input logic [CVA6Cfg.NrCommitPorts-1:0] we_i -); - - localparam ADDR_WIDTH = 5; - localparam NUM_WORDS = 2 ** ADDR_WIDTH; - - logic [NUM_WORDS-1:ZERO_REG_ZERO] mem_clocks; - - logic [ DATA_WIDTH-1:0] mem [NUM_WORDS]; - logic [CVA6Cfg.NrCommitPorts-1:0][NUM_WORDS-1:1] waddr_onehot, waddr_onehot_q; - logic [CVA6Cfg.NrCommitPorts-1:0][DATA_WIDTH-1:0] wdata_q; - - - // decode addresses - for (genvar i = 0; i < NR_READ_PORTS; i++) assign rdata_o[i] = mem[raddr_i[i][ADDR_WIDTH-1:0]]; - - always_ff @(posedge clk_i, negedge rst_ni) begin : sample_waddr - if (~rst_ni) begin - wdata_q <= '0; - end else begin - for (int unsigned i = 0; i < CVA6Cfg.NrCommitPorts; i++) - // enable flipflop will most probably infer clock gating - if (we_i[i]) begin - wdata_q[i] <= wdata_i[i]; - end - waddr_onehot_q <= waddr_onehot; - end - end - - // WRITE : Write Address Decoder (WAD), combinatorial process - always_comb begin : decode_write_addess - for (int unsigned i = 0; i < CVA6Cfg.NrCommitPorts; i++) begin - for (int unsigned j = 1; j < NUM_WORDS; j++) begin - if (we_i[i] && (waddr_i[i] == j)) waddr_onehot[i][j] = 1'b1; - else waddr_onehot[i][j] = 1'b0; - end - end - end - - // WRITE : Clock gating (if integrated clock-gating cells are available) - for (genvar x = ZERO_REG_ZERO; x < NUM_WORDS; x++) begin - - logic [CVA6Cfg.NrCommitPorts-1:0] waddr_ored; - - for (genvar i = 0; i < CVA6Cfg.NrCommitPorts; i++) assign waddr_ored[i] = waddr_onehot[i][x]; - - cluster_clock_gating i_cg ( - .clk_i (clk_i), - .en_i (|waddr_ored), - .test_en_i(test_en_i), - .clk_o (mem_clocks[x]) - ); - end - - // Generate M = WORDS sequential processes, each of which describes one - // word of the memory. The processes are synchronized with the clocks - // ClocksxC(i), i = 0, 1, ..., M-1 - // Use active low, i.e. transparent on low latches as storage elements - // Data is sampled on rising clock edge - - // Integer registers - always_latch begin : latch_wdata - // Note: The assignment has to be done inside this process or Modelsim complains about it - if (ZERO_REG_ZERO) mem[0] = '0; - - for (int unsigned i = 0; i < CVA6Cfg.NrCommitPorts; i++) begin - for (int unsigned k = ZERO_REG_ZERO; k < NUM_WORDS; k++) begin - if (mem_clocks[k] && waddr_onehot_q[i][k]) mem[k] = wdata_q[i]; - end - end - end -endmodule diff --git a/core/ariane_regfile_fpga.sv b/core/ariane_regfile_fpga.sv index 9169482e3a3..f12cc7b3d2b 100644 --- a/core/ariane_regfile_fpga.sv +++ b/core/ariane_regfile_fpga.sv @@ -1,5 +1,5 @@ // Copyright 2018 ETH Zurich and University of Bologna. -// Copyright 2024 - PlanV Technologies for additionnal contribution. +// Copyright 2024 - PlanV Technologies for additional contribution. // Copyright and related rights are licensed under the Solderpad Hardware // License, Version 0.51 (the "License"); you may not use this file except in // compliance with the License. You may obtain a copy of the License at @@ -23,7 +23,7 @@ // sync-write port, each with a parametrized number of async-read ports. // Read-accesses are multiplexed from the relevant block depending on which block // was last written to. For that purpose an additional array of registers is -// maintained keeping track of write acesses. +// maintained keeping track of write accesses. // module ariane_regfile_fpga #( @@ -62,7 +62,7 @@ module ariane_regfile_fpga #( logic [NR_READ_PORTS-1:0][4:0] raddr_q; logic [NR_READ_PORTS-1:0][4:0] raddr; - // write adress decoder (for block selector) + // write address decoder (for block selector) always_comb begin for (int unsigned j = 0; j < CVA6Cfg.NrCommitPorts; j++) begin for (int unsigned i = 0; i < NUM_WORDS; i++) begin diff --git a/core/branch_unit.sv b/core/branch_unit.sv index 097416756db..9c91c60dda6 100644 --- a/core/branch_unit.sv +++ b/core/branch_unit.sv @@ -100,7 +100,7 @@ module branch_unit #( end if (fu_data_i.operation == ariane_pkg::JALR // check if the address of the jump register is correct and that we actually predicted - && (branch_predict_i.cf == ariane_pkg::NoCF || target_address != branch_predict_i.predict_address)) begin + && (!branch_predict_i.valid || target_address != branch_predict_i.predict_address)) begin resolved_branch_o.is_mispredict = 1'b1; // update BTB only if this wasn't a return if (branch_predict_i.cf != ariane_pkg::Return) @@ -120,7 +120,9 @@ module branch_unit #( branch_exception_o.cause = riscv::INSTR_ADDR_MISALIGNED; branch_exception_o.valid = 1'b0; if (CVA6Cfg.TvalEn) - branch_exception_o.tval = {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{pc_i[CVA6Cfg.VLEN-1]}}, pc_i}; + branch_exception_o.tval = { + {CVA6Cfg.XLEN - CVA6Cfg.VLEN{target_address[CVA6Cfg.VLEN-1]}}, target_address + }; else branch_exception_o.tval = '0; branch_exception_o.tval2 = {CVA6Cfg.GPLEN{1'b0}}; branch_exception_o.tinst = '0; diff --git a/core/cache_subsystem/axi_adapter.sv b/core/cache_subsystem/axi_adapter.sv index 3ee65421b7d..bdaa2dc3cb1 100644 --- a/core/cache_subsystem/axi_adapter.sv +++ b/core/cache_subsystem/axi_adapter.sv @@ -250,6 +250,7 @@ module axi_adapter #( // ~> from single write WAIT_AW_READY: begin axi_req_o.aw_valid = 1'b1; + axi_req_o.aw.lock = amo_i == ariane_pkg::AMO_SC; if (axi_resp_i.aw_ready) begin gnt_o = 1'b1; diff --git a/core/cache_subsystem/cache_ctrl.sv b/core/cache_subsystem/cache_ctrl.sv index 8091e6a8235..a76c62e06bc 100644 --- a/core/cache_subsystem/cache_ctrl.sv +++ b/core/cache_subsystem/cache_ctrl.sv @@ -128,6 +128,7 @@ module cache_ctrl req_port_o.data_rvalid = 1'b0; req_port_o.data_rdata = '0; req_port_o.data_rid = mem_req_q.id; + req_port_o.data_ruser = '0; miss_req_o = '0; mshr_addr_o = '0; // Memory array communication diff --git a/core/cache_subsystem/cva6_hpdcache_if_adapter.sv b/core/cache_subsystem/cva6_hpdcache_if_adapter.sv index d9e9f233166..b111944c0b0 100644 --- a/core/cache_subsystem/cva6_hpdcache_if_adapter.sv +++ b/core/cache_subsystem/cva6_hpdcache_if_adapter.sv @@ -113,6 +113,7 @@ module cva6_hpdcache_if_adapter assign cva6_req_o.data_rvalid = hpdcache_rsp_valid_i; assign cva6_req_o.data_rdata = hpdcache_rsp_i.rdata; assign cva6_req_o.data_rid = hpdcache_rsp_i.tid; + assign cva6_req_o.data_error = hpdcache_rsp_i.error; assign cva6_req_o.data_gnt = hpdcache_req_ready_i; // Assertions @@ -145,6 +146,7 @@ module cva6_hpdcache_if_adapter flush_fsm_t flush_fsm_q, flush_fsm_d; logic forward_store, forward_amo, forward_flush; + hpdcache_pkg::hpdcache_req_op_t store_op; // DCACHE flush request // {{{ @@ -185,6 +187,23 @@ module cva6_hpdcache_if_adapter end // }}} + // CBO logic + // {{{ + always_comb begin : store_cmo_comb + store_op = hpdcache_pkg::HPDCACHE_REQ_STORE; + + if (CVA6Cfg.RVZiCbom) begin + case (cva6_req_i.cbo_op) + ariane_pkg::CBO_INVAL: store_op = hpdcache_pkg::HPDCACHE_REQ_CMO_INVAL_NLINE; + ariane_pkg::CBO_CLEAN: store_op = hpdcache_pkg::HPDCACHE_REQ_CMO_FLUSH_NLINE; + ariane_pkg::CBO_FLUSH: store_op = hpdcache_pkg::HPDCACHE_REQ_CMO_FLUSH_INVAL_NLINE; + default: ; // store - above + endcase + end + end + // }}} + + // AMO logic // {{{ always_comb begin : amo_op_comb @@ -221,7 +240,7 @@ module cva6_hpdcache_if_adapter assign amo_is_word = (cva6_amo_req_i.size == 2'b10); assign amo_is_word_hi = cva6_amo_req_i.operand_a[2]; - if (CVA6Cfg.XLEN == 64) begin : amo_data_64_gen + if (CVA6Cfg.IS_XLEN64) begin : amo_data_64_gen assign amo_data = amo_is_word ? {2{cva6_amo_req_i.operand_b[0+:32]}} : cva6_amo_req_i.operand_b; assign amo_data_be = amo_is_word_hi ? 8'hf0 : amo_is_word ? 8'h0f : 8'hff; end else begin : amo_data_32_gen @@ -250,12 +269,15 @@ module cva6_hpdcache_if_adapter assign hpdcache_req_store = '{ addr_offset: cva6_req_i.address_index, wdata: cva6_req_i.data_wdata, - op: hpdcache_pkg::HPDCACHE_REQ_STORE, + op: store_op, be: cva6_req_i.data_be, size: cva6_req_i.data_size, sid: hpdcache_req_sid_i, tid: '0, - need_rsp: 1'b0, + need_rsp: + store_op + != + hpdcache_pkg::HPDCACHE_REQ_STORE, // CMO requests need a response phys_indexed: 1'b1, addr_tag: cva6_req_i.address_tag, pma: '{ @@ -305,7 +327,8 @@ module cva6_hpdcache_if_adapter // Response forwarding // {{{ - if (CVA6Cfg.XLEN == 64) begin : amo_resp_64_gen + ariane_pkg::amo_resp_t cva6_amo_resp; + if (CVA6Cfg.IS_XLEN64) begin : amo_resp_64_gen assign amo_resp_word = amo_is_word_hi ? hpdcache_rsp_i.rdata[0][32 +: 32] : hpdcache_rsp_i.rdata[0][0 +: 32]; @@ -318,18 +341,25 @@ module cva6_hpdcache_if_adapter assign cva6_req_o.data_rid = hpdcache_rsp_i.tid; assign cva6_req_o.data_gnt = hpdcache_req_ready_i; - assign cva6_amo_resp_o.ack = hpdcache_rsp_valid_i && (hpdcache_rsp_i.tid == '1); - assign cva6_amo_resp_o.result = amo_is_word ? {{32{amo_resp_word[31]}}, amo_resp_word} - : hpdcache_rsp_i.rdata[0]; + assign cva6_amo_resp.ack = hpdcache_rsp_valid_i && (hpdcache_rsp_i.tid == '1); + assign cva6_amo_resp.result = amo_is_word ? {{32{amo_resp_word[31]}}, amo_resp_word} + : hpdcache_rsp_i.rdata[0]; // }}} always_ff @(posedge clk_i or negedge rst_ni) begin : amo_pending_ff if (!rst_ni) begin - amo_pending_q <= 1'b0; + amo_pending_q <= 1'b0; + cva6_amo_resp_o <= '0; end else begin amo_pending_q <= - ( cva6_amo_req_i.req & hpdcache_req_ready_i & ~amo_pending_q) | - (~cva6_amo_resp_o.ack & amo_pending_q); + (~amo_pending_q & cva6_amo_req_i.req & hpdcache_req_ready_i) | + ( amo_pending_q & ~cva6_amo_resp_o.ack); + + if (cva6_amo_resp_o.ack) begin + cva6_amo_resp_o <= '0; + end else if (cva6_amo_resp.ack) begin + cva6_amo_resp_o <= cva6_amo_resp; + end end end diff --git a/core/cache_subsystem/cva6_hpdcache_subsystem.sv b/core/cache_subsystem/cva6_hpdcache_subsystem.sv index 6d13f6517cc..c404f9dd8d3 100644 --- a/core/cache_subsystem/cva6_hpdcache_subsystem.sv +++ b/core/cache_subsystem/cva6_hpdcache_subsystem.sv @@ -34,9 +34,7 @@ module cva6_hpdcache_subsystem parameter type axi_b_chan_t = logic, parameter type axi_r_chan_t = logic, parameter type noc_req_t = logic, - parameter type noc_resp_t = logic, - parameter type cmo_req_t = logic, - parameter type cmo_rsp_t = logic + parameter type noc_resp_t = logic ) // }}} @@ -63,7 +61,7 @@ module cva6_hpdcache_subsystem input logic icache_en_i, // Flush the instruction cache - CONTROLLER input logic icache_flush_i, - // instructino cache miss - PERF_COUNTERS + // instruction cache miss - PERF_COUNTERS output logic icache_miss_o, // Input address translation request - EX_STAGE input icache_areq_t icache_areq_i, @@ -79,22 +77,32 @@ module cva6_hpdcache_subsystem // {{{ // Cache management // Data cache enable - CSR_REGFILE - input logic dcache_enable_i, + input logic dcache_enable_i, // Data cache flush - CONTROLLER - input logic dcache_flush_i, + input logic dcache_flush_i, // Flush acknowledge - CONTROLLER output logic dcache_flush_ack_o, // Load or store miss - PERF_COUNTERS output logic dcache_miss_o, + // Data cache scrubber enable - CSR_REGFILE + input logic dcache_scrub_enable_i, + // Data cache scrubber period - CSR_REGFILE + input logic [5:0] dcache_scrub_period_i, + // Data cache scrubber cycle - CSR_REGFILE + output logic dcache_scrub_cycle_o, + // Data cache data error corrected - CSR_REGFILE + output logic dcache_dat_cor_err_o, + // Data cache data error detected but not corrected - CSR_REGFILE + output logic dcache_dat_unc_err_o, + // Data cache tag error corrected - CSR_REGFILE + output logic dcache_dir_cor_err_o, + // Data cache tag error detected but not corrected - CSR_REGFILE + output logic dcache_dir_unc_err_o, // AMO request - EX_STAGE input ariane_pkg::amo_req_t dcache_amo_req_i, // AMO response - EX_STAGE output ariane_pkg::amo_resp_t dcache_amo_resp_o, - // CMO interface request - TO_BE_COMPLETED - input cmo_req_t dcache_cmo_req_i, - // CMO interface response - TO_BE_COMPLETED - output cmo_rsp_t dcache_cmo_resp_o, // Data cache input request ports - EX_STAGE input dcache_req_i_t [NumPorts-1:0] dcache_req_ports_i, // Data cache output request ports - EX_STAGE @@ -185,9 +193,8 @@ module cva6_hpdcache_subsystem // . // . // . - // NumPorts: CMO - // NumPorts + 1: Hardware Memory Prefetcher (hwpf) - localparam int HPDCACHE_NREQUESTERS = NumPorts + 2; + // NumPorts: Hardware Memory Prefetcher (hwpf) + localparam int HPDCACHE_NREQUESTERS = NumPorts + 1; function automatic hpdcache_pkg::hpdcache_user_cfg_t hpdcacheSetConfig(); hpdcache_pkg::hpdcache_user_cfg_t userCfg; @@ -196,7 +203,7 @@ module cva6_hpdcache_subsystem userCfg.wordWidth = CVA6Cfg.XLEN; userCfg.sets = CVA6Cfg.DCACHE_NUM_WORDS; userCfg.ways = CVA6Cfg.DCACHE_SET_ASSOC; - userCfg.clWords = CVA6Cfg.DCACHE_LINE_WIDTH / CVA6Cfg.XLEN; + userCfg.clWords = CVA6Cfg.DCACHE_LINE_WIDTH / userCfg.wordWidth; userCfg.reqWords = 1; userCfg.reqTransIdWidth = CVA6Cfg.DcacheIdWidth; userCfg.reqSrcIdWidth = 3; // Up to 8 requesters @@ -204,24 +211,28 @@ module cva6_hpdcache_subsystem userCfg.dataWaysPerRamWord = __minu(CVA6Cfg.DCACHE_SET_ASSOC, 128 / CVA6Cfg.XLEN); userCfg.dataSetsPerRam = CVA6Cfg.DCACHE_NUM_WORDS; userCfg.dataRamByteEnable = 1'b1; - userCfg.accessWords = __maxu(CVA6Cfg.AxiDataWidth / CVA6Cfg.XLEN, 1 /*reqWords*/); + userCfg.accessWords = __maxu(CVA6Cfg.AxiDataWidth / userCfg.wordWidth, userCfg.reqWords); userCfg.mshrSets = CVA6Cfg.NrLoadBufEntries < 16 ? 1 : CVA6Cfg.NrLoadBufEntries / 2; userCfg.mshrWays = CVA6Cfg.NrLoadBufEntries < 16 ? CVA6Cfg.NrLoadBufEntries : 2; userCfg.mshrWaysPerRamWord = CVA6Cfg.NrLoadBufEntries < 16 ? CVA6Cfg.NrLoadBufEntries : 2; userCfg.mshrSetsPerRam = CVA6Cfg.NrLoadBufEntries < 16 ? 1 : CVA6Cfg.NrLoadBufEntries / 2; userCfg.mshrRamByteEnable = 1'b1; userCfg.mshrUseRegbank = (CVA6Cfg.NrLoadBufEntries < 16); + userCfg.cbufEntries = CVA6Cfg.WtDcacheWbufDepth; userCfg.refillCoreRspFeedthrough = 1'b1; - userCfg.refillFifoDepth = 2; + if (CVA6Cfg.NOCType == config_pkg::NOC_TYPE_L15_BIG_ENDIAN || CVA6Cfg.NOCType == config_pkg::NOC_TYPE_L15_LITTLE_ENDIAN) begin + // OpenPiton needs a larger refill FIFO to store as many invalidations as in-flight requests (plus some extra to be safe) + userCfg.refillFifoDepth = (userCfg.mshrSets * userCfg.mshrWays) + 10; + end else begin + userCfg.refillFifoDepth = 2 * (CVA6Cfg.DCACHE_LINE_WIDTH / CVA6Cfg.AxiDataWidth); + end userCfg.wbufDirEntries = CVA6Cfg.WtDcacheWbufDepth; userCfg.wbufDataEntries = CVA6Cfg.WtDcacheWbufDepth; userCfg.wbufWords = 1; userCfg.wbufTimecntWidth = 3; userCfg.rtabEntries = 4; - /*FIXME we should add additional CVA6 config parameters (flushEntries)*/ - userCfg.flushEntries = CVA6Cfg.WtDcacheWbufDepth; - /*FIXME we should add additional CVA6 config parameters (flushFifoDepth)*/ - userCfg.flushFifoDepth = CVA6Cfg.WtDcacheWbufDepth; + userCfg.flushEntries = CVA6Cfg.WtDcacheWbufDepth; /*FIXME add additional CVA6 parameter*/ + userCfg.flushFifoDepth = CVA6Cfg.WtDcacheWbufDepth; /*FIXME add additional CVA6 parameter*/ userCfg.memAddrWidth = CVA6Cfg.AxiAddrWidth; userCfg.memIdWidth = CVA6Cfg.MEM_TID_WIDTH; userCfg.memDataWidth = CVA6Cfg.AxiDataWidth; @@ -231,6 +242,9 @@ module cva6_hpdcache_subsystem userCfg.wbEn = (CVA6Cfg.DCacheType == config_pkg::HPDCACHE_WB) || (CVA6Cfg.DCacheType == config_pkg::HPDCACHE_WT_WB); + userCfg.lowLatency = 1'b1; + userCfg.eccEn = CVA6Cfg.DcacheEccEnable; + userCfg.eccScrubberEn = CVA6Cfg.DcacheEccScrubberEnable; return userCfg; endfunction @@ -256,6 +270,7 @@ module cva6_hpdcache_subsystem hpdcache_req_tid_t); typedef logic [HPDcacheCfg.u.wbufTimecntWidth-1:0] hpdcache_wbuf_timecnt_t; + typedef logic [HPDcacheCfg.nlineWidth-1:0] hpdcache_nline_t; logic dcache_read_ready; logic dcache_read_valid; @@ -277,6 +292,9 @@ module cva6_hpdcache_subsystem logic dcache_write_resp_valid; hpdcache_mem_resp_w_t dcache_write_resp; + logic dcache_resp_read_inval; + hpdcache_nline_t dcache_resp_read_inval_nline; + cva6_hpdcache_wrapper #( .CVA6Cfg(CVA6Cfg), .HPDcacheCfg(HPDcacheCfg), @@ -284,8 +302,6 @@ module cva6_hpdcache_subsystem .dcache_req_o_t(dcache_req_o_t), .NumPorts(NumPorts), .NrHwPrefetchers(NrHwPrefetchers), - .cmo_req_t(cmo_req_t), - .cmo_rsp_t(cmo_rsp_t), .hpdcache_mem_addr_t(hpdcache_mem_addr_t), .hpdcache_mem_id_t(hpdcache_mem_id_t), .hpdcache_mem_data_t(hpdcache_mem_data_t), @@ -314,10 +330,15 @@ module cva6_hpdcache_subsystem .dcache_miss_o(dcache_miss_o), .dcache_amo_req_i(dcache_amo_req_i), .dcache_amo_resp_o(dcache_amo_resp_o), - .dcache_cmo_req_i(dcache_cmo_req_i), - .dcache_cmo_resp_o(dcache_cmo_resp_o), .dcache_req_ports_i(dcache_req_ports_i), .dcache_req_ports_o(dcache_req_ports_o), + .dcache_scrub_enable_i, + .dcache_scrub_period_i, + .dcache_scrub_cycle_o, + .dcache_dat_cor_err_o, + .dcache_dat_unc_err_o, + .dcache_dir_cor_err_o, + .dcache_dir_unc_err_o, .wbuffer_empty_o(wbuffer_empty_o), .wbuffer_not_ni_o(wbuffer_not_ni_o), .hwpf_base_set_i(hwpf_base_set_i), @@ -339,6 +360,9 @@ module cva6_hpdcache_subsystem .dcache_mem_resp_read_valid_i(dcache_read_resp_valid), .dcache_mem_resp_read_i(dcache_read_resp), + .dcache_mem_resp_read_inval_i(dcache_resp_read_inval), + .dcache_mem_resp_read_inval_nline_i(dcache_resp_read_inval_nline), + .dcache_mem_req_write_ready_i(dcache_write_ready), .dcache_mem_req_write_valid_o(dcache_write_valid), .dcache_mem_req_write_o(dcache_write), @@ -352,78 +376,164 @@ module cva6_hpdcache_subsystem .dcache_mem_resp_write_i(dcache_write_resp) ); - // AXI arbiter instantiation - // {{{ - cva6_hpdcache_subsystem_axi_arbiter #( - .CVA6Cfg (CVA6Cfg), - .hpdcache_mem_id_t (hpdcache_mem_id_t), - .hpdcache_mem_req_t (hpdcache_mem_req_t), - .hpdcache_mem_req_w_t (hpdcache_mem_req_w_t), - .hpdcache_mem_resp_r_t(hpdcache_mem_resp_r_t), - .hpdcache_mem_resp_w_t(hpdcache_mem_resp_w_t), - .icache_req_t (icache_req_t), - .icache_rtrn_t (icache_rtrn_t), - - .AxiAddrWidth (CVA6Cfg.AxiAddrWidth), - .AxiDataWidth (CVA6Cfg.AxiDataWidth), - .AxiIdWidth (CVA6Cfg.AxiIdWidth), - .AxiUserWidth (CVA6Cfg.AxiUserWidth), - .axi_ar_chan_t(axi_ar_chan_t), - .axi_aw_chan_t(axi_aw_chan_t), - .axi_w_chan_t (axi_w_chan_t), - .axi_b_chan_t (axi_b_chan_t), - .axi_r_chan_t (axi_r_chan_t), - .axi_req_t (noc_req_t), - .axi_rsp_t (noc_resp_t) - ) i_axi_arbiter ( - .clk_i, - .rst_ni, - - .icache_miss_valid_i(icache_miss_valid), - .icache_miss_ready_o(icache_miss_ready), - .icache_miss_i (icache_miss), - .icache_miss_id_i (hpdcache_mem_id_t'(ICACHE_RDTXID)), - - .icache_miss_resp_valid_o(icache_miss_resp_valid), - .icache_miss_resp_o (icache_miss_resp), - - .dcache_read_ready_o(dcache_read_ready), - .dcache_read_valid_i(dcache_read_valid), - .dcache_read_i (dcache_read), - - .dcache_read_resp_ready_i(dcache_read_resp_ready), - .dcache_read_resp_valid_o(dcache_read_resp_valid), - .dcache_read_resp_o (dcache_read_resp), - - .dcache_write_ready_o(dcache_write_ready), - .dcache_write_valid_i(dcache_write_valid), - .dcache_write_i (dcache_write), - - .dcache_write_data_ready_o(dcache_write_data_ready), - .dcache_write_data_valid_i(dcache_write_data_valid), - .dcache_write_data_i (dcache_write_data), - - .dcache_write_resp_ready_i(dcache_write_resp_ready), - .dcache_write_resp_valid_o(dcache_write_resp_valid), - .dcache_write_resp_o (dcache_write_resp), - - .axi_req_o (noc_req_o), - .axi_resp_i(noc_resp_i) - ); - // }}} + if (CVA6Cfg.NOCType == config_pkg::NOC_TYPE_L15_BIG_ENDIAN || CVA6Cfg.NOCType == config_pkg::NOC_TYPE_L15_LITTLE_ENDIAN) begin + /////////////////////////////////////////////////////// + // memory plumbing, either use 64bit AXI port or native + // L15 cache interface (derived from OpenSPARC CCX). + /////////////////////////////////////////////////////// + + localparam NUM_PORTS_ADAPTER = 4; + localparam NUM_PORTS_ADAPTER_WIDTH = $clog2(NUM_PORTS_ADAPTER); + // Adapter HPDC-L1.5 Request Ports type + // 0: Maximum priority + // NUM_PORTS_ADAPTER - 1 : Less priority + localparam [NUM_PORTS_ADAPTER_WIDTH-1:0] ICACHE_PORT = 0; + localparam [NUM_PORTS_ADAPTER_WIDTH-1:0] DCACHE_READ_PORT = 1; + localparam [NUM_PORTS_ADAPTER_WIDTH-1:0] DCACHE_WRITE_PORT = 2; + localparam [NUM_PORTS_ADAPTER_WIDTH-1:0] DCACHE_AMO_PORT = 3; + + typedef logic [NUM_PORTS_ADAPTER_WIDTH-1:0] req_portid_t; + //L15 adapter instantiation + //{{{ + cva6_hpdcache_subsystem_l15_adapter #( + .CVA6Cfg(CVA6Cfg), + + .NumPorts (NUM_PORTS_ADAPTER), + .IcachePort (ICACHE_PORT), + .DcacheReadPort (DCACHE_READ_PORT), + .DcacheWritePort(DCACHE_WRITE_PORT), + .DcacheAmoPort (DCACHE_AMO_PORT), + + .HPDcacheMemDataWidth(CVA6Cfg.DCACHE_LINE_WIDTH), + .L15BusWidth (l15_pkg::L15_DATA_BUS_WIDTH), + + .icache_req_t (icache_req_t), + .icache_rtrn_t (icache_rtrn_t), + .dcache_req_i_t(dcache_req_i_t), + .dcache_req_o_t(dcache_req_o_t), + + .l15_req_t (noc_req_t), + .l15_rtrn_t(noc_resp_t), + + .hpdcache_mem_req_t (hpdcache_mem_req_t), + .hpdcache_mem_req_w_t (hpdcache_mem_req_w_t), + .hpdcache_mem_resp_r_t(hpdcache_mem_resp_r_t), + .hpdcache_mem_resp_w_t(hpdcache_mem_resp_w_t), + .hpdcache_mem_id_t (hpdcache_mem_id_t), + .hpdcache_mem_addr_t (hpdcache_mem_addr_t), + .hpdcache_nline_t (hpdcache_nline_t), + .req_portid_t (req_portid_t) + ) i_l15_adapter ( + .clk_i, + .rst_ni, + + .icache_miss_valid_i(icache_miss_valid), + .icache_miss_ready_o(icache_miss_ready), + .icache_miss_i (icache_miss), + + .icache_miss_resp_valid_o(icache_miss_resp_valid), + .icache_miss_resp_o (icache_miss_resp), + + .dcache_read_ready_o(dcache_read_ready), + .dcache_read_valid_i(dcache_read_valid), + .dcache_read_i (dcache_read), + + .dcache_read_resp_ready_i(dcache_read_resp_ready), + .dcache_read_resp_valid_o(dcache_read_resp_valid), + .dcache_read_resp_o (dcache_read_resp), + + .dcache_inval_valid_o(dcache_resp_read_inval), + .dcache_inval_o (dcache_resp_read_inval_nline), + + .dcache_write_ready_o(dcache_write_ready), + .dcache_write_valid_i(dcache_write_valid), + .dcache_write_i (dcache_write), + + .dcache_write_data_ready_o(dcache_write_data_ready), + .dcache_write_data_valid_i(dcache_write_data_valid), + .dcache_write_data_i (dcache_write_data), + + .dcache_write_resp_ready_i(dcache_write_resp_ready), + .dcache_write_resp_valid_o(dcache_write_resp_valid), + .dcache_write_resp_o (dcache_write_resp), + + .l15_req_o (noc_req_o), + .l15_rtrn_i(noc_resp_i) + ); + //}}} + end else begin + + // AXI arbiter instantiation + // {{{ + cva6_hpdcache_subsystem_axi_arbiter #( + .CVA6Cfg (CVA6Cfg), + .hpdcache_mem_id_t (hpdcache_mem_id_t), + .hpdcache_mem_req_t (hpdcache_mem_req_t), + .hpdcache_mem_req_w_t (hpdcache_mem_req_w_t), + .hpdcache_mem_resp_r_t(hpdcache_mem_resp_r_t), + .hpdcache_mem_resp_w_t(hpdcache_mem_resp_w_t), + .icache_req_t (icache_req_t), + .icache_rtrn_t (icache_rtrn_t), + + .AxiAddrWidth (CVA6Cfg.AxiAddrWidth), + .AxiDataWidth (CVA6Cfg.AxiDataWidth), + .AxiIdWidth (CVA6Cfg.AxiIdWidth), + .AxiUserWidth (CVA6Cfg.AxiUserWidth), + .axi_ar_chan_t(axi_ar_chan_t), + .axi_aw_chan_t(axi_aw_chan_t), + .axi_w_chan_t (axi_w_chan_t), + .axi_b_chan_t (axi_b_chan_t), + .axi_r_chan_t (axi_r_chan_t), + .axi_req_t (noc_req_t), + .axi_rsp_t (noc_resp_t) + ) i_axi_arbiter ( + .clk_i, + .rst_ni, + + .icache_miss_valid_i(icache_miss_valid), + .icache_miss_ready_o(icache_miss_ready), + .icache_miss_i (icache_miss), + .icache_miss_id_i (hpdcache_mem_id_t'(ICACHE_RDTXID)), + + .icache_miss_resp_valid_o(icache_miss_resp_valid), + .icache_miss_resp_o (icache_miss_resp), + + .dcache_read_ready_o(dcache_read_ready), + .dcache_read_valid_i(dcache_read_valid), + .dcache_read_i (dcache_read), + + .dcache_read_resp_ready_i(dcache_read_resp_ready), + .dcache_read_resp_valid_o(dcache_read_resp_valid), + .dcache_read_resp_o (dcache_read_resp), + + .dcache_write_ready_o(dcache_write_ready), + .dcache_write_valid_i(dcache_write_valid), + .dcache_write_i (dcache_write), + + .dcache_write_data_ready_o(dcache_write_data_ready), + .dcache_write_data_valid_i(dcache_write_data_valid), + .dcache_write_data_i (dcache_write_data), + + .dcache_write_resp_ready_i(dcache_write_resp_ready), + .dcache_write_resp_valid_o(dcache_write_resp_valid), + .dcache_write_resp_o (dcache_write_resp), + + .axi_req_o (noc_req_o), + .axi_resp_i(noc_resp_i) + ); + // }}} + + // AXI NoC doesn't support invalidations + assign dcache_resp_read_inval = 0; + assign dcache_resp_read_inval_nline = '0; + end // Assertions // {{{ // pragma translate_off initial begin : initial_assertions - assert (HPDcacheCfg.u.reqSrcIdWidth >= $clog2(HPDcacheCfg.u.nRequesters)) - else $fatal(1, "HPDCACHE_REQ_SRC_ID_WIDTH is not wide enough"); assert (CVA6Cfg.MEM_TID_WIDTH <= CVA6Cfg.AxiIdWidth) else $fatal(1, "MEM_TID_WIDTH shall be less or equal to the AxiIdWidth"); - assert (CVA6Cfg.MEM_TID_WIDTH >= ($clog2(HPDcacheCfg.u.mshrSets * HPDcacheCfg.u.mshrWays) + 1)) - else $fatal(1, "MEM_TID_WIDTH shall allow to uniquely identify all D$ and I$ miss requests "); - assert (CVA6Cfg.MEM_TID_WIDTH >= ($clog2(HPDcacheCfg.u.wbufDirEntries) + 1)) - else $fatal(1, "MEM_TID_WIDTH shall allow to uniquely identify all D$ write requests "); end a_invalid_instruction_fetch : diff --git a/core/cache_subsystem/cva6_hpdcache_subsystem_axi_arbiter.sv b/core/cache_subsystem/cva6_hpdcache_subsystem_axi_arbiter.sv index 901175f79c2..06a8a7c5668 100644 --- a/core/cache_subsystem/cva6_hpdcache_subsystem_axi_arbiter.sv +++ b/core/cache_subsystem/cva6_hpdcache_subsystem_axi_arbiter.sv @@ -99,8 +99,9 @@ module cva6_hpdcache_subsystem_axi_arbiter // Adapt the I$ interface to the HPDcache memory interface // {{{ - localparam int ICACHE_CL_WORDS = CVA6Cfg.ICACHE_LINE_WIDTH / 64; - localparam int ICACHE_CL_WORD_INDEX = $clog2(ICACHE_CL_WORDS); + localparam int ICACHE_UC_WORD_INDEX = CVA6Cfg.AxiDataWidth > 64 ? $clog2( + CVA6Cfg.AxiDataWidth / 64 + ) : 1; localparam int ICACHE_CL_SIZE = $clog2(CVA6Cfg.ICACHE_LINE_WIDTH / 8); localparam int ICACHE_WORD_SIZE = 3; localparam int ICACHE_MEM_REQ_CL_LEN = @@ -120,7 +121,7 @@ module cva6_hpdcache_subsystem_axi_arbiter logic icache_miss_pending_q; - // This FIFO has two functionnalities: + // This FIFO has two functionalities: // - Stabilize the ready-valid protocol. The ICACHE can abort a valid // transaction without receiving the corresponding ready signal. This // behavior is not supported by AXI. @@ -211,29 +212,31 @@ module cva6_hpdcache_subsystem_axi_arbiter assign icache_miss_resp_wok = icache_miss_resp_data_wok & ( icache_miss_resp_meta_wok | ~icache_miss_resp_wdata.mem_resp_r_last); - assign icache_miss_rdata = icache_miss_resp_data_rdata; - end else begin assign icache_miss_resp_data_rok = icache_miss_resp_w; assign icache_miss_resp_meta_rok = icache_miss_resp_w; assign icache_miss_resp_wok = 1'b1; assign icache_miss_resp_meta_id = icache_miss_resp_wdata.mem_resp_r_id; assign icache_miss_resp_data_rdata = icache_miss_resp_wdata.mem_resp_r_data; + end + endgenerate - // In the case of uncacheable accesses, the Icache expects the data to be right-aligned - always_comb begin : icache_miss_resp_data_comb - if (!icache_miss_req_rdata.mem_req_cacheable) begin - automatic logic [ICACHE_CL_WORD_INDEX - 1:0] icache_miss_word_index; - automatic logic [63:0] icache_miss_word; - icache_miss_word_index = icache_miss_req_rdata.mem_req_addr[3+:ICACHE_CL_WORD_INDEX]; - icache_miss_word = icache_miss_resp_data_rdata[icache_miss_word_index*64+:64]; - icache_miss_rdata = {{CVA6Cfg.ICACHE_LINE_WIDTH - 64{1'b0}}, icache_miss_word}; - end else begin - icache_miss_rdata = icache_miss_resp_data_rdata; - end + // In the case of uncacheable accesses, the Icache expects the data to be right-aligned + always_comb begin : icache_miss_resp_data_comb + if (!icache_miss_req_rdata.mem_req_cacheable) begin + automatic logic [ICACHE_UC_WORD_INDEX - 1:0] icache_miss_word_index; + automatic logic [63:0] icache_miss_word; + if (CVA6Cfg.AxiDataWidth > 64) begin + icache_miss_word_index = icache_miss_req_rdata.mem_req_addr[3+:ICACHE_UC_WORD_INDEX]; + end else begin + icache_miss_word_index = 0; end + icache_miss_word = icache_miss_resp_data_rdata[icache_miss_word_index*64+:64]; + icache_miss_rdata = {{CVA6Cfg.ICACHE_LINE_WIDTH - 64{1'b0}}, icache_miss_word}; + end else begin + icache_miss_rdata = icache_miss_resp_data_rdata; end - endgenerate + end assign icache_miss_resp_valid_o = icache_miss_resp_meta_rok; assign icache_miss_resp_o.rtype = wt_cache_pkg::ICACHE_IFILL_ACK; @@ -278,7 +281,9 @@ module cva6_hpdcache_subsystem_axi_arbiter .mem_req_read_ready_i(mem_req_read_ready_arb), .mem_req_read_valid_o(mem_req_read_valid_arb), - .mem_req_read_o (mem_req_read_arb) + .mem_req_read_o (mem_req_read_arb), + + .gnt_index_o( /*open*/) ); // }}} diff --git a/core/cache_subsystem/cva6_hpdcache_subsystem_l15_adapter.sv b/core/cache_subsystem/cva6_hpdcache_subsystem_l15_adapter.sv new file mode 100644 index 00000000000..91b31216bc1 --- /dev/null +++ b/core/cache_subsystem/cva6_hpdcache_subsystem_l15_adapter.sv @@ -0,0 +1,448 @@ +/* + * Copyright 2023 CEA* + * *Commissariat a l'Energie Atomique et aux Energies Alternatives (CEA) + * + * 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. + */ +/* + * Authors : Noelia Oliete, Cesar Fuguet + * Creation Date: June, 2023 + * Description : Adapter module to connect the HPDC and L1I$ to the native interface of the OpenPiton L1.5 cache. + * L1 Dcache (CV-HPDcache). + * History : + */ +module cva6_hpdcache_subsystem_l15_adapter + import ariane_pkg::*; + import wt_cache_pkg::*; + import hpdcache_pkg::*; +// Parameters +// {{{ +#( + parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty, // contains cacheable regions + + parameter int NumPorts = 4, + parameter [$clog2(NumPorts)-1:0] IcachePort = 0, + parameter [$clog2(NumPorts)-1:0] DcacheReadPort = 1, + parameter [$clog2(NumPorts)-1:0] DcacheWritePort = 2, + parameter [$clog2(NumPorts)-1:0] DcacheAmoPort = 3, + + // Cache parameters + parameter int HPDcacheMemDataWidth = 128, //L1D cacheline + parameter int L15BusWidth = 128, + + // L1 cache types + parameter type icache_req_t = logic, + parameter type icache_rtrn_t = logic, + parameter type dcache_req_i_t = logic, + parameter type dcache_req_o_t = logic, + + //L1.5 cache types + parameter type l15_req_t = logic, + parameter type l15_rtrn_t = logic, + + parameter type hpdcache_mem_req_t = logic, + parameter type hpdcache_mem_req_w_t = logic, + parameter type hpdcache_mem_resp_r_t = logic, + parameter type hpdcache_mem_resp_w_t = logic, + parameter type hpdcache_mem_id_t = logic, + parameter type hpdcache_mem_addr_t = logic, + parameter type req_portid_t = logic, + parameter type hpdcache_nline_t = logic +) +// }}} + +// Ports +// {{{ +( + input logic clk_i, + input logic rst_ni, + + // Interfaces from/to I$ + // {{{ + input logic icache_miss_valid_i, + output logic icache_miss_ready_o, + input icache_req_t icache_miss_i, + + output logic icache_miss_resp_valid_o, + output icache_rtrn_t icache_miss_resp_o, + // }}} + + // Interfaces from/to D$ + // {{{ + output logic dcache_read_ready_o, + input logic dcache_read_valid_i, + input hpdcache_mem_req_t dcache_read_i, + + input logic dcache_read_resp_ready_i, + output logic dcache_read_resp_valid_o, + output hpdcache_mem_resp_r_t dcache_read_resp_o, + + output logic dcache_inval_valid_o, + output hpdcache_nline_t dcache_inval_o, + + output logic dcache_write_ready_o, + input logic dcache_write_valid_i, + input hpdcache_mem_req_t dcache_write_i, + + output logic dcache_write_data_ready_o, + input logic dcache_write_data_valid_i, + input hpdcache_mem_req_w_t dcache_write_data_i, + + input logic dcache_write_resp_ready_i, + output logic dcache_write_resp_valid_o, + output hpdcache_mem_resp_w_t dcache_write_resp_o, + // }}} + + // Ports to/from L1.5 + // {{{ + output l15_req_t l15_req_o, + input l15_rtrn_t l15_rtrn_i + // }}} +); + // }}} + + // Internal types of the adapter + // {{{ + typedef logic [CVA6Cfg.ICACHE_LINE_WIDTH-1:0] icache_resp_data_t; + typedef logic [L15BusWidth-1:0] l15_resp_data_t; + + //Unified structure for r and w responses + typedef struct packed { + + hpdcache_mem_error_e mem_resp_error; //mem_resp_r_error/mem_resp_w_error + hpdcache_mem_id_t mem_resp_id; //mem_resp_r_id/mem_resp_w_id + l15_resp_data_t mem_resp_r_data; + logic mem_resp_r_last; + logic mem_resp_w_is_atomic; + logic mem_inval_icache_valid; + logic mem_inval_dcache_valid; + logic [CVA6Cfg.PLEN-1:0] mem_inval; + } hpdcache_mem_resp_t; + // }}} + + // Adapt the I$ interface to the HPDcache memory interface + // {{{ + localparam int ICACHE_CL_WORDS = CVA6Cfg.ICACHE_LINE_WIDTH / 64; + localparam int ICACHE_CL_WORD_INDEX = $clog2(ICACHE_CL_WORDS); + localparam int ICACHE_CL_SIZE = $clog2(CVA6Cfg.ICACHE_LINE_WIDTH / 8); + localparam int ICACHE_WORD_SIZE = $clog2(CVA6Cfg.XLEN / 8); + localparam int ICACHE_MEM_REQ_CL_LEN = (CVA6Cfg.ICACHE_LINE_WIDTH + HPDcacheMemDataWidth - 1)/HPDcacheMemDataWidth; + localparam int ICACHE_MEM_REQ_CL_SIZE = (HPDcacheMemDataWidth <= CVA6Cfg.ICACHE_LINE_WIDTH) ? $clog2( + HPDcacheMemDataWidth / 8 + ) : ICACHE_CL_SIZE; + + // I$ request + // {{{ + hpdcache_mem_req_t icache_miss_req_wdata; + logic icache_miss_req_w, icache_miss_req_wok; + + hpdcache_mem_req_t icache_miss_req_rdata; + logic icache_miss_req_r, icache_miss_req_rok; + + // This FIFO has two functionnalities: + // - Stabilize the ready-valid protocol. The ICACHE can abort a valid + // transaction without receiving the corresponding ready signal. This + // behavior is not supported by AXI. + // - Cut a possible long timing path. + hpdcache_fifo_reg #( + .FIFO_DEPTH (1), + .fifo_data_t(hpdcache_mem_req_t) + ) i_icache_miss_req_fifo ( + .clk_i, + .rst_ni, + + .w_i (icache_miss_req_w), + .wok_o (icache_miss_req_wok), + .wdata_i(icache_miss_req_wdata), + + .r_i (icache_miss_req_r), + .rok_o (icache_miss_req_rok), + .rdata_o(icache_miss_req_rdata) + ); + + assign icache_miss_req_w = icache_miss_valid_i, icache_miss_ready_o = icache_miss_req_wok; + + assign icache_miss_req_wdata.mem_req_addr = icache_miss_i.paddr, + icache_miss_req_wdata.mem_req_len = '0, + icache_miss_req_wdata.mem_req_size = icache_miss_i.nc ? ICACHE_WORD_SIZE : ICACHE_MEM_REQ_CL_SIZE, + icache_miss_req_wdata.mem_req_id = icache_miss_i.tid, + icache_miss_req_wdata.mem_req_command = hpdcache_pkg::HPDCACHE_MEM_READ, + icache_miss_req_wdata.mem_req_atomic = hpdcache_pkg::hpdcache_mem_atomic_e'(0), + icache_miss_req_wdata.mem_req_cacheable = ~icache_miss_i.nc; + // }}} + + + // I$ response + // {{{ + logic icache_miss_resp_w, icache_miss_resp_wok; + hpdcache_mem_resp_t icache_miss_resp_wdata; + + logic icache_miss_resp_data_w, icache_miss_resp_data_wok; + logic icache_miss_resp_data_r; + icache_resp_data_t icache_miss_resp_data_rdata; + + logic icache_miss_resp_meta_w, icache_miss_resp_meta_wok; + logic icache_miss_resp_meta_r, icache_miss_resp_meta_rok; + hpdcache_mem_id_t icache_miss_resp_meta_id; + logic [CVA6Cfg.PLEN-1:0] icache_miss_resp_inval_address; + + //Translate the request from HPDC format to ariane's format + assign icache_miss_resp_valid_o = icache_miss_resp_meta_rok, + icache_miss_resp_o.rtype = (icache_miss_resp_wdata.mem_inval_icache_valid) ? wt_cache_pkg::ICACHE_INV_REQ : wt_cache_pkg::ICACHE_IFILL_ACK, + icache_miss_resp_o.data = icache_miss_resp_data_rdata, + icache_miss_resp_o.user = '0, + icache_miss_resp_o.inv.idx = { + icache_miss_resp_inval_address[CVA6Cfg.ICACHE_INDEX_WIDTH-1:4], 4'b0000 + }, + icache_miss_resp_o.inv.all = icache_miss_resp_wdata.mem_inval_icache_valid, + icache_miss_resp_o.inv.way = '0, + icache_miss_resp_o.inv.vld = '0, + icache_miss_resp_o.tid = icache_miss_resp_meta_id; + + assign icache_miss_resp_meta_rok = icache_miss_resp_w, + icache_miss_resp_wok = 1'b1, + icache_miss_resp_meta_id = icache_miss_resp_wdata.mem_resp_id, + icache_miss_resp_data_rdata = icache_miss_resp_wdata.mem_resp_r_data[CVA6Cfg.ICACHE_LINE_WIDTH-1:0], + icache_miss_resp_inval_address = icache_miss_resp_wdata.mem_inval; + // }}} + // }}} + + // L1.5 Request arbiter + // {{{ + + // Requests + logic mem_req_ready [NumPorts-2:0]; + logic mem_req_valid [NumPorts-2:0]; + hpdcache_mem_req_t mem_req [NumPorts-2:0]; + + + logic mem_req_ready_arb; + logic mem_req_valid_arb; + hpdcache_mem_req_t mem_req_arb; + + // Data + logic mem_req_data_ready[NumPorts-2:0]; + logic mem_req_data_valid[NumPorts-2:0]; + hpdcache_mem_req_w_t mem_req_data [NumPorts-2:0]; + hpdcache_mem_req_w_t mem_req_data_arb; + + // Port of the Request, NumPorts-1 available request ports + req_portid_t mem_req_pid [NumPorts-2:0]; + req_portid_t mem_req_pid_arb; + + // Request type selected + logic mem_req_index_arb [NumPorts-2:0]; + // LR/SC back-off + logic sc_backoff_over; + + + //Request types + //IFILL + assign icache_miss_req_r = mem_req_ready[IcachePort], + mem_req_valid[IcachePort] = icache_miss_req_rok, + mem_req_pid[IcachePort] = IcachePort, + mem_req[IcachePort] = icache_miss_req_rdata, + mem_req_data_valid[IcachePort] = 1'b1, //There is no data for this request -> always valid + mem_req_data[IcachePort] = '0; + + //Read + assign dcache_read_ready_o = mem_req_ready[DcacheReadPort], + mem_req_valid[DcacheReadPort] = dcache_read_valid_i, + mem_req_pid[DcacheReadPort] = DcacheReadPort, + mem_req[DcacheReadPort] = dcache_read_i, + mem_req_data_valid[DcacheReadPort] = 1'b1, //There is no data for this request -> always valid + mem_req_data[DcacheReadPort] = '0; + + //Write + assign dcache_write_ready_o = mem_req_ready[DcacheWritePort], + mem_req_valid[DcacheWritePort] = dcache_write_valid_i, + mem_req_pid[DcacheWritePort] = DcacheWritePort, + mem_req[DcacheWritePort] = dcache_write_i; + + assign dcache_write_data_ready_o = mem_req_ready[DcacheWritePort], //Ready at the same time as the request + mem_req_data_valid[DcacheWritePort] = dcache_write_data_valid_i, + mem_req_data[DcacheWritePort] = dcache_write_data_i; + + hpdcache_l15_req_arbiter #( + .N (NumPorts - 1), + .hpdcache_mem_req_t (hpdcache_mem_req_t), + .hpdcache_mem_req_w_t(hpdcache_mem_req_w_t), + .req_portid_t (req_portid_t) + ) i_l15_req_arbiter ( + .clk_i, + .rst_ni, + //Request + .mem_req_ready_o(mem_req_ready), + .mem_req_valid_i(mem_req_valid), + .mem_req_pid_i (mem_req_pid), + .mem_req_i (mem_req), + + //Data + .mem_req_data_valid_i(mem_req_data_valid), + .mem_req_data_i (mem_req_data), + //Arbiter + .mem_req_ready_i (mem_req_ready_arb), + .mem_req_valid_o (mem_req_valid_arb), //Valid when both request and data are valid. + + //Req & Data selected + .mem_req_pid_o (mem_req_pid_arb), + .mem_req_o (mem_req_arb), + //Data output + //Arbiter ready is the same for the request and the valid==1 if + //the request and the optional date are also valid + .mem_req_data_o (mem_req_data_arb), + .mem_req_index_o(mem_req_index_arb) + + ); + // }}} + + // L1.5 Response demultiplexor + // {{{ + logic mem_resp_ready; + logic mem_resp_valid; + hpdcache_mem_resp_t mem_resp; + + logic mem_resp_ready_arb[NumPorts-1:0]; + logic mem_resp_valid_arb[NumPorts-1:0]; + hpdcache_mem_resp_t mem_resp_arb [NumPorts-1:0]; + + //Port IcachePort -> ICACHE, Port DcacheReadPort -> Read, Port DcacheWritePort -> Write, Port DcacheUncReadPort -> UC Read, Port DcacheUncWritePort -> UC Write DcacheAmoPort -> Atomic operations + req_portid_t mem_resp_pid; + + // L1.5 Invalidation request to dcache + logic inval_ready; + logic inval_valid; + hpdcache_nline_t inval; + + hpdcache_l15_resp_demux #( + .N (NumPorts), + .resp_t (hpdcache_mem_resp_t), + .resp_id_t (hpdcache_mem_id_t), + .req_portid_t(req_portid_t) + ) i_l15_resp_demux ( + .clk_i, + .rst_ni, + //From arbiter + .mem_resp_ready_o(mem_resp_ready), + .mem_resp_valid_i(mem_resp_valid), + .mem_resp_i (mem_resp), + //To HPDC + .mem_resp_ready_i(mem_resp_ready_arb), + .mem_resp_valid_o(mem_resp_valid_arb), + .mem_resp_o (mem_resp_arb), + //Port selecter + .mem_sel_i (mem_resp_pid) + ); + + // Responses + // IFILL + assign icache_miss_resp_w = mem_resp_valid_arb[IcachePort], + icache_miss_resp_wdata = mem_resp_arb[IcachePort], + mem_resp_ready_arb[IcachePort] = icache_miss_resp_wok; + // Read & AMO responses + assign dcache_read_resp_valid_o = mem_resp_valid_arb[DcacheAmoPort] || mem_resp_valid_arb[DcacheReadPort] || inval_valid, + dcache_read_resp_o.mem_resp_r_data = mem_resp_valid_arb[DcacheAmoPort] ? mem_resp_arb[DcacheAmoPort].mem_resp_r_data[HPDcacheMemDataWidth-1:0] : + mem_resp_arb[DcacheReadPort].mem_resp_r_data[HPDcacheMemDataWidth-1:0], + dcache_read_resp_o.mem_resp_r_error = mem_resp_valid_arb[DcacheAmoPort] ? mem_resp_arb[DcacheAmoPort].mem_resp_error : + mem_resp_arb[DcacheReadPort].mem_resp_error, + dcache_read_resp_o.mem_resp_r_id = mem_resp_valid_arb[DcacheAmoPort] ? mem_resp_arb[DcacheAmoPort].mem_resp_id : + mem_resp_arb[DcacheReadPort].mem_resp_id, + dcache_read_resp_o.mem_resp_r_last = mem_resp_valid_arb[DcacheAmoPort] ? mem_resp_arb[DcacheAmoPort].mem_resp_r_last : + mem_resp_arb[DcacheReadPort].mem_resp_r_last, + dcache_inval_valid_o = inval_valid, + dcache_inval_o = inval, + mem_resp_ready_arb[DcacheReadPort] = dcache_read_resp_ready_i; + + // Write + assign dcache_write_resp_valid_o = mem_resp_valid_arb[DcacheAmoPort] || mem_resp_valid_arb[DcacheWritePort], + dcache_write_resp_o.mem_resp_w_is_atomic = mem_resp_valid_arb[DcacheAmoPort] ? mem_resp_arb[DcacheAmoPort].mem_resp_w_is_atomic : + mem_resp_arb[DcacheWritePort].mem_resp_w_is_atomic, + dcache_write_resp_o.mem_resp_w_error = mem_resp_valid_arb[DcacheAmoPort] ? mem_resp_arb[DcacheAmoPort].mem_resp_error : + mem_resp_arb[DcacheWritePort].mem_resp_error, + dcache_write_resp_o.mem_resp_w_id = mem_resp_valid_arb[DcacheAmoPort] ? mem_resp_arb[DcacheAmoPort].mem_resp_id : + mem_resp_arb[DcacheWritePort].mem_resp_id, + mem_resp_ready_arb[DcacheWritePort] = dcache_write_resp_ready_i; + + // Atomic operations send the response to both Read and Write ports + assign mem_resp_ready_arb[DcacheAmoPort] = dcache_read_resp_ready_i & dcache_write_resp_ready_i; + + // L1.5 Invalidation request to dcache + assign inval_ready = dcache_read_resp_ready_i, // Refill ready declares if hpdc is ready to receive an invalidation + inval_valid = mem_resp.mem_inval_dcache_valid, + inval = mem_resp.mem_inval[$bits( + hpdcache_mem_addr_t + )-1:$clog2( + HPDcacheMemDataWidth/8 + )]; // Convert address to cacheline number + + // }}} + + // L15 Adapter + // {{{ + + l15_req_t l15_req; + l15_rtrn_t l15_rtrn; + logic dcache_inval_ready; + + hpdcache_to_l15 #( + .NumPorts(NumPorts), // Number of request types + .IcachePort(IcachePort), + .DcacheReadPort(DcacheReadPort), + .DcacheWritePort(DcacheWritePort), + .DcacheAmoPort(DcacheAmoPort), + .WriteByteMaskEnabled(1'b0), //TODO!!!!! + .SwapEndianness(CVA6Cfg.NOCType == config_pkg::NOC_TYPE_L15_BIG_ENDIAN), + .HPDcacheMemDataWidth(HPDcacheMemDataWidth), + .hpdcache_mem_req_t(hpdcache_mem_req_t), + .hpdcache_mem_req_w_t(hpdcache_mem_req_w_t), + .hpdcache_mem_id_t(hpdcache_mem_id_t), + .hpdcache_mem_addr_t(hpdcache_mem_addr_t), + .hpdcache_mem_resp_t(hpdcache_mem_resp_t), + .req_portid_t(req_portid_t), + .l15_req_t(l15_req_t), + .l15_rtrn_t(l15_rtrn_t) + ) i_hpdcache_to_l15 ( + + .clk_i, + .rst_ni, + + //HPDC to Adapter + .req_ready_o (mem_req_ready_arb), // L1.5 is ready to receive + .req_valid_i (mem_req_valid_arb), // Request and optional data are valid + .req_pid_i (mem_req_pid_arb), + .req_i (mem_req_arb), + .req_data_i (mem_req_data_arb), + .req_index_i (mem_req_index_arb), // Identify the type of request + //Adapter to HPDC + .resp_ready_i (mem_resp_ready), + .resp_valid_o (mem_resp_valid), + .resp_pid_o (mem_resp_pid), + .resp_o (mem_resp), + //HPDC Inval ready + .hpdc_inval_ready_i(inval_ready), + //Back-off parameter to guarantee the LR/SC completion + .sc_backoff_over_o (sc_backoff_over), + + //Adapter to L1.5, sending request + .l15_req_o (l15_req), // L1.5 Request + //L1.5 to Adapter + .l15_rtrn_i(l15_rtrn) // L1.5 Response + ); + + assign l15_req_o = l15_req; + assign l15_rtrn = l15_rtrn_i; + // }}} +endmodule : cva6_hpdcache_subsystem_l15_adapter diff --git a/core/cache_subsystem/cva6_hpdcache_wrapper.sv b/core/cache_subsystem/cva6_hpdcache_wrapper.sv index 7727dc703d0..081f177c479 100644 --- a/core/cache_subsystem/cva6_hpdcache_wrapper.sv +++ b/core/cache_subsystem/cva6_hpdcache_wrapper.sv @@ -23,8 +23,6 @@ module cva6_hpdcache_wrapper parameter int NumPorts = 4, parameter int NrHwPrefetchers = 4, - parameter type cmo_req_t = logic, - parameter type cmo_rsp_t = logic, parameter type hpdcache_mem_addr_t = logic, parameter type hpdcache_mem_id_t = logic, parameter type hpdcache_mem_data_t = logic, @@ -43,7 +41,9 @@ module cva6_hpdcache_wrapper parameter type hpdcache_req_t = logic, parameter type hpdcache_rsp_t = logic, parameter type hpdcache_wbuf_timecnt_t = logic, - parameter type hpdcache_data_be_t = logic + parameter type hpdcache_data_be_t = logic, + + localparam type hpdcache_nline_t = logic [HPDcacheCfg.nlineWidth-1:0] ) // }}} @@ -71,15 +71,27 @@ module cva6_hpdcache_wrapper // AMO request/response - EX_STAGE input ariane_pkg::amo_req_t dcache_amo_req_i, output ariane_pkg::amo_resp_t dcache_amo_resp_o, - // CMO interface request/response - input cmo_req_t dcache_cmo_req_i, - output cmo_rsp_t dcache_cmo_resp_o, // Data cache input request/response ports - EX_STAGE input dcache_req_i_t [NumPorts-1:0] dcache_req_ports_i, output dcache_req_o_t [NumPorts-1:0] dcache_req_ports_o, + // Data cache scrubber enable - CSR_REGFILE + input logic dcache_scrub_enable_i, + // Data cache scrubber period - CSR_REGFILE + input logic [ 5:0] dcache_scrub_period_i, + // Data cache scrub cycle - CSR_REGFILE + output logic dcache_scrub_cycle_o, + // Data cache data error corrected - CSR_REGFILE + output logic dcache_dat_cor_err_o, + // Data cache data error detected but not corrected - CSR_REGFILE + output logic dcache_dat_unc_err_o, + // Data cache tag error corrected - CSR_REGFILE + output logic dcache_dir_cor_err_o, + // Data cache tag error detected but not corrected - CSR_REGFILE + output logic dcache_dir_unc_err_o, + // Write buffer status - EX_STAGE - output logic wbuffer_empty_o, - output logic wbuffer_not_ni_o, + output logic wbuffer_empty_o, + output logic wbuffer_not_ni_o, // Hardware memory prefetcher configuration input logic [NrHwPrefetchers-1:0] hwpf_base_set_i, @@ -101,6 +113,9 @@ module cva6_hpdcache_wrapper input logic dcache_mem_resp_read_valid_i, input hpdcache_mem_resp_r_t dcache_mem_resp_read_i, + input logic dcache_mem_resp_read_inval_i, + input hpdcache_nline_t dcache_mem_resp_read_inval_nline_i, + input logic dcache_mem_req_write_ready_i, output logic dcache_mem_req_write_valid_o, output hpdcache_mem_req_t dcache_mem_req_write_o, @@ -114,7 +129,7 @@ module cva6_hpdcache_wrapper input hpdcache_mem_resp_w_t dcache_mem_resp_write_i ); - localparam int HPDCACHE_NREQUESTERS = NumPorts + 2; + localparam int HPDCACHE_NREQUESTERS = NumPorts + 1; typedef logic [63:0] hwpf_stride_param_t; @@ -128,13 +143,11 @@ module cva6_hpdcache_wrapper hpdcache_rsp_t dcache_rsp [HPDCACHE_NREQUESTERS]; logic dcache_read_miss, dcache_write_miss; - logic [ 2:0] snoop_valid; - logic [ 2:0] snoop_abort; - hpdcache_req_offset_t [ 2:0] snoop_addr_offset; - hpdcache_tag_t [ 2:0] snoop_addr_tag; - logic [ 2:0] snoop_phys_indexed; - - logic dcache_cmo_req_is_prefetch; + logic [ 1:0] snoop_valid; + logic [ 1:0] snoop_abort; + hpdcache_req_offset_t [ 1:0] snoop_addr_offset; + hpdcache_tag_t [ 1:0] snoop_addr_tag; + logic [ 1:0] snoop_phys_indexed; hwpf_stride_pkg::hwpf_stride_throttle_t [NrHwPrefetchers-1:0] hwpf_throttle_in; hwpf_stride_pkg::hwpf_stride_throttle_t [NrHwPrefetchers-1:0] hwpf_throttle_out; @@ -219,37 +232,6 @@ module cva6_hpdcache_wrapper .hpdcache_rsp_valid_i(dcache_rsp_valid[NumPorts-1]), .hpdcache_rsp_i (dcache_rsp[NumPorts-1]) ); - -`ifdef HPDCACHE_ENABLE_CMO - cva6_hpdcache_cmo_if_adapter #( - .cmo_req_t(cmo_req_t), - .cmo_rsp_t(cmo_rsp_t) - ) i_cva6_hpdcache_cmo_if_adapter ( - .clk_i, - .rst_ni, - - .dcache_req_sid_i(hpdcache_req_sid_t'(NumPorts)), - - .cva6_cmo_req_i (dcache_cmo_req_i), - .cva6_cmo_resp_o(dcache_cmo_resp_o), - - .dcache_req_valid_o(dcache_req_valid[NumPorts]), - .dcache_req_ready_i(dcache_req_ready[NumPorts]), - .dcache_req_o (dcache_req[NumPorts]), - .dcache_req_abort_o(dcache_req_abort[NumPorts]), - .dcache_req_tag_o (dcache_req_tag[NumPorts]), - .dcache_req_pma_o (dcache_req_pma[NumPorts]), - - .dcache_rsp_valid_i(dcache_rsp_valid[NumPorts]), - .dcache_rsp_i (dcache_rsp[NumPorts]) - ); -`else - assign dcache_req_valid[NumPorts] = 1'b0, - dcache_req[NumPorts] = '0, - dcache_req_abort[NumPorts] = 1'b0, - dcache_req_tag[NumPorts] = '0, - dcache_req_pma[NumPorts] = '0; -`endif endgenerate // Snoop load port @@ -266,26 +248,6 @@ module cva6_hpdcache_wrapper snoop_addr_tag[1] = dcache_req_tag[NumPorts-1], snoop_phys_indexed[1] = dcache_req[NumPorts-1].phys_indexed; -`ifdef HPDCACHE_ENABLE_CMO - // Snoop CMO port (in case of read prefetch accesses) - assign dcache_cmo_req_is_prefetch = hpdcache_pkg::is_cmo_prefetch( - dcache_req[NumPorts].op, dcache_req[NumPorts].size - ); - assign snoop_valid[2] = dcache_req_valid[NumPorts] - & dcache_req_ready[NumPorts] - & dcache_cmo_req_is_prefetch, - snoop_abort[2] = dcache_req_abort[NumPorts], - snoop_addr_offset[2] = dcache_req[NumPorts].addr_offset, - snoop_addr_tag[2] = dcache_req_tag[NumPorts], - snoop_phys_indexed[2] = dcache_req[NumPorts].phys_indexed; -`else - assign snoop_valid[2] = 1'b0, - snoop_abort[2] = 1'b0, - snoop_addr_offset[2] = '0, - snoop_addr_tag[2] = '0, - snoop_phys_indexed[2] = 1'b0; -`endif - generate for (genvar h = 0; h < NrHwPrefetchers; h++) begin : gen_hwpf_throttle assign hwpf_throttle_in[h] = hwpf_stride_pkg::hwpf_stride_throttle_t'(hwpf_throttle_i[h]); @@ -296,7 +258,7 @@ module cva6_hpdcache_wrapper hwpf_stride_wrapper #( .HPDcacheCfg (HPDcacheCfg), .NUM_HW_PREFETCH (NrHwPrefetchers), - .NUM_SNOOP_PORTS (3), + .NUM_SNOOP_PORTS (2), .hpdcache_tag_t (hpdcache_tag_t), .hpdcache_req_offset_t(hpdcache_req_offset_t), .hpdcache_req_data_t (hpdcache_req_data_t), @@ -326,16 +288,16 @@ module cva6_hpdcache_wrapper .snoop_addr_tag_i (snoop_addr_tag), .snoop_phys_indexed_i(snoop_phys_indexed), - .hpdcache_req_sid_i(hpdcache_req_sid_t'(NumPorts + 1)), + .hpdcache_req_sid_i(hpdcache_req_sid_t'(NumPorts)), - .hpdcache_req_valid_o(dcache_req_valid[NumPorts+1]), - .hpdcache_req_ready_i(dcache_req_ready[NumPorts+1]), - .hpdcache_req_o (dcache_req[NumPorts+1]), - .hpdcache_req_abort_o(dcache_req_abort[NumPorts+1]), - .hpdcache_req_tag_o (dcache_req_tag[NumPorts+1]), - .hpdcache_req_pma_o (dcache_req_pma[NumPorts+1]), - .hpdcache_rsp_valid_i(dcache_rsp_valid[NumPorts+1]), - .hpdcache_rsp_i (dcache_rsp[NumPorts+1]) + .hpdcache_req_valid_o(dcache_req_valid[NumPorts]), + .hpdcache_req_ready_i(dcache_req_ready[NumPorts]), + .hpdcache_req_o (dcache_req[NumPorts]), + .hpdcache_req_abort_o(dcache_req_abort[NumPorts]), + .hpdcache_req_tag_o (dcache_req_tag[NumPorts]), + .hpdcache_req_pma_o (dcache_req_pma[NumPorts]), + .hpdcache_rsp_valid_i(dcache_rsp_valid[NumPorts]), + .hpdcache_rsp_i (dcache_rsp[NumPorts]) ); hpdcache #( @@ -383,6 +345,9 @@ module cva6_hpdcache_wrapper .mem_resp_read_valid_i(dcache_mem_resp_read_valid_i), .mem_resp_read_i (dcache_mem_resp_read_i), + .mem_resp_read_inval_i (dcache_mem_resp_read_inval_i), + .mem_resp_read_inval_nline_i(dcache_mem_resp_read_inval_nline_i), + .mem_req_write_ready_i(dcache_mem_req_write_ready_i), .mem_req_write_valid_o(dcache_mem_req_write_valid_o), .mem_req_write_o (dcache_mem_req_write_o), @@ -395,17 +360,22 @@ module cva6_hpdcache_wrapper .mem_resp_write_valid_i(dcache_mem_resp_write_valid_i), .mem_resp_write_i (dcache_mem_resp_write_i), - .evt_cache_write_miss_o(dcache_write_miss), - .evt_cache_read_miss_o (dcache_read_miss), - .evt_uncached_req_o ( /* unused */), - .evt_cmo_req_o ( /* unused */), - .evt_write_req_o ( /* unused */), - .evt_read_req_o ( /* unused */), - .evt_prefetch_req_o ( /* unused */), - .evt_req_on_hold_o ( /* unused */), - .evt_rtab_rollback_o ( /* unused */), - .evt_stall_refill_o ( /* unused */), - .evt_stall_o ( /* unused */), + .evt_cache_write_miss_o (dcache_write_miss), + .evt_cache_read_miss_o (dcache_read_miss), + .evt_cache_dir_unc_err_o(dcache_dir_unc_err_o), + .evt_cache_dir_cor_err_o(dcache_dir_cor_err_o), + .evt_cache_dat_unc_err_o(dcache_dat_unc_err_o), + .evt_cache_dat_cor_err_o(dcache_dat_cor_err_o), + .evt_scrub_complete_o (dcache_scrub_cycle_o), + .evt_uncached_req_o ( /* unused */), + .evt_cmo_req_o ( /* unused */), + .evt_write_req_o ( /* unused */), + .evt_read_req_o ( /* unused */), + .evt_prefetch_req_o ( /* unused */), + .evt_req_on_hold_o ( /* unused */), + .evt_rtab_rollback_o ( /* unused */), + .evt_stall_refill_o ( /* unused */), + .evt_stall_o ( /* unused */), .wbuf_empty_o(wbuffer_empty_o), @@ -417,7 +387,10 @@ module cva6_hpdcache_wrapper .cfg_prefetch_updt_plru_i (1'b1), .cfg_error_on_cacheable_amo_i (1'b0), .cfg_rtab_single_entry_i (1'b0), - .cfg_default_wb_i (1'b0) + .cfg_default_wb_i (1'b0), + .cfg_scrub_enable_i (dcache_scrub_enable_i), + .cfg_scrub_period_i (dcache_scrub_period_i), + .cfg_scrub_restart_i (1'b0) ); assign dcache_miss_o = dcache_read_miss, wbuffer_not_ni_o = wbuffer_empty_o; diff --git a/core/cache_subsystem/cva6_icache.sv b/core/cache_subsystem/cva6_icache.sv index d97fed369a0..d84ee26d26f 100644 --- a/core/cache_subsystem/cva6_icache.sv +++ b/core/cache_subsystem/cva6_icache.sv @@ -209,7 +209,7 @@ module cva6_icache miss_o = 1'b0; // handle invalidations unconditionally - // note: invald are mutually exclusive with + // note: invals are mutually exclusive with // ifills, since both arrive over the same IF // however, we need to make sure below that we // do not trigger a cache readout at the same time... @@ -424,9 +424,9 @@ module cva6_icache logic [CVA6Cfg.ICACHE_SET_ASSOC_WIDTH-1:0] hit_idx; for (genvar i = 0; i < CVA6Cfg.ICACHE_SET_ASSOC; i++) begin : gen_tag_cmpsel - assign cl_hit[i] = (cl_tag_rdata[i] == cl_tag_d) & vld_rdata[i]; - assign cl_sel[i] = cl_rdata[i][{cl_offset_q, 3'b0}+:CVA6Cfg.FETCH_WIDTH]; - assign cl_user[i] = cl_ruser[i][{cl_offset_q, 3'b0}+:CVA6Cfg.FETCH_USER_WIDTH]; + assign cl_hit[i] = (cl_tag_rdata[i] == cl_tag_d) & vld_rdata[i]; + assign cl_sel[i] = cl_rdata[i][{cl_offset_q, 3'b0}+:CVA6Cfg.FETCH_WIDTH]; + assign cl_user[i] = CVA6Cfg.FETCH_USER_EN ? cl_ruser[i][{cl_offset_q, 3'b0}+:CVA6Cfg.FETCH_USER_WIDTH] : '0; end @@ -441,10 +441,10 @@ module cva6_icache always_comb begin if (cmp_en_q) begin dreq_o.data = cl_sel[hit_idx]; - dreq_o.user = cl_user[hit_idx]; + dreq_o.user = CVA6Cfg.FETCH_USER_EN ? cl_user[hit_idx] : '0; end else begin dreq_o.data = mem_rtrn_i.data[{cl_offset_q, 3'b0}+:CVA6Cfg.FETCH_WIDTH]; - dreq_o.user = mem_rtrn_i.user[{cl_offset_q, 3'b0}+:CVA6Cfg.FETCH_USER_WIDTH]; + dreq_o.user = CVA6Cfg.FETCH_USER_EN ? mem_rtrn_i.user[{cl_offset_q, 3'b0}+:CVA6Cfg.FETCH_USER_WIDTH] : '0; end end diff --git a/core/cache_subsystem/hpdcache b/core/cache_subsystem/hpdcache index 04de8089698..e8f072e117e 160000 --- a/core/cache_subsystem/hpdcache +++ b/core/cache_subsystem/hpdcache @@ -1 +1 @@ -Subproject commit 04de80896981527c34fbbd35d7b1ef787a082d7c +Subproject commit e8f072e117ed3282950d4d1e975f462b173f0de0 diff --git a/core/cache_subsystem/std_cache_subsystem.sv b/core/cache_subsystem/std_cache_subsystem.sv index 7adb935c27a..a38e2e7a7a9 100644 --- a/core/cache_subsystem/std_cache_subsystem.sv +++ b/core/cache_subsystem/std_cache_subsystem.sv @@ -183,7 +183,7 @@ module std_cache_subsystem // W Channel cva6_fifo_v3 #( .DATA_WIDTH (2), - // we can have a maximum of 4 oustanding transactions as each port is blocking + // we can have a maximum of 4 outstanding transactions as each port is blocking .DEPTH (4), .FALL_THROUGH(1'b1), .FPGA_EN (CVA6Cfg.FpgaEn) diff --git a/core/cache_subsystem/wt_axi_adapter.sv b/core/cache_subsystem/wt_axi_adapter.sv index 22cc5c075c2..784c193b22d 100644 --- a/core/cache_subsystem/wt_axi_adapter.sv +++ b/core/cache_subsystem/wt_axi_adapter.sv @@ -52,6 +52,9 @@ module wt_axi_adapter output axi_req_t axi_req_o, input axi_rsp_t axi_resp_i, + // Endianness Control Signal from CSR + input logic mbe_i, + // Invalidations input logic [63:0] inval_addr_i, input logic inval_valid_i, @@ -264,43 +267,98 @@ module wt_axi_adapter end // RISC-V atops have a load semantic AMO_SWAP: axi_wr_atop = axi_pkg::ATOP_ATOMICSWAP; - AMO_ADD: - axi_wr_atop = { - axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_LITTLE_END, axi_pkg::ATOP_ADD - }; + AMO_ADD: begin + if (mbe_i) begin + axi_wr_atop = { + axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_BIG_END, axi_pkg::ATOP_ADD + }; + end else begin + axi_wr_atop = { + axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_LITTLE_END, axi_pkg::ATOP_ADD + }; + end + end AMO_AND: begin // in this case we need to invert the data to get a "CLR" axi_wr_data[0] = ~{(CVA6Cfg.AxiDataWidth / CVA6Cfg.XLEN) {dcache_data.data}}; axi_wr_user = ~{(CVA6Cfg.AxiDataWidth / CVA6Cfg.XLEN) {dcache_data.user}}; - axi_wr_atop = { - axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_LITTLE_END, axi_pkg::ATOP_CLR - }; + if (mbe_i) begin + axi_wr_atop = { + axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_BIG_END, axi_pkg::ATOP_CLR + }; + end else begin + axi_wr_atop = { + axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_LITTLE_END, axi_pkg::ATOP_CLR + }; + end + end + AMO_OR: begin + if (mbe_i) begin + axi_wr_atop = { + axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_BIG_END, axi_pkg::ATOP_SET + }; + end else begin + axi_wr_atop = { + axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_LITTLE_END, axi_pkg::ATOP_SET + }; + end + end + AMO_XOR: begin + if (mbe_i) begin + axi_wr_atop = { + axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_BIG_END, axi_pkg::ATOP_EOR + }; + end else begin + axi_wr_atop = { + axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_LITTLE_END, axi_pkg::ATOP_EOR + }; + end + end + AMO_MAX: begin + if (mbe_i) begin + axi_wr_atop = { + axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_BIG_END, axi_pkg::ATOP_SMAX + }; + end else begin + axi_wr_atop = { + axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_LITTLE_END, axi_pkg::ATOP_SMAX + }; + end + end + AMO_MAXU: begin + if (mbe_i) begin + axi_wr_atop = { + axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_BIG_END, axi_pkg::ATOP_UMAX + }; + end else begin + axi_wr_atop = { + axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_LITTLE_END, axi_pkg::ATOP_UMAX + }; + end + end + AMO_MIN: begin + if (mbe_i) begin + axi_wr_atop = { + axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_BIG_END, axi_pkg::ATOP_SMIN + }; + end else begin + axi_wr_atop = { + axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_LITTLE_END, axi_pkg::ATOP_SMIN + }; + end + end + AMO_MINU: begin + if (mbe_i) begin + axi_wr_atop = { + axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_BIG_END, axi_pkg::ATOP_UMIN + }; + end else begin + axi_wr_atop = { + axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_LITTLE_END, axi_pkg::ATOP_UMIN + }; + end end - AMO_OR: - axi_wr_atop = { - axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_LITTLE_END, axi_pkg::ATOP_SET - }; - AMO_XOR: - axi_wr_atop = { - axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_LITTLE_END, axi_pkg::ATOP_EOR - }; - AMO_MAX: - axi_wr_atop = { - axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_LITTLE_END, axi_pkg::ATOP_SMAX - }; - AMO_MAXU: - axi_wr_atop = { - axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_LITTLE_END, axi_pkg::ATOP_UMAX - }; - AMO_MIN: - axi_wr_atop = { - axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_LITTLE_END, axi_pkg::ATOP_SMIN - }; - AMO_MINU: - axi_wr_atop = { - axi_pkg::ATOP_ATOMICLOAD, axi_pkg::ATOP_LITTLE_END, axi_pkg::ATOP_UMIN - }; - default: ; // Do nothing + default: ; // Do nothing endcase end end diff --git a/core/cache_subsystem/wt_cache_subsystem.sv b/core/cache_subsystem/wt_cache_subsystem.sv index 0a2ac0c79c4..4f40002f482 100644 --- a/core/cache_subsystem/wt_cache_subsystem.sv +++ b/core/cache_subsystem/wt_cache_subsystem.sv @@ -59,6 +59,7 @@ module wt_cache_subsystem // AMO interface input amo_req_t dcache_amo_req_i, output amo_resp_t dcache_amo_resp_o, + input logic mbe_i, // Request ports input dcache_req_i_t [NumPorts-1:0] dcache_req_ports_i, // to/from LSU output dcache_req_o_t [NumPorts-1:0] dcache_req_ports_o, // to/from LSU @@ -91,7 +92,7 @@ module wt_cache_subsystem logic [CVA6Cfg.XLEN-1:0] data; // word width of processor (no block stores at the moment) logic [CVA6Cfg.DCACHE_USER_WIDTH-1:0] user; // user width of processor (no block stores at the moment) logic nc; // noncacheable - logic [CVA6Cfg.MEM_TID_WIDTH-1:0] tid; // threadi id (used as transaction id in Ariane) + logic [CVA6Cfg.MEM_TID_WIDTH-1:0] tid; // thread id (used as transaction id in Ariane) ariane_pkg::amo_t amo_op; // amo opcode }; @@ -100,7 +101,7 @@ module wt_cache_subsystem logic [CVA6Cfg.DCACHE_LINE_WIDTH-1:0] data; // full cache line width logic [CVA6Cfg.DCACHE_USER_LINE_WIDTH-1:0] user; // user bits dcache_inval_t inv; // invalidation vector - logic [CVA6Cfg.MEM_TID_WIDTH-1:0] tid; // threadi id (used as transaction id in Ariane) + logic [CVA6Cfg.MEM_TID_WIDTH-1:0] tid; // thread id (used as transaction id in Ariane) }; logic icache_adapter_data_req, adapter_icache_data_ack, adapter_icache_rtrn_vld; @@ -164,6 +165,7 @@ module wt_cache_subsystem .wbuffer_not_ni_o(wbuffer_not_ni_o), .amo_req_i (dcache_amo_req_i), .amo_resp_o (dcache_amo_resp_o), + .mbe_i (mbe_i), .req_ports_i (dcache_req_ports_i), .req_ports_o (dcache_req_ports_o), .miss_vld_bits_o (miss_vld_bits_o), @@ -228,6 +230,7 @@ module wt_cache_subsystem .dcache_rtrn_o (adapter_dcache), .axi_req_o (noc_req_o), .axi_resp_i (noc_resp_i), + .mbe_i (mbe_i), .inval_addr_i (inval_addr_i), .inval_valid_i (inval_valid_i), .inval_ready_o (inval_ready_o) diff --git a/core/cache_subsystem/wt_dcache.sv b/core/cache_subsystem/wt_dcache.sv index 5b49d957fbe..76248861597 100644 --- a/core/cache_subsystem/wt_dcache.sv +++ b/core/cache_subsystem/wt_dcache.sv @@ -41,6 +41,7 @@ module wt_dcache // AMO interface input amo_req_t amo_req_i, output amo_resp_t amo_resp_o, + input logic mbe_i, // Request ports input dcache_req_i_t [NumPorts-1:0] req_ports_i, @@ -148,6 +149,7 @@ module wt_dcache // amo interface .amo_req_i (amo_req_i), .amo_resp_o (amo_resp_o), + .mbe_i (mbe_i), // miss handling interface .miss_req_i (miss_req), .miss_ack_o (miss_ack), diff --git a/core/cache_subsystem/wt_dcache_missunit.sv b/core/cache_subsystem/wt_dcache_missunit.sv index 5eb202e08e6..c40491ab45d 100644 --- a/core/cache_subsystem/wt_dcache_missunit.sv +++ b/core/cache_subsystem/wt_dcache_missunit.sv @@ -38,6 +38,7 @@ module wt_dcache_missunit // AMO interface input amo_req_t amo_req_i, output amo_resp_t amo_resp_o, + input logic mbe_i, // miss handling interface (ld, ptw, wbuffer) input logic [NumPorts-1:0] miss_req_i, output logic [NumPorts-1:0] miss_ack_o, @@ -53,7 +54,7 @@ module wt_dcache_missunit output logic [NumPorts-1:0] miss_replay_o, // signals response from memory output logic [NumPorts-1:0] miss_rtrn_vld_o, - output logic [CVA6Cfg.MEM_TID_WIDTH-1:0] miss_rtrn_id_o, // only used for writes, set to zero fro reads + output logic [CVA6Cfg.MEM_TID_WIDTH-1:0] miss_rtrn_id_o, // only used for writes, set to zero for reads // from writebuffer input logic [CVA6Cfg.DCACHE_MAX_TX-1:0][CVA6Cfg.PLEN-1:0] tx_paddr_i, // used to check for address collisions with read operations input logic [CVA6Cfg.DCACHE_MAX_TX-1:0] tx_vld_i, // used to check for address collisions with read operations @@ -288,9 +289,32 @@ module wt_dcache_missunit assign amo_rtrn_mux = mem_rtrn_i.data[amo_req_i.operand_a[CVA6Cfg.DCACHE_OFFSET_WIDTH-1:3]*64+:64]; end - // always sign extend 32bit values - assign amo_resp_o.result = (amo_req_i.size==2'b10) ? {{32{amo_rtrn_mux[amo_req_i.operand_a[2]*32 + 31]}},amo_rtrn_mux[amo_req_i.operand_a[2]*32 +: 32]} : - amo_rtrn_mux ; + // BIG ENDIAN CAPABLE logic for amo return value from memory + logic [63:0] amoResult_LE; + logic [63:0] amoResult_BE; + + // Little Endian Calculation of return value from memory (when 32bit, we need to sign extend) + logic [63:0] amoResult_32bitLE; + assign amoResult_32bitLE = { + {32{amo_rtrn_mux[amo_req_i.operand_a[2]*32+31]}}, amo_rtrn_mux[amo_req_i.operand_a[2]*32+:32] + }; + + // Big Endian Calculations of return value from memory with AMO operations (Bytes need swapping and sign extension is different) + logic [63:0] amoResult_64bitBE; + logic [31:0] amoResult_32bitBE_NoSign; + logic [63:0] amoResult_32bitBE; + assign amoResult_64bitBE = {<<8{amo_rtrn_mux}}; + assign amoResult_32bitBE_NoSign = {<<8{amo_rtrn_mux[amo_req_i.operand_a[2]*32+:32]}}; + assign amoResult_32bitBE = { + {32{amo_rtrn_mux[amo_req_i.operand_a[2]*32+7]}}, amoResult_32bitBE_NoSign + }; // +7 to the base address to find the sign bit, as in BE the Most Significant Byte is always at the lowest addressed byte. + + assign amoResult_BE = (amo_req_i.size == 2'b10) ? amoResult_32bitBE : amoResult_64bitBE; + assign amoResult_LE = (amo_req_i.size == 2'b10) ? amoResult_32bitLE : amo_rtrn_mux; + + assign amo_resp_o.result = mbe_i ? amoResult_BE : amoResult_LE; + // end BIG ENDIAN CAPABLE logic for amo return value from memory + assign amo_req_d = amo_req_i.req; end diff --git a/core/cache_subsystem/wt_l15_adapter.sv b/core/cache_subsystem/wt_l15_adapter.sv index cd1ca229678..bba4886893e 100644 --- a/core/cache_subsystem/wt_l15_adapter.sv +++ b/core/cache_subsystem/wt_l15_adapter.sv @@ -48,10 +48,10 @@ // https://parallel.princeton.edu/openpiton/docs/micro_arch.pdf // - module wt_l15_adapter import ariane_pkg::*; import wt_cache_pkg::*; + import l15_pkg::*; #( parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty, parameter type icache_req_t = logic, @@ -83,51 +83,6 @@ module wt_l15_adapter input l15_rtrn_t l15_rtrn_i ); - localparam type l15_req_t = struct packed { - logic l15_val; // valid signal, asserted with request - logic l15_req_ack; // ack for response - wt_cache_pkg::l15_reqtypes_t l15_rqtype; // see below for encoding - logic l15_nc; // non-cacheable bit - logic [2:0] l15_size; // transaction size: 000=Byte 001=2Byte; 010=4Byte; 011=8Byte; 111=Cache line (16/32Byte) - logic [CVA6Cfg.MEM_TID_WIDTH-1:0] l15_threadid; // currently 0 or 1 - logic l15_prefetch; // unused in openpiton - logic l15_invalidate_cacheline; // unused by Ariane as L1 has no ECC at the moment - logic l15_blockstore; // unused in openpiton - logic l15_blockinitstore; // unused in openpiton - logic [CVA6Cfg.DCACHE_SET_ASSOC_WIDTH-1:0] l15_l1rplway; // way to replace - logic [39:0] l15_address; // physical address - logic [63:0] l15_data; // word to write - logic [63:0] l15_data_next_entry; // unused in Ariane (only used for CAS atomic requests) - logic [wt_cache_pkg::L15_TLB_CSM_WIDTH-1:0] l15_csm_data; // unused in Ariane - logic [3:0] l15_amo_op; // atomic operation type - }; - localparam type l15_rtrn_t = struct packed { - logic l15_ack; // ack for request struct - logic l15_header_ack; // ack for request struct - logic l15_val; // valid signal for return struct - wt_l15_adapter::l15_rtrntypes_t l15_returntype; // see below for encoding - logic l15_l2miss; // unused in Ariane - logic [1:0] l15_error; // unused in openpiton - logic l15_noncacheable; // non-cacheable bit - logic l15_atomic; // asserted in load return and store ack packets of atomic tx - logic [CVA6Cfg.MEM_TID_WIDTH-1:0] l15_threadid; // used as transaction ID - logic l15_prefetch; // unused in openpiton - logic l15_f4b; // 4byte instruction fill from I/O space (nc). - logic [63:0] l15_data_0; // used for both caches - logic [63:0] l15_data_1; // used for both caches - logic [63:0] l15_data_2; // currently only used for I$ - logic [63:0] l15_data_3; // currently only used for I$ - logic l15_inval_icache_all_way; // invalidate all ways - logic l15_inval_dcache_all_way; // unused in openpiton - logic [15:4] l15_inval_address_15_4; // invalidate selected cacheline - logic l15_cross_invalidate; // unused in openpiton - logic [CVA6Cfg.DCACHE_SET_ASSOC_WIDTH-1:0] l15_cross_invalidate_way; // unused in openpiton - logic l15_inval_dcache_inval; // invalidate selected cacheline and way - logic l15_inval_icache_inval; // unused in openpiton - logic [CVA6Cfg.DCACHE_SET_ASSOC_WIDTH-1:0] l15_inval_way; // way to invalidate - logic l15_blockinitstore; // unused in openpiton - }; - // request path icache_req_t icache_data; logic icache_data_full, icache_data_empty; @@ -166,7 +121,10 @@ module wt_l15_adapter // data mux assign l15_req_o.l15_nc = (arb_idx) ? dcache_data.nc : icache_data.nc; // icache fills are either cachelines or 4byte fills, depending on whether they go to the Piton I/O space or not. - assign l15_req_o.l15_size = (arb_idx) ? dcache_data.size : (icache_data.nc) ? 3'b010 : 3'b111; + assign l15_req_o.l15_size = (arb_idx) ? (dcache_data.size == 3'b111) ? ((CVA6Cfg.DCACHE_OFFSET_WIDTH == 3'b100) ? 3'b101 : + (CVA6Cfg.DCACHE_OFFSET_WIDTH == 3'b101) ? 3'b110 : 3'b111) : + dcache_data.size + 1 : + (icache_data.nc) ? 3'b011 : 3'b110; assign l15_req_o.l15_threadid = (arb_idx) ? dcache_data.tid : icache_data.tid; assign l15_req_o.l15_prefetch = '0; // unused in openpiton assign l15_req_o.l15_invalidate_cacheline = '0; // unused by Ariane as L1 has no ECC at the moment @@ -178,7 +136,8 @@ module wt_l15_adapter assign l15_req_o.l15_data_next_entry = '0; // unused in Ariane (only used for CAS atomic requests) assign l15_req_o.l15_csm_data = '0; // unused in Ariane (only used for coherence domain restriction features) - assign l15_req_o.l15_amo_op = dcache_data.amo_op; + assign l15_req_o.l15_amo_op = l15_pkg::l15_amo_e'(logic'(dcache_data.amo_op)); + assign l15_req_o.l15_be = '0; // Not supported by WT cache // openpiton is big endian @@ -303,8 +262,12 @@ module wt_l15_adapter always_comb begin : p_rtrn_logic icache_rtrn_o.rtype = ICACHE_IFILL_ACK; dcache_rtrn_o.rtype = DCACHE_LOAD_ACK; - icache_rtrn_vld_o = 1'b0; - dcache_rtrn_vld_o = 1'b0; + icache_rtrn_vld_o = 1'b0; + dcache_rtrn_vld_o = 1'b0; + icache_rtrn_o.inv.vld = rtrn_fifo_data.l15_inval_icache_inval; + icache_rtrn_o.inv.all = rtrn_fifo_data.l15_inval_icache_all_way; + dcache_rtrn_o.inv.vld = rtrn_fifo_data.l15_inval_dcache_inval; + dcache_rtrn_o.inv.all = rtrn_fifo_data.l15_inval_dcache_all_way; if (!rtrn_fifo_empty) begin unique case (rtrn_fifo_data.l15_returntype) L15_LOAD_RET: begin @@ -341,7 +304,7 @@ module wt_l15_adapter end // openpiton is big endian - if (SwapEndianess) begin : gen_swap + if (CVA6Cfg.NOCType == config_pkg::NOC_TYPE_L15_BIG_ENDIAN) begin : gen_swap assign dcache_rtrn_o.data = { swendian64(rtrn_fifo_data.l15_data_1), swendian64(rtrn_fifo_data.l15_data_0) }; @@ -368,15 +331,11 @@ module wt_l15_adapter assign dcache_rtrn_o.tid = rtrn_fifo_data.l15_threadid; // invalidation signal mapping - assign icache_rtrn_o.inv.idx = {rtrn_fifo_data.l15_inval_address_15_4, 4'b0000}; + assign icache_rtrn_o.inv.idx = {rtrn_fifo_data.l15_inval_address[15:4], 4'b0000}; assign icache_rtrn_o.inv.way = rtrn_fifo_data.l15_inval_way; - assign icache_rtrn_o.inv.vld = rtrn_fifo_data.l15_inval_icache_inval; - assign icache_rtrn_o.inv.all = rtrn_fifo_data.l15_inval_icache_all_way; - assign dcache_rtrn_o.inv.idx = {rtrn_fifo_data.l15_inval_address_15_4, 4'b0000}; + assign dcache_rtrn_o.inv.idx = {rtrn_fifo_data.l15_inval_address[15:4], 4'b0000}; assign dcache_rtrn_o.inv.way = rtrn_fifo_data.l15_inval_way; - assign dcache_rtrn_o.inv.vld = rtrn_fifo_data.l15_inval_dcache_inval; - assign dcache_rtrn_o.inv.all = rtrn_fifo_data.l15_inval_dcache_all_way; fifo_v2 #( .dtype(l15_rtrn_t), diff --git a/core/commit_stage.sv b/core/commit_stage.sv index d41c6b5a309..4577de449d5 100644 --- a/core/commit_stage.sv +++ b/core/commit_stage.sv @@ -72,7 +72,7 @@ module commit_stage output logic [CVA6Cfg.TRANS_ID_BITS-1:0] commit_tran_id_o, // Valid AMO in commit stage - EX_STAGE output logic amo_valid_commit_o, - // no store is pending - EX_STAGE + // No store is pending - EX_STAGE input logic no_st_pending_i, // Commit the pending CSR instruction - EX_STAGE output logic commit_csr_o, @@ -87,7 +87,14 @@ module commit_stage // TO_BE_COMPLETED - CONTROLLER output logic hfence_vvma_o, // TO_BE_COMPLETED - CONTROLLER - output logic hfence_gvma_o + output logic hfence_gvma_o, + // Shared TLB is still processing a multi-cycle flush + input logic shared_tlb_flush_busy_i, + // Trigger module + input logic sdtrig_commit_icount_valid_i, + input logic [$clog2(CVA6Cfg.NrCommitPorts)-1:0] sdtrig_commit_icount_nr_instr_i, + input logic [CVA6Cfg.XLEN-1:0] sdtrig_commit_action_i, + input logic sdtrig_commit_std_exception_valid_i ); // ila_0 i_ila_commit ( @@ -113,21 +120,27 @@ module commit_stage always_comb begin : dirty_fp_state dirty_fp_state_o = 1'b0; for (int i = 0; i < CVA6Cfg.NrCommitPorts; i++) begin - dirty_fp_state_o |= commit_ack_o[i] & (commit_instr_i[i].fu inside {FPU, FPU_VEC} || (CVA6Cfg.FpPresent && ariane_pkg::is_rd_fpr( + dirty_fp_state_o |= commit_ack_o[i] & ((commit_instr_i[i].fu inside {FPU, FPU_VEC} & CVA6Cfg.FpPresent & ariane_pkg::fd_changes_rd_state( commit_instr_i[i].op - // Check if we issued a vector floating-point instruction to the accellerator - ))) | commit_instr_i[i].fu == ACCEL && commit_instr_i[i].vfp; + )) || (CVA6Cfg.FpPresent && ariane_pkg::is_rd_fpr( + commit_instr_i[i].op + // Check if we issued a vector floating-point instruction to the accelerator + ))) | (commit_instr_i[i].fu == ACCEL && commit_instr_i[i].vfp); end end assign commit_tran_id_o = commit_instr_i[0].trans_id; + exception_t ex_next_instr_d, ex_next_instr_q; + logic instr_0_is_amo; logic [CVA6Cfg.NrCommitPorts-1:0] commit_macro_ack; assign instr_0_is_amo = is_amo(commit_instr_i[0].op); // ------------------- // Commit Instruction // ------------------- + logic tlb_flush_can_commit; + assign tlb_flush_can_commit = no_st_pending_i && !shared_tlb_flush_busy_i; // write register file or commit instruction in LSU or CSR Buffer always_comb begin : commit // default assignments @@ -155,7 +168,8 @@ module commit_stage // we do not commit the instruction yet if we requested a halt if (commit_instr_i[0].valid && !halt_i) begin // we will not commit the instruction if we took an exception - if (commit_instr_i[0].ex.valid) begin + if (commit_instr_i[0].ex.valid + || ((CVA6Cfg.SdtrigEtrigger || CVA6Cfg.SdtrigItrigger) && sdtrig_commit_std_exception_valid_i || (CVA6Cfg.SdtrigIcount && sdtrig_commit_icount_valid_i && sdtrig_commit_icount_nr_instr_i == 0))) begin // However we can drop it (with its exception) if (commit_drop_i[0]) begin commit_ack_o[0] = 1'b1; @@ -227,9 +241,9 @@ module commit_stage if (CVA6Cfg.RVS && commit_instr_i[0].op == SFENCE_VMA) begin if (!commit_drop_i[0]) begin // no store pending so we can flush the TLBs and pipeline - sfence_vma_o = no_st_pending_i; + sfence_vma_o = tlb_flush_can_commit; //Only retire the fence when stores are drained and the shared TLB // wait for the store buffer to drain until flushing the pipeline - commit_ack_o[0] = no_st_pending_i; + commit_ack_o[0] = tlb_flush_can_commit; end end // ------------------ @@ -241,9 +255,9 @@ module commit_stage if (CVA6Cfg.RVH && commit_instr_i[0].op == HFENCE_VVMA) begin if (!commit_drop_i[0]) begin // no store pending so we can flush the TLBs and pipeline - hfence_vvma_o = no_st_pending_i; + hfence_vvma_o = tlb_flush_can_commit; // wait for the store buffer to drain until flushing the pipeline - commit_ack_o[0] = no_st_pending_i; + commit_ack_o[0] = tlb_flush_can_commit; end end // ------------------ @@ -255,9 +269,9 @@ module commit_stage if (CVA6Cfg.RVH && commit_instr_i[0].op == HFENCE_GVMA) begin if (!commit_drop_i[0]) begin // no store pending so we can flush the TLBs and pipeline - hfence_gvma_o = no_st_pending_i; + hfence_gvma_o = tlb_flush_can_commit; // wait for the store buffer to drain until flushing the pipeline - commit_ack_o[0] = no_st_pending_i; + commit_ack_o[0] = tlb_flush_can_commit; end end // ------------------ @@ -316,7 +330,9 @@ module commit_stage && !(commit_instr_i[0].fu inside {CSR}) && !flush_dcache_i && !(CVA6Cfg.RVA && instr_0_is_amo) - && !single_step_i) begin + && !single_step_i + && !(CVA6Cfg.Sdtrig && sdtrig_commit_icount_valid_i && sdtrig_commit_icount_nr_instr_i < CVA6Cfg.NrCommitPorts) + && (CVA6Cfg.SdtrigMcontrol6LoadData ? !commit_instr_i[0].ex.timing : !CVA6Cfg.SdtrigMcontrol6LoadData)) begin // only if the first instruction didn't throw an exception and this instruction won't throw an exception // and the functional unit is of type ALU, LOAD, CTRL_FLOW, MULT, FPU or FPU_VEC if (!commit_instr_i[1].ex.valid && (commit_instr_i[1].fu inside {ALU, LOAD, CTRL_FLOW, MULT, FPU, FPU_VEC})) begin @@ -366,10 +382,25 @@ module commit_stage // interrupts are correctly prioritized in the CSR reg file, exceptions are prioritized here exception_o.valid = 1'b0; exception_o.cause = '0; - exception_o.tval = '0; + exception_o.tval = '0; exception_o.tval2 = '0; exception_o.tinst = '0; - exception_o.gva = 1'b0; + exception_o.gva = 1'b0; + exception_o.timing = 1'b0; + + if (CVA6Cfg.SdtrigMcontrol6LoadData) begin + if (commit_ack_o[0]) begin + if(commit_instr_i[0].ex.timing && commit_ack_o[0]) begin //save exception if timing is set, with priority to port 0 + ex_next_instr_d = commit_instr_i[0].ex; + end else if (CVA6Cfg.NrCommitPorts > 1 && commit_instr_i[1].ex.timing && commit_ack_o[1]) begin + ex_next_instr_d = commit_instr_i[1].ex; + end else begin + ex_next_instr_d = ex_next_instr_q; + end + end + end else begin + ex_next_instr_d = '0; + end // we need a valid instruction in the commit stage if (commit_instr_i[0].valid && !commit_drop_i[0]) begin @@ -381,7 +412,7 @@ module commit_stage // if no earlier exception happened the commit instruction will still contain // the instruction bits from the ID stage. If a earlier exception happened we don't care // as we will overwrite it anyway in the next IF bl - exception_o.tval = commit_instr_i[0].ex.tval; + exception_o.tval = (CVA6Cfg.TvalEn) ? commit_instr_i[0].ex.tval : '0; if (CVA6Cfg.RVH) begin exception_o.tinst = commit_instr_i[0].ex.tinst; exception_o.tval2 = commit_instr_i[0].ex.tval2; @@ -402,5 +433,41 @@ module commit_stage if (halt_i) begin exception_o.valid = 1'b0; end + + // The trigger action is taken on a valid instruction, when the commit stage is not halted + if (commit_instr_i[0].valid && !halt_i + && ((CVA6Cfg.SdtrigIcount && sdtrig_commit_icount_valid_i && sdtrig_commit_icount_nr_instr_i == 'd0) + || ((CVA6Cfg.SdtrigEtrigger || CVA6Cfg.SdtrigItrigger) && sdtrig_commit_std_exception_valid_i))) begin + exception_o.valid = 1'b1; + exception_o.cause = sdtrig_commit_action_i; + // icount, itrigger and etrigger write 0 to tval + exception_o.tval = '0; + end + + if(CVA6Cfg.SdtrigMcontrol6LoadData && ex_next_instr_q.timing && !commit_instr_i[0].ex.timing) begin + //there should never be 2 timing bits set one after the other (port 1 and 2) because LSU can only make one mem access at a time + exception_o = ex_next_instr_q; + exception_o.timing = 1'b0; + exception_o.valid = 1'b1; + ex_next_instr_d = '0; + end + end + + if (CVA6Cfg.SdtrigMcontrol6LoadData) begin + always_ff @(posedge clk_i, negedge rst_ni) begin + if (!rst_ni) begin + ex_next_instr_q.valid <= 1'b0; + ex_next_instr_q.cause <= '0; + ex_next_instr_q.tval <= '0; + ex_next_instr_q.tval2 <= '0; + ex_next_instr_q.tinst <= '0; + ex_next_instr_q.gva <= 1'b0; + ex_next_instr_q.timing <= 1'b0; + end else begin + ex_next_instr_q <= ex_next_instr_d; + end + end + end else begin + assign ex_next_instr_q = '0; end endmodule diff --git a/core/compressed_decoder.sv b/core/compressed_decoder.sv index 26c0289a185..76385e5ea0b 100644 --- a/core/compressed_decoder.sv +++ b/core/compressed_decoder.sv @@ -227,6 +227,7 @@ module compressed_decoder #( 1'b0, riscv::OpcodeStore }; + if (instr_i[6] == 1'b1) illegal_instr_o = 1'b1; end default: begin diff --git a/core/controller.sv b/core/controller.sv index 8016869ec32..eae7f8f55b7 100644 --- a/core/controller.sv +++ b/core/controller.sv @@ -53,6 +53,8 @@ module controller input logic halt_csr_i, // Halt request from accelerator dispatcher - ACC_DISPATCHER input logic halt_acc_i, + // Halt frontend during fence.i to prevent fetching stale instructions + output logic halt_frontend_o, // Halt signal to commit stage - COMMIT_STAGE output logic halt_o, // Return from exception - CSR_REGFILE @@ -84,12 +86,15 @@ module controller // active fence - high if we are currently flushing the dcache logic fence_active_d, fence_active_q; logic flush_dcache; + // Added fence_i_active state to track fence.i progress + logic fence_i_active_d, fence_i_active_q; // ------------ // Flush CTRL // ------------ always_comb begin : flush_ctrl fence_active_d = fence_active_q; + fence_i_active_d = fence_i_active_q; set_pc_commit_o = 1'b0; flush_if_o = 1'b0; flush_unissued_instr_o = 1'b0; @@ -124,6 +129,7 @@ module controller flush_ex_o = 1'b1; // this is not needed in the case since we // have a write-through cache in this case + // or we are expecting explicit flush/inval via RVZiCbom if (CVA6Cfg.DcacheFlushOnFence) begin flush_dcache = 1'b1; fence_active_d = 1'b1; @@ -142,16 +148,22 @@ module controller flush_icache_o = 1'b1; // this is not needed in the case since we // have a write-through cache in this case - if (CVA6Cfg.DcacheFlushOnFence) begin - flush_dcache = 1'b1; + // When handling fence.i, flush both caches and activate fence_i state + if (CVA6Cfg.DcacheFlushOnFenceI) begin + flush_dcache = 1'b1; fence_active_d = 1'b1; + fence_i_active_d = 1'b1; end end // this is not needed in the case since we // have a write-through cache in this case - if (CVA6Cfg.DcacheFlushOnFence) begin - // wait for the acknowledge here + if (CVA6Cfg.DcacheFlushOnFence || CVA6Cfg.DcacheFlushOnFenceI) begin + // Wait for the acknowledge here + // Deassert fence_i state only after DCache flush completes + if (flush_dcache_ack_i && fence_i_active_q) begin + fence_i_active_d = 1'b0; + end if (flush_dcache_ack_i && fence_active_q) begin fence_active_d = 1'b0; // keep the flush dcache signal high as long as we didn't get the acknowledge from the cache @@ -242,7 +254,9 @@ module controller // ---------------------- always_comb begin // halt the core if the fence is active - halt_o = halt_csr_i || halt_acc_i || (CVA6Cfg.DcacheFlushOnFence && fence_active_q); + halt_o = halt_csr_i || halt_acc_i || ((CVA6Cfg.DcacheFlushOnFence || CVA6Cfg.DcacheFlushOnFenceI) && fence_active_q); + // Halt frontend during fence.i to synchronize ICache/DCache flushes + halt_frontend_o = fence_i_active_q; end // ---------------------- @@ -250,12 +264,14 @@ module controller // ---------------------- always_ff @(posedge clk_i or negedge rst_ni) begin if (~rst_ni) begin - fence_active_q <= 1'b0; - flush_dcache_o <= 1'b0; + fence_active_q <= 1'b0; + fence_i_active_q <= 1'b0; + flush_dcache_o <= 1'b0; end else begin - fence_active_q <= fence_active_d; + fence_active_q <= fence_active_d; + fence_i_active_q <= fence_i_active_d; // register on the flush signal, this signal might be critical - flush_dcache_o <= flush_dcache; + flush_dcache_o <= flush_dcache; end end endmodule diff --git a/core/csr_buffer.sv b/core/csr_buffer.sv index 3ea7eab05ba..104325e5b0a 100644 --- a/core/csr_buffer.sv +++ b/core/csr_buffer.sv @@ -56,7 +56,7 @@ module csr_buffer csr_reg_n = csr_reg_q; // by default we are ready csr_ready_o = 1'b1; - // if we have a valid uncomiited csr req or are just getting one WITHOUT a commit in, we are not ready + // if we have a valid uncommitted csr req or are just getting one WITHOUT a commit in, we are not ready if ((csr_reg_q.valid || csr_valid_i) && ~csr_commit_i) csr_ready_o = 1'b0; // if we got a valid from the scoreboard // store the CSR address diff --git a/core/csr_regfile.sv b/core/csr_regfile.sv index bc9e82720f5..96c6cdba2ae 100644 --- a/core/csr_regfile.sv +++ b/core/csr_regfile.sv @@ -23,13 +23,14 @@ module csr_regfile parameter type scoreboard_entry_t = logic, parameter type rvfi_probes_csr_t = logic, parameter int VmidWidth = 1, - parameter int unsigned MHPMCounterNum = 6 + parameter int unsigned MHPMCounterNum = 6, + parameter int unsigned N_Triggers = 4 ) ( // Subsystem Clock - SUBSYSTEM input logic clk_i, // Asynchronous reset active low - SUBSYSTEM input logic rst_ni, - // Timer threw a interrupt - SUBSYSTEM + // Timer threw an interrupt - SUBSYSTEM input logic time_irq_i, // send a flush request out when a CSR with a side effect changes - CONTROLLER output logic flush_o, @@ -37,7 +38,7 @@ module csr_regfile output logic halt_csr_o, // Instruction to be committed - ID_STAGE input scoreboard_entry_t commit_instr_i, - // Commit acknowledged a instruction -> increase instret CSR - COMMIT_STAGE + // Commit acknowledged an instruction -> increase instret CSR - COMMIT_STAGE input logic [CVA6Cfg.NrCommitPorts-1:0] commit_ack_i, // Address from which to start booting, mtvec is set to the same address - SUBSYSTEM input logic [CVA6Cfg.VLEN-1:0] boot_addr_i, @@ -53,7 +54,7 @@ module csr_regfile input logic [CVA6Cfg.XLEN-1:0] csr_wdata_i, // Read data out - COMMIT_STAGE output logic [CVA6Cfg.XLEN-1:0] csr_rdata_o, - // Mark the FP sate as dirty - COMMIT_STAGE + // Mark the FP state as dirty - COMMIT_STAGE input logic dirty_fp_state_i, // Write fflags register e.g.: we are retiring a floating point instruction - COMMIT_STAGE input logic csr_write_fflags_i, @@ -71,6 +72,8 @@ module csr_regfile output logic [CVA6Cfg.VLEN-1:0] trap_vector_base_o, // Current privilege level the CPU is in - EX_STAGE output riscv::priv_lvl_t priv_lvl_o, + // Data Endian mode + output logic mbe_o, // Current virtualization mode state the CPU is in - EX_STAGE output logic v_o, // Imprecise FP exception from the accelerator (fcsr.fflags format) - ACC_DISPATCHER @@ -81,7 +84,7 @@ module csr_regfile output riscv::xs_t fs_o, // Floating point extension virtual status - ID_STAGE output riscv::xs_t vfs_o, - // Floating-Point Accured Exceptions - COMMIT_STAGE + // Floating-Point Occurred Exceptions - COMMIT_STAGE output logic [4:0] fflags_o, // Floating-Point Dynamic Rounding Mode - EX_STAGE output logic [2:0] frm_o, @@ -125,6 +128,18 @@ module csr_regfile output logic [CVA6Cfg.PPNW-1:0] hgatp_ppn_o, // TO_BE_COMPLETED - EX_STAGE output logic [CVA6Cfg.VMID_WIDTH-1:0] vmid_o, + // machine-mode cache block invalidate enable - ID_STAGE + output riscv::cbie_t mcbie_o, + // supervisor-mode cache block invalidate enable - ID_STAGE + output riscv::cbie_t scbie_o, + // hypervisor-mode cache block invalidate enable - ID_STAGE + output riscv::cbie_t hcbie_o, + // machine-mode clean/flush cache block invalidate enable - ID_STAGE + output logic mcbcfe_o, + // supervisor-mode clean/flush cache block invalidate enable - ID_STAGE + output logic scbcfe_o, + // hypervisor-mode clean/flush cache block invalidate enable - ID_STAGE + output logic hcbcfe_o, // external interrupt in - SUBSYSTEM input logic [1:0] irq_i, // inter processor interrupt -> connected to machine mode sw - SUBSYSTEM @@ -151,6 +166,13 @@ module csr_regfile output logic icache_en_o, // L1 DCache Enable - CACHE output logic dcache_en_o, + output logic dcache_scrub_en_o, + output logic [5:0] dcache_scrub_period_o, + input logic dcache_scrub_cycle_i, + input logic dcache_dat_cor_err_i, + input logic dcache_dat_unc_err_i, + input logic dcache_dir_cor_err_i, + input logic dcache_dir_unc_err_i, // Accelerator memory consistent mode - ACC_DISPATCHER output logic acc_cons_en_o, // read/write address to performance counter module - PERF_COUNTERS @@ -162,17 +184,42 @@ module csr_regfile // TO_BE_COMPLETED - PERF_COUNTERS output logic perf_we_o, // PMP configuration containing pmpcfg for max 64 PMPs - ACC_DISPATCHER - output riscv::pmpcfg_t [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0] pmpcfg_o, + output riscv::pmpcfg_t [avoid_neg(CVA6Cfg.NrPMPEntries-1):0] pmpcfg_o, // PMP addresses - ACC_DISPATCHER - output logic [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0][CVA6Cfg.PLEN-3:0] pmpaddr_o, + output logic [avoid_neg(CVA6Cfg.NrPMPEntries-1):0][CVA6Cfg.PLEN-3:0] pmpaddr_o, // TO_BE_COMPLETED - PERF_COUNTERS output logic [31:0] mcountinhibit_o, // RVFI output rvfi_probes_csr_t rvfi_csr_o, //jvt output - output jvt_t jvt_o + output jvt_t jvt_o, + // trigger module signals + input logic [CVA6Cfg.VLEN-1:0] sdtrig_lsu_inputs_vaddr_i, + input logic [CVA6Cfg.XLEN-1:0] sdtrig_lsu_inputs_data_i, + input logic sdtrig_lsu_inputs_fu_i, + input ariane_pkg::fu_op sdtrig_lsu_inputs_op_i, + input logic sdtrig_lsu_inputs_valid_i, + input logic [CVA6Cfg.XLEN-1:0] sdtrig_load_data_i, + input logic sdtrig_load_valid_i, + + //LSU <-> trigger module commmunication + output logic sdtrig_load_stall_o, + output logic sdtrig_load_cancel_o, + output logic [CVA6Cfg.XLEN-1:0] sdtrig_load_action_o, + output logic sdtrig_store_stall_o, + output logic [CVA6Cfg.XLEN-1:0] sdtrig_store_action_o, + + //Decoder/fetch <-> trigger module communication + input logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.VLEN-1:0] fetch_sdtrig_pc_i, + input logic [CVA6Cfg.NrIssuePorts-1:0][31:0] fetch_sdtrig_instr_i, + output logic [CVA6Cfg.XLEN-1:0] sdtrig_decoder_action_o[CVA6Cfg.NrIssuePorts], + + //Commit <- trigger module + output logic sdtrig_commit_icount_valid_o, + output logic [$clog2(CVA6Cfg.NrCommitPorts)-1:0] sdtrig_commit_icount_nr_instr_o, + output logic [CVA6Cfg.XLEN-1:0] sdtrig_commit_action_o, + output logic sdtrig_commit_std_exception_valid_o ); - localparam logic [63:0] SMODE_STATUS_READ_MASK = ariane_pkg::smode_status_read_mask(CVA6Cfg); localparam logic [63:0] HS_DELEG_INTERRUPTS = { {32{1'b0}}, ariane_pkg::hs_deleg_interrupts(CVA6Cfg) @@ -195,6 +242,20 @@ module csr_regfile logic [CVA6Cfg.PPNW-1:0] ppn; } hgatp_t; + typedef struct packed { + logic eccPresent; + logic eccScrubberPresent; + logic [CVA6Cfg.XLEN-1:30] rsvd; + logic [3:0] dirCorErr; + logic [3:0] dirUncErr; + logic [3:0] datCorErr; + logic [3:0] datUncErr; + logic [3:0] scrubCycles; + logic [5:0] scrubPeriod; + logic scrubEn; + logic cacheEn; + } dcache_cfg_t; + // internal signal to keep track of access exceptions logic read_access_exception, update_access_exception, privilege_violation; logic virtual_read_access_exception, virtual_update_access_exception, virtual_privilege_violation; @@ -215,6 +276,7 @@ module csr_regfile riscv::hstatus_rv_t hstatus_q, hstatus_d; riscv::mstatus_rv_t vsstatus_q, vsstatus_d; logic [CVA6Cfg.XLEN-1:0] mstatus_extended; + logic [31:0] mstatush; logic [CVA6Cfg.XLEN-1:0] vsstatus_extended; satp_t satp_q, satp_d; satp_t vsatp_q, vsatp_d; @@ -266,7 +328,7 @@ module csr_regfile logic [CVA6Cfg.XLEN-1:0] vscause_q, vscause_d; logic [CVA6Cfg.XLEN-1:0] vstval_q, vstval_d; - logic [CVA6Cfg.XLEN-1:0] dcache_q, dcache_d; + dcache_cfg_t dcache_q, dcache_d; logic [CVA6Cfg.XLEN-1:0] icache_q, icache_d; logic [CVA6Cfg.XLEN-1:0] acc_cons_q, acc_cons_d; @@ -279,6 +341,29 @@ module csr_regfile logic [63:0][CVA6Cfg.PLEN-3:0] pmpaddr_q, pmpaddr_d, pmpaddr_next; logic [MHPMCounterNum+3-1:0] mcountinhibit_d, mcountinhibit_q; + // CBO enable flags from menvcfg/senvcfg/henvcfg + riscv::cbie_t mcbie_q, mcbie_d, scbie_q, scbie_d, hcbie_q, hcbie_d; + logic mcbcfe_q, mcbcfe_d, scbcfe_q, scbcfe_d, hcbcfe_q, hcbcfe_d; + + // Trigger Module Registers + logic [CVA6Cfg.XLEN-1:0] scontext_d, scontext_q; + logic [CVA6Cfg.XLEN-1:0] tdata1_from_tm; + logic [CVA6Cfg.XLEN-1:0] tdata1_to_tm; + logic [CVA6Cfg.XLEN-1:0] tdata2_from_tm; + logic [CVA6Cfg.XLEN-1:0] tdata2_to_tm; + logic [CVA6Cfg.XLEN-1:0] tdata3_from_tm; + logic [CVA6Cfg.XLEN-1:0] tdata3_to_tm; + logic [CVA6Cfg.XLEN-1:0] tselect_to_tm; + logic [CVA6Cfg.XLEN-1:0] tselect_from_tm; + logic tselect_we, tdata1_we, tdata2_we, tdata3_we; + logic flush_from_tm; + logic sdtrig_commit_std_exception_valid; + //Trigger module helpers + logic sdtrig_etrigger_context_saved_valid; + logic [CVA6Cfg.XLEN-1:0] sdtrig_etrigger_context_mepc; + logic [CVA6Cfg.XLEN-1:0] sdtrig_etrigger_context_mcause; + logic [CVA6Cfg.XLEN-1:0] sdtrig_etrigger_context_mtval; + localparam logic [CVA6Cfg.XLEN-1:0] IsaCode = (CVA6Cfg.XLEN'(CVA6Cfg.RVA) << 0) // A - Atomic Instructions extension | (CVA6Cfg.XLEN'(CVA6Cfg.RVB) << 1) // B - Bitmanip extension | (CVA6Cfg.XLEN'(CVA6Cfg.RVC) << 2) // C - Compressed extension @@ -292,7 +377,7 @@ module csr_regfile | (CVA6Cfg.XLEN'(CVA6Cfg.RVU) << 20) // U - User mode implemented | (CVA6Cfg.XLEN'(CVA6Cfg.RVV) << 21) // V - Vector extension | (CVA6Cfg.XLEN'(CVA6Cfg.NSX) << 23) // X - Non-standard extensions present - | ((CVA6Cfg.XLEN == 64 ? 2 : 1) << CVA6Cfg.XLEN - 2); // MXL + | ((CVA6Cfg.IS_XLEN64 ? 2 : 1) << CVA6Cfg.XLEN - 2); // MXL assign pmpcfg_o = pmpcfg_q[(CVA6Cfg.NrPMPEntries>0?CVA6Cfg.NrPMPEntries-1 : 0):0]; assign pmpaddr_o = pmpaddr_q[(CVA6Cfg.NrPMPEntries>0?CVA6Cfg.NrPMPEntries-1 : 0):0]; @@ -314,6 +399,7 @@ module csr_regfile // ---------------- assign mstatus_extended = CVA6Cfg.IS_XLEN64 ? mstatus_q[CVA6Cfg.XLEN-1:0] : {mstatus_q.sd, mstatus_q.wpri3[7:0], mstatus_q[22:0]}; + assign mstatush = {24'h0, mstatus_q.mpv, mstatus_q.gva, mstatus_q.mbe, mstatus_q.sbe, 4'h0}; if (CVA6Cfg.RVH) begin if (CVA6Cfg.IS_XLEN64) begin : gen_vsstatus_64read assign vsstatus_extended = vsstatus_q[CVA6Cfg.XLEN-1:0]; @@ -382,11 +468,41 @@ module csr_regfile riscv::CSR_DSCRATCH1: if (CVA6Cfg.DebugEn) csr_rdata = dscratch1_q; else read_access_exception = 1'b1; - // trigger module registers - riscv::CSR_TSELECT: read_access_exception = 1'b1; // not implemented - riscv::CSR_TDATA1: read_access_exception = 1'b1; // not implemented - riscv::CSR_TDATA2: read_access_exception = 1'b1; // not implemented - riscv::CSR_TDATA3: read_access_exception = 1'b1; // not implemented + // Trigger module registers + riscv::CSR_TSELECT: + if (CVA6Cfg.Sdtrig) csr_rdata = tselect_from_tm; + else read_access_exception = 1'b1; + riscv::CSR_TDATA1: + if (CVA6Cfg.Sdtrig) csr_rdata = tdata1_from_tm; + else read_access_exception = 1'b1; + riscv::CSR_TDATA2: + if (CVA6Cfg.Sdtrig) csr_rdata = tdata2_from_tm; + else read_access_exception = 1'b1; + riscv::CSR_TDATA3: + if (CVA6Cfg.Sdtrig && CVA6Cfg.SdtrigSupportTextra) csr_rdata = tdata3_from_tm; + else read_access_exception = 1'b1; + riscv::CSR_TINFO: begin + if (CVA6Cfg.Sdtrig) begin + // trigger info: the supported types icount = 3, itrigger = 4, etrigger = 5, mcontrol6 = 6, disabled = 15 + csr_rdata = { + {CVA6Cfg.XLEN - 32{1'b0}}, + 8'h1, + 8'h0, + 1'b1, + 8'b0, + CVA6Cfg.SdtrigMcontrol6, + CVA6Cfg.SdtrigEtrigger, + CVA6Cfg.SdtrigItrigger, + CVA6Cfg.SdtrigIcount, + 3'b0 + }; + end else begin + read_access_exception = 1'b1; + end + end + riscv::CSR_SCONTEXT: + if (CVA6Cfg.Sdtrig && CVA6Cfg.SdtrigSupportTextra) csr_rdata = scontext_q; + else read_access_exception = 1'b1; riscv::CSR_VSSTATUS: if (CVA6Cfg.RVH) csr_rdata = vsstatus_extended; else read_access_exception = 1'b1; @@ -465,9 +581,17 @@ module csr_regfile read_access_exception = 1'b1; end end - riscv::CSR_SENVCFG: - if (CVA6Cfg.RVS) csr_rdata = '0 | fiom_q; - else read_access_exception = 1'b1; + riscv::CSR_SENVCFG: begin + if (CVA6Cfg.RVS) begin + csr_rdata = '0 | fiom_q; + if (CVA6Cfg.RVZiCbom) begin + csr_rdata[5:4] = scbie_q; + csr_rdata[6] = scbcfe_q; + end + end else begin + read_access_exception = 1'b1; + end + end // hypervisor mode registers riscv::CSR_HSTATUS: if (CVA6Cfg.RVH) csr_rdata = hstatus_q[CVA6Cfg.XLEN-1:0]; @@ -502,9 +626,17 @@ module csr_regfile riscv::CSR_HGEIP: if (CVA6Cfg.RVH) csr_rdata = '0; else read_access_exception = 1'b1; - riscv::CSR_HENVCFG: - if (CVA6Cfg.RVH) csr_rdata = '0 | {{CVA6Cfg.XLEN - 1{1'b0}}, fiom_q}; - else read_access_exception = 1'b1; + riscv::CSR_HENVCFG: begin + if (CVA6Cfg.RVH) begin + csr_rdata = '0 | {{CVA6Cfg.XLEN - 1{1'b0}}, fiom_q}; + if (CVA6Cfg.RVZiCbom) begin + csr_rdata[5:4] = hcbie_q; + csr_rdata[6] = hcbcfe_q; + end + end else begin + read_access_exception = 1'b1; + end + end riscv::CSR_HGATP: begin if (CVA6Cfg.RVH) begin // intercept reads to HGATP if in HS-Mode and TVM is enabled @@ -521,14 +653,15 @@ module csr_regfile // machine mode registers riscv::CSR_MSTATUS: csr_rdata = mstatus_extended; riscv::CSR_MSTATUSH: - if (CVA6Cfg.XLEN == 32) csr_rdata = '0; + if (CVA6Cfg.IS_XLEN32) csr_rdata = mstatush; else read_access_exception = 1'b1; riscv::CSR_MISA: csr_rdata = IsaCode; riscv::CSR_MEDELEG: if (CVA6Cfg.RVS) csr_rdata = medeleg_q; else read_access_exception = 1'b1; riscv::CSR_MIDELEG: - if (CVA6Cfg.RVS) csr_rdata = mideleg_q; + if (CVA6Cfg.RVS) + csr_rdata = (CVA6Cfg.RVH) ? mideleg_q | HS_DELEG_INTERRUPTS[CVA6Cfg.XLEN-1:0] : mideleg_q; else read_access_exception = 1'b1; riscv::CSR_MIE: csr_rdata = mie_q; riscv::CSR_MTVEC: csr_rdata = mtvec_q; @@ -549,16 +682,25 @@ module csr_regfile else read_access_exception = 1'b1; riscv::CSR_MIP: csr_rdata = mip_q; riscv::CSR_MENVCFG: begin - if (CVA6Cfg.RVU) csr_rdata = '0 | fiom_q; - else read_access_exception = 1'b1; + csr_rdata = '0; + if (CVA6Cfg.RVU) begin + csr_rdata = '0 | fiom_q; + end + if (CVA6Cfg.RVZiCbom) begin + csr_rdata[5:4] = mcbie_q; + csr_rdata[6] = mcbcfe_q; + end + if (!CVA6Cfg.RVU && !CVA6Cfg.RVZiCbom) begin + read_access_exception = 1'b1; + end end riscv::CSR_MENVCFGH: begin - if (CVA6Cfg.RVU && CVA6Cfg.XLEN == 32) csr_rdata = '0; + if (CVA6Cfg.RVU && CVA6Cfg.IS_XLEN32) csr_rdata = '0; else read_access_exception = 1'b1; end riscv::CSR_MVENDORID: csr_rdata = {{CVA6Cfg.XLEN - 32{1'b0}}, OPENHWGROUP_MVENDORID}; riscv::CSR_MARCHID: csr_rdata = {{CVA6Cfg.XLEN - 32{1'b0}}, ARIANE_MARCHID}; - riscv::CSR_MIMPID: csr_rdata = '0; // not implemented + riscv::CSR_MIMPID: csr_rdata = {{CVA6Cfg.XLEN - 32{1'b0}}, ARIANE_MIMPID}; riscv::CSR_MHARTID: csr_rdata = hart_id_i; riscv::CSR_MCONFIGPTR: csr_rdata = '0; // not implemented riscv::CSR_MCOUNTINHIBIT: @@ -566,18 +708,18 @@ module csr_regfile // Counters and Timers riscv::CSR_MCYCLE: csr_rdata = cycle_q[CVA6Cfg.XLEN-1:0]; riscv::CSR_MCYCLEH: - if (CVA6Cfg.XLEN == 32) csr_rdata = cycle_q[63:32]; + if (CVA6Cfg.IS_XLEN32) csr_rdata = cycle_q[63:32]; else read_access_exception = 1'b1; riscv::CSR_MINSTRET: csr_rdata = instret_q[CVA6Cfg.XLEN-1:0]; riscv::CSR_MINSTRETH: - if (CVA6Cfg.XLEN == 32) csr_rdata = instret_q[63:32]; + if (CVA6Cfg.IS_XLEN32) csr_rdata = instret_q[63:32]; else read_access_exception = 1'b1; riscv::CSR_CYCLE: if (CVA6Cfg.RVZicntr) csr_rdata = cycle_q[CVA6Cfg.XLEN-1:0]; else read_access_exception = 1'b1; riscv::CSR_CYCLEH: if (CVA6Cfg.RVZicntr) - if (CVA6Cfg.XLEN == 32) csr_rdata = cycle_q[63:32]; + if (CVA6Cfg.IS_XLEN32) csr_rdata = cycle_q[63:32]; else read_access_exception = 1'b1; else read_access_exception = 1'b1; riscv::CSR_INSTRET: @@ -585,7 +727,7 @@ module csr_regfile else read_access_exception = 1'b1; riscv::CSR_INSTRETH: if (CVA6Cfg.RVZicntr) - if (CVA6Cfg.XLEN == 32) csr_rdata = instret_q[63:32]; + if (CVA6Cfg.IS_XLEN32) csr_rdata = instret_q[63:32]; else read_access_exception = 1'b1; else read_access_exception = 1'b1; //Event Selector @@ -680,7 +822,7 @@ module csr_regfile riscv::CSR_MHPM_COUNTER_29H, riscv::CSR_MHPM_COUNTER_30H, riscv::CSR_MHPM_COUNTER_31H : - if (CVA6Cfg.XLEN == 32) csr_rdata = perf_data_i; + if (CVA6Cfg.IS_XLEN32) csr_rdata = perf_data_i; else read_access_exception = 1'b1; // Performance counters (User Mode - R/O Shadows) @@ -749,7 +891,7 @@ module csr_regfile riscv::CSR_HPM_COUNTER_30H, riscv::CSR_HPM_COUNTER_31H : if (CVA6Cfg.RVZihpm) begin - if (CVA6Cfg.XLEN == 32) csr_rdata = perf_data_i; + if (CVA6Cfg.IS_XLEN32) csr_rdata = perf_data_i; else read_access_exception = 1'b1; end else begin read_access_exception = 1'b1; @@ -784,11 +926,13 @@ module csr_regfile riscv::CSR_PMPCFG14, riscv::CSR_PMPCFG15: begin // index is calculated using PMPCFG0 as the offset - automatic logic [11:0] index = csr_addr.address[11:0] - riscv::CSR_PMPCFG0; + automatic logic [3:0] index = csr_addr.address[11:0] - riscv::CSR_PMPCFG0; // if index is not even and XLEN==64, raise exception - if (CVA6Cfg.XLEN == 64 && index[0] == 1'b1) read_access_exception = 1'b1; + if (CVA6Cfg.IS_XLEN64 && index[0] == 1'b1) read_access_exception = 1'b1; else begin + // The following line has no effect. It's here just to prevent the synthesizer from crashing + if (CVA6Cfg.IS_XLEN64) index = (index >> 1) << 1; csr_rdata = pmpcfg_q[index*4+:CVA6Cfg.XLEN/8]; end end @@ -881,6 +1025,8 @@ module csr_regfile automatic hgatp_t hgatp; automatic logic [63:0] instret; + mtval_d = '0; + if (CVA6Cfg.RVS) begin satp = satp_q; end @@ -897,6 +1043,8 @@ module csr_regfile // -------------------- cycle_d = cycle_q; instret_d = instret_q; + dcache_d = dcache_q; + if (!(CVA6Cfg.DebugEn && debug_mode_q)) begin // increase instruction retired counter for (int i = 0; i < CVA6Cfg.NrCommitPorts; i++) begin @@ -910,6 +1058,18 @@ module csr_regfile else cycle_d = cycle_q; end + dcache_d.eccPresent = CVA6Cfg.DcacheEccEnable; + dcache_d.eccScrubberPresent = CVA6Cfg.DcacheEccEnable && CVA6Cfg.DcacheEccScrubberEnable; + if (CVA6Cfg.DcacheEccEnable) begin + if (dcache_dat_cor_err_i && (dcache_q.datCorErr != '1)) dcache_d.datCorErr++; + if (dcache_dat_unc_err_i && (dcache_q.datUncErr != '1)) dcache_d.datUncErr++; + if (dcache_dir_cor_err_i && (dcache_q.dirCorErr != '1)) dcache_d.dirCorErr++; + if (dcache_dir_unc_err_i && (dcache_q.dirUncErr != '1)) dcache_d.dirUncErr++; + if (CVA6Cfg.DcacheEccScrubberEnable) begin + if (dcache_scrub_cycle_i && (dcache_q.scrubCycles != '1)) dcache_d.scrubCycles++; + end + end + eret_o = 1'b0; flush_o = 1'b0; update_access_exception = 1'b0; @@ -956,20 +1116,20 @@ module csr_regfile medeleg_d = medeleg_q; mideleg_d = mideleg_q; end - mip_d = mip_q; - mie_d = mie_q; - mepc_d = mepc_q; - mcause_d = mcause_q; + mip_d = mip_q; + mie_d = mie_q; + mepc_d = ((CVA6Cfg.SdtrigEtrigger || CVA6Cfg.SdtrigItrigger) && sdtrig_etrigger_context_saved_valid && mret) ? sdtrig_etrigger_context_mepc : mepc_q; + mcause_d = ((CVA6Cfg.SdtrigEtrigger || CVA6Cfg.SdtrigItrigger) && sdtrig_etrigger_context_saved_valid && mret) ? sdtrig_etrigger_context_mcause : mcause_q; mcounteren_d = mcounteren_q; - mscratch_d = mscratch_q; - if (CVA6Cfg.TvalEn) mtval_d = mtval_q; + mscratch_d = mscratch_q; + if (CVA6Cfg.TvalEn) + mtval_d = ((CVA6Cfg.SdtrigEtrigger || CVA6Cfg.SdtrigItrigger) && sdtrig_etrigger_context_saved_valid && mret) ? sdtrig_etrigger_context_mtval : mtval_q; if (CVA6Cfg.RVH) begin mtinst_d = mtinst_q; mtval2_d = mtval2_q; end fiom_d = fiom_q; - dcache_d = dcache_q; icache_d = icache_q; acc_cons_d = acc_cons_q; @@ -1006,6 +1166,26 @@ module csr_regfile pmpcfg_d = pmpcfg_q; pmpaddr_d = pmpaddr_q; + mcbie_d = mcbie_q; + scbie_d = scbie_q; + hcbie_d = hcbie_q; + + mcbcfe_d = mcbcfe_q; + scbcfe_d = scbcfe_q; + hcbcfe_d = hcbcfe_q; + + // trigger module defaults + tdata1_to_tm = '0; + tdata2_to_tm = '0; + tdata3_to_tm = '0; + tselect_to_tm = '0; + tselect_we = 1'b0; + tdata1_we = 1'b0; + tdata2_we = 1'b0; + tdata3_we = 1'b0; + + if (CVA6Cfg.Sdtrig) scontext_d = scontext_q; + // check for correct access rights and that we are writing if (csr_we) begin unique case (conv_csr_addr.address) @@ -1060,6 +1240,20 @@ module csr_regfile dcsr_d.nmip = 1'b0; dcsr_d.stopcount = 1'b0; dcsr_d.stoptime = 1'b0; + // dcsr.prv is WARL over supported privilege modes + // preserve the previous value on an unsupported write + if (dcsr_d.prv != riscv::PRIV_LVL_M && + !(CVA6Cfg.RVS && dcsr_d.prv == riscv::PRIV_LVL_S) && + !(CVA6Cfg.RVU && dcsr_d.prv == riscv::PRIV_LVL_U)) begin + dcsr_d.prv = dcsr_q.prv; + end + // dcsr.v is WARL: clear it without H or when DRET returns to M-mode + if (!CVA6Cfg.RVH || dcsr_d.prv == riscv::PRIV_LVL_M) dcsr_d.v = 1'b0; + // dcsr.cause is written by hardware only, preserve on a software write + dcsr_d.cause = dcsr_q.cause; + // reserved fields are hardwired to zero + dcsr_d.zero1 = 1'b0; + dcsr_d.zero2 = '0; end else begin update_access_exception = 1'b1; end @@ -1081,11 +1275,52 @@ module csr_regfile update_access_exception = 1'b1; end end - // trigger module CSRs - riscv::CSR_TSELECT: update_access_exception = 1'b1; // not implemented - riscv::CSR_TDATA1: update_access_exception = 1'b1; // not implemented - riscv::CSR_TDATA2: update_access_exception = 1'b1; // not implemented - riscv::CSR_TDATA3: update_access_exception = 1'b1; // not implemented + // Trigger module CSRs + riscv::CSR_TSELECT: begin + if (CVA6Cfg.Sdtrig) begin + tselect_to_tm = csr_wdata; + tselect_we = csr_we; + end else begin + update_access_exception = 1'b1; + end + end + riscv::CSR_TDATA1: begin + if (CVA6Cfg.Sdtrig) begin + tdata1_to_tm = csr_wdata; + tdata1_we = csr_we; + flush_o = flush_from_tm; + end else begin + update_access_exception = 1'b1; + end + end + riscv::CSR_TDATA2: begin + if (CVA6Cfg.Sdtrig) begin + tdata2_to_tm = csr_wdata; + tdata2_we = csr_we; + flush_o = flush_from_tm; + end else begin + update_access_exception = 1'b1; + end + end + riscv::CSR_TDATA3: begin + if (CVA6Cfg.Sdtrig && CVA6Cfg.SdtrigSupportTextra) begin + tdata3_to_tm = csr_wdata; + tdata3_we = csr_we; + end else begin + update_access_exception = 1'b1; + end + end + // tinfo has only read-only fields: a write is ignored + riscv::CSR_TINFO: begin + if (!CVA6Cfg.Sdtrig) update_access_exception = 1'b1; + end + riscv::CSR_SCONTEXT: begin + if (CVA6Cfg.Sdtrig && CVA6Cfg.SdtrigSupportTextra) begin + scontext_d = {{CVA6Cfg.XLEN - 32{1'b0}}, csr_wdata[31:0]}; + end else begin + update_access_exception = 1'b1; + end + end // virtual supervisor registers riscv::CSR_VSSTATUS: begin if (CVA6Cfg.RVH) begin @@ -1125,7 +1360,9 @@ module csr_regfile if (CVA6Cfg.RVH) vsscratch_d = csr_wdata; else update_access_exception = 1'b1; riscv::CSR_VSEPC: - if (CVA6Cfg.RVH) vsepc_d = {csr_wdata[CVA6Cfg.XLEN-1:1], 1'b0}; + // bit[1] stays writable only with RVC; without RVC (IALIGN=32) vsepc[1:0] are always zero + if (CVA6Cfg.RVH) + vsepc_d = {csr_wdata[CVA6Cfg.XLEN-1:2], csr_wdata[1] & CVA6Cfg.RVC, 1'b0}; else update_access_exception = 1'b1; riscv::CSR_VSCAUSE: if (CVA6Cfg.RVH) vscause_d = csr_wdata; @@ -1211,7 +1448,9 @@ module csr_regfile if (CVA6Cfg.RVS) sscratch_d = csr_wdata; else update_access_exception = 1'b1; riscv::CSR_SEPC: - if (CVA6Cfg.RVS) sepc_d = {csr_wdata[CVA6Cfg.XLEN-1:1], 1'b0}; + // bit[1] stays writable only with RVC; without RVC (IALIGN=32) sepc[1:0] are always zero + if (CVA6Cfg.RVS) + sepc_d = {csr_wdata[CVA6Cfg.XLEN-1:2], csr_wdata[1] & CVA6Cfg.RVC, 1'b0}; else update_access_exception = 1'b1; riscv::CSR_SCAUSE: if (CVA6Cfg.RVS) scause_d = csr_wdata; @@ -1240,9 +1479,22 @@ module csr_regfile update_access_exception = 1'b1; end end - riscv::CSR_SENVCFG: - if (CVA6Cfg.RVU) fiom_d = csr_wdata[0]; - else update_access_exception = 1'b1; + riscv::CSR_SENVCFG: begin + if (CVA6Cfg.RVS) begin + fiom_d = csr_wdata[0]; + if (CVA6Cfg.RVZiCbom) begin + unique case (csr_wdata[5:4]) + 2'b00: scbie_d = riscv::CBIE_ILLEGAL; + 2'b01: scbie_d = riscv::CBIE_FLUSH; + 2'b11: scbie_d = riscv::CBIE_INVAL; + default: scbie_d = scbie_q; + endcase + scbcfe_d = csr_wdata[6]; + end + end else begin + update_access_exception = 1'b1; + end + end //hypervisor mode registers riscv::CSR_HSTATUS: begin if (CVA6Cfg.RVH) begin @@ -1313,7 +1565,7 @@ module csr_regfile end riscv::CSR_HTVAL: begin if (CVA6Cfg.RVH) begin - htval_d = csr_wdata; + htval_d = {{CVA6Cfg.XLEN - CVA6Cfg.GPLEN + 2{1'b0}}, csr_wdata[CVA6Cfg.GPLEN-3:0]}; end else begin update_access_exception = 1'b1; end @@ -1342,10 +1594,11 @@ module csr_regfile hgatp[1:0] = 2'b0; // only make VMID_LEN - 1 bit stick, that way software can figure out how many VMID bits are supported hgatp.vmid = hgatp.vmid & {{(CVA6Cfg.VMIDW - CVA6Cfg.VMID_WIDTH) {1'b0}}, {CVA6Cfg.VMID_WIDTH{1'b1}}}; - // only update if we actually support this mode - if (config_pkg::vm_mode_t'(hgatp.mode) == config_pkg::ModeOff || - config_pkg::vm_mode_t'(hgatp.mode) == CVA6Cfg.MODE_SV) - hgatp_d = hgatp; + // Preserve the current mode if the written mode is unsupported. + if (config_pkg::vm_mode_t'(hgatp.mode) != config_pkg::ModeOff && + config_pkg::vm_mode_t'(hgatp.mode) != CVA6Cfg.MODE_SV) + hgatp.mode = hgatp_q.mode; + hgatp_d = hgatp; end // changing the mode can have side-effects on address translation (e.g.: other instructions), re-fetch // the next instruction by executing a flush @@ -1354,9 +1607,22 @@ module csr_regfile update_access_exception = 1'b1; end end - riscv::CSR_HENVCFG: - if (CVA6Cfg.RVH) fiom_d = csr_wdata[0]; - else update_access_exception = 1'b1; + riscv::CSR_HENVCFG: begin + if (CVA6Cfg.RVH) begin + fiom_d = csr_wdata[0]; + if (CVA6Cfg.RVZiCbom) begin + unique case (csr_wdata[5:4]) + 2'b00: hcbie_d = riscv::CBIE_ILLEGAL; + 2'b01: hcbie_d = riscv::CBIE_FLUSH; + 2'b11: hcbie_d = riscv::CBIE_INVAL; + default: hcbie_d = hcbie_q; + endcase + hcbcfe_d = csr_wdata[6]; + end + end else begin + update_access_exception = 1'b1; + end + end riscv::CSR_MSTATUS: begin mstatus_d = {{64 - CVA6Cfg.XLEN{1'b0}}, csr_wdata}; mstatus_d.xs = riscv::Off; @@ -1379,20 +1645,38 @@ module csr_regfile mstatus_d.tw = riscv::Off; mstatus_d.mprv = riscv::Off; end - if ((!CVA6Cfg.RVH & mstatus_d.mpp == riscv::PRIV_LVL_HS) | + if (!CVA6Cfg.RVH) begin + mstatus_d.mpv = 1'b0; + mstatus_d.gva = 1'b0; + end + if ((mstatus_d.mpp == riscv::PRIV_LVL_HS) | (!CVA6Cfg.RVS & mstatus_d.mpp == riscv::PRIV_LVL_S) | (!CVA6Cfg.RVU & mstatus_d.mpp == riscv::PRIV_LVL_U)) begin mstatus_d.mpp = mstatus_q.mpp; end mstatus_d.wpri3 = 9'b0; + mstatus_d.wpri4 = '0; mstatus_d.wpri1 = 1'b0; mstatus_d.wpri2 = 1'b0; mstatus_d.wpri0 = 1'b0; - mstatus_d.ube = 1'b0; // CVA6 is little-endian + // Mirror MBE + mstatus_d.sbe = mstatus_d.mbe; + mstatus_d.ube = mstatus_d.mbe; // this register has side-effects on other registers, flush the pipeline flush_o = 1'b1; end - riscv::CSR_MSTATUSH: if (CVA6Cfg.XLEN != 32) update_access_exception = 1'b1; + riscv::CSR_MSTATUSH: begin + if (CVA6Cfg.IS_XLEN32) begin + mstatus_d.mbe = ((csr_wdata & riscv::MSTATUSH_MBE) != 0); + // Mirror MBE + mstatus_d.sbe = mstatus_d.mbe; + mstatus_d.ube = mstatus_d.mbe; + // this register has side-effects on other registers, flush the pipeline + flush_o = 1'b1; + end else begin + update_access_exception = 1'b1; + end + end // MISA is WARL (Write Any Value, Reads Legal Value) riscv::CSR_MISA: ; // machine exception delegation register @@ -1483,16 +1767,22 @@ module csr_regfile end riscv::CSR_MSCRATCH: mscratch_d = csr_wdata; - riscv::CSR_MEPC: mepc_d = {csr_wdata[CVA6Cfg.XLEN-1:1], 1'b0}; - riscv::CSR_MCAUSE: mcause_d = csr_wdata; + riscv::CSR_MEPC: + // bit[1] stays writable only with RVC; without RVC (IALIGN=32) mepc[1:0] are always zero + mepc_d = ((CVA6Cfg.SdtrigEtrigger || CVA6Cfg.SdtrigItrigger) && sdtrig_etrigger_context_saved_valid && mret) ? sdtrig_etrigger_context_mepc + : {csr_wdata[CVA6Cfg.XLEN-1:2], csr_wdata[1] & CVA6Cfg.RVC, 1'b0}; + riscv::CSR_MCAUSE: + mcause_d = ((CVA6Cfg.SdtrigEtrigger || CVA6Cfg.SdtrigItrigger) && sdtrig_etrigger_context_saved_valid && mret) ? sdtrig_etrigger_context_mcause : {csr_wdata[CVA6Cfg.XLEN - 1], {CVA6Cfg.XLEN - 6{1'b0}}, csr_wdata[4:0]}; riscv::CSR_MTVAL: begin - if (CVA6Cfg.TvalEn) mtval_d = csr_wdata; + if (CVA6Cfg.TvalEn) + mtval_d = ((CVA6Cfg.SdtrigEtrigger || CVA6Cfg.SdtrigItrigger) && sdtrig_etrigger_context_saved_valid && mret) ? sdtrig_etrigger_context_mtval : csr_wdata; end riscv::CSR_MTINST: if (CVA6Cfg.RVH) mtinst_d = {{CVA6Cfg.XLEN - 32{1'b0}}, csr_wdata[31:0]}; else update_access_exception = 1'b1; riscv::CSR_MTVAL2: - if (CVA6Cfg.RVH) mtval2_d = csr_wdata; + if (CVA6Cfg.RVH) + mtval2_d = {{CVA6Cfg.XLEN - CVA6Cfg.GPLEN + 2{1'b0}}, csr_wdata[CVA6Cfg.GPLEN-3:0]}; else update_access_exception = 1'b1; riscv::CSR_MIP: begin if (CVA6Cfg.RVH) begin @@ -1509,9 +1799,22 @@ module csr_regfile end mip_d = (mip_q & ~mask) | (csr_wdata & mask); end - riscv::CSR_MENVCFG: if (CVA6Cfg.RVU) fiom_d = csr_wdata[0]; + riscv::CSR_MENVCFG: begin + if (CVA6Cfg.RVU) begin + fiom_d = csr_wdata[0]; + end + if (CVA6Cfg.RVZiCbom) begin + unique case (csr_wdata[5:4]) + 2'b00: mcbie_d = riscv::CBIE_ILLEGAL; + 2'b01: mcbie_d = riscv::CBIE_FLUSH; + 2'b11: mcbie_d = riscv::CBIE_INVAL; + default: mcbie_d = mcbie_q; + endcase + mcbcfe_d = csr_wdata[6]; + end + end riscv::CSR_MENVCFGH: begin - if (!CVA6Cfg.RVU || CVA6Cfg.XLEN != 32) update_access_exception = 1'b1; + if (!CVA6Cfg.RVU || !CVA6Cfg.IS_XLEN32) update_access_exception = 1'b1; end riscv::CSR_MCOUNTINHIBIT: if (CVA6Cfg.PerfCounterEn) @@ -1520,11 +1823,11 @@ module csr_regfile // performance counters riscv::CSR_MCYCLE: cycle_d[CVA6Cfg.XLEN-1:0] = csr_wdata; riscv::CSR_MCYCLEH: - if (CVA6Cfg.XLEN == 32) cycle_d[63:32] = csr_wdata; + if (CVA6Cfg.IS_XLEN32) cycle_d[63:32] = csr_wdata; else update_access_exception = 1'b1; riscv::CSR_MINSTRET: instret_d[CVA6Cfg.XLEN-1:0] = csr_wdata; riscv::CSR_MINSTRETH: - if (CVA6Cfg.XLEN == 32) instret_d[63:32] = csr_wdata; + if (CVA6Cfg.IS_XLEN32) instret_d[63:32] = csr_wdata; else update_access_exception = 1'b1; //Event Selector riscv::CSR_MHPM_EVENT_3, @@ -1623,11 +1926,11 @@ module csr_regfile riscv::CSR_MHPM_COUNTER_30H, riscv::CSR_MHPM_COUNTER_31H : begin perf_we_o = 1'b1; - if (CVA6Cfg.XLEN == 32) perf_data_o = csr_wdata; + if (CVA6Cfg.IS_XLEN32) perf_data_o = csr_wdata; else update_access_exception = 1'b1; end - riscv::CSR_DCACHE: dcache_d = {{CVA6Cfg.XLEN - 1{1'b0}}, csr_wdata[0]}; // enable bit + riscv::CSR_DCACHE: dcache_d = csr_wdata; // enable bit riscv::CSR_ICACHE: icache_d = {{CVA6Cfg.XLEN - 1{1'b0}}, csr_wdata[0]}; // enable bit riscv::CSR_ACC_CONS: begin if (CVA6Cfg.EnableAccelerator) begin @@ -1660,7 +1963,7 @@ module csr_regfile automatic logic [11:0] index = csr_addr.address[11:0] - riscv::CSR_PMPCFG0; // if index is not even and XLEN==64, raise exception - if (CVA6Cfg.XLEN == 64 && index[0] == 1'b1) update_access_exception = 1'b1; + if (CVA6Cfg.IS_XLEN64 && index[0] == 1'b1) update_access_exception = 1'b1; else begin for (int i = 0; i < CVA6Cfg.XLEN / 8; i++) begin if (!pmpcfg_q[index*4+i].locked) pmpcfg_d[index*4+i] = csr_wdata[i*8+:8]; @@ -1734,16 +2037,24 @@ module csr_regfile // index is calculated using PMPADDR0 as the offset automatic logic [11:0] index = csr_addr.address[11:0] - riscv::CSR_PMPADDR0; // check if the entry or the entry above is locked - if (!pmpcfg_q[index].locked && !(pmpcfg_q[index+1].locked && pmpcfg_q[index+1].addr_mode == riscv::TOR)) begin - pmpaddr_d[index] = csr_wdata[CVA6Cfg.PLEN-3:0]; + if (!pmpcfg_q[index].locked) begin + if (index < 63) begin + if (!(pmpcfg_q[index+1].locked && pmpcfg_q[index+1].addr_mode == riscv::TOR)) begin + pmpaddr_d[index] = csr_wdata[CVA6Cfg.PLEN-3:0]; + end + end else begin + pmpaddr_d[index] = csr_wdata[CVA6Cfg.PLEN-3:0]; + end end end default: update_access_exception = 1'b1; endcase end if (CVA6Cfg.IS_XLEN64) begin - mstatus_d.sxl = riscv::XLEN_64; - mstatus_d.uxl = riscv::XLEN_64; + if (CVA6Cfg.RVS) mstatus_d.sxl = riscv::XLEN_64; + else mstatus_d.sxl = riscv::XLEN_NA; + if (CVA6Cfg.RVU) mstatus_d.uxl = riscv::XLEN_64; + else mstatus_d.uxl = riscv::XLEN_NA; end if (!CVA6Cfg.RVU) begin mstatus_d.mpp = riscv::PRIV_LVL_M; @@ -1766,12 +2077,12 @@ module csr_regfile end // hardwired extension registers if (CVA6Cfg.RVS || CVA6Cfg.RVF) begin - mstatus_d.sd = (mstatus_q.xs == riscv::Dirty) | (mstatus_q.fs == riscv::Dirty); + mstatus_d.sd = (mstatus_d.xs == riscv::Dirty) | (mstatus_d.fs == riscv::Dirty); end else begin mstatus_d.sd = riscv::Off; end if (CVA6Cfg.RVH) begin - vsstatus_d.sd = (vsstatus_q.xs == riscv::Dirty) | (vsstatus_q.fs == riscv::Dirty); + vsstatus_d.sd = (vsstatus_d.xs == riscv::Dirty) | (vsstatus_d.fs == riscv::Dirty); end // reserve PMPCFG bits 5 and 6 (hardwire to 0) @@ -1811,7 +2122,7 @@ module csr_regfile trap_to_v = 1'b0; // Exception is taken and we are not in debug mode // exceptions in debug mode don't update any fields - if ((CVA6Cfg.DebugEn && !debug_mode_q && ex_i.cause != riscv::DEBUG_REQUEST && ex_i.valid) || (!CVA6Cfg.DebugEn && ex_i.valid)) begin + if ((CVA6Cfg.DebugEn && !debug_mode_q && !(ex_i.cause inside {riscv::DEBUG_REQUEST, riscv::DEBUG_TRIGGER}) && ex_i.valid) || (!CVA6Cfg.DebugEn && ex_i.valid)) begin // do not flush, flush is reserved for CSR writes with side effects flush_o = 1'b0; // figure out where to trap to @@ -1853,12 +2164,12 @@ module csr_regfile // set epc vsepc_d = {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{pc_i[CVA6Cfg.VLEN-1]}}, pc_i}; // set vstval - vstval_d = (ariane_pkg::ZERO_TVAL + vstval_d = ((ariane_pkg::ZERO_TVAL && (ex_i.cause inside { riscv::ILLEGAL_INSTR, riscv::BREAKPOINT, riscv::ENV_CALL_UMODE - } || ex_i.cause[CVA6Cfg.XLEN-1])) ? '0 : ex_i.tval; + })) || ex_i.cause[CVA6Cfg.XLEN-1]) ? '0 : ex_i.tval; end else begin // update sstatus mstatus_d.sie = 1'b0; @@ -1870,14 +2181,14 @@ module csr_regfile // set epc sepc_d = {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{pc_i[CVA6Cfg.VLEN-1]}}, pc_i}; // set mtval or stval - stval_d = (ariane_pkg::ZERO_TVAL + stval_d = ((ariane_pkg::ZERO_TVAL && (ex_i.cause inside { riscv::ILLEGAL_INSTR, riscv::BREAKPOINT, riscv::ENV_CALL_UMODE, riscv::ENV_CALL_SMODE, riscv::ENV_CALL_MMODE - } || ex_i.cause[CVA6Cfg.XLEN-1])) ? '0 : ex_i.tval; + })) || ex_i.cause[CVA6Cfg.XLEN-1]) ? '0 : ex_i.tval; if (CVA6Cfg.RVH) begin htinst_d = (ariane_pkg::ZERO_TVAL && (ex_i.cause inside { @@ -1904,21 +2215,23 @@ module csr_regfile mstatus_d.mpie = mstatus_q.mie; // save the previous privilege mode mstatus_d.mpp = priv_lvl_q; - mcause_d = ex_i.cause; - // set epc - mepc_d = {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{pc_i[CVA6Cfg.VLEN-1]}}, pc_i}; + //set cause and epc adapted to etrigger + mcause_d = ((CVA6Cfg.SdtrigEtrigger || CVA6Cfg.SdtrigItrigger) && sdtrig_etrigger_context_saved_valid && mret) ? sdtrig_etrigger_context_mcause : ex_i.cause; + mepc_d = ((CVA6Cfg.SdtrigEtrigger || CVA6Cfg.SdtrigItrigger) && sdtrig_etrigger_context_saved_valid && mret) ? sdtrig_etrigger_context_mepc : {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{pc_i[CVA6Cfg.VLEN-1]}}, pc_i}; // set mtval or stval if (CVA6Cfg.TvalEn) begin - mtval_d = (ariane_pkg::ZERO_TVAL - && (ex_i.cause inside { - riscv::ILLEGAL_INSTR, - riscv::BREAKPOINT, - riscv::ENV_CALL_UMODE, - riscv::ENV_CALL_SMODE, - riscv::ENV_CALL_MMODE - } || ex_i.cause[CVA6Cfg.GPLEN-1])) ? '0 : ex_i.tval; - end else begin - mtval_d = '0; + if ((CVA6Cfg.SdtrigEtrigger || CVA6Cfg.SdtrigItrigger) && sdtrig_etrigger_context_saved_valid && mret) begin + mtval_d = sdtrig_etrigger_context_mtval; + end else begin + mtval_d = ((ariane_pkg::ZERO_TVAL + && (ex_i.cause inside { + riscv::ILLEGAL_INSTR, + riscv::BREAKPOINT, + riscv::ENV_CALL_UMODE, + riscv::ENV_CALL_SMODE, + riscv::ENV_CALL_MMODE + })) || ex_i.cause[CVA6Cfg.XLEN-1]) ? '0 : ex_i.tval; + end end if (CVA6Cfg.RVH) begin @@ -1962,7 +2275,6 @@ module csr_regfile dcsr_d.prv = priv_lvl_o; // save virtualization mode bit dcsr_d.v = (!CVA6Cfg.RVH) ? 1'b0 : v_q; - // trigger module fired // caused by a breakpoint if (ex_i.valid && ex_i.cause == riscv::BREAKPOINT) begin @@ -1995,7 +2307,7 @@ module csr_regfile end // we've got a debug request - if (ex_i.valid && ex_i.cause == riscv::DEBUG_REQUEST) begin + if (ex_i.valid && ex_i.cause inside {riscv::DEBUG_REQUEST, riscv::DEBUG_TRIGGER}) begin dcsr_d.prv = priv_lvl_o; dcsr_d.v = (!CVA6Cfg.RVH) ? 1'b0 : v_q; // save the PC @@ -2004,8 +2316,8 @@ module csr_regfile debug_mode_d = 1'b1; // jump to the base address set_debug_pc_o = 1'b1; - // save the cause as external debug request - dcsr_d.cause = ariane_pkg::CauseRequest; + // save the cause: a trigger or an external debug request + dcsr_d.cause = (ex_i.cause == riscv::DEBUG_TRIGGER) ? ariane_pkg::CauseTrigger : ariane_pkg::CauseRequest; end // single step enable and we just retired an instruction @@ -2113,12 +2425,12 @@ module csr_regfile end // set mpie to 1 mstatus_d.mpie = 1'b1; + if (mstatus_q.mpp != riscv::PRIV_LVL_M) mstatus_d.mprv = 1'b0; if (CVA6Cfg.RVH) begin - // set virtualization mode - v_d = mstatus_q.mpv; + // MPV is ignored when returning to M-mode. + v_d = (mstatus_q.mpp == riscv::PRIV_LVL_M) ? 1'b0 : mstatus_q.mpv; //set mstatus mpv to false mstatus_d.mpv = 1'b0; - if (mstatus_q.mpp != riscv::PRIV_LVL_M) mstatus_d.mprv = 1'b0; end end @@ -2133,12 +2445,12 @@ module csr_regfile mstatus_d.spp = 1'b0; // set spie to 1 mstatus_d.spie = 1'b1; + mstatus_d.mprv = 1'b0; if (CVA6Cfg.RVH) begin // set virtualization mode - v_d = hstatus_q.spv; + v_d = hstatus_q.spv; //set hstatus spv to false - hstatus_d.spv = 1'b0; - mstatus_d.mprv = 1'b0; + hstatus_d.spv = 1'b0; end end @@ -2166,7 +2478,7 @@ module csr_regfile priv_lvl_d = riscv::priv_lvl_t'(dcsr_q.prv); if (CVA6Cfg.RVH) begin // restore the previous virtualization mode - v_d = dcsr_q.v; + v_d = (dcsr_q.prv == riscv::PRIV_LVL_M) ? 1'b0 : dcsr_q.v; end // actually return from debug mode debug_mode_d = 1'b0; @@ -2266,7 +2578,7 @@ module csr_regfile // counter address range is C00 to C1F if (CVA6Cfg.RVZihpm) begin if (csr_addr_i inside {[riscv::CSR_HPM_COUNTER_3 : riscv::CSR_HPM_COUNTER_31]} | - csr_addr_i inside {[riscv::CSR_HPM_COUNTER_3H : riscv::CSR_HPM_COUNTER_31H]}) begin + (CVA6Cfg.IS_XLEN32 && csr_addr_i inside {[riscv::CSR_HPM_COUNTER_3H : riscv::CSR_HPM_COUNTER_31H]})) begin if (curr_priv == riscv::PRIV_LVL_S && CVA6Cfg.RVS) begin virtual_privilege_violation = v_q & mcounteren_q[sel_cnt_en] & ~hcounteren_q[sel_cnt_en]; privilege_violation = ~mcounteren_q[sel_cnt_en]; @@ -2284,7 +2596,7 @@ module csr_regfile end if (CVA6Cfg.RVZicntr) begin if (csr_addr_i inside {[riscv::CSR_CYCLE : riscv::CSR_INSTRET]} | - csr_addr_i inside {[riscv::CSR_CYCLEH : riscv::CSR_INSTRETH]}) begin + (CVA6Cfg.IS_XLEN32 && csr_addr_i inside {[riscv::CSR_CYCLEH : riscv::CSR_INSTRETH]})) begin if (curr_priv == riscv::PRIV_LVL_S && CVA6Cfg.RVS) begin virtual_privilege_violation = v_q & mcounteren_q[sel_cnt_en] & ~hcounteren_q[sel_cnt_en]; privilege_violation = ~mcounteren_q[sel_cnt_en]; @@ -2320,7 +2632,7 @@ module csr_regfile // counter address range is C00 to C1F if (CVA6Cfg.RVZihpm) begin if (csr_addr_i inside {[riscv::CSR_HPM_COUNTER_3 : riscv::CSR_HPM_COUNTER_31]} | - csr_addr_i inside {[riscv::CSR_HPM_COUNTER_3H : riscv::CSR_HPM_COUNTER_31H]}) begin + (CVA6Cfg.IS_XLEN32 && csr_addr_i inside {[riscv::CSR_HPM_COUNTER_3H : riscv::CSR_HPM_COUNTER_31H]})) begin if (priv_lvl_o == riscv::PRIV_LVL_S && CVA6Cfg.RVS) begin privilege_violation = ~mcounteren_q[csr_addr_i[4:0]]; end else if (priv_lvl_o == riscv::PRIV_LVL_U && CVA6Cfg.RVU) begin @@ -2332,7 +2644,7 @@ module csr_regfile end if (CVA6Cfg.RVZicntr) begin if (csr_addr_i inside {[riscv::CSR_CYCLE : riscv::CSR_INSTRET]} | - csr_addr_i inside {[riscv::CSR_CYCLEH : riscv::CSR_INSTRETH]}) begin + (CVA6Cfg.IS_XLEN32 && csr_addr_i inside {[riscv::CSR_CYCLEH : riscv::CSR_INSTRETH]})) begin if (priv_lvl_o == riscv::PRIV_LVL_S && CVA6Cfg.RVS) begin privilege_violation = ~mcounteren_q[csr_addr_i[4:0]]; end else if (priv_lvl_o == riscv::PRIV_LVL_U && CVA6Cfg.RVU) begin @@ -2387,7 +2699,7 @@ module csr_regfile wfi_d = 1'b0; // or alternatively if there is no exception pending and we are not in debug mode wait here // for the interrupt - end else if (((CVA6Cfg.DebugEn && !debug_mode_q) && csr_op_i == WFI && !ex_i.valid) || (!CVA6Cfg.DebugEn && csr_op_i == WFI && !ex_i.valid)) begin + end else if (((CVA6Cfg.DebugEn && !debug_mode_q && !dcsr_q.step) && csr_op_i == WFI && !ex_i.valid) || (!CVA6Cfg.DebugEn && csr_op_i == WFI && !ex_i.valid)) begin wfi_d = 1'b1; end end @@ -2487,6 +2799,14 @@ module csr_regfile assign sum_o = mstatus_q.sum; assign vs_sum_o = CVA6Cfg.RVH ? vsstatus_q.sum : '0; assign hu_o = CVA6Cfg.RVH ? hstatus_q.hu : '0; + + assign mcbie_o = CVA6Cfg.RVZiCbom ? mcbie_q : riscv::CBIE_ILLEGAL; + assign scbie_o = CVA6Cfg.RVZiCbom ? scbie_q : riscv::CBIE_ILLEGAL; + assign hcbie_o = CVA6Cfg.RVZiCbom ? hcbie_q : riscv::CBIE_ILLEGAL; + + assign mcbcfe_o = CVA6Cfg.RVZiCbom ? mcbcfe_q : 1'b0; + assign scbcfe_o = CVA6Cfg.RVZiCbom ? scbcfe_q : 1'b0; + assign hcbcfe_o = CVA6Cfg.RVZiCbom ? hcbcfe_q : 1'b0; // we support bare memory addressing and SV39 if (CVA6Cfg.RVH) begin assign en_translation_o = (((config_pkg::vm_mode_t'(satp_q.mode) == CVA6Cfg.MODE_SV && !v_q) || (config_pkg::vm_mode_t'(vsatp_q.mode) == CVA6Cfg.MODE_SV && v_q)) && @@ -2524,15 +2844,19 @@ module csr_regfile `else assign icache_en_o = icache_q[0] & ~(CVA6Cfg.DebugEn && debug_mode_q); `endif - assign dcache_en_o = dcache_q[0]; + assign dcache_en_o = dcache_q.cacheEn; + assign dcache_scrub_en_o = dcache_q.scrubEn; + assign dcache_scrub_period_o = dcache_q.scrubPeriod; assign acc_cons_en_o = CVA6Cfg.EnableAccelerator ? acc_cons_q[0] : 1'b0; // determine if mprv needs to be considered if in debug mode assign mprv = (CVA6Cfg.DebugEn && debug_mode_q && !dcsr_q.mprven) ? 1'b0 : mstatus_q.mprv; - assign debug_mode_o = debug_mode_q; + assign debug_mode_o = CVA6Cfg.DebugEn ? debug_mode_q : 1'b0; assign single_step_o = CVA6Cfg.DebugEn ? dcsr_q.step : 1'b0; assign mcountinhibit_o = {{29 - MHPMCounterNum{1'b0}}, mcountinhibit_q}; + assign mbe_o = mstatus_q.mbe; + // sequential process always_ff @(posedge clk_i or negedge rst_ni) begin if (~rst_ni) begin @@ -2563,21 +2887,29 @@ module csr_regfile mscratch_q <= {CVA6Cfg.XLEN{1'b0}}; if (CVA6Cfg.TvalEn) mtval_q <= {CVA6Cfg.XLEN{1'b0}}; fiom_q <= '0; - dcache_q <= {{CVA6Cfg.XLEN - 1{1'b0}}, 1'b1}; + dcache_q <= '{cacheEn: 1'b1, default: '0}; icache_q <= {{CVA6Cfg.XLEN - 1{1'b0}}, 1'b1}; mcountinhibit_q <= '0; acc_cons_q <= {{CVA6Cfg.XLEN - 1{1'b0}}, CVA6Cfg.EnableAccelerator}; + if (CVA6Cfg.RVZiCbom) begin + mcbie_q <= riscv::CBIE_INVAL; + mcbcfe_q <= 1'b1; + end // supervisor mode registers if (CVA6Cfg.RVS) begin - medeleg_q <= {CVA6Cfg.XLEN{1'b0}}; - mideleg_q <= {CVA6Cfg.XLEN{1'b0}}; - sepc_q <= {CVA6Cfg.XLEN{1'b0}}; - scause_q <= {CVA6Cfg.XLEN{1'b0}}; - stvec_q <= {CVA6Cfg.XLEN{1'b0}}; + medeleg_q <= {CVA6Cfg.XLEN{1'b0}}; + mideleg_q <= (CVA6Cfg.RVH) ? CVA6Cfg.XLEN'(HS_DELEG_INTERRUPTS[CVA6Cfg.XLEN-1:0]) : {CVA6Cfg.XLEN{1'b0}}; + sepc_q <= {CVA6Cfg.XLEN{1'b0}}; + scause_q <= {CVA6Cfg.XLEN{1'b0}}; + stvec_q <= {CVA6Cfg.XLEN{1'b0}}; scounteren_q <= {CVA6Cfg.XLEN{1'b0}}; - sscratch_q <= {CVA6Cfg.XLEN{1'b0}}; - stval_q <= {CVA6Cfg.XLEN{1'b0}}; - satp_q <= {CVA6Cfg.XLEN{1'b0}}; + sscratch_q <= {CVA6Cfg.XLEN{1'b0}}; + stval_q <= {CVA6Cfg.XLEN{1'b0}}; + satp_q <= {CVA6Cfg.XLEN{1'b0}}; + if (CVA6Cfg.RVZiCbom) begin + scbie_q <= riscv::CBIE_INVAL; + scbcfe_q <= 1'b1; + end end if (CVA6Cfg.RVH) begin @@ -2601,6 +2933,13 @@ module csr_regfile vstval_q <= {CVA6Cfg.XLEN{1'b0}}; vsatp_q <= {CVA6Cfg.XLEN{1'b0}}; en_ld_st_g_translation_q <= 1'b0; + if (CVA6Cfg.RVZiCbom) begin + hcbie_q <= riscv::CBIE_INVAL; + hcbcfe_q <= 1'b1; + end + end + if (CVA6Cfg.Sdtrig) begin + scontext_q <= '0; end // timer and counters cycle_q <= 64'b0; @@ -2650,6 +2989,10 @@ module csr_regfile icache_q <= icache_d; mcountinhibit_q <= mcountinhibit_d; acc_cons_q <= acc_cons_d; + if (CVA6Cfg.RVZiCbom) begin + mcbie_q <= mcbie_d; + mcbcfe_q <= mcbcfe_d; + end // supervisor mode registers if (CVA6Cfg.RVS) begin medeleg_q <= medeleg_d; @@ -2661,6 +3004,10 @@ module csr_regfile sscratch_q <= sscratch_d; if (CVA6Cfg.TvalEn) stval_q <= stval_d; satp_q <= satp_d; + if (CVA6Cfg.RVZiCbom) begin + scbie_q <= scbie_d; + scbcfe_q <= scbcfe_d; + end end if (CVA6Cfg.RVH) begin v_q <= v_d; @@ -2684,6 +3031,13 @@ module csr_regfile vstval_q <= vstval_d; vsatp_q <= vsatp_d; en_ld_st_g_translation_q <= en_ld_st_g_translation_d; + if (CVA6Cfg.RVZiCbom) begin + hcbie_q <= hcbie_d; + hcbcfe_q <= hcbcfe_d; + end + end + if (CVA6Cfg.Sdtrig) begin + scontext_q <= scontext_d; end // timer and counters cycle_q <= cycle_d; @@ -2698,6 +3052,8 @@ module csr_regfile end end + assign sdtrig_commit_std_exception_valid_o = sdtrig_commit_std_exception_valid; + // write logic pmp always_comb begin : write for (int i = 0; i < 64; i++) begin @@ -2728,6 +3084,90 @@ module csr_regfile end end + //------------- + // Trigger Module + //------------- + generate + if (CVA6Cfg.Sdtrig) begin : tm_gen + trigger_module #( + .CVA6Cfg (CVA6Cfg), + .exception_t(exception_t) + ) trigger_module_i ( + .clk_i, + .rst_ni, + .commit_ack_i (commit_ack_i), + .ex_i (ex_i), + .sdtrig_lsu_inputs_vaddr_i (sdtrig_lsu_inputs_vaddr_i), + .fetch_sdtrig_instr_i (fetch_sdtrig_instr_i), + .sdtrig_lsu_inputs_data_i (sdtrig_lsu_inputs_data_i), + .sdtrig_lsu_inputs_fu_i (sdtrig_lsu_inputs_fu_i), + .sdtrig_lsu_inputs_op_i (sdtrig_lsu_inputs_op_i), + .sdtrig_lsu_inputs_valid_i (sdtrig_lsu_inputs_valid_i), + .sdtrig_load_data_i (sdtrig_load_data_i), + .sdtrig_load_valid_i (sdtrig_load_valid_i), + .priv_lvl_i (priv_lvl_o), + .debug_mode_i (debug_mode_q), + .mret_i (mret), + .sret_i (sret), + .mstatus_mie_i (mstatus_q.mie), + .mstatus_sie_i (mstatus_q.sie), + .medeleg_breakpoint_i (medeleg_q[$clog2(CVA6Cfg.XLEN)'(riscv::BREAKPOINT)]), + .scontext_i (scontext_q), + .tselect_i (tselect_to_tm), + .tdata1_i (tdata1_to_tm), + .tdata2_i (tdata2_to_tm), + .tdata3_i (tdata3_to_tm), + .tselect_we (tselect_we), + .tdata1_we (tdata1_we), + .tdata2_we (tdata2_we), + .tdata3_we (tdata3_we), + .tselect_o (tselect_from_tm), + .tdata1_o (tdata1_from_tm), + .tdata2_o (tdata2_from_tm), + .tdata3_o (tdata3_from_tm), + .flush_o (flush_from_tm), + .mepc_i (mepc_d), + .mcause_i (mcause_d), + .mtval_i (mtval_d), + .etrigger_context_saved_valid_o (sdtrig_etrigger_context_saved_valid), + .etrigger_context_mepc_o (sdtrig_etrigger_context_mepc), + .etrigger_context_mcause_o (sdtrig_etrigger_context_mcause), + .etrigger_context_mtval_o (sdtrig_etrigger_context_mtval), + .sdtrig_commit_std_exception_valid_o(sdtrig_commit_std_exception_valid), + .fetch_sdtrig_pc_i (fetch_sdtrig_pc_i), + .sdtrig_decoder_action_o (sdtrig_decoder_action_o), + .sdtrig_load_stall_o (sdtrig_load_stall_o), + .sdtrig_load_cancel_o (sdtrig_load_cancel_o), + .sdtrig_load_action_o (sdtrig_load_action_o), + .sdtrig_store_stall_o (sdtrig_store_stall_o), + .sdtrig_store_action_o (sdtrig_store_action_o), + .sdtrig_commit_icount_valid_o (sdtrig_commit_icount_valid_o), + .sdtrig_commit_action_o (sdtrig_commit_action_o), + .sdtrig_commit_icount_nr_instr_o (sdtrig_commit_icount_nr_instr_o) + ); + end else begin + assign tdata1_from_tm = '0; + assign tdata2_from_tm = '0; + assign tdata3_from_tm = '0; + assign tselect_from_tm = '0; + assign flush_from_tm = 0; + assign sdtrig_commit_std_exception_valid = '0; + assign sdtrig_etrigger_context_saved_valid = '0; + assign sdtrig_etrigger_context_mepc = '0; + assign sdtrig_etrigger_context_mcause = '0; + assign sdtrig_etrigger_context_mtval = '0; + for (genvar i = 0; i < CVA6Cfg.NrIssuePorts; i++) assign sdtrig_decoder_action_o[i] = '0; + assign sdtrig_load_stall_o = '0; + assign sdtrig_load_cancel_o = '0; + assign sdtrig_load_action_o = '0; + assign sdtrig_store_stall_o = '0; + assign sdtrig_store_action_o = '0; + assign sdtrig_commit_icount_valid_o = '0; + assign sdtrig_commit_action_o = '0; + assign sdtrig_commit_icount_nr_instr_o = '0; + end + endgenerate + //------------- // Assertions //------------- diff --git a/core/cva6.sv b/core/cva6.sv index e42e6c389c4..f1f416dfea7 100644 --- a/core/cva6.sv +++ b/core/cva6.sv @@ -35,11 +35,12 @@ module cva6 // this is the struct which we will inject into the pipeline to guide the various // units towards the correct branch decision and resolve localparam type branchpredict_sbe_t = struct packed { + logic valid; // valid control flow prediction cf_t cf; // type of control flow prediction logic [CVA6Cfg.VLEN-1:0] predict_address; // target address at which to jump, or not }, - localparam type exception_t = struct packed { + parameter type exception_t = struct packed { logic [CVA6Cfg.XLEN-1:0] cause; // cause of exception logic [CVA6Cfg.XLEN-1:0] tval; // additional information of causing exception (e.g.: instruction causing it), // address of LD/ST fault @@ -47,6 +48,8 @@ module cva6 logic [31:0] tinst; // transformed instruction information logic gva; // signals when a guest virtual address is written to tval logic valid; + //timing of exception, timing = 0 : break immediately or timing = 1 break immediatemy AFTER (let current instruction commit but only this one) + logic timing; }, // cache request ports @@ -164,8 +167,13 @@ module cva6 fu_t fu; fu_op operation; logic [CVA6Cfg.TRANS_ID_BITS-1:0] trans_id; + logic is_speculative_load; + logic is_speculative_load_miss; }, + + localparam type cbo_t = logic [7:0], + localparam type fu_data_t = struct packed { fu_t fu; fu_op operation; @@ -179,7 +187,7 @@ module cva6 logic [CVA6Cfg.ICACHE_SET_ASSOC_WIDTH-1:0] way; // way to replace logic [CVA6Cfg.PLEN-1:0] paddr; // physical address logic nc; // noncacheable - logic [CVA6Cfg.MEM_TID_WIDTH-1:0] tid; // threadi id (used as transaction id in Ariane) + logic [CVA6Cfg.MEM_TID_WIDTH-1:0] tid; // thread id (used as transaction id in Ariane) }, localparam type icache_rtrn_t = struct packed { wt_cache_pkg::icache_in_t rtype; // see definitions above @@ -191,7 +199,7 @@ module cva6 logic [CVA6Cfg.ICACHE_INDEX_WIDTH-1:0] idx; // physical address to invalidate logic [CVA6Cfg.ICACHE_SET_ASSOC_WIDTH-1:0] way; // way to invalidate } inv; // invalidation vector - logic [CVA6Cfg.MEM_TID_WIDTH-1:0] tid; // threadi id (used as transaction id in Ariane) + logic [CVA6Cfg.MEM_TID_WIDTH-1:0] tid; // thread id (used as transaction id in Ariane) }, // D$ data requests @@ -207,6 +215,7 @@ module cva6 logic [CVA6Cfg.DcacheIdWidth-1:0] data_id; logic kill_req; logic tag_valid; + cbo_t cbo_op; }, localparam type dcache_req_o_t = struct packed { @@ -215,8 +224,17 @@ module cva6 logic [CVA6Cfg.DcacheIdWidth-1:0] data_rid; logic [CVA6Cfg.XLEN-1:0] data_rdata; logic [CVA6Cfg.DCACHE_USER_WIDTH-1:0] data_ruser; + logic data_error; }, + // Accelerator - CVA6 + parameter type accelerator_req_t = logic, + parameter type accelerator_resp_t = logic, + + // Accelerator - CVA6's MMU + parameter type acc_mmu_req_t = logic, + parameter type acc_mmu_resp_t = logic, + // AXI types parameter type axi_ar_chan_t = struct packed { logic [CVA6Cfg.AxiIdWidth-1:0] id; @@ -292,13 +310,13 @@ module cva6 parameter type hartid_t = `HARTID_T(CVA6Cfg), parameter type x_compressed_req_t = `X_COMPRESSED_REQ_T(CVA6Cfg, hartid_t), parameter type x_compressed_resp_t = `X_COMPRESSED_RESP_T(CVA6Cfg), - parameter type x_issue_req_t = `X_ISSUE_REQ_T(CVA6Cfg, hartit_t, id_t), + parameter type x_issue_req_t = `X_ISSUE_REQ_T(CVA6Cfg, hartid_t, id_t), parameter type x_issue_resp_t = `X_ISSUE_RESP_T(CVA6Cfg, writeregflags_t, readregflags_t), parameter type x_register_t = `X_REGISTER_T(CVA6Cfg, hartid_t, id_t, readregflags_t), parameter type x_commit_t = `X_COMMIT_T(CVA6Cfg, hartid_t, id_t), parameter type x_result_t = `X_RESULT_T(CVA6Cfg, hartid_t, id_t, writeregflags_t), parameter type cvxif_req_t = - `CVXIF_REQ_T(CVA6Cfg, x_compressed_req_t, x_issue_req_t, x_register_req_t, x_commit_t), + `CVXIF_REQ_T(CVA6Cfg, x_compressed_req_t, x_issue_req_t, x_register_t, x_commit_t), parameter type cvxif_resp_t = `CVXIF_RESP_T(CVA6Cfg, x_compressed_resp_t, x_issue_resp_t, x_result_t) ) ( @@ -344,30 +362,31 @@ module cva6 }; localparam interrupts_t INTERRUPTS = '{ - S_SW: (1 << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_S_SOFT), - VS_SW: (1 << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_VS_SOFT), - M_SW: (1 << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_M_SOFT), - S_TIMER: (1 << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_S_TIMER), - VS_TIMER: (1 << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_VS_TIMER), - M_TIMER: (1 << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_M_TIMER), - S_EXT: (1 << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_S_EXT), - VS_EXT: (1 << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_VS_EXT), - M_EXT: (1 << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_M_EXT), - HS_EXT: (1 << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_HS_EXT) + S_SW: (CVA6Cfg.XLEN'(1) << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_S_SOFT), + VS_SW: (CVA6Cfg.XLEN'(1) << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_VS_SOFT), + M_SW: (CVA6Cfg.XLEN'(1) << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_M_SOFT), + S_TIMER: (CVA6Cfg.XLEN'(1) << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_S_TIMER), + VS_TIMER: (CVA6Cfg.XLEN'(1) << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_VS_TIMER), + M_TIMER: (CVA6Cfg.XLEN'(1) << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_M_TIMER), + S_EXT: (CVA6Cfg.XLEN'(1) << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_S_EXT), + VS_EXT: (CVA6Cfg.XLEN'(1) << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_VS_EXT), + M_EXT: (CVA6Cfg.XLEN'(1) << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_M_EXT), + HS_EXT: (CVA6Cfg.XLEN'(1) << (CVA6Cfg.XLEN - 1)) | CVA6Cfg.XLEN'(riscv::IRQ_HS_EXT) }; // ------------------------------------------ // Global Signals // Signals connecting more than one module // ------------------------------------------ - riscv::priv_lvl_t priv_lvl; - logic v; - exception_t ex_commit; // exception from commit stage - bp_resolve_t resolved_branch; - logic [ CVA6Cfg.VLEN-1:0] pc_commit; - logic eret; - logic [CVA6Cfg.NrCommitPorts-1:0] commit_ack; - logic [CVA6Cfg.NrCommitPorts-1:0] commit_macro_ack; + riscv::priv_lvl_t priv_lvl; + logic v; + exception_t ex_commit; // exception from commit stage + bp_resolve_t resolved_branch; + logic [CVA6Cfg.VLEN-1:0] pc_commit; + logic eret; + logic [CVA6Cfg.NrCommitPorts-1:0] commit_ack; + logic [CVA6Cfg.NrCommitPorts-1:0] commit_macro_ack; + logic mbe; // determines the data endian-ness of the processor localparam NumPorts = 4; @@ -422,6 +441,7 @@ module cva6 logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.XLEN-1:0] rvfi_rs2; fu_data_t [CVA6Cfg.NrIssuePorts-1:0] fu_data_id_ex; + alu_bypass_t alu_bypass_id_ex; logic [CVA6Cfg.VLEN-1:0] pc_id_ex; logic zcmt_id_ex; logic is_compressed_instr_id_ex; @@ -434,6 +454,8 @@ module cva6 exception_t flu_exception_ex_id; // ALU logic [CVA6Cfg.NrIssuePorts-1:0] alu_valid_id_ex; + logic [5:0] orig_instr_aes; + logic [CVA6Cfg.NrIssuePorts-1:0] aes_valid_id_ex; // Branches and Jumps logic [CVA6Cfg.NrIssuePorts-1:0] branch_valid_id_ex; @@ -463,6 +485,7 @@ module cva6 logic [CVA6Cfg.XLEN-1:0] fpu_result_ex_id; logic fpu_valid_ex_id; exception_t fpu_exception_ex_id; + logic fpu_early_valid_ex_id; // ALU2 logic [CVA6Cfg.NrIssuePorts-1:0] alu2_valid_id_ex; // Accelerator @@ -505,10 +528,16 @@ module cva6 logic stall_st_pending_ex; logic no_st_pending_ex; logic no_st_pending_commit; + logic shared_tlb_flush_busy_ex; logic amo_valid_commit; // ACCEL Commit logic acc_valid_acc_ex; // -------------- + // EX <-> ACC_DISP + // -------------- + acc_mmu_req_t acc_mmu_req; + acc_mmu_resp_t acc_mmu_resp; + // -------------- // ID <-> COMMIT // -------------- scoreboard_entry_t [CVA6Cfg.NrCommitPorts-1:0] commit_instr_id_commit; @@ -563,17 +592,42 @@ module cva6 logic tsr_csr_id; logic hu; irq_ctrl_t irq_ctrl_csr_id; - logic dcache_en_csr_nbdcache; + logic dcache_en_csr; + logic dcache_scrub_en_csr; + logic [5:0] dcache_scrub_period_csr; + logic dcache_scrub_cycle_csr; + logic dcache_dat_cor_err_csr; + logic dcache_dat_unc_err_csr; + logic dcache_dir_cor_err_csr; + logic dcache_dir_unc_err_csr; logic csr_write_fflags_commit_cs; logic icache_en_csr; logic acc_cons_en_csr; logic debug_mode; logic single_step_csr_commit; - riscv::pmpcfg_t [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0] pmpcfg; - logic [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0][CVA6Cfg.PLEN-3:0] pmpaddr; + riscv::pmpcfg_t [avoid_neg(CVA6Cfg.NrPMPEntries-1):0] pmpcfg; + logic [avoid_neg(CVA6Cfg.NrPMPEntries-1):0][CVA6Cfg.PLEN-3:0] pmpaddr; logic [31:0] mcountinhibit_csr_perf; //jvt jvt_t jvt; + // trigger module + logic + sdtrig_commit_std_exception_valid, + sdtrig_sb_std_exception_valid, + sdtrig_load_stall, + sdtrig_load_cancel, + sdtrig_store_stall; + logic [CVA6Cfg.XLEN-1:0] sdtrig_decoder_action[CVA6Cfg.NrIssuePorts]; + logic [CVA6Cfg.XLEN-1:0] sdtrig_load_action, sdtrig_store_action, sdtrig_commit_action; + logic [CVA6Cfg.VLEN-1:0] sdtrig_lsu_inputs_operand_a; + logic [CVA6Cfg.XLEN-1:0] sdtrig_lsu_inputs_operand_c; + logic sdtrig_lsu_inputs_we, sdtrig_lsu_inputs_valid; + fu_op sdtrig_lsu_inputs_op; + logic sdtrig_commit_icount_valid; + logic [$clog2(CVA6Cfg.NrCommitPorts)-1:0] sdtrig_commit_icount_nr_instr; + + riscv::cbie_t mcbie, scbie, hcbie; + logic mcbcfe, scbcfe, hcbcfe; // ---------------------------- // Performance Counters <-> * // ---------------------------- @@ -607,6 +661,7 @@ module cva6 logic hfence_vvma_commit_controller; logic hfence_gvma_commit_controller; logic halt_ctrl; + logic halt_frontend; logic halt_csr_ctrl; logic dcache_flush_ctrl_cache; logic dcache_flush_ack_cache_ctrl; @@ -659,9 +714,11 @@ module cva6 .clk_i, .rst_ni, .boot_addr_i (boot_addr_i[CVA6Cfg.VLEN-1:0]), - .flush_bp_i (1'b0), - .flush_i (flush_ctrl_if), // not entirely correct + .flush_bp_i ((CVA6Cfg.RVU || CVA6Cfg.RVS) ? flush_ctrl_bp : 1'b0), + // below line is not entirely correct + .flush_i (flush_ctrl_if), .halt_i (halt_ctrl), + .halt_frontend_i (halt_frontend), .set_pc_commit_i (set_pc_ctrl_pcgen), .pc_commit_i (pc_commit), .ex_valid_i (ex_commit.valid), @@ -714,29 +771,37 @@ module cva6 .rvfi_is_compressed_o(rvfi_is_compressed), - .priv_lvl_i (priv_lvl), - .v_i (v), - .fs_i (fs), - .vfs_i (vfs), - .frm_i (frm_csr_id_issue_ex), - .vs_i (vs), - .irq_i (irq_i), - .irq_ctrl_i (irq_ctrl_csr_id), - .debug_mode_i (debug_mode), - .tvm_i (tvm_csr_id), - .tw_i (tw_csr_id), - .vtw_i (vtw_csr_id), - .tsr_i (tsr_csr_id), - .hu_i (hu), - .hart_id_i (hart_id_i), - .compressed_ready_i(x_compressed_ready), - .compressed_resp_i (x_compressed_resp), - .compressed_valid_o(x_compressed_valid), - .compressed_req_o (x_compressed_req), - .jvt_i (jvt), + .priv_lvl_i (priv_lvl), + .v_i (v), + .fs_i (fs), + .vfs_i (vfs), + .frm_i (frm_csr_id_issue_ex), + .vs_i (vs), + .irq_i (irq_i), + .irq_ctrl_i (irq_ctrl_csr_id), + .debug_mode_i (debug_mode), + .tvm_i (tvm_csr_id), + .tw_i (tw_csr_id), + .vtw_i (vtw_csr_id), + .tsr_i (tsr_csr_id), + .hu_i (hu), + .mcbie_i (mcbie), + .scbie_i (scbie), + .hcbie_i (hcbie), + .mcbcfe_i (mcbcfe), + .scbcfe_i (scbcfe), + .hcbcfe_i (hcbcfe), + .hart_id_i (hart_id_i), + .compressed_ready_i (x_compressed_ready), + .compressed_resp_i (x_compressed_resp), + .compressed_valid_o (x_compressed_valid), + .compressed_req_o (x_compressed_req), + .jvt_i (jvt), // DCACHE interfaces - .dcache_req_ports_i(dcache_req_ports_cache_id), - .dcache_req_ports_o(dcache_req_ports_id_cache) + .dcache_req_ports_i (dcache_req_ports_cache_id), + .dcache_req_ports_o (dcache_req_ports_id_cache), + //Trigger Module command signal + .sdtrig_decoder_action_i(sdtrig_decoder_action) ); logic [CVA6Cfg.NrWbPorts-1:0][CVA6Cfg.TRANS_ID_BITS-1:0] trans_id_ex_id; @@ -764,17 +829,18 @@ module cva6 assign ex_ex_ex_id[FPU_WB] = fpu_exception_ex_id; assign wt_valid_ex_id[FPU_WB] = fpu_valid_ex_id; - always_comb begin : gen_cvxif_input_assignement - x_compressed_ready = cvxif_resp_i.compressed_ready; - x_compressed_resp = cvxif_resp_i.compressed_resp; - x_issue_ready = cvxif_resp_i.issue_ready; - x_issue_resp = cvxif_resp_i.issue_resp; - x_register_ready = cvxif_resp_i.register_ready; - x_result_valid = cvxif_resp_i.result_valid; - x_result = cvxif_resp_i.result; - end if (CVA6Cfg.CvxifEn) begin - always_comb begin : gen_cvxif_output_assignement + always_comb begin : gen_cvxif_input_assignment + x_compressed_ready = cvxif_resp_i.compressed_ready; + x_compressed_resp = cvxif_resp_i.compressed_resp; + x_issue_ready = cvxif_resp_i.issue_ready; + x_issue_resp = cvxif_resp_i.issue_resp; + x_register_ready = cvxif_resp_i.register_ready; + x_result_valid = cvxif_resp_i.result_valid; + x_result = cvxif_resp_i.result; + end + + always_comb begin : gen_cvxif_output_assignment cvxif_req.compressed_valid = x_compressed_valid; cvxif_req.compressed_req = x_compressed_req; cvxif_req.issue_valid = x_issue_valid; @@ -797,6 +863,13 @@ module cva6 assign wt_valid_ex_id[ACC_WB] = acc_valid_ex_id; end else begin assign cvxif_req = '0; + assign x_compressed_ready = '0; + assign x_compressed_resp = '0; + assign x_issue_ready = '0; + assign x_issue_resp = '0; + assign x_register_ready = '0; + assign x_result_valid = '0; + assign x_result = '0; end if (CVA6Cfg.CvxifEn && CVA6Cfg.EnableAccelerator) begin : gen_err_xif_and_acc @@ -836,6 +909,7 @@ module cva6 .rs1_forwarding_o (rs1_forwarding_id_ex), .rs2_forwarding_o (rs2_forwarding_id_ex), .fu_data_o (fu_data_id_ex), + .alu_bypass_o (alu_bypass_id_ex), .pc_o (pc_id_ex), .is_zcmt_o (zcmt_id_ex), .is_compressed_instr_o (is_compressed_instr_id_ex), @@ -844,6 +918,7 @@ module cva6 .flu_ready_i (flu_ready_ex_id), // ALU .alu_valid_o (alu_valid_id_ex), + .aes_valid_o (aes_valid_id_ex), // Branches and Jumps .branch_valid_o (branch_valid_id_ex), // branch is valid .branch_predict_o (branch_predict_id_ex), // branch predict to ex @@ -858,6 +933,7 @@ module cva6 .fpu_valid_o (fpu_valid_id_ex), .fpu_fmt_o (fpu_fmt_id_ex), .fpu_rm_o (fpu_rm_id_ex), + .fpu_early_valid_i (fpu_early_valid_ex_id), // ALU2 .alu2_valid_o (alu2_valid_id_ex), // CSR @@ -902,7 +978,8 @@ module cva6 .rvfi_issue_pointer_o (rvfi_issue_pointer), .rvfi_commit_pointer_o(rvfi_commit_pointer), .rvfi_rs1_o (rvfi_rs1), - .rvfi_rs2_o (rvfi_rs2) + .rvfi_rs2_o (rvfi_rs2), + .orig_instr_aes_bits (orig_instr_aes) ); // --------- @@ -921,7 +998,10 @@ module cva6 .icache_dreq_t(icache_dreq_t), .icache_drsp_t(icache_drsp_t), .lsu_ctrl_t(lsu_ctrl_t), - .x_result_t(x_result_t) + .x_result_t(x_result_t), + .acc_mmu_req_t(acc_mmu_req_t), + .acc_mmu_resp_t(acc_mmu_resp_t), + .cbo_t(cbo_t) ) ex_stage_i ( .clk_i(clk_i), .rst_ni(rst_ni), @@ -930,6 +1010,7 @@ module cva6 .rs1_forwarding_i(rs1_forwarding_id_ex), .rs2_forwarding_i(rs2_forwarding_id_ex), .fu_data_i(fu_data_id_ex), + .alu_bypass_i(alu_bypass_id_ex), .pc_i(pc_id_ex), .is_zcmt_i(zcmt_id_ex), .is_compressed_instr_i(is_compressed_instr_id_ex), @@ -942,6 +1023,8 @@ module cva6 .flu_ready_o(flu_ready_ex_id), // ALU .alu_valid_i(alu_valid_id_ex), + .orig_instr_aes_i(orig_instr_aes), + .aes_valid_i(aes_valid_id_ex), // Branches and Jumps .branch_valid_i(branch_valid_id_ex), .branch_predict_i(branch_predict_id_ex), // branch predict to ex @@ -968,81 +1051,98 @@ module cva6 .store_valid_o (store_valid_ex_id), .store_exception_o(store_exception_ex_id), - .lsu_commit_i (lsu_commit_commit_ex), // from commit - .lsu_commit_ready_o (lsu_commit_ready_ex_commit), // to commit - .commit_tran_id_i (lsu_commit_trans_id), // from commit - .stall_st_pending_i (stall_st_pending_ex), - .no_st_pending_o (no_st_pending_ex), + .lsu_commit_i (lsu_commit_commit_ex), // from commit + .lsu_commit_ready_o (lsu_commit_ready_ex_commit), // to commit + .commit_tran_id_i (lsu_commit_trans_id), // from commit + .stall_st_pending_i (stall_st_pending_ex), + .shared_tlb_flush_busy_o (shared_tlb_flush_busy_ex), + .no_st_pending_o (no_st_pending_ex), // FPU - .fpu_ready_o (fpu_ready_ex_id), - .fpu_valid_i (fpu_valid_id_ex), - .fpu_fmt_i (fpu_fmt_id_ex), - .fpu_rm_i (fpu_rm_id_ex), - .fpu_frm_i (frm_csr_id_issue_ex), - .fpu_prec_i (fprec_csr_ex), - .fpu_trans_id_o (fpu_trans_id_ex_id), - .fpu_result_o (fpu_result_ex_id), - .fpu_valid_o (fpu_valid_ex_id), - .fpu_exception_o (fpu_exception_ex_id), + .fpu_ready_o (fpu_ready_ex_id), + .fpu_valid_i (fpu_valid_id_ex), + .fpu_fmt_i (fpu_fmt_id_ex), + .fpu_rm_i (fpu_rm_id_ex), + .fpu_frm_i (frm_csr_id_issue_ex), + .fpu_prec_i (fprec_csr_ex), + .fpu_trans_id_o (fpu_trans_id_ex_id), + .fpu_result_o (fpu_result_ex_id), + .fpu_valid_o (fpu_valid_ex_id), + .fpu_exception_o (fpu_exception_ex_id), + .fpu_early_valid_o (fpu_early_valid_ex_id), // ALU2 - .alu2_valid_i (alu2_valid_id_ex), - .amo_valid_commit_i (amo_valid_commit), - .amo_req_o (amo_req), - .amo_resp_i (amo_resp), + .alu2_valid_i (alu2_valid_id_ex), + .amo_valid_commit_i (amo_valid_commit), + .amo_req_o (amo_req), + .amo_resp_i (amo_resp), // CoreV-X-Interface - .x_valid_i (x_issue_valid_id_ex), - .x_ready_o (x_issue_ready_ex_id), - .x_off_instr_i (x_off_instr_id_ex), - .x_transaction_rejected_i(x_transaction_rejected), - .x_trans_id_o (x_trans_id_ex_id), - .x_exception_o (x_exception_ex_id), - .x_result_o (x_result_ex_id), - .x_valid_o (x_valid_ex_id), - .x_we_o (x_we_ex_id), - .x_rd_o (x_rd_ex_id), - .x_result_valid_i (x_result_valid), - .x_result_i (x_result), - .x_result_ready_o (x_result_ready), + .x_valid_i (x_issue_valid_id_ex), + .x_ready_o (x_issue_ready_ex_id), + .x_off_instr_i (x_off_instr_id_ex), + .x_transaction_rejected_i (x_transaction_rejected), + .x_trans_id_o (x_trans_id_ex_id), + .x_exception_o (x_exception_ex_id), + .x_result_o (x_result_ex_id), + .x_valid_o (x_valid_ex_id), + .x_we_o (x_we_ex_id), + .x_rd_o (x_rd_ex_id), + .x_result_valid_i (x_result_valid), + .x_result_i (x_result), + .x_result_ready_o (x_result_ready), // Accelerator - .acc_valid_i (acc_valid_acc_ex), + .acc_valid_i (acc_valid_acc_ex), + // Accelerator MMU access + .acc_mmu_req_i (acc_mmu_req), + .acc_mmu_resp_o (acc_mmu_resp), // Performance counters - .itlb_miss_o (itlb_miss_ex_perf), - .dtlb_miss_o (dtlb_miss_ex_perf), + .itlb_miss_o (itlb_miss_ex_perf), + .dtlb_miss_o (dtlb_miss_ex_perf), // Memory Management - .enable_translation_i (enable_translation_csr_ex), // from CSR - .enable_g_translation_i (enable_g_translation_csr_ex), // from CSR - .en_ld_st_translation_i (en_ld_st_translation_csr_ex), - .en_ld_st_g_translation_i(en_ld_st_g_translation_csr_ex), - .flush_tlb_i (flush_tlb_ctrl_ex), - .flush_tlb_vvma_i (flush_tlb_vvma_ctrl_ex), - .flush_tlb_gvma_i (flush_tlb_gvma_ctrl_ex), - .priv_lvl_i (priv_lvl), // from CSR - .v_i (v), // from CSR - .ld_st_priv_lvl_i (ld_st_priv_lvl_csr_ex), // from CSR - .ld_st_v_i (ld_st_v_csr_ex), // from CSR - .sum_i (sum_csr_ex), // from CSR - .vs_sum_i (vs_sum_csr_ex), // from CSR - .mxr_i (mxr_csr_ex), // from CSR - .vmxr_i (vmxr_csr_ex), // from CSR - .satp_ppn_i (satp_ppn_csr_ex), // from CSR - .asid_i (asid_csr_ex), // from CSR - .vsatp_ppn_i (vsatp_ppn_csr_ex), // from CSR - .vs_asid_i (vs_asid_csr_ex), // from CSR - .hgatp_ppn_i (hgatp_ppn_csr_ex), // from CSR - .vmid_i (vmid_csr_ex), // from CSR - .icache_areq_i (icache_areq_cache_ex), - .icache_areq_o (icache_areq_ex_cache), + .enable_translation_i (enable_translation_csr_ex), // from CSR + .enable_g_translation_i (enable_g_translation_csr_ex), // from CSR + .en_ld_st_translation_i (en_ld_st_translation_csr_ex), + .en_ld_st_g_translation_i (en_ld_st_g_translation_csr_ex), + .flush_tlb_i (flush_tlb_ctrl_ex), + .flush_tlb_vvma_i (flush_tlb_vvma_ctrl_ex), + .flush_tlb_gvma_i (flush_tlb_gvma_ctrl_ex), + .priv_lvl_i (priv_lvl), // from CSR + .mbe_i (mbe), // from CSR + .v_i (v), // from CSR + .ld_st_priv_lvl_i (ld_st_priv_lvl_csr_ex), // from CSR + .ld_st_v_i (ld_st_v_csr_ex), // from CSR + .sum_i (sum_csr_ex), // from CSR + .vs_sum_i (vs_sum_csr_ex), // from CSR + .mxr_i (mxr_csr_ex), // from CSR + .vmxr_i (vmxr_csr_ex), // from CSR + .satp_ppn_i (satp_ppn_csr_ex), // from CSR + .asid_i (asid_csr_ex), // from CSR + .vsatp_ppn_i (vsatp_ppn_csr_ex), // from CSR + .vs_asid_i (vs_asid_csr_ex), // from CSR + .hgatp_ppn_i (hgatp_ppn_csr_ex), // from CSR + .vmid_i (vmid_csr_ex), // from CSR + .icache_areq_i (icache_areq_cache_ex), + .icache_areq_o (icache_areq_ex_cache), // DCACHE interfaces - .dcache_req_ports_i (dcache_req_ports_cache_ex), - .dcache_req_ports_o (dcache_req_ports_ex_cache), - .dcache_wbuffer_empty_i (dcache_commit_wbuffer_empty), - .dcache_wbuffer_not_ni_i (dcache_commit_wbuffer_not_ni), + .dcache_req_ports_i (dcache_req_ports_cache_ex), + .dcache_req_ports_o (dcache_req_ports_ex_cache), + .dcache_wbuffer_empty_i (dcache_commit_wbuffer_empty), + .dcache_wbuffer_not_ni_i (dcache_commit_wbuffer_not_ni), // PMP - .pmpcfg_i (pmpcfg), - .pmpaddr_i (pmpaddr), + .pmpcfg_i (pmpcfg), + .pmpaddr_i (pmpaddr), //RVFI - .rvfi_lsu_ctrl_o (rvfi_lsu_ctrl), - .rvfi_mem_paddr_o (rvfi_mem_paddr) + .rvfi_lsu_ctrl_o (rvfi_lsu_ctrl), + .rvfi_mem_paddr_o (rvfi_mem_paddr), + //Trigger module command signals + .sdtrig_load_stall_i (sdtrig_load_stall), + .sdtrig_load_cancel_i (sdtrig_load_cancel), + .sdtrig_load_action_i (sdtrig_load_action), + .sdtrig_store_stall_i (sdtrig_store_stall), + .sdtrig_store_action_i (sdtrig_store_action), + .sdtrig_lsu_inputs_operand_a_o(sdtrig_lsu_inputs_operand_a), + .sdtrig_lsu_inputs_operand_c_o(sdtrig_lsu_inputs_operand_c), + .sdtrig_lsu_inputs_we_o (sdtrig_lsu_inputs_we), + .sdtrig_lsu_inputs_op_o (sdtrig_lsu_inputs_op), + .sdtrig_lsu_inputs_valid_o (sdtrig_lsu_inputs_valid) ); // --------- @@ -1060,38 +1160,43 @@ module cva6 ) commit_stage_i ( .clk_i, .rst_ni, - .halt_i (halt_ctrl), - .flush_dcache_i (dcache_flush_ctrl_cache), - .exception_o (ex_commit), - .dirty_fp_state_o (dirty_fp_state), - .single_step_i (single_step_csr_commit || single_step_acc_commit), - .commit_instr_i (commit_instr_id_commit), - .commit_drop_i (commit_drop_id_commit), - .commit_ack_o (commit_ack_commit_id), - .commit_macro_ack_o(commit_macro_ack), - .waddr_o (waddr_commit_id), - .wdata_o (wdata_commit_id), - .we_gpr_o (we_gpr_commit_id), - .we_fpr_o (we_fpr_commit_id), - .amo_resp_i (amo_resp), - .pc_o (pc_commit), - .csr_op_o (csr_op_commit_csr), - .csr_wdata_o (csr_wdata_commit_csr), - .csr_rdata_i (csr_rdata_csr_commit), - .csr_write_fflags_o(csr_write_fflags_commit_cs), - .csr_exception_i (csr_exception_csr_commit), - .commit_lsu_o (lsu_commit_commit_ex), - .commit_lsu_ready_i(lsu_commit_ready_ex_commit), - .commit_tran_id_o (lsu_commit_trans_id), - .amo_valid_commit_o(amo_valid_commit), - .no_st_pending_i (no_st_pending_commit), - .commit_csr_o (csr_commit_commit_ex), - .fence_i_o (fence_i_commit_controller), - .fence_o (fence_commit_controller), - .flush_commit_o (flush_commit), - .sfence_vma_o (sfence_vma_commit_controller), - .hfence_vvma_o (hfence_vvma_commit_controller), - .hfence_gvma_o (hfence_gvma_commit_controller) + .halt_i (halt_ctrl), + .flush_dcache_i (dcache_flush_ctrl_cache), + .exception_o (ex_commit), + .dirty_fp_state_o (dirty_fp_state), + .single_step_i (single_step_csr_commit || single_step_acc_commit), + .commit_instr_i (commit_instr_id_commit), + .commit_drop_i (commit_drop_id_commit), + .commit_ack_o (commit_ack_commit_id), + .commit_macro_ack_o (commit_macro_ack), + .waddr_o (waddr_commit_id), + .wdata_o (wdata_commit_id), + .we_gpr_o (we_gpr_commit_id), + .we_fpr_o (we_fpr_commit_id), + .amo_resp_i (amo_resp), + .pc_o (pc_commit), + .csr_op_o (csr_op_commit_csr), + .csr_wdata_o (csr_wdata_commit_csr), + .csr_rdata_i (csr_rdata_csr_commit), + .csr_write_fflags_o (csr_write_fflags_commit_cs), + .csr_exception_i (csr_exception_csr_commit), + .commit_lsu_o (lsu_commit_commit_ex), + .commit_lsu_ready_i (lsu_commit_ready_ex_commit), + .commit_tran_id_o (lsu_commit_trans_id), + .amo_valid_commit_o (amo_valid_commit), + .no_st_pending_i (no_st_pending_commit), + .shared_tlb_flush_busy_i (shared_tlb_flush_busy_ex), + .commit_csr_o (csr_commit_commit_ex), + .fence_i_o (fence_i_commit_controller), + .fence_o (fence_commit_controller), + .flush_commit_o (flush_commit), + .sfence_vma_o (sfence_vma_commit_controller), + .hfence_vvma_o (hfence_vvma_commit_controller), + .hfence_gvma_o (hfence_gvma_commit_controller), + .sdtrig_commit_std_exception_valid_i(sdtrig_commit_std_exception_valid), + .sdtrig_commit_icount_valid_i (sdtrig_commit_icount_valid), + .sdtrig_commit_action_i (sdtrig_commit_action), + .sdtrig_commit_icount_nr_instr_i (sdtrig_commit_icount_nr_instr) ); assign commit_ack = commit_macro_ack & ~commit_drop_id_commit; @@ -1099,6 +1204,15 @@ module cva6 // --------- // CSR // --------- + + //Trigger Module assignments + logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.VLEN-1:0] fetch_sdtrig_pc; + logic [CVA6Cfg.NrIssuePorts-1:0][31:0] fetch_sdtrig_instr; + for (genvar i = 0; i < CVA6Cfg.NrIssuePorts; ++i) begin + assign fetch_sdtrig_pc[i] = CVA6Cfg.SdtrigMcontrol6ExecAddr ? fetch_entry_if_id[i].address : '0; + assign fetch_sdtrig_instr[i] = CVA6Cfg.SdtrigMcontrol6ExecData ? fetch_entry_if_id[i].instruction : '0; + end + csr_regfile #( .CVA6Cfg (CVA6Cfg), .exception_t (exception_t), @@ -1111,77 +1225,114 @@ module cva6 .clk_i, .rst_ni, .time_irq_i, - .flush_o (flush_csr_ctrl), - .halt_csr_o (halt_csr_ctrl), - .commit_instr_i (commit_instr_id_commit[0]), - .commit_ack_i (commit_ack), - .boot_addr_i (boot_addr_i[CVA6Cfg.VLEN-1:0]), - .hart_id_i (hart_id_i[CVA6Cfg.XLEN-1:0]), - .ex_i (ex_commit), - .csr_op_i (csr_op_commit_csr), - .csr_addr_i (csr_addr_ex_csr), - .csr_wdata_i (csr_wdata_commit_csr), - .csr_rdata_o (csr_rdata_csr_commit), - .dirty_fp_state_i (dirty_fp_state), - .csr_write_fflags_i (csr_write_fflags_commit_cs), - .dirty_v_state_i (dirty_v_state), - .pc_i (pc_commit), - .csr_exception_o (csr_exception_csr_commit), - .epc_o (epc_commit_pcgen), - .eret_o (eret), - .trap_vector_base_o (trap_vector_base_commit_pcgen), - .priv_lvl_o (priv_lvl), - .v_o (v), - .acc_fflags_ex_i (acc_resp_fflags), - .acc_fflags_ex_valid_i (acc_resp_fflags_valid), - .fs_o (fs), - .vfs_o (vfs), - .fflags_o (fflags_csr_commit), - .frm_o (frm_csr_id_issue_ex), - .fprec_o (fprec_csr_ex), - .vs_o (vs), - .irq_ctrl_o (irq_ctrl_csr_id), - .en_translation_o (enable_translation_csr_ex), - .en_g_translation_o (enable_g_translation_csr_ex), - .en_ld_st_translation_o (en_ld_st_translation_csr_ex), - .en_ld_st_g_translation_o(en_ld_st_g_translation_csr_ex), - .ld_st_priv_lvl_o (ld_st_priv_lvl_csr_ex), - .ld_st_v_o (ld_st_v_csr_ex), - .csr_hs_ld_st_inst_i (csr_hs_ld_st_inst_ex), - .sum_o (sum_csr_ex), - .vs_sum_o (vs_sum_csr_ex), - .mxr_o (mxr_csr_ex), - .vmxr_o (vmxr_csr_ex), - .satp_ppn_o (satp_ppn_csr_ex), - .asid_o (asid_csr_ex), - .vsatp_ppn_o (vsatp_ppn_csr_ex), - .vs_asid_o (vs_asid_csr_ex), - .hgatp_ppn_o (hgatp_ppn_csr_ex), - .vmid_o (vmid_csr_ex), + .flush_o (flush_csr_ctrl), + .halt_csr_o (halt_csr_ctrl), + .commit_instr_i (commit_instr_id_commit[0]), + .commit_ack_i (commit_ack), + .boot_addr_i (boot_addr_i[CVA6Cfg.VLEN-1:0]), + .hart_id_i (hart_id_i[CVA6Cfg.XLEN-1:0]), + .ex_i (ex_commit), + .csr_op_i (csr_op_commit_csr), + .csr_addr_i (csr_addr_ex_csr), + .csr_wdata_i (csr_wdata_commit_csr), + .csr_rdata_o (csr_rdata_csr_commit), + .dirty_fp_state_i (dirty_fp_state), + .csr_write_fflags_i (csr_write_fflags_commit_cs), + .dirty_v_state_i (dirty_v_state), + .pc_i (pc_commit), + .csr_exception_o (csr_exception_csr_commit), + .epc_o (epc_commit_pcgen), + .eret_o (eret), + .trap_vector_base_o (trap_vector_base_commit_pcgen), + .priv_lvl_o (priv_lvl), + .mbe_o (mbe), + .v_o (v), + .acc_fflags_ex_i (acc_resp_fflags), + .acc_fflags_ex_valid_i (acc_resp_fflags_valid), + .fs_o (fs), + .vfs_o (vfs), + .fflags_o (fflags_csr_commit), + .frm_o (frm_csr_id_issue_ex), + .fprec_o (fprec_csr_ex), + .vs_o (vs), + .irq_ctrl_o (irq_ctrl_csr_id), + .en_translation_o (enable_translation_csr_ex), + .en_g_translation_o (enable_g_translation_csr_ex), + .en_ld_st_translation_o (en_ld_st_translation_csr_ex), + .en_ld_st_g_translation_o (en_ld_st_g_translation_csr_ex), + .ld_st_priv_lvl_o (ld_st_priv_lvl_csr_ex), + .ld_st_v_o (ld_st_v_csr_ex), + .csr_hs_ld_st_inst_i (csr_hs_ld_st_inst_ex), + .sum_o (sum_csr_ex), + .vs_sum_o (vs_sum_csr_ex), + .mxr_o (mxr_csr_ex), + .vmxr_o (vmxr_csr_ex), + .satp_ppn_o (satp_ppn_csr_ex), + .asid_o (asid_csr_ex), + .vsatp_ppn_o (vsatp_ppn_csr_ex), + .vs_asid_o (vs_asid_csr_ex), + .hgatp_ppn_o (hgatp_ppn_csr_ex), + .vmid_o (vmid_csr_ex), .irq_i, .ipi_i, .debug_req_i, - .set_debug_pc_o (set_debug_pc), - .tvm_o (tvm_csr_id), - .tw_o (tw_csr_id), - .vtw_o (vtw_csr_id), - .tsr_o (tsr_csr_id), - .hu_o (hu), - .debug_mode_o (debug_mode), - .single_step_o (single_step_csr_commit), - .icache_en_o (icache_en_csr), - .dcache_en_o (dcache_en_csr_nbdcache), - .acc_cons_en_o (acc_cons_en_csr), - .perf_addr_o (addr_csr_perf), - .perf_data_o (data_csr_perf), - .perf_data_i (data_perf_csr), - .perf_we_o (we_csr_perf), - .pmpcfg_o (pmpcfg), - .pmpaddr_o (pmpaddr), - .mcountinhibit_o (mcountinhibit_csr_perf), - .jvt_o (jvt), + .set_debug_pc_o (set_debug_pc), + .tvm_o (tvm_csr_id), + .tw_o (tw_csr_id), + .vtw_o (vtw_csr_id), + .tsr_o (tsr_csr_id), + .hu_o (hu), + .debug_mode_o (debug_mode), + .single_step_o (single_step_csr_commit), + .icache_en_o (icache_en_csr), + .dcache_en_o (dcache_en_csr), + .dcache_scrub_en_o (dcache_scrub_en_csr), + .dcache_scrub_period_o (dcache_scrub_period_csr), + .dcache_scrub_cycle_i (dcache_scrub_cycle_csr), + .dcache_dat_cor_err_i (dcache_dat_cor_err_csr), + .dcache_dat_unc_err_i (dcache_dat_unc_err_csr), + .dcache_dir_cor_err_i (dcache_dir_cor_err_csr), + .dcache_dir_unc_err_i (dcache_dir_unc_err_csr), + .acc_cons_en_o (acc_cons_en_csr), + .perf_addr_o (addr_csr_perf), + .perf_data_o (data_csr_perf), + .perf_data_i (data_perf_csr), + .perf_we_o (we_csr_perf), + .pmpcfg_o (pmpcfg), + .pmpaddr_o (pmpaddr), + .mcountinhibit_o (mcountinhibit_csr_perf), + .mcbie_o (mcbie), + .scbie_o (scbie), + .hcbie_o (hcbie), + .mcbcfe_o (mcbcfe), + .scbcfe_o (scbcfe), + .hcbcfe_o (hcbcfe), + .jvt_o (jvt), //RVFI - .rvfi_csr_o (rvfi_csr) + .rvfi_csr_o (rvfi_csr), + // Trigger Signals + .sdtrig_commit_std_exception_valid_o(sdtrig_commit_std_exception_valid), + //Decoder/FE <-> Trigger Module + .fetch_sdtrig_pc_i (fetch_sdtrig_pc), + .fetch_sdtrig_instr_i (fetch_sdtrig_instr), + .sdtrig_decoder_action_o (sdtrig_decoder_action), + //Load/Store Unit <-> Trigger Module + .sdtrig_lsu_inputs_vaddr_i (sdtrig_lsu_inputs_operand_a), + .sdtrig_lsu_inputs_data_i (sdtrig_lsu_inputs_operand_c), + .sdtrig_lsu_inputs_fu_i (sdtrig_lsu_inputs_we), + .sdtrig_lsu_inputs_op_i (sdtrig_lsu_inputs_op), + .sdtrig_lsu_inputs_valid_i (sdtrig_lsu_inputs_valid), + .sdtrig_load_data_i (load_result_ex_id), + .sdtrig_load_valid_i (load_valid_ex_id), + .sdtrig_load_stall_o (sdtrig_load_stall), + .sdtrig_load_cancel_o (sdtrig_load_cancel), + .sdtrig_load_action_o (sdtrig_load_action), + .sdtrig_store_stall_o (sdtrig_store_stall), + .sdtrig_store_action_o (sdtrig_store_action), + //Commit <- Trigger module + .sdtrig_commit_icount_valid_o (sdtrig_commit_icount_valid), + .sdtrig_commit_action_o (sdtrig_commit_action), + .sdtrig_commit_icount_nr_instr_o (sdtrig_commit_icount_nr_instr) ); // ------------------------ @@ -1258,6 +1409,7 @@ module cva6 .flush_tlb_gvma_o (flush_tlb_gvma_ctrl_ex), .halt_csr_i (halt_csr_ctrl), .halt_acc_i (halt_acc_ctrl), + .halt_frontend_o (halt_frontend), .halt_o (halt_ctrl), // control ports .eret_i (eret), @@ -1279,13 +1431,13 @@ module cva6 // ------------------- // Acc dispatcher and store buffer share a dcache request port. - // Store buffer always has priority access over acc dipsatcher. + // Store buffer always has priority access over acc dispatcher. dcache_req_i_t [NumPorts-1:0] dcache_req_to_cache; dcache_req_o_t [NumPorts-1:0] dcache_req_from_cache; // D$ request - // Since ZCMT is only enable for embdeed class so MMU should be disable. - // Cache port 0 is being ultilize in implicit read access in ZCMT extension. + // Since ZCMT is only enabled for embedded class so MMU should be disabled. + // Cache port 0 is being utilized in implicit read access in ZCMT extension. if (CVA6Cfg.RVZCMT & ~(CVA6Cfg.MmuPresent)) begin assign dcache_req_to_cache[0] = dcache_req_ports_id_cache; end else begin @@ -1297,8 +1449,8 @@ module cva6 dcache_req_ports_acc_cache[1]; // D$ response - // Since ZCMT is only enable for embdeed class so MMU should be disable. - // Cache port 0 is being ultilized in implicit read access in ZCMT extension. + // Since ZCMT is only enabled for embedded class so MMU should be disabled. + // Cache port 0 is being utilized in implicit read access in ZCMT extension. if (CVA6Cfg.RVZCMT & ~(CVA6Cfg.MmuPresent)) begin assign dcache_req_ports_cache_id = dcache_req_from_cache[0]; assign dcache_req_ports_cache_ex[0] = '0; @@ -1345,12 +1497,13 @@ module cva6 .icache_dreq_i (icache_dreq_if_cache), .icache_dreq_o (icache_dreq_cache_if), // D$ - .dcache_enable_i (dcache_en_csr_nbdcache), + .dcache_enable_i (dcache_en_csr), .dcache_flush_i (dcache_flush_ctrl_cache), .dcache_flush_ack_o(dcache_flush_ack_cache_ctrl), // to commit stage .dcache_amo_req_i (amo_req), .dcache_amo_resp_o (amo_resp), + .mbe_i (mbe), // from PTW, Load Unit and Store Unit .dcache_miss_o (dcache_miss_cache_perf), .miss_vld_bits_o (miss_vld_bits), @@ -1366,10 +1519,16 @@ module cva6 .inval_valid_i (inval_valid), .inval_ready_o (inval_ready) ); - end else if (CVA6Cfg.DCacheType inside { - config_pkg::HPDCACHE_WT, - config_pkg::HPDCACHE_WB, - config_pkg::HPDCACHE_WT_WB}) + assign dcache_scrub_cycle_csr = 1'b0; + assign dcache_dat_cor_err_csr = 1'b0; + assign dcache_dat_unc_err_csr = 1'b0; + assign dcache_dir_cor_err_csr = 1'b0; + assign dcache_dir_unc_err_csr = 1'b0; + end else if ( + CVA6Cfg.DCacheType == config_pkg::HPDCACHE_WT || + CVA6Cfg.DCacheType == config_pkg::HPDCACHE_WB || + CVA6Cfg.DCacheType == config_pkg::HPDCACHE_WT_WB + ) begin : gen_cache_hpd cva6_hpdcache_subsystem #( .CVA6Cfg (CVA6Cfg), @@ -1388,9 +1547,7 @@ module cva6 .axi_b_chan_t (b_chan_t), .axi_r_chan_t (r_chan_t), .noc_req_t (noc_req_t), - .noc_resp_t(noc_resp_t), - .cmo_req_t (logic /*FIXME*/), - .cmo_rsp_t (logic /*FIXME*/) + .noc_resp_t(noc_resp_t) ) i_cache_subsystem ( .clk_i (clk_i), .rst_ni(rst_ni), @@ -1403,17 +1560,21 @@ module cva6 .icache_dreq_i (icache_dreq_if_cache), .icache_dreq_o (icache_dreq_cache_if), - .dcache_enable_i (dcache_en_csr_nbdcache), - .dcache_flush_i (dcache_flush_ctrl_cache), - .dcache_flush_ack_o(dcache_flush_ack_cache_ctrl), - .dcache_miss_o (dcache_miss_cache_perf), + .dcache_enable_i (dcache_en_csr), + .dcache_flush_i (dcache_flush_ctrl_cache), + .dcache_flush_ack_o (dcache_flush_ack_cache_ctrl), + .dcache_miss_o (dcache_miss_cache_perf), + .dcache_scrub_enable_i(dcache_scrub_en_csr), + .dcache_scrub_period_i(dcache_scrub_period_csr), + .dcache_scrub_cycle_o (dcache_scrub_cycle_csr), + .dcache_dat_cor_err_o (dcache_dat_cor_err_csr), + .dcache_dat_unc_err_o (dcache_dat_unc_err_csr), + .dcache_dir_cor_err_o (dcache_dir_cor_err_csr), + .dcache_dir_unc_err_o (dcache_dir_unc_err_csr), .dcache_amo_req_i (amo_req), .dcache_amo_resp_o(amo_resp), - .dcache_cmo_req_i ('0 /*FIXME*/), - .dcache_cmo_resp_o( /*FIXME*/), - .dcache_req_ports_i(dcache_req_to_cache), .dcache_req_ports_o(dcache_req_from_cache), @@ -1434,7 +1595,8 @@ module cva6 .noc_req_o (noc_req_o), .noc_resp_i(noc_resp_i) ); - assign inval_ready = 1'b1; + assign inval_ready = 1'b1; + assign miss_vld_bits = '0; end else begin : gen_cache_wb std_cache_subsystem #( // note: this only works with one cacheable region @@ -1469,7 +1631,7 @@ module cva6 .icache_dreq_i (icache_dreq_if_cache), .icache_dreq_o (icache_dreq_cache_if), // D$ - .dcache_enable_i (dcache_en_csr_nbdcache), + .dcache_enable_i (dcache_en_csr), .dcache_flush_i (dcache_flush_ctrl_cache), .dcache_flush_ack_o(dcache_flush_ack_cache_ctrl), // to commit stage @@ -1486,7 +1648,13 @@ module cva6 .axi_resp_i (noc_resp_i) ); assign dcache_commit_wbuffer_not_ni = 1'b1; + assign dcache_scrub_cycle_csr = 1'b0; + assign dcache_dat_cor_err_csr = 1'b0; + assign dcache_dat_unc_err_csr = 1'b0; + assign dcache_dir_cor_err_csr = 1'b0; + assign dcache_dir_unc_err_csr = 1'b0; assign inval_ready = 1'b1; + assign miss_vld_bits = '0; end // ---------------- @@ -1504,7 +1672,11 @@ module cva6 .acc_cfg_t (acc_cfg_t), .AccCfg (AccCfg), .acc_req_t (cvxif_req_t), - .acc_resp_t (cvxif_resp_t) + .acc_resp_t (cvxif_resp_t), + .accelerator_req_t (accelerator_req_t), + .accelerator_resp_t(accelerator_resp_t), + .acc_mmu_req_t (acc_mmu_req_t), + .acc_mmu_resp_t (acc_mmu_resp_t) ) i_acc_dispatcher ( .clk_i (clk_i), .rst_ni (rst_ni), @@ -1520,6 +1692,7 @@ module cva6 .pmpcfg_i (pmpcfg), .pmpaddr_i (pmpaddr), .fcsr_frm_i (frm_csr_id_issue_ex), + .acc_mmu_en_i (enable_translation_csr_ex), .dirty_v_state_o (dirty_v_state), .issue_instr_i (issue_instr_id_acc), .issue_instr_hs_i (issue_instr_hs_id_acc), @@ -1536,6 +1709,8 @@ module cva6 .acc_stall_st_pending_o(stall_st_pending_ex), .acc_no_st_pending_i (no_st_pending_commit), .dcache_req_ports_i (dcache_req_ports_ex_cache), + .acc_mmu_req_o (acc_mmu_req), + .acc_mmu_resp_i (acc_mmu_resp), .ctrl_halt_o (halt_acc_ctrl), .csr_addr_i (csr_addr_ex_csr), .acc_dcache_req_ports_o(dcache_req_ports_acc_cache), @@ -1565,6 +1740,9 @@ module cva6 // D$ connection is unused assign dcache_req_ports_acc_cache = '0; + // MMU access is unused + assign acc_mmu_req = '0; + // No invalidation interface assign inval_valid = '0; assign inval_addr = '0; @@ -1594,7 +1772,7 @@ module cva6 logic [CVA6Cfg.NrCommitPorts-1:0] pc_pop, pc_empty; for (genvar i = 0; i < CVA6Cfg.NrCommitPorts; i++) begin : gen_pc_fifo - fifo_v3 #( + cva6_fifo_v3 #( .DATA_WIDTH(64), .DEPTH(PC_QUEUE_DEPTH), .FPGA_EN(CVA6Cfg.FpgaEn) @@ -1632,6 +1810,18 @@ module cva6 `endif // PITON_ARIANE `ifndef VERILATOR + + logic [ 31:0] fetch_instructions [CVA6Cfg.NrIssuePorts-1:0]; + logic [CVA6Cfg.NrCommitPorts-1:0][63:0] wdata_commit_id_padded; + + for (genvar i = 0; i < CVA6Cfg.NrIssuePorts; ++i) begin + assign fetch_instructions[i] = fetch_entry_if_id[i].instruction; + end + + for (genvar i = 0; i < CVA6Cfg.NrCommitPorts; ++i) begin + assign wdata_commit_id_padded[i] = {{(64 - CVA6Cfg.XLEN) {1'b0}}, wdata_commit_id[i]}; + end + instr_tracer #( .CVA6Cfg(CVA6Cfg), .bp_resolve_t(bp_resolve_t), @@ -1645,17 +1835,18 @@ module cva6 .rstn(rst_ni), .flush_unissued(flush_unissued_instr_ctrl_id), .flush_all(flush_ctrl_ex), - .instruction(id_stage_i.fetch_entry_i[0].instruction), - .fetch_valid(id_stage_i.fetch_entry_valid_i[0]), - .fetch_ack(id_stage_i.fetch_entry_ready_o[0]), + .instruction(fetch_instructions), + .fetch_valid(id_stage_i.fetch_entry_valid_i), + .fetch_ack(id_stage_i.fetch_entry_ready_o), .issue_ack(issue_stage_i.i_scoreboard.issue_ack_i), .issue_sbe(issue_stage_i.i_scoreboard.issue_instr_o), .waddr(waddr_commit_id), - .wdata(wdata_commit_id), + .wdata(wdata_commit_id_padded), .we_gpr(we_gpr_commit_id), .we_fpr(we_fpr_commit_id), .commit_instr(commit_instr_id_commit), - .commit_ack(commit_ack), + .commit_ack(commit_ack_commit_id), + .commit_drop(commit_drop_id_commit), .st_valid(ex_stage_i.lsu_i.i_store_unit.store_buffer_i.valid_i), .st_paddr(ex_stage_i.lsu_i.i_store_unit.store_buffer_i.paddr_i), .ld_valid(ex_stage_i.lsu_i.i_load_unit.req_port_o.tag_valid), @@ -1737,6 +1928,7 @@ module cva6 .exception_t (exception_t), .scoreboard_entry_t (scoreboard_entry_t), .lsu_ctrl_t (lsu_ctrl_t), + .bp_resolve_t (bp_resolve_t), .rvfi_probes_instr_t(rvfi_probes_instr_t), .rvfi_probes_csr_t (rvfi_probes_csr_t), .rvfi_probes_t (rvfi_probes_t) @@ -1772,7 +1964,8 @@ module cva6 .csr_i(rvfi_csr), .irq_i(irq_i), - + .resolved_branch_i(resolved_branch), + .flu_trans_id_ex_id_i(flu_trans_id_ex_id), .rvfi_probes_o(rvfi_probes_o) ); diff --git a/core/cva6_fifo_v3.sv b/core/cva6_fifo_v3.sv index d1faa01b3a2..631ce226513 100644 --- a/core/cva6_fifo_v3.sv +++ b/core/cva6_fifo_v3.sv @@ -1,5 +1,5 @@ // Copyright 2018 ETH Zurich and University of Bologna. -// Copyright 2024 - PlanV Technologies for additionnal contribution. +// Copyright 2024 - PlanV Technologies for additional contribution. // Copyright and related rights are licensed under the Solderpad Hardware // License, Version 0.51 (the "License"); you may not use this file except in // compliance with the License. You may obtain a copy of the License at diff --git a/core/cva6_mmu/cva6_mmu.sv b/core/cva6_mmu/cva6_mmu.sv index 53822799384..ef7099a1f5d 100644 --- a/core/cva6_mmu/cva6_mmu.sv +++ b/core/cva6_mmu/cva6_mmu.sv @@ -18,7 +18,7 @@ // Description: Memory Management Unit for CVA6, contains TLB and // address translation unit. SV32 SV39 and SV39x4 as defined in RISC-V // privilege specification 1.11-WIP. -// This module is an merge of the MMU Sv39 developed +// This module is a merge of the MMU Sv39 developed // by Florian Zaruba, the MMU Sv32 developed by Sebastien Jacq and the MMU Sv39x4 developed by Bruno Sá. @@ -59,9 +59,14 @@ module cva6_mmu // Cycle 0 output logic lsu_dtlb_hit_o, // sent in same cycle as the request if translation hits in DTLB output logic [CVA6Cfg.PPNW-1:0] lsu_dtlb_ppn_o, // ppn (send same cycle as hit) - // Cycle 1 + // Cycle 1 response output logic lsu_valid_o, // translation is valid output logic [CVA6Cfg.PLEN-1:0] lsu_paddr_o, // translated address + // Metadata for the same response transaction as lsu_valid_o, lsu_paddr_o, + // and lsu_exception_o. + output logic [CVA6Cfg.VLEN-1:0] lsu_vaddr_o, + output logic lsu_is_store_o, + output logic lsu_hlvx_inst_o, output exception_t lsu_exception_o, // address translation threw an exception // General control signals input riscv::priv_lvl_t priv_lvl_i, @@ -72,6 +77,7 @@ module cva6_mmu input logic vs_sum_i, input logic mxr_i, input logic vmxr_i, + input logic mbe_i, input logic hlvx_inst_i, input logic hs_ld_st_inst_i, // input logic flag_mprv_i, @@ -91,6 +97,9 @@ module cva6_mmu input logic flush_tlb_vvma_i, input logic flush_tlb_gvma_i, + // Shared TLB is busy processing a multi-cycle flush + output logic shared_tlb_flush_busy_o, + // Performance counters output logic itlb_miss_o, output logic dtlb_miss_o, @@ -100,13 +109,14 @@ module cva6_mmu // PMP - input riscv::pmpcfg_t [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0] pmpcfg_i, - input logic [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0][CVA6Cfg.PLEN-3:0] pmpaddr_i + input riscv::pmpcfg_t [avoid_neg(CVA6Cfg.NrPMPEntries-1):0] pmpcfg_i, + input logic [avoid_neg(CVA6Cfg.NrPMPEntries-1):0][CVA6Cfg.PLEN-3:0] pmpaddr_i ); // memory management, pte for cva6 localparam type pte_cva6_t = struct packed { - logic [9:0] reserved; + logic n; + logic [8:0] reserved; logic [CVA6Cfg.PPNW-1:0] ppn; // PPN length for logic [1:0] rsw; logic d; @@ -120,14 +130,15 @@ module cva6_mmu }; localparam type tlb_update_cva6_t = struct packed { - logic valid; + logic valid; + logic is_napot_64k; // Svnapot: Flag indicating a 64KiB NAPOT page logic [CVA6Cfg.PtLevels-2:0][HYP_EXT:0] is_page; - logic [CVA6Cfg.VpnLen-1:0] vpn; - logic [CVA6Cfg.ASID_WIDTH-1:0] asid; - logic [CVA6Cfg.VMID_WIDTH-1:0] vmid; - logic [HYP_EXT*2:0] v_st_enbl; // v_i,g-stage enabled, s-stage enabled - pte_cva6_t content; - pte_cva6_t g_content; + logic [CVA6Cfg.VpnLen-1:0] vpn; + logic [CVA6Cfg.ASID_WIDTH-1:0] asid; + logic [CVA6Cfg.VMID_WIDTH-1:0] vmid; + logic [HYP_EXT*2:0] v_st_enbl; // v_i,g-stage enabled, s-stage enabled + pte_cva6_t content; + pte_cva6_t g_content; }; logic iaccess_err; // insufficient privilege to access this instruction page @@ -143,6 +154,7 @@ module cva6_mmu logic ptw_access_exception; // PTW threw an access exception (PMPs) logic [CVA6Cfg.PLEN-1:0] ptw_bad_paddr; // PTW page fault bad physical addr logic [CVA6Cfg.GPLEN-1:0] ptw_bad_gpaddr; // PTW guest page fault bad guest physical addr + logic [CVA6Cfg.PPNW-1:0] final_fetch_ppn; logic [CVA6Cfg.VLEN-1:0] update_vaddr, shared_tlb_vaddr; @@ -170,7 +182,7 @@ module cva6_mmu // Assignments assign itlb_lu_access = icache_areq_i.fetch_req; - assign dtlb_lu_access = lsu_req_i; + assign dtlb_lu_access = lsu_req_i & !misaligned_ex_i.valid; assign itlb_lu_asid = v_i ? vs_asid_i : asid_i; assign dtlb_lu_asid = (ld_st_v_i || flush_tlb_vvma_i) ? vs_asid_i : asid_i; @@ -223,7 +235,7 @@ module cva6_mmu .v_i (ld_st_v_i), .update_i (update_dtlb), .lu_access_i (dtlb_lu_access), - .lu_asid_i (itlb_lu_asid), + .lu_asid_i (dtlb_lu_asid), .lu_vmid_i (vmid_i), .lu_vaddr_i (lsu_vaddr_i), .lu_gpaddr_o (dtlb_gpaddr), @@ -270,10 +282,14 @@ module cva6_mmu .dtlb_hit_i (dtlb_lu_hit), .dtlb_vaddr_i (lsu_vaddr_i), + .asid_to_be_flushed_i(asid_to_be_flushed_i), + .vaddr_to_be_flushed_i(vaddr_to_be_flushed_i), + .vmid_to_be_flushed_i(vmid_to_be_flushed_i), + .gpaddr_to_be_flushed_i(gpaddr_to_be_flushed_i), // to TLBs, update logic .itlb_update_o(update_itlb), .dtlb_update_o(update_dtlb), - + .flush_busy_o(shared_tlb_flush_busy_o), // Performance counters .itlb_miss_o(itlb_miss_o), .dtlb_miss_o(dtlb_miss_o), @@ -341,7 +357,7 @@ module cva6_mmu .hgatp_ppn_i, .mxr_i, .vmxr_i, - + .mbe_i(mbe_i), // Performance counters .shared_tlb_miss_o(shared_tlb_miss), //open for now @@ -356,12 +372,15 @@ module cva6_mmu // Instruction Interface //----------------------- localparam int PPNWMin = (CVA6Cfg.PPNW - 1 > 29) ? 29 : CVA6Cfg.PPNW - 1; + // Width of the mid-level (2M) superpage PPN substitution for PtLevels == 3. + // Evaluates to 9 for Sv39 and (unused but elaboration-legal) 1 for Sv32. + localparam int unsigned MegaPageSubstWidth = PPNWMin - (CVA6Cfg.VpnLen / CVA6Cfg.PtLevels) - 8 - CVA6Cfg.PtLevels; // The instruction interface is a simple request response interface always_comb begin : instr_interface // MMU disabled: just pass through icache_areq_o.fetch_valid = icache_areq_i.fetch_req; - icache_areq_o.fetch_paddr = CVA6Cfg.PLEN'(icache_areq_i.fetch_vaddr[((CVA6Cfg.PLEN > CVA6Cfg.VLEN) ? CVA6Cfg.VLEN -1: CVA6Cfg.PLEN -1 ):0]); + icache_areq_o.fetch_paddr = CVA6Cfg.PLEN'(icache_areq_i.fetch_vaddr[((CVA6Cfg.PLEN > CVA6Cfg.VLEN) ? CVA6Cfg.VLEN -1: CVA6Cfg.PLEN -1 ):0]); // two potential exception sources: // 1. HPTW threw an exception -> signal with a page fault exception // 2. We got an access error because of insufficient permissions -> throw an access exception @@ -378,9 +397,12 @@ module cva6_mmu // AXI decode error), or when PTW performs walk due to ITLB miss and raises // an error. if ((enable_translation_i || enable_g_translation_i)) begin - // we work with SV39 or SV32, so if VM is enabled, check that all bits [CVA6Cfg.VLEN-1:CVA6Cfg.SV-1] are equal - if (icache_areq_i.fetch_req && !((&icache_areq_i.fetch_vaddr[CVA6Cfg.VLEN-1:CVA6Cfg.SV-1]) == 1'b1 || (|icache_areq_i.fetch_vaddr[CVA6Cfg.VLEN-1:CVA6Cfg.SV-1]) == 1'b0)) begin - + // If second-level address translation is enabled: + // - in VS stage, check that all bits [CVA6Cfg.VLEN-1:CVA6Cfg.SV-1] are equal + // - in pure G stage (SV39x4 mode), [CVA6Cfg.VLEN-1:CVA6Cfg.GPLEN] must be zero. + // - in pure G stage (SV32x4 mode), no check is needed. + if ((enable_translation_i && (icache_areq_i.fetch_req && !((&icache_areq_i.fetch_vaddr[CVA6Cfg.VLEN-1:CVA6Cfg.SV-1]) == 1'b1 || (|icache_areq_i.fetch_vaddr[CVA6Cfg.VLEN-1:CVA6Cfg.SV-1]) == 1'b0))) + || (enable_g_translation_i && !enable_translation_i && CVA6Cfg.IS_XLEN64 && (|icache_areq_i.fetch_vaddr[CVA6Cfg.VLEN-1:CVA6Cfg.GPLEN] != 1'b0))) begin icache_areq_o.fetch_exception.cause = riscv::INSTR_PAGE_FAULT; icache_areq_o.fetch_exception.valid = 1'b1; if (CVA6Cfg.TvalEn) @@ -394,13 +416,13 @@ module cva6_mmu icache_areq_o.fetch_valid = 1'b0; - icache_areq_o.fetch_paddr = { - (enable_g_translation_i && CVA6Cfg.RVH) ? itlb_g_content.ppn : itlb_content.ppn, - icache_areq_i.fetch_vaddr[11:0] - }; + final_fetch_ppn = (enable_g_translation_i && CVA6Cfg.RVH)? itlb_g_content.ppn : itlb_content.ppn; + icache_areq_o.fetch_paddr = {final_fetch_ppn, icache_areq_i.fetch_vaddr[11:0]}; if (CVA6Cfg.PtLevels == 3 && itlb_is_page[CVA6Cfg.PtLevels-2]) begin + // strange 9+PtLevels to avoid CI errors on (purely syntactic) checks on Sv32, where + // `PPNWMin-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)` equals `11` and would lead to `icache_areq_i.fetch_vaddr[11:12]` icache_areq_o.fetch_paddr[PPNWMin-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels):9+CVA6Cfg.PtLevels] = icache_areq_i.fetch_vaddr[PPNWMin-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels):9+CVA6Cfg.PtLevels]; end @@ -453,7 +475,7 @@ module cva6_mmu if (CVA6Cfg.TvalEn) icache_areq_o.fetch_exception.tval = CVA6Cfg.XLEN'(update_vaddr); if (CVA6Cfg.RVH) begin icache_areq_o.fetch_exception.tval2 = ptw_bad_gpaddr[CVA6Cfg.GPLEN-1:0]; - icache_areq_o.fetch_exception.tinst=(ptw_err_at_g_int_st ? (CVA6Cfg.IS_XLEN64 ? riscv::READ_64_PSEUDOINSTRUCTION : riscv::READ_32_PSEUDOINSTRUCTION) : '0); + icache_areq_o.fetch_exception.tinst = (ptw_err_at_g_int_st ? (CVA6Cfg.IS_XLEN64 ? riscv::READ_64_PSEUDOINSTRUCTION : riscv::READ_32_PSEUDOINSTRUCTION) : '0); icache_areq_o.fetch_exception.gva = v_i; end end else begin @@ -469,7 +491,7 @@ module cva6_mmu end else begin icache_areq_o.fetch_exception.cause = riscv::INSTR_ACCESS_FAULT; icache_areq_o.fetch_exception.valid = 1'b1; - if (CVA6Cfg.TvalEn) //To confirm this is the right TVAL + if (CVA6Cfg.TvalEn) // To confirm this is the right TVAL icache_areq_o.fetch_exception.tval = CVA6Cfg.XLEN'(update_vaddr); if (CVA6Cfg.RVH) begin icache_areq_o.fetch_exception.tval2 = '0; @@ -489,12 +511,20 @@ module cva6_mmu logic [CVA6Cfg.GPLEN-1:0] lsu_gpaddr_n, lsu_gpaddr_q; logic [31:0] lsu_tinst_n, lsu_tinst_q; logic hs_ld_st_inst_n, hs_ld_st_inst_q; + logic hlvx_inst_n, hlvx_inst_q; + logic g_load_exec_as_read_ok; + logic g_load_access_ok; pte_cva6_t dtlb_pte_n, dtlb_pte_q; pte_cva6_t dtlb_gpte_n, dtlb_gpte_q; logic lsu_req_n, lsu_req_q; logic lsu_is_store_n, lsu_is_store_q; logic dtlb_hit_n, dtlb_hit_q; logic [CVA6Cfg.PtLevels-2:0] dtlb_is_page_n, dtlb_is_page_q; + exception_t misaligned_ex_n, misaligned_ex_q; + + assign lsu_vaddr_o = lsu_vaddr_q; + assign lsu_is_store_o = lsu_is_store_q; + assign lsu_hlvx_inst_o = CVA6Cfg.RVH ? hlvx_inst_q : 1'b0; // check if we need to do translation or if we are always ready (e.g.: we are not translating anything) assign lsu_dtlb_hit_o = (en_ld_st_translation_i || en_ld_st_g_translation_i) ? dtlb_lu_hit : 1'b1; @@ -509,13 +539,17 @@ module cva6_mmu dtlb_hit_n = dtlb_lu_hit; lsu_is_store_n = lsu_is_store_i; dtlb_is_page_n = dtlb_is_page; + misaligned_ex_n = misaligned_ex_i; lsu_valid_o = lsu_req_q; - lsu_exception_o = misaligned_ex_i; + lsu_exception_o = misaligned_ex_q; + + // mute misaligned exceptions if there is no request otherwise they will throw accidental exceptions + misaligned_ex_n.valid = misaligned_ex_i.valid & lsu_req_i; // we work with SV39 or SV32, so if VM is enabled, check that all bits [CVA6Cfg.VLEN-1:CVA6Cfg.SV-1] are equal to bit [CVA6Cfg.SV] - canonical_addr_check = (lsu_req_i && en_ld_st_translation_i && - !((&lsu_vaddr_i[CVA6Cfg.VLEN-1:CVA6Cfg.SV-1]) == 1'b1 || (|lsu_vaddr_i[CVA6Cfg.VLEN-1:CVA6Cfg.SV-1]) == 1'b0)); + canonical_addr_check = (lsu_req_q && en_ld_st_translation_i && + !((&lsu_vaddr_q[CVA6Cfg.VLEN-1:CVA6Cfg.SV-1]) == 1'b1 || (|lsu_vaddr_q[CVA6Cfg.VLEN-1:CVA6Cfg.SV-1]) == 1'b0)); // Check if the User flag is set, then we may only access it in supervisor mode // if SUM is enabled @@ -526,9 +560,21 @@ module cva6_mmu if (CVA6Cfg.RVH) begin lsu_tinst_n = lsu_tinst_i; hs_ld_st_inst_n = hs_ld_st_inst_i; - lsu_gpaddr_n[(CVA6Cfg.XLEN == 32 ? CVA6Cfg.VLEN: CVA6Cfg.GPLEN)-1:0] = dtlb_gpaddr[(CVA6Cfg.XLEN == 32 ? CVA6Cfg.VLEN: CVA6Cfg.GPLEN)-1:0]; + hlvx_inst_n = hlvx_inst_i; + lsu_gpaddr_n[(CVA6Cfg.IS_XLEN32 ? CVA6Cfg.VLEN: CVA6Cfg.GPLEN)-1:0] = dtlb_gpaddr[(CVA6Cfg.IS_XLEN32 ? CVA6Cfg.VLEN: CVA6Cfg.GPLEN)-1:0]; csr_hs_ld_st_inst_o = hs_ld_st_inst_i || hs_ld_st_inst_q; - d_g_st_access_err = en_ld_st_g_translation_i && !dtlb_gpte_q.u; + // The PTW path has its own permission checks while populating translation + // state. Once a G-stage translation is cached and a later LSU access hits in + // the DTLB, the hit path still has to re-check permissions against the + // current access type. In particular, a prior HLVX hit must not cause a + // later plain HLV load to inherit execute-only permission. + g_load_exec_as_read_ok = dtlb_gpte_q.x && (mxr_i || hlvx_inst_q); + g_load_access_ok = dtlb_gpte_q.r || g_load_exec_as_read_ok; + d_g_st_access_err = en_ld_st_g_translation_i && ( + !dtlb_gpte_q.u || + !dtlb_gpte_q.a || + (!lsu_is_store_q && !g_load_access_ok) + ); dtlb_gpte_n = dtlb_g_content; end @@ -536,25 +582,32 @@ module cva6_mmu lsu_dtlb_ppn_o = (CVA6Cfg.PPNW)'(lsu_vaddr_n[((CVA6Cfg.PLEN > CVA6Cfg.VLEN) ? CVA6Cfg.VLEN -1: CVA6Cfg.PLEN -1 ):12]); // translation is enabled and no misaligned exception occurred - if ((en_ld_st_translation_i || en_ld_st_g_translation_i) && !misaligned_ex_i.valid) begin + if ((en_ld_st_translation_i || en_ld_st_g_translation_i) && !misaligned_ex_q.valid) begin lsu_valid_o = 1'b0; - lsu_dtlb_ppn_o = (en_ld_st_g_translation_i && CVA6Cfg.RVH)? dtlb_g_content.ppn :dtlb_content.ppn; + lsu_dtlb_ppn_o = (en_ld_st_g_translation_i && CVA6Cfg.RVH) ? dtlb_g_content.ppn : dtlb_content.ppn; lsu_paddr_o = { (en_ld_st_g_translation_i && CVA6Cfg.RVH) ? dtlb_gpte_q.ppn : dtlb_pte_q.ppn, lsu_vaddr_q[11:0] }; if (CVA6Cfg.PtLevels == 3 && dtlb_is_page_q[CVA6Cfg.PtLevels-2]) begin + // Strange 9+PtLevels to avoid CI errors on (purely syntactic) checks on Sv32, where + // `PPNWMin-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)` equals `11` and would lead to `lsu_paddr_o[11:12]` lsu_paddr_o[PPNWMin-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels):9+CVA6Cfg.PtLevels] = lsu_vaddr_q[PPNWMin-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels):9+CVA6Cfg.PtLevels]; - lsu_dtlb_ppn_o[PPNWMin-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels):9+CVA6Cfg.PtLevels] = lsu_vaddr_n[PPNWMin-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels):9+CVA6Cfg.PtLevels]; + end + if (CVA6Cfg.PtLevels == 3 && dtlb_is_page_n[CVA6Cfg.PtLevels-2]) begin + lsu_dtlb_ppn_o[0+:MegaPageSubstWidth] = lsu_vaddr_n[(9+CVA6Cfg.PtLevels)+:MegaPageSubstWidth]; end + if (dtlb_is_page_q[0]) begin - lsu_dtlb_ppn_o[PPNWMin:12] = lsu_vaddr_n[PPNWMin:12]; lsu_paddr_o[PPNWMin:12] = lsu_vaddr_q[PPNWMin:12]; end + if (dtlb_is_page_n[0]) begin + lsu_dtlb_ppn_o[PPNWMin-12:0] = lsu_vaddr_n[PPNWMin:12]; + end // --------- @@ -579,7 +632,7 @@ module cva6_mmu {CVA6Cfg.XLEN - CVA6Cfg.VLEN{lsu_vaddr_q[CVA6Cfg.VLEN-1]}}, lsu_vaddr_q }; if (CVA6Cfg.RVH) begin - lsu_exception_o.tval2= CVA6Cfg.GPLEN'(lsu_gpaddr_q[(CVA6Cfg.XLEN==32?CVA6Cfg.VLEN : CVA6Cfg.GPLEN)-1:0]); + lsu_exception_o.tval2 = CVA6Cfg.GPLEN'(lsu_gpaddr_q[(CVA6Cfg.IS_XLEN32 ? CVA6Cfg.VLEN : CVA6Cfg.GPLEN)-1:0]); lsu_exception_o.tinst = '0; lsu_exception_o.gva = ld_st_v_i; end @@ -606,7 +659,7 @@ module cva6_mmu {CVA6Cfg.XLEN - CVA6Cfg.VLEN{lsu_vaddr_q[CVA6Cfg.VLEN-1]}}, lsu_vaddr_q }; if (CVA6Cfg.RVH) begin - lsu_exception_o.tval2= CVA6Cfg.GPLEN'(lsu_gpaddr_q[(CVA6Cfg.XLEN==32?CVA6Cfg.VLEN : CVA6Cfg.GPLEN)-1:0]); + lsu_exception_o.tval2 = CVA6Cfg.GPLEN'(lsu_gpaddr_q[(CVA6Cfg.IS_XLEN32 ? CVA6Cfg.VLEN : CVA6Cfg.GPLEN)-1:0]); lsu_exception_o.tinst = '0; lsu_exception_o.gva = ld_st_v_i; end @@ -647,7 +700,7 @@ module cva6_mmu }; if (CVA6Cfg.RVH) begin lsu_exception_o.tval2 = ptw_bad_gpaddr[CVA6Cfg.GPLEN-1:0]; - lsu_exception_o.tinst= (ptw_err_at_g_int_st ? (CVA6Cfg.IS_XLEN64 ? riscv::READ_64_PSEUDOINSTRUCTION : riscv::READ_32_PSEUDOINSTRUCTION) : '0); + lsu_exception_o.tinst = (ptw_err_at_g_int_st ? (CVA6Cfg.IS_XLEN64 ? riscv::READ_64_PSEUDOINSTRUCTION : riscv::READ_32_PSEUDOINSTRUCTION) : '0); lsu_exception_o.gva = ld_st_v_i; end end else begin @@ -673,7 +726,7 @@ module cva6_mmu }; if (CVA6Cfg.RVH) begin lsu_exception_o.tval2 = ptw_bad_gpaddr[CVA6Cfg.GPLEN-1:0]; - lsu_exception_o.tinst= (ptw_err_at_g_int_st ? (CVA6Cfg.IS_XLEN64 ? riscv::READ_64_PSEUDOINSTRUCTION : riscv::READ_32_PSEUDOINSTRUCTION) : '0); + lsu_exception_o.tinst = (ptw_err_at_g_int_st ? (CVA6Cfg.IS_XLEN64 ? riscv::READ_64_PSEUDOINSTRUCTION : riscv::READ_32_PSEUDOINSTRUCTION) : '0); lsu_exception_o.gva = ld_st_v_i; end end else begin @@ -736,17 +789,21 @@ module cva6_mmu dtlb_is_page_q <= '0; lsu_tinst_q <= '0; hs_ld_st_inst_q <= '0; + hlvx_inst_q <= '0; + misaligned_ex_q <= '0; end else begin - lsu_vaddr_q <= lsu_vaddr_n; - lsu_req_q <= lsu_req_n; - dtlb_pte_q <= dtlb_pte_n; - dtlb_hit_q <= dtlb_hit_n; - lsu_is_store_q <= lsu_is_store_n; - dtlb_is_page_q <= dtlb_is_page_n; + lsu_vaddr_q <= lsu_vaddr_n; + lsu_req_q <= lsu_req_n; + dtlb_pte_q <= dtlb_pte_n; + dtlb_hit_q <= dtlb_hit_n; + lsu_is_store_q <= lsu_is_store_n; + dtlb_is_page_q <= dtlb_is_page_n; + misaligned_ex_q <= misaligned_ex_n; if (CVA6Cfg.RVH) begin lsu_tinst_q <= lsu_tinst_n; hs_ld_st_inst_q <= hs_ld_st_inst_n; + hlvx_inst_q <= hlvx_inst_n; dtlb_gpte_q <= dtlb_gpte_n; lsu_gpaddr_q <= lsu_gpaddr_n; end diff --git a/core/cva6_mmu/cva6_ptw.sv b/core/cva6_mmu/cva6_ptw.sv index a5fef76fcce..52a4ba5ec68 100644 --- a/core/cva6_mmu/cva6_ptw.sv +++ b/core/cva6_mmu/cva6_ptw.sv @@ -15,8 +15,8 @@ // Author: Angela Gonzalez, PlanV Technology // Date: 26/02/2024 // Description: Hardware-PTW (Page-Table-Walker) for CVA6 supporting sv32, sv39 and sv39x4. -// This module is an merge of the PTW Sv39 developed by Florian Zaruba, -// the PTW Sv32 developed by Sebastien Jacq and the PTW Sv39x4 by Bruno Sá. +// This module is a merge of the PTW Sv39 developed by Florian Zaruba, +// the PTW Sv32 developed by Sebastien Jacq and the PTW Sv39x4 by Bruno Sá. /* verilator lint_off WIDTH */ @@ -40,7 +40,7 @@ module cva6_ptw output logic ptw_error_o, // set when an error occurred output logic ptw_error_at_g_st_o, // set when an error occurred at the G-Stage output logic ptw_err_at_g_int_st_o, // set when an error occurred at the G-Stage during S-Stage translation - output logic ptw_access_exception_o, // set when an PMP access exception occured + output logic ptw_access_exception_o, // set when a PMP access exception occurred input logic enable_translation_i, // CSRs indicate to enable SV39 VS-Stage translation input logic enable_g_translation_i, // CSRs indicate to enable SV39 G-Stage translation input logic en_ld_st_translation_i, // enable virtual memory translation for load/stores @@ -49,9 +49,9 @@ module cva6_ptw input logic ld_st_v_i, // load/store virtualization mode bit input logic hlvx_inst_i, // is a HLVX load/store instruction - input logic lsu_is_store_i, // this translation was triggered by a store + input logic lsu_is_store_i, // this translation was triggered by a store // PTW memory interface - input dcache_req_o_t req_port_i, + input dcache_req_o_t req_port_i, output dcache_req_i_t req_port_o, @@ -74,17 +74,18 @@ module cva6_ptw // from CSR file input logic [CVA6Cfg.PPNW-1:0] satp_ppn_i, // ppn from satp - input logic [CVA6Cfg.PPNW-1:0] vsatp_ppn_i, // ppn from satp + input logic [CVA6Cfg.PPNW-1:0] vsatp_ppn_i, // ppn from vsatp input logic [CVA6Cfg.PPNW-1:0] hgatp_ppn_i, // ppn from hgatp input logic mxr_i, input logic vmxr_i, + input logic mbe_i, // Performance counters output logic shared_tlb_miss_o, // PMP - input riscv::pmpcfg_t [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0] pmpcfg_i, - input logic [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0][CVA6Cfg.PLEN-3:0] pmpaddr_i, + input riscv::pmpcfg_t [avoid_neg(CVA6Cfg.NrPMPEntries-1):0] pmpcfg_i, + input logic [avoid_neg(CVA6Cfg.NrPMPEntries-1):0][CVA6Cfg.PLEN-3:0] pmpaddr_i, output logic [CVA6Cfg.PLEN-1:0] bad_paddr_o, output logic [CVA6Cfg.GPLEN-1:0] bad_gpaddr_o ); @@ -96,6 +97,10 @@ module cva6_ptw pte_cva6_t pte; // register to perform context switch between stages pte_cva6_t gpte_q, gpte_d; + + //Field for SVNAPOT + logic is_napot_64k; + assign pte = pte_cva6_t'(data_rdata_q); enum logic [2:0] { @@ -105,11 +110,13 @@ module cva6_ptw WAIT_RVALID, PROPAGATE_ERROR, PROPAGATE_ACCESS_ERROR, + KILL_REQ, LATENCY } state_q, state_d; logic [CVA6Cfg.PtLevels-2:0] misaligned_page; + logic shared_tlb_update_valid; logic [HYP_EXT:0][CVA6Cfg.PtLevels-2:0] ptw_lvl_n, ptw_lvl_q; // define 3 PTW stages to be used in sv39x4. sv32 and sv39 are always in S_STAGE @@ -128,6 +135,8 @@ module cva6_ptw logic global_mapping_q, global_mapping_n; // latched tag signal logic tag_valid_n, tag_valid_q; + // latched kill signal + logic kill_req_n, kill_req_q; // register the ASID logic [CVA6Cfg.ASID_WIDTH-1:0] tlb_update_asid_q, tlb_update_asid_n; // register the VMID @@ -150,12 +159,14 @@ module cva6_ptw // directly output the correct physical address assign req_port_o.address_index = ptw_pptr_q[CVA6Cfg.DCACHE_INDEX_WIDTH-1:0]; assign req_port_o.address_tag = ptw_pptr_q[CVA6Cfg.DCACHE_INDEX_WIDTH+CVA6Cfg.DCACHE_TAG_WIDTH-1:CVA6Cfg.DCACHE_INDEX_WIDTH]; - // we are never going to kill this request - assign req_port_o.kill_req = '0; // we are never going to write with the HPTW assign req_port_o.data_wdata = '0; // we only issue one single request at a time assign req_port_o.data_id = '0; + // user field not used + assign req_port_o.data_wuser = '0; + // not a write + assign req_port_o.cbo_op = ariane_pkg::CBO_NONE; // ----------- // TLB Update @@ -163,7 +174,6 @@ module cva6_ptw assign gpaddr_base = {pte.ppn[CVA6Cfg.GPPNW-1:0], vaddr_q[11:0]}; assign gpaddr[CVA6Cfg.PtLevels-1] = gpaddr_base; - assign shared_tlb_update_o.vpn = CVA6Cfg.VpnLen'(vaddr_q[CVA6Cfg.SV+HYP_EXT*2-1:12]); genvar z, w; generate @@ -174,16 +184,16 @@ module cva6_ptw // exception. assign misaligned_page[z] = (ptw_lvl_q[0] == (z)) && (pte.ppn[(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(CVA6Cfg.PtLevels-1-z)-1:0] != '0); - //record the vaddr corresponding to each level + // record the vaddr corresponding to each level for (w = 0; w < HYP_EXT * 2 + 1; w++) begin - assign vaddr_lvl[w][z] = w==0 ? vaddr_q[12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(CVA6Cfg.PtLevels-z-1))-1:12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(CVA6Cfg.PtLevels-z-2))] : - w==1 ? gptw_pptr_q[12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(CVA6Cfg.PtLevels-z-1))-1:12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(CVA6Cfg.PtLevels-z-2))]: - gpaddr_q[12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(CVA6Cfg.PtLevels-z-1))-1:12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(CVA6Cfg.PtLevels-z-2))]; + assign vaddr_lvl[w][z] = w==0 ? vaddr_q[12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(CVA6Cfg.PtLevels-z-1))-1:12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(CVA6Cfg.PtLevels-z-2))]: + w==1 ? gptw_pptr_q[12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(CVA6Cfg.PtLevels-z-1))-1:12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(CVA6Cfg.PtLevels-z-2))]: + gpaddr_q[12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(CVA6Cfg.PtLevels-z-1))-1:12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(CVA6Cfg.PtLevels-z-2))]; end if (CVA6Cfg.RVH) begin - assign gpaddr[z][CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels):0]= (ptw_lvl_q[0] == z) ? vaddr_q[CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels):0] : gpaddr_base[CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels):0]; - assign gpaddr[z][CVA6Cfg.VpnLen:CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)+1]= (ptw_lvl_q[0] == 0) ? vaddr_q[CVA6Cfg.VpnLen:CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)+1] : gpaddr_base[CVA6Cfg.VpnLen:CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)+1]; + assign gpaddr[z][CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels):0] = (ptw_lvl_q[0] == z) ? vaddr_q[CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels):0] : gpaddr_base[CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels):0]; + assign gpaddr[z][CVA6Cfg.VpnLen:CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)+1] = (ptw_lvl_q[0] == 0) ? vaddr_q[CVA6Cfg.VpnLen:CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)+1] : gpaddr_base[CVA6Cfg.VpnLen:CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)+1]; assign gpaddr[z][CVA6Cfg.GPLEN-1:CVA6Cfg.VpnLen+1] = gpaddr_base[CVA6Cfg.GPLEN-1:CVA6Cfg.VpnLen+1]; end @@ -192,14 +202,20 @@ module cva6_ptw endgenerate always_comb begin : tlb_update + shared_tlb_update_o.valid = shared_tlb_update_valid; + shared_tlb_update_o.is_napot_64k = is_napot_64k; + // update the correct page table level for (int unsigned y = 0; y < HYP_EXT + 1; y++) begin for (int unsigned x = 0; x < CVA6Cfg.PtLevels - 1; x++) begin - if((enable_g_translation_i && enable_translation_i) || (en_ld_st_g_translation_i && en_ld_st_translation_i) && CVA6Cfg.RVH) begin - shared_tlb_update_o.is_page[x][y] = (ptw_lvl_q[y==HYP_EXT?0 : 1] == x); + if(((enable_g_translation_i && enable_translation_i) || (en_ld_st_g_translation_i && en_ld_st_translation_i)) && CVA6Cfg.RVH) begin + // VS + G-Translation + shared_tlb_update_o.is_page[x][y] = (ptw_lvl_q[y==1?0 : 1] == x); end else if (enable_translation_i || en_ld_st_translation_i || !CVA6Cfg.RVH) begin + // non-V, S-Translation shared_tlb_update_o.is_page[x][y] = y == 0 ? (ptw_lvl_q[0] == x) : 1'b0; end else begin + // G-Translation shared_tlb_update_o.is_page[x][y] = y != 0 ? (ptw_lvl_q[0] == x) : 1'b0; end end @@ -207,7 +223,7 @@ module cva6_ptw // set the global mapping bit if ((enable_g_translation_i || en_ld_st_g_translation_i) && CVA6Cfg.RVH) begin - shared_tlb_update_o.content = gpte_q | (global_mapping_q << 5); + shared_tlb_update_o.content = (gpte_q | (global_mapping_q << 5)); shared_tlb_update_o.g_content = pte; end else begin shared_tlb_update_o.content = (pte | (global_mapping_q << 5)); @@ -216,7 +232,8 @@ module cva6_ptw // output the correct ASIDs shared_tlb_update_o.asid = tlb_update_asid_q; - shared_tlb_update_o.vmid = tlb_update_vmid_q; + shared_tlb_update_o.vmid = CVA6Cfg.RVH ? tlb_update_vmid_q : '0; + shared_tlb_update_o.vpn = vaddr_q[12+CVA6Cfg.VpnLen-1:12]; bad_paddr_o = ptw_access_exception_o ? ptw_pptr_q : 'b0; if (CVA6Cfg.RVH) @@ -224,8 +241,10 @@ module cva6_ptw end assign req_port_o.tag_valid = tag_valid_q; + assign req_port_o.kill_req = (state_q == KILL_REQ); logic allow_access; + logic hlvx_eff; @@ -244,9 +263,14 @@ module cva6_ptw ); - assign req_port_o.data_be = CVA6Cfg.XLEN == 32 ? be_gen_32( + assign req_port_o.data_be = CVA6Cfg.IS_XLEN32 ? be_gen_32( req_port_o.address_index[1:0], req_port_o.data_size ) : '1; + // The HLVX permission rule (allow read via execute-only pages) applies only to the + // *original* access. For an implicit page-table read performed while G-stage-translating + // a VS-stage PTE address (G_INTERMED_STAGE), the access must be checked as an ordinary + // implicit load, so HLVX must not apply here. + assign hlvx_eff = hlvx_inst_i && !(CVA6Cfg.RVH && ptw_stage_q == G_INTERMED_STAGE); @@ -258,8 +282,8 @@ module cva6_ptw // PAGESIZE=2^12 and LEVELS=3.) // 2. Let pte be the value of the PTE at address a+va.vpn[i]×PTESIZE. (For // Sv32, PTESIZE=4.) - // 3. If pte.v = 0, or if pte.r = 0 and pte.w = 1, or if any bits or encodings - // that are reserved for future standard use are set within pte, stop and raise + // 3. If pte.v = 0, or if pte.r = 0 and pte.w = 1, or if any bits or encodings + // that are reserved for future standard use are set within pte, stop and raise // a page-fault exception corresponding to the original access type. // 4. Otherwise, the PTE is valid. If pte.r = 1 or pte.x = 1, go to step 5. // Otherwise, this PTE is a pointer to the next level of the page table. @@ -276,34 +300,36 @@ module cva6_ptw // - pa.ppn[LEVELS-1:i] = pte.ppn[LEVELS-1:i]. always_comb begin : ptw automatic logic [CVA6Cfg.PLEN-1:0] pptr; - // automatic logic [CVA6Cfg.GPLEN-1:0] gpaddr; // default assignments // PTW memory interface - tag_valid_n = 1'b0; - req_port_o.data_req = 1'b0; - req_port_o.data_size = 2'(CVA6Cfg.PtLevels); - req_port_o.data_we = 1'b0; - ptw_error_o = 1'b0; - ptw_error_at_g_st_o = 1'b0; - ptw_err_at_g_int_st_o = 1'b0; - ptw_access_exception_o = 1'b0; - shared_tlb_update_o.valid = 1'b0; - is_instr_ptw_n = is_instr_ptw_q; - ptw_lvl_n = ptw_lvl_q; - ptw_pptr_n = ptw_pptr_q; - state_d = state_q; - ptw_stage_d = ptw_stage_q; - global_mapping_n = global_mapping_q; + tag_valid_n = 1'b0; + kill_req_n = kill_req_q; + req_port_o.data_req = 1'b0; + req_port_o.data_size = 2'(CVA6Cfg.PtLevels); + req_port_o.data_we = 1'b0; + ptw_error_o = 1'b0; + ptw_error_at_g_st_o = 1'b0; + ptw_err_at_g_int_st_o = 1'b0; + ptw_access_exception_o = 1'b0; + shared_tlb_update_valid = 1'b0; + is_napot_64k = 1'b0; + is_instr_ptw_n = is_instr_ptw_q; + ptw_lvl_n = ptw_lvl_q; + ptw_pptr_n = ptw_pptr_q; + state_d = state_q; + gpte_d = '0; + ptw_stage_d = ptw_stage_q; + global_mapping_n = global_mapping_q; // input registers - tlb_update_asid_n = tlb_update_asid_q; - tlb_update_vmid_n = tlb_update_vmid_q; - vaddr_n = vaddr_q; - pptr = ptw_pptr_q; + tlb_update_asid_n = tlb_update_asid_q; + vaddr_n = vaddr_q; + pptr = ptw_pptr_q; if (CVA6Cfg.RVH) begin gpaddr_n = gpaddr_q; gptw_pptr_n = gptw_pptr_q; gpte_d = gpte_q; + tlb_update_vmid_n = tlb_update_vmid_q; end shared_tlb_miss_o = 1'b0; @@ -385,10 +411,17 @@ module cva6_ptw if (req_port_i.data_gnt) begin // send the tag valid signal one cycle later tag_valid_n = 1'b1; - state_d = PTE_LOOKUP; + // if the request has been flushed, kill it one cycle later + state_d = (kill_req_q || flush_i) ? KILL_REQ : PTE_LOOKUP; end end + KILL_REQ: begin + kill_req_n = 1'b0; + // even when killed, the request sends a response + state_d = WAIT_RVALID; + end + PTE_LOOKUP: begin // we wait for the valid signal if (data_rvalid_q) begin @@ -400,16 +433,26 @@ module cva6_ptw // Invalid PTE // ------------- // If pte.v = 0, or if pte.r = 0 and pte.w = 1, or if pte.reserved !=0 in sv39 and sv39x4, stop and raise a page-fault exception. - if (!pte.v || (!pte.r && pte.w) || (|pte.reserved && CVA6Cfg.XLEN == 64)) + if (!pte.v || (!pte.r && pte.w) || (|pte.reserved && CVA6Cfg.IS_XLEN64) || (!CVA6Cfg.SvnapotEn && pte.n) || (CVA6Cfg.SvnapotEn && !(pte.r || pte.x) && pte.n)) state_d = PROPAGATE_ERROR; // ----------- // Valid PTE // ----------- else begin state_d = LATENCY; - // it is a valid PTE - // if pte.r = 1 or pte.x = 1 it is a valid PTE + // if pte.r = 1 or pte.x = 1 it is a valid leaf PTE if (pte.r || pte.x) begin + // A 64KiB NAPOT page is identified by the N-bit being set and PPN[3:0] encoding '1000' + if (CVA6Cfg.SvnapotEn && pte.n) begin + // Svnapot: Check if the leaf PTE represents a 64KiB NAPOT page + is_napot_64k = (pte.ppn[3:0] == 4'b1000) && (ptw_lvl_q[0] == 2); + // Svnapot: Any other encoding with the N-bit set is a reserved format and must cause a page fault + // Additionally, fault if N is set on a megapage or gigapage + if (!is_napot_64k) begin + state_d = PROPAGATE_ERROR; + end + end + if (CVA6Cfg.RVH) begin case (ptw_stage_q) S_STAGE: begin @@ -421,7 +464,7 @@ module cva6_ptw gpaddr_n = gpaddr[ptw_lvl_q[0]]; ptw_pptr_n = { hgatp_ppn_i[CVA6Cfg.PPNW-1:2], - gpaddr[ptw_lvl_q[0]][CVA6Cfg.SV+HYP_EXT*2-1:CVA6Cfg.SV-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)], + gpaddr[ptw_lvl_q[0]][CVA6Cfg.GPLEN-1:CVA6Cfg.SV-(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)], (CVA6Cfg.PtLevels)'(0) }; ptw_lvl_n[0] = '0; @@ -431,7 +474,7 @@ module cva6_ptw state_d = WAIT_GRANT; ptw_stage_d = S_STAGE; ptw_lvl_n[0] = ptw_lvl_q[HYP_EXT]; - pptr = {pte.ppn[CVA6Cfg.GPPNW-1:0], gptw_pptr_q[11:0]}; + pptr = {pte.ppn, gptw_pptr_q[11:0]}; if (ptw_lvl_q[0] == 1) pptr[20:0] = gptw_pptr_q[20:0]; if (ptw_lvl_q[0] == 0) pptr[29:0] = gptw_pptr_q[29:0]; ptw_pptr_n = pptr; @@ -447,11 +490,12 @@ module cva6_ptw // If page is not executable, we can directly raise an error. This // doesn't put a useless entry into the TLB. The same idea applies // to the access flag since we let the access flag be managed by SW. - if (!pte.x || !pte.a) begin + if ((!pte.x && (!CVA6Cfg.RVH || ptw_stage_q != G_INTERMED_STAGE)) || !pte.a + || (CVA6Cfg.RVH && ptw_stage_q == G_INTERMED_STAGE && !pte.r)) begin state_d = PROPAGATE_ERROR; if (CVA6Cfg.RVH) ptw_stage_d = ptw_stage_q; - end else if (CVA6Cfg.RVH && ((ptw_stage_q == G_FINAL_STAGE) || !enable_g_translation_i) || !CVA6Cfg.RVH) - shared_tlb_update_o.valid = 1'b1; + end else if ((CVA6Cfg.RVH && ((ptw_stage_q == G_FINAL_STAGE) || !enable_g_translation_i)) || !CVA6Cfg.RVH) + shared_tlb_update_valid = 1'b1; end else begin // ------------ @@ -462,35 +506,37 @@ module cva6_ptw // If page is not readable (there are no write-only pages) // we can directly raise an error. This doesn't put a useless // entry into the TLB. - if (pte.a && ((pte.r && !hlvx_inst_i) || (pte.x && (mxr_i || hlvx_inst_i || (ptw_stage_q == S_STAGE && vmxr_i && ld_st_v_i && CVA6Cfg.RVH))))) begin - if (CVA6Cfg.RVH && ((ptw_stage_q == G_FINAL_STAGE) || !en_ld_st_g_translation_i) || !CVA6Cfg.RVH) - shared_tlb_update_o.valid = 1'b1; + if ( + (pte.a && ((pte.r && !hlvx_eff) || (pte.x && (mxr_i || hlvx_eff || (ptw_stage_q == S_STAGE && vmxr_i && ld_st_v_i && CVA6Cfg.RVH))))) + // Request is a store: perform some additional checks + // If the request was a store and the page is not write-able, raise an error + // the same applies if the dirty flag is not set + // g-intermediate nodes however never need write-permission + && (!lsu_is_store_i || (pte.w && pte.d) || (ptw_stage_q == G_INTERMED_STAGE && CVA6Cfg.RVH)) + ) begin + if ((CVA6Cfg.RVH && ((ptw_stage_q == G_FINAL_STAGE) || !en_ld_st_g_translation_i)) || !CVA6Cfg.RVH) + shared_tlb_update_valid = 1'b1; end else begin state_d = PROPAGATE_ERROR; if (CVA6Cfg.RVH) ptw_stage_d = ptw_stage_q; end - // Request is a store: perform some additional checks - // If the request was a store and the page is not write-able, raise an error - // the same applies if the dirty flag is not set - if (lsu_is_store_i && (!pte.w || !pte.d)) begin - shared_tlb_update_o.valid = 1'b0; - state_d = PROPAGATE_ERROR; - if (CVA6Cfg.RVH) ptw_stage_d = ptw_stage_q; - end end - //if there is a misaligned page, propagate error + if (CVA6Cfg.SvnapotEn && pte.n && !is_napot_64k) shared_tlb_update_valid = 1'b0; + + // if there is a misaligned page, propagate error if (|misaligned_page) begin state_d = PROPAGATE_ERROR; if (CVA6Cfg.RVH) ptw_stage_d = ptw_stage_q; - shared_tlb_update_o.valid = 1'b0; + shared_tlb_update_valid = 1'b0; end // check if 63:41 are all zeros if (CVA6Cfg.RVH) begin - if (((v_i && is_instr_ptw_q) || (ld_st_v_i && !is_instr_ptw_q)) && ptw_stage_q == S_STAGE && !((|pte.ppn[CVA6Cfg.PPNW-1:CVA6Cfg.GPPNW-1+HYP_EXT]) == 1'b0)) begin + if (((v_i && is_instr_ptw_q) || (ld_st_v_i && !is_instr_ptw_q)) && ptw_stage_q == S_STAGE && !((|pte.ppn[CVA6Cfg.PPNW-1:CVA6Cfg.GPPNW]) == 1'b0)) begin state_d = PROPAGATE_ERROR; ptw_stage_d = G_FINAL_STAGE; + shared_tlb_update_valid = 1'b0; end end // this is a pointer to the next TLB level @@ -513,7 +559,6 @@ module cva6_ptw S_STAGE: begin if (CVA6Cfg.RVH && ((is_instr_ptw_q && enable_g_translation_i) || (!is_instr_ptw_q && en_ld_st_g_translation_i))) begin ptw_stage_d = G_INTERMED_STAGE; - if (CVA6Cfg.RVH) gpte_d = pte; ptw_lvl_n[HYP_EXT] = ptw_lvl_q[0] + 1; pptr = {pte.ppn, vaddr_lvl[0][ptw_lvl_q[0]], (CVA6Cfg.PtLevels)'(0)}; gptw_pptr_n = pptr; @@ -537,29 +582,30 @@ module cva6_ptw pte.ppn, vaddr_lvl[HYP_EXT*2][ptw_lvl_q[0]], (CVA6Cfg.PtLevels)'(0) }; end + default: ; endcase end else ptw_pptr_n = {pte.ppn, vaddr_lvl[0][ptw_lvl_q[0]], (CVA6Cfg.PtLevels)'(0)}; - if (CVA6Cfg.RVH && (pte.a || pte.d || pte.u)) begin + if (pte.a || pte.d || pte.u) begin state_d = PROPAGATE_ERROR; - ptw_stage_d = ptw_stage_q; + if (CVA6Cfg.RVH) ptw_stage_d = ptw_stage_q; end end // check if 63:41 are all zeros if (CVA6Cfg.RVH) begin - if (((v_i && is_instr_ptw_q) || (ld_st_v_i && !is_instr_ptw_q)) && ptw_stage_q == S_STAGE && !((|pte.ppn[CVA6Cfg.PPNW-1:CVA6Cfg.GPPNW-1+HYP_EXT]) == 1'b0)) begin + if (((v_i && is_instr_ptw_q) || (ld_st_v_i && !is_instr_ptw_q)) && ptw_stage_q == S_STAGE && !((|pte.ppn[CVA6Cfg.PPNW-1:CVA6Cfg.GPPNW]) == 1'b0)) begin state_d = PROPAGATE_ERROR; - ptw_stage_d = ptw_stage_q; + ptw_stage_d = G_FINAL_STAGE; end end end end - // Check if this access was actually allowed from a PMP perspective + // check if this access was actually allowed from a PMP perspective if (!allow_access) begin - shared_tlb_update_o.valid = 1'b0; + shared_tlb_update_valid = 1'b0; // we have to return the failed address in bad_addr ptw_pptr_n = ptw_pptr_q; if (CVA6Cfg.RVH) ptw_stage_d = ptw_stage_q; @@ -602,12 +648,21 @@ module cva6_ptw // 1. in the PTE Lookup check whether we still need to wait for an rvalid // 2. waiting for a grant, if so: wait for it // if not, go back to idle - if (((state_q inside {PTE_LOOKUP, WAIT_RVALID}) && !data_rvalid_q) || ((state_q == WAIT_GRANT) && req_port_i.data_gnt)) - state_d = WAIT_RVALID; - else state_d = LATENCY; + if ((state_q inside {PTE_LOOKUP, WAIT_RVALID}) && !data_rvalid_q) state_d = WAIT_RVALID; + else if (state_q != WAIT_GRANT) state_d = LATENCY; + + kill_req_n = (state_q == WAIT_GRANT); end end + // Big Endian Capability Additions + // req_port_i.data_rdata is the data coming into the Page Table Walker from Data Memory. If mbe=1 meaning the processor is in Big Endian data mode, then we need to reverse the byte order to correctly view this data. + // Otherwise, this page table walker would not be able to understand a page table stored in Big Endian byte order. + logic [CVA6Cfg.XLEN-1:0] endian_data; + logic [CVA6Cfg.XLEN-1:0] byteSwapped_data; + assign byteSwapped_data = {<<8{req_port_i.data_rdata}}; + assign endian_data = mbe_i ? byteSwapped_data : req_port_i.data_rdata; + // sequential process always_ff @(posedge clk_i or negedge rst_ni) begin if (~rst_ni) begin @@ -615,18 +670,19 @@ module cva6_ptw is_instr_ptw_q <= 1'b0; ptw_lvl_q <= '0; tag_valid_q <= 1'b0; + kill_req_q <= 1'b0; tlb_update_asid_q <= '0; - tlb_update_vmid_q <= '0; vaddr_q <= '0; ptw_pptr_q <= '0; global_mapping_q <= 1'b0; data_rdata_q <= '0; data_rvalid_q <= 1'b0; if (CVA6Cfg.RVH) begin - gpaddr_q <= '0; - gptw_pptr_q <= '0; - ptw_stage_q <= S_STAGE; - gpte_q <= '0; + gpaddr_q <= '0; + gptw_pptr_q <= '0; + ptw_stage_q <= S_STAGE; + gpte_q <= '0; + tlb_update_vmid_q <= '0; end end else begin state_q <= state_d; @@ -634,10 +690,12 @@ module cva6_ptw is_instr_ptw_q <= is_instr_ptw_n; ptw_lvl_q <= ptw_lvl_n; tag_valid_q <= tag_valid_n; + kill_req_q <= kill_req_n; tlb_update_asid_q <= tlb_update_asid_n; vaddr_q <= vaddr_n; global_mapping_q <= global_mapping_n; - data_rdata_q <= req_port_i.data_rdata; + //data_rdata_q <= req_port_i.data_rdata; + data_rdata_q <= endian_data; data_rvalid_q <= req_port_i.data_rvalid; if (CVA6Cfg.RVH) begin diff --git a/core/cva6_mmu/cva6_shared_tlb.sv b/core/cva6_mmu/cva6_shared_tlb.sv index 729d2194c50..a8065881d57 100644 --- a/core/cva6_mmu/cva6_shared_tlb.sv +++ b/core/cva6_mmu/cva6_shared_tlb.sv @@ -56,6 +56,11 @@ module cva6_shared_tlb #( input logic shared_tlb_miss_i, + input logic [CVA6Cfg.ASID_WIDTH-1:0] asid_to_be_flushed_i, //control inputs for flush + input logic [CVA6Cfg.VLEN-1:0] vaddr_to_be_flushed_i, + input logic [CVA6Cfg.VMID_WIDTH-1:0] vmid_to_be_flushed_i, + input logic [CVA6Cfg.GPLEN-1:0] gpaddr_to_be_flushed_i, + // to TLBs, update logic output tlb_update_cva6_t itlb_update_o, output tlb_update_cva6_t dtlb_update_o, @@ -64,6 +69,8 @@ module cva6_shared_tlb #( output logic itlb_miss_o, output logic dtlb_miss_o, + output logic flush_busy_o, + output logic shared_tlb_access_o, output logic shared_tlb_hit_o, output logic [CVA6Cfg.VLEN-1:0] shared_tlb_vaddr_o, @@ -89,11 +96,41 @@ module cva6_shared_tlb #( logic [CVA6Cfg.PtLevels+HYP_EXT-1:0][(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)-1:0] vpn; logic [CVA6Cfg.PtLevels-2:0][HYP_EXT:0] is_page; logic [HYP_EXT*2:0] v_st_enbl; // v_i,g-stage enabled, s-stage enabled + logic is_napot_64k; // Svnapot: Flag indicating a 64KiB NAPOT page } shared_tag_t; shared_tag_t shared_tag_wr; shared_tag_t [SHARED_TLB_WAYS-1:0] shared_tag_rd; + typedef enum logic [1:0] { + FLUSH_SFENCE, + FLUSH_VVMA, + FLUSH_GVMA + } flush_kind_e; + flush_kind_e flush_kind_q, flush_kind_d; + + typedef enum logic [1:0] { + IDLE, + FLUSH_READ, + FLUSH_APPLY + } flush_state_e; //flushing states + flush_state_e flush_state_q, flush_state_d; + + // flushing + logic [$clog2(CVA6Cfg.SharedTlbDepth)-1:0] flush_idx_q, flush_idx_d; + logic [CVA6Cfg.ASID_WIDTH-1:0] flush_asid_q, flush_asid_d; + logic [CVA6Cfg.VLEN-1:0] flush_vaddr_q, flush_vaddr_d; + logic [CVA6Cfg.VMID_WIDTH-1:0] flush_vmid_q, flush_vmid_d; + logic [CVA6Cfg.GPLEN-1:0] flush_gpaddr_q, flush_gpaddr_d; + + logic [SHARED_TLB_WAYS-1:0] sfence_match_way; + logic [SHARED_TLB_WAYS-1:0] vvma_match_way; + logic [SHARED_TLB_WAYS-1:0] gvma_match_way; + logic [SHARED_TLB_WAYS-1:0] flush_match_way; + + logic flush_vmid_is0; + logic flush_gpaddr_is0; + logic [CVA6Cfg.SharedTlbDepth-1:0][SHARED_TLB_WAYS-1:0] shared_tag_valid_q, shared_tag_valid_d; logic [ SHARED_TLB_WAYS-1:0] shared_tag_valid; @@ -143,6 +180,11 @@ module cva6_shared_tlb #( logic shared_tlb_hit_d; logic [CVA6Cfg.VLEN-1:0] shared_tlb_vaddr_q, shared_tlb_vaddr_d; + logic [ CVA6Cfg.VpnLen-1:0] lu_vpn; + logic [SHARED_TLB_WAYS-1:0] vpn0_napot_match; + logic [SHARED_TLB_WAYS-1:0] napot_tag_match; + pte_cva6_t patched_pte; + logic itlb_req_d, itlb_req_q; logic dtlb_req_d, dtlb_req_q; @@ -164,47 +206,61 @@ module cva6_shared_tlb #( assign shared_tlb_vaddr_o = shared_tlb_vaddr_q; assign itlb_req_o = itlb_req_q; assign v_st_enbl = {{v_i, g_st_enbl_i, s_st_enbl_i}, {ld_st_v_i, g_ld_st_enbl_i, s_ld_st_enbl_i}}; + assign lu_vpn = itlb_req_q ? itlb_vpn_q : dtlb_vpn_q; + + assign flush_vmid_is0 = ~(|flush_vmid_q); + assign flush_gpaddr_is0 = ~(|flush_gpaddr_q); + assign flush_match_way = (flush_kind_q == FLUSH_SFENCE)? sfence_match_way: (flush_kind_q == FLUSH_VVMA)? vvma_match_way: gvma_match_way; + + assign shared_tag_wr.asid = shared_tlb_update_i.asid; + assign shared_tag_wr.vmid = shared_tlb_update_i.vmid; + assign shared_tag_wr.is_page = shared_tlb_update_i.is_page; + assign shared_tag_wr.v_st_enbl = v_st_enbl[i_req_q][HYP_EXT*2:0]; - genvar i, x; + genvar i_gen, x_gen; generate - for (i = 0; i < SHARED_TLB_WAYS; i++) begin : gen_match_tlb_ways + for (i_gen = 0; i_gen < SHARED_TLB_WAYS; i_gen++) begin : gen_match_tlb_ways //identify page_match for all TLB Entries - for (x = 0; x < CVA6Cfg.PtLevels; x++) begin : gen_match - assign page_match[i][x] = x==0 ? 1 :((HYP_EXT==0 || x==(CVA6Cfg.PtLevels-1)) ? // PAGE_MATCH CONTAINS THE MATCH INFORMATION FOR EACH TAG OF is_1G and is_2M in sv39x4. HIGHER LEVEL (Giga page), THEN THERE IS THE Mega page AND AT THE LOWER LEVEL IS ALWAYS 1 - &(shared_tag_rd[i].is_page[CVA6Cfg.PtLevels-1-x] | (~v_st_enbl[i_req_q][HYP_EXT:0])): + for (x_gen = 0; x_gen < CVA6Cfg.PtLevels; x_gen++) begin : gen_match + assign page_match[i_gen][x_gen] = x_gen==0 ? 1 :((HYP_EXT==0 || x_gen==(CVA6Cfg.PtLevels-1)) ? // PAGE_MATCH CONTAINS THE MATCH INFORMATION FOR EACH TAG OF is_1G and is_2M in sv39x4. HIGHER LEVEL (Giga page), THEN THERE IS THE Mega page AND AT THE LOWER LEVEL IS ALWAYS 1 + &(shared_tag_rd[i_gen].is_page[CVA6Cfg.PtLevels-1-x_gen] | (~v_st_enbl[i_req_q][HYP_EXT:0])): ((&v_st_enbl[i_req_q][HYP_EXT:0]) ? - ((shared_tag_rd[i].is_page[CVA6Cfg.PtLevels-1-x][0] && (shared_tag_rd[i].is_page[CVA6Cfg.PtLevels-2-x][HYP_EXT] || shared_tag_rd[i].is_page[CVA6Cfg.PtLevels-1-x][HYP_EXT])) - || (shared_tag_rd[i].is_page[CVA6Cfg.PtLevels-1-x][HYP_EXT] && (shared_tag_rd[i].is_page[CVA6Cfg.PtLevels-2-x][0] || shared_tag_rd[i].is_page[CVA6Cfg.PtLevels-1-x][0]))): - shared_tag_rd[i].is_page[CVA6Cfg.PtLevels-1-x][0] && v_st_enbl[i_req_q][0] || shared_tag_rd[i].is_page[CVA6Cfg.PtLevels-1-x][HYP_EXT] && v_st_enbl[i_req_q][HYP_EXT])); + ((shared_tag_rd[i_gen].is_page[CVA6Cfg.PtLevels-1-x_gen][0] && (shared_tag_rd[i_gen].is_page[CVA6Cfg.PtLevels-2-x_gen][HYP_EXT] || shared_tag_rd[i_gen].is_page[CVA6Cfg.PtLevels-1-x_gen][HYP_EXT])) + || (shared_tag_rd[i_gen].is_page[CVA6Cfg.PtLevels-1-x_gen][HYP_EXT] && (shared_tag_rd[i_gen].is_page[CVA6Cfg.PtLevels-2-x_gen][0] || shared_tag_rd[i_gen].is_page[CVA6Cfg.PtLevels-1-x_gen][0]))): + shared_tag_rd[i_gen].is_page[CVA6Cfg.PtLevels-1-x_gen][0] && v_st_enbl[i_req_q][0] || shared_tag_rd[i_gen].is_page[CVA6Cfg.PtLevels-1-x_gen][HYP_EXT] && v_st_enbl[i_req_q][HYP_EXT])); //identify if vpn matches at all PT levels for all TLB entries - assign vpn_match[i][x] = (HYP_EXT==1 && x==(CVA6Cfg.PtLevels-1) && ~v_st_enbl[i_req_q][0]) ? // - vpn_q[x] == shared_tag_rd[i].vpn[x] && vpn_q[x+HYP_EXT][(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels)-HYP_EXT:0] == shared_tag_rd[i].vpn[x+HYP_EXT][(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels)-HYP_EXT:0]: // - vpn_q[x] == shared_tag_rd[i].vpn[x]; + assign vpn_match[i_gen][x_gen] = (HYP_EXT==1 && x_gen==(CVA6Cfg.PtLevels-1) && ~v_st_enbl[i_req_q][0]) ? // + vpn_q[x_gen] == shared_tag_rd[i_gen].vpn[x_gen] && vpn_q[x_gen+HYP_EXT][(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels)-HYP_EXT:0] == shared_tag_rd[i_gen].vpn[x_gen+HYP_EXT][(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels)-HYP_EXT:0]: // + vpn_q[x_gen] == shared_tag_rd[i_gen].vpn[x_gen]; //identify if there is a hit at each PT level for all TLB entries - assign level_match[i][x] = &vpn_match[i][CVA6Cfg.PtLevels-1:x] && page_match[i][x]; + assign level_match[i_gen][x_gen] = &vpn_match[i_gen][CVA6Cfg.PtLevels-1:x_gen] && page_match[i_gen][x_gen]; end + assign vpn0_napot_match[i_gen] = lu_vpn[(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)-1 : 4] == shared_tag_rd[i_gen].vpn[0][(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)-1 : 4]; + assign napot_tag_match[i_gen] = (CVA6Cfg.SvnapotEn && shared_tag_rd[i_gen].is_napot_64k) ? + (vpn_match[i_gen][2] && vpn_match[i_gen][1] && vpn0_napot_match[i_gen]) : 1'b0; end endgenerate - genvar w; + genvar w_gen; generate - for (w = 0; w < CVA6Cfg.PtLevels; w++) begin - assign vpn_d[w] = ((|v_st_enbl[1][HYP_EXT:0]) && itlb_access_i && ~itlb_hit_i && ~dtlb_access_i) ? // - itlb_vaddr_i[12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(w+1))-1:12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*w)] : // + for (w_gen = 0; w_gen < CVA6Cfg.PtLevels; w_gen++) begin + assign vpn_d[w_gen] = ((|v_st_enbl[1][HYP_EXT:0]) && itlb_access_i && ~itlb_hit_i && ~dtlb_access_i) ? // + itlb_vaddr_i[12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(w_gen+1))-1:12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*w_gen)] : // (((|v_st_enbl[0][HYP_EXT:0]) && dtlb_access_i && ~dtlb_hit_i) ? // - dtlb_vaddr_i[12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(w+1))-1:12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*w)] : vpn_q[w]); + dtlb_vaddr_i[12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(w_gen+1))-1:12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*w_gen)] : vpn_q[w_gen]); end endgenerate if (CVA6Cfg.RVH) //THIS UPDATES THE EXTRA BITS OF VPN IN SV39x4 - assign vpn_d[CVA6Cfg.PtLevels][(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels)-1:0] = ((|v_st_enbl[1][HYP_EXT:0]) && itlb_access_i && ~itlb_hit_i && ~dtlb_access_i) ? // - itlb_vaddr_i[CVA6Cfg.VpnLen-1:CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels)] : // + assign vpn_d[CVA6Cfg.PtLevels] = ((|v_st_enbl[1][HYP_EXT:0]) && itlb_access_i && ~itlb_hit_i && ~dtlb_access_i) ? // + {{(((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)-(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels))){1'b0}}, itlb_vaddr_i[CVA6Cfg.VpnLen-1:CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels)]} : // (((|v_st_enbl[0][HYP_EXT:0]) && dtlb_access_i && ~dtlb_hit_i) ? // - dtlb_vaddr_i[CVA6Cfg.VpnLen-1: CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels)] : vpn_q[CVA6Cfg.PtLevels][(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels)-1:0]); + {{(((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)-(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels))){1'b0}}, dtlb_vaddr_i[CVA6Cfg.VpnLen-1: CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels)]} : // + {{(((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)-(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels))){1'b0}}, vpn_q[CVA6Cfg.PtLevels][(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels)-1:0]}); /////////////////////////////////////////////////////// // tag comparison, hit generation @@ -229,8 +285,16 @@ module cva6_shared_tlb #( pte_rd_addr = '0; i_req_d = i_req_q; - // if we got an ITLB miss - if ((|v_st_enbl[1][HYP_EXT:0]) & itlb_access_i & ~itlb_hit_i & ~dtlb_access_i) begin + //owning read ports while flush walker is active + if (flush_state_q == FLUSH_READ) begin + tag_rd_en = '1; + pte_rd_en = '1; + tag_rd_addr = flush_idx_q; + pte_rd_addr = flush_idx_q; + end else if ((flush_state_q != IDLE) || flush_i || flush_vvma_i || flush_gvma_i) begin + //minimal approach holding lookup quiet during flush + // if we got an ITLB miss + end else if ((|v_st_enbl[1][HYP_EXT:0]) & itlb_access_i & ~itlb_hit_i & ~dtlb_access_i) begin tag_rd_en = '1; tag_rd_addr = itlb_vaddr_i[12+:$clog2(CVA6Cfg.SharedTlbDepth)]; pte_rd_en = '1; @@ -283,6 +347,7 @@ module cva6_shared_tlb #( itlb_update_o.v_st_enbl = v_st_enbl[i_req_q][HYP_EXT*2:0]; itlb_update_o.asid = shared_tlb_update_i.asid; itlb_update_o.vmid = shared_tlb_update_i.vmid; + itlb_update_o.is_napot_64k = shared_tlb_update_i.is_napot_64k; end else if (dtlb_req_q) begin dtlb_update_o.valid = 1'b1; @@ -293,6 +358,7 @@ module cva6_shared_tlb #( dtlb_update_o.v_st_enbl = v_st_enbl[i_req_q][HYP_EXT*2:0]; dtlb_update_o.asid = shared_tlb_update_i.asid; dtlb_update_o.vmid = shared_tlb_update_i.vmid; + dtlb_update_o.is_napot_64k = shared_tlb_update_i.is_napot_64k; end end end else begin @@ -310,27 +376,35 @@ module cva6_shared_tlb #( // check if translation is a: S-Stage and G-Stage, S-Stage only or G-Stage only translation and virtualization mode is on/off match_stage[i] = shared_tag_rd[i].v_st_enbl == v_st_enbl[i_req_q][HYP_EXT*2:0]; - if (shared_tag_valid[i] && match_asid && match_vmid && match_stage[i]) begin - if (|level_match[i]) begin + if (shared_tag_valid[i] && match_asid[i] && match_vmid[i] && match_stage[i]) begin + if (|level_match[i] || napot_tag_match[i]) begin shared_tlb_hit_d = 1'b1; + // Prepare PTE with NAPOT patching if needed + patched_pte = pte[i][0]; // take the S‑stage PTE only + if (shared_tag_rd[i].is_napot_64k && CVA6Cfg.SvnapotEn) begin + // replace PPN[3:0] with vaddr[15:12] (equiv. lu_vpn[3:0]) + patched_pte.ppn[3:0] = lu_vpn[3:0]; + end if (itlb_req_q) begin itlb_update_o.valid = 1'b1; itlb_update_o.vpn = itlb_vpn_q; itlb_update_o.is_page = shared_tag_rd[i].is_page; - itlb_update_o.content = pte[i][0]; + itlb_update_o.content = patched_pte; itlb_update_o.g_content = pte[i][HYP_EXT]; itlb_update_o.v_st_enbl = shared_tag_rd[i].v_st_enbl; itlb_update_o.asid = tlb_update_asid_q; itlb_update_o.vmid = tlb_update_vmid_q; + itlb_update_o.is_napot_64k = CVA6Cfg.SvnapotEn ? shared_tag_rd[i].is_napot_64k : 1'b0; end else if (dtlb_req_q) begin dtlb_update_o.valid = 1'b1; dtlb_update_o.vpn = dtlb_vpn_q; dtlb_update_o.is_page = shared_tag_rd[i].is_page; - dtlb_update_o.content = pte[i][0]; + dtlb_update_o.content = patched_pte; dtlb_update_o.g_content = pte[i][HYP_EXT]; dtlb_update_o.v_st_enbl = shared_tag_rd[i].v_st_enbl; dtlb_update_o.asid = tlb_update_asid_q; dtlb_update_o.vmid = tlb_update_vmid_q; + dtlb_update_o.is_napot_64k = CVA6Cfg.SvnapotEn ? shared_tag_rd[i].is_napot_64k : 1'b0; end end end @@ -344,7 +418,6 @@ module cva6_shared_tlb #( itlb_vpn_q <= '0; dtlb_vpn_q <= '0; tlb_update_asid_q <= '{default: 0}; - tlb_update_vmid_q <= '{default: 0}; shared_tlb_access_q <= '0; shared_tlb_vaddr_q <= '0; shared_tag_valid_q <= '0; @@ -353,6 +426,14 @@ module cva6_shared_tlb #( dtlb_req_q <= '0; i_req_q <= 0; shared_tag_valid <= '0; + flush_state_q <= IDLE; + flush_idx_q <= '0; + flush_asid_q <= '0; + flush_vaddr_q <= '0; + flush_kind_q <= FLUSH_SFENCE; + flush_vmid_q <= '0; + flush_gpaddr_q <= '0; + end else begin itlb_vpn_q <= itlb_vaddr_i[CVA6Cfg.SV-1:12]; dtlb_vpn_q <= dtlb_vaddr_i[CVA6Cfg.SV-1:12]; @@ -365,53 +446,311 @@ module cva6_shared_tlb #( dtlb_req_q <= dtlb_req_d; i_req_q <= i_req_d; shared_tag_valid <= shared_tag_valid_q[tag_rd_addr]; + flush_state_q <= flush_state_d; + flush_idx_q <= flush_idx_d; + flush_asid_q <= flush_asid_d; + flush_vaddr_q <= flush_vaddr_d; + flush_kind_q <= flush_kind_d; + flush_vmid_q <= flush_vmid_d; + flush_gpaddr_q <= flush_gpaddr_d; - if (CVA6Cfg.RVH) tlb_update_vmid_q <= tlb_update_vmid_d; + end + end + + if (CVA6Cfg.RVH) begin + always_ff @(posedge clk_i or negedge rst_ni) begin + if (~rst_ni) begin + tlb_update_vmid_q <= '{default: 0}; + end else begin + tlb_update_vmid_q <= tlb_update_vmid_d; + end end end // ------------------ // Update and Flush // ------------------ + + logic [CVA6Cfg.VpnLen-1:0] vpn_to_store; + logic [$clog2(CVA6Cfg.SharedTlbDepth)-1:0] vpn_index; + //flushing signals + logic flush_asid_is0; + logic flush_vaddr_is0; + logic flush_last_set; + + // When storing the VPN in the shared TLB, if NAPOT is used, the lower bits of the VPN are zeroed + // This way, when searching for a match, we can compare the full VPN if NAPOT is not used + // or only the upper bits if NAPOT is used (the lower bits are don't care) + // The actual PPN is stored in the PTE, with the lower bits patched if NAPOT is used + // This is done in the tag comparison logic above + + assign vpn_to_store = + (shared_tlb_update_i.is_napot_64k && CVA6Cfg.SvnapotEn) + ? {shared_tlb_update_i.vpn[CVA6Cfg.VpnLen-1:4], 4'b0} + : shared_tlb_update_i.vpn; + + always_comb begin : flush_fsm + flush_state_d = flush_state_q; + flush_idx_d = flush_idx_q; + flush_asid_d = flush_asid_q; + flush_vaddr_d = flush_vaddr_q; + flush_kind_d = flush_kind_q; + flush_vmid_d = flush_vmid_q; + flush_gpaddr_d = flush_gpaddr_q; + + unique case (flush_state_q) + IDLE: begin + if (flush_i) begin + flush_state_d = FLUSH_READ; + flush_idx_d = '0; + flush_asid_d = asid_to_be_flushed_i; + flush_vaddr_d = vaddr_to_be_flushed_i; + flush_kind_d = FLUSH_SFENCE; + flush_vmid_d = '0; + flush_gpaddr_d = '0; + end else if (flush_vvma_i) begin + flush_state_d = FLUSH_READ; + flush_idx_d = '0; + flush_asid_d = asid_to_be_flushed_i; + flush_vaddr_d = vaddr_to_be_flushed_i; + flush_kind_d = FLUSH_VVMA; + flush_vmid_d = lu_vmid_i; + flush_gpaddr_d = '0; + end else if (flush_gvma_i) begin + flush_state_d = FLUSH_READ; + flush_idx_d = '0; + flush_asid_d = '0; + flush_vaddr_d = '0; + flush_kind_d = FLUSH_GVMA; + flush_vmid_d = vmid_to_be_flushed_i; + flush_gpaddr_d = gpaddr_to_be_flushed_i; + end + end + + FLUSH_READ: begin + flush_state_d = FLUSH_APPLY; + end + + FLUSH_APPLY: begin + if (flush_last_set) begin + flush_state_d = IDLE; + flush_idx_d = '0; + end else begin + flush_idx_d = flush_idx_q + 1'b1; + flush_state_d = FLUSH_READ; + end + end + + default: begin + flush_state_d = IDLE; + end + endcase + end + + localparam int unsigned VPN_SEG_W = CVA6Cfg.VpnLen / CVA6Cfg.PtLevels; + always_comb begin : sfence_match_logic + sfence_match_way = '0; + + for (int unsigned i = 0; i < SHARED_TLB_WAYS; i++) begin + logic [CVA6Cfg.PtLevels-1:0] flush_vpn_match; + logic [CVA6Cfg.PtLevels-1:0] flush_level_match; + logic flush_addr_matches; + logic flush_addr_napot_matches; + logic upper_levels_match; + + flush_vpn_match = '0; + flush_level_match = '0; + flush_addr_matches = 1'b0; + flush_addr_napot_matches = 1'b0; + upper_levels_match = 1'b0; + + for (int unsigned level = 0; level < CVA6Cfg.PtLevels; level++) begin + flush_vpn_match[level] = flush_vaddr_q[12 + VPN_SEG_W*level +: VPN_SEG_W] == shared_tag_rd[i].vpn[level]; + end + //comparing the flush VA with stored VPN level by level_match + for (int unsigned level = 0; level < CVA6Cfg.PtLevels; level++) begin + upper_levels_match = 1'b1; + for (int unsigned k = level; k < CVA6Cfg.PtLevels; k++) begin + upper_levels_match &= flush_vpn_match[k]; + end + flush_level_match[level] = upper_levels_match && ((level==0)? 1'b1: shared_tag_rd[i].is_page[CVA6Cfg.PtLevels-1-level][0]); + end + + if (CVA6Cfg.SvnapotEn && shared_tag_rd[i].is_napot_64k) begin + //VA matching NAPOT tag + flush_addr_napot_matches = ((CVA6Cfg.PtLevels > 1)? (&flush_vpn_match[CVA6Cfg.PtLevels-1:1]): 1'b1) && (flush_vaddr_q[12+VPN_SEG_W-1: 16] == shared_tag_rd[i].vpn[0][VPN_SEG_W-1: 4]); + end + + flush_addr_matches = (|flush_level_match) || flush_addr_napot_matches; + + if (shared_tag_valid[i] && ((HYP_EXT == 0) || !shared_tag_rd[i].v_st_enbl[HYP_EXT*2])) begin + if (flush_asid_is0 && flush_vaddr_is0) begin //SFENCE.VMA x0, x0 + sfence_match_way[i] = 1'b1; + end else if(flush_asid_is0 && flush_addr_matches && !flush_vaddr_is0) begin //SFENCE.VMA vaddr, x0 + sfence_match_way[i] = 1'b1; + end else if(!pte[i][0].g && flush_addr_matches && (flush_asid_q == shared_tag_rd[i].asid) && !flush_vaddr_is0 && !flush_asid_is0) begin //SFENCE.VMA vaddr, asid + sfence_match_way[i] = 1'b1; + end else if(!pte[i][0].g && flush_vaddr_is0 &&(flush_asid_q == shared_tag_rd[i].asid) && !flush_asid_is0)begin + sfence_match_way[i] = 1'b1; + end + end + end + end + + always_comb begin : vvma_match_logic + vvma_match_way = '0; + + for (int unsigned i = 0; i < SHARED_TLB_WAYS; i++) begin + logic [CVA6Cfg.PtLevels-1:0] flush_vpn_match; + logic [CVA6Cfg.PtLevels-1:0] flush_level_match; + logic flush_addr_matches; + logic flush_addr_napot_matches; + logic upper_levels_match; + logic current_vmid_matches; + + flush_vpn_match = '0; + flush_level_match = '0; + flush_addr_matches = 1'b0; + flush_addr_napot_matches = 1'b0; + upper_levels_match = 1'b0; + + for (int unsigned level = 0; level < CVA6Cfg.PtLevels; level++) begin + flush_vpn_match[level] = flush_vaddr_q[12 + VPN_SEG_W*level +: VPN_SEG_W] == shared_tag_rd[i].vpn[level]; + end + for (int unsigned level = 0; level < CVA6Cfg.PtLevels; level++) begin + upper_levels_match = 1'b1; + for (int unsigned k = level; k < CVA6Cfg.PtLevels; k++) begin + upper_levels_match &= flush_vpn_match[k]; + end + flush_level_match[level] = upper_levels_match && ((level==0) ? 1'b1: shared_tag_rd[i].is_page[CVA6Cfg.PtLevels-1-level][0]); + end + + if (CVA6Cfg.SvnapotEn && shared_tag_rd[i].is_napot_64k) begin + flush_addr_napot_matches = ((CVA6Cfg.PtLevels > 1) ? (&flush_vpn_match[CVA6Cfg.PtLevels-1:1]) : 1'b1) && (flush_vaddr_q[12+VPN_SEG_W-1:16]==shared_tag_rd[i].vpn[0][VPN_SEG_W-1:4]); + end + + flush_addr_matches = (|flush_level_match) || flush_addr_napot_matches; + + current_vmid_matches = ((shared_tag_rd[i].v_st_enbl[HYP_EXT] && (flush_vmid_q == shared_tag_rd[i].vmid)) ||!shared_tag_rd[i].v_st_enbl[HYP_EXT]); + + if(CVA6Cfg.RVH && shared_tag_valid[i] && shared_tag_rd[i].v_st_enbl[HYP_EXT*2] && shared_tag_rd[i].v_st_enbl[0]) begin + if (flush_asid_is0 && flush_vaddr_is0 && current_vmid_matches) begin + vvma_match_way[i] = 1'b1; + end else if (flush_asid_is0 && flush_addr_matches && !flush_vaddr_is0 && current_vmid_matches) begin + vvma_match_way[i] = 1'b1; + end else if(!pte[i][0].g && flush_addr_matches && (flush_asid_q == shared_tag_rd[i].asid) && !flush_vaddr_is0 && !flush_asid_is0 && current_vmid_matches) begin + vvma_match_way[i] = 1'b1; + end else if(!pte[i][0].g && flush_vaddr_is0 && (flush_asid_q == shared_tag_rd[i].asid) && !flush_asid_is0 && current_vmid_matches) begin + vvma_match_way[i] = 1'b1; + end + end + end + end + + always_comb begin : gvma_match_logic + gvma_match_way = '0; + + for (int unsigned i = 0; i < SHARED_TLB_WAYS; i++) begin + logic [CVA6Cfg.VpnLen-1:0] gppn_i; + logic [CVA6Cfg.PtLevels-1:0] gpaddr_vpn_match; + logic [CVA6Cfg.PtLevels-1:0] gpaddr_level_match; + logic upper_levels_match; + + gppn_i = '0; + gpaddr_vpn_match = '0; + gpaddr_level_match = '0; + upper_levels_match = '0; + + if (CVA6Cfg.RVH) begin + if (shared_tag_rd[i].v_st_enbl[0]) begin + gppn_i[CVA6Cfg.GPPNW-1:0] = pte[i][0].ppn[CVA6Cfg.GPPNW-1:0]; + + if (shared_tag_rd[i].is_page[1][0]) gppn_i[VPN_SEG_W-1:0] = shared_tag_rd[i].vpn[0]; + if (shared_tag_rd[i].is_page[0][0]) + gppn_i[2*VPN_SEG_W-1:0] = {shared_tag_rd[i].vpn[1], shared_tag_rd[i].vpn[0]}; + end else begin + gppn_i[CVA6Cfg.VpnLen-1:0] = CVA6Cfg.VpnLen'({shared_tag_rd[i].vpn}); + end + + for (int unsigned level = 0; level < CVA6Cfg.PtLevels; level++) begin + gpaddr_vpn_match[level] = flush_gpaddr_q[12 + VPN_SEG_W*level +: VPN_SEG_W] == gppn_i[VPN_SEG_W*level +: VPN_SEG_W]; + end + + for (int unsigned level = 0; level < CVA6Cfg.PtLevels; level++) begin + upper_levels_match = 1'b1; + for (int unsigned k = level; k < CVA6Cfg.PtLevels; k++) begin + upper_levels_match &= gpaddr_vpn_match[k]; + end + gpaddr_level_match[level] = upper_levels_match && ((level == 0) ? 1'b1 : shared_tag_rd[i].is_page[CVA6Cfg.PtLevels-1-level][HYP_EXT]); + end + if (shared_tag_valid[i] && shared_tag_rd[i].v_st_enbl[HYP_EXT]) begin + if (flush_vmid_is0 && flush_gpaddr_is0) begin + gvma_match_way[i] = 1'b1; + end else if (flush_vmid_is0 && (|gpaddr_level_match) && !flush_gpaddr_is0) begin + gvma_match_way[i] = 1'b1; + end else if ((|gpaddr_level_match) && (flush_vmid_q == shared_tag_rd[i].vmid) && !flush_gpaddr_is0 && !flush_vmid_is0) begin + gvma_match_way[i] = 1'b1; + end else if (flush_gpaddr_is0 && (flush_vmid_q == shared_tag_rd[i].vmid) && !flush_vmid_is0) begin + gvma_match_way[i] = 1'b1; + end + end + end + end + end + always_comb begin : update_flush shared_tag_valid_d = shared_tag_valid_q; tag_wr_en = '0; pte_wr_en = '0; - if (flush_i || flush_vvma_i || flush_gvma_i) begin - shared_tag_valid_d = '0; - end else if (shared_tlb_update_i.valid) begin + if (flush_state_q == FLUSH_APPLY) begin + for (int unsigned i = 0; i < SHARED_TLB_WAYS; i++) begin + if (flush_match_way[i]) begin + shared_tag_valid_d[flush_idx_q][i] = 1'b0; + end + end + end + + if ((flush_state_q == IDLE) && !flush_i && !flush_vvma_i && !flush_gvma_i && shared_tlb_update_i.valid) begin for (int unsigned i = 0; i < SHARED_TLB_WAYS; i++) begin if (repl_way_oh_d[i]) begin - shared_tag_valid_d[shared_tlb_update_i.vpn[$clog2(CVA6Cfg.SharedTlbDepth)-1:0]][i] = 1'b1; + shared_tag_valid_d[vpn_index][i] = 1'b1; tag_wr_en[i] = 1'b1; pte_wr_en[i] = 1'b1; end end end - end //update_flush + end + //update_flush - assign shared_tag_wr.asid = shared_tlb_update_i.asid; - assign shared_tag_wr.vmid = shared_tlb_update_i.vmid; - assign shared_tag_wr.is_page = shared_tlb_update_i.is_page; - assign shared_tag_wr.v_st_enbl = v_st_enbl[i_req_q][HYP_EXT*2:0]; + assign flush_asid_is0 = ~(|flush_asid_q); + assign flush_vaddr_is0 = ~(|flush_vaddr_q); + assign flush_last_set = (flush_idx_q == CVA6Cfg.SharedTlbDepth - 1); + assign flush_busy_o = (CVA6Cfg.UseSharedTlb) && (flush_state_q != IDLE); - genvar z; + assign shared_tag_wr.is_napot_64k = shared_tlb_update_i.is_napot_64k; // Svnapot: Propagate the NAPOT flag from the update packet into the tag structure to be stored + genvar z_gen; generate - for (z = 0; z < CVA6Cfg.PtLevels; z++) begin : gen_shared_tag - assign shared_tag_wr.vpn[z] = shared_tlb_update_i.vpn[((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(z+1))-1:((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*z)]; + for (z_gen = 0; z_gen < CVA6Cfg.PtLevels; z_gen++) begin : gen_shared_tag + assign shared_tag_wr.vpn[z_gen] = vpn_to_store[((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(z_gen+1))-1:((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*z_gen)]; end if (CVA6Cfg.RVH) begin : gen_shared_tag_hyp //THIS UPDATES THE EXTRA BITS OF VPN IN SV39x4 - assign shared_tag_wr.vpn[CVA6Cfg.PtLevels][(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels)-1:0] = shared_tlb_update_i.vpn[CVA6Cfg.VpnLen-1: CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels)]; + assign shared_tag_wr.vpn[CVA6Cfg.PtLevels] = { + {(((CVA6Cfg.VpnLen / CVA6Cfg.PtLevels) - (CVA6Cfg.VpnLen % CVA6Cfg.PtLevels))) {1'b0}}, + shared_tlb_update_i.vpn[CVA6Cfg.VpnLen-1:CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels)] + }; end endgenerate - assign tag_wr_addr = shared_tlb_update_i.vpn[$clog2(CVA6Cfg.SharedTlbDepth)-1:0]; assign tag_wr_data = shared_tag_wr; - assign pte_wr_addr = shared_tlb_update_i.vpn[$clog2(CVA6Cfg.SharedTlbDepth)-1:0]; + // derive the set index from bits [4 +: clog2] of the (possibly masked) VPN + assign vpn_index = shared_tlb_update_i.vpn[$clog2(CVA6Cfg.SharedTlbDepth)-1:0]; + // write the new entry into that set + assign tag_wr_addr = vpn_index; + assign pte_wr_addr = vpn_index; assign pte_wr_data[0] = shared_tlb_update_i.content[CVA6Cfg.XLEN-1:0]; assign pte_wr_data[1] = shared_tlb_update_i.g_content[CVA6Cfg.XLEN-1:0]; @@ -495,6 +834,8 @@ module cva6_shared_tlb #( ); assign pte[i][a] = pte_cva6_t'(pte_rd_data[i][a]); end + end else begin + assign shared_tag_rd[i] = '0; end end endmodule diff --git a/core/cva6_mmu/cva6_tlb.sv b/core/cva6_mmu/cva6_tlb.sv index 68083f3e22d..7151e0a7510 100644 --- a/core/cva6_mmu/cva6_tlb.sv +++ b/core/cva6_mmu/cva6_tlb.sv @@ -15,9 +15,9 @@ // Author: Angela Gonzalez PlanV Technology // Date: 26/02/2024 // -// Description: Translation Lookaside Buffer, parameterizable to Sv32 or Sv39 , +// Description: Translation Lookaside Buffer, parameterizable to Sv32 or Sv39, // or sv39x4 fully set-associative -// This module is an merge of the Sv32 TLB developed by Sebastien +// This module is a merge of the Sv32 TLB developed by Sebastien // Jacq (Thales Research & Technology), the Sv39 TLB developed // by Florian Zaruba and David Schaffenrath and the Sv39x4 by Bruno Sá. @@ -33,10 +33,10 @@ module cva6_tlb input logic clk_i, // Clock input logic rst_ni, // Asynchronous reset active low input logic flush_i, // Flush normal translations signal - input logic flush_vvma_i, // Flush vs stage signal - input logic flush_gvma_i, // Flush g stage signal - input logic s_st_enbl_i, // s-stage enabled - input logic g_st_enbl_i, // g-stage enabled + input logic flush_vvma_i, // Flush VS stage signal + input logic flush_gvma_i, // Flush G stage signal + input logic s_st_enbl_i, // S-stage enabled + input logic g_st_enbl_i, // G-stage enabled input logic v_i, // virtualization mode // Update TLB input tlb_update_cva6_t update_i, @@ -55,21 +55,26 @@ module cva6_tlb output logic [CVA6Cfg.PtLevels-2:0] lu_is_page_o, output logic lu_hit_o ); - localparam GPPN2 = (CVA6Cfg.XLEN == 32) ? CVA6Cfg.VLEN - 33 : 10; // SV39 defines three levels of page tables struct packed { logic [CVA6Cfg.ASID_WIDTH-1:0] asid; logic [CVA6Cfg.VMID_WIDTH-1:0] vmid; + // VPN is: + // [0] -> VPN0 + // [1] -> VPN1 + // [2] -> VPN2 + // [3] -> 2-bit supplementary PPN2 in case of GPA logic [CVA6Cfg.PtLevels+HYP_EXT-1:0][(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)-1:0] vpn; logic [CVA6Cfg.PtLevels-2:0][HYP_EXT:0] is_page; - logic [HYP_EXT*2:0] v_st_enbl; // v_i,g-stage enabled, s-stage enabled + logic [HYP_EXT*2:0] v_st_enbl; // v_i, g-stage enabled, s-stage enabled logic valid; + logic is_napot_64k; // Svnapot: Flag indicating a 64KiB NAPOT page } [TLB_ENTRIES-1:0] tags_q, tags_n; struct packed { - pte_cva6_t pte; - pte_cva6_t gpte; + pte_cva6_t pte; // S or VS-stage Page Table Entry structure + pte_cva6_t gpte; // G-stage Page Table Entry structure } [TLB_ENTRIES-1:0] content_q, content_n; @@ -87,56 +92,91 @@ module cva6_tlb logic [TLB_ENTRIES-1:0] match_stage; pte_cva6_t g_content; logic [TLB_ENTRIES-1:0][(CVA6Cfg.GPPNW-1):0] gppn; - logic [2:0] v_st_enbl; + logic [HYP_EXT*2:0] v_st_enbl; + logic [TLB_ENTRIES-1:0] napot_tag_match; + pte_cva6_t patched_pte; + logic [TLB_ENTRIES-1:0] vpn0_napot_match; assign v_st_enbl = (CVA6Cfg.RVH) ? {v_i, g_st_enbl_i, s_st_enbl_i} : '1; //------------- // Translation //------------- - genvar i, x, z, w; + genvar i_gen, x_gen, z_gen, w_gen; generate - for (i = 0; i < TLB_ENTRIES; i++) begin - for (x = 0; x < CVA6Cfg.PtLevels; x++) begin - //identify page_match for all TLB Entries - assign page_match[i][x] = x==0 ? 1 :((HYP_EXT==0 || x==(CVA6Cfg.PtLevels-1)) ? // PAGE_MATCH CONTAINS THE MATCH INFORMATION FOR EACH TAG OF is_1G and is_2M in sv39x4. HIGHER LEVEL (Giga page), THEN THERE IS THE Mega page AND AT THE LOWER LEVEL IS ALWAYS 1 - &(tags_q[i].is_page[CVA6Cfg.PtLevels-1-x] | (~v_st_enbl[HYP_EXT:0])): - ((&v_st_enbl[HYP_EXT:0]) ? - ((tags_q[i].is_page[CVA6Cfg.PtLevels-1-x][0] && (tags_q[i].is_page[CVA6Cfg.PtLevels-2-x][HYP_EXT] || tags_q[i].is_page[CVA6Cfg.PtLevels-1-x][HYP_EXT])) - || (tags_q[i].is_page[CVA6Cfg.PtLevels-1-x][HYP_EXT] && (tags_q[i].is_page[CVA6Cfg.PtLevels-2-x][0] || tags_q[i].is_page[CVA6Cfg.PtLevels-1-x][0]))): - tags_q[i].is_page[CVA6Cfg.PtLevels-1-x][0] && s_st_enbl_i || tags_q[i].is_page[CVA6Cfg.PtLevels-1-x][HYP_EXT] && g_st_enbl_i)); - - //identify if vpn matches at all PT levels for all TLB entries - assign vpn_match[i][x] = (CVA6Cfg.RVH && x == (CVA6Cfg.PtLevels - 1) && ~s_st_enbl_i) ? // - lu_vaddr_i[12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(x+1))-1:12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*x)] == tags_q[i].vpn[x] && lu_vaddr_i[12+HYP_EXT*(CVA6Cfg.VpnLen-1): 12+HYP_EXT*(CVA6Cfg.VpnLen-(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels))] == tags_q[i].vpn[x+HYP_EXT][(CVA6Cfg.VpnLen%CVA6Cfg.PtLevels)-HYP_EXT:0]: // - lu_vaddr_i[12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(x+1))-1:12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*x)] == tags_q[i].vpn[x]; - - //identify if there is a hit at each PT level for all TLB entries - assign level_match[i][x] = &vpn_match[i][CVA6Cfg.PtLevels-1:x] && page_match[i][x]; - - //identify vpage_match for all TLB Entries and vaddr_level match (if there is a hit at each PT level for all TLB entries on the vaddr) - for (z = 0; z < HYP_EXT + 1; z++) begin - assign vpage_match[i][z][x] = x == 0 ? 1 : tags_q[i].is_page[CVA6Cfg.PtLevels-1-x][z]; - assign vaddr_level_match[i][z][x]= &vaddr_vpn_match[i][z][CVA6Cfg.PtLevels-1:x] && vpage_match[i][z][x]; + for (i_gen = 0; i_gen < TLB_ENTRIES; i_gen++) begin + for (x_gen = 0; x_gen < CVA6Cfg.PtLevels; x_gen++) begin + // WARNING: `x` goes in the order {0 = 4K, 1 = 2M, 2 = 1G}. + + // Identify page_match for all TLB Entries: + // `page_match[i][x] == 1` if the entry `i` represents a page of (non-strictly) bigger length than + // requested. + // 4K is always a match + // In case of H-mode, the length of a page in the TLB is the smallest of S-translation and + // G-translation + if (x_gen == 0) begin + assign page_match[i_gen][x_gen] = 1; + end else begin + if (HYP_EXT == 0 || x_gen == (CVA6Cfg.PtLevels - 1)) begin + // No H-mode or Giga page. Then both condition must be true: + // - G-stage translation is *not* enabled or G-entry is a matching page (bit 1) + // - S-translation is *not* enabled or S-entry i is a matching page (bit 0) + assign page_match[i_gen][x_gen] = &(tags_q[i_gen].is_page[CVA6Cfg.PtLevels-1-x_gen][HYP_EXT:0] | (~v_st_enbl[HYP_EXT:0])); + end else begin + // Other cases: H-mode and mega page + assign page_match[i_gen][x_gen] = (&v_st_enbl[HYP_EXT:0]) ? + // If S-translation and G-translation are active, then either: + // - S-translation matches and G-translation is Mega or Giga + // - G-translation matches and S-translation is Mega or Giga + ((tags_q[i_gen].is_page[CVA6Cfg.PtLevels-1-x_gen][0] && (tags_q[i_gen].is_page[CVA6Cfg.PtLevels-2-x_gen][HYP_EXT] || tags_q[i_gen].is_page[CVA6Cfg.PtLevels-1-x_gen][HYP_EXT])) + || (tags_q[i_gen].is_page[CVA6Cfg.PtLevels-1-x_gen][HYP_EXT] && (tags_q[i_gen].is_page[CVA6Cfg.PtLevels-2-x_gen][0] || tags_q[i_gen].is_page[CVA6Cfg.PtLevels-1-x_gen][0]))) + : // Else, either S or G-level must match depending which is active + ((tags_q[i_gen].is_page[CVA6Cfg.PtLevels-1-x_gen][0] && s_st_enbl_i) || (tags_q[i_gen].is_page[CVA6Cfg.PtLevels-1-x_gen][HYP_EXT] && g_st_enbl_i)); + end + end + + // Identify if VPN matches at levels `x` for TLB entry `i` + if (CVA6Cfg.RVH && x_gen == (CVA6Cfg.PtLevels - 1)) begin + // H-mode: extend the check on last level (Giga page) to include the supplementary bits in + // GPA (cfg.GPPNW = 29 bits in Sv39x4, compared to 27 bits in Sv39) + // /!\ Only in cases G-translation is active and not S-translation + assign vpn_match[i_gen][x_gen] = lu_vaddr_i[12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(x_gen+1))-1:12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*x_gen)] == tags_q[i_gen].vpn[x_gen] + && (s_st_enbl_i || lu_vaddr_i[12+CVA6Cfg.GPPNW-1:12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(x_gen+1))] == tags_q[i_gen].vpn[x_gen+HYP_EXT][(CVA6Cfg.GPPNW%(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels))-1:0]); + + end else begin + // Standard match + assign vpn_match[i_gen][x_gen] = lu_vaddr_i[12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(x_gen+1))-1:12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*x_gen)] == tags_q[i_gen].vpn[x_gen]; + end + + // Identify if there is a hit at level `x`: VPN and page length must match + assign level_match[i_gen][x_gen] = &vpn_match[i_gen][CVA6Cfg.PtLevels-1:x_gen] && page_match[i_gen][x_gen]; + // Identify `vpage_match` (matching page type) and deduce `vaddr_level` match (hit at all level on the virtual addr to be flushed + // and matching page type). + for (z_gen = 0; z_gen < HYP_EXT + 1; z_gen++) begin + assign vpage_match [i_gen][z_gen][x_gen] = x_gen == 0 ? 1 : tags_q[i_gen].is_page[CVA6Cfg.PtLevels-1-x_gen][z_gen]; + assign vaddr_level_match[i_gen][z_gen][x_gen] = &vaddr_vpn_match[i_gen][z_gen][CVA6Cfg.PtLevels-1:x_gen] && vpage_match[i_gen][z_gen][x_gen]; end - //identify if virtual address vpn matches at all PT levels for all TLB entries - assign vaddr_vpn_match[i][0][x] = vaddr_to_be_flushed_i[12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(x+1))-1:12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*x)] == tags_q[i].vpn[x]; + // Identify if virtual address vpn matches at all PT levels for all TLB entries + assign vaddr_vpn_match[i_gen][0][x_gen] = vaddr_to_be_flushed_i[12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(x_gen+1))-1:12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*x_gen)] == tags_q[i_gen].vpn[x_gen]; end - + // Identify if the input virtual address matches a stored NAPOT tag + assign vpn0_napot_match[i_gen] = lu_vaddr_i[12 + (CVA6Cfg.VpnLen / CVA6Cfg.PtLevels) - 1 : 16] == tags_q[i_gen].vpn[0][(CVA6Cfg.VpnLen / CVA6Cfg.PtLevels)-1 : 4]; + assign napot_tag_match[i_gen] = (CVA6Cfg.SvnapotEn && tags_q[i_gen].is_napot_64k) ? vpn_match[i_gen][2] && vpn_match[i_gen][1] && vpn0_napot_match[i_gen] : 1'b0; if (CVA6Cfg.RVH) begin - //identify if GPADDR matches the GPPN - assign vaddr_vpn_match[i][HYP_EXT][0] = (gpaddr_to_be_flushed_i[20:12] == gppn[i][8:0]); - assign vaddr_vpn_match[i][HYP_EXT][HYP_EXT] = (gpaddr_to_be_flushed_i[29:21] == gppn[i][17:9]); - assign vaddr_vpn_match[i][HYP_EXT][HYP_EXT*2] = (gpaddr_to_be_flushed_i[30+GPPN2:30] == gppn[i][18+GPPN2:18]); - + for (x_gen = 0; x_gen < CVA6Cfg.PtLevels; x_gen++) begin + // Identify if GPADDR matches the GPPN + assign vaddr_vpn_match[i_gen][HYP_EXT][x_gen] = gpaddr_to_be_flushed_i[12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(x_gen+1))-1:12+((CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*x_gen)] == + gppn[i_gen][ (CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*(x_gen+1)-1 : (CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)*x_gen]; + end end - for (w = 0; w < CVA6Cfg.PtLevels - 1; w++) begin - assign is_page_o[i][w] = page_match[i][CVA6Cfg.PtLevels - 1 - w]; //THIS REORGANIZES THE PAGES TO MATCH THE OUTPUT STRUCTURE (2M,1G) + // Reorganise the output structure to match `is_page` tag order: [1G, 2M] + for (w_gen = 0; w_gen < CVA6Cfg.PtLevels - 1; w_gen++) begin + assign is_page_o[i_gen][w_gen] = page_match[i_gen][CVA6Cfg.PtLevels-1-w_gen]; end end endgenerate @@ -156,7 +196,7 @@ module cva6_tlb lu_gpaddr_o = '{default: 0}; for (int unsigned i = 0; i < TLB_ENTRIES; i++) begin - // first level match, this may be a giga page, check the ASID flags as well + // First level match, this may be a giga page, check the ASID flags as well // if the entry is associated to a global address, don't match the ASID (ASID is don't care) match_asid[i] = ((lu_asid_i == tags_q[i].asid || content_q[i].pte.g) && s_st_enbl_i) || !s_st_enbl_i; @@ -164,30 +204,64 @@ module cva6_tlb match_vmid[i] = (lu_vmid_i == tags_q[i].vmid && g_st_enbl_i) || !g_st_enbl_i; end - // check if translation is a: S-Stage and G-Stage, S-Stage only or G-Stage only translation and virtualization mode is on/off + // Check if that S-stage and G-stage modes corresponds, and that + // and virtualization mode is on/off match_stage[i] = tags_q[i].v_st_enbl[HYP_EXT*2:0] == v_st_enbl[HYP_EXT*2:0]; - if (tags_q[i].valid && match_asid[i] && match_vmid[i] && match_stage[i]) begin - - if (CVA6Cfg.RVH && vpn_match[i][HYP_EXT*2]) begin + // There was a match, i.e.: + // - tag is valid + // - asid matches + // - vmid matches + // - virtualisations / S-stage / G-stage matches + // - there exists a PT level for which and entry exists and corresponding VPN(s) match + if (tags_q[i].valid && match_asid[i] && match_vmid[i] && match_stage[i] && (|level_match[i] || napot_tag_match[i])) begin + lu_is_page_o = is_page_o[i]; + lu_content_o = content_q[i].pte; + lu_hit_o = 1'b1; + lu_hit[i] = 1'b1; + // Translate S-stage to GPA: use `content_q[i].pte` to get PPN and use offset + // from input `lu_vaddr_i`. In case of mega/giga pages, PTE PPN must be aligned, + // so we should not overwrite any useful bits. + if (CVA6Cfg.RVH) begin if (s_st_enbl_i) begin + // S-stage Normal page lu_gpaddr_o = {content_q[i].pte.ppn[(CVA6Cfg.GPPNW-1):0], lu_vaddr_i[11:0]}; - // Giga page + // S-stage Mega page + if (tags_q[i].is_page[1][0]) + lu_gpaddr_o[12+(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)-1:12] = lu_vaddr_i[12+(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)-1:12]; + // S-stage Giga page if (tags_q[i].is_page[0][0]) - lu_gpaddr_o[12+2*CVA6Cfg.VpnLen/CVA6Cfg.PtLevels-1:12] = lu_vaddr_i[12+2*CVA6Cfg.VpnLen/CVA6Cfg.PtLevels-1:12]; - // Mega page - if (tags_q[i].is_page[HYP_EXT][0]) - lu_gpaddr_o[12+CVA6Cfg.VpnLen/CVA6Cfg.PtLevels-1:12] = lu_vaddr_i[12+CVA6Cfg.VpnLen/CVA6Cfg.PtLevels-1:12]; + lu_gpaddr_o[12+2*(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)-1:12] = lu_vaddr_i[12+2*(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)-1:12]; end else begin - lu_gpaddr_o =CVA6Cfg.GPLEN'(lu_vaddr_i[(CVA6Cfg.XLEN == 32 ? CVA6Cfg.VLEN: CVA6Cfg.GPLEN)-1:0]); + lu_gpaddr_o = CVA6Cfg.GPLEN'(lu_vaddr_i[(CVA6Cfg.IS_XLEN32 ? CVA6Cfg.VLEN:CVA6Cfg.GPLEN)-1:0]); end - end - if (|level_match[i]) begin + // G-translation (if requested), depending on `content[i].gpte` page type + if (g_st_enbl_i) begin + // Compute G-Stage PPN based on the GPA + // in case of mega/giga pages, GPTE PPN must be aligned so + // here again, we should not overwrite useful bits. + lu_g_content_o = content_q[i].gpte; + // Mega page + if (tags_q[i].is_page[1][HYP_EXT]) + lu_g_content_o.ppn[(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)-1:0] = lu_gpaddr_o[12+(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)-1:12]; + // Giga page + if (tags_q[i].is_page[0][HYP_EXT]) + lu_g_content_o.ppn[2*(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)-1:0] = lu_gpaddr_o[12+2*(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)-1:12]; + end + end + if (|level_match[i] || napot_tag_match[i]) begin lu_is_page_o = is_page_o[i]; - lu_content_o = content_q[i].pte; lu_hit_o = 1'b1; lu_hit[i] = 1'b1; + // Patch the PPN on every TLB hit if this entry is a 64 KiB Svnapot page + if (tags_q[i].is_napot_64k && CVA6Cfg.SvnapotEn) begin + patched_pte = content_q[i].pte; + patched_pte.ppn[3:0] = lu_vaddr_i[15:12]; + lu_content_o = patched_pte; + end else begin + lu_content_o = content_q[i].pte; + end if (CVA6Cfg.RVH) begin // Compute G-Stage PPN based on the gpaddr @@ -202,10 +276,16 @@ module cva6_tlb end end - logic [HYP_EXT:0]asid_to_be_flushed_is0; // indicates that the ASID provided by SFENCE.VMA (rs2)is 0, active high - logic [HYP_EXT:0] vaddr_to_be_flushed_is0; // indicates that the VADDR provided by SFENCE.VMA (rs1)is 0, active high + logic [HYP_EXT:0] asid_to_be_flushed_is0; // indicates that the ASID provided by SFENCE.VMA (rs2) is 0, active high + logic [HYP_EXT:0] vaddr_to_be_flushed_is0; // indicates that the VADDR provided by SFENCE.VMA (rs1) is 0, active high logic vmid_to_be_flushed_is0; // indicates that the VMID provided is 0, active high logic gpaddr_to_be_flushed_is0; // indicates that the GPADDR provided is 0, active high + logic flush_addr_napot_match; + logic flush_addr_matches; + logic [CVA6Cfg.VpnLen-1:0] temp_stored_vpn; + logic [CVA6Cfg.VpnLen-1:0] flush_vpn_masked; + logic [CVA6Cfg.VpnLen-1:0] stored_vpn_masked; + logic [CVA6Cfg.VpnLen-1:0] vpn_to_store; assign asid_to_be_flushed_is0 = ~(|asid_to_be_flushed_i); assign vaddr_to_be_flushed_is0 = ~(|vaddr_to_be_flushed_i); @@ -226,17 +306,27 @@ module cva6_tlb if (tags_q[i].v_st_enbl[0]) begin gppn[i] = content_q[i].pte.ppn[(CVA6Cfg.GPPNW-1):0]; - if (tags_q[i].is_page[HYP_EXT][0]) + // Mega Page + if (tags_q[i].is_page[1][0]) gppn[i][CVA6Cfg.VpnLen/CVA6Cfg.PtLevels-1:0] = tags_q[i].vpn[0]; + // Giga Page if (tags_q[i].is_page[0][0]) - gppn[i][2*(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)-1:0] = { - tags_q[i].vpn[HYP_EXT], tags_q[i].vpn[0] - }; + gppn[i][2*(CVA6Cfg.VpnLen/CVA6Cfg.PtLevels)-1:0] = {tags_q[i].vpn[1], tags_q[i].vpn[0]}; end else begin gppn[i][CVA6Cfg.VpnLen-1:0] = CVA6Cfg.VpnLen'(tags_q[i].vpn); end end + if (tags_q[i].is_napot_64k && CVA6Cfg.SvnapotEn) begin + temp_stored_vpn = {tags_q[i].vpn[2], tags_q[i].vpn[1], tags_q[i].vpn[0]}; + // Mask the lower 4 bits of the VPN (addr[15:12]) for comparison + flush_vpn_masked = vaddr_to_be_flushed_i[CVA6Cfg.VpnLen+11:12] & ~'hF; + stored_vpn_masked = temp_stored_vpn & ~'hF; + flush_addr_napot_match = (flush_vpn_masked == stored_vpn_masked); + end else begin + flush_addr_napot_match = 1'b0; + end + flush_addr_matches = |vaddr_level_match[i][0] || flush_addr_napot_match; if (flush_i) begin if (!tags_q[i].v_st_enbl[HYP_EXT*2] || HYP_EXT == 0) begin @@ -244,10 +334,10 @@ module cva6_tlb // flush everything if ASID is 0 and vaddr is 0 ("SFENCE.VMA x0 x0" case) if (asid_to_be_flushed_is0 && vaddr_to_be_flushed_is0) tags_n[i].valid = 1'b0; // flush vaddr in all addressing space ("SFENCE.VMA vaddr x0" case), it should happen only for leaf pages - else if (asid_to_be_flushed_is0 && (|vaddr_level_match[i][0] ) && (~vaddr_to_be_flushed_is0)) + else if (asid_to_be_flushed_is0 && (flush_addr_matches) && (~vaddr_to_be_flushed_is0)) tags_n[i].valid = 1'b0; // the entry is flushed if it's not global and asid and vaddr both matches with the entry to be flushed ("SFENCE.VMA vaddr asid" case) - else if ((!content_q[i].pte.g) && (|vaddr_level_match[i][0]) && (asid_to_be_flushed_i == tags_q[i].asid ) && (!vaddr_to_be_flushed_is0) && (!asid_to_be_flushed_is0)) + else if ((!content_q[i].pte.g) && (flush_addr_matches) && (asid_to_be_flushed_i == tags_q[i].asid ) && (!vaddr_to_be_flushed_is0) && (!asid_to_be_flushed_is0)) tags_n[i].valid = 1'b0; // the entry is flushed if it's not global, and the asid matches and vaddr is 0. ("SFENCE.VMA 0 asid" case) else if ((!content_q[i].pte.g) && (vaddr_to_be_flushed_is0) && (asid_to_be_flushed_i == tags_q[i].asid ) && (!asid_to_be_flushed_is0)) @@ -260,10 +350,10 @@ module cva6_tlb if (asid_to_be_flushed_is0 && vaddr_to_be_flushed_is0 && ((tags_q[i].v_st_enbl[HYP_EXT] && lu_vmid_i == tags_q[i].vmid) || !tags_q[i].v_st_enbl[HYP_EXT])) tags_n[i].valid = 1'b0; // flush vaddr in all addressing space if current VMID matches ("SFENCE.VMA/HFENCE.VVMA vaddr x0" case), it should happen only for leaf pages - else if (asid_to_be_flushed_is0 && (|vaddr_level_match[i][0]) && (~vaddr_to_be_flushed_is0) && ((tags_q[i].v_st_enbl[HYP_EXT] && lu_vmid_i == tags_q[i].vmid) || !tags_q[i].v_st_enbl[HYP_EXT])) + else if (asid_to_be_flushed_is0 && (flush_addr_matches) && (~vaddr_to_be_flushed_is0) && ((tags_q[i].v_st_enbl[HYP_EXT] && lu_vmid_i == tags_q[i].vmid) || !tags_q[i].v_st_enbl[HYP_EXT])) tags_n[i].valid = 1'b0; // the entry is flushed if it's not global and asid and vaddr and current VMID matches with the entry to be flushed ("SFENCE.VMA/HFENCE.VVMA vaddr asid" case) - else if ((!content_q[i].pte.g) && (|vaddr_level_match[i][0]) && (asid_to_be_flushed_i == tags_q[i].asid && ((tags_q[i].v_st_enbl[HYP_EXT] && lu_vmid_i == tags_q[i].vmid) || !tags_q[i].v_st_enbl[HYP_EXT])) && (!vaddr_to_be_flushed_is0) && (!asid_to_be_flushed_is0)) + else if ((!content_q[i].pte.g) && (flush_addr_matches) && (asid_to_be_flushed_i == tags_q[i].asid && ((tags_q[i].v_st_enbl[HYP_EXT] && lu_vmid_i == tags_q[i].vmid) || !tags_q[i].v_st_enbl[HYP_EXT])) && (!vaddr_to_be_flushed_is0) && (!asid_to_be_flushed_is0)) tags_n[i].valid = 1'b0; // the entry is flushed if it's not global, and the asid and the current VMID matches and vaddr is 0. ("SFENCE.VMA/HFENCE.VVMA 0 asid" case) else if ((!content_q[i].pte.g) && (vaddr_to_be_flushed_is0) && (asid_to_be_flushed_i == tags_q[i].asid && ((tags_q[i].v_st_enbl[HYP_EXT] && lu_vmid_i == tags_q[i].vmid) || !tags_q[i].v_st_enbl[HYP_EXT])) && (!asid_to_be_flushed_is0)) @@ -275,9 +365,9 @@ module cva6_tlb // flush everything if vmid is 0 and addr is 0 ("HFENCE.GVMA x0 x0" case) if (vmid_to_be_flushed_is0 && gpaddr_to_be_flushed_is0) tags_n[i].valid = 1'b0; // flush gpaddr in all addressing space ("HFENCE.GVMA gpaddr x0" case), it should happen only for leaf pages - else if (vmid_to_be_flushed_is0 && (|vaddr_level_match[i][HYP_EXT] ) && (~gpaddr_to_be_flushed_is0)) + else if (vmid_to_be_flushed_is0 && (|vaddr_level_match[i][HYP_EXT]) && (~gpaddr_to_be_flushed_is0)) tags_n[i].valid = 1'b0; - // the entry vmid and gpaddr both matches with the entry to be flushed ("HFENCE.GVMA gpaddr vmid" case) + // the entry vmid and gpaddr both match with the entry to be flushed ("HFENCE.GVMA gpaddr vmid" case) else if ((|vaddr_level_match[i][HYP_EXT]) && (vmid_to_be_flushed_i == tags_q[i].vmid) && (~gpaddr_to_be_flushed_is0) && (~vmid_to_be_flushed_is0)) tags_n[i].valid = 1'b0; // the entry is flushed if the vmid matches and gpaddr is 0. ("HFENCE.GVMA 0 vmid" case) @@ -286,14 +376,22 @@ module cva6_tlb end // normal replacement end else if (update_i.valid & replace_en[i] & !lu_hit_o) begin + vpn_to_store = update_i.vpn; + if (update_i.is_napot_64k && CVA6Cfg.SvnapotEn) begin + // Svnapot: For a NAPOT entry, normalize the VPN by clearing the lower bits before storage + // This ensures that any address within the 64KiB range will match the same stored tag + vpn_to_store[3:0] = 4'b0; + end //update tag tags_n[i] = { update_i.asid, update_i.vmid, - ((CVA6Cfg.PtLevels + HYP_EXT) * (CVA6Cfg.VpnLen / CVA6Cfg.PtLevels))'(update_i.vpn), + // Zero-extended VPN to fit the tag width + ((CVA6Cfg.PtLevels + HYP_EXT) * (CVA6Cfg.VpnLen / CVA6Cfg.PtLevels))'(vpn_to_store), update_i.is_page, update_i.v_st_enbl, - 1'b1 + 1'b1, + CVA6Cfg.SvnapotEn ? update_i.is_napot_64k : 1'b0 // Svnapot: Propagate the NAPOT flag into the TLB entry }; // update content as well content_n[i].pte = update_i.content; @@ -311,27 +409,27 @@ module cva6_tlb // The PLRU-tree indexing: // lvl0 0 // / \ -// / \ -// lvl1 1 2 -// / \ / \ -// lvl2 3 4 5 6 -// / \ /\/\ /\ -// ... ... ... ... -// Just predefine which nodes will be set/cleared -// E.g. for a TLB with 8 entries, the for-loop is semantically -// equivalent to the following pseudo-code: -// unique case (1'b1) -// lu_hit[7]: plru_tree_n[0, 2, 6] = {1, 1, 1}; -// lu_hit[6]: plru_tree_n[0, 2, 6] = {1, 1, 0}; -// lu_hit[5]: plru_tree_n[0, 2, 5] = {1, 0, 1}; -// lu_hit[4]: plru_tree_n[0, 2, 5] = {1, 0, 0}; -// lu_hit[3]: plru_tree_n[0, 1, 4] = {0, 1, 1}; -// lu_hit[2]: plru_tree_n[0, 1, 4] = {0, 1, 0}; -// lu_hit[1]: plru_tree_n[0, 1, 3] = {0, 0, 1}; -// lu_hit[0]: plru_tree_n[0, 1, 3] = {0, 0, 0}; -// default: begin /* No hit */ end -// endcase -for ( + // / \ + // lvl1 1 2 + // / \ / \ + // lvl2 3 4 5 6 + // / \ /\/\ /\ + // ... ... ... ... + // Just predefine which nodes will be set/cleared + // E.g. for a TLB with 8 entries, the for-loop is semantically + // equivalent to the following pseudo-code: + // unique case (1'b1) + // lu_hit[7]: plru_tree_n[0, 2, 6] = {1, 1, 1}; + // lu_hit[6]: plru_tree_n[0, 2, 6] = {1, 1, 0}; + // lu_hit[5]: plru_tree_n[0, 2, 5] = {1, 0, 1}; + // lu_hit[4]: plru_tree_n[0, 2, 5] = {1, 0, 0}; + // lu_hit[3]: plru_tree_n[0, 1, 4] = {0, 1, 1}; + // lu_hit[2]: plru_tree_n[0, 1, 4] = {0, 1, 0}; + // lu_hit[1]: plru_tree_n[0, 1, 3] = {0, 0, 1}; + // lu_hit[0]: plru_tree_n[0, 1, 3] = {0, 0, 0}; + // default: begin /* No hit */ end + // endcase + for ( int unsigned i = 0; i < TLB_ENTRIES; i++ ) begin automatic int unsigned idx_base, shift, new_index; diff --git a/core/cva6_mmu/xsim.dir/work/work.rlx b/core/cva6_mmu/xsim.dir/work/work.rlx new file mode 100644 index 00000000000..eef64dcee9e --- /dev/null +++ b/core/cva6_mmu/xsim.dir/work/work.rlx @@ -0,0 +1,5 @@ +0.7 +2020.2 +May 22 2024 +18:54:44 +/tmp/nvim.derumigny/J8Bv2a/1/cva6_mmu.sv,1748272014,systemVerilog,,,,,,,,,,,, diff --git a/core/cva6_rvfi.sv b/core/cva6_rvfi.sv index 4b4f863e4d5..f6b1ec549fd 100644 --- a/core/cva6_rvfi.sv +++ b/core/cva6_rvfi.sv @@ -17,7 +17,8 @@ module cva6_rvfi parameter type rvfi_csr_t = logic, parameter type rvfi_probes_instr_t = logic, parameter type rvfi_probes_csr_t = logic, - parameter type rvfi_probes_t = logic + parameter type rvfi_probes_t = logic, + parameter type rvfi_to_iti_t = logic ) ( @@ -26,8 +27,8 @@ module cva6_rvfi input rvfi_probes_t rvfi_probes_i, output rvfi_instr_t [CVA6Cfg.NrCommitPorts-1:0] rvfi_instr_o, + output rvfi_to_iti_t rvfi_to_iti_o, output rvfi_csr_t rvfi_csr_o - ); localparam logic [CVA6Cfg.XLEN-1:0] IsaCode = @@ -44,10 +45,186 @@ module cva6_rvfi | (CVA6Cfg.XLEN'(CVA6Cfg.RVU) << 20) // U - User mode implemented | (CVA6Cfg.XLEN'(CVA6Cfg.RVV) << 21) // V - Vector extension | (CVA6Cfg.XLEN'(CVA6Cfg.NSX) << 23) // X - Non-standard extensions present - | ((CVA6Cfg.XLEN == 64 ? 2 : 1) << CVA6Cfg.XLEN - 2); // MXL + | ((CVA6Cfg.IS_XLEN64 ? 2 : 1) << CVA6Cfg.XLEN - 2); // MXL localparam logic [CVA6Cfg.XLEN-1:0] hart_id_i = '0; + // Function to compute AMO write value for RVFI logging + // This mirrors the AMO ALU behaviour so the tracer sees the value actually written + // back to memory. This is post-alignment data (lower bytes contain the payload) so + // the tracer can rotate it using the write mask and address offset. + function automatic logic [CVA6Cfg.XLEN-1:0] compute_amo_wdata( + input fu_op amo_op, input logic [CVA6Cfg.XLEN-1:0] mem_old_val, + input logic [CVA6Cfg.XLEN-1:0] reg_val); + ariane_pkg::amo_t amo_kind; + logic is_word_op; + logic [63:0] operand_a_sext, operand_b_sext; + logic [63:0] operand_a_zext, operand_b_zext; + logic [63:0] result64; + logic [64:0] adder_operand_a, adder_operand_b, adder_sum; + + // Decode functional unit opcode into AMO class and width information + amo_kind = AMO_NONE; + is_word_op = 1'b0; + unique case (amo_op) + AMO_LRW: begin + amo_kind = AMO_LR; + is_word_op = 1'b1; + end + AMO_LRD: begin + amo_kind = AMO_LR; + is_word_op = 1'b0; + end + AMO_SCW: begin + amo_kind = AMO_SC; + is_word_op = 1'b1; + end + AMO_SCD: begin + amo_kind = AMO_SC; + is_word_op = 1'b0; + end + AMO_SWAPW: begin + amo_kind = AMO_SWAP; + is_word_op = 1'b1; + end + AMO_SWAPD: begin + amo_kind = AMO_SWAP; + is_word_op = 1'b0; + end + AMO_ADDW: begin + amo_kind = AMO_ADD; + is_word_op = 1'b1; + end + AMO_ADDD: begin + amo_kind = AMO_ADD; + is_word_op = 1'b0; + end + AMO_ANDW: begin + amo_kind = AMO_AND; + is_word_op = 1'b1; + end + AMO_ANDD: begin + amo_kind = AMO_AND; + is_word_op = 1'b0; + end + AMO_ORW: begin + amo_kind = AMO_OR; + is_word_op = 1'b1; + end + AMO_ORD: begin + amo_kind = AMO_OR; + is_word_op = 1'b0; + end + AMO_XORW: begin + amo_kind = AMO_XOR; + is_word_op = 1'b1; + end + AMO_XORD: begin + amo_kind = AMO_XOR; + is_word_op = 1'b0; + end + AMO_MAXW: begin + amo_kind = AMO_MAX; + is_word_op = 1'b1; + end + AMO_MAXD: begin + amo_kind = AMO_MAX; + is_word_op = 1'b0; + end + AMO_MAXWU: begin + amo_kind = AMO_MAXU; + is_word_op = 1'b1; + end + AMO_MAXDU: begin + amo_kind = AMO_MAXU; + is_word_op = 1'b0; + end + AMO_MINW: begin + amo_kind = AMO_MIN; + is_word_op = 1'b1; + end + AMO_MIND: begin + amo_kind = AMO_MIN; + is_word_op = 1'b0; + end + AMO_MINWU: begin + amo_kind = AMO_MINU; + is_word_op = 1'b1; + end + AMO_MINDU: begin + amo_kind = AMO_MINU; + is_word_op = 1'b0; + end + default: begin + amo_kind = AMO_NONE; + is_word_op = 1'b0; + end + endcase + + // Create signed and unsigned 64-bit views of the operands (word ops use 32-bit payloads) + if (is_word_op) begin + operand_a_sext = {{32{mem_old_val[31]}}, mem_old_val[31:0]}; + operand_b_sext = {{32{reg_val[31]}}, reg_val[31:0]}; + operand_a_zext = {32'b0, mem_old_val[31:0]}; + operand_b_zext = {32'b0, reg_val[31:0]}; + end else begin + operand_a_sext = $signed(mem_old_val); + operand_b_sext = $signed(reg_val); + operand_a_zext = $unsigned(mem_old_val); + operand_b_zext = $unsigned(reg_val); + end + + // Default to returning the register operand (SWAP/SC path) + result64 = operand_b_zext; + adder_operand_a = {operand_a_sext[63], operand_a_sext}; + adder_operand_b = {operand_b_sext[63], operand_b_sext}; + adder_sum = '0; + + unique case (amo_kind) + AMO_SC, AMO_SWAP: begin + result64 = operand_b_zext; + end + AMO_ADD: begin + adder_sum = adder_operand_a + adder_operand_b; + result64 = adder_sum[63:0]; + end + AMO_AND: result64 = operand_a_zext & operand_b_zext; + AMO_OR: result64 = operand_a_zext | operand_b_zext; + AMO_XOR: result64 = operand_a_zext ^ operand_b_zext; + AMO_MAX: begin + adder_operand_b = -{operand_b_sext[63], operand_b_sext}; + adder_sum = adder_operand_a + adder_operand_b; + result64 = adder_sum[64] ? operand_b_zext : operand_a_zext; + end + AMO_MIN: begin + adder_operand_b = -{operand_b_sext[63], operand_b_sext}; + adder_sum = adder_operand_a + adder_operand_b; + result64 = adder_sum[64] ? operand_a_zext : operand_b_zext; + end + AMO_MAXU: begin + adder_operand_a = {1'b0, operand_a_zext}; + adder_operand_b = -{1'b0, operand_b_zext}; + adder_sum = adder_operand_a + adder_operand_b; + result64 = adder_sum[64] ? operand_b_zext : operand_a_zext; + end + AMO_MINU: begin + adder_operand_a = {1'b0, operand_a_zext}; + adder_operand_b = -{1'b0, operand_b_zext}; + adder_sum = adder_operand_a + adder_operand_b; + result64 = adder_sum[64] ? operand_a_zext : operand_b_zext; + end + default: begin + result64 = operand_b_zext; + end + endcase + + if (is_word_op) begin + return {{CVA6Cfg.XLEN - 32{1'b0}}, result64[31:0]}; + end else begin + return result64[CVA6Cfg.XLEN-1:0]; + end + endfunction + localparam logic [63:0] SMODE_STATUS_READ_MASK = ariane_pkg::smode_status_read_mask(CVA6Cfg); logic flush; @@ -81,6 +258,14 @@ module cva6_rvfi logic [CVA6Cfg.XLEN-1:0] ex_commit_cause; logic ex_commit_valid; + logic [CVA6Cfg.NrCommitPorts-1:0] valid_iti; + logic [CVA6Cfg.NrCommitPorts-1:0][CVA6Cfg.VLEN-1:0] pc_iti; + ariane_pkg::fu_op [CVA6Cfg.NrCommitPorts-1:0] op_iti; + logic branch_valid_iti; + logic is_taken_iti; + logic [CVA6Cfg.XLEN-1:0] tval_iti; + logic [63:0] time_iti; + riscv::priv_lvl_t priv_lvl; logic [CVA6Cfg.VLEN-1:0] lsu_ctrl_vaddr; @@ -99,6 +284,8 @@ module cva6_rvfi logic [(CVA6Cfg.XLEN/8)-1:0] lsu_wmask; logic [CVA6Cfg.TRANS_ID_BITS-1:0] lsu_addr_trans_id; + logic [CVA6Cfg.TRANS_ID_BITS-1:0] branch_trans_id; + riscv::pmpcfg_t [15:0] pmpcfg_q, pmpcfg_d; rvfi_probes_csr_t csr; @@ -147,6 +334,14 @@ module cva6_rvfi assign ex_commit_cause = instr.ex_commit_cause; assign ex_commit_valid = instr.ex_commit_valid; + assign valid_iti = instr.commit_ack; + assign pc_iti = instr.commit_instr_pc; + assign op_iti = instr.commit_instr_op; + assign branch_valid_iti = instr.branch_valid; + assign is_taken_iti = instr.is_taken; + assign tval_iti = instr.tval; + assign time_iti = csr.cycle_q; + assign priv_lvl = instr.priv_lvl; assign wbdata = instr.wbdata; @@ -159,6 +354,8 @@ module cva6_rvfi assign lsu_rmask = instr.lsu_ctrl_fu == LOAD ? instr.lsu_ctrl_be : '0; assign lsu_wmask = instr.lsu_ctrl_fu == STORE ? instr.lsu_ctrl_be : '0; assign lsu_addr_trans_id = instr.lsu_ctrl_trans_id; + assign branch_trans_id = instr.branch_trans_id; + //ID STAGE @@ -170,6 +367,7 @@ module cva6_rvfi typedef struct packed { logic valid; logic [31:0] instr; + logic is_compressed; } issue_struct_t; issue_struct_t [CVA6Cfg.NrIssuePorts-1:0] issue_n, issue_q; logic took0; @@ -187,6 +385,7 @@ module cva6_rvfi if (!issue_n[CVA6Cfg.NrIssuePorts-1].valid) begin issue_n[CVA6Cfg.NrIssuePorts-1].valid = fetch_entry_valid[0]; issue_n[CVA6Cfg.NrIssuePorts-1].instr = truncated[0]; + issue_n[CVA6Cfg.NrIssuePorts-1].is_compressed = is_compressed[0]; took0 = 1'b1; end @@ -199,9 +398,11 @@ module cva6_rvfi if (took0) begin issue_n[CVA6Cfg.NrIssuePorts-1].valid = fetch_entry_valid[CVA6Cfg.NrIssuePorts-1]; issue_n[CVA6Cfg.NrIssuePorts-1].instr = truncated[CVA6Cfg.NrIssuePorts-1]; + issue_n[CVA6Cfg.NrIssuePorts-1].is_compressed = is_compressed[CVA6Cfg.NrIssuePorts-1]; end else begin issue_n[CVA6Cfg.NrIssuePorts-1].valid = fetch_entry_valid[0]; issue_n[CVA6Cfg.NrIssuePorts-1].instr = truncated[0]; + issue_n[CVA6Cfg.NrIssuePorts-1].is_compressed = is_compressed[0]; end end @@ -231,6 +432,9 @@ module cva6_rvfi logic [(CVA6Cfg.XLEN/8)-1:0] lsu_wmask; logic [CVA6Cfg.XLEN-1:0] lsu_wdata; logic [31:0] instr; + logic branch_valid; + logic is_taken; + logic is_compressed; } sb_mem_t; sb_mem_t [CVA6Cfg.NR_SB_ENTRIES-1:0] mem_q, mem_n; @@ -246,11 +450,17 @@ module cva6_rvfi lsu_rmask: '0, lsu_wmask: '0, lsu_wdata: '0, - instr: issue_q[i].instr + instr: issue_q[i].instr, + branch_valid: 1'b0, + is_taken: 1'b0, + is_compressed: issue_q[i].is_compressed }; end end - + if (branch_valid_iti) begin + mem_n[branch_trans_id].branch_valid = branch_valid_iti; + mem_n[branch_trans_id].is_taken = is_taken_iti; + end if (lsu_rmask != 0) begin mem_n[lsu_addr_trans_id].lsu_addr = lsu_addr; mem_n[lsu_addr_trans_id].lsu_rmask = lsu_rmask; @@ -300,7 +510,7 @@ module cva6_rvfi rvfi_instr_o[i].cause <= ex_commit_cause; rvfi_instr_o[i].mode <= (CVA6Cfg.DebugEn && debug_mode) ? 2'b10 : priv_lvl; - rvfi_instr_o[i].ixl <= CVA6Cfg.XLEN == 64 ? 2 : 1; + rvfi_instr_o[i].ixl <= CVA6Cfg.IS_XLEN64 ? 2 : 1; rvfi_instr_o[i].rs1_addr <= commit_instr_rs1[i]; rvfi_instr_o[i].rs2_addr <= commit_instr_rs2[i]; rvfi_instr_o[i].rd_addr <= commit_instr_rd[i]; @@ -312,126 +522,146 @@ module cva6_rvfi // So far, only write paddr is reported. TODO: read paddr rvfi_instr_o[i].mem_paddr <= mem_paddr; rvfi_instr_o[i].mem_wmask <= mem_q[commit_pointer[i]].lsu_wmask; - rvfi_instr_o[i].mem_wdata <= mem_q[commit_pointer[i]].lsu_wdata; + + // For AMO operations, compute the actual write value + // Note: AMO operations write a computed value to memory, not the original register value + if (is_amo(commit_instr_op[i])) begin + rvfi_instr_o[i].mem_wdata <= compute_amo_wdata( + commit_instr_op[i], // AMO operation type + wdata[i], // Old memory value (the value returned to rd) + mem_q[commit_pointer[i]].rs2_rdata // Register operand (rs2) + ); + end else begin + rvfi_instr_o[i].mem_wdata <= mem_q[commit_pointer[i]].lsu_wdata; + end + rvfi_instr_o[i].mem_rmask <= mem_q[commit_pointer[i]].lsu_rmask; rvfi_instr_o[i].mem_rdata <= commit_instr_result[i]; rvfi_instr_o[i].rs1_rdata <= mem_q[commit_pointer[i]].rs1_rdata; rvfi_instr_o[i].rs2_rdata <= mem_q[commit_pointer[i]].rs2_rdata; + rvfi_to_iti_o.branch_valid[i] <= mem_q[commit_pointer[i]].branch_valid; + rvfi_to_iti_o.is_taken[i] <= mem_q[commit_pointer[i]].is_taken; + rvfi_to_iti_o.is_compressed[i] <= mem_q[commit_pointer[i]].is_compressed; + rvfi_to_iti_o.valid[i] <= valid_iti[i]; + rvfi_to_iti_o.pc[i] <= pc_iti[i]; + rvfi_to_iti_o.op[i] <= op_iti[i]; end + rvfi_to_iti_o.ex_valid <= ex_commit_valid; + rvfi_to_iti_o.cycles <= time_iti; + rvfi_to_iti_o.cause <= ex_commit_cause; + rvfi_to_iti_o.tval <= tval_iti; + rvfi_to_iti_o.priv_lvl <= priv_lvl; end //---------------------------------------------------------------------------------------------------------- // CSR //---------------------------------------------------------------------------------------------------------- - - `define CONNECT_RVFI_FULL(CSR_ENABLE_COND, CSR_NAME, - CSR_SOURCE_NAME) \ - always_ff @(posedge clk_i) begin \ - if (CSR_ENABLE_COND) begin \ - rvfi_csr_o.``CSR_NAME``.rdata <= {{CVA6Cfg.XLEN - $bits(CSR_SOURCE_NAME)}, CSR_SOURCE_NAME}; \ - end \ - end \ - assign rvfi_csr_o.``CSR_NAME``.wdata = CSR_ENABLE_COND ? { {{CVA6Cfg.XLEN-$bits(CSR_SOURCE_NAME)}, CSR_SOURCE_NAME} } : 0; \ - assign rvfi_csr_o.``CSR_NAME``.rmask = CSR_ENABLE_COND ? 1 : 0; \ - assign rvfi_csr_o.``CSR_NAME``.wmask = (rvfi_csr_o.``CSR_NAME``.rdata != {{CVA6Cfg.XLEN - $bits(CSR_SOURCE_NAME)}, CSR_SOURCE_NAME}) && CSR_ENABLE_COND; - - `define COMMA , + // Changing verible formating to fix vivado synthesis errors and warnings + // verilog_format: off + `define CONNECT_RVFI_FULL(CSR_ENABLE_COND, CSR_NAME, CSR_SOURCE_NAME) \ + always_ff @(posedge clk_i) begin \ + if (CSR_ENABLE_COND) begin \ + rvfi_csr_o.``CSR_NAME``.rdata <= {{CVA6Cfg.XLEN - $bits(CSR_SOURCE_NAME)}, CSR_SOURCE_NAME}; \ + end \ + end \ + assign rvfi_csr_o.``CSR_NAME``.wdata = CSR_ENABLE_COND ? { {{CVA6Cfg.XLEN-$bits(CSR_SOURCE_NAME)}, CSR_SOURCE_NAME} } : 0; \ + assign rvfi_csr_o.``CSR_NAME``.rmask = CSR_ENABLE_COND ? 1 : 0; \ + assign rvfi_csr_o.``CSR_NAME``.wmask = (rvfi_csr_o.``CSR_NAME``.rdata != {{CVA6Cfg.XLEN - $bits(CSR_SOURCE_NAME)}, CSR_SOURCE_NAME}) && CSR_ENABLE_COND; `define CONNECT_RVFI_SAME(CSR_ENABLE_COND, CSR_NAME) \ - `CONNECT_RVFI_FULL(CSR_ENABLE_COND, CSR_NAME, csr.``CSR_NAME``_q) + `CONNECT_RVFI_FULL(CSR_ENABLE_COND, CSR_NAME, csr.``CSR_NAME``_q) - `CONNECT_RVFI_FULL(CVA6Cfg.FpPresent, fflags, csr.fcsr_q.fflags) - `CONNECT_RVFI_FULL(CVA6Cfg.FpPresent, frm, csr.fcsr_q.frm) - `CONNECT_RVFI_FULL(CVA6Cfg.FpPresent, fcsr, { csr.fcsr_q.frm `COMMA csr.fcsr_q.fflags}) + if ($bits(rvfi_csr_o) != 1) begin + `CONNECT_RVFI_FULL(CVA6Cfg.FpPresent, fflags, csr.fcsr_q.fflags) + `CONNECT_RVFI_FULL(CVA6Cfg.FpPresent, frm, csr.fcsr_q.frm) + `CONNECT_RVFI_FULL(CVA6Cfg.FpPresent, fcsr, {csr.fcsr_q.frm, csr.fcsr_q.fflags}) - `CONNECT_RVFI_FULL(CVA6Cfg.FpPresent, ftran, csr.fcsr_q.fprec) - `CONNECT_RVFI_SAME(CVA6Cfg.FpPresent, dcsr) + `CONNECT_RVFI_FULL(CVA6Cfg.FpPresent, ftran, csr.fcsr_q.fprec) + `CONNECT_RVFI_SAME(CVA6Cfg.FpPresent, dcsr) - `CONNECT_RVFI_SAME(CVA6Cfg.DebugEn, dpc) + `CONNECT_RVFI_SAME(CVA6Cfg.DebugEn, dpc) - `CONNECT_RVFI_SAME(CVA6Cfg.DebugEn, dscratch0) - `CONNECT_RVFI_SAME(CVA6Cfg.DebugEn, dscratch1) + `CONNECT_RVFI_SAME(CVA6Cfg.DebugEn, dscratch0) + `CONNECT_RVFI_SAME(CVA6Cfg.DebugEn, dscratch1) - `CONNECT_RVFI_FULL(CVA6Cfg.RVS, sstatus, - csr.mstatus_extended & SMODE_STATUS_READ_MASK[CVA6Cfg.XLEN-1:0]) + `CONNECT_RVFI_FULL(CVA6Cfg.RVS, sstatus, csr.mstatus_extended & SMODE_STATUS_READ_MASK[CVA6Cfg.XLEN-1:0]) - `CONNECT_RVFI_FULL(CVA6Cfg.RVS, sie, csr.mie_q & csr.mideleg_q) - `CONNECT_RVFI_FULL(CVA6Cfg.RVS, sip, csr.mip_q & csr.mideleg_q) + `CONNECT_RVFI_FULL(CVA6Cfg.RVS, sie, csr.mie_q & csr.mideleg_q) + `CONNECT_RVFI_FULL(CVA6Cfg.RVS, sip, csr.mip_q & csr.mideleg_q) - `CONNECT_RVFI_SAME(CVA6Cfg.RVS, stvec) + `CONNECT_RVFI_SAME(CVA6Cfg.RVS, stvec) - `CONNECT_RVFI_SAME(CVA6Cfg.RVS, scounteren) + `CONNECT_RVFI_SAME(CVA6Cfg.RVS, scounteren) - `CONNECT_RVFI_SAME(CVA6Cfg.RVS, sscratch) - `CONNECT_RVFI_SAME(CVA6Cfg.RVS, sepc) + `CONNECT_RVFI_SAME(CVA6Cfg.RVS, sscratch) + `CONNECT_RVFI_SAME(CVA6Cfg.RVS, sepc) - `CONNECT_RVFI_SAME(CVA6Cfg.RVS, scause) + `CONNECT_RVFI_SAME(CVA6Cfg.RVS, scause) - `CONNECT_RVFI_SAME(CVA6Cfg.RVS, stval) - `CONNECT_RVFI_SAME(CVA6Cfg.RVS, satp) + `CONNECT_RVFI_SAME(CVA6Cfg.RVS, stval) + `CONNECT_RVFI_SAME(CVA6Cfg.RVS, satp) - `CONNECT_RVFI_FULL(1'b1, mstatus, csr.mstatus_extended) + `CONNECT_RVFI_FULL(1'b1, mstatus, csr.mstatus_extended) - bit [31:0] mstatush_q; - `CONNECT_RVFI_FULL(1'b1, mstatush, mstatush_q) + bit [31:0] mstatush_q; + `CONNECT_RVFI_FULL(1'b1, mstatush, mstatush_q) - `CONNECT_RVFI_FULL(1'b1, misa, IsaCode) + `CONNECT_RVFI_FULL(1'b1, misa, IsaCode) - `CONNECT_RVFI_SAME(CVA6Cfg.RVS, medeleg) - `CONNECT_RVFI_SAME(CVA6Cfg.RVS, mideleg) + `CONNECT_RVFI_SAME(CVA6Cfg.RVS, medeleg) + `CONNECT_RVFI_SAME(CVA6Cfg.RVS, mideleg) - `CONNECT_RVFI_SAME(1'b1, mie) - `CONNECT_RVFI_SAME(1'b1, mtvec) - `CONNECT_RVFI_SAME(1'b1, mcounteren) + `CONNECT_RVFI_SAME(1'b1, mie) + `CONNECT_RVFI_SAME(1'b1, mtvec) + `CONNECT_RVFI_SAME(1'b1, mcounteren) - `CONNECT_RVFI_SAME(1'b1, mscratch) + `CONNECT_RVFI_SAME(1'b1, mscratch) - `CONNECT_RVFI_SAME(1'b1, mepc) - `CONNECT_RVFI_SAME(1'b1, mcause) - `CONNECT_RVFI_SAME(1'b1, mtval) - `CONNECT_RVFI_SAME(1'b1, mip) + `CONNECT_RVFI_SAME(1'b1, mepc) + `CONNECT_RVFI_SAME(1'b1, mcause) + `CONNECT_RVFI_SAME(1'b1, mtval) + `CONNECT_RVFI_SAME(1'b1, mip) - `CONNECT_RVFI_FULL(1'b1, menvcfg, csr.fiom_q) + `CONNECT_RVFI_FULL(1'b1, menvcfg, csr.fiom_q) - `CONNECT_RVFI_FULL(CVA6Cfg.XLEN == 32, menvcfgh, 32'h0) + `CONNECT_RVFI_FULL(CVA6Cfg.IS_XLEN32, menvcfgh, 32'h0) - `CONNECT_RVFI_FULL(1'b1, mvendorid, OPENHWGROUP_MVENDORID) - `CONNECT_RVFI_FULL(1'b1, marchid, ARIANE_MARCHID) - `CONNECT_RVFI_FULL(1'b1, mhartid, hart_id_i) + `CONNECT_RVFI_FULL(1'b1, mvendorid, OPENHWGROUP_MVENDORID) + `CONNECT_RVFI_FULL(1'b1, marchid, ARIANE_MARCHID) + `CONNECT_RVFI_FULL(1'b1, mhartid, hart_id_i) - `CONNECT_RVFI_SAME(1'b1, mcountinhibit) + `CONNECT_RVFI_SAME(1'b1, mcountinhibit) - `CONNECT_RVFI_FULL(1'b1, mcycle, csr.cycle_q[CVA6Cfg.XLEN-1:0]) - `CONNECT_RVFI_FULL(CVA6Cfg.XLEN == 32, mcycleh, csr.cycle_q[63:32]) + `CONNECT_RVFI_FULL(1'b1, mcycle, csr.cycle_q[CVA6Cfg.XLEN-1:0]) + `CONNECT_RVFI_FULL(CVA6Cfg.IS_XLEN32, mcycleh, csr.cycle_q[63:32]) - `CONNECT_RVFI_FULL(1'b1, minstret, csr.instret_q[CVA6Cfg.XLEN-1:0]) - `CONNECT_RVFI_FULL(CVA6Cfg.XLEN == 32, minstreth, csr.instret_q[63:32]) + `CONNECT_RVFI_FULL(1'b1, minstret, csr.instret_q[CVA6Cfg.XLEN-1:0]) + `CONNECT_RVFI_FULL(CVA6Cfg.IS_XLEN32, minstreth, csr.instret_q[63:32]) - `CONNECT_RVFI_FULL(1'b1, cycle, csr.cycle_q[CVA6Cfg.XLEN-1:0]) - `CONNECT_RVFI_FULL(CVA6Cfg.XLEN == 32, cycleh, csr.cycle_q[63:32]) + `CONNECT_RVFI_FULL(1'b1, cycle, csr.cycle_q[CVA6Cfg.XLEN-1:0]) + `CONNECT_RVFI_FULL(CVA6Cfg.IS_XLEN32, cycleh, csr.cycle_q[63:32]) - `CONNECT_RVFI_FULL(1'b1, instret, csr.instret_q[CVA6Cfg.XLEN-1:0]) - `CONNECT_RVFI_FULL(CVA6Cfg.XLEN == 32, instreth, csr.instret_q[63:32]) + `CONNECT_RVFI_FULL(1'b1, instret, csr.instret_q[CVA6Cfg.XLEN-1:0]) + `CONNECT_RVFI_FULL(CVA6Cfg.IS_XLEN32, instreth, csr.instret_q[63:32]) - `CONNECT_RVFI_SAME(1'b1, dcache) - `CONNECT_RVFI_SAME(1'b1, icache) + `CONNECT_RVFI_SAME(1'b1, dcache) + `CONNECT_RVFI_SAME(1'b1, icache) - `CONNECT_RVFI_SAME(CVA6Cfg.EnableAccelerator, acc_cons) - `CONNECT_RVFI_SAME(CVA6Cfg.RVZCMT, jvt) - `CONNECT_RVFI_FULL(1'b1, pmpcfg0, csr.pmpcfg_q[CVA6Cfg.XLEN/8-1:0]) - `CONNECT_RVFI_FULL(CVA6Cfg.XLEN == 32, pmpcfg1, csr.pmpcfg_q[7:4]) + `CONNECT_RVFI_SAME(CVA6Cfg.EnableAccelerator, acc_cons) + `CONNECT_RVFI_SAME(CVA6Cfg.RVZCMT, jvt) + `CONNECT_RVFI_FULL(1'b1, pmpcfg0, csr.pmpcfg_q[CVA6Cfg.XLEN/8-1:0]) + `CONNECT_RVFI_FULL(CVA6Cfg.IS_XLEN32, pmpcfg1, csr.pmpcfg_q[7:4]) - `CONNECT_RVFI_FULL(1'b1, pmpcfg2, csr.pmpcfg_q[8+:CVA6Cfg.XLEN/8]) - `CONNECT_RVFI_FULL(CVA6Cfg.XLEN == 32, pmpcfg3, csr.pmpcfg_q[15:12]) + `CONNECT_RVFI_FULL(1'b1, pmpcfg2, csr.pmpcfg_q[8+:CVA6Cfg.XLEN/8]) + `CONNECT_RVFI_FULL(CVA6Cfg.IS_XLEN32, pmpcfg3, csr.pmpcfg_q[15:12]) - bit [CVA6Cfg.XLEN-1:0] pmpaddr_q; - genvar i; - generate + bit [CVA6Cfg.XLEN-1:0] pmpaddr_q; + genvar i; for (i = 0; i < 16; i++) begin - `CONNECT_RVFI_FULL(1'b1, pmpaddr[i], csr.pmpaddr_q[i][CVA6Cfg.PLEN-3:0]) + `CONNECT_RVFI_FULL(1'b1, pmpaddr[i], {csr.pmpaddr_q[i][CVA6Cfg.PLEN-3:1], pmpcfg_q[i].addr_mode[1]}) end - endgenerate - ; - + ; + end + // verilog_format: on endmodule diff --git a/core/cva6_rvfi_probes.sv b/core/cva6_rvfi_probes.sv index 34b865d8d96..fabe18c903d 100644 --- a/core/cva6_rvfi_probes.sv +++ b/core/cva6_rvfi_probes.sv @@ -16,6 +16,7 @@ module cva6_rvfi_probes parameter type exception_t = logic, parameter type scoreboard_entry_t = logic, parameter type lsu_ctrl_t = logic, + parameter type bp_resolve_t = logic, parameter type rvfi_probes_instr_t = logic, parameter type rvfi_probes_csr_t = logic, parameter type rvfi_probes_t = logic @@ -52,6 +53,8 @@ module cva6_rvfi_probes input rvfi_probes_csr_t csr_i, input logic [1:0] irq_i, + input bp_resolve_t resolved_branch_i, + input [CVA6Cfg.TRANS_ID_BITS-1:0] flu_trans_id_ex_id_i, output rvfi_probes_t rvfi_probes_o ); @@ -81,6 +84,11 @@ module cva6_rvfi_probes instr.ex_commit_cause = ex_commit_i.cause; instr.ex_commit_valid = ex_commit_i.valid; + if (CVA6Cfg.TvalEn) begin + instr.tval = ex_commit_i.tval; + end else begin + instr.tval = '0; + end instr.priv_lvl = priv_lvl_i; @@ -109,6 +117,10 @@ module cva6_rvfi_probes instr.commit_ack = commit_ack_i; instr.wdata = wdata_i; + instr.branch_valid = resolved_branch_i.valid; + instr.is_taken = resolved_branch_i.is_taken; + instr.branch_trans_id = flu_trans_id_ex_id_i; + csr = csr_i; csr.mip_q = csr_i.mip_q | ({{CVA6Cfg.XLEN - 1{1'b0}}, CVA6Cfg.RVS && irq_i[1]} << riscv::IRQ_S_EXT); diff --git a/core/cvfpu b/core/cvfpu index 3116391bf66..3eb6afeab2c 160000 --- a/core/cvfpu +++ b/core/cvfpu @@ -1 +1 @@ -Subproject commit 3116391bf66660f806b45e212b9949c528b4e270 +Subproject commit 3eb6afeab2cb33f7d8689222955d0171aeb3a801 diff --git a/core/cvxif_fu.sv b/core/cvxif_fu.sv index cf6ee152156..c0186fdc7b9 100644 --- a/core/cvxif_fu.sv +++ b/core/cvxif_fu.sv @@ -22,6 +22,8 @@ module cvxif_fu input logic clk_i, // Asynchronous reset active low - SUBSYSTEM input logic rst_ni, + // Virtualization mode state - CSR_REGFILE + input logic v_i, // CVXIF instruction is valid - ISSUE_STAGE input logic x_valid_i, // Transaction ID - ISSUE_STAGE @@ -54,7 +56,7 @@ module cvxif_fu assign result_ready_o = 1'b1; - assign x_ready_o = 1'b1; // Readyness of cvxif_fu is determined in issue stage by CVXIF issue interface + assign x_ready_o = 1'b1; // Readiness of cvxif_fu is determined in issue stage by CVXIF issue interface // Result signals assign x_valid_o = x_illegal_i || result_valid_i; assign x_result_o = result_i.data; @@ -68,6 +70,10 @@ module cvxif_fu x_exception_o.cause = x_illegal_i ? riscv::ILLEGAL_INSTR : '0; if (CVA6Cfg.TvalEn) x_exception_o.tval = x_off_instr_i; // TODO Optimization : Set exception in IRO. + // Hypervisor exception fields + x_exception_o.tval2 = {CVA6Cfg.GPLEN{1'b0}}; + x_exception_o.tinst = '0; + x_exception_o.gva = 1'b0; end endmodule diff --git a/core/cvxif_issue_register_commit_if_driver.sv b/core/cvxif_issue_register_commit_if_driver.sv index 88efc0002d0..be720a4a5a3 100644 --- a/core/cvxif_issue_register_commit_if_driver.sv +++ b/core/cvxif_issue_register_commit_if_driver.sv @@ -38,8 +38,8 @@ module cvxif_issue_register_commit_if_driver #( input [(CVA6Cfg.NrRgprPorts/CVA6Cfg.NrIssuePorts)-1:0][CVA6Cfg.XLEN-1:0] register_i, input logic [(CVA6Cfg.NrRgprPorts/CVA6Cfg.NrIssuePorts)-1:0] rs_valid_i ); - // X_ISSUE_REGISTER_SPLIT = 0 : Issue and register transactions are synchrone - // Mandatory assignement + // X_ISSUE_REGISTER_SPLIT = 0 : Issue and register transactions are synchronous + // Mandatory assignment assign register_valid_o = issue_valid_o; assign register_o.hartid = issue_req_o.hartid; assign register_o.id = issue_req_o.id; diff --git a/core/decoder.sv b/core/decoder.sv index de52e7f2325..eed632cb558 100644 --- a/core/decoder.sv +++ b/core/decoder.sv @@ -54,7 +54,7 @@ module decoder input logic [CVA6Cfg.XLEN-1:0] jump_address_i, // Is a branch predict instruction - FRONTEND input branchpredict_sbe_t branch_predict_i, - // If an exception occured in fetch stage - FRONTEND + // If an exception occurred in fetch stage - FRONTEND input exception_t ex_i, // Level sensitive (async) interrupts - SUBSYSTEM input logic [1:0] irq_i, @@ -84,12 +84,26 @@ module decoder input logic tsr_i, // Hypervisor user mode - CSR_REGFILE input logic hu_i, + // machine-mode cache block invalidate enable - CSR_REGFILE + input riscv::cbie_t mcbie_i, + // supervisor-mode cache block invalidate enable - CSR_REGFILE + input riscv::cbie_t scbie_i, + // hypervisor-mode cache block invalidate enable - CSR_REGFILE + input riscv::cbie_t hcbie_i, + // machine-mode clean/flush cache block invalidate enable - CSR_REGFILE + input logic mcbcfe_i, + // supervisor-mode clean/flush cache block invalidate enable - CSR_REGFILE + input logic scbcfe_i, + // hypervisor-mode clean/flush cache block invalidate enable - CSR_REGFILE + input logic hcbcfe_i, // Instruction to be added to scoreboard entry - ISSUE_STAGE output scoreboard_entry_t instruction_o, // Instruction - ISSUE_STAGE output logic [31:0] orig_instr_o, // Is a control flow instruction - ISSUE_STAGE - output logic is_control_flow_instr_o + output logic is_control_flow_instr_o, + // Exception request - TRIGGER MODULE + input logic [CVA6Cfg.XLEN-1:0] sdtrig_decoder_action_i ); logic illegal_instr; logic illegal_instr_bm; @@ -186,6 +200,7 @@ module decoder ecall = 1'b0; ebreak = 1'b0; check_fprm = 1'b0; + tinst = 32'h0; if (~ex_i.valid) begin case (instr.rtype.opcode) @@ -197,7 +212,7 @@ module decoder unique case (instr.itype.funct3) 3'b000: begin - // check if the RD and and RS1 fields are zero, this may be reset for the SENCE.VMA instruction + // check if the RD and and RS1 fields are zero, this may be reset for the SFENCE.VMA instruction if (instr.itype.rs1 != '0 || instr.itype.rd != '0) begin if (CVA6Cfg.RVH && v_i) begin virtual_illegal_instr = 1'b1; @@ -205,7 +220,7 @@ module decoder illegal_instr = 1'b1; end end - // decode the immiediate field + // decode the immediate field case (instr.itype.imm) // ECALL -> inject exception 12'b0: ecall = 1'b1; @@ -286,6 +301,7 @@ module decoder // only if S mode is supported // otherwise decode an illegal instruction if (CVA6Cfg.RVH && v_i) begin + illegal_instr = (instr.itype.rd == '0) ? illegal_instr : 1'b1; virtual_illegal_instr = (priv_lvl_i == riscv::PRIV_LVL_S) ? 1'b0 : 1'b1; end else begin illegal_instr = (CVA6Cfg.RVS && (priv_lvl_i inside {riscv::PRIV_LVL_M, riscv::PRIV_LVL_S}) && instr.itype.rd == '0) ? 1'b0 : 1'b1; @@ -303,7 +319,7 @@ module decoder if (v_i) begin virtual_illegal_instr = 1'b1; end else begin - illegal_instr = (priv_lvl_i inside {riscv::PRIV_LVL_M, riscv::PRIV_LVL_S}) ? 1'b0 : 1'b1; + illegal_instr = ((priv_lvl_i inside {riscv::PRIV_LVL_M, riscv::PRIV_LVL_S}) && instr.itype.rd == '0) ? 1'b0 : 1'b1; end instruction_o.op = ariane_pkg::HFENCE_VVMA; end else if (instr.instr[31:25] == 7'b110001) begin @@ -312,7 +328,7 @@ module decoder if (v_i) begin virtual_illegal_instr = 1'b1; end else begin - illegal_instr = (priv_lvl_i inside {riscv::PRIV_LVL_M, riscv::PRIV_LVL_S}) ? 1'b0 : 1'b1; + illegal_instr = ((priv_lvl_i inside {riscv::PRIV_LVL_M, riscv::PRIV_LVL_S}) && instr.itype.rd == '0) ? 1'b0 : 1'b1; end instruction_o.op = ariane_pkg::HFENCE_GVMA; // check TVM flag and intercept HFENCE.GVMA call if necessary @@ -454,6 +470,85 @@ module decoder 3'b000: instruction_o.op = ariane_pkg::FENCE; // FENCE.I 3'b001: instruction_o.op = ariane_pkg::FENCE_I; + // CBO - optional + 3'b010: begin + if (CVA6Cfg.RVZiCbom) begin + instruction_o.fu = STORE; + instruction_o.rs1[4:0] = instr.itype.rs1; + // not used - zero + instruction_o.rs2[4:0] = '0; + unique case (instr.itype.imm) + // CBO.INVAL + 12'b000000000000: instruction_o.op = ariane_pkg::CBO_INVAL; + // CBO.CLEAN + 12'b000000000001: instruction_o.op = ariane_pkg::CBO_CLEAN; + // CBO.FLUSH + 12'b000000000010: instruction_o.op = ariane_pkg::CBO_FLUSH; + default: illegal_instr = 1'b1; + endcase + + if (instruction_o.op == ariane_pkg::CBO_INVAL) begin + // CBO.INVAL permission checks + if ((priv_lvl_i != riscv::PRIV_LVL_M && + mcbie_i == riscv::CBIE_ILLEGAL) || + (!v_i && CVA6Cfg.RVU && + priv_lvl_i == riscv::PRIV_LVL_U && + scbie_i == riscv::CBIE_ILLEGAL)) begin + illegal_instr = 1'b1; + end else if ( + CVA6Cfg.RVH && v_i && + ((priv_lvl_i == riscv::PRIV_LVL_S && + hcbie_i == riscv::CBIE_ILLEGAL) || + (priv_lvl_i == riscv::PRIV_LVL_U && + (hcbie_i == riscv::CBIE_ILLEGAL || + scbie_i == riscv::CBIE_ILLEGAL)))) begin + virtual_illegal_instr = 1'b1; + end else if ( + (priv_lvl_i != riscv::PRIV_LVL_M && + mcbie_i == riscv::CBIE_FLUSH) || + (!v_i && CVA6Cfg.RVU && + priv_lvl_i == riscv::PRIV_LVL_U && + scbie_i == riscv::CBIE_FLUSH) || + (CVA6Cfg.RVH && v_i && + ((priv_lvl_i == riscv::PRIV_LVL_S && + hcbie_i == riscv::CBIE_FLUSH) || + (priv_lvl_i == riscv::PRIV_LVL_U && + (hcbie_i == riscv::CBIE_FLUSH || + scbie_i == riscv::CBIE_FLUSH))))) begin + // Execute CBO.INVAL as a flush. + instruction_o.op = ariane_pkg::CBO_FLUSH; + end + end + + // CBCFE controls genuine CBO.CLEAN/CBO.FLUSH instructions. + // An original CBO.INVAL remains governed by CBIE even when + // CBIE makes the operation perform a flush. + if ((instruction_o.op inside { + ariane_pkg::CBO_CLEAN, ariane_pkg::CBO_FLUSH + }) && instr.itype.imm != 12'b000000000000) begin + if ((priv_lvl_i != riscv::PRIV_LVL_M && !mcbcfe_i) || + (!v_i && CVA6Cfg.RVU && + priv_lvl_i == riscv::PRIV_LVL_U && !scbcfe_i)) begin + illegal_instr = 1'b1; + end else if ( + CVA6Cfg.RVH && v_i && + ((priv_lvl_i == riscv::PRIV_LVL_S && !hcbcfe_i) || + (priv_lvl_i == riscv::PRIV_LVL_U && + !(hcbcfe_i && scbcfe_i)))) begin + virtual_illegal_instr = 1'b1; + end + end + end else begin + illegal_instr = 1'b1; + end + + if (CVA6Cfg.RVH) begin + tinst = { + instr.itype.imm, 5'b00000, instr.stype.funct3, 5'b00000, instr.stype.opcode + }; + end + end + default: illegal_instr = 1'b1; endcase @@ -466,7 +561,7 @@ module decoder // -------------------------------------------- // Vectorial Floating-Point Reg-Reg Operations // -------------------------------------------- - if (instr.rvftype.funct2 == 2'b10) begin // Prefix 10 for all Xfvec ops + if (!CVA6Cfg.ZKN && instr.rvftype.funct2 == 2'b10) begin // Prefix 10 for all Xfvec ops // only generate decoder if FP extensions are enabled (static) if (CVA6Cfg.FpPresent && CVA6Cfg.XFVec && fs_i != riscv::Off && ((CVA6Cfg.RVH && (!v_i || vfs_i != riscv::Off)) || !CVA6Cfg.RVH)) begin automatic logic allow_replication; // control honoring of replication flag @@ -537,7 +632,7 @@ module decoder 5'b001??: begin instruction_o.op = ariane_pkg::FCVT_F2F; // vfcvt.vfmt.vfmt - Vectorial FP to FP Conversion instruction_o.rs2 = instr.rvftype.rd; // set rs2 = rd as target vector for conversion - imm_select = IIMM; // rs2 holds part of the intruction + imm_select = IIMM; // rs2 holds part of the instruction // TODO CHECK R bit for valid fmt combinations // determine source format unique case (instr.rvftype.rs2[21:20]) @@ -787,6 +882,18 @@ module decoder if (CVA6Cfg.ZKN) instruction_o.op = ariane_pkg::PACK_H; //packh else illegal_instr_bm = 1'b1; end + { + 7'b001_0100, 3'b100 + } : begin + if (CVA6Cfg.ZKN) instruction_o.op = ariane_pkg::XPERM8; // xperm8 + else illegal_instr_bm = 1'b1; + end + { + 7'b001_0100, 3'b010 + } : begin + if (CVA6Cfg.ZKN) instruction_o.op = ariane_pkg::XPERM4; // xperm4 + else illegal_instr_bm = 1'b1; + end // Zero Extend Op RV32 encoding { 7'b000_0100, 3'b100 @@ -796,6 +903,150 @@ module decoder else if (CVA6Cfg.ZKN) instruction_o.op = ariane_pkg::PACK; // pack else illegal_instr_bm = 1'b1; end + { + 7'b001_1001, 3'b000 + } : begin + if (CVA6Cfg.ZKN) begin + instruction_o.op = ariane_pkg::AES64ES; // aes64es + instruction_o.fu = AES; + end else illegal_instr_bm = 1'b1; + end + { + 7'b001_1011, 3'b000 + } : begin + if (CVA6Cfg.ZKN) begin + instruction_o.op = ariane_pkg::AES64ESM; // aes64esm + instruction_o.fu = AES; + end else illegal_instr_bm = 1'b1; + end + { + 7'b011_1111, 3'b000 + } : begin + if (CVA6Cfg.ZKN) begin + instruction_o.op = ariane_pkg::AES64KS2; // aes64ks2 + instruction_o.fu = AES; + end else illegal_instr_bm = 1'b1; + end + { + 7'b0010001, 3'b000 + }, { + 7'b0110001, 3'b000 + }, { + 7'b1010001, 3'b000 + }, { + 7'b1110001, 3'b000 + } : begin + if (CVA6Cfg.ZKN) begin + instruction_o.op = ariane_pkg::AES32ESI; // aes32esi + instruction_o.fu = AES; + end else illegal_instr_bm = 1'b1; + end + { + 7'b0010011, 3'b000 + }, { + 7'b0110011, 3'b000 + }, { + 7'b1010011, 3'b000 + }, { + 7'b1110011, 3'b000 + } : begin + if (CVA6Cfg.ZKN) begin + instruction_o.op = ariane_pkg::AES32ESMI; // aes32esmi + instruction_o.fu = AES; + end else illegal_instr_bm = 1'b1; + end + { + 7'b0010101, 3'b000 + }, { + 7'b0110101, 3'b000 + }, { + 7'b1010101, 3'b000 + }, { + 7'b1110101, 3'b000 + } : begin + if (CVA6Cfg.ZKN) begin + instruction_o.op = ariane_pkg::AES32DSI; // aes32dsi + instruction_o.fu = AES; + end else illegal_instr_bm = 1'b1; + end + { + 7'b0010111, 3'b000 + }, { + 7'b0110111, 3'b000 + }, { + 7'b1010111, 3'b000 + }, { + 7'b1110111, 3'b000 + } : begin + if (CVA6Cfg.ZKN) begin + instruction_o.op = ariane_pkg::AES32DSMI; // aes32dsmi + instruction_o.fu = AES; + end else illegal_instr_bm = 1'b1; + end + { + 7'b001_1101, 3'b000 + } : begin + if (CVA6Cfg.ZKN) begin + instruction_o.op = ariane_pkg::AES64DS; // aes64ds + instruction_o.fu = AES; + end else illegal_instr_bm = 1'b1; + end + { + 7'b001_1111, 3'b000 + } : begin + if (CVA6Cfg.ZKN) begin + instruction_o.op = ariane_pkg::AES64DSM; // aes64dsm + instruction_o.fu = AES; + end else illegal_instr_bm = 1'b1; + end + { + 7'b010_1110, 3'b000 + } : begin + if (CVA6Cfg.ZKN) begin + instruction_o.op = ariane_pkg::SHA512SIG0H; // sha512sig0h + instruction_o.fu = AES; + end else illegal_instr_bm = 1'b1; + end + { + 7'b010_1010, 3'b000 + } : begin + if (CVA6Cfg.ZKN) begin + instruction_o.op = ariane_pkg::SHA512SIG0L; // sha512sig0l + instruction_o.fu = AES; + end else illegal_instr_bm = 1'b1; + end + { + 7'b010_1111, 3'b000 + } : begin + if (CVA6Cfg.ZKN) begin + instruction_o.op = ariane_pkg::SHA512SIG1H; // sha512sig1h + instruction_o.fu = AES; + end else illegal_instr_bm = 1'b1; + end + { + 7'b010_1011, 3'b000 + } : begin + if (CVA6Cfg.ZKN) begin + instruction_o.op = ariane_pkg::SHA512SIG1L; // sha512sig1l + instruction_o.fu = AES; + end else illegal_instr_bm = 1'b1; + end + { + 7'b010_1000, 3'b000 + } : begin + if (CVA6Cfg.ZKN) begin + instruction_o.op = ariane_pkg::SHA512SUM0R; // sha512sum0r + instruction_o.fu = AES; + end else illegal_instr_bm = 1'b1; + end + { + 7'b010_1001, 3'b000 + } : begin + if (CVA6Cfg.ZKN) begin + instruction_o.op = ariane_pkg::SHA512SUM1R; // sha512sum1r + instruction_o.fu = AES; + end else illegal_instr_bm = 1'b1; + end default: begin illegal_instr_bm = 1'b1; end @@ -900,7 +1151,7 @@ module decoder 3'b001: begin instruction_o.op = ariane_pkg::SLL; // Shift Left Logical by Immediate if (instr.instr[31:26] != 6'b0) illegal_instr_non_bm = 1'b1; - if (instr.instr[25] != 1'b0 && CVA6Cfg.XLEN == 32) illegal_instr_non_bm = 1'b1; + if (instr.instr[25] != 1'b0 && CVA6Cfg.IS_XLEN32) illegal_instr_non_bm = 1'b1; end 3'b101: begin @@ -909,7 +1160,7 @@ module decoder else if (instr.instr[31:26] == 6'b010_000) instruction_o.op = ariane_pkg::SRA; // Shift Right Arithmetically by Immediate else illegal_instr_non_bm = 1'b1; - if (instr.instr[25] != 1'b0 && CVA6Cfg.XLEN == 32) illegal_instr_non_bm = 1'b1; + if (instr.instr[25] != 1'b0 && CVA6Cfg.IS_XLEN32) illegal_instr_non_bm = 1'b1; end endcase if (CVA6Cfg.RVB) begin @@ -934,9 +1185,39 @@ module decoder instruction_o.op = ariane_pkg::BSETI; else if (CVA6Cfg.IS_XLEN32 && instr.instr[31:25] == 7'b0010100) instruction_o.op = ariane_pkg::BSETI; - else if (CVA6Cfg.ZKN && instr.instr[31:20] == 12'b000010001111) + else if (CVA6Cfg.ZKN && CVA6Cfg.IS_XLEN32 && instr.instr[31:20] == 12'b000010001111) instruction_o.op = ariane_pkg::ZIP; - else illegal_instr_bm = 1'b1; + else if (CVA6Cfg.ZKN && instr.instr[31:24] == 8'b00110001) begin + instruction_o.op = ariane_pkg::AES64KS1I; + instruction_o.fu = AES; + end else if (CVA6Cfg.ZKN && instr.instr[31:20] == 12'b001100000000) begin + instruction_o.op = ariane_pkg::AES64IM; + instruction_o.fu = AES; + end else if (CVA6Cfg.ZKN && instr.instr[31:20] == 12'b000100000010) begin + instruction_o.op = ariane_pkg::SHA256SIG0; + instruction_o.fu = AES; + end else if (CVA6Cfg.ZKN && instr.instr[31:20] == 12'b000100000011) begin + instruction_o.op = ariane_pkg::SHA256SIG1; + instruction_o.fu = AES; + end else if (CVA6Cfg.ZKN && instr.instr[31:20] == 12'b000100000000) begin + instruction_o.op = ariane_pkg::SHA256SUM0; + instruction_o.fu = AES; + end else if (CVA6Cfg.ZKN && instr.instr[31:20] == 12'b000100000001) begin + instruction_o.op = ariane_pkg::SHA256SUM1; + instruction_o.fu = AES; + end else if (CVA6Cfg.ZKN && instr.instr[31:20] == 12'b000100000110) begin + instruction_o.op = ariane_pkg::SHA512SIG0; + instruction_o.fu = AES; + end else if (CVA6Cfg.ZKN && instr.instr[31:20] == 12'b000100000111) begin + instruction_o.op = ariane_pkg::SHA512SIG1; + instruction_o.fu = AES; + end else if (CVA6Cfg.ZKN && instr.instr[31:20] == 12'b000100000100) begin + instruction_o.op = ariane_pkg::SHA512SUM0; + instruction_o.fu = AES; + end else if (CVA6Cfg.ZKN && instr.instr[31:20] == 12'b000100000101) begin + instruction_o.op = ariane_pkg::SHA512SUM1; + instruction_o.fu = AES; + end else illegal_instr_bm = 1'b1; end 3'b101: begin if (instr.instr[31:20] == 12'b001010000111) instruction_o.op = ariane_pkg::ORCB; @@ -954,7 +1235,7 @@ module decoder instruction_o.op = ariane_pkg::RORI; else if (CVA6Cfg.ZKN && instr.instr[31:20] == 12'b011010000111) instruction_o.op = ariane_pkg::BREV8; - else if (CVA6Cfg.ZKN && instr.instr[31:20] == 12'b000010001111) + else if (CVA6Cfg.ZKN && CVA6Cfg.IS_XLEN32 && instr.instr[31:20] == 12'b000010001111) instruction_o.op = ariane_pkg::UNZIP; else illegal_instr_bm = 1'b1; end @@ -994,9 +1275,9 @@ module decoder unique case (instr.itype.funct3) 3'b001: begin if (instr.instr[31:25] == 7'b0110000) begin - if (instr.instr[21:20] == 2'b10) instruction_o.op = ariane_pkg::CPOPW; - else if (instr.instr[21:20] == 2'b00) instruction_o.op = ariane_pkg::CLZW; - else if (instr.instr[21:20] == 2'b01) instruction_o.op = ariane_pkg::CTZW; + if (instr.instr[24:20] == 5'b00010) instruction_o.op = ariane_pkg::CPOPW; + else if (instr.instr[24:20] == 5'b00000) instruction_o.op = ariane_pkg::CLZW; + else if (instr.instr[24:20] == 5'b00001) instruction_o.op = ariane_pkg::CTZW; else illegal_instr_bm = 1'b1; end else if (instr.instr[31:26] == 6'b000010) begin instruction_o.op = ariane_pkg::SLLIUW; // Shift Left Logic by Immediate (Unsigned Word) @@ -1029,7 +1310,7 @@ module decoder 3'b001: instruction_o.op = ariane_pkg::SH; 3'b010: instruction_o.op = ariane_pkg::SW; 3'b011: - if (CVA6Cfg.XLEN == 64) instruction_o.op = ariane_pkg::SD; + if (CVA6Cfg.IS_XLEN64) instruction_o.op = ariane_pkg::SD; else illegal_instr = 1'b1; default: illegal_instr = 1'b1; endcase @@ -1052,10 +1333,10 @@ module decoder 3'b100: instruction_o.op = ariane_pkg::LBU; 3'b101: instruction_o.op = ariane_pkg::LHU; 3'b110: - if (CVA6Cfg.XLEN == 64) instruction_o.op = ariane_pkg::LWU; + if (CVA6Cfg.IS_XLEN64) instruction_o.op = ariane_pkg::LWU; else illegal_instr = 1'b1; 3'b011: - if (CVA6Cfg.XLEN == 64) instruction_o.op = ariane_pkg::LD; + if (CVA6Cfg.IS_XLEN64) instruction_o.op = ariane_pkg::LD; else illegal_instr = 1'b1; default: illegal_instr = 1'b1; endcase @@ -1164,7 +1445,7 @@ module decoder if (check_fprm) begin unique case (instr.rftype.rm) inside [3'b000 : 3'b100]: ; //legal rounding modes - 3'b101: begin // Alternative Half-Precsision encded as fmt=10 and rm=101 + 3'b101: begin // Alternative Half-Precision encoded as fmt=10 and rm=101 if (~CVA6Cfg.XF16ALT || instr.rftype.fmt != 2'b10) illegal_instr = 1'b1; unique case (frm_i) inside // actual rounding mode from frm csr [3'b000 : 3'b100]: ; //legal rounding modes @@ -1237,7 +1518,7 @@ module decoder 5'b01000: begin instruction_o.op = ariane_pkg::FCVT_F2F; // fcvt.fmt.fmt - FP to FP Conversion instruction_o.rs2 = instr.rvftype.rs1; // tie rs2 to rs1 to be safe (vectors use rs2) - imm_select = IIMM; // rs2 holds part of the intruction + imm_select = IIMM; // rs2 holds part of the instruction if (|instr.rftype.rs2[24:23]) illegal_instr = 1'b1; // bits [22:20] used, other bits must be 0 // check source format @@ -1266,12 +1547,14 @@ module decoder imm_select = IIMM; // rs2 holds part of the instruction if (|instr.rftype.rs2[24:22]) illegal_instr = 1'b1; // bits [21:20] used, other bits must be 0 + if (CVA6Cfg.IS_XLEN32 && instr.rftype.rs2[21]) illegal_instr = 1'b1; end 5'b11010: begin instruction_o.op = ariane_pkg::FCVT_I2F; // fcvt.fmt.ifmt - Int to FP Conversion imm_select = IIMM; // rs2 holds part of the instruction if (|instr.rftype.rs2[24:22]) illegal_instr = 1'b1; // bits [21:20] used, other bits must be 0 + if (CVA6Cfg.IS_XLEN32 && instr.rftype.rs2[21]) illegal_instr = 1'b1; end 5'b11100: begin instruction_o.rs2 = instr.rftype.rs1; // set rs2 = rs1 so we can map FMV to SGNJ in the unit @@ -1310,7 +1593,7 @@ module decoder if (check_fprm) begin unique case (instr.rftype.rm) inside [3'b000 : 3'b100]: ; //legal rounding modes - 3'b101: begin // Alternative Half-Precsision encded as fmt=10 and rm=101 + 3'b101: begin // Alternative Half-Precision encoded as fmt=10 and rm=101 if (~CVA6Cfg.XF16ALT || instr.rftype.fmt != 2'b10) illegal_instr = 1'b1; unique case (frm_i) inside // actual rounding mode from frm csr [3'b000 : 3'b100]: ; //legal rounding modes @@ -1505,7 +1788,7 @@ module decoder imm_u_type = { {CVA6Cfg.XLEN - 32{instruction_i[31]}}, instruction_i[31:12], 12'b0 }; // JAL, AUIPC, sign extended to 64 bit - // if zcmt then xlen jump address assign to immidiate + // if zcmt then xlen jump address assign to immediate if (CVA6Cfg.RVZCMT && is_zcmt_i) begin imm_uj_type = {{CVA6Cfg.XLEN - 32{jump_address_i[31]}}, jump_address_i[31:0]}; end else begin @@ -1577,12 +1860,23 @@ module decoder interrupt_cause = '0; instruction_o.ex = ex_i; orig_instr_o = '0; - // look if we didn't already get an exception in any previous - // stage - we should not overwrite it as we retain order regarding the exception - if (~ex_i.valid) begin + + if ((CVA6Cfg.SdtrigMcontrol6ExecAddr || CVA6Cfg.SdtrigMcontrol6ExecData) && (sdtrig_decoder_action_i != '0)) begin + // this exception is valid + instruction_o.ex.valid = 1'b1; + // set cause + instruction_o.ex.cause = sdtrig_decoder_action_i; + // set tval + instruction_o.ex.tval = (CVA6Cfg.TvalEn) ? instruction_o.pc : '0; + // set gva bit + if (CVA6Cfg.RVH) instruction_o.ex.gva = v_i; + else instruction_o.ex.gva = 1'b0; + end // look if we didn't already get an exception in any previous + // stage - we should not overwrite it as we retain order regarding the exception + else if (~ex_i.valid) begin // if we didn't already get an exception save the instruction here as we may need it // in the commit stage if we got a access exception to one of the CSR registers - if (CVA6Cfg.CvxifEn || CVA6Cfg.RVF) + if (CVA6Cfg.CvxifEn || CVA6Cfg.RVF || CVA6Cfg.ZKN) orig_instr_o = (is_compressed_i) ? {{CVA6Cfg.XLEN-16{1'b0}}, compressed_instr_i} : {{CVA6Cfg.XLEN-32{1'b0}}, instruction_i}; if (CVA6Cfg.TvalEn) instruction_o.ex.tval = (is_compressed_i) ? {{CVA6Cfg.XLEN-16{1'b0}}, compressed_instr_i} : {{CVA6Cfg.XLEN-32{1'b0}}, instruction_i}; @@ -1613,6 +1907,7 @@ module decoder end else if (priv_lvl_i == riscv::PRIV_LVL_M) begin instruction_o.ex.cause = riscv::ENV_CALL_MMODE; end + if (CVA6Cfg.TvalEn) instruction_o.ex.tval = '0; end else if (ebreak) begin // this exception is valid instruction_o.ex.valid = 1'b1; @@ -1621,100 +1916,99 @@ module decoder // set gva bit if (CVA6Cfg.RVH) instruction_o.ex.gva = v_i; else instruction_o.ex.gva = 1'b0; + if (CVA6Cfg.TvalEn) instruction_o.ex.tval = pc_i; end - // ----------------- - // Interrupt Control - // ----------------- - // we decode an interrupt the same as an exception, hence it will be taken if the instruction did not - // throw any previous exception. - // we have three interrupt sources: external interrupts, software interrupts, timer interrupts (order of precedence) - // for two privilege levels: Supervisor and Machine Mode - // Virtual Supervisor Timer Interrupt - if (CVA6Cfg.RVH) begin - if (irq_ctrl_i.mie[riscv::IRQ_VS_TIMER] && irq_ctrl_i.mip[riscv::IRQ_VS_TIMER]) begin - interrupt_cause = INTERRUPTS.VS_TIMER; - end - // Virtual Supervisor Software Interrupt - if (irq_ctrl_i.mie[riscv::IRQ_VS_SOFT] && irq_ctrl_i.mip[riscv::IRQ_VS_SOFT]) begin - interrupt_cause = INTERRUPTS.VS_SW; - end - // Virtual Supervisor External Interrupt - if (irq_ctrl_i.mie[riscv::IRQ_VS_EXT] && (irq_ctrl_i.mip[riscv::IRQ_VS_EXT])) begin - interrupt_cause = INTERRUPTS.VS_EXT; - end - // Hypervisor Guest External Interrupts - if (irq_ctrl_i.mie[riscv::IRQ_HS_EXT] && irq_ctrl_i.mip[riscv::IRQ_HS_EXT]) begin - interrupt_cause = INTERRUPTS.HS_EXT; - end + end + // ----------------- + // Interrupt Control + // ----------------- + // we decode an interrupt the same as an exception, hence it will be taken if the instruction did not + // throw any previous exception. + // we have three interrupt sources: external interrupts, software interrupts, timer interrupts (order of precedence) + // for two privilege levels: Supervisor and Machine Mode + // Virtual Supervisor Timer Interrupt + if (CVA6Cfg.RVH) begin + if (irq_ctrl_i.mie[riscv::IRQ_VS_TIMER] && irq_ctrl_i.mip[riscv::IRQ_VS_TIMER]) begin + interrupt_cause = INTERRUPTS.VS_TIMER; end - if (CVA6Cfg.RVS) begin - // Supervisor Timer Interrupt - if (irq_ctrl_i.mie[riscv::IRQ_S_TIMER] && irq_ctrl_i.mip[riscv::IRQ_S_TIMER]) begin - interrupt_cause = INTERRUPTS.S_TIMER; - end - // Supervisor Software Interrupt - if (irq_ctrl_i.mie[riscv::IRQ_S_SOFT] && irq_ctrl_i.mip[riscv::IRQ_S_SOFT]) begin - interrupt_cause = INTERRUPTS.S_SW; - end - // Supervisor External Interrupt - // The logical-OR of the software-writable bit and the signal from the external interrupt controller is - // used to generate external interrupts to the supervisor - if (irq_ctrl_i.mie[riscv::IRQ_S_EXT] && (irq_ctrl_i.mip[riscv::IRQ_S_EXT] | irq_i[ariane_pkg::SupervisorIrq])) begin - interrupt_cause = INTERRUPTS.S_EXT; - end + // Virtual Supervisor Software Interrupt + if (irq_ctrl_i.mie[riscv::IRQ_VS_SOFT] && irq_ctrl_i.mip[riscv::IRQ_VS_SOFT]) begin + interrupt_cause = INTERRUPTS.VS_SW; end - // Machine Timer Interrupt - if (irq_ctrl_i.mip[riscv::IRQ_M_TIMER] && irq_ctrl_i.mie[riscv::IRQ_M_TIMER]) begin - interrupt_cause = INTERRUPTS.M_TIMER; + // Virtual Supervisor External Interrupt + if (irq_ctrl_i.mie[riscv::IRQ_VS_EXT] && (irq_ctrl_i.mip[riscv::IRQ_VS_EXT])) begin + interrupt_cause = INTERRUPTS.VS_EXT; end - if (CVA6Cfg.SoftwareInterruptEn) begin - // Machine Mode Software Interrupt - if (irq_ctrl_i.mip[riscv::IRQ_M_SOFT] && irq_ctrl_i.mie[riscv::IRQ_M_SOFT]) begin - interrupt_cause = INTERRUPTS.M_SW; - end + // Hypervisor Guest External Interrupts + if (irq_ctrl_i.mie[riscv::IRQ_HS_EXT] && irq_ctrl_i.mip[riscv::IRQ_HS_EXT]) begin + interrupt_cause = INTERRUPTS.HS_EXT; + end + end + if (CVA6Cfg.RVS) begin + // Supervisor Timer Interrupt + if (irq_ctrl_i.mie[riscv::IRQ_S_TIMER] && irq_ctrl_i.mip[riscv::IRQ_S_TIMER]) begin + interrupt_cause = INTERRUPTS.S_TIMER; end - // Machine Mode External Interrupt - if (irq_ctrl_i.mip[riscv::IRQ_M_EXT] && irq_ctrl_i.mie[riscv::IRQ_M_EXT]) begin - interrupt_cause = INTERRUPTS.M_EXT; + // Supervisor Software Interrupt + if (irq_ctrl_i.mie[riscv::IRQ_S_SOFT] && irq_ctrl_i.mip[riscv::IRQ_S_SOFT]) begin + interrupt_cause = INTERRUPTS.S_SW; end + // Supervisor External Interrupt + // The logical-OR of the software-writable bit and the signal from the external interrupt controller is + // used to generate external interrupts to the supervisor + if (irq_ctrl_i.mie[riscv::IRQ_S_EXT] && (irq_ctrl_i.mip[riscv::IRQ_S_EXT] | irq_i[ariane_pkg::SupervisorIrq])) begin + interrupt_cause = INTERRUPTS.S_EXT; + end + end + // Machine Timer Interrupt + if (irq_ctrl_i.mip[riscv::IRQ_M_TIMER] && irq_ctrl_i.mie[riscv::IRQ_M_TIMER]) begin + interrupt_cause = INTERRUPTS.M_TIMER; + end + if (CVA6Cfg.SoftwareInterruptEn) begin + // Machine Mode Software Interrupt + if (irq_ctrl_i.mip[riscv::IRQ_M_SOFT] && irq_ctrl_i.mie[riscv::IRQ_M_SOFT]) begin + interrupt_cause = INTERRUPTS.M_SW; + end + end + // Machine Mode External Interrupt + if (irq_ctrl_i.mip[riscv::IRQ_M_EXT] && irq_ctrl_i.mie[riscv::IRQ_M_EXT]) begin + interrupt_cause = INTERRUPTS.M_EXT; + end - if (interrupt_cause[CVA6Cfg.XLEN-1] && irq_ctrl_i.global_enable) begin - // However, if bit i in mideleg is set, interrupts are considered to be globally enabled if the hart’s current privilege - // mode equals the delegated privilege mode (S or U) and that mode’s interrupt enable bit - // (SIE or UIE in mstatus) is set, or if the current privilege mode is less than the delegated privilege mode. - if (irq_ctrl_i.mideleg[interrupt_cause[$clog2(CVA6Cfg.XLEN)-1:0]]) begin - if (CVA6Cfg.RVH) begin : hyp_int_gen - if (v_i && irq_ctrl_i.hideleg[interrupt_cause[$clog2(CVA6Cfg.XLEN)-1:0]]) begin - if ((irq_ctrl_i.sie && priv_lvl_i == riscv::PRIV_LVL_S) || priv_lvl_i == riscv::PRIV_LVL_U) begin - instruction_o.ex.valid = 1'b1; - instruction_o.ex.cause = interrupt_cause; - end - end else if (v_i && ~irq_ctrl_i.hideleg[interrupt_cause[$clog2( - CVA6Cfg.XLEN - )-1:0]]) begin - instruction_o.ex.valid = 1'b1; - instruction_o.ex.cause = interrupt_cause; - end else if (!v_i && ((irq_ctrl_i.sie && priv_lvl_i == riscv::PRIV_LVL_S) || priv_lvl_i == riscv::PRIV_LVL_U) && ~irq_ctrl_i.hideleg[interrupt_cause[$clog2( - CVA6Cfg.XLEN - )-1:0]]) begin - instruction_o.ex.valid = 1'b1; - instruction_o.ex.cause = interrupt_cause; - end - end else begin - if ((CVA6Cfg.RVS && irq_ctrl_i.sie && priv_lvl_i == riscv::PRIV_LVL_S) || (CVA6Cfg.RVU && priv_lvl_i == riscv::PRIV_LVL_U)) begin + if (interrupt_cause[CVA6Cfg.XLEN-1] && irq_ctrl_i.global_enable) begin + // However, if bit i in mideleg is set, interrupts are considered to be globally enabled if the hart’s current privilege + // mode equals the delegated privilege mode (S or U) and that mode’s interrupt enable bit + // (SIE or UIE in mstatus) is set, or if the current privilege mode is less than the delegated privilege mode. + if (irq_ctrl_i.mideleg[interrupt_cause[$clog2(CVA6Cfg.XLEN)-1:0]]) begin + if (CVA6Cfg.RVH) begin : hyp_int_gen + if (v_i && irq_ctrl_i.hideleg[interrupt_cause[$clog2(CVA6Cfg.XLEN)-1:0]]) begin + if ((irq_ctrl_i.sie && priv_lvl_i == riscv::PRIV_LVL_S) || priv_lvl_i == riscv::PRIV_LVL_U) begin instruction_o.ex.valid = 1'b1; instruction_o.ex.cause = interrupt_cause; end + end else if (v_i && ~irq_ctrl_i.hideleg[interrupt_cause[$clog2(CVA6Cfg.XLEN)-1:0]]) begin + instruction_o.ex.valid = 1'b1; + instruction_o.ex.cause = interrupt_cause; + end else if (!v_i && ((irq_ctrl_i.sie && priv_lvl_i == riscv::PRIV_LVL_S) || priv_lvl_i == riscv::PRIV_LVL_U) && ~irq_ctrl_i.hideleg[interrupt_cause[$clog2( + CVA6Cfg.XLEN + )-1:0]]) begin + instruction_o.ex.valid = 1'b1; + instruction_o.ex.cause = interrupt_cause; end end else begin - instruction_o.ex.valid = 1'b1; - instruction_o.ex.cause = interrupt_cause; + if ((CVA6Cfg.RVS && irq_ctrl_i.sie && priv_lvl_i == riscv::PRIV_LVL_S) || (CVA6Cfg.RVU && priv_lvl_i == riscv::PRIV_LVL_U)) begin + instruction_o.ex.valid = 1'b1; + instruction_o.ex.cause = interrupt_cause; + end end + end else begin + instruction_o.ex.valid = 1'b1; + instruction_o.ex.cause = interrupt_cause; end end // a debug request has precendece over everything else - if (CVA6Cfg.DebugEn && debug_req_i && !debug_mode_i) begin + if ((CVA6Cfg.DebugEn && debug_req_i && !debug_mode_i)) begin instruction_o.ex.valid = 1'b1; instruction_o.ex.cause = riscv::DEBUG_REQUEST; end diff --git a/core/ex_stage.sv b/core/ex_stage.sv index 4bd3a822b25..4c7cf7d5513 100644 --- a/core/ex_stage.sv +++ b/core/ex_stage.sv @@ -29,7 +29,10 @@ module ex_stage parameter type icache_dreq_t = logic, parameter type icache_drsp_t = logic, parameter type lsu_ctrl_t = logic, - parameter type x_result_t = logic + parameter type x_result_t = logic, + parameter type acc_mmu_req_t = logic, + parameter type acc_mmu_resp_t = logic, + parameter type cbo_t = logic ) ( // Subsystem Clock - SUBSYSTEM input logic clk_i, @@ -45,6 +48,8 @@ module ex_stage input logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.VLEN-1:0] rs2_forwarding_i, // FU data useful to execute instruction - ISSUE_STAGE input fu_data_t [CVA6Cfg.NrIssuePorts-1:0] fu_data_i, + // ALU to ALU bypass control - ISSUE_STAGE + input alu_bypass_t alu_bypass_i, // PC of the current instruction - ISSUE_STAGE input logic [CVA6Cfg.VLEN-1:0] pc_i, // Is_zcmt instruction - ISSUE_STAGE @@ -65,6 +70,8 @@ module ex_stage output logic flu_valid_o, // ALU instruction is valid - ISSUE_STAGE input logic [CVA6Cfg.NrIssuePorts-1:0] alu_valid_i, + // AES instruction is valid - ISSUE_STAGE + input logic [CVA6Cfg.NrIssuePorts-1:0] aes_valid_i, // Branch unit instruction is valid - ISSUE_STAGE input logic [CVA6Cfg.NrIssuePorts-1:0] branch_valid_i, // Information of branch prediction - ISSUE_STAGE @@ -111,6 +118,8 @@ module ex_stage input logic stall_st_pending_i, // TO_BE_COMPLETED - COMMIT_STAGE output logic no_st_pending_o, + // Shared TLB is busy processing a multi-cycle flush + output logic shared_tlb_flush_busy_o, // Atomic result is valid - COMMIT_STAGE input logic amo_valid_commit_i, // FU is ready - ISSUE_STAGE @@ -133,6 +142,8 @@ module ex_stage output logic fpu_valid_o, // FPU exception - ISSUE_STAGE output exception_t fpu_exception_o, + // FPU early valid - ISSUE_STAGE + output logic fpu_early_valid_o, // ALU2 instruction is valid - ISSUE_STAGE input logic [CVA6Cfg.NrIssuePorts-1:0] alu2_valid_i, // CVXIF instruction is valid - ISSUE_STAGE @@ -161,6 +172,9 @@ module ex_stage input logic x_transaction_rejected_i, // accelerate port result is valid - ACC_DISPATCHER input logic acc_valid_i, + // Accelerator MMU access + input acc_mmu_req_t acc_mmu_req_i, + output acc_mmu_resp_t acc_mmu_resp_o, // Enable virtual memory translation - CSR_REGFILE input logic enable_translation_i, // Enable G-Stage memory translation - CSR_REGFILE @@ -175,6 +189,8 @@ module ex_stage input logic flush_tlb_gvma_i, // Privilege mode - CSR_REGFILE input riscv::priv_lvl_t priv_lvl_i, + // Data endianness - CSR REGFILE + input logic mbe_i, // Virtualization mode - CSR_REGFILE input logic v_i, // Privilege level at which load and stores should happen - CSR_REGFILE @@ -207,7 +223,7 @@ module ex_stage input icache_arsp_t icache_areq_i, // icache translation request - CACHE output icache_areq_t icache_areq_o, - // Data cache request ouput - CACHE + // Data cache request output - CACHE input dcache_req_o_t [2:0] dcache_req_ports_i, // Data cache request input - CACHE output dcache_req_i_t [2:0] dcache_req_ports_o, @@ -224,13 +240,26 @@ module ex_stage // To count the data TLB misses - PERF_COUNTERS output logic dtlb_miss_o, // Report the PMP configuration - CSR_REGFILE - input riscv::pmpcfg_t [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0] pmpcfg_i, + input riscv::pmpcfg_t [avoid_neg(CVA6Cfg.NrPMPEntries-1):0] pmpcfg_i, // Report the PMP addresses - CSR_REGFILE - input logic [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0][CVA6Cfg.PLEN-3:0] pmpaddr_i, + input logic [avoid_neg(CVA6Cfg.NrPMPEntries-1):0][CVA6Cfg.PLEN-3:0] pmpaddr_i, // Information dedicated to RVFI - RVFI output lsu_ctrl_t rvfi_lsu_ctrl_o, // Information dedicated to RVFI - RVFI - output [CVA6Cfg.PLEN-1:0] rvfi_mem_paddr_o + output [CVA6Cfg.PLEN-1:0] rvfi_mem_paddr_o, + // Original instruction AES bits + input logic [5:0] orig_instr_aes_i, + //Trigger module communication + output logic [CVA6Cfg.VLEN-1:0] sdtrig_lsu_inputs_operand_a_o, + output logic [CVA6Cfg.XLEN-1:0] sdtrig_lsu_inputs_operand_c_o, + output logic sdtrig_lsu_inputs_we_o, + output fu_op sdtrig_lsu_inputs_op_o, + output logic sdtrig_lsu_inputs_valid_o, + input logic sdtrig_load_stall_i, + input logic sdtrig_load_cancel_i, + input logic [CVA6Cfg.XLEN-1:0] sdtrig_load_action_i, + input logic sdtrig_store_stall_i, + input logic [CVA6Cfg.XLEN-1:0] sdtrig_store_action_i ); // ------------------------- @@ -266,14 +295,18 @@ module ex_stage // from ALU to branch unit logic alu_branch_res; // branch comparison result - logic [CVA6Cfg.XLEN-1:0] alu_result, csr_result, mult_result; + logic [CVA6Cfg.NrALUs-1:0][CVA6Cfg.XLEN-1:0] alu_result; + logic [CVA6Cfg.XLEN-1:0] csr_result, mult_result, aes_result; logic [CVA6Cfg.VLEN-1:0] branch_result; + bp_resolve_t resolved_branch; logic csr_ready, mult_ready; logic [CVA6Cfg.TRANS_ID_BITS-1:0] mult_trans_id; logic mult_valid; + fu_data_t [CVA6Cfg.NrALUs-1:0] alu_data; + logic [CVA6Cfg.NrIssuePorts-1:0] one_cycle_select; - assign one_cycle_select = alu_valid_i | branch_valid_i | csr_valid_i; + assign one_cycle_select = alu_valid_i | branch_valid_i | csr_valid_i | aes_valid_i; fu_data_t one_cycle_data; logic [CVA6Cfg.VLEN-1:0] rs1_forwarding; @@ -293,15 +326,27 @@ module ex_stage end end - // 1. ALU (combinatorial) - alu #( + // 1. ALU(s) (combinatorial) + assign alu_data[0] = one_cycle_data; + + if (CVA6Cfg.SuperscalarEn) begin : gen_alu2_data_sel + always_comb begin + unique case (1'b1) + alu2_valid_i[1]: alu_data[1] = fu_data_i[1]; + alu2_valid_i[0]: alu_data[1] = fu_data_i[0]; + default: alu_data[1] = '0; + endcase + end + end + + alu_wrapper #( .CVA6Cfg (CVA6Cfg), - .HasBranch(1'b1), .fu_data_t(fu_data_t) - ) alu_i ( + ) alu_wrapper_i ( .clk_i, .rst_ni, - .fu_data_i (one_cycle_data), + .alu_bypass_i (alu_bypass_i), + .fu_data_i (alu_data), .result_o (alu_result), .alu_branch_res_o(alu_branch_res) ); @@ -328,10 +373,11 @@ module ex_stage .branch_comp_res_i (alu_branch_res), .branch_result_o (branch_result), .branch_predict_i, - .resolved_branch_o, + .resolved_branch_o (resolved_branch), .resolve_branch_o, .branch_exception_o(flu_exception_o) ); + assign resolved_branch_o = resolved_branch; // 3. CSR (sequential) csr_buffer #( @@ -358,13 +404,15 @@ module ex_stage flu_trans_id_o = one_cycle_data.trans_id; // ALU result if (|alu_valid_i) begin - flu_result_o = alu_result; + flu_result_o = alu_result[0]; // CSR result end else if (|csr_valid_i) begin flu_result_o = csr_result; end else if (mult_valid) begin flu_result_o = mult_result; flu_trans_id_o = mult_trans_id; + end else if (|aes_valid_i) begin + flu_result_o = aes_result; end end @@ -406,8 +454,6 @@ module ex_stage logic fpu_valid; logic [CVA6Cfg.TRANS_ID_BITS-1:0] fpu_trans_id; logic [CVA6Cfg.XLEN-1:0] fpu_result; - logic alu2_valid; - logic [CVA6Cfg.XLEN-1:0] alu2_result; generate if (CVA6Cfg.FpPresent) begin : fpu_gen @@ -439,56 +485,30 @@ module ex_stage .fpu_trans_id_o(fpu_trans_id), .result_o(fpu_result), .fpu_valid_o(fpu_valid), - .fpu_exception_o + .fpu_exception_o, + .fpu_early_valid_o ); end else begin : no_fpu_gen - assign fpu_ready_o = '0; - assign fpu_trans_id = '0; - assign fpu_result = '0; - assign fpu_valid = '0; - assign fpu_exception_o = '0; + assign fpu_ready_o = '0; + assign fpu_trans_id = '0; + assign fpu_result = '0; + assign fpu_valid = '0; + assign fpu_exception_o = '0; + assign fpu_early_valid_o = '0; end endgenerate - // ---------------- - // ALU2 - // ---------------- - fu_data_t alu2_data; - if (CVA6Cfg.SuperscalarEn) begin : alu2_gen - always_comb begin - alu2_data = alu2_valid_i[0] ? fu_data_i[0] : '0; - if (alu2_valid_i[1]) begin - alu2_data = fu_data_i[1]; - end - end - - alu #( - .CVA6Cfg (CVA6Cfg), - .HasBranch(1'b0), - .fu_data_t(fu_data_t) - ) alu2_i ( - .clk_i, - .rst_ni, - .fu_data_i (alu2_data), - .result_o (alu2_result), - .alu_branch_res_o( /* this ALU does not handle branching */) - ); - end else begin - assign alu2_data = '0; - assign alu2_result = '0; - end - // result MUX // This is really explicit so that synthesis tools can elide unused signals if (CVA6Cfg.SuperscalarEn) begin if (CVA6Cfg.FpPresent) begin assign fpu_valid_o = fpu_valid || |alu2_valid_i; - assign fpu_result_o = fpu_valid ? fpu_result : alu2_result; - assign fpu_trans_id_o = fpu_valid ? fpu_trans_id : alu2_data.trans_id; + assign fpu_result_o = fpu_valid ? fpu_result : alu_result[1]; + assign fpu_trans_id_o = fpu_valid ? fpu_trans_id : alu_data[1].trans_id; end else begin assign fpu_valid_o = |alu2_valid_i; - assign fpu_result_o = alu2_result; - assign fpu_trans_id_o = alu2_data.trans_id; + assign fpu_result_o = alu_result[1]; + assign fpu_trans_id_o = alu_data[1].trans_id; end end else begin if (CVA6Cfg.FpPresent) begin @@ -507,14 +527,19 @@ module ex_stage // ---------------- fu_data_t lsu_data; logic [31:0] lsu_tinst; + logic speculative_load; always_comb begin - lsu_data = lsu_valid_i[0] ? fu_data_i[0] : '0; + lsu_data = lsu_valid_i[0] ? fu_data_i[0] : '0; lsu_tinst = tinst_i[0]; + speculative_load = 1'b0; if (CVA6Cfg.SuperscalarEn) begin if (lsu_valid_i[1]) begin lsu_data = fu_data_i[1]; lsu_tinst = tinst_i[1]; + if (CVA6Cfg.SpeculativeSb) begin + speculative_load = branch_valid_i[0]; + end end end end @@ -529,16 +554,22 @@ module ex_stage .icache_arsp_t(icache_arsp_t), .icache_dreq_t(icache_dreq_t), .icache_drsp_t(icache_drsp_t), - .lsu_ctrl_t(lsu_ctrl_t) + .lsu_ctrl_t(lsu_ctrl_t), + .cbo_t(cbo_t), + .acc_mmu_req_t(acc_mmu_req_t), + .acc_mmu_resp_t(acc_mmu_resp_t), + .bp_resolve_t(bp_resolve_t) ) lsu_i ( .clk_i, .rst_ni, .flush_i, .stall_st_pending_i, .no_st_pending_o, - .fu_data_i (lsu_data), + .shared_tlb_flush_busy_o(shared_tlb_flush_busy_o), + .fu_data_i (lsu_data), .lsu_ready_o, - .lsu_valid_i (|lsu_valid_i), + .lsu_valid_i (|lsu_valid_i), + .speculative_load_i (speculative_load), .load_trans_id_o, .load_result_o, .load_valid_o, @@ -547,16 +578,20 @@ module ex_stage .store_result_o, .store_valid_o, .store_exception_o, - .commit_i (lsu_commit_i), - .commit_ready_o (lsu_commit_ready_o), + .commit_i (lsu_commit_i), + .commit_ready_o (lsu_commit_ready_o), .commit_tran_id_i, + .resolved_branch_i (resolved_branch), .enable_translation_i, .enable_g_translation_i, .en_ld_st_translation_i, .en_ld_st_g_translation_i, + .acc_mmu_req_i, + .acc_mmu_resp_o, .icache_areq_i, .icache_areq_o, .priv_lvl_i, + .mbe_i, .v_i, .ld_st_priv_lvl_i, .ld_st_v_i, @@ -570,11 +605,11 @@ module ex_stage .hgatp_ppn_i, .asid_i, .vs_asid_i, - .asid_to_be_flushed_i (asid_to_be_flushed), + .asid_to_be_flushed_i (asid_to_be_flushed), .vmid_i, - .vmid_to_be_flushed_i (vmid_to_be_flushed), - .vaddr_to_be_flushed_i (vaddr_to_be_flushed), - .gpaddr_to_be_flushed_i(gpaddr_to_be_flushed), + .vmid_to_be_flushed_i (vmid_to_be_flushed), + .vaddr_to_be_flushed_i (vaddr_to_be_flushed), + .gpaddr_to_be_flushed_i (gpaddr_to_be_flushed), .flush_tlb_i, .flush_tlb_vvma_i, .flush_tlb_gvma_i, @@ -587,13 +622,34 @@ module ex_stage .amo_valid_commit_i, .amo_req_o, .amo_resp_i, - .tinst_i (lsu_tinst), + .tinst_i (lsu_tinst), .pmpcfg_i, .pmpaddr_i, .rvfi_lsu_ctrl_o, - .rvfi_mem_paddr_o + .rvfi_mem_paddr_o, + //Trigger module command signals + .sdtrig_load_stall_i (sdtrig_load_stall_i), + .sdtrig_load_cancel_i (sdtrig_load_cancel_i), + .sdtrig_load_action_i (sdtrig_load_action_i), + .sdtrig_store_stall_i (sdtrig_store_stall_i), + .sdtrig_store_action_i (sdtrig_store_action_i) ); + //Sdtrig + if(CVA6Cfg.SdtrigMcontrol6Store || CVA6Cfg.SdtrigMcontrol6LoadAddr || CVA6Cfg.SdtrigMcontrol6LoadData) begin + assign sdtrig_lsu_inputs_operand_a_o = CVA6Cfg.VLEN'(lsu_data.operand_a + lsu_data.imm); + assign sdtrig_lsu_inputs_operand_c_o = lsu_data.operand_b; + assign sdtrig_lsu_inputs_we_o = lsu_data.fu == STORE; + assign sdtrig_lsu_inputs_op_o = lsu_data.operation; + assign sdtrig_lsu_inputs_valid_o = |lsu_valid_i; + end else begin + assign sdtrig_lsu_inputs_operand_a_o = '0; + assign sdtrig_lsu_inputs_operand_c_o = '0; + assign sdtrig_lsu_inputs_we_o = '0; + assign sdtrig_lsu_inputs_op_o = ADD; + assign sdtrig_lsu_inputs_valid_o = '0; + end + if (CVA6Cfg.CvxifEn) begin : gen_cvxif fu_data_t cvxif_data; always_comb begin @@ -612,6 +668,7 @@ module ex_stage ) cvxif_fu_i ( .clk_i, .rst_ni, + .v_i, .x_valid_i(|x_valid_i), .x_trans_id_i(cvxif_data.trans_id), .x_illegal_i(x_transaction_rejected_i), @@ -633,6 +690,8 @@ module ex_stage assign x_exception_o = '0; assign x_result_o = '0; assign x_valid_o = '0; + assign x_we_o = '0; + assign x_rd_o = '0; end if (CVA6Cfg.RVS) begin @@ -683,7 +742,7 @@ module ex_stage // if the current instruction in EX_STAGE is a sfence.vma, in the next cycle no writes will happen end else if ((~(current_instruction_is_sfence_vma || current_instruction_is_hfence_vvma || current_instruction_is_hfence_gvma)) && (~((fu_data_i[0].operation == SFENCE_VMA || fu_data_i[0].operation == HFENCE_VVMA || fu_data_i[0].operation == HFENCE_GVMA ) && |csr_valid_i))) begin vaddr_to_be_flushed <= rs1_forwarding; - gpaddr_to_be_flushed <= {2'b00, rs1_forwarding[CVA6Cfg.GPLEN-1:2]}; + gpaddr_to_be_flushed <= {rs1_forwarding[CVA6Cfg.GPLEN-3:0], 2'b00}; asid_to_be_flushed <= rs2_forwarding[CVA6Cfg.ASID_WIDTH-1:0]; vmid_to_be_flushed <= rs2_forwarding[CVA6Cfg.VMID_WIDTH-1:0]; end @@ -713,4 +772,24 @@ module ex_stage assign gpaddr_to_be_flushed = '0; end + // ---------------- + // Scalar Cryptography Unit + // ---------------- + generate + if (CVA6Cfg.ZKN) begin : aes_gen + aes #( + .CVA6Cfg (CVA6Cfg), + .fu_data_t(fu_data_t) + ) aes_i ( + .clk_i, + .rst_ni, + .fu_data_i (one_cycle_data), + .result_o (aes_result), + .orig_instr_aes(orig_instr_aes_i) + ); + end else begin : no_aes_gen + assign aes_result = '0; + end + endgenerate + endmodule diff --git a/core/fpu_wrap.sv b/core/fpu_wrap.sv index c30033463fd..474005f8e64 100644 --- a/core/fpu_wrap.sv +++ b/core/fpu_wrap.sv @@ -34,7 +34,8 @@ module fpu_wrap output logic [CVA6Cfg.TRANS_ID_BITS-1:0] fpu_trans_id_o, output logic [ CVA6Cfg.FLen-1:0] result_o, output logic fpu_valid_o, - output exception_t fpu_exception_o + output exception_t fpu_exception_o, + output logic fpu_early_valid_o ); // this is a workaround @@ -553,15 +554,19 @@ module fpu_wrap .tag_o (fpu_trans_id_o), .out_valid_o (fpu_out_valid), .out_ready_i (fpu_out_ready), - .busy_o ( /* unused */) + .busy_o ( /* unused */), + .early_valid_o (fpu_early_valid_o) ); // Pack status flag into exception cause, tval ignored in wb, exception is always invalid assign fpu_exception_o.cause = {59'h0, fpu_status}; assign fpu_exception_o.valid = 1'b0; assign fpu_exception_o.tval = '0; + assign fpu_exception_o.tval2 = '0; + assign fpu_exception_o.tinst = '0; + assign fpu_exception_o.gva = '0; - // Donwstream write port is dedicated to FPU and always ready + // Downstream write port is dedicated to FPU and always ready assign fpu_out_ready = 1'b1; // Downstream valid from unit diff --git a/core/frontend/bht.sv b/core/frontend/bht.sv index e95c536770e..9d4c195f798 100644 --- a/core/frontend/bht.sv +++ b/core/frontend/bht.sv @@ -1,6 +1,6 @@ // Copyright 2018 - 2019 ETH Zurich and University of Bologna. -// Copyright 2023 - Thales for additionnal contribution. -// Copyright 2024 - PlanV Technologies for additionnal contribution. +// Copyright 2023 - Thales for additional contribution. +// Copyright 2024 - PlanV Technologies for additional contribution. // Copyright and related rights are licensed under the Solderpad Hardware // License, Version 2.0 (the "License"); you may not use this file except in // compliance with the License. You may obtain a copy of the License at @@ -16,7 +16,7 @@ // Date: 09.06.2018 // FPGA optimization: Sebastien Jacq, Thales // Date: 2023-01-30 -// FPGA optimization for Altera: Angela Gonzalez, PlanV Technolgies +// FPGA optimization for Altera: Angela Gonzalez, PlanV Technologies // Date: 2024-10-16 // branch history table - 2 bit saturation counter diff --git a/core/frontend/bht2lvl.sv b/core/frontend/bht2lvl.sv new file mode 100644 index 00000000000..26ab2cbf195 --- /dev/null +++ b/core/frontend/bht2lvl.sv @@ -0,0 +1,131 @@ +// Copyright 2025 ETH Zurich and University of Bologna. +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. +// +// Original author: Gianmarco Ottavi, University of Bologna +// Description: Private history BHT + +module bht2lvl #( + parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty, + parameter type bht_update_t = logic +) ( + input logic clk_i, + input logic rst_ni, + input logic flush_i, + input logic [ CVA6Cfg.VLEN-1:0] vpc_i, + input bht_update_t bht_update_i, + // we potentially need INSTR_PER_FETCH predictions/cycle + output ariane_pkg::bht_prediction_t [CVA6Cfg.INSTR_PER_FETCH-1:0] bht_prediction_o +); + + // the last bit is always zero, we don't need it for indexing + localparam OFFSET = CVA6Cfg.RVC == 1'b1 ? 1 : 2; + // re-shape the branch history table + localparam NR_ROWS = CVA6Cfg.BHTEntries / CVA6Cfg.INSTR_PER_FETCH; + // number of bits needed to index the row + localparam ROW_ADDR_BITS = $clog2(CVA6Cfg.INSTR_PER_FETCH); + localparam ROW_INDEX_BITS = CVA6Cfg.RVC == 1'b1 ? $clog2(CVA6Cfg.INSTR_PER_FETCH) : 1; + // number of bits we should use for prediction + localparam PREDICTION_BITS = $clog2(NR_ROWS) + OFFSET + ROW_ADDR_BITS; + + typedef struct packed { + logic valid; + logic [CVA6Cfg.BHTHist-1:0] hist; + logic [2**CVA6Cfg.BHTHist-1:0][1:0] saturation_counter; + } bht_entry_t; + + // This parameter is needed to reset all saturation + // counters to 2'b10 while circumventing the Verilator + // limitation of unsupported delayed assignment to array + // inside for loops + localparam bht_entry_t BHT_RST_VALUE = '{ + valid: 1'b0, + hist: '0, + saturation_counter: {2 ** CVA6Cfg.BHTHist{2'b10}} + }; + + bht_entry_t bht_d[NR_ROWS-1:0][CVA6Cfg.INSTR_PER_FETCH-1:0]; + bht_entry_t bht_q[NR_ROWS-1:0][CVA6Cfg.INSTR_PER_FETCH-1:0]; + + + logic [$clog2(NR_ROWS)-1:0] index, update_pc; + logic [CVA6Cfg.BHTHist-1:0] update_hist; + logic [ ROW_INDEX_BITS-1:0] update_row_index; + + assign index = vpc_i[PREDICTION_BITS-1:ROW_ADDR_BITS+OFFSET]; + assign update_pc = bht_update_i.pc[PREDICTION_BITS-1:ROW_ADDR_BITS+OFFSET]; + assign update_hist = bht_q[update_pc][update_row_index].hist; + + if (CVA6Cfg.RVC) begin : gen_update_row_index + assign update_row_index = bht_update_i.pc[ROW_ADDR_BITS+OFFSET-1:OFFSET]; + end else begin + assign update_row_index = '0; + end + + + logic [1:0] saturation_counter; + + // Get the current history of the entry + logic [CVA6Cfg.INSTR_PER_FETCH-1:0][CVA6Cfg.BHTHist-1:0] read_history; + for (genvar i = 0; i < CVA6Cfg.INSTR_PER_FETCH; i++) begin + assign read_history[i] = bht_q[index][i].hist; + end + + // prediction assignment + for (genvar i = 0; i < CVA6Cfg.INSTR_PER_FETCH; i++) begin : gen_bht_output + assign bht_prediction_o[i].valid = bht_q[index][i].valid; + assign bht_prediction_o[i].taken = bht_q[index][i].saturation_counter[read_history[i]][1] == 1'b1; + end + + always_comb begin : update_bht + bht_d = bht_q; + saturation_counter = bht_q[update_pc][update_row_index].saturation_counter[update_hist]; + + if (bht_update_i.valid) begin + bht_d[update_pc][update_row_index].valid = 1'b1; + + if (saturation_counter == 2'b11) begin + // we can safely decrease it + if (!bht_update_i.taken) + bht_d[update_pc][update_row_index].saturation_counter[update_hist] = saturation_counter - 1; + // then check if it saturated in the negative regime e.g.: branch not taken + end else if (saturation_counter == 2'b00) begin + // we can safely increase it + if (bht_update_i.taken) + bht_d[update_pc][update_row_index].saturation_counter[update_hist] = saturation_counter + 1; + end else begin // otherwise we are not in any boundaries and can decrease or increase it + if (bht_update_i.taken) + bht_d[update_pc][update_row_index].saturation_counter[update_hist] = saturation_counter + 1; + else + bht_d[update_pc][update_row_index].saturation_counter[update_hist] = saturation_counter - 1; + end + + bht_d[update_pc][update_row_index].hist = { + update_hist[CVA6Cfg.BHTHist-2:0], bht_update_i.taken + }; + end + end + + for (genvar i = 0; i < NR_ROWS; i++) begin : gen_ff_rows + for (genvar j = 0; j < CVA6Cfg.INSTR_PER_FETCH; j++) begin : gen_ff_cols + always_ff @(posedge clk_i or negedge rst_ni) begin + if (!rst_ni) begin + bht_q[i][j] <= BHT_RST_VALUE; + end else begin + if (flush_i) begin + bht_q[i][j] <= BHT_RST_VALUE; + end else begin + bht_q[i][j] <= bht_d[i][j]; + end + end + end + end + end + +endmodule diff --git a/core/frontend/frontend.sv b/core/frontend/frontend.sv index 1505140e8c8..f95b38354a6 100644 --- a/core/frontend/frontend.sv +++ b/core/frontend/frontend.sv @@ -36,6 +36,8 @@ module frontend input logic flush_i, // Halt requested by WFI and Accelerate port - CONTROLLER input logic halt_i, + // Halt frontend - CONTROLLER (in the case of fence_i to avoid fetching an old instruction) + input logic halt_frontend_i, // Set COMMIT PC as next PC requested by FENCE, CSR side-effect and Accelerate port - CONTROLLER input logic set_pc_commit_i, // COMMIT PC - COMMIT @@ -150,6 +152,7 @@ module frontend // Instruction FIFO logic [ CVA6Cfg.VLEN-1:0] predict_address; cf_t [CVA6Cfg.INSTR_PER_FETCH-1:0] cf_type; + logic [CVA6Cfg.INSTR_PER_FETCH-1:0] cf_valid; logic [CVA6Cfg.INSTR_PER_FETCH-1:0] taken_rvi_cf; logic [CVA6Cfg.INSTR_PER_FETCH-1:0] taken_rvc_cf; @@ -195,10 +198,9 @@ module frontend end ; - // for the return address stack it doens't matter as we have the + // for the return address stack it doesn't matter as we have the // address of the call/return already logic bp_valid; - logic [CVA6Cfg.INSTR_PER_FETCH-1:0] is_branch; logic [CVA6Cfg.INSTR_PER_FETCH-1:0] is_call; logic [CVA6Cfg.INSTR_PER_FETCH-1:0] is_jump; @@ -225,6 +227,7 @@ module frontend predict_address = '0; for (int i = 0; i < CVA6Cfg.INSTR_PER_FETCH; i++) cf_type[i] = ariane_pkg::NoCF; + for (int i = 0; i < CVA6Cfg.INSTR_PER_FETCH; i++) cf_valid[i] = 1'b0; ras_push = 1'b0; ras_pop = 1'b0; @@ -238,11 +241,12 @@ module frontend 4'b0000: ; // regular instruction e.g.: no branch // unconditional jump to register, we need the BTB to resolve this 4'b0001: begin - ras_pop = 1'b0; + ras_pop = 1'b0; ras_push = 1'b0; + cf_type[i] = ariane_pkg::JumpR; if (CVA6Cfg.BTBEntries != 0 && btb_prediction_shifted[i].valid) begin predict_address = btb_prediction_shifted[i].target_address; - cf_type[i] = ariane_pkg::JumpR; + cf_valid[i] = 1'b1; end end // its an unconditional jump to an immediate @@ -252,6 +256,7 @@ module frontend taken_rvi_cf[i] = rvi_jump[i]; taken_rvc_cf[i] = rvc_jump[i]; cf_type[i] = ariane_pkg::Jump; + cf_valid[i] = rvi_jump[i] || rvc_jump[i]; end // return 4'b0100: begin @@ -260,6 +265,7 @@ module frontend ras_push = 1'b0; predict_address = ras_predict.ra; cf_type[i] = ariane_pkg::Return; + cf_valid[i] = ras_predict.valid; end // branch prediction 4'b1000: begin @@ -276,7 +282,8 @@ module frontend taken_rvc_cf[i] = rvc_branch[i] & rvc_imm[i][CVA6Cfg.VLEN-1]; end if (taken_rvi_cf[i] || taken_rvc_cf[i]) begin - cf_type[i] = ariane_pkg::Branch; + cf_type[i] = ariane_pkg::Branch; + cf_valid[i] = 1'b1; end end default: ; @@ -294,20 +301,14 @@ module frontend end end end - // or reduce struct - always_comb begin - bp_valid = 1'b0; - // BP cannot be valid if we have a return instruction and the RAS is not giving a valid address - // Check that we encountered a control flow and that for a return the RAS - // contains a valid prediction. - for (int i = 0; i < CVA6Cfg.INSTR_PER_FETCH; i++) - bp_valid |= ((cf_type[i] != NoCF & cf_type[i] != Return) | ((cf_type[i] == Return) & ras_predict.valid)); - end + // Or reduce struct + assign bp_valid = |cf_valid; assign is_mispredict = resolved_branch_i.valid & resolved_branch_i.is_mispredict; // Cache interface - assign icache_dreq_o.req = instr_queue_ready; - assign if_ready = icache_dreq_i.ready & instr_queue_ready; + // Gate ICache requests and NPC updates during fence.i + assign icache_dreq_o.req = instr_queue_ready & ~halt_frontend_i; + assign if_ready = icache_dreq_i.ready & instr_queue_ready & ~halt_frontend_i; // We need to flush the cache pipeline if: // 1. We mispredicted // 2. Want to flush the whole processor front-end @@ -510,7 +511,7 @@ module frontend if (CVA6Cfg.BHTEntries == 0) begin assign bht_prediction = '0; - end else begin : bht_gen + end else if (CVA6Cfg.BPType == config_pkg::BHT) begin : bht_gen bht #( .CVA6Cfg (CVA6Cfg), .bht_update_t(bht_update_t), @@ -524,6 +525,18 @@ module frontend .bht_update_i (bht_update), .bht_prediction_o(bht_prediction) ); + end else if (CVA6Cfg.BPType == config_pkg::PH_BHT) begin : bht2lvl_gen + bht2lvl #( + .CVA6Cfg (CVA6Cfg), + .bht_update_t(bht_update_t) + ) i_bht ( + .clk_i, + .rst_ni, + .flush_i (flush_bp_i), + .vpc_i (icache_vaddr_q), + .bht_update_i (bht_update), + .bht_prediction_o(bht_prediction) + ); end // we need to inspect up to CVA6Cfg.INSTR_PER_FETCH instructions for branches @@ -565,6 +578,7 @@ module frontend .exception_gva_i (icache_gva_q), .predict_address_i (predict_address), .cf_type_i (cf_type), + .cf_valid_i (cf_valid), .valid_i (instruction_valid), // from re-aligner .consumed_o (instr_queue_consumed), .ready_o (instr_queue_ready), diff --git a/core/frontend/instr_queue.sv b/core/frontend/instr_queue.sv index 28254e4708c..e0369ae69f2 100644 --- a/core/frontend/instr_queue.sv +++ b/core/frontend/instr_queue.sv @@ -63,7 +63,7 @@ module instr_queue input logic [CVA6Cfg.INSTR_PER_FETCH-1:0] valid_i, // Handshake’s ready with CACHE - CACHE output logic ready_o, - // Indicates instructions consummed, or popped by ID_STAGE - FRONTEND + // Indicates instructions consumed, or popped by ID_STAGE - FRONTEND output logic [CVA6Cfg.INSTR_PER_FETCH-1:0] consumed_o, // Exception (which is page-table fault) - CACHE input ariane_pkg::frontend_exception_t exception_i, @@ -74,9 +74,11 @@ module instr_queue input logic exception_gva_i, // Branch predict - FRONTEND input logic [CVA6Cfg.VLEN-1:0] predict_address_i, - // Instruction predict address - FRONTEND + // Instruction control-flow prediction type - FRONTEND input ariane_pkg::cf_t [CVA6Cfg.INSTR_PER_FETCH-1:0] cf_type_i, - // Replay instruction because one of the FIFO was full - FRONTEND + // Instruction control-flow prediction valid - FRONTEND + input logic [CVA6Cfg.INSTR_PER_FETCH-1:0] cf_valid_i, + // Replay instruction because one of the FIFO was full - FRONTEND output logic replay_o, // Address at which to replay the fetch - FRONTEND output logic [CVA6Cfg.VLEN-1:0] replay_addr_o, @@ -93,7 +95,8 @@ module instr_queue typedef struct packed { logic [31:0] instr; // instruction word - ariane_pkg::cf_t cf; // branch was taken + ariane_pkg::cf_t cf; // branch prediction type + logic cf_valid; // valid branch prediction ariane_pkg::frontend_exception_t ex; // exception happened logic [CVA6Cfg.VLEN-1:0] ex_vaddr; // lower VLEN bits of tval for exception logic [CVA6Cfg.GPLEN-1:0] ex_gpaddr; // lower GPLEN bits of tval2 for exception @@ -143,6 +146,7 @@ module instr_queue logic [CVA6Cfg.INSTR_PER_FETCH-1:0] fifo_pos; logic [CVA6Cfg.INSTR_PER_FETCH*2-1:0][31:0] instr; ariane_pkg::cf_t [CVA6Cfg.INSTR_PER_FETCH*2-1:0] cf; + logic [CVA6Cfg.INSTR_PER_FETCH*2-1:0] cf_valid; // replay interface logic [CVA6Cfg.INSTR_PER_FETCH-1:0] instr_overflow_fifo; @@ -151,7 +155,7 @@ module instr_queue if (CVA6Cfg.RVC) begin : gen_multiple_instr_per_fetch_with_C for (genvar i = 0; i < CVA6Cfg.INSTR_PER_FETCH; i++) begin : gen_unpack_taken - assign taken[i] = cf_type_i[i] != ariane_pkg::NoCF; + assign taken[i] = cf_valid_i[i]; end // calculate a branch mask, e.g.: get the first taken branch @@ -208,6 +212,8 @@ module instr_queue assign instr[i+CVA6Cfg.INSTR_PER_FETCH] = instr_i[i]; assign cf[i] = cf_type_i[i]; assign cf[i+CVA6Cfg.INSTR_PER_FETCH] = cf_type_i[i]; + assign cf_valid[i] = cf_valid_i[i]; + assign cf_valid[i+CVA6Cfg.INSTR_PER_FETCH] = cf_valid_i[i]; end // shift the inputs @@ -215,6 +221,7 @@ module instr_queue /* verilator lint_off WIDTH */ assign instr_data_in[i].instr = instr[CVA6Cfg.INSTR_PER_FETCH+i-idx_is_q]; assign instr_data_in[i].cf = cf[CVA6Cfg.INSTR_PER_FETCH+i-idx_is_q]; + assign instr_data_in[i].cf_valid = cf_valid[CVA6Cfg.INSTR_PER_FETCH+i-idx_is_q]; assign instr_data_in[i].ex = exception_i; // exceptions hold for the whole fetch packet assign instr_data_in[i].ex_vaddr = exception_addr_i; if (CVA6Cfg.RVH) begin : gen_hyp_ex_with_C @@ -330,8 +337,10 @@ module instr_queue fetch_entry_o[i].ex.tval2 = '0; fetch_entry_o[i].ex.gva = 1'b0; fetch_entry_o[i].ex.tinst = '0; + fetch_entry_o[i].ex.timing = '0; fetch_entry_o[i].branch_predict.predict_address = address_out; fetch_entry_o[i].branch_predict.cf = ariane_pkg::NoCF; + fetch_entry_o[i].branch_predict.valid = 1'b0; end // output mux select @@ -357,6 +366,7 @@ module instr_queue fetch_entry_o[0].ex.gva = instr_data_out[i].ex_gva; end fetch_entry_o[0].branch_predict.cf = instr_data_out[i].cf; + fetch_entry_o[0].branch_predict.valid = instr_data_out[i].cf_valid; pop_instr[i] = fetch_entry_fire[0]; end @@ -371,6 +381,7 @@ module instr_queue fetch_entry_o[NID].ex.valid = instr_data_out[i].ex != ariane_pkg::FE_NONE; fetch_entry_o[NID].ex.tval = {{64 - CVA6Cfg.VLEN{1'b0}}, instr_data_out[i].ex_vaddr}; fetch_entry_o[NID].branch_predict.cf = instr_data_out[i].cf; + fetch_entry_o[NID].branch_predict.valid = instr_data_out[i].cf_valid; // Cannot output two CF the same cycle. pop_instr[i] = fetch_entry_fire[NID]; end @@ -413,13 +424,14 @@ module instr_queue fetch_entry_o[0].branch_predict.predict_address = address_out; fetch_entry_o[0].branch_predict.cf = instr_data_out[0].cf; + fetch_entry_o[0].branch_predict.valid = instr_data_out[0].cf_valid; pop_instr[0] = fetch_entry_valid_o[0] & fetch_entry_ready_i[0]; end end for (genvar i = 0; i < CVA6Cfg.NrIssuePorts; i++) begin - assign fetch_entry_is_cf[i] = fetch_entry_o[i].branch_predict.cf != ariane_pkg::NoCF; + assign fetch_entry_is_cf[i] = fetch_entry_o[i].branch_predict.valid; assign fetch_entry_fire[i] = fetch_entry_valid_o[i] & fetch_entry_ready_i[i]; end @@ -485,7 +497,7 @@ module instr_queue push_address = 1'b0; // check if we are pushing a ctrl flow change, if so save the address for (int i = 0; i < CVA6Cfg.INSTR_PER_FETCH; i++) begin - push_address |= push_instr[i] & (instr_data_in[i].cf != ariane_pkg::NoCF); + push_address |= push_instr[i] & instr_data_in[i].cf_valid; end end diff --git a/core/frontend/instr_scan.sv b/core/frontend/instr_scan.sv index 69e45ff69ef..11915145994 100644 --- a/core/frontend/instr_scan.sv +++ b/core/frontend/instr_scan.sv @@ -70,7 +70,7 @@ module instr_scan #( endfunction logic rv32_rvc_jal; - assign rv32_rvc_jal = (CVA6Cfg.XLEN == 32) & ((instr_i[15:13] == riscv::OpcodeC1Jal) & (instr_i[1:0] == riscv::OpcodeC1)); + assign rv32_rvc_jal = CVA6Cfg.IS_XLEN32 & ((instr_i[15:13] == riscv::OpcodeC1Jal) & (instr_i[1:0] == riscv::OpcodeC1)); logic is_xret; assign is_xret = logic'(instr_i[31:30] == 2'b00) & logic'(instr_i[28:0] == 29'b10000001000000000000001110011); @@ -78,7 +78,7 @@ module instr_scan #( // check that rs1 is either x1 or x5 and that rd is not rs1 assign rvi_return_o = rvi_jalr_o & ((instr_i[19:15] == 5'd1) | instr_i[19:15] == 5'd5) & (instr_i[19:15] != instr_i[11:7]); - // Opocde is JAL[R] and destination register is either x1 or x5 + // Opcode is JAL[R] and destination register is either x1 or x5 assign rvi_call_o = (rvi_jalr_o | rvi_jump_o) & ((instr_i[11:7] == 5'd1) | instr_i[11:7] == 5'd5); // differentiates between JAL and BRANCH opcode, JALR comes from BHT assign rvi_imm_o = is_xret ? '0 : (instr_i[3]) ? uj_imm(instr_i) : sb_imm(instr_i); @@ -92,6 +92,7 @@ module instr_scan #( // always links to register 0 logic is_jal_r; assign is_jal_r = (instr_i[15:13] == riscv::OpcodeC2JalrMvAdd) + & (instr_i[11:7] != 5'b00000) & (instr_i[6:2] == 5'b00000) & (instr_i[1:0] == riscv::OpcodeC2); assign rvc_jr_o = is_jal_r & ~instr_i[12]; diff --git a/core/id_stage.sv b/core/id_stage.sv index d37554db4f1..5c5cdbdf358 100644 --- a/core/id_stage.sv +++ b/core/id_stage.sv @@ -51,7 +51,7 @@ module id_stage #( output logic [CVA6Cfg.NrIssuePorts-1:0] issue_entry_valid_o, // Report if instruction is a control flow instruction - ISSUE output logic [CVA6Cfg.NrIssuePorts-1:0] is_ctrl_flow_o, - // Handshake's acknowlege between decode and issue - ISSUE + // Handshake's acknowledge between decode and issue - ISSUE input logic [CVA6Cfg.NrIssuePorts-1:0] issue_instr_ack_i, // Information dedicated to RVFI - RVFI output logic [CVA6Cfg.NrIssuePorts-1:0] rvfi_is_compressed_o, @@ -83,6 +83,18 @@ module id_stage #( input logic tsr_i, // Hypervisor user mode - CSR_REGFILE input logic hu_i, + // machine-mode cache block invalidate enable - CSR_REGFILE + input riscv::cbie_t mcbie_i, + // supervisor-mode cache block invalidate enable - CSR_REGFILE + input riscv::cbie_t scbie_i, + // hypervisor-mode cache block invalidate enable - CSR_REGFILE + input riscv::cbie_t hcbie_i, + // machine-mode clean/flush cache block invalidate enable - CSR_REGFILE + input logic mcbcfe_i, + // supervisor-mode clean/flush cache block invalidate enable - CSR_REGFILE + input logic scbcfe_i, + // hypervisor-mode clean/flush cache block invalidate enable - CSR_REGFILE + input logic hcbcfe_i, // CVXIF Compressed interface input logic [CVA6Cfg.XLEN-1:0] hart_id_i, input logic compressed_ready_i, @@ -91,6 +103,8 @@ module id_stage #( input x_compressed_resp_t compressed_resp_i, output logic compressed_valid_o, output x_compressed_req_t compressed_req_o, + // mcontrol6 address match breakpoint exc. generation request from trigg. module + input logic [CVA6Cfg.XLEN-1:0] sdtrig_decoder_action_i[CVA6Cfg.NrIssuePorts], // Data cache request ouput - CACHE input dcache_req_o_t dcache_req_ports_i, // Data cache request input - CACHE @@ -236,7 +250,7 @@ module id_stage #( assign is_illegal_cvxif_i = is_zcmt_instr[0] ? is_illegal_zcmt : is_illegal_zcmp; assign is_compressed_cvxif_i = is_zcmt_instr[0] ? is_compressed_zcmt : is_compressed_zcmp; assign stall_macro_deco = is_zcmt_instr[0] ? stall_macro_deco_zcmt : stall_macro_deco_zcmp; - end else begin // Do not instantiate the mux which is not optimized cross-bondaries + end else begin // Do not instantiate the mux which is not optimized cross-boundaries assign instruction_cvxif_i = instruction_zcmp; assign is_illegal_cvxif_i = is_illegal_zcmp; assign is_compressed_cvxif_i = is_compressed_zcmp; @@ -269,6 +283,13 @@ module id_stage #( end else begin assign stall_instr_fetch[0] = stall_macro_deco; end + end else begin + for (genvar i = 0; i < CVA6Cfg.NrIssuePorts; i++) begin + assign is_illegal_rvc[i] = 1'b0; + assign instruction_rvc[i] = fetch_entry_i[i].instruction; + assign is_compressed_rvc[i] = 1'b0; + assign stall_instr_fetch[i] = 1'b0; + end end // --------------------------------------------------------- @@ -280,14 +301,16 @@ module id_stage #( is_illegal_deco = is_illegal_rvc; instruction_deco = instruction_rvc; is_compressed_deco = is_compressed_rvc; - if (CVA6Cfg.CvxifEn) begin - is_illegal_deco[0] = is_illegal_cvxif_o; - instruction_deco[0] = instruction_cvxif_o; - is_compressed_deco[0] = is_compressed_cvxif_o; - end else if (!CVA6Cfg.CvxifEn && (CVA6Cfg.RVZCMP || CVA6Cfg.RVZCMT)) begin - is_illegal_deco[0] = is_illegal_cvxif_i; - instruction_deco[0] = instruction_cvxif_i; - is_compressed_deco[0] = is_compressed_cvxif_i; + if (CVA6Cfg.RVC) begin + if (CVA6Cfg.CvxifEn) begin + is_illegal_deco[0] = is_illegal_cvxif_o; + instruction_deco[0] = instruction_cvxif_o; + is_compressed_deco[0] = is_compressed_cvxif_o; + end else if (CVA6Cfg.RVZCMP || CVA6Cfg.RVZCMT) begin + is_illegal_deco[0] = is_illegal_cvxif_i; + instruction_deco[0] = instruction_cvxif_i; + is_compressed_deco[0] = is_compressed_cvxif_i; + end end end @@ -330,9 +353,16 @@ module id_stage #( .vtw_i, .tsr_i, .hu_i, + .mcbie_i, + .scbie_i, + .hcbie_i, + .mcbcfe_i, + .scbcfe_i, + .hcbcfe_i, .instruction_o (decoded_instruction[i]), .orig_instr_o (orig_instr[i]), - .is_control_flow_instr_o (is_control_flow_instr[i]) + .is_control_flow_instr_o (is_control_flow_instr[i]), + .sdtrig_decoder_action_i (sdtrig_decoder_action_i[i]) ); end @@ -419,7 +449,7 @@ module id_stage #( // Clear the valid flag if issue has acknowledged the instruction if (issue_instr_ack_i[0]) issue_n[0].valid = 1'b0; - // TODO: refaire + // TODO: redo // if we have a space in the register and the fetch is valid, go get it // or the issue stage is currently acknowledging an instruction, which means that we will have space // for a new instruction diff --git a/core/include/aes_pkg.sv b/core/include/aes_pkg.sv new file mode 100644 index 00000000000..c5217f336de --- /dev/null +++ b/core/include/aes_pkg.sv @@ -0,0 +1,219 @@ +// Licensed under the Solderpad Hardware Licence, Version 2.1 (the "License"); +// you may not use this file except in compliance with the License. +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +// You may obtain a copy of the License at https://solderpad.org/licenses/ +// +// Author: Munail Waqar, 10xEngineers +// Date: 03.05.2025 +// Description: The Zkn extension including its subsets accelerates cryptographic workloads by introducing dedicated +// scalar instructions compliant with the RISC-V Scalar Cryptography specification. The subsets include: +// Zknd (AES Decryption and related instructions), Zkne (AES Encryption support, including AES rounds and key expansion steps), +// Zknh (SHA-256 and SHA-512 hash functions for secure hashing operations). +// +package aes_pkg; + + // ---------------------- + // AES functions + // ---------------------- + + // AES MixColumns Forward + function automatic [31:0] aes_mixcolumn_fwd(input [31:0] x); + begin + aes_mixcolumn_fwd = { + (((x[7:0] << 1) ^ ((x[7]) ? 8'h1B : 8'h00)) ^ x[7:0]) ^ x[15:8] ^ x[23:16] ^ ((x[31:24] << 1) ^ ((x[31]) ? 8'h1B : 8'h00)), + x[7:0] ^ x[15:8] ^ ((x[23:16] << 1) ^ ((x[23]) ? 8'h1B : 8'h00)) ^ (((x[31:24] << 1) ^ ((x[31]) ? 8'h1B : 8'h00)) ^ x[31:24]), + x[7:0] ^ ((x[15:8] << 1) ^ ((x[15]) ? 8'h1B : 8'h00)) ^ (((x[23:16] << 1) ^ ((x[23]) ? 8'h1B : 8'h00)) ^ x[23:16]) ^ x[31:24], + ((x[7:0] << 1) ^ ((x[7]) ? 8'h1B : 8'h00)) ^ (((x[15:8] << 1) ^ ((x[15]) ? 8'h1B : 8'h00)) ^ x[15:8]) ^ x[23:16] ^ x[31:24] + }; + end + endfunction + // AES subword Forward + function automatic [31:0] aes_subword_fwd(input [31:0] word); + aes_subword_fwd = { + aes_sbox_fwd(word[31:24]), + aes_sbox_fwd(word[23:16]), + aes_sbox_fwd(word[15:8]), + aes_sbox_fwd(word[7:0]) + }; + endfunction + // AES Round Constant + function automatic [31:0] aes_decode_rcon(input [3:0] r); + case (r) + 4'h0: aes_decode_rcon = 32'h00000001; + 4'h1: aes_decode_rcon = 32'h00000002; + 4'h2: aes_decode_rcon = 32'h00000004; + 4'h3: aes_decode_rcon = 32'h00000008; + 4'h4: aes_decode_rcon = 32'h00000010; + 4'h5: aes_decode_rcon = 32'h00000020; + 4'h6: aes_decode_rcon = 32'h00000040; + 4'h7: aes_decode_rcon = 32'h00000080; + 4'h8: aes_decode_rcon = 32'h0000001b; + 4'h9: aes_decode_rcon = 32'h00000036; + 4'hA: aes_decode_rcon = 32'h00000000; + 4'hB: aes_decode_rcon = 32'h00000000; + 4'hC: aes_decode_rcon = 32'h00000000; + 4'hD: aes_decode_rcon = 32'h00000000; + 4'hE: aes_decode_rcon = 32'h00000000; + 4'hF: aes_decode_rcon = 32'h00000000; + default: aes_decode_rcon = 32'h00000000; + endcase + endfunction + // AES MixColumns Inverse + function automatic logic [31:0] aes_mixcolumn_inv(input logic [31:0] x); + aes_mixcolumn_inv = { + (gfmul(x[7:0], 4'hB) ^ gfmul(x[15:8], 4'hD) ^ gfmul(x[23:16], 4'h9) ^ gfmul(x[31:24], 4'hE)), + (gfmul(x[7:0], 4'hD) ^ gfmul(x[15:8], 4'h9) ^ gfmul(x[23:16], 4'hE) ^ gfmul(x[31:24], 4'hB)), + (gfmul(x[7:0], 4'h9) ^ gfmul(x[15:8], 4'hE) ^ gfmul(x[23:16], 4'hB) ^ gfmul(x[31:24], 4'hD)), + (gfmul(x[7:0], 4'hE) ^ gfmul(x[15:8], 4'hB) ^ gfmul(x[23:16], 4'hD) ^ gfmul(x[31:24], 4'h9)) + }; + endfunction + // GF multiplication + function automatic logic [7:0] gfmul(input logic [7:0] x, input logic [3:0] y); + logic [7:0] result, temp; + result = 8'h00; + if (y[0]) result ^= x; + if (y[1]) begin + result ^= ((x << 1) ^ ((x[7]) ? 8'h1B : 8'h00)); + end + if (y[2]) begin + temp = (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00); + result ^= (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00); + end + if (y[3]) begin + temp = (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00); + temp = (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00); + result ^= (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00); + end + return result; + endfunction + // AES Sbox implementation based on https://github.com/riscv/riscv-crypto + // AES Sbox Forward + function automatic logic [7:0] aes_sbox_fwd(input logic [7:0] in_byte); + logic [20:0] expanded; + logic [17:0] non_linear; + logic [ 7:0] compressed; + expanded = linear_top_layer(in_byte); + non_linear = non_linear_layer(expanded); + compressed = linear_bottom_layer(non_linear); + aes_sbox_fwd = compressed; + endfunction + // AES Sbox Inverse + function automatic logic [7:0] aes_sbox_inv(input logic [7:0] in_byte); + logic [20:0] expanded; + logic [17:0] non_linear; + logic [ 7:0] compressed; + expanded = aes_sbox_inv_top(in_byte); + non_linear = non_linear_layer(expanded); + compressed = aes_sbox_inv_out(non_linear); + aes_sbox_inv = compressed; + endfunction + // AES Sbox Forward Top Layer + function automatic logic [20:0] linear_top_layer(input logic [7:0] x); + return { + ((x[7] ^ x[4]) ^ (x[5] ^ x[2])), + (((x[7] ^ x[4]) ^ ((x[6] ^ x[5]) ^ (x[4] ^ x[0]))) ^ ((x[0] ^ (x[6] ^ x[5])) ^ ((x[3] ^ x[1]) ^ (x[5] ^ x[2])))), + ((x[7] ^ x[2]) ^ (((x[7] ^ x[4]) ^ (x[3] ^ x[1])) ^ (x[6] ^ x[5]))), + ((x[7] ^ x[2]) ^ ((x[6] ^ x[5]) ^ (x[1] ^ x[0]))), + ((x[6] ^ x[5]) ^ (x[1] ^ x[0])), + ((x[7] ^ x[4]) ^ ((x[6] ^ x[5]) ^ (x[4] ^ x[0]))), + ((x[6] ^ x[5]) ^ (x[4] ^ x[0])), + ((x[0] ^ (x[6] ^ x[5])) ^ ((x[3] ^ x[1]) ^ (x[5] ^ x[2]))), + ((x[3] ^ x[1]) ^ (x[5] ^ x[2])), + ((x[3] ^ x[1]) ^ (x[6] ^ x[2])), + (((x[7] ^ x[4]) ^ (x[3] ^ x[1])) ^ (x[6] ^ x[2])), + ((x[7] ^ x[1]) ^ (x[4] ^ x[2])), + (((x[7] ^ x[4]) ^ (x[3] ^ x[1])) ^ (x[6] ^ x[5])), + (x[0] ^ (x[6] ^ x[5])), + (x[0] ^ ((x[7] ^ x[4]) ^ (x[3] ^ x[1]))), + ((x[7] ^ x[4]) ^ (x[3] ^ x[1])), + (x[4] ^ x[2]), + (x[7] ^ x[1]), + (x[7] ^ x[2]), + (x[7] ^ x[4]), + (x[0]) + }; + endfunction + // AES Sbox Middle Layer + function automatic logic [17:0] non_linear_layer(input logic [20:0] x); + logic t1, t2, t3, t4, t5; + logic [17:0] y; + t1 = (((x[10] ^ (x[9] & x[5])) ^ (x[17] & x[6])) ^ ((x[4] & x[20]) ^ (x[1] & x[11]))); + t2 = ((((x[14] & x[0]) ^ (x[9] & x[5])) ^ x[18]) ^ ((x[2] & x[8]) ^ (x[1] & x[11]))); + t3 = ((((x[3] ^ x[12]) ^ (x[3] & x[12])) ^ (x[16] & x[7])) ^ ((x[4] & x[20]) ^ (x[1] & x[11]))); + t4 = ((((x[15] & x[13]) ^ (x[3] & x[12])) ^ ((x[2] & x[8]) ^ (x[1] & x[11]))) ^ x[19]); + t5 = ((((t1 ^ t2) & (t1 & t4)) ^ ((t1 ^ t2) ^ (t3 & t1))) ^ (((t3 ^ t4) & (t2 & t3)) ^ ((t3 ^ t4) ^ (t3 & t1)))); + + y[0] = (((t1 ^ t2) & (t1 & t4)) ^ ((t1 ^ t2) ^ (t3 & t1))) & x[7]; + y[1] = (t2 ^ ((t4 ^ (t3 & t1)) & (t1 ^ t2))) & x[13]; + y[2] = ((t2 ^ ((t4 ^ (t3 & t1)) & (t1 ^ t2))) ^ (t4 ^ ((t2 ^ (t3 & t1)) & (t3 ^ t4)))) & x[11]; + y[3] = (((t2 ^ ((t4 ^ (t3 & t1)) & (t1 ^ t2))) ^ (t4 ^ ((t2 ^ (t3 & t1)) & (t3 ^ t4)))) ^ t5) & x[20]; + y[4] = t5 & x[8]; + y[5] = ((t4 ^ ((t2 ^ (t3 & t1)) & (t3 ^ t4))) ^ (((t3 ^ t4) & (t2 & t3)) ^ ((t3 ^ t4) ^ (t3 & t1)))) & x[9]; + y[6] = (((t3 ^ t4) & (t2 & t3)) ^ ((t3 ^ t4) ^ (t3 & t1))) & x[17]; + y[7] = (t4 ^ ((t2 ^ (t3 & t1)) & (t3 ^ t4))) & x[14]; + y[8] = ((t2 ^ ((t4 ^ (t3 & t1)) & (t1 ^ t2))) ^ (((t1 ^ t2) & (t1 & t4)) ^ ((t1 ^ t2) ^ (t3 & t1)))) & x[3]; + y[9] = (((t1 ^ t2) & (t1 & t4)) ^ ((t1 ^ t2) ^ (t3 & t1))) & x[16]; + y[10] = (t2 ^ ((t4 ^ (t3 & t1)) & (t1 ^ t2))) & x[15]; + y[11] = ((t2 ^ ((t4 ^ (t3 & t1)) & (t1 ^ t2))) ^ (t4 ^ ((t2 ^ (t3 & t1)) & (t3 ^ t4)))) & x[1]; + y[12] = (((t2 ^ ((t4 ^ (t3 & t1)) & (t1 ^ t2))) ^ (t4 ^ ((t2 ^ (t3 & t1)) & (t3 ^ t4)))) ^ t5) & x[4]; + y[13] = t5 & x[2]; + y[14] = ((t4 ^ ((t2 ^ (t3 & t1)) & (t3 ^ t4))) ^ (((t3 ^ t4) & (t2 & t3)) ^ ((t3 ^ t4) ^ (t3 & t1)))) & x[5]; + y[15] = (((t3 ^ t4) & (t2 & t3)) ^ ((t3 ^ t4) ^ (t3 & t1))) & x[6]; + y[16] = (t4 ^ ((t2 ^ (t3 & t1)) & (t3 ^ t4))) & x[0]; + y[17] = ((t2 ^ ((t4 ^ (t3 & t1)) & (t1 ^ t2))) ^ (((t1 ^ t2) & (t1 & t4)) ^ ((t1 ^ t2) ^ (t3 & t1)))) & x[12]; + return y; + endfunction + // AES Sbox Forward Bottom Layer + function automatic logic [7:0] linear_bottom_layer(input logic [17:0] x); + logic [7:0] y; + y[0] = ((x[12] ^ (x[17] ^ x[11])) ^~ ((x[8] ^ (x[1] ^ x[9])) ^ (x[14] ^ x[16]))); + y[1] = ((x[0] ^ (x[11] ^ x[12])) ^~ ((x[1] ^ x[9]) ^ (x[3] ^ (x[4] ^ x[8])))); + y[2] = (((x[12] ^ (x[17] ^ x[11])) ^ (x[3] ^ (x[4] ^ x[8]))) ^ ((x[10] ^ (x[14] ^ x[16])) ^ (x[7] ^ (x[0] ^ x[6])))); + y[3] = (((x[11] ^ x[12]) ^ (x[0] ^ x[6])) ^ ((x[15] ^ x[5]) ^ (x[16] ^ x[1]))); + y[4] = ((x[12] ^ (x[17] ^ x[11])) ^ ((x[0] ^ x[6]) ^ (x[14] ^ (x[15] ^ x[5])))); + y[5] = ((x[13] ^ (x[4] ^ x[8])) ^~ ((x[10] ^ (x[14] ^ x[16])) ^ (x[2] ^ x[11]))); + y[6] = ((x[6] ^ (x[11] ^ x[12])) ^~ ((x[14] ^ (x[15] ^ x[5])) ^ (x[2] ^ x[3]))); + y[7] = ((x[12] ^ (x[17] ^ x[11])) ^ ((x[5] ^ (x[0] ^ x[6])) ^ (x[2] ^ x[3]))); + return y; + endfunction + // AES Sbox Inverse Top Layer + function automatic logic [20:0] aes_sbox_inv_top(input logic [7:0] x); + return { + ((x[4] ^ x[3]) ^ (x[2] ^~ x[1])), + (x[5] ^~ (x[4] ^ x[3])), + (x[3] ^~ x[0]), + (x[7] ^ x[4]), + (x[6] ^~ x[4]), + ((x[3] ^~ x[0]) ^ (x[6] ^ x[1])), + ((x[6] ^~ x[4]) ^ (x[1] ^ x[0])), + (x[5] ^~ ((x[6] ^~ x[4]) ^ (x[1] ^ x[0]))), + ((x[6] ^ x[1]) ^ (x[5] ^~ x[3])), + (((x[7] ^~ x[6]) ^ (x[3] ^~ x[0])) ^ ((x[4] ^ x[3]) ^ (x[2] ^~ x[1]))), + (((x[7] ^~ x[6]) ^ (x[3] ^~ x[0])) ^ (x[2] ^~ x[1])), + ((x[7] ^~ x[6]) ^ (x[1] ^ x[0])), + ((x[7] ^~ x[6]) ^ (x[3] ^~ x[0])), + (x[0] ^~ (x[4] ^ x[3])), + (x[6] ^~ (x[7] ^ x[4])), + ((x[6] ^~ x[4]) ^ (x[5] ^~ x[2])), + (x[3] ^ (x[6] ^~ (x[7] ^ x[4]))), + ((x[4] ^ x[3]) ^ (x[1] ^ x[0])), + (x[7] ^~ x[6]), + (x[4] ^ x[3]), + (x[7] ^ (x[5] ^~ x[2])) + }; + endfunction + // AES Sbox Inverse Bottom Layer + function automatic logic [7:0] aes_sbox_inv_out(input logic [17:0] x); + logic [7:0] y; + y[0] = ((x[5] ^ x[13]) ^ (x[7] ^ x[11])); + y[1] = ((x[17] ^ x[12]) ^ (((x[2] ^ x[11]) ^ (x[8] ^ x[9])) ^ (x[0] ^ x[3]))); + y[2] = (((x[4] ^ x[12]) ^ (x[15] ^ x[0])) ^ ((x[14] ^ x[1]) ^ ((x[2] ^ x[11]) ^ (x[8] ^ x[9])))); + y[3] = ((((x[2] ^ x[11]) ^ (x[8] ^ x[9])) ^ (x[0] ^ x[3])) ^ ((x[7] ^ (x[16] ^ x[6])) ^ (x[13] ^ (x[14] ^ x[1])))); + y[4] = ((x[14] ^ x[16]) ^ ((x[4] ^ x[12]) ^ ((x[2] ^ x[11]) ^ (x[8] ^ x[9])))); + y[5] = ((x[8] ^ (x[4] ^ x[12])) ^ (((x[2] ^ x[11]) ^ (x[15] ^ x[0])) ^ ((x[17] ^ x[10]) ^ (x[7] ^ (x[16] ^ x[6]))))); + y[6] = (((x[5] ^ x[13]) ^ ((x[2] ^ x[11]) ^ (x[15] ^ x[0]))) ^ ((x[4] ^ x[9]) ^ ((x[16] ^ x[6]) ^ (x[17] ^ x[10])))); + y[7] = ((x[17] ^ x[1]) ^ ((x[4] ^ x[12]) ^ ((x[2] ^ x[11]) ^ (x[8] ^ x[9])))); + return y; + endfunction + +endpackage diff --git a/core/include/ariane_pkg.sv b/core/include/ariane_pkg.sv index 254721b2001..48736329e3e 100644 --- a/core/include/ariane_pkg.sv +++ b/core/include/ariane_pkg.sv @@ -39,7 +39,7 @@ package ariane_pkg; // we could in principle do without the commit queue in this case, but the timing degrades if we do that due // to longer paths into the commit stage // if CVA6Cfg.DCacheType = cva6_config_pkg::WB - // allocate more space for the commit buffer to be on the save side, this needs to be a power of two + // allocate more space for the commit buffer to be on the safe side, this needs to be a power of two localparam logic [2:0] DEPTH_COMMIT = 'd4; // Transprecision float unit @@ -54,6 +54,7 @@ package ariane_pkg; localparam logic [31:0] OPENHWGROUP_MVENDORID = 32'h0602; localparam logic [31:0] ARIANE_MARCHID = 32'd3; + localparam logic [31:0] ARIANE_MIMPID = 32'd0; // 32 registers localparam REG_ADDR_SIZE = 5; @@ -108,11 +109,12 @@ package ariane_pkg; localparam bit ZERO_TVAL = 1'b0; `endif - // read mask for SSTATUS over MMSTATUS + // read mask for SSTATUS over MSTATUS function automatic logic [63:0] smode_status_read_mask(config_pkg::cva6_cfg_t Cfg); return riscv::SSTATUS_UIE | riscv::SSTATUS_SIE | riscv::SSTATUS_SPIE + | riscv::SSTATUS_UBE | riscv::SSTATUS_SPP | riscv::SSTATUS_FS | riscv::SSTATUS_XS @@ -196,7 +198,8 @@ package ariane_pkg; FPU, // 7 FPU_VEC, // 8 CVXIF, // 9 - ACCEL // 10 + ACCEL, // 10 + AES // 11 } fu_t; // Index of writeback ports @@ -252,6 +255,7 @@ package ariane_pkg; localparam int unsigned ICACHE_SET_ASSOC = `CONFIG_L1I_ASSOCIATIVITY; localparam int unsigned ICACHE_INDEX_WIDTH = $clog2(`CONFIG_L1I_SIZE / ICACHE_SET_ASSOC); localparam int unsigned ICACHE_TAG_WIDTH = riscv::PLEN - ICACHE_INDEX_WIDTH; + localparam int unsigned AXI_USER_WIDTH = 64; localparam int unsigned ICACHE_USER_LINE_WIDTH = (AXI_USER_WIDTH == 1) ? 4 : 128; // in bit // D$ localparam int unsigned DCACHE_LINE_WIDTH = `CONFIG_L1D_CACHELINE_WIDTH; @@ -361,6 +365,11 @@ package ariane_pkg; AMO_MAXDU, AMO_MIND, AMO_MINDU, + // cache block operations (CBO) + CBO_CLEAN, + CBO_FLUSH, + CBO_INVAL, + CBO_NONE, // Multiplications MUL, MULH, @@ -496,9 +505,46 @@ package ariane_pkg; BREV8, // Zip instructions UNZIP, - ZIP + ZIP, + // Xperm instructions + XPERM8, + XPERM4, + // AES Encryption instructions + AES32ESI, + AES32ESMI, + AES64ES, + AES64ESM, + // AES Decryption instructions + AES32DSI, + AES32DSMI, + AES64DS, + AES64DSM, + AES64IM, + // AES Key-Schedule instructions + AES64KS1I, + AES64KS2, + // Hashing instructions + SHA256SIG0, + SHA256SIG1, + SHA256SUM0, + SHA256SUM1, + SHA512SIG0H, + SHA512SIG0L, + SHA512SIG1H, + SHA512SIG1L, + SHA512SUM0R, + SHA512SUM1R, + SHA512SIG0, + SHA512SIG1, + SHA512SUM0, + SHA512SUM1 } fu_op; + typedef struct packed { + logic rs1_from_rd; + logic rs2_from_rd; + } alu_bypass_t; + function automatic logic op_is_branch(input fu_op op); unique case (op) inside EQ, NE, LTS, GES, LTU, GEU: return 1'b1; @@ -534,7 +580,7 @@ package ariane_pkg; [FSD : FSB], // FP Stores [FADD : FMIN_MAX], // Computational Operations (no sqrt) [FMADD : FNMADD], // Fused Computational Operations - FCVT_F2F, // Vectorial F2F Conversions requrie target + FCVT_F2F, // Vectorial F2F Conversions require target [FSGNJ : FMV_F2X], // Sign Injections and moves mapped to SGNJ FCMP, // Comparisons [VFMIN : VFCPKCD_D]: @@ -574,6 +620,17 @@ package ariane_pkg; endcase endfunction + function automatic logic fd_changes_rd_state(input fu_op op); + unique case (op) inside + FSD, FSW, FSH, FSB, // stores + FCVT_F2I, // conversion to int + FMV_F2X, // move as-is to int + FCLASS: // classification (writes output to integer register) + return 1'b0; // floating-point registers are only read + default: return 1'b1; // other ops - floating-point registers are written as well + endcase + endfunction + function automatic logic is_amo(fu_op op); case (op) inside [AMO_LRW : AMO_MINDU]: begin @@ -753,6 +810,7 @@ package ariane_pkg; end LH, LHU, HLV_H, HLV_HU, HLVX_HU, SH, HSV_H, FLH, FSH: return 2'b01; LB, LBU, HLV_B, HLV_BU, SB, HSV_B, FLB, FSB: return 2'b00; + CBO_CLEAN, CBO_FLUSH, CBO_INVAL: return 2'b00; default: return 2'b11; endcase endfunction @@ -807,4 +865,12 @@ package ariane_pkg; return gppn; endfunction : make_gppn + // ---------------------- + // Helper functions + // ---------------------- + // Avoid negative array slices when defining parametrized sizes + function automatic int unsigned avoid_neg(int n); + return (n < 0) ? 0 : n; + endfunction : avoid_neg + endpackage diff --git a/core/include/build_config_pkg.sv b/core/include/build_config_pkg.sv index dae76f63c25..baa0a556880 100644 --- a/core/include/build_config_pkg.sv +++ b/core/include/build_config_pkg.sv @@ -26,20 +26,20 @@ package build_config_pkg; int unsigned DCACHE_OFFSET_WIDTH = $clog2(CVA6Cfg.DcacheLineWidth / 8); // MMU - int unsigned VpnLen = (CVA6Cfg.XLEN == 64) ? (CVA6Cfg.RVH ? 29 : 27) : 20; - int unsigned PtLevels = (CVA6Cfg.XLEN == 64) ? 3 : 2; + int unsigned VpnLen = IS_XLEN64 ? (CVA6Cfg.RVH ? 29 : 27) : 20; + int unsigned PtLevels = IS_XLEN64 ? 3 : 2; config_pkg::cva6_cfg_t cfg; cfg.XLEN = CVA6Cfg.XLEN; cfg.VLEN = CVA6Cfg.VLEN; - cfg.PLEN = (CVA6Cfg.XLEN == 32) ? 34 : 56; - cfg.GPLEN = (CVA6Cfg.XLEN == 32) ? 34 : 41; + cfg.PLEN = IS_XLEN32 ? 34 : 56; + cfg.GPLEN = IS_XLEN32 ? 34 : 41; cfg.IS_XLEN32 = IS_XLEN32; cfg.IS_XLEN64 = IS_XLEN64; cfg.XLEN_ALIGN_BYTES = $clog2(CVA6Cfg.XLEN / 8); - cfg.ASID_WIDTH = (CVA6Cfg.XLEN == 64) ? 16 : 1; - cfg.VMID_WIDTH = (CVA6Cfg.XLEN == 64) ? 14 : 1; + cfg.ASID_WIDTH = IS_XLEN64 ? 16 : 1; + cfg.VMID_WIDTH = IS_XLEN64 ? 14 : 1; cfg.FpgaEn = CVA6Cfg.FpgaEn; cfg.FpgaAlteraEn = CVA6Cfg.FpgaAlteraEn; @@ -50,6 +50,9 @@ package build_config_pkg; cfg.NrIssuePorts = unsigned'(CVA6Cfg.SuperscalarEn ? 2 : 1); cfg.SpeculativeSb = CVA6Cfg.SuperscalarEn; + cfg.NrALUs = CVA6Cfg.SuperscalarEn ? unsigned'(2) : unsigned'(1); + cfg.ALUBypass = CVA6Cfg.SuperscalarEn ? bit'(CVA6Cfg.ALUBypass) : bit'(0); + cfg.NrLoadPipeRegs = CVA6Cfg.NrLoadPipeRegs; cfg.NrStorePipeRegs = CVA6Cfg.NrStorePipeRegs; cfg.AxiAddrWidth = CVA6Cfg.AxiAddrWidth; @@ -64,7 +67,7 @@ package build_config_pkg; cfg.XF16ALT = CVA6Cfg.XF16ALT; cfg.XF8 = CVA6Cfg.XF8; cfg.RVA = CVA6Cfg.RVA; - cfg.RVB = CVA6Cfg.RVB; + cfg.RVB = CVA6Cfg.RVB || CVA6Cfg.ZKN; // ZKN requires RVB cfg.ZKN = CVA6Cfg.ZKN; cfg.RVV = CVA6Cfg.RVV; cfg.RVC = CVA6Cfg.RVC; @@ -74,7 +77,9 @@ package build_config_pkg; cfg.RVZCMP = CVA6Cfg.RVZCMP; cfg.XFVec = CVA6Cfg.XFVec; cfg.CvxifEn = CVA6Cfg.CvxifEn; + cfg.CoproType = CVA6Cfg.CoproType; cfg.RVZiCond = CVA6Cfg.RVZiCond; + cfg.RVZiCbom = CVA6Cfg.RVZiCbom; cfg.RVZicntr = CVA6Cfg.RVZicntr; cfg.RVZihpm = CVA6Cfg.RVZihpm; cfg.NR_SB_ENTRIES = CVA6Cfg.NrScoreboardEntries; @@ -102,7 +107,9 @@ package build_config_pkg; cfg.ExceptionAddress = CVA6Cfg.ExceptionAddress; cfg.RASDepth = CVA6Cfg.RASDepth; cfg.BTBEntries = CVA6Cfg.BTBEntries; + cfg.BPType = CVA6Cfg.BPType; cfg.BHTEntries = CVA6Cfg.BHTEntries; + cfg.BHTHist = CVA6Cfg.BHTHist; cfg.DmBaseAddress = CVA6Cfg.DmBaseAddress; cfg.TvalEn = CVA6Cfg.TvalEn; cfg.DirectVecOnly = CVA6Cfg.DirectVecOnly; @@ -123,6 +130,23 @@ package build_config_pkg; cfg.CachedRegionLength = CVA6Cfg.CachedRegionLength; cfg.MaxOutstandingStores = CVA6Cfg.MaxOutstandingStores; cfg.DebugEn = CVA6Cfg.DebugEn; + + cfg.Sdtrig = CVA6Cfg.Sdtrig; + cfg.SdtrigMcontrol6 = CVA6Cfg.Sdtrig ? CVA6Cfg.SdtrigMcontrol6 : 1'b0; + cfg.SdtrigIcount = CVA6Cfg.Sdtrig ? CVA6Cfg.SdtrigIcount : 1'b0; + cfg.SdtrigEtrigger = CVA6Cfg.Sdtrig ? CVA6Cfg.SdtrigEtrigger : 1'b0; + cfg.SdtrigItrigger = CVA6Cfg.Sdtrig ? CVA6Cfg.SdtrigItrigger : 1'b0; + cfg.SdtrigNrTriggers = CVA6Cfg.Sdtrig ? CVA6Cfg.SdtrigNrTriggers : 32'd0; + cfg.SdtrigMcontrol6ExecAddr = CVA6Cfg.SdtrigMcontrol6 ? CVA6Cfg.SdtrigMcontrol6ExecAddr : 1'b0; + cfg.SdtrigMcontrol6ExecData = CVA6Cfg.SdtrigMcontrol6 ? CVA6Cfg.SdtrigMcontrol6ExecData : 1'b0; + cfg.SdtrigMcontrol6Store = CVA6Cfg.SdtrigMcontrol6 ? CVA6Cfg.SdtrigMcontrol6Store : 1'b0; + cfg.SdtrigMcontrol6LoadAddr = CVA6Cfg.SdtrigMcontrol6 ? CVA6Cfg.SdtrigMcontrol6LoadAddr : 1'b0; + cfg.SdtrigMcontrol6LoadData = CVA6Cfg.SdtrigMcontrol6 ? CVA6Cfg.SdtrigMcontrol6LoadData : 1'b0; + cfg.SdtrigTriggerChaining = CVA6Cfg.SdtrigMcontrol6 ? CVA6Cfg.SdtrigTriggerChaining : 1'b0; + cfg.SdtrigSupportedActions = CVA6Cfg.Sdtrig ? (CVA6Cfg.DebugEn ? CVA6Cfg.SdtrigSupportedActions : 2'b01) : 2'b00; + cfg.SdtrigSupportedMatch = CVA6Cfg.Sdtrig ? CVA6Cfg.SdtrigSupportedMatch : 10'b00_0000_0000; + cfg.SdtrigSupportTextra = CVA6Cfg.Sdtrig ? CVA6Cfg.SdtrigSupportTextra : 1'b0; + cfg.NonIdemPotenceEn = (CVA6Cfg.NrNonIdempotentRules > 0) && (CVA6Cfg.NonIdempotentLength > 0); cfg.AxiBurstWriteEn = CVA6Cfg.AxiBurstWriteEn; @@ -149,8 +173,12 @@ package build_config_pkg; cfg.DCACHE_MAX_TX = unsigned'(2 ** CVA6Cfg.MemTidWidth); cfg.DcacheFlushOnFence = CVA6Cfg.DcacheFlushOnFence; + cfg.DcacheFlushOnFenceI = CVA6Cfg.DcacheFlushOnFenceI; cfg.DcacheInvalidateOnFlush = CVA6Cfg.DcacheInvalidateOnFlush; + cfg.DcacheEccEnable = CVA6Cfg.DcacheEccEnable; + cfg.DcacheEccScrubberEnable = CVA6Cfg.DcacheEccScrubberEnable; + cfg.DATA_USER_EN = CVA6Cfg.DataUserEn; cfg.WtDcacheWbufDepth = CVA6Cfg.WtDcacheWbufDepth; cfg.FETCH_USER_WIDTH = CVA6Cfg.FetchUserWidth; @@ -162,17 +190,18 @@ package build_config_pkg; cfg.INSTR_PER_FETCH = cfg.FETCH_WIDTH / (CVA6Cfg.RVC ? 16 : 32); cfg.LOG2_INSTR_PER_FETCH = cfg.INSTR_PER_FETCH > 1 ? $clog2(cfg.INSTR_PER_FETCH) : 1; - cfg.ModeW = (CVA6Cfg.XLEN == 32) ? 1 : 4; - cfg.ASIDW = (CVA6Cfg.XLEN == 32) ? 9 : 16; - cfg.VMIDW = (CVA6Cfg.XLEN == 32) ? 7 : 14; - cfg.PPNW = (CVA6Cfg.XLEN == 32) ? 22 : 44; - cfg.GPPNW = (CVA6Cfg.XLEN == 32) ? 22 : 29; - cfg.MODE_SV = (CVA6Cfg.XLEN == 32) ? config_pkg::ModeSv32 : config_pkg::ModeSv39; + cfg.ModeW = IS_XLEN32 ? 1 : 4; + cfg.ASIDW = IS_XLEN32 ? 9 : 16; + cfg.VMIDW = IS_XLEN32 ? 7 : 14; + cfg.PPNW = IS_XLEN32 ? 22 : 44; + cfg.GPPNW = IS_XLEN32 ? 22 : 29; + cfg.MODE_SV = IS_XLEN32 ? config_pkg::ModeSv32 : config_pkg::ModeSv39; cfg.SV = (cfg.MODE_SV == config_pkg::ModeSv32) ? 32 : 39; cfg.SVX = (cfg.MODE_SV == config_pkg::ModeSv32) ? 34 : 41; cfg.InstrTlbEntries = CVA6Cfg.InstrTlbEntries; cfg.DataTlbEntries = CVA6Cfg.DataTlbEntries; cfg.UseSharedTlb = CVA6Cfg.UseSharedTlb; + cfg.SvnapotEn = CVA6Cfg.SvnapotEn; cfg.SharedTlbDepth = CVA6Cfg.SharedTlbDepth; cfg.VpnLen = VpnLen; cfg.PtLevels = PtLevels; diff --git a/core/include/config_pkg.sv b/core/include/config_pkg.sv index 3396088024d..a68b2c14ea7 100644 --- a/core/include/config_pkg.sv +++ b/core/include/config_pkg.sv @@ -35,6 +35,12 @@ package config_pkg; HPDCACHE_WT_WB = 4 } cache_type_t; + /// Branch predictor parameter + typedef enum logic { + BHT = 0, // Bimodal predictor + PH_BHT = 1 // Private History Bimodal predictor + } bp_type_t; + /// Data and Address length typedef enum logic [3:0] { ModeOff = 0, @@ -45,6 +51,12 @@ package config_pkg; ModeSv64 = 11 } vm_mode_t; + /// Coprocessor type parameter + typedef enum { + COPRO_NONE, + COPRO_EXAMPLE + } copro_type_t; + localparam NrMaxRules = 16; typedef struct packed { @@ -56,7 +68,7 @@ package config_pkg; bit RVA; // Bit manipulation RISC-V extension bit RVB; - // Scalar Cryptography RISC-V entension + // Scalar Cryptography RISC-V extension bit ZKN; // Vector RISC-V extension bit RVV; @@ -72,6 +84,8 @@ package config_pkg; bit RVZCMT; // Zicond RISC-V extension bit RVZiCond; + // Zicbom RISC-V extension (cache management / CBO) + bit RVZiCbom; // Zicntr RISC-V extension bit RVZicntr; // Zihpm RISC-V extension @@ -106,6 +120,22 @@ package config_pkg; logic [63:0] HaltAddress; // Address to jump when exception logic [63:0] ExceptionAddress; + // Trigger Module Sdtrig Extension + bit Sdtrig; + bit SdtrigMcontrol6; + bit SdtrigMcontrol6ExecAddr; + bit SdtrigMcontrol6ExecData; + bit SdtrigMcontrol6Store; + bit SdtrigMcontrol6LoadAddr; + bit SdtrigMcontrol6LoadData; + bit SdtrigIcount; + bit SdtrigEtrigger; + bit SdtrigItrigger; + int SdtrigNrTriggers; + bit SdtrigTriggerChaining; + logic [1:0] SdtrigSupportedActions; + logic [9:0] SdtrigSupportedMatch; + bit SdtrigSupportTextra; // Tval Support Enable bit TvalEn; // MTVEC CSR supports only direct mode @@ -140,6 +170,8 @@ package config_pkg; logic [NrMaxRules-1:0][63:0] CachedRegionLength; // CV-X-IF coprocessor interface enable bit CvxifEn; + // Coprocessor type + copro_type_t CoproType; // NOC bus type noc_type_e NOCType; // AXI address width @@ -170,52 +202,81 @@ package config_pkg; int unsigned DcacheSetAssoc; // Data cache line width int unsigned DcacheLineWidth; - // Data cache flush on fence - bit DcacheFlushOnFence; - // Data cache invalidate on flush - bit DcacheInvalidateOnFlush; + // three configurations for cache coherency after flush: + // DcacheFlushOnFence causes dcache flush for every fence instruction + // DcacheFlushOnFenceI causes dcache flush for every fence.I instruction + // DcacheInvalidateOnFlush causes dcache to also be invalidated when flushed + // tradeoff between coherence and efficiency, depending on remaining configuration: + + // DcacheFlushOnFenceI is required for write-back caches - otherwise, + // no way to reliably write instruction memory with store instructions, + // as data and instruction cache are currently not coherent + // DcacheFlushOnFence is required for write-back caches to ensure coherency + // with other harts or DMA devices --> a fence forces all stores to commit to memory + // DcacheInvalidateOnFlush causes all dcache entries to become invalid, forcing the CPU + // to fetch data from memory after each fence --> make writes from other harts or DMAs + // visible to the CPU + // thus, DcacheFlushOnFence and DcacheInvalidateOnFlush can ensure DMA coherency at high performance cost + // using RVZiCbom can achieve the same effect at significantly lower performance cost + // hence, on uniprocessor or not cache-coherent multiprocessor SoCs, one might want to disable both and use + // explicit CBO operations for better overall performance + bit DcacheFlushOnFence; + bit DcacheFlushOnFenceI; + bit DcacheInvalidateOnFlush; + // Is Error Detection and Correction enabled in the L1D ? + bit DcacheEccEnable; + // Is Error Detection and Correction scrubber integrated in the L1D ? + bit DcacheEccScrubberEnable; // User field on data bus enable - int unsigned DataUserEn; + int unsigned DataUserEn; // Write-through data cache write buffer depth - int unsigned WtDcacheWbufDepth; + int unsigned WtDcacheWbufDepth; // User field on fetch bus enable - int unsigned FetchUserEn; + int unsigned FetchUserEn; // Width of fetch user field - int unsigned FetchUserWidth; + int unsigned FetchUserWidth; // Is FPGA optimization of CV32A6 for Xilinx and Altera - bit FpgaEn; + bit FpgaEn; // Is FPGA optimization for Altera FPGA - bit FpgaAlteraEn; - // Is Techno Cut instanciated - bit TechnoCut; + bit FpgaAlteraEn; + // Is Techno Cut instantiated + bit TechnoCut; // Enable superscalar* with 2 issue ports and 2 commit ports. - bit SuperscalarEn; + bit SuperscalarEn; + // Enable ALU-ALU bypass (superscalar mode only) + bit ALUBypass; // Number of commit ports. Forced to 2 if SuperscalarEn. - int unsigned NrCommitPorts; + int unsigned NrCommitPorts; // Load cycle latency number - int unsigned NrLoadPipeRegs; + int unsigned NrLoadPipeRegs; // Store cycle latency number - int unsigned NrStorePipeRegs; + int unsigned NrStorePipeRegs; // Scoreboard length - int unsigned NrScoreboardEntries; + int unsigned NrScoreboardEntries; // Load buffer entry buffer - int unsigned NrLoadBufEntries; + int unsigned NrLoadBufEntries; // Maximum number of outstanding stores - int unsigned MaxOutstandingStores; + int unsigned MaxOutstandingStores; // Return address stack depth - int unsigned RASDepth; + int unsigned RASDepth; // Branch target buffer entries - int unsigned BTBEntries; + int unsigned BTBEntries; + // Branch predictor type + bp_type_t BPType; // Branch history entries - int unsigned BHTEntries; + int unsigned BHTEntries; + // Branch history bits + int unsigned BHTHist; // MMU instruction TLB entries - int unsigned InstrTlbEntries; + int unsigned InstrTlbEntries; // MMU data TLB entries - int unsigned DataTlbEntries; + int unsigned DataTlbEntries; // MMU option to use shared TLB - bit unsigned UseSharedTlb; + bit unsigned UseSharedTlb; // MMU depth of shared TLB - int unsigned SharedTlbDepth; + int unsigned SharedTlbDepth; + // Option to enable Svnapot extension + bit SvnapotEn; } cva6_user_cfg_t; typedef struct packed { @@ -238,6 +299,9 @@ package config_pkg; int unsigned NrIssuePorts; bit SpeculativeSb; + int unsigned NrALUs; + bit ALUBypass; + int unsigned NrLoadPipeRegs; int unsigned NrStorePipeRegs; /// AXI parameters. @@ -263,7 +327,9 @@ package config_pkg; bit RVZCMT; bit XFVec; bit CvxifEn; + copro_type_t CoproType; bit RVZiCond; + bit RVZiCbom; bit RVZicntr; bit RVZihpm; @@ -290,36 +356,54 @@ package config_pkg; logic [63:0] ExceptionAddress; int unsigned RASDepth; int unsigned BTBEntries; + bp_type_t BPType; int unsigned BHTEntries; + int unsigned BHTHist; int unsigned InstrTlbEntries; int unsigned DataTlbEntries; bit unsigned UseSharedTlb; + bit SvnapotEn; int unsigned SharedTlbDepth; int unsigned VpnLen; int unsigned PtLevels; - logic [63:0] DmBaseAddress; - bit TvalEn; - bit DirectVecOnly; - int unsigned NrPMPEntries; - logic [63:0][63:0] PMPCfgRstVal; - logic [63:0][63:0] PMPAddrRstVal; - bit [63:0] PMPEntryReadOnly; - bit PMPNapotEn; - noc_type_e NOCType; - int unsigned NrNonIdempotentRules; + logic [63:0] DmBaseAddress; + bit TvalEn; + bit DirectVecOnly; + int unsigned NrPMPEntries; + logic [63:0][63:0] PMPCfgRstVal; + logic [63:0][63:0] PMPAddrRstVal; + bit [63:0] PMPEntryReadOnly; + bit PMPNapotEn; + noc_type_e NOCType; + int unsigned NrNonIdempotentRules; logic [NrMaxRules-1:0][63:0] NonIdempotentAddrBase; logic [NrMaxRules-1:0][63:0] NonIdempotentLength; - int unsigned NrExecuteRegionRules; + int unsigned NrExecuteRegionRules; logic [NrMaxRules-1:0][63:0] ExecuteRegionAddrBase; logic [NrMaxRules-1:0][63:0] ExecuteRegionLength; - int unsigned NrCachedRegionRules; + int unsigned NrCachedRegionRules; logic [NrMaxRules-1:0][63:0] CachedRegionAddrBase; logic [NrMaxRules-1:0][63:0] CachedRegionLength; - int unsigned MaxOutstandingStores; - bit DebugEn; - bit NonIdemPotenceEn; // Currently only used by V extension (Ara) - bit AxiBurstWriteEn; + int unsigned MaxOutstandingStores; + bit DebugEn; + bit NonIdemPotenceEn; // Currently only used by V extension (Ara) + bit AxiBurstWriteEn; + bit Sdtrig; + bit SdtrigMcontrol6; + bit SdtrigMcontrol6ExecAddr; + bit SdtrigMcontrol6ExecData; + bit SdtrigMcontrol6Store; + bit SdtrigMcontrol6LoadAddr; + bit SdtrigMcontrol6LoadData; + bit SdtrigIcount; + bit SdtrigEtrigger; + bit SdtrigItrigger; + int SdtrigNrTriggers; + bit SdtrigTriggerChaining; + logic [1:0] SdtrigSupportedActions; + logic [9:0] SdtrigSupportedMatch; + bit SdtrigSupportTextra; int unsigned ICACHE_SET_ASSOC; int unsigned ICACHE_SET_ASSOC_WIDTH; @@ -342,8 +426,12 @@ package config_pkg; int unsigned DCACHE_MAX_TX; bit DcacheFlushOnFence; + bit DcacheFlushOnFenceI; bit DcacheInvalidateOnFlush; + bit DcacheEccEnable; + bit DcacheEccScrubberEnable; + int unsigned DATA_USER_EN; int unsigned WtDcacheWbufDepth; int unsigned FETCH_USER_WIDTH; @@ -391,7 +479,6 @@ package config_pkg; assert (Cfg.NrExecuteRegionRules <= NrMaxRules); assert (Cfg.NrCachedRegionRules <= NrMaxRules); assert (Cfg.NrPMPEntries <= 64); - assert (!(Cfg.SuperscalarEn && Cfg.RVF)); assert (Cfg.FETCH_WIDTH == 32 || Cfg.FETCH_WIDTH == 64) else $fatal(1, "[frontend] fetch width != not supported"); // Support for disabling MIP.MSIP and MIE.MSIE in Hypervisor and Supervisor mode is not supported @@ -399,6 +486,12 @@ package config_pkg; assert (!(Cfg.RVS && !Cfg.SoftwareInterruptEn)); assert (!(Cfg.RVH && !Cfg.SoftwareInterruptEn)); assert (!(Cfg.RVZCMT && ~Cfg.MmuPresent)); + // Zcmp is incompatible with Zcd (compressed double-precision FP loads/stores, + // automatically present whenever both C and D are implemented), due to + // opcode collisions. + if (Cfg.RVZCMP && Cfg.RVC && Cfg.RVD) begin + $fatal(1, "[config] RVZCMP (Zcmp) and RVC+RVD (Zcd = C+D) are mutually exclusive"); + end // pragma translate_on endfunction diff --git a/core/include/cv32a60x_config_pkg.sv b/core/include/cv32a60x_config_pkg.sv index d7543d38213..faf8d1f8120 100644 --- a/core/include/cv32a60x_config_pkg.sv +++ b/core/include/cv32a60x_config_pkg.sv @@ -25,6 +25,7 @@ package cva6_config_pkg; FpgaAlteraEn: bit'(0), TechnoCut: bit'(1), SuperscalarEn: bit'(0), + ALUBypass: bit'(0), NrCommitPorts: unsigned'(1), AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth), AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth), @@ -48,7 +49,9 @@ package cva6_config_pkg; RVZCMP: bit'(0), XFVec: bit'(0), CvxifEn: bit'(1), + CoproType: config_pkg::COPRO_EXAMPLE, RVZiCond: bit'(0), + RVZiCbom: bit'(0), RVZicntr: bit'(0), RVZihpm: bit'(0), NrScoreboardEntries: unsigned'(4), @@ -61,11 +64,13 @@ package cva6_config_pkg; ExceptionAddress: 64'h808, RASDepth: unsigned'(2), BTBEntries: unsigned'(0), + BPType: config_pkg::BHT, BHTEntries: unsigned'(32), + BHTHist: unsigned'(3), DmBaseAddress: 64'h0, TvalEn: bit'(0), DirectVecOnly: bit'(1), - NrPMPEntries: unsigned'(8), + NrPMPEntries: unsigned'(0), PMPCfgRstVal: {64{64'h0}}, PMPAddrRstVal: {64{64'h0}}, PMPEntryReadOnly: 64'd0, @@ -82,6 +87,21 @@ package cva6_config_pkg; CachedRegionLength: 1024'({64'h40000000}), MaxOutstandingStores: unsigned'(7), DebugEn: bit'(0), + Sdtrig: bit'(0), + SdtrigMcontrol6: bit'(0), + SdtrigMcontrol6ExecAddr: bit'(0), + SdtrigMcontrol6ExecData: bit'(0), + SdtrigMcontrol6Store: bit'(0), + SdtrigMcontrol6LoadAddr: bit'(0), + SdtrigMcontrol6LoadData: bit'(0), + SdtrigIcount: bit'(0), + SdtrigEtrigger: bit'(0), + SdtrigItrigger: bit'(0), + SdtrigNrTriggers: int'(4), + SdtrigTriggerChaining: bit'(0), + SdtrigSupportedActions: {2{2'b01}}, + SdtrigSupportedMatch: {10{10'b00_0000_0001}}, + SdtrigSupportTextra: bit'(0), AxiBurstWriteEn: bit'(0), IcacheByteSize: unsigned'(2048), IcacheSetAssoc: unsigned'(2), @@ -91,7 +111,10 @@ package cva6_config_pkg; DcacheSetAssoc: unsigned'(2), DcacheLineWidth: unsigned'(128), DcacheFlushOnFence: bit'(0), + DcacheFlushOnFenceI: bit'(0), DcacheInvalidateOnFlush: bit'(0), + DcacheEccEnable: bit'(0), + DcacheEccScrubberEnable: bit'(0), DataUserEn: unsigned'(1), WtDcacheWbufDepth: int'(8), FetchUserWidth: unsigned'(32), @@ -99,6 +122,7 @@ package cva6_config_pkg; InstrTlbEntries: int'(2), DataTlbEntries: int'(2), UseSharedTlb: bit'(1), + SvnapotEn: bit'(0), SharedTlbDepth: int'(64), NrLoadPipeRegs: int'(0), NrStorePipeRegs: int'(0), diff --git a/core/include/cv32a65x_config_pkg.sv b/core/include/cv32a65x_config_pkg.sv index f68b382d628..686f09a3187 100644 --- a/core/include/cv32a65x_config_pkg.sv +++ b/core/include/cv32a65x_config_pkg.sv @@ -25,6 +25,7 @@ package cva6_config_pkg; FpgaAlteraEn: bit'(0), TechnoCut: bit'(1), SuperscalarEn: bit'(1), + ALUBypass: bit'(1), NrCommitPorts: unsigned'(1), AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth), AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth), @@ -48,7 +49,9 @@ package cva6_config_pkg; RVZCMP: bit'(0), XFVec: bit'(0), CvxifEn: bit'(1), + CoproType: config_pkg::COPRO_EXAMPLE, RVZiCond: bit'(0), + RVZiCbom: bit'(0), RVZicntr: bit'(0), RVZihpm: bit'(0), NrScoreboardEntries: unsigned'(8), @@ -61,7 +64,9 @@ package cva6_config_pkg; ExceptionAddress: 64'h808, RASDepth: unsigned'(2), BTBEntries: unsigned'(0), + BPType: config_pkg::BHT, BHTEntries: unsigned'(32), + BHTHist: unsigned'(3), DmBaseAddress: 64'h0, TvalEn: bit'(0), DirectVecOnly: bit'(1), @@ -82,6 +87,21 @@ package cva6_config_pkg; CachedRegionLength: 1024'({64'h40000000}), MaxOutstandingStores: unsigned'(7), DebugEn: bit'(0), + Sdtrig: bit'(0), + SdtrigMcontrol6: bit'(0), + SdtrigMcontrol6ExecAddr: bit'(0), + SdtrigMcontrol6ExecData: bit'(0), + SdtrigMcontrol6Store: bit'(0), + SdtrigMcontrol6LoadAddr: bit'(0), + SdtrigMcontrol6LoadData: bit'(0), + SdtrigIcount: bit'(0), + SdtrigEtrigger: bit'(0), + SdtrigItrigger: bit'(0), + SdtrigNrTriggers: int'(4), + SdtrigTriggerChaining: bit'(0), + SdtrigSupportedActions: {2{2'b01}}, + SdtrigSupportedMatch: {10{10'b00_0000_0001}}, + SdtrigSupportTextra: bit'(0), AxiBurstWriteEn: bit'(0), IcacheByteSize: unsigned'(2048), IcacheSetAssoc: unsigned'(2), @@ -91,7 +111,10 @@ package cva6_config_pkg; DcacheSetAssoc: unsigned'(2), DcacheLineWidth: unsigned'(128), DcacheFlushOnFence: bit'(0), + DcacheFlushOnFenceI: bit'(0), DcacheInvalidateOnFlush: bit'(0), + DcacheEccEnable: bit'(0), + DcacheEccScrubberEnable: bit'(0), DataUserEn: unsigned'(1), WtDcacheWbufDepth: int'(8), FetchUserWidth: unsigned'(32), @@ -99,6 +122,7 @@ package cva6_config_pkg; InstrTlbEntries: int'(2), DataTlbEntries: int'(2), UseSharedTlb: bit'(1), + SvnapotEn: bit'(0), SharedTlbDepth: int'(64), NrLoadPipeRegs: int'(0), NrStorePipeRegs: int'(0), diff --git a/core/include/cv32a6_ima_sv32_fpga_config_pkg.sv b/core/include/cv32a6_ima_sv32_fpga_config_pkg.sv index fffd4c8aba6..c9321babc5b 100644 --- a/core/include/cv32a6_ima_sv32_fpga_config_pkg.sv +++ b/core/include/cv32a6_ima_sv32_fpga_config_pkg.sv @@ -13,6 +13,7 @@ package cva6_config_pkg; localparam CVA6ConfigXlen = 32; localparam CVA6ConfigRVF = 0; + localparam CVA6ConfigRVD = 0; localparam CVA6ConfigF16En = 0; localparam CVA6ConfigF16AltEn = 0; localparam CVA6ConfigF8En = 0; @@ -77,6 +78,7 @@ package cva6_config_pkg; FpgaAlteraEn: bit'(0), // for Altera (only) TechnoCut: bit'(0), SuperscalarEn: bit'(0), + ALUBypass: bit'(0), NrCommitPorts: unsigned'(1), AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth), AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth), @@ -85,7 +87,7 @@ package cva6_config_pkg; MemTidWidth: unsigned'(CVA6ConfigMemTidWidth), NrLoadBufEntries: unsigned'(CVA6ConfigNrLoadBufEntries), RVF: bit'(CVA6ConfigRVF), - RVD: bit'(CVA6ConfigRVF), + RVD: bit'(CVA6ConfigRVD), XF16: bit'(CVA6ConfigF16En), XF16ALT: bit'(CVA6ConfigF16AltEn), XF8: bit'(CVA6ConfigF8En), @@ -100,7 +102,9 @@ package cva6_config_pkg; RVZCMP: bit'(CVA6ConfigZcmpExtEn), XFVec: bit'(CVA6ConfigFVecEn), CvxifEn: bit'(CVA6ConfigCvxifEn), + CoproType: config_pkg::COPRO_NONE, RVZiCond: bit'(CVA6ConfigRVZiCond), + RVZiCbom: bit'(0), RVZicntr: bit'(1), RVZihpm: bit'(1), NrScoreboardEntries: unsigned'(CVA6ConfigNrScoreboardEntries), @@ -113,7 +117,9 @@ package cva6_config_pkg; ExceptionAddress: 64'h808, RASDepth: unsigned'(CVA6ConfigRASDepth), BTBEntries: unsigned'(CVA6ConfigBTBEntries), + BPType: config_pkg::BHT, BHTEntries: unsigned'(CVA6ConfigBHTEntries), + BHTHist: unsigned'(3), DmBaseAddress: 64'h0, TvalEn: unsigned'(CVA6ConfigTvalEn), DirectVecOnly: bit'(0), @@ -134,6 +140,21 @@ package cva6_config_pkg; CachedRegionLength: 1024'({64'h40000000}), MaxOutstandingStores: unsigned'(7), DebugEn: bit'(1), + Sdtrig: bit'(0), + SdtrigMcontrol6: bit'(0), + SdtrigMcontrol6ExecAddr: bit'(0), + SdtrigMcontrol6ExecData: bit'(0), + SdtrigMcontrol6Store: bit'(0), + SdtrigMcontrol6LoadAddr: bit'(0), + SdtrigMcontrol6LoadData: bit'(0), + SdtrigIcount: bit'(0), + SdtrigEtrigger: bit'(0), + SdtrigItrigger: bit'(0), + SdtrigNrTriggers: int'(4), + SdtrigTriggerChaining: bit'(0), + SdtrigSupportedActions: {2{2'b01}}, + SdtrigSupportedMatch: {10{10'b00_0000_0001}}, + SdtrigSupportTextra: bit'(0), AxiBurstWriteEn: bit'(0), IcacheByteSize: unsigned'(CVA6ConfigIcacheByteSize), IcacheSetAssoc: unsigned'(CVA6ConfigIcacheSetAssoc), @@ -143,7 +164,10 @@ package cva6_config_pkg; DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc), DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth), DcacheFlushOnFence: bit'(0), + DcacheFlushOnFenceI: bit'(0), DcacheInvalidateOnFlush: bit'(0), + DcacheEccEnable: bit'(0), + DcacheEccScrubberEnable: bit'(0), DataUserEn: unsigned'(CVA6ConfigDataUserEn), WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth), FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth), @@ -151,6 +175,7 @@ package cva6_config_pkg; InstrTlbEntries: int'(2), DataTlbEntries: int'(2), UseSharedTlb: bit'(1), + SvnapotEn: bit'(0), SharedTlbDepth: int'(64), NrLoadPipeRegs: int'(CVA6ConfigNrLoadPipeRegs), NrStorePipeRegs: int'(CVA6ConfigNrStorePipeRegs), diff --git a/core/include/cv32a6_imac_sv32_config_pkg.sv b/core/include/cv32a6_imac_sv32_config_pkg.sv index b55345369a3..d0824c0b820 100644 --- a/core/include/cv32a6_imac_sv32_config_pkg.sv +++ b/core/include/cv32a6_imac_sv32_config_pkg.sv @@ -13,6 +13,7 @@ package cva6_config_pkg; localparam CVA6ConfigXlen = 32; localparam CVA6ConfigRVF = 0; + localparam CVA6ConfigRVD = 0; localparam CVA6ConfigF16En = 0; localparam CVA6ConfigF16AltEn = 0; localparam CVA6ConfigF8En = 0; @@ -76,6 +77,7 @@ package cva6_config_pkg; FpgaAlteraEn: bit'(0), // for Altera (only) TechnoCut: bit'(0), SuperscalarEn: bit'(0), + ALUBypass: bit'(0), NrCommitPorts: unsigned'(2), AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth), AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth), @@ -84,7 +86,7 @@ package cva6_config_pkg; MemTidWidth: unsigned'(CVA6ConfigMemTidWidth), NrLoadBufEntries: unsigned'(CVA6ConfigNrLoadBufEntries), RVF: bit'(CVA6ConfigRVF), - RVD: bit'(CVA6ConfigRVF), + RVD: bit'(CVA6ConfigRVD), XF16: bit'(CVA6ConfigF16En), XF16ALT: bit'(CVA6ConfigF16AltEn), XF8: bit'(CVA6ConfigF8En), @@ -99,7 +101,9 @@ package cva6_config_pkg; RVZCMP: bit'(CVA6ConfigZcmpExtEn), XFVec: bit'(CVA6ConfigFVecEn), CvxifEn: bit'(CVA6ConfigCvxifEn), + CoproType: config_pkg::COPRO_NONE, RVZiCond: bit'(CVA6ConfigRVZiCond), + RVZiCbom: bit'(0), RVZicntr: bit'(1), RVZihpm: bit'(1), NrScoreboardEntries: unsigned'(CVA6ConfigNrScoreboardEntries), @@ -112,7 +116,9 @@ package cva6_config_pkg; ExceptionAddress: 64'h808, RASDepth: unsigned'(CVA6ConfigRASDepth), BTBEntries: unsigned'(CVA6ConfigBTBEntries), + BPType: config_pkg::BHT, BHTEntries: unsigned'(CVA6ConfigBHTEntries), + BHTHist: unsigned'(3), DmBaseAddress: 64'h0, TvalEn: bit'(CVA6ConfigTvalEn), DirectVecOnly: bit'(0), @@ -133,6 +139,21 @@ package cva6_config_pkg; CachedRegionLength: 1024'({64'h40000000}), MaxOutstandingStores: unsigned'(7), DebugEn: bit'(1), + Sdtrig: bit'(0), + SdtrigMcontrol6: bit'(0), + SdtrigMcontrol6ExecAddr: bit'(0), + SdtrigMcontrol6ExecData: bit'(0), + SdtrigMcontrol6Store: bit'(0), + SdtrigMcontrol6LoadAddr: bit'(0), + SdtrigMcontrol6LoadData: bit'(0), + SdtrigIcount: bit'(0), + SdtrigEtrigger: bit'(0), + SdtrigItrigger: bit'(0), + SdtrigNrTriggers: int'(4), + SdtrigTriggerChaining: bit'(0), + SdtrigSupportedActions: {2{2'b01}}, + SdtrigSupportedMatch: {10{10'b00_0000_0001}}, + SdtrigSupportTextra: bit'(0), AxiBurstWriteEn: bit'(0), IcacheByteSize: unsigned'(CVA6ConfigIcacheByteSize), IcacheSetAssoc: unsigned'(CVA6ConfigIcacheSetAssoc), @@ -142,7 +163,10 @@ package cva6_config_pkg; DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc), DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth), DcacheFlushOnFence: bit'(0), + DcacheFlushOnFenceI: bit'(0), DcacheInvalidateOnFlush: bit'(0), + DcacheEccEnable: bit'(0), + DcacheEccScrubberEnable: bit'(0), DataUserEn: unsigned'(CVA6ConfigDataUserEn), WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth), FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth), @@ -150,6 +174,7 @@ package cva6_config_pkg; InstrTlbEntries: int'(2), DataTlbEntries: int'(2), UseSharedTlb: bit'(1), + SvnapotEn: bit'(0), SharedTlbDepth: int'(64), NrLoadPipeRegs: int'(CVA6ConfigNrLoadPipeRegs), NrStorePipeRegs: int'(CVA6ConfigNrStorePipeRegs), diff --git a/core/include/cv64a60ax_config_pkg.sv b/core/include/cv64a60ax_config_pkg.sv new file mode 100644 index 00000000000..33f25973e14 --- /dev/null +++ b/core/include/cv64a60ax_config_pkg.sv @@ -0,0 +1,140 @@ +// Copyright 2021 Thales DIS design services SAS +// +// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +// You may obtain a copy of the License at https://solderpad.org/licenses/ +// +// Original Author: Jean-Roch COULON - Thales +// +// Copyright 2023 Commissariat a l'Energie Atomique et aux Energies +// Alternatives (CEA) +// +// Author: Tanuj Khandelwal - CEA +// Date: January, 2025 +// Description: CVA6 configuration package using the HPDcache as cache subsystem + + +package cva6_config_pkg; + + localparam CVA6ConfigXlen = 64; + localparam CVA6ConfigRvfiTrace = 1; + + localparam CVA6ConfigAxiIdWidth = 4; + localparam CVA6ConfigAxiAddrWidth = 39; + localparam CVA6ConfigAxiDataWidth = 128; + localparam CVA6ConfigDataUserWidth = 12; + + +localparam config_pkg::cva6_user_cfg_t cva6_cfg = '{ + XLEN: unsigned'(CVA6ConfigXlen), + VLEN: unsigned'(64), + FpgaEn: bit'(0), // for Xilinx and Altera + FpgaAlteraEn: bit'(0), // for Altera (only) + TechnoCut: bit'(0), + SuperscalarEn: bit'(0), + ALUBypass: bit'(0), + NrCommitPorts: unsigned'(2), + AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth), + AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth), + AxiIdWidth: unsigned'(CVA6ConfigAxiIdWidth), + AxiUserWidth: unsigned'(CVA6ConfigDataUserWidth), + MemTidWidth: unsigned'(CVA6ConfigAxiIdWidth), + NrLoadBufEntries: unsigned'(8), + RVF: bit'(1), + RVD: bit'(1), + XF16: bit'(0), + XF16ALT: bit'(0), + XF8: bit'(0), + RVA: bit'(1), + RVB: bit'(1), + ZKN: bit'(0), + RVV: bit'(0), + RVC: bit'(1), + RVH: bit'(0), + RVZCMT: bit'(0), + RVZCB: bit'(1), + RVZCMP: bit'(0), + XFVec: bit'(0), + CvxifEn: bit'(1), + CoproType: config_pkg::COPRO_EXAMPLE, + RVZiCond: bit'(1), + RVZicntr: bit'(1), + RVZiCbom: bit'(1), + RVZihpm: bit'(1), + NrScoreboardEntries: unsigned'(8), + PerfCounterEn: bit'(1), + MmuPresent: bit'(1), + RVS: bit'(1), + RVU: bit'(1), + SoftwareInterruptEn: bit'(1), + HaltAddress: 64'h800, + ExceptionAddress: 64'h808, + RASDepth: unsigned'(2), + BTBEntries: unsigned'(16), + BPType: config_pkg::BHT, + BHTEntries: unsigned'(64), + BHTHist: unsigned'(3), + DmBaseAddress: 64'h300_0000, + TvalEn: bit'(1), + DirectVecOnly: bit'(0), + NrPMPEntries: unsigned'(8), + PMPCfgRstVal: {64{64'h0}}, + PMPAddrRstVal: {64{64'h0}}, + PMPEntryReadOnly: 64'd0, + PMPNapotEn: bit'(1), + NOCType: config_pkg::NOC_TYPE_AXI4_ATOP, + NrNonIdempotentRules: unsigned'(2), + NonIdempotentAddrBase: 1024'({64'b0, 64'b0}), + NonIdempotentLength: 1024'({64'b0, 64'b0}), + NrExecuteRegionRules: unsigned'(6), + ExecuteRegionAddrBase: 1024'({64'h1_0000_0000, 64'h8000_0000, 64'h300_0000, 64'h0, 64'h2000_0000, 64'h8_0000_0000, 64'h4_0000_0000}), + ExecuteRegionLength: 1024'({64'h2_0000_0000, 64'h1_0000, 64'h1000, 64'h1_0000, 64'h2000_0000, 64'h7_FFFF_FFFF, 64'h3_FFFF_FFFF}), + NrCachedRegionRules: unsigned'(2), + CachedRegionAddrBase: 1024'({64'h1_0000_0000, 64'h8000_0000}), + CachedRegionLength: 1024'({64'h2_0000_0000, 64'h1_0000}), + MaxOutstandingStores: unsigned'(7), + DebugEn: bit'(1), + Sdtrig: bit'(0), + SdtrigMcontrol6: bit'(0), + SdtrigMcontrol6ExecAddr: bit'(0), + SdtrigMcontrol6ExecData: bit'(0), + SdtrigMcontrol6Store: bit'(0), + SdtrigMcontrol6LoadAddr: bit'(0), + SdtrigMcontrol6LoadData: bit'(0), + SdtrigIcount: bit'(0), + SdtrigEtrigger: bit'(0), + SdtrigItrigger: bit'(0), + SdtrigNrTriggers: int'(4), + SdtrigTriggerChaining: bit'(0), + SdtrigSupportedActions: {2{2'b01}}, + SdtrigSupportedMatch: {10{10'b00_0000_0001}}, + SdtrigSupportTextra: bit'(0), + AxiBurstWriteEn: bit'(0), + IcacheByteSize: unsigned'(32768), + IcacheSetAssoc: unsigned'(8), + IcacheLineWidth: unsigned'(512), + DCacheType: config_pkg::HPDCACHE_WT, + DcacheByteSize: unsigned'(32768), + DcacheSetAssoc: unsigned'(8), + DcacheLineWidth: unsigned'(512), + DcacheFlushOnFence: bit'(0), + DcacheFlushOnFenceI: bit'(0), + DcacheInvalidateOnFlush: bit'(0), + DcacheEccEnable: bit'(0), + DcacheEccScrubberEnable: bit'(0), + DataUserEn: unsigned'(0), + WtDcacheWbufDepth: int'(8), + FetchUserWidth: unsigned'(32), + FetchUserEn: unsigned'(0), + InstrTlbEntries: int'(16), + DataTlbEntries: int'(16), + UseSharedTlb: bit'(0), + SvnapotEn: bit'(0), + SharedTlbDepth: int'(64), + NrLoadPipeRegs: int'(0), + NrStorePipeRegs: int'(0), + DcacheIdWidth: int'(3) +}; + +endpackage diff --git a/core/include/cv64a60ax_config_pkg_cvfpu-uvm.sv b/core/include/cv64a60ax_config_pkg_cvfpu-uvm.sv new file mode 100644 index 00000000000..46c1e01a5be --- /dev/null +++ b/core/include/cv64a60ax_config_pkg_cvfpu-uvm.sv @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2025 CEA* + * *Commissariat a l'Energie Atomique et aux Energies Alternatives (CEA) + * + * 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. + */ + + + +package cva6_config_pkg; + + localparam CVA6ConfigXlen = 64; + localparam CVA6ConfigRvfiTrace = 1; + + localparam CVA6ConfigAxiIdWidth = 4; + localparam CVA6ConfigAxiAddrWidth = 39; + localparam CVA6ConfigAxiDataWidth = 128; + localparam CVA6ConfigDataUserWidth = 12; + + localparam config_pkg::cva6_user_cfg_t cva6_cfg = '{ + XLEN: unsigned'(CVA6ConfigXlen), + VLEN: unsigned'(64), + FpgaEn: bit'(0), // for Xilinx and Altera + FpgaAlteraEn: bit'(0), // for Altera (only) + TechnoCut: bit'(0), + SuperscalarEn: bit'(0), + ALUBypass: bit'(0), + NrCommitPorts: unsigned'(2), + AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth), + AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth), + AxiIdWidth: unsigned'(CVA6ConfigAxiIdWidth), + AxiUserWidth: unsigned'(CVA6ConfigDataUserWidth), + MemTidWidth: unsigned'(CVA6ConfigAxiIdWidth), + NrLoadBufEntries: unsigned'(8), + RVF: bit'(1), + RVD: bit'(1), + XF16: bit'(1), + XF16ALT: bit'(1), + XF8: bit'(1), + RVA: bit'(1), + RVB: bit'(1), + ZKN: bit'(0), + RVV: bit'(0), + RVC: bit'(1), + RVH: bit'(0), + RVZCMT: bit'(0), + RVZCB: bit'(1), + RVZCMP: bit'(0), + XFVec: bit'(0), + CvxifEn: bit'(1), + CoproType: config_pkg::COPRO_EXAMPLE, + RVZiCond: bit'(1), + RVZicntr: bit'(1), + RVZiCbom: bit'(1), + RVZihpm: bit'(1), + NrScoreboardEntries: unsigned'(8), + PerfCounterEn: bit'(1), + MmuPresent: bit'(1), + RVS: bit'(1), + RVU: bit'(1), + SoftwareInterruptEn: bit'(1), + HaltAddress: 64'h800, + ExceptionAddress: 64'h808, + RASDepth: unsigned'(2), + BTBEntries: unsigned'(16), + BPType: config_pkg::BHT, + BHTEntries: unsigned'(64), + BHTHist: unsigned'(3), + DmBaseAddress: 64'h300_0000, + TvalEn: bit'(1), + DirectVecOnly: bit'(0), + NrPMPEntries: unsigned'(8), + PMPCfgRstVal: {64{64'h0}}, + PMPAddrRstVal: {64{64'h0}}, + PMPEntryReadOnly: 64'd0, + PMPNapotEn: bit'(1), + NOCType: config_pkg::NOC_TYPE_AXI4_ATOP, + NrNonIdempotentRules: unsigned'(2), + NonIdempotentAddrBase: 1024'({64'b0, 64'b0}), + NonIdempotentLength: 1024'({64'b0, 64'b0}), + NrExecuteRegionRules: unsigned'(6), + ExecuteRegionAddrBase: + 1024'( + {64'h1_0000_0000, 64'h8000_0000, 64'h300_0000, 64'h0, 64'h2000_0000, 64'h8_0000_0000} + ), + ExecuteRegionLength: + 1024'( + {64'h2_0000_0000, 64'h1_0000, 64'h1000, 64'h1_0000, 64'h2000_0000, 64'h7_FFFF_FFFF} + ), + NrCachedRegionRules: unsigned'(2), + CachedRegionAddrBase: 1024'({64'h1_0000_0000, 64'h8000_0000}), + CachedRegionLength: 1024'({64'h2_0000_0000, 64'h1_0000}), + MaxOutstandingStores: unsigned'(7), + DebugEn: bit'(1), + SDTRIG: bit'(0), + Mcontrol6: bit'(0), + Icount: bit'(0), + Etrigger: bit'(0), + Itrigger: bit'(0), + AxiBurstWriteEn: bit'(1), + IcacheByteSize: unsigned'(32768), + IcacheSetAssoc: unsigned'(8), + IcacheLineWidth: unsigned'(512), + DCacheType: config_pkg::HPDCACHE_WT, + DcacheByteSize: unsigned'(32768), + DcacheSetAssoc: unsigned'(8), + DcacheLineWidth: unsigned'(512), + DcacheFlushOnFence: bit'(0), + DcacheFlushOnFenceI: bit'(0), + DcacheInvalidateOnFlush: bit'(0), + DcacheEccEnable: bit'(0), + DcacheEccScrubberEnable: bit'(0), + DataUserEn: unsigned'(0), + WtDcacheWbufDepth: int'(8), + FetchUserWidth: unsigned'(32), + FetchUserEn: unsigned'(0), + InstrTlbEntries: int'(16), + DataTlbEntries: int'(16), + UseSharedTlb: bit'(0), + SvnapotEn: bit'(0), + SharedTlbDepth: int'(64), + NrLoadPipeRegs: int'(0), + NrStorePipeRegs: int'(0), + DcacheIdWidth: int'(3) + }; + +endpackage diff --git a/core/include/cv64a6_imafdc_sv39_config_pkg.sv b/core/include/cv64a6_imafdc_sv39_config_pkg.sv index fc6fc92bc32..707ecc1d9b6 100644 --- a/core/include/cv64a6_imafdc_sv39_config_pkg.sv +++ b/core/include/cv64a6_imafdc_sv39_config_pkg.sv @@ -13,6 +13,7 @@ package cva6_config_pkg; localparam CVA6ConfigXlen = 64; localparam CVA6ConfigRVF = 1; + localparam CVA6ConfigRVD = 1; localparam CVA6ConfigF16En = 0; localparam CVA6ConfigF16AltEn = 0; localparam CVA6ConfigF8En = 0; @@ -44,6 +45,7 @@ package cva6_config_pkg; localparam CVA6ConfigDcacheLineWidth = 128; localparam CVA6ConfigDcacheFlushOnFence = 1'b0; + localparam CVA6ConfigDcacheFlushOnFenceI = 1'b0; localparam CVA6ConfigDcacheInvalidateOnFlush = 1'b0; localparam CVA6ConfigDcacheIdWidth = 1; @@ -80,6 +82,7 @@ package cva6_config_pkg; FpgaAlteraEn: bit'(0), // for Altera (only) TechnoCut: bit'(0), SuperscalarEn: bit'(0), + ALUBypass: bit'(0), NrCommitPorts: unsigned'(2), AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth), AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth), @@ -88,7 +91,7 @@ package cva6_config_pkg; MemTidWidth: unsigned'(CVA6ConfigMemTidWidth), NrLoadBufEntries: unsigned'(CVA6ConfigNrLoadBufEntries), RVF: bit'(CVA6ConfigRVF), - RVD: bit'(CVA6ConfigRVF), + RVD: bit'(CVA6ConfigRVD), XF16: bit'(CVA6ConfigF16En), XF16ALT: bit'(CVA6ConfigF16AltEn), XF8: bit'(CVA6ConfigF8En), @@ -103,7 +106,9 @@ package cva6_config_pkg; RVZCMP: bit'(CVA6ConfigZcmpExtEn), XFVec: bit'(CVA6ConfigFVecEn), CvxifEn: bit'(CVA6ConfigCvxifEn), + CoproType: config_pkg::COPRO_NONE, RVZiCond: bit'(CVA6ConfigRVZiCond), + RVZiCbom: bit'(0), RVZicntr: bit'(1), RVZihpm: bit'(1), NrScoreboardEntries: unsigned'(CVA6ConfigNrScoreboardEntries), @@ -116,7 +121,9 @@ package cva6_config_pkg; ExceptionAddress: 64'h808, RASDepth: unsigned'(CVA6ConfigRASDepth), BTBEntries: unsigned'(CVA6ConfigBTBEntries), + BPType: config_pkg::BHT, BHTEntries: unsigned'(CVA6ConfigBHTEntries), + BHTHist: unsigned'(3), DmBaseAddress: 64'h0, TvalEn: bit'(CVA6ConfigTvalEn), DirectVecOnly: bit'(0), @@ -137,6 +144,21 @@ package cva6_config_pkg; CachedRegionLength: 1024'({64'h40000000}), MaxOutstandingStores: unsigned'(7), DebugEn: bit'(1), + Sdtrig: bit'(0), + SdtrigMcontrol6: bit'(0), + SdtrigMcontrol6ExecAddr: bit'(0), + SdtrigMcontrol6ExecData: bit'(0), + SdtrigMcontrol6Store: bit'(0), + SdtrigMcontrol6LoadAddr: bit'(0), + SdtrigMcontrol6LoadData: bit'(0), + SdtrigIcount: bit'(0), + SdtrigEtrigger: bit'(0), + SdtrigItrigger: bit'(0), + SdtrigNrTriggers: int'(4), + SdtrigTriggerChaining: bit'(0), + SdtrigSupportedActions: {2{2'b01}}, + SdtrigSupportedMatch: {10{10'b00_0000_0001}}, + SdtrigSupportTextra: bit'(0), AxiBurstWriteEn: bit'(0), IcacheByteSize: unsigned'(CVA6ConfigIcacheByteSize), IcacheSetAssoc: unsigned'(CVA6ConfigIcacheSetAssoc), @@ -146,7 +168,10 @@ package cva6_config_pkg; DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc), DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth), DcacheFlushOnFence: unsigned'(CVA6ConfigDcacheFlushOnFence), + DcacheFlushOnFenceI: unsigned'(CVA6ConfigDcacheFlushOnFenceI), DcacheInvalidateOnFlush: unsigned'(CVA6ConfigDcacheInvalidateOnFlush), + DcacheEccEnable: bit'(0), + DcacheEccScrubberEnable: bit'(0), DataUserEn: unsigned'(CVA6ConfigDataUserEn), WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth), FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth), @@ -154,6 +179,7 @@ package cva6_config_pkg; InstrTlbEntries: int'(16), DataTlbEntries: int'(16), UseSharedTlb: bit'(0), + SvnapotEn: bit'(1), SharedTlbDepth: int'(64), NrLoadPipeRegs: int'(CVA6ConfigNrLoadPipeRegs), NrStorePipeRegs: int'(CVA6ConfigNrStorePipeRegs), diff --git a/core/include/cv64a6_imafdc_sv39_hpdcache_config_pkg.sv b/core/include/cv64a6_imafdc_sv39_hpdcache_config_pkg.sv index 57615a1648b..7d48c655d30 100644 --- a/core/include/cv64a6_imafdc_sv39_hpdcache_config_pkg.sv +++ b/core/include/cv64a6_imafdc_sv39_hpdcache_config_pkg.sv @@ -20,6 +20,7 @@ package cva6_config_pkg; localparam CVA6ConfigXlen = 64; localparam CVA6ConfigRVF = 1; + localparam CVA6ConfigRVD = 1; localparam CVA6ConfigF16En = 0; localparam CVA6ConfigF16AltEn = 0; localparam CVA6ConfigF8En = 0; @@ -51,6 +52,7 @@ package cva6_config_pkg; localparam CVA6ConfigDcacheLineWidth = 128; localparam CVA6ConfigDcacheFlushOnFence = 1'b0; + localparam CVA6ConfigDcacheFlushOnFenceI = 1'b0; localparam CVA6ConfigDcacheInvalidateOnFlush = 1'b0; localparam CVA6ConfigDcacheIdWidth = 3; @@ -87,6 +89,7 @@ package cva6_config_pkg; FpgaAlteraEn: bit'(0), // for Altera (only) TechnoCut: bit'(0), SuperscalarEn: bit'(0), + ALUBypass: bit'(0), NrCommitPorts: unsigned'(2), AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth), AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth), @@ -95,7 +98,7 @@ package cva6_config_pkg; MemTidWidth: unsigned'(CVA6ConfigMemTidWidth), NrLoadBufEntries: unsigned'(CVA6ConfigNrLoadBufEntries), RVF: bit'(CVA6ConfigRVF), - RVD: bit'(CVA6ConfigRVF), + RVD: bit'(CVA6ConfigRVD), XF16: bit'(CVA6ConfigF16En), XF16ALT: bit'(CVA6ConfigF16AltEn), XF8: bit'(CVA6ConfigF8En), @@ -110,7 +113,9 @@ package cva6_config_pkg; RVZCMT: bit'(0), XFVec: bit'(CVA6ConfigFVecEn), CvxifEn: bit'(CVA6ConfigCvxifEn), + CoproType: config_pkg::COPRO_NONE, RVZiCond: bit'(CVA6ConfigRVZiCond), + RVZiCbom: bit'(1), RVZicntr: bit'(1), RVZihpm: bit'(1), NrScoreboardEntries: unsigned'(CVA6ConfigNrScoreboardEntries), @@ -123,7 +128,9 @@ package cva6_config_pkg; ExceptionAddress: 64'h808, RASDepth: unsigned'(CVA6ConfigRASDepth), BTBEntries: unsigned'(CVA6ConfigBTBEntries), + BPType: config_pkg::BHT, BHTEntries: unsigned'(CVA6ConfigBHTEntries), + BHTHist: unsigned'(3), DmBaseAddress: 64'h0, TvalEn: bit'(CVA6ConfigTvalEn), DirectVecOnly: bit'(0), @@ -144,6 +151,21 @@ package cva6_config_pkg; CachedRegionLength: 1024'({64'h40000000}), MaxOutstandingStores: unsigned'(7), DebugEn: bit'(1), + Sdtrig: bit'(0), + SdtrigMcontrol6: bit'(0), + SdtrigMcontrol6ExecAddr: bit'(0), + SdtrigMcontrol6ExecData: bit'(0), + SdtrigMcontrol6Store: bit'(0), + SdtrigMcontrol6LoadAddr: bit'(0), + SdtrigMcontrol6LoadData: bit'(0), + SdtrigIcount: bit'(0), + SdtrigEtrigger: bit'(0), + SdtrigItrigger: bit'(0), + SdtrigNrTriggers: int'(4), + SdtrigTriggerChaining: bit'(0), + SdtrigSupportedActions: {2{2'b01}}, + SdtrigSupportedMatch: {10{10'b00_0000_0001}}, + SdtrigSupportTextra: bit'(0), AxiBurstWriteEn: bit'(0), IcacheByteSize: unsigned'(CVA6ConfigIcacheByteSize), IcacheSetAssoc: unsigned'(CVA6ConfigIcacheSetAssoc), @@ -153,7 +175,10 @@ package cva6_config_pkg; DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc), DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth), DcacheFlushOnFence: bit'(CVA6ConfigDcacheFlushOnFence), + DcacheFlushOnFenceI: unsigned'(CVA6ConfigDcacheFlushOnFenceI), DcacheInvalidateOnFlush: bit'(CVA6ConfigDcacheInvalidateOnFlush), + DcacheEccEnable: bit'(0), + DcacheEccScrubberEnable: bit'(0), DataUserEn: unsigned'(CVA6ConfigDataUserEn), WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth), FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth), @@ -161,6 +186,7 @@ package cva6_config_pkg; InstrTlbEntries: int'(16), DataTlbEntries: int'(16), UseSharedTlb: bit'(0), + SvnapotEn: bit'(0), SharedTlbDepth: int'(64), NrLoadPipeRegs: int'(CVA6ConfigNrLoadPipeRegs), NrStorePipeRegs: int'(CVA6ConfigNrStorePipeRegs), diff --git a/core/include/cv64a6_imafdc_sv39_hpdcache_wb_config_pkg.sv b/core/include/cv64a6_imafdc_sv39_hpdcache_wb_config_pkg.sv index 57c52b40237..7014a4c0e28 100644 --- a/core/include/cv64a6_imafdc_sv39_hpdcache_wb_config_pkg.sv +++ b/core/include/cv64a6_imafdc_sv39_hpdcache_wb_config_pkg.sv @@ -20,6 +20,7 @@ package cva6_config_pkg; localparam CVA6ConfigXlen = 64; localparam CVA6ConfigRVF = 1; + localparam CVA6ConfigRVD = 1; localparam CVA6ConfigF16En = 0; localparam CVA6ConfigF16AltEn = 0; localparam CVA6ConfigF8En = 0; @@ -49,8 +50,11 @@ package cva6_config_pkg; localparam CVA6ConfigDcacheByteSize = 32768; localparam CVA6ConfigDcacheSetAssoc = 8; localparam CVA6ConfigDcacheLineWidth = 128; - - localparam CVA6ConfigDcacheFlushOnFence = 1'b1; + // do not flush Dcache for EVERY fence - dramatic performance impact + // use RVZiCbom to synchronize caches with DMA devices instead + // CAUTION - a configuration with CVA6ConfigDcacheFlushOnFence might be required for different SoCs, e.g., cache-coherent SMP configurations + localparam CVA6ConfigDcacheFlushOnFence = 1'b0; + localparam CVA6ConfigDcacheFlushOnFenceI = 1'b1; localparam CVA6ConfigDcacheInvalidateOnFlush = 1'b0; localparam CVA6ConfigDcacheIdWidth = 3; @@ -87,6 +91,7 @@ package cva6_config_pkg; FpgaAlteraEn: bit'(0), // for Altera (only) TechnoCut: bit'(0), SuperscalarEn: bit'(0), + ALUBypass: bit'(0), NrCommitPorts: unsigned'(2), AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth), AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth), @@ -95,7 +100,7 @@ package cva6_config_pkg; MemTidWidth: unsigned'(CVA6ConfigMemTidWidth), NrLoadBufEntries: unsigned'(CVA6ConfigNrLoadBufEntries), RVF: bit'(CVA6ConfigRVF), - RVD: bit'(CVA6ConfigRVF), + RVD: bit'(CVA6ConfigRVD), XF16: bit'(CVA6ConfigF16En), XF16ALT: bit'(CVA6ConfigF16AltEn), XF8: bit'(CVA6ConfigF8En), @@ -110,7 +115,9 @@ package cva6_config_pkg; RVZCMT: bit'(0), XFVec: bit'(CVA6ConfigFVecEn), CvxifEn: bit'(CVA6ConfigCvxifEn), + CoproType: config_pkg::COPRO_NONE, RVZiCond: bit'(CVA6ConfigRVZiCond), + RVZiCbom: bit'(1), RVZicntr: bit'(1), RVZihpm: bit'(1), NrScoreboardEntries: unsigned'(CVA6ConfigNrScoreboardEntries), @@ -123,7 +130,9 @@ package cva6_config_pkg; ExceptionAddress: 64'h808, RASDepth: unsigned'(CVA6ConfigRASDepth), BTBEntries: unsigned'(CVA6ConfigBTBEntries), + BPType: config_pkg::BHT, BHTEntries: unsigned'(CVA6ConfigBHTEntries), + BHTHist: unsigned'(3), DmBaseAddress: 64'h0, TvalEn: bit'(CVA6ConfigTvalEn), DirectVecOnly: bit'(0), @@ -144,6 +153,21 @@ package cva6_config_pkg; CachedRegionLength: 1024'({64'h40000000}), MaxOutstandingStores: unsigned'(7), DebugEn: bit'(1), + Sdtrig: bit'(0), + SdtrigMcontrol6: bit'(0), + SdtrigMcontrol6ExecAddr: bit'(0), + SdtrigMcontrol6ExecData: bit'(0), + SdtrigMcontrol6Store: bit'(0), + SdtrigMcontrol6LoadAddr: bit'(0), + SdtrigMcontrol6LoadData: bit'(0), + SdtrigIcount: bit'(0), + SdtrigEtrigger: bit'(0), + SdtrigItrigger: bit'(0), + SdtrigNrTriggers: int'(4), + SdtrigTriggerChaining: bit'(0), + SdtrigSupportedActions: {2{2'b01}}, + SdtrigSupportedMatch: {10{10'b00_0000_0001}}, + SdtrigSupportTextra: bit'(0), AxiBurstWriteEn: bit'(0), IcacheByteSize: unsigned'(CVA6ConfigIcacheByteSize), IcacheSetAssoc: unsigned'(CVA6ConfigIcacheSetAssoc), @@ -153,7 +177,10 @@ package cva6_config_pkg; DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc), DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth), DcacheFlushOnFence: bit'(CVA6ConfigDcacheFlushOnFence), + DcacheFlushOnFenceI: unsigned'(CVA6ConfigDcacheFlushOnFenceI), DcacheInvalidateOnFlush: bit'(CVA6ConfigDcacheInvalidateOnFlush), + DcacheEccEnable: bit'(0), + DcacheEccScrubberEnable: bit'(0), DataUserEn: unsigned'(CVA6ConfigDataUserEn), WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth), FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth), @@ -161,6 +188,7 @@ package cva6_config_pkg; InstrTlbEntries: int'(16), DataTlbEntries: int'(16), UseSharedTlb: bit'(0), + SvnapotEn: bit'(0), SharedTlbDepth: int'(64), NrLoadPipeRegs: int'(CVA6ConfigNrLoadPipeRegs), NrStorePipeRegs: int'(CVA6ConfigNrStorePipeRegs), diff --git a/core/include/cv64a6_imafdc_sv39_openpiton_config_pkg.sv b/core/include/cv64a6_imafdc_sv39_openpiton_config_pkg.sv index ff1b792768d..a07c1537b26 100644 --- a/core/include/cv64a6_imafdc_sv39_openpiton_config_pkg.sv +++ b/core/include/cv64a6_imafdc_sv39_openpiton_config_pkg.sv @@ -13,6 +13,7 @@ package cva6_config_pkg; localparam CVA6ConfigXlen = 64; localparam CVA6ConfigRVF = 1; + localparam CVA6ConfigRVD = 1; localparam CVA6ConfigF16En = 0; localparam CVA6ConfigF16AltEn = 0; localparam CVA6ConfigF8En = 0; @@ -44,6 +45,7 @@ package cva6_config_pkg; localparam CVA6ConfigDcacheLineWidth = 128; localparam CVA6ConfigDcacheFlushOnFence = 1'b0; + localparam CVA6ConfigDcacheFlushOnFenceI = 1'b0; localparam CVA6ConfigDcacheInvalidateOnFlush = 1'b0; localparam CVA6ConfigDcacheIdWidth = 1; @@ -80,6 +82,7 @@ package cva6_config_pkg; FpgaAlteraEn: bit'(0), // for Altera (only) TechnoCut: bit'(0), SuperscalarEn: bit'(0), + ALUBypass: bit'(0), NrCommitPorts: unsigned'(2), AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth), AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth), @@ -88,7 +91,7 @@ package cva6_config_pkg; MemTidWidth: unsigned'(CVA6ConfigMemTidWidth), NrLoadBufEntries: unsigned'(CVA6ConfigNrLoadBufEntries), RVF: bit'(CVA6ConfigRVF), - RVD: bit'(CVA6ConfigRVF), + RVD: bit'(CVA6ConfigRVD), XF16: bit'(CVA6ConfigF16En), XF16ALT: bit'(CVA6ConfigF16AltEn), XF8: bit'(CVA6ConfigF8En), @@ -103,7 +106,9 @@ package cva6_config_pkg; RVZCMP: bit'(CVA6ConfigZcmpExtEn), XFVec: bit'(CVA6ConfigFVecEn), CvxifEn: bit'(CVA6ConfigCvxifEn), + CoproType: config_pkg::COPRO_NONE, RVZiCond: bit'(CVA6ConfigRVZiCond), + RVZiCbom: bit'(0), RVZicntr: bit'(1), RVZihpm: bit'(1), NrScoreboardEntries: unsigned'(CVA6ConfigNrScoreboardEntries), @@ -116,7 +121,9 @@ package cva6_config_pkg; ExceptionAddress: 64'h808, RASDepth: unsigned'(CVA6ConfigRASDepth), BTBEntries: unsigned'(CVA6ConfigBTBEntries), + BPType: config_pkg::BHT, BHTEntries: unsigned'(CVA6ConfigBHTEntries), + BHTHist: unsigned'(3), DmBaseAddress: 64'h0, TvalEn: bit'(CVA6ConfigTvalEn), DirectVecOnly: bit'(0), @@ -137,6 +144,21 @@ package cva6_config_pkg; CachedRegionLength: 1024'({64'h40000000}), MaxOutstandingStores: unsigned'(7), DebugEn: bit'(1), + Sdtrig: bit'(0), + SdtrigMcontrol6: bit'(0), + SdtrigMcontrol6ExecAddr: bit'(0), + SdtrigMcontrol6ExecData: bit'(0), + SdtrigMcontrol6Store: bit'(0), + SdtrigMcontrol6LoadAddr: bit'(0), + SdtrigMcontrol6LoadData: bit'(0), + SdtrigIcount: bit'(0), + SdtrigEtrigger: bit'(0), + SdtrigItrigger: bit'(0), + SdtrigNrTriggers: int'(4), + SdtrigTriggerChaining: bit'(0), + SdtrigSupportedActions: {2{2'b01}}, + SdtrigSupportedMatch: {10{10'b00_0000_0001}}, + SdtrigSupportTextra: bit'(0), AxiBurstWriteEn: bit'(0), IcacheByteSize: unsigned'(CVA6ConfigIcacheByteSize), IcacheSetAssoc: unsigned'(CVA6ConfigIcacheSetAssoc), @@ -146,7 +168,10 @@ package cva6_config_pkg; DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc), DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth), DcacheFlushOnFence: unsigned'(CVA6ConfigDcacheFlushOnFence), + DcacheFlushOnFenceI: unsigned'(CVA6ConfigDcacheFlushOnFenceI), DcacheInvalidateOnFlush: unsigned'(CVA6ConfigDcacheInvalidateOnFlush), + DcacheEccEnable: bit'(0), + DcacheEccScrubberEnable: bit'(0), DataUserEn: unsigned'(CVA6ConfigDataUserEn), WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth), FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth), @@ -154,6 +179,7 @@ package cva6_config_pkg; InstrTlbEntries: int'(16), DataTlbEntries: int'(16), UseSharedTlb: bit'(0), + SvnapotEn: bit'(0), SharedTlbDepth: int'(64), NrLoadPipeRegs: int'(CVA6ConfigNrLoadPipeRegs), NrStorePipeRegs: int'(CVA6ConfigNrStorePipeRegs), diff --git a/core/include/cv64a6_imafdc_sv39_wb_config_pkg.sv b/core/include/cv64a6_imafdc_sv39_wb_config_pkg.sv index e66d5ca1562..b021d724403 100644 --- a/core/include/cv64a6_imafdc_sv39_wb_config_pkg.sv +++ b/core/include/cv64a6_imafdc_sv39_wb_config_pkg.sv @@ -13,6 +13,7 @@ package cva6_config_pkg; localparam CVA6ConfigXlen = 64; localparam CVA6ConfigRVF = 1; + localparam CVA6ConfigRVD = 1; localparam CVA6ConfigF16En = 0; localparam CVA6ConfigF16AltEn = 0; localparam CVA6ConfigF8En = 0; @@ -43,7 +44,8 @@ package cva6_config_pkg; localparam CVA6ConfigDcacheSetAssoc = 8; localparam CVA6ConfigDcacheLineWidth = 128; - localparam CVA6ConfigDcacheFlushOnFence = 1'b1; + localparam CVA6ConfigDcacheFlushOnFence = 1'b0; + localparam CVA6ConfigDcacheFlushOnFenceI = 1'b1; localparam CVA6ConfigDcacheInvalidateOnFlush = 1'b0; localparam CVA6ConfigDcacheIdWidth = 1; @@ -80,6 +82,7 @@ package cva6_config_pkg; FpgaAlteraEn: bit'(0), // for Altera (only) TechnoCut: bit'(0), SuperscalarEn: bit'(0), + ALUBypass: bit'(0), NrCommitPorts: unsigned'(2), AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth), AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth), @@ -88,7 +91,7 @@ package cva6_config_pkg; MemTidWidth: unsigned'(CVA6ConfigMemTidWidth), NrLoadBufEntries: unsigned'(CVA6ConfigNrLoadBufEntries), RVF: bit'(CVA6ConfigRVF), - RVD: bit'(CVA6ConfigRVF), + RVD: bit'(CVA6ConfigRVD), XF16: bit'(CVA6ConfigF16En), XF16ALT: bit'(CVA6ConfigF16AltEn), XF8: bit'(CVA6ConfigF8En), @@ -103,7 +106,9 @@ package cva6_config_pkg; RVZCMP: bit'(CVA6ConfigZcmpExtEn), XFVec: bit'(CVA6ConfigFVecEn), CvxifEn: bit'(CVA6ConfigCvxifEn), + CoproType: config_pkg::COPRO_NONE, RVZiCond: bit'(CVA6ConfigRVZiCond), + RVZiCbom: bit'(0), RVZicntr: bit'(1), RVZihpm: bit'(1), NrScoreboardEntries: unsigned'(CVA6ConfigNrScoreboardEntries), @@ -116,7 +121,9 @@ package cva6_config_pkg; ExceptionAddress: 64'h808, RASDepth: unsigned'(CVA6ConfigRASDepth), BTBEntries: unsigned'(CVA6ConfigBTBEntries), + BPType: config_pkg::BHT, BHTEntries: unsigned'(CVA6ConfigBHTEntries), + BHTHist: unsigned'(3), DmBaseAddress: 64'h0, TvalEn: bit'(CVA6ConfigTvalEn), DirectVecOnly: bit'(0), @@ -137,6 +144,21 @@ package cva6_config_pkg; CachedRegionLength: 1024'({64'h40000000}), MaxOutstandingStores: unsigned'(7), DebugEn: bit'(1), + Sdtrig: bit'(0), + SdtrigMcontrol6: bit'(0), + SdtrigMcontrol6ExecAddr: bit'(0), + SdtrigMcontrol6ExecData: bit'(0), + SdtrigMcontrol6Store: bit'(0), + SdtrigMcontrol6LoadAddr: bit'(0), + SdtrigMcontrol6LoadData: bit'(0), + SdtrigIcount: bit'(0), + SdtrigEtrigger: bit'(0), + SdtrigItrigger: bit'(0), + SdtrigNrTriggers: int'(4), + SdtrigTriggerChaining: bit'(0), + SdtrigSupportedActions: {2{2'b01}}, + SdtrigSupportedMatch: {10{10'b00_0000_0001}}, + SdtrigSupportTextra: bit'(0), AxiBurstWriteEn: bit'(0), IcacheByteSize: unsigned'(CVA6ConfigIcacheByteSize), IcacheSetAssoc: unsigned'(CVA6ConfigIcacheSetAssoc), @@ -146,7 +168,10 @@ package cva6_config_pkg; DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc), DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth), DcacheFlushOnFence: unsigned'(CVA6ConfigDcacheFlushOnFence), + DcacheFlushOnFenceI: unsigned'(CVA6ConfigDcacheFlushOnFenceI), DcacheInvalidateOnFlush: unsigned'(CVA6ConfigDcacheInvalidateOnFlush), + DcacheEccEnable: bit'(0), + DcacheEccScrubberEnable: bit'(0), DataUserEn: unsigned'(CVA6ConfigDataUserEn), WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth), FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth), @@ -154,6 +179,7 @@ package cva6_config_pkg; InstrTlbEntries: int'(16), DataTlbEntries: int'(16), UseSharedTlb: bit'(0), + SvnapotEn: bit'(0), SharedTlbDepth: int'(64), NrLoadPipeRegs: int'(CVA6ConfigNrLoadPipeRegs), NrStorePipeRegs: int'(CVA6ConfigNrStorePipeRegs), diff --git a/core/include/cv64a6_imafdch_sv39_config_pkg.sv b/core/include/cv64a6_imafdch_sv39_config_pkg.sv index 8a53b4618e4..51ea04765b8 100644 --- a/core/include/cv64a6_imafdch_sv39_config_pkg.sv +++ b/core/include/cv64a6_imafdch_sv39_config_pkg.sv @@ -13,6 +13,7 @@ package cva6_config_pkg; localparam CVA6ConfigXlen = 64; localparam CVA6ConfigRVF = 1; + localparam CVA6ConfigRVD = 1; localparam CVA6ConfigF16En = 0; localparam CVA6ConfigF16AltEn = 0; localparam CVA6ConfigF8En = 0; @@ -44,6 +45,7 @@ package cva6_config_pkg; localparam CVA6ConfigDcacheLineWidth = 128; localparam CVA6ConfigDcacheFlushOnFence = 1'b0; + localparam CVA6ConfigDcacheFlushOnFenceI = 1'b0; localparam CVA6ConfigDcacheInvalidateOnFlush = 1'b0; localparam CVA6ConfigDcacheIdWidth = 1; @@ -80,6 +82,7 @@ package cva6_config_pkg; FpgaAlteraEn: bit'(0), // for Altera (only) TechnoCut: bit'(0), SuperscalarEn: bit'(0), + ALUBypass: bit'(0), NrCommitPorts: unsigned'(2), AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth), AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth), @@ -88,7 +91,7 @@ package cva6_config_pkg; MemTidWidth: unsigned'(CVA6ConfigMemTidWidth), NrLoadBufEntries: unsigned'(CVA6ConfigNrLoadBufEntries), RVF: bit'(CVA6ConfigRVF), - RVD: bit'(CVA6ConfigRVF), + RVD: bit'(CVA6ConfigRVD), XF16: bit'(CVA6ConfigF16En), XF16ALT: bit'(CVA6ConfigF16AltEn), XF8: bit'(CVA6ConfigF8En), @@ -103,7 +106,9 @@ package cva6_config_pkg; RVZCMP: bit'(CVA6ConfigZcmpExtEn), XFVec: bit'(CVA6ConfigFVecEn), CvxifEn: bit'(CVA6ConfigCvxifEn), + CoproType: config_pkg::COPRO_NONE, RVZiCond: bit'(CVA6ConfigRVZiCond), + RVZiCbom: bit'(0), RVZicntr: bit'(1), RVZihpm: bit'(1), NrScoreboardEntries: unsigned'(CVA6ConfigNrScoreboardEntries), @@ -116,7 +121,9 @@ package cva6_config_pkg; ExceptionAddress: 64'h808, RASDepth: unsigned'(CVA6ConfigRASDepth), BTBEntries: unsigned'(CVA6ConfigBTBEntries), + BPType: config_pkg::BHT, BHTEntries: unsigned'(CVA6ConfigBHTEntries), + BHTHist: unsigned'(3), DmBaseAddress: 64'h0, TvalEn: bit'(CVA6ConfigTvalEn), DirectVecOnly: bit'(0), @@ -137,6 +144,21 @@ package cva6_config_pkg; CachedRegionLength: 1024'({64'h40000000}), MaxOutstandingStores: unsigned'(7), DebugEn: bit'(1), + Sdtrig: bit'(0), + SdtrigMcontrol6: bit'(0), + SdtrigMcontrol6ExecAddr: bit'(0), + SdtrigMcontrol6ExecData: bit'(0), + SdtrigMcontrol6Store: bit'(0), + SdtrigMcontrol6LoadAddr: bit'(0), + SdtrigMcontrol6LoadData: bit'(0), + SdtrigIcount: bit'(0), + SdtrigEtrigger: bit'(0), + SdtrigItrigger: bit'(0), + SdtrigNrTriggers: int'(4), + SdtrigTriggerChaining: bit'(0), + SdtrigSupportedActions: {2{2'b01}}, + SdtrigSupportedMatch: {10{10'b00_0000_0001}}, + SdtrigSupportTextra: bit'(0), AxiBurstWriteEn: bit'(0), IcacheByteSize: unsigned'(CVA6ConfigIcacheByteSize), IcacheSetAssoc: unsigned'(CVA6ConfigIcacheSetAssoc), @@ -146,7 +168,10 @@ package cva6_config_pkg; DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc), DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth), DcacheFlushOnFence: unsigned'(CVA6ConfigDcacheFlushOnFence), + DcacheFlushOnFenceI: unsigned'(CVA6ConfigDcacheFlushOnFenceI), DcacheInvalidateOnFlush: unsigned'(CVA6ConfigDcacheInvalidateOnFlush), + DcacheEccEnable: bit'(0), + DcacheEccScrubberEnable: bit'(0), DataUserEn: unsigned'(CVA6ConfigDataUserEn), WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth), FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth), @@ -154,6 +179,7 @@ package cva6_config_pkg; InstrTlbEntries: int'(16), DataTlbEntries: int'(16), UseSharedTlb: bit'(0), + SvnapotEn: bit'(0), SharedTlbDepth: int'(64), NrLoadPipeRegs: int'(CVA6ConfigNrLoadPipeRegs), NrStorePipeRegs: int'(CVA6ConfigNrStorePipeRegs), diff --git a/core/include/cv64a6_imafdch_sv39_wb_config_pkg.sv b/core/include/cv64a6_imafdch_sv39_wb_config_pkg.sv index 1ddf24413e7..e611887d234 100644 --- a/core/include/cv64a6_imafdch_sv39_wb_config_pkg.sv +++ b/core/include/cv64a6_imafdch_sv39_wb_config_pkg.sv @@ -13,6 +13,7 @@ package cva6_config_pkg; localparam CVA6ConfigXlen = 64; localparam CVA6ConfigRVF = 1; + localparam CVA6ConfigRVD = 1; localparam CVA6ConfigF16En = 0; localparam CVA6ConfigF16AltEn = 0; localparam CVA6ConfigF8En = 0; @@ -44,6 +45,7 @@ package cva6_config_pkg; localparam CVA6ConfigDcacheLineWidth = 128; localparam CVA6ConfigDcacheFlushOnFence = 1'b1; + localparam CVA6ConfigDcacheFlushOnFenceI = 1'b1; localparam CVA6ConfigDcacheInvalidateOnFlush = 1'b0; localparam CVA6ConfigDcacheIdWidth = 1; @@ -80,6 +82,7 @@ package cva6_config_pkg; FpgaAlteraEn: bit'(0), // for Altera (only) TechnoCut: bit'(0), SuperscalarEn: bit'(0), + ALUBypass: bit'(0), NrCommitPorts: unsigned'(2), AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth), AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth), @@ -88,7 +91,7 @@ package cva6_config_pkg; MemTidWidth: unsigned'(CVA6ConfigMemTidWidth), NrLoadBufEntries: unsigned'(CVA6ConfigNrLoadBufEntries), RVF: bit'(CVA6ConfigRVF), - RVD: bit'(CVA6ConfigRVF), + RVD: bit'(CVA6ConfigRVD), XF16: bit'(CVA6ConfigF16En), XF16ALT: bit'(CVA6ConfigF16AltEn), XF8: bit'(CVA6ConfigF8En), @@ -103,7 +106,9 @@ package cva6_config_pkg; RVZCMP: bit'(CVA6ConfigZcmpExtEn), XFVec: bit'(CVA6ConfigFVecEn), CvxifEn: bit'(CVA6ConfigCvxifEn), + CoproType: config_pkg::COPRO_NONE, RVZiCond: bit'(CVA6ConfigRVZiCond), + RVZiCbom: bit'(0), RVZicntr: bit'(1), RVZihpm: bit'(1), NrScoreboardEntries: unsigned'(CVA6ConfigNrScoreboardEntries), @@ -116,7 +121,9 @@ package cva6_config_pkg; ExceptionAddress: 64'h808, RASDepth: unsigned'(CVA6ConfigRASDepth), BTBEntries: unsigned'(CVA6ConfigBTBEntries), + BPType: config_pkg::BHT, BHTEntries: unsigned'(CVA6ConfigBHTEntries), + BHTHist: unsigned'(3), DmBaseAddress: 64'h0, TvalEn: bit'(CVA6ConfigTvalEn), DirectVecOnly: bit'(0), @@ -137,6 +144,21 @@ package cva6_config_pkg; CachedRegionLength: 1024'({64'h40000000}), MaxOutstandingStores: unsigned'(7), DebugEn: bit'(1), + Sdtrig: bit'(0), + SdtrigMcontrol6: bit'(0), + SdtrigMcontrol6ExecAddr: bit'(0), + SdtrigMcontrol6ExecData: bit'(0), + SdtrigMcontrol6Store: bit'(0), + SdtrigMcontrol6LoadAddr: bit'(0), + SdtrigMcontrol6LoadData: bit'(0), + SdtrigIcount: bit'(0), + SdtrigEtrigger: bit'(0), + SdtrigItrigger: bit'(0), + SdtrigNrTriggers: int'(4), + SdtrigTriggerChaining: bit'(0), + SdtrigSupportedActions: {2{2'b01}}, + SdtrigSupportedMatch: {10{10'b00_0000_0001}}, + SdtrigSupportTextra: bit'(0), AxiBurstWriteEn: bit'(0), IcacheByteSize: unsigned'(CVA6ConfigIcacheByteSize), IcacheSetAssoc: unsigned'(CVA6ConfigIcacheSetAssoc), @@ -146,7 +168,10 @@ package cva6_config_pkg; DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc), DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth), DcacheFlushOnFence: unsigned'(CVA6ConfigDcacheFlushOnFence), + DcacheFlushOnFenceI: unsigned'(CVA6ConfigDcacheFlushOnFenceI), DcacheInvalidateOnFlush: unsigned'(CVA6ConfigDcacheInvalidateOnFlush), + DcacheEccEnable: bit'(0), + DcacheEccScrubberEnable: bit'(0), DataUserEn: unsigned'(CVA6ConfigDataUserEn), WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth), FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth), @@ -154,6 +179,7 @@ package cva6_config_pkg; InstrTlbEntries: int'(16), DataTlbEntries: int'(16), UseSharedTlb: bit'(0), + SvnapotEn: bit'(0), SharedTlbDepth: int'(64), NrLoadPipeRegs: int'(CVA6ConfigNrLoadPipeRegs), NrStorePipeRegs: int'(CVA6ConfigNrStorePipeRegs), diff --git a/core/include/cv64a6_imafdcv_sv39_config_pkg.sv b/core/include/cv64a6_imafdcv_sv39_config_pkg.sv index 39277797814..dfa951d3a90 100644 --- a/core/include/cv64a6_imafdcv_sv39_config_pkg.sv +++ b/core/include/cv64a6_imafdcv_sv39_config_pkg.sv @@ -12,7 +12,10 @@ package cva6_config_pkg; localparam CVA6ConfigXlen = 64; + localparam CVA6ConfigNrCommitPorts = 2; + localparam CVA6ConfigRVF = 1; + localparam CVA6ConfigRVD = 1; localparam CVA6ConfigF16En = 0; localparam CVA6ConfigF16AltEn = 0; localparam CVA6ConfigF8En = 0; @@ -32,18 +35,19 @@ package cva6_config_pkg; localparam CVA6ConfigAxiAddrWidth = 64; localparam CVA6ConfigAxiDataWidth = 64; localparam CVA6ConfigFetchUserEn = 0; - localparam CVA6ConfigFetchUserWidth = CVA6ConfigXlen; + localparam CVA6ConfigFetchUserWidth = 1; // Just not to raise warnings localparam CVA6ConfigDataUserEn = 0; localparam CVA6ConfigDataUserWidth = CVA6ConfigXlen; - localparam CVA6ConfigIcacheByteSize = 16384; + localparam CVA6ConfigIcacheByteSize = 4096; localparam CVA6ConfigIcacheSetAssoc = 4; localparam CVA6ConfigIcacheLineWidth = 128; - localparam CVA6ConfigDcacheByteSize = 16384; + localparam CVA6ConfigDcacheByteSize = 8192; localparam CVA6ConfigDcacheSetAssoc = 4; - localparam CVA6ConfigDcacheLineWidth = 128; + localparam CVA6ConfigDcacheLineWidth = 256; localparam CVA6ConfigDcacheFlushOnFence = 1'b0; + localparam CVA6ConfigDcacheFlushOnFenceI = 1'b0; localparam CVA6ConfigDcacheInvalidateOnFlush = 1'b0; localparam CVA6ConfigDcacheIdWidth = 1; @@ -80,7 +84,8 @@ package cva6_config_pkg; FpgaAlteraEn: bit'(0), // for Altera (only) TechnoCut: bit'(0), SuperscalarEn: bit'(0), - NrCommitPorts: unsigned'(1), + ALUBypass: bit'(0), + NrCommitPorts: unsigned'(CVA6ConfigNrCommitPorts), AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth), AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth), AxiIdWidth: unsigned'(CVA6ConfigAxiIdWidth), @@ -88,7 +93,7 @@ package cva6_config_pkg; MemTidWidth: unsigned'(CVA6ConfigMemTidWidth), NrLoadBufEntries: unsigned'(CVA6ConfigNrLoadBufEntries), RVF: bit'(CVA6ConfigRVF), - RVD: bit'(CVA6ConfigRVF), + RVD: bit'(CVA6ConfigRVD), XF16: bit'(CVA6ConfigF16En), XF16ALT: bit'(CVA6ConfigF16AltEn), XF8: bit'(CVA6ConfigF8En), @@ -103,7 +108,9 @@ package cva6_config_pkg; RVZCMT: bit'(0), XFVec: bit'(CVA6ConfigFVecEn), CvxifEn: bit'(CVA6ConfigCvxifEn), + CoproType: config_pkg::COPRO_NONE, RVZiCond: bit'(CVA6ConfigRVZiCond), + RVZiCbom: bit'(0), RVZicntr: bit'(1), RVZihpm: bit'(1), NrScoreboardEntries: unsigned'(CVA6ConfigNrScoreboardEntries), @@ -116,7 +123,9 @@ package cva6_config_pkg; ExceptionAddress: 64'h808, RASDepth: unsigned'(CVA6ConfigRASDepth), BTBEntries: unsigned'(CVA6ConfigBTBEntries), + BPType: config_pkg::BHT, BHTEntries: unsigned'(CVA6ConfigBHTEntries), + BHTHist: unsigned'(3), DmBaseAddress: 64'h0, TvalEn: bit'(CVA6ConfigTvalEn), DirectVecOnly: bit'(0), @@ -137,6 +146,21 @@ package cva6_config_pkg; CachedRegionLength: 1024'({64'h40000000}), MaxOutstandingStores: unsigned'(7), DebugEn: bit'(1), + Sdtrig: bit'(0), + SdtrigMcontrol6: bit'(0), + SdtrigMcontrol6ExecAddr: bit'(0), + SdtrigMcontrol6ExecData: bit'(0), + SdtrigMcontrol6Store: bit'(0), + SdtrigMcontrol6LoadAddr: bit'(0), + SdtrigMcontrol6LoadData: bit'(0), + SdtrigIcount: bit'(0), + SdtrigEtrigger: bit'(0), + SdtrigItrigger: bit'(0), + SdtrigNrTriggers: int'(4), + SdtrigTriggerChaining: bit'(0), + SdtrigSupportedActions: {2{2'b01}}, + SdtrigSupportedMatch: {10{10'b00_0000_0001}}, + SdtrigSupportTextra: bit'(0), AxiBurstWriteEn: bit'(0), IcacheByteSize: unsigned'(CVA6ConfigIcacheByteSize), IcacheSetAssoc: unsigned'(CVA6ConfigIcacheSetAssoc), @@ -145,7 +169,10 @@ package cva6_config_pkg; DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc), DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth), DcacheFlushOnFence: unsigned'(CVA6ConfigDcacheFlushOnFence), + DcacheFlushOnFenceI: unsigned'(CVA6ConfigDcacheFlushOnFenceI), DcacheInvalidateOnFlush: unsigned'(CVA6ConfigDcacheInvalidateOnFlush), + DcacheEccEnable: bit'(0), + DcacheEccScrubberEnable: bit'(0), DataUserEn: unsigned'(CVA6ConfigDataUserEn), WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth), FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth), @@ -154,6 +181,7 @@ package cva6_config_pkg; InstrTlbEntries: int'(16), DataTlbEntries: int'(16), UseSharedTlb: bit'(0), + SvnapotEn: bit'(0), SharedTlbDepth: int'(64), NrLoadPipeRegs: int'(CVA6ConfigNrLoadPipeRegs), NrStorePipeRegs: int'(CVA6ConfigNrStorePipeRegs), diff --git a/core/include/cvxif_types.svh b/core/include/cvxif_types.svh index 211742e05a4..d1cdf35c558 100644 --- a/core/include/cvxif_types.svh +++ b/core/include/cvxif_types.svh @@ -16,7 +16,7 @@ logic accept; /*Is the offloaded compressed instruction (id) accepted by the coprocessor?*/ \ } -`define X_ISSUE_REQ_T(Cfg, hartit_t, id_t) struct packed { \ +`define X_ISSUE_REQ_T(Cfg, hartid_t, id_t) struct packed { \ logic [31:0] instr; /*Offloaded instruction*/ \ hartid_t hartid; /*Identification of the hart offloading the instruction*/ \ id_t id; /*Identification of the offloaded instruction*/ \ @@ -48,7 +48,7 @@ writeregflags_t we; /*Register file write enable(s)*/ \ } -`define CVXIF_REQ_T(Cfg, x_compressed_req_t, x_issue_req_t, x_register_req_t, x_commit_t) struct packed { \ +`define CVXIF_REQ_T(Cfg, x_compressed_req_t, x_issue_req_t, x_register_t, x_commit_t) struct packed { \ logic compressed_valid; \ x_compressed_req_t compressed_req; \ logic issue_valid; \ diff --git a/core/include/cv32a6_embedded_config_pkg_deprecated.sv b/core/include/deprecated_packages/cv32a6_embedded_config_pkg_deprecated.sv similarity index 85% rename from core/include/cv32a6_embedded_config_pkg_deprecated.sv rename to core/include/deprecated_packages/cv32a6_embedded_config_pkg_deprecated.sv index e51c532ff24..7ce334a3f9c 100644 --- a/core/include/cv32a6_embedded_config_pkg_deprecated.sv +++ b/core/include/deprecated_packages/cv32a6_embedded_config_pkg_deprecated.sv @@ -12,6 +12,7 @@ package cva6_config_pkg; localparam CVA6ConfigXlen = 32; localparam CVA6ConfigRVF = 0; + localparam CVA6ConfigRVD = 0; localparam CVA6ConfigF16En = 0; localparam CVA6ConfigF16AltEn = 0; localparam CVA6ConfigF8En = 0; @@ -43,6 +44,7 @@ package cva6_config_pkg; localparam CVA6ConfigDcacheLineWidth = 128; localparam CVA6ConfigDcacheFlushOnFence = 1'b0; + localparam CVA6ConfigDcacheFlushOnFenceI = 1'b0; localparam CVA6ConfigDcacheInvalidateOnFlush = 1'b0; localparam CVA6ConfigDcacheIdWidth = 1; @@ -87,7 +89,7 @@ package cva6_config_pkg; MemTidWidth: unsigned'(CVA6ConfigMemTidWidth), NrLoadBufEntries: unsigned'(CVA6ConfigNrLoadBufEntries), RVF: bit'(CVA6ConfigRVF), - RVD: bit'(CVA6ConfigRVF), + RVD: bit'(CVA6ConfigRVD), XF16: bit'(CVA6ConfigF16En), XF16ALT: bit'(CVA6ConfigF16AltEn), XF8: bit'(CVA6ConfigF8En), @@ -102,8 +104,10 @@ package cva6_config_pkg; XFVec: bit'(CVA6ConfigFVecEn), RVZCMT: bit'(0), CvxifEn: bit'(CVA6ConfigCvxifEn), + CoproType: config_pkg::COPRO_NONE, RVZiCond: bit'(CVA6ConfigRVZiCond), RVZicntr: bit'(1), + RVZiCbom: bit'(0), RVZihpm: bit'(1), NrScoreboardEntries: unsigned'(CVA6ConfigNrScoreboardEntries), PerfCounterEn: bit'(CVA6ConfigPerfCounterEn), @@ -115,7 +119,9 @@ package cva6_config_pkg; ExceptionAddress: 64'h808, RASDepth: unsigned'(CVA6ConfigRASDepth), BTBEntries: unsigned'(CVA6ConfigBTBEntries), + BPType: config_pkg::BHT, BHTEntries: unsigned'(CVA6ConfigBHTEntries), + BHTHist: unsigned'(3), DmBaseAddress: 64'h0, TvalEn: bit'(CVA6ConfigTvalEn), DirectVecOnly: bit'(0), @@ -136,6 +142,22 @@ package cva6_config_pkg; CachedRegionLength: 1024'({64'h40000000}), MaxOutstandingStores: unsigned'(7), DebugEn: bit'(0), + Sdtrig: bit'(0), + SdtrigMcontrol6: bit'(0), + SdtrigMcontrol6ExecAddr: bit'(0), + SdtrigMcontrol6ExecData: bit'(0), + SdtrigMcontrol6StoreAddr: bit'(0), + SdtrigMcontrol6StoreData: bit'(0), + SdtrigMcontrol6LoadAddr: bit'(0), + SdtrigMcontrol6LoadData: bit'(0), + SdtrigIcount: bit'(0), + SdtrigEtrigger: bit'(0), + SdtrigItrigger: bit'(0), + SdtrigNrTriggers: int'(0), + SdtrigTriggerChaining: bit'(0), + SdtrigSupportedActions: {2{2'b00}}, //bit0: breakpoint except., bit1: debug request + SdtrigSupportedMatch: {3{3'b000}}, //bit0: equal, bit1: napot, bit2: not equal + SdtrigSupportTextra: bit'(0), AxiBurstWriteEn: bit'(0), IcacheByteSize: unsigned'(CVA6ConfigIcacheByteSize), IcacheSetAssoc: unsigned'(CVA6ConfigIcacheSetAssoc), @@ -145,6 +167,7 @@ package cva6_config_pkg; DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc), DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth), DcacheFlushOnFence: bit'(CVA6ConfigDcacheFlushOnFence), + DcacheFlushOnFenceI: unsigned'(CVA6ConfigDcacheFlushOnFenceI), DcacheInvalidateOnFlush: bit'(CVA6ConfigDcacheInvalidateOnFlush), DataUserEn: unsigned'(CVA6ConfigDataUserEn), WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth), @@ -153,6 +176,7 @@ package cva6_config_pkg; InstrTlbEntries: int'(2), DataTlbEntries: int'(2), UseSharedTlb: bit'(1), + SvnapotEn: bit'(0), SharedTlbDepth: int'(64), NrLoadPipeRegs: int'(CVA6ConfigNrLoadPipeRegs), NrStorePipeRegs: int'(CVA6ConfigNrStorePipeRegs), diff --git a/core/include/cv32a6_imac_sv0_config_pkg.sv b/core/include/deprecated_packages/cv32a6_imac_sv0_config_pkg.sv similarity index 87% rename from core/include/cv32a6_imac_sv0_config_pkg.sv rename to core/include/deprecated_packages/cv32a6_imac_sv0_config_pkg.sv index 9caf64ab6be..8ddef340f9b 100644 --- a/core/include/cv32a6_imac_sv0_config_pkg.sv +++ b/core/include/deprecated_packages/cv32a6_imac_sv0_config_pkg.sv @@ -13,6 +13,7 @@ package cva6_config_pkg; localparam CVA6ConfigXlen = 32; localparam CVA6ConfigRVF = 0; + localparam CVA6ConfigRVD = 0; localparam CVA6ConfigF16En = 0; localparam CVA6ConfigF16AltEn = 0; localparam CVA6ConfigF8En = 0; @@ -77,6 +78,7 @@ package cva6_config_pkg; FpgaAlteraEn: bit'(0), // for Altera (only) TechnoCut: bit'(0), SuperscalarEn: bit'(0), + ALUBypass: bit'(0), NrCommitPorts: unsigned'(2), AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth), AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth), @@ -85,7 +87,7 @@ package cva6_config_pkg; MemTidWidth: unsigned'(CVA6ConfigMemTidWidth), NrLoadBufEntries: unsigned'(CVA6ConfigNrLoadBufEntries), RVF: bit'(CVA6ConfigRVF), - RVD: bit'(CVA6ConfigRVF), + RVD: bit'(CVA6ConfigRVD), XF16: bit'(CVA6ConfigF16En), XF16ALT: bit'(CVA6ConfigF16AltEn), XF8: bit'(CVA6ConfigF8En), @@ -100,8 +102,10 @@ package cva6_config_pkg; RVZCMP: bit'(CVA6ConfigZcmpExtEn), XFVec: bit'(CVA6ConfigFVecEn), CvxifEn: bit'(CVA6ConfigCvxifEn), + CoproType: config_pkg::COPRO_NONE, RVZiCond: bit'(CVA6ConfigRVZiCond), RVZicntr: bit'(1), + RVZiCbom: bit'(0), RVZihpm: bit'(1), NrScoreboardEntries: unsigned'(CVA6ConfigNrScoreboardEntries), PerfCounterEn: bit'(CVA6ConfigPerfCounterEn), @@ -113,7 +117,9 @@ package cva6_config_pkg; ExceptionAddress: 64'h808, RASDepth: unsigned'(CVA6ConfigRASDepth), BTBEntries: unsigned'(CVA6ConfigBTBEntries), + BPType: config_pkg::BHT, BHTEntries: unsigned'(CVA6ConfigBHTEntries), + BHTHist: unsigned'(3), DmBaseAddress: 64'h0, TvalEn: unsigned'(CVA6ConfigTvalEn), DirectVecOnly: bit'(0), @@ -134,6 +140,22 @@ package cva6_config_pkg; CachedRegionLength: 1024'({64'h40000000}), MaxOutstandingStores: unsigned'(7), DebugEn: bit'(1), + SDTRIG: bit'(0), + SDTRIG_AsicOpt: bit'(0), + Mcontrol6 : bit'(0), + M6ExecAddr : bit'(0), + M6ExecData : bit'(0), + M6StoreAddr: bit'(0), + M6StoreData: bit'(0), + M6LoadAddr : bit'(0), + M6LoadData : bit'(0), + Icount: bit'(0), + Etrigger: bit'(0), + Itrigger: bit'(0), + N_Triggers: int'(0), + TriggerChaining: bit'(0), + SupportedActions: {2{2'b00}}, //bit0: breakpoint except., bit1: debug request + SupportedMatch : {3{3'b000}}, //bit0: equal, bit1: napot, bit2: not equal AxiBurstWriteEn: bit'(0), IcacheByteSize: unsigned'(CVA6ConfigIcacheByteSize), IcacheSetAssoc: unsigned'(CVA6ConfigIcacheSetAssoc), @@ -143,6 +165,7 @@ package cva6_config_pkg; DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc), DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth), DcacheFlushOnFence: bit'(0), + DcacheFlushOnFenceI: bit'(0), DcacheInvalidateOnFlush: bit'(0), DataUserEn: unsigned'(CVA6ConfigDataUserEn), WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth), @@ -151,6 +174,7 @@ package cva6_config_pkg; InstrTlbEntries: int'(2), DataTlbEntries: int'(2), UseSharedTlb: bit'(1), + SvnapotEn: bit'(0), SharedTlbDepth: int'(64), NrLoadPipeRegs: int'(CVA6ConfigNrLoadPipeRegs), NrStorePipeRegs: int'(CVA6ConfigNrStorePipeRegs), diff --git a/core/include/cv32a6_imafc_sv32_config_pkg.sv b/core/include/deprecated_packages/cv32a6_imafc_sv32_config_pkg.sv similarity index 87% rename from core/include/cv32a6_imafc_sv32_config_pkg.sv rename to core/include/deprecated_packages/cv32a6_imafc_sv32_config_pkg.sv index 8cc23f1387d..e9a6ba097b1 100644 --- a/core/include/cv32a6_imafc_sv32_config_pkg.sv +++ b/core/include/deprecated_packages/cv32a6_imafc_sv32_config_pkg.sv @@ -13,6 +13,7 @@ package cva6_config_pkg; localparam CVA6ConfigXlen = 32; localparam CVA6ConfigRVF = 1; + localparam CVA6ConfigRVD = 0; localparam CVA6ConfigF16En = 0; localparam CVA6ConfigF16AltEn = 0; localparam CVA6ConfigF8En = 0; @@ -77,6 +78,7 @@ package cva6_config_pkg; FpgaAlteraEn: bit'(0), // for Altera (only) TechnoCut: bit'(0), SuperscalarEn: bit'(0), + ALUBypass: bit'(0), NrCommitPorts: unsigned'(2), AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth), AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth), @@ -85,7 +87,7 @@ package cva6_config_pkg; MemTidWidth: unsigned'(CVA6ConfigMemTidWidth), NrLoadBufEntries: unsigned'(CVA6ConfigNrLoadBufEntries), RVF: bit'(CVA6ConfigRVF), - RVD: bit'(CVA6ConfigRVF), + RVD: bit'(CVA6ConfigRVD), XF16: bit'(CVA6ConfigF16En), XF16ALT: bit'(CVA6ConfigF16AltEn), XF8: bit'(CVA6ConfigF8En), @@ -100,8 +102,10 @@ package cva6_config_pkg; RVZCMT: bit'(0), XFVec: bit'(CVA6ConfigFVecEn), CvxifEn: bit'(CVA6ConfigCvxifEn), + CoproType: config_pkg::COPRO_NONE, RVZiCond: bit'(CVA6ConfigRVZiCond), RVZicntr: bit'(1), + RVZiCbom: bit'(0), RVZihpm: bit'(1), NrScoreboardEntries: unsigned'(CVA6ConfigNrScoreboardEntries), PerfCounterEn: bit'(CVA6ConfigPerfCounterEn), @@ -113,7 +117,9 @@ package cva6_config_pkg; ExceptionAddress: 64'h808, RASDepth: unsigned'(CVA6ConfigRASDepth), BTBEntries: unsigned'(CVA6ConfigBTBEntries), + BPType: config_pkg::BHT, BHTEntries: unsigned'(CVA6ConfigBHTEntries), + BHTHist: unsigned'(3), DmBaseAddress: 64'h0, TvalEn: bit'(CVA6ConfigTvalEn), DirectVecOnly: bit'(0), @@ -134,6 +140,21 @@ package cva6_config_pkg; CachedRegionLength: 1024'({64'h40000000}), MaxOutstandingStores: unsigned'(7), DebugEn: bit'(1), + Sdtrig: bit'(0), + SdtrigMcontrol6: bit'(0), + SdtrigMcontrol6ExecAddr: bit'(0), + SdtrigMcontrol6ExecData: bit'(0), + SdtrigMcontrol6StoreAddr: bit'(0), + SdtrigMcontrol6StoreData: bit'(0), + SdtrigMcontrol6LoadAddr: bit'(0), + SdtrigMcontrol6LoadData: bit'(0), + SdtrigIcount: bit'(0), + SdtrigEtrigger: bit'(0), + SdtrigItrigger: bit'(0), + SdtrigNrTriggers: int'(0), + SdtrigTriggerChaining: bit'(0), + SdtrigSupportedActions: {2{2'b00}}, + SdtrigSupportedMatch: {3{3'b000}}, AxiBurstWriteEn: bit'(0), IcacheByteSize: unsigned'(CVA6ConfigIcacheByteSize), IcacheSetAssoc: unsigned'(CVA6ConfigIcacheSetAssoc), @@ -143,6 +164,7 @@ package cva6_config_pkg; DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc), DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth), DcacheFlushOnFence: bit'(0), + DcacheFlushOnFenceI: bit'(0), DcacheInvalidateOnFlush: bit'(0), DataUserEn: unsigned'(CVA6ConfigDataUserEn), WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth), @@ -151,6 +173,7 @@ package cva6_config_pkg; InstrTlbEntries: int'(2), DataTlbEntries: int'(2), UseSharedTlb: bit'(1), + SvnapotEn: bit'(0), SharedTlbDepth: int'(64), NrLoadPipeRegs: int'(CVA6ConfigNrLoadPipeRegs), NrStorePipeRegs: int'(CVA6ConfigNrStorePipeRegs), diff --git a/core/include/cv64a6_imadfcv_sv39_polara_config_pkg.sv b/core/include/deprecated_packages/cv64a6_imadfcv_sv39_polara_config_pkg.sv similarity index 86% rename from core/include/cv64a6_imadfcv_sv39_polara_config_pkg.sv rename to core/include/deprecated_packages/cv64a6_imadfcv_sv39_polara_config_pkg.sv index c0ea9019222..5a532cb9403 100644 --- a/core/include/cv64a6_imadfcv_sv39_polara_config_pkg.sv +++ b/core/include/deprecated_packages/cv64a6_imadfcv_sv39_polara_config_pkg.sv @@ -13,6 +13,7 @@ package cva6_config_pkg; localparam CVA6ConfigXlen = 64; localparam CVA6ConfigRVF = 1; + localparam CVA6ConfigRVD = 1; localparam CVA6ConfigF16En = 1; localparam CVA6ConfigF16AltEn = 0; localparam CVA6ConfigF8En = 0; @@ -44,6 +45,7 @@ package cva6_config_pkg; localparam CVA6ConfigDcacheLineWidth = 128; localparam CVA6ConfigDcacheFlushOnFence = 1'b0; + localparam CVA6ConfigDcacheFlushOnFenceI = 1'b0; localparam CVA6ConfigDcacheInvalidateOnFlush = 1'b0; localparam CVA6ConfigDcacheIdWidth = 1; @@ -80,6 +82,7 @@ package cva6_config_pkg; FpgaAlteraEn: bit'(0), // for Altera (only) TechnoCut: bit'(0), SuperscalarEn: bit'(0), + ALUBypass: bit'(0), NrCommitPorts: unsigned'(2), AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth), AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth), @@ -88,7 +91,7 @@ package cva6_config_pkg; MemTidWidth: unsigned'(CVA6ConfigMemTidWidth), NrLoadBufEntries: unsigned'(CVA6ConfigNrLoadBufEntries), RVF: bit'(CVA6ConfigRVF), - RVD: bit'(CVA6ConfigRVF), + RVD: bit'(CVA6ConfigRVD), XF16: bit'(CVA6ConfigF16En), XF16ALT: bit'(CVA6ConfigF16AltEn), XF8: bit'(CVA6ConfigF8En), @@ -103,8 +106,10 @@ package cva6_config_pkg; RVZCMT: bit'(0), XFVec: bit'(CVA6ConfigFVecEn), CvxifEn: bit'(CVA6ConfigCvxifEn), + CoproType: config_pkg::COPRO_NONE, RVZiCond: bit'(CVA6ConfigRVZiCond), RVZicntr: bit'(1), + RVZiCbom: bit'(0), RVZihpm: bit'(1), NrScoreboardEntries: unsigned'(CVA6ConfigNrScoreboardEntries), PerfCounterEn: bit'(CVA6ConfigPerfCounterEn), @@ -116,7 +121,9 @@ package cva6_config_pkg; ExceptionAddress: 64'h808, RASDepth: unsigned'(CVA6ConfigRASDepth), BTBEntries: unsigned'(CVA6ConfigBTBEntries), + BPType: config_pkg::BHT, BHTEntries: unsigned'(CVA6ConfigBHTEntries), + BHTHist: unsigned'(3), DmBaseAddress: 64'h0, TvalEn: bit'(CVA6ConfigTvalEn), DirectVecOnly: bit'(0), @@ -137,6 +144,21 @@ package cva6_config_pkg; CachedRegionLength: 1024'({64'h40000000}), MaxOutstandingStores: unsigned'(7), DebugEn: bit'(1), + Sdtrig: bit'(0), + SdtrigMcontrol6: bit'(0), + SdtrigMcontrol6ExecAddr: bit'(0), + SdtrigMcontrol6ExecData: bit'(0), + SdtrigMcontrol6StoreAddr: bit'(0), + SdtrigMcontrol6StoreData: bit'(0), + SdtrigMcontrol6LoadAddr: bit'(0), + SdtrigMcontrol6LoadData: bit'(0), + SdtrigIcount: bit'(0), + SdtrigEtrigger: bit'(0), + SdtrigItrigger: bit'(0), + SdtrigNrTriggers: int'(0), + SdtrigTriggerChaining: bit'(0), + SdtrigSupportedActions: {2{2'b00}}, + SdtrigSupportedMatch: {3{3'b000}}, AxiBurstWriteEn: bit'(0), IcacheByteSize: unsigned'(CVA6ConfigIcacheByteSize), IcacheSetAssoc: unsigned'(CVA6ConfigIcacheSetAssoc), @@ -146,6 +168,7 @@ package cva6_config_pkg; DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc), DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth), DcacheFlushOnFence: bit'(CVA6ConfigDcacheFlushOnFence), + DcacheFlushOnFenceI: bit'(CVA6ConfigDcacheFlushOnFenceI), DcacheInvalidateOnFlush: bit'(CVA6ConfigDcacheInvalidateOnFlush), DataUserEn: unsigned'(CVA6ConfigDataUserEn), WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth), @@ -154,6 +177,7 @@ package cva6_config_pkg; InstrTlbEntries: int'(16), DataTlbEntries: int'(16), UseSharedTlb: bit'(0), + SvnapotEn: bit'(0), SharedTlbDepth: int'(64), NrLoadPipeRegs: int'(CVA6ConfigNrLoadPipeRegs), NrStorePipeRegs: int'(CVA6ConfigNrStorePipeRegs), diff --git a/core/include/cv64a6_mmu_config_pkg.sv b/core/include/deprecated_packages/cv64a6_mmu_config_pkg.sv similarity index 83% rename from core/include/cv64a6_mmu_config_pkg.sv rename to core/include/deprecated_packages/cv64a6_mmu_config_pkg.sv index c0f1954319d..93d5e996535 100644 --- a/core/include/cv64a6_mmu_config_pkg.sv +++ b/core/include/deprecated_packages/cv64a6_mmu_config_pkg.sv @@ -32,6 +32,7 @@ package cva6_config_pkg; FpgaAlteraEn: bit'(0), TechnoCut: bit'(0), SuperscalarEn: bit'(0), + ALUBypass: bit'(0), NrCommitPorts: unsigned'(1), AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth), AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth), @@ -55,8 +56,10 @@ package cva6_config_pkg; RVZCMT: bit'(0), XFVec: bit'(0), CvxifEn: bit'(1), + CoproType: config_pkg::COPRO_NONE, RVZiCond: bit'(0), RVZicntr: bit'(1), + RVZiCbom: bit'(0), RVZihpm: bit'(1), NrScoreboardEntries: unsigned'(CVA6ConfigNrScoreboardEntries), PerfCounterEn: bit'(0), @@ -68,7 +71,9 @@ package cva6_config_pkg; ExceptionAddress: 64'h808, RASDepth: unsigned'(2), BTBEntries: unsigned'(0), + BPType: config_pkg::BHT, BHTEntries: unsigned'(32), + BHTHist: unsigned'(3), DmBaseAddress: 64'h0, TvalEn: bit'(0), DirectVecOnly: bit'(1), @@ -89,6 +94,21 @@ package cva6_config_pkg; CachedRegionLength: 1024'({64'h40000000}), MaxOutstandingStores: unsigned'(7), DebugEn: bit'(1), + Sdtrig: bit'(0), + SdtrigMcontrol6: bit'(0), + SdtrigMcontrol6ExecAddr: bit'(0), + SdtrigMcontrol6ExecData: bit'(0), + SdtrigMcontrol6StoreAddr: bit'(0), + SdtrigMcontrol6StoreData: bit'(0), + SdtrigMcontrol6LoadAddr: bit'(0), + SdtrigMcontrol6LoadData: bit'(0), + SdtrigIcount: bit'(0), + SdtrigEtrigger: bit'(0), + SdtrigItrigger: bit'(0), + SdtrigNrTriggers: int'(0), + SdtrigTriggerChaining: bit'(0), + SdtrigSupportedActions: {2{2'b00}}, + SdtrigSupportedMatch: {3{3'b000}}, AxiBurstWriteEn: bit'(0), IcacheByteSize: unsigned'(2048), IcacheSetAssoc: unsigned'(2), @@ -98,6 +118,7 @@ package cva6_config_pkg; DcacheSetAssoc: unsigned'(8), DcacheLineWidth: unsigned'(128), DcacheFlushOnFence: bit'(0), + DcacheFlushOnFenceI: bit'(0), DcacheInvalidateOnFlush: bit'(0), DataUserEn: unsigned'(0), WtDcacheWbufDepth: int'(2), @@ -106,6 +127,7 @@ package cva6_config_pkg; InstrTlbEntries: int'(2), DataTlbEntries: int'(2), UseSharedTlb: bit'(1), + SvnapotEn: bit'(0), SharedTlbDepth: int'(64), NrLoadPipeRegs: int'(0), NrStorePipeRegs: int'(0), diff --git a/core/include/dummy_l15_pkg.sv b/core/include/dummy_l15_pkg.sv new file mode 100644 index 00000000000..179e4edfa83 --- /dev/null +++ b/core/include/dummy_l15_pkg.sv @@ -0,0 +1,116 @@ +// Attention: this is a dummy package for local compilation. +// The real package, with properly defined parameters, is in OpenPiton. + +package l15_pkg; + + parameter int unsigned L15_PADDR_WIDTH = 40; // Physical address bus in OpenPiton is 40 + parameter int unsigned L15_WORD_WIDTH = 64; + parameter int unsigned L15_DATA_BUS_WIDTH = 256; // Hardcoded for the moment, changed on parametric cachelines + parameter int unsigned L15_DATA_BUS_WORDS = L15_DATA_BUS_WIDTH / L15_WORD_WIDTH; + parameter int unsigned L15_BE_WIDTH = L15_DATA_BUS_WIDTH / 8; + parameter int unsigned L15_TID_WIDTH = 2; + parameter int unsigned L15_SET_ASSOC = 4; + parameter int unsigned L15_WAY_WIDTH = $clog2(L15_SET_ASSOC); + parameter int unsigned L15_TLB_CSM_WIDTH = 33; + + typedef enum logic [4:0] { + L15_LOAD_RQ = 5'b00000, // load request + L15_IMISS_RQ = 5'b10000, // instruction fill request + L15_STORE_RQ = 5'b00001, // store request + L15_ATOMIC_RQ = 5'b00110, // atomic op + //L15_CAS1_RQ = 5'b00010, // compare and swap1 packet (OpenSparc atomics) + //L15_CAS2_RQ = 5'b00011, // compare and swap2 packet (OpenSparc atomics) + //L15_SWAP_RQ = 5'b00110, // swap packet (OpenSparc atomics) + L15_STRLOAD_RQ = 5'b00100, // unused + L15_STRST_RQ = 5'b00101, // unused + L15_STQ_RQ = 5'b00111, // unused + L15_INT_RQ = 5'b01001, // interrupt request + L15_FWD_RQ = 5'b01101, // unused + L15_FWD_RPY = 5'b01110, // unused + L15_RSVD_RQ = 5'b11111 // unused + } l15_reqtypes_e; + + typedef enum logic [3:0] { + L15_LOAD_RET = 4'b0000, // load packet + //L15_INV_RET = 4'b0011, // invalidate packet, not unique... + L15_ST_ACK = 4'b0100, // store ack packet + //L15_AT_ACK = 4'b0011, // unused, not unique... + L15_INT_RET = 4'b0111, // interrupt packet + L15_TEST_RET = 4'b0101, // unused + L15_FP_RET = 4'b1000, // unused + L15_IFILL_RET = 4'b0001, // instruction fill packet + L15_EVICT_REQ = 4'b0011, // eviction request + L15_ERR_RET = 4'b1100, // unused + L15_STRLOAD_RET = 4'b0010, // unused + L15_STRST_ACK = 4'b0110, // unused + L15_FWD_RQ_RET = 4'b1010, // unused + L15_FWD_RPY_RET = 4'b1011, // unused + L15_RSVD_RET = 4'b1111, // unused + L15_CPX_RESTYPE_ATOMIC_RES = 4'b1110 // custom type for atomic responses + } l15_rtrntypes_e; + + typedef enum logic [3:0] { + AMO_NONE = 4'b0000, + AMO_LR = 4'b0001, + AMO_SC = 4'b0010, + AMO_SWAP = 4'b0011, + AMO_ADD = 4'b0100, + AMO_AND = 4'b0101, + AMO_OR = 4'b0110, + AMO_XOR = 4'b0111, + AMO_MAX = 4'b1000, + AMO_MAXU = 4'b1001, + AMO_MIN = 4'b1010, + AMO_MINU = 4'b1011, + AMO_CAS1 = 4'b1100, // unused, not part of riscv spec, but provided in OpenPiton + AMO_CAS2 = 4'b1101 // unused, not part of riscv spec, but provided in OpenPiton + } l15_amo_e; + + typedef struct packed { + logic l15_val; // valid signal, asserted with request + logic l15_req_ack; // ack for response + l15_reqtypes_e l15_rqtype; // see below for encoding + logic l15_nc; // non-cacheable bit + logic [2:0] l15_size; // transaction size: 000=Byte 001=2Byte; 010=4Byte; 011=8Byte; 111=Cache line (16/32Byte) + logic [L15_TID_WIDTH-1:0] l15_threadid; // currently 0 or 1 + logic l15_prefetch; // unused in openpiton + logic l15_invalidate_cacheline; // unused by Ariane as L1 has no ECC at the moment + logic l15_blockstore; // unused in openpiton + logic l15_blockinitstore; // unused in openpiton + logic [L15_WAY_WIDTH-1:0] l15_l1rplway; // way to replace + logic [L15_PADDR_WIDTH-1:0] l15_address; // physical address + logic [L15_WORD_WIDTH-1:0] l15_data; // word to write + logic [L15_WORD_WIDTH-1:0] l15_data_next_entry; // unused in Ariane (only used for CAS atomic requests) + logic [L15_TLB_CSM_WIDTH-1:0] l15_csm_data; // unused in Ariane + l15_amo_e l15_amo_op; // atomic operation type + logic [L15_BE_WIDTH-1:0] l15_be; + } l15_req_t; + + typedef struct packed { + logic l15_ack; // ack for request struct + logic l15_header_ack; // ack for request struct + logic l15_val; // valid signal for return struct + l15_rtrntypes_e l15_returntype; // see below for encoding + logic l15_l2miss; // unused in Ariane + logic [1:0] l15_error; // unused in openpiton + logic l15_noncacheable; // non-cacheable bit + logic l15_atomic; // asserted in load return and store ack packets of atomic tx + logic [L15_TID_WIDTH-1:0] l15_threadid; // used as transaction ID + logic l15_prefetch; // unused in openpiton + logic l15_f4b; // 4byte instruction fill from I/O space (nc). + logic [L15_WORD_WIDTH-1:0] l15_data_0; // used for both caches + logic [L15_WORD_WIDTH-1:0] l15_data_1; // used for both caches + logic [L15_WORD_WIDTH-1:0] l15_data_2; // currently only used for I$ + logic [L15_WORD_WIDTH-1:0] l15_data_3; // currently only used for I$ + logic l15_inval_icache_all_way; // invalidate all ways + logic l15_inval_dcache_all_way; // unused in openpiton + logic [L15_PADDR_WIDTH-1:0] l15_inval_address; // invalidate selected cacheline + logic l15_cross_invalidate; // unused in openpiton + logic [L15_WAY_WIDTH-1:0] l15_cross_invalidate_way; // unused in openpiton + logic l15_inval_dcache_inval; // invalidate selected cacheline and way + logic l15_inval_icache_inval; // unused in openpiton + logic [L15_WAY_WIDTH-1:0] l15_inval_way; // way to invalidate + logic l15_blockinitstore; // unused in openpiton + } l15_rtrn_t; + +endpackage diff --git a/core/include/riscv_pkg.sv b/core/include/riscv_pkg.sv index e9dbc65a189..20e81f8fbc2 100644 --- a/core/include/riscv_pkg.sv +++ b/core/include/riscv_pkg.sv @@ -37,6 +37,7 @@ package riscv; // type which holds xlen typedef enum logic [1:0] { + XLEN_NA = 2'b00, // Used for mstatus.{S/U}XL when {S/U} not implemented XLEN_32 = 2'b01, XLEN_64 = 2'b10, XLEN_128 = 2'b11 @@ -49,6 +50,13 @@ package riscv; Dirty = 2'b11 } xs_t; + typedef enum logic [1:0] { + CBIE_ILLEGAL = 2'b00, // execution of CBO.INVAL in lower privilege mode causes illegal instruction / virtual instruction exception + CBIE_FLUSH = 2'b01, // CBO.INVAL causes flush + CBIE_RSVD = 2'b10, // reserved + CBIE_INVAL = 2'b11 // CBO.INVAL causes invalidate + } cbie_t; + typedef struct packed { logic sd; // signal dirty state - read-only logic [62:34] wpri6; // writes preserved reads ignored @@ -341,11 +349,13 @@ package riscv; localparam logic [XLEN-1:0] INSTR_PAGE_FAULT = 12; // Instruction page fault localparam logic [XLEN-1:0] LOAD_PAGE_FAULT = 13; // Load page fault localparam logic [XLEN-1:0] STORE_PAGE_FAULT = 15; // Store page fault + localparam logic [XLEN-1:0] HARDWARE_ERROR = 19; // Transient error (e.g., bit-flip error in caches' SRAMs) localparam logic [XLEN-1:0] INSTR_GUEST_PAGE_FAULT = 20; // Instruction guest-page fault localparam logic [XLEN-1:0] LOAD_GUEST_PAGE_FAULT = 21; // Load guest-page fault localparam logic [XLEN-1:0] VIRTUAL_INSTRUCTION = 22; // virtual instruction localparam logic [XLEN-1:0] STORE_GUEST_PAGE_FAULT = 23; // Store guest-page fault localparam logic [XLEN-1:0] DEBUG_REQUEST = 24; // Debug request + localparam logic [XLEN-1:0] DEBUG_TRIGGER = 25; // Debug request from a trigger with action=1 localparam int unsigned IRQ_S_SOFT = 1; localparam int unsigned IRQ_VS_SOFT = 2; @@ -643,6 +653,8 @@ package riscv; CSR_TDATA2 = 12'h7A2, CSR_TDATA3 = 12'h7A3, CSR_TINFO = 12'h7A4, + CSR_MCONTEXT = 12'h7A8, + CSR_SCONTEXT = 12'h5A8, // Debug CSR CSR_DCSR = 12'h7b0, CSR_DPC = 12'h7b1, @@ -719,6 +731,7 @@ package riscv; localparam logic [63:0] SSTATUS_UIE = 'h00000001; localparam logic [63:0] SSTATUS_SIE = 'h00000002; localparam logic [63:0] SSTATUS_SPIE = 'h00000020; + localparam logic [63:0] SSTATUS_UBE = 'h00000040; localparam logic [63:0] SSTATUS_SPP = 'h00000100; localparam logic [63:0] SSTATUS_FS = 'h00006000; localparam logic [63:0] SSTATUS_XS = 'h00018000; @@ -749,7 +762,8 @@ package riscv; localparam logic [63:0] MSTATUS_MIE = 'h00000008; localparam logic [63:0] MSTATUS_UPIE = 'h00000010; localparam logic [63:0] MSTATUS_SPIE = 'h00000020; - localparam logic [63:0] MSTATUS_HPIE = 'h00000040; + localparam logic [63:0] MSTATUS_UBE = 'h00000040; + localparam logic [63:0] MSTATUS_HPIE = 'h00000040; // TODO - delete old version of H extension localparam logic [63:0] MSTATUS_MPIE = 'h00000080; localparam logic [63:0] MSTATUS_SPP = 'h00000100; localparam logic [63:0] MSTATUS_HPP = 'h00000600; @@ -762,6 +776,8 @@ package riscv; localparam logic [63:0] MSTATUS_TVM = 'h00100000; localparam logic [63:0] MSTATUS_TW = 'h00200000; localparam logic [63:0] MSTATUS_TSR = 'h00400000; + localparam logic [63:0] MSTATUS_SBE = 64'h1000000000; + localparam logic [63:0] MSTATUS_MBE = 64'h2000000000; function automatic logic [63:0] mstatus_uxl(logic IS_XLEN64); return {30'h0000000, IS_XLEN64, IS_XLEN64, 32'h00000000}; endfunction @@ -771,6 +787,8 @@ package riscv; function automatic logic [63:0] mstatus_sd(logic IS_XLEN64); return {IS_XLEN64, 31'h00000000, ~IS_XLEN64, 31'h00000000}; endfunction + localparam logic [63:0] MSTATUSH_SBE = 'h10; + localparam logic [63:0] MSTATUSH_MBE = 'h20; localparam logic [63:0] MENVCFG_FIOM = 'h00000001; localparam logic [63:0] MENVCFG_CBIE = 'h00000030; diff --git a/core/include/rvfi_types.svh b/core/include/rvfi_types.svh index 69c552e7a31..771169f5697 100644 --- a/core/include/rvfi_types.svh +++ b/core/include/rvfi_types.svh @@ -126,6 +126,10 @@ logic [Cfg.PLEN-1:0] mem_paddr; \ logic debug_mode; \ logic [Cfg.NrCommitPorts-1:0][Cfg.XLEN-1:0] wdata; \ + logic branch_valid; \ + logic is_taken; \ + logic [Cfg.XLEN-1:0] tval; \ + logic [Cfg.TRANS_ID_BITS-1:0] branch_trans_id; \ } `define RVFI_PROBES_CSR_T(Cfg) struct packed { \ @@ -164,4 +168,18 @@ logic [63:0][Cfg.PLEN-3:0] pmpaddr_q; \ } +`define RVFI_TO_ITI_T(Cfg) struct packed { \ + logic [Cfg.NrCommitPorts-1:0] valid; \ + logic [Cfg.NrCommitPorts-1:0][Cfg.VLEN-1:0] pc; \ + ariane_pkg::fu_op [Cfg.NrCommitPorts-1:0] op; \ + logic [Cfg.NrCommitPorts-1:0] is_compressed; \ + logic [Cfg.NrCommitPorts-1:0] branch_valid; \ + logic [Cfg.NrCommitPorts-1:0] is_taken; \ + logic ex_valid; \ + logic [Cfg.XLEN-1:0] tval; \ + logic [Cfg.XLEN-1:0] cause; \ + riscv::priv_lvl_t priv_lvl; \ + logic [63:0] cycles; \ +} + `endif // RVFI_TYPES_SVH diff --git a/core/include/triggers_pkg.sv b/core/include/triggers_pkg.sv new file mode 100644 index 00000000000..3b6ad257c3c --- /dev/null +++ b/core/include/triggers_pkg.sv @@ -0,0 +1,146 @@ +package triggers_pkg; + // Triggers + typedef struct packed { + logic [31:28] t_type; // type 3 for icount + logic dmode; + logic vs; + logic vu; + logic hit; + logic [23:10] count; + logic m; + logic pending; + logic s; + logic u; + logic [5:0] action; + } icount32_tdata1_t; + + typedef struct packed { + logic [31:26] mhvalue; + logic [25:23] mhselect; + logic [22:20] zeroes; + logic [19:18] sbytemask; + logic [17:2] svalue; + logic [1:0] sselect; + } textra32_tdata3_t; + + typedef struct packed { + logic [63:51] mhvalue; + logic [50:48] mhselect; + logic [47:40] zeroes; + logic [39:36] sbytemask; + logic [35:34] zero_field; + logic [33:2] svalue; + logic [1:0] sselect; + } textra64_tdata3_t; + + typedef struct packed { + logic [31:28] t_type; // type 6 for mcontrol6 + logic dmode; + logic uncertain; + logic hit1; + logic vs; + logic vu; + logic hit0; + logic select; + logic [20:19] zeroes; + logic [18:16] size; + logic [15:12] action; + logic chain; + logic [10:7] match; + logic m; + logic uncertainen; + logic s; + logic u; + logic execute; + logic store; + logic load; + } mcontrol6_32_tdata1_t; + + typedef struct packed { + logic [31:28] t_type; // type 4 for etrigger + logic dmode; + logic hit; + logic [25:13] zeroed; + logic vs; + logic vu; + logic nmi; + logic m; + logic zero; + logic s; + logic u; + logic [5:0] action; + } itrigger32_tdata1_t; + + typedef struct packed { + logic [31:28] t_type; // type 5 for etrigger + logic dmode; + logic hit; + logic [25:13] zeroes; + logic vs; + logic vu; + logic zeroed; + logic m; + logic zero; + logic s; + logic u; + logic [5:0] action; + } etrigger32_tdata1_t; + + typedef union packed { + logic [31:0] tdata1_type; + mcontrol6_32_tdata1_t mc6_type; + etrigger32_tdata1_t etrigger_type; + itrigger32_tdata1_t itrigger_type; + icount32_tdata1_t icount_type; + } trigger_32_tdata1_type; + + function automatic logic napot_match32(logic [31:0] base, logic [31:0] value); + logic [31:0] mask; + + mask = ~(base ^ (base + 1)); + return (value & mask) == (base & mask); + endfunction + + function automatic logic napot_match64(logic [63:0] base, logic [63:0] value); + logic [63:0] mask; + + mask = ~(base ^ (base + 1)); + return (value & mask) == (base & mask); + endfunction + + function automatic logic match_scontext32(input logic [31:0] scontext, input logic [1:0] sselect, + input logic [1:0] sbytemask, input logic [15:0] svalue, + input logic flag); + logic match; + int max_bytes = 0; + match = 1'b1; + if (sselect == 2'd1) begin + max_bytes = (flag) ? 4 : 2; + for (int b = 0; b < max_bytes; b++) begin + if (!sbytemask[b]) begin + if (scontext[8*b+:8] != svalue[8*b+:8]) match = 1'b0; + end + end + end + return match; + endfunction + + function automatic logic match_scontext64(input logic [31:0] scontext, input logic [1:0] sselect, + input logic [3:0] sbytemask, input logic [31:0] svalue, + input logic flag); + logic match; + int max_bytes = 0; + match = 1'b1; + if (sselect == 2'd1) begin + max_bytes = (flag) ? 4 : 2; + for (int b = 0; b < max_bytes; b++) begin + if (!sbytemask[b]) begin + if (scontext[8*b+:8] != svalue[8*b+:8]) match = 1'b0; + end + end + end + return match; + endfunction + + +endpackage diff --git a/core/include/wt_cache_pkg.sv b/core/include/wt_cache_pkg.sv index 38ea500e126..d35a7c97a57 100644 --- a/core/include/wt_cache_pkg.sv +++ b/core/include/wt_cache_pkg.sv @@ -15,31 +15,8 @@ // this is needed to propagate the // configuration in case Ariane is // instantiated in OpenPiton -`ifdef PITON_ARIANE -`include "l15.tmp.h" -`include "define.tmp.h" -`endif - package wt_cache_pkg; - // these parames need to coincide with the - // L1.5 parameterization, do not change -`ifdef PITON_ARIANE - -`ifndef CONFIG_L15_ASSOCIATIVITY - `define CONFIG_L15_ASSOCIATIVITY 4 -`endif - -`ifndef TLB_CSM_WIDTH - `define TLB_CSM_WIDTH 33 -`endif - - localparam L15_SET_ASSOC = `CONFIG_L15_ASSOCIATIVITY; - localparam L15_TLB_CSM_WIDTH = `TLB_CSM_WIDTH; -`else - localparam L15_TLB_CSM_WIDTH = 33; -`endif - // FIFO depths of L15 adapter localparam ADAPTER_REQ_FIFO_DEPTH = 2; localparam ADAPTER_RTRN_FIFO_DEPTH = 2; @@ -70,46 +47,7 @@ package wt_cache_pkg; ICACHE_IFILL_ACK } icache_in_t; - // taken from iop.h in openpiton - // to l1.5 (only marked subset is used) - typedef enum logic [4:0] { - L15_LOAD_RQ = 5'b00000, // load request - L15_IMISS_RQ = 5'b10000, // instruction fill request - L15_STORE_RQ = 5'b00001, // store request - L15_ATOMIC_RQ = 5'b00110, // atomic op - //L15_CAS1_RQ = 5'b00010, // compare and swap1 packet (OpenSparc atomics) - //L15_CAS2_RQ = 5'b00011, // compare and swap2 packet (OpenSparc atomics) - //L15_SWAP_RQ = 5'b00110, // swap packet (OpenSparc atomics) - L15_STRLOAD_RQ = 5'b00100, // unused - L15_STRST_RQ = 5'b00101, // unused - L15_STQ_RQ = 5'b00111, // unused - L15_INT_RQ = 5'b01001, // interrupt request - L15_FWD_RQ = 5'b01101, // unused - L15_FWD_RPY = 5'b01110, // unused - L15_RSVD_RQ = 5'b11111 // unused - } l15_reqtypes_t; - - // from l1.5 (only marked subset is used) - typedef enum logic [3:0] { - L15_LOAD_RET = 4'b0000, // load packet - // L15_INV_RET = 4'b0011, // invalidate packet, not unique... - L15_ST_ACK = 4'b0100, // store ack packet - //L15_AT_ACK = 4'b0011, // unused, not unique... - L15_INT_RET = 4'b0111, // interrupt packet - L15_TEST_RET = 4'b0101, // unused - L15_FP_RET = 4'b1000, // unused - L15_IFILL_RET = 4'b0001, // instruction fill packet - L15_EVICT_REQ = 4'b0011, // eviction request - L15_ERR_RET = 4'b1100, // unused - L15_STRLOAD_RET = 4'b0010, // unused - L15_STRST_ACK = 4'b0110, // unused - L15_FWD_RQ_RET = 4'b1010, // unused - L15_FWD_RPY_RET = 4'b1011, // unused - L15_RSVD_RET = 4'b1111, // unused - L15_CPX_RESTYPE_ATOMIC_RES = 4'b1110 // custom type for atomic responses - } l15_rtrntypes_t; - - // swap endianess in a 64bit word + // swap endianness in a 64bit word function automatic logic [63:0] swendian64(input logic [63:0] in); automatic logic [63:0] out; for (int k = 0; k < 64; k += 8) begin diff --git a/core/instr_realign.sv b/core/instr_realign.sv index 3aae6ff9229..3b40ae81040 100644 --- a/core/instr_realign.sv +++ b/core/instr_realign.sv @@ -137,7 +137,6 @@ module instr_realign unaligned_d = unaligned_q; // last instruction was unaligned - // TODO how are jumps + unaligned managed? if (unaligned_q) begin // for 64 bit there exist the following options: // 64 48 32 16 0 @@ -250,7 +249,6 @@ module instr_realign end // this means the previous instruction was either compressed or unaligned // in any case we don't care - // TODO input is actually right-shifted so the code below is wrong 2'b01: begin // 64 48 32 16 0 // | 3 | 2 | 1 | 0 | <- instruction slot diff --git a/core/issue_read_operands.sv b/core/issue_read_operands.sv index 8f70016f071..7523d346708 100644 --- a/core/issue_read_operands.sv +++ b/core/issue_read_operands.sv @@ -50,6 +50,8 @@ module issue_read_operands input forwarding_t fwd_i, // FU data useful to execute instruction - EX_STAGE output fu_data_t [CVA6Cfg.NrIssuePorts-1:0] fu_data_o, + // ALU to ALU bypass control - EX_STAGE + output alu_bypass_t alu_bypass_o, // Unregistered version of fu_data_o.operanda - EX_STAGE output logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.VLEN-1:0] rs1_forwarding_o, // Unregistered version of fu_data_o.operandb - EX_STAGE @@ -64,6 +66,8 @@ module issue_read_operands input logic flu_ready_i, // ALU output is valid - EX_STAGE output logic [CVA6Cfg.NrIssuePorts-1:0] alu_valid_o, + // AES output is valid - EX_STAGE + output logic [CVA6Cfg.NrIssuePorts-1:0] aes_valid_o, // Branch unit is valid - EX_STAGE output logic [CVA6Cfg.NrIssuePorts-1:0] branch_valid_o, // Transformed trap instruction - EX_STAGE @@ -78,6 +82,8 @@ module issue_read_operands output logic [CVA6Cfg.NrIssuePorts-1:0] mult_valid_o, // FPU FU is ready - EX_STAGE input logic fpu_ready_i, + // FPU FU will perform a writeback in the next cycle - EX_STAGE + input logic fpu_early_valid_i, // FPU FU is valid - EX_STAGE output logic [CVA6Cfg.NrIssuePorts-1:0] fpu_valid_o, // FPU fmt field - EX_STAGE @@ -126,17 +132,18 @@ module issue_read_operands // Information dedicated to RVFI - RVFI output logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.XLEN-1:0] rvfi_rs1_o, // Information dedicated to RVFI - RVFI - output logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.XLEN-1:0] rvfi_rs2_o - + output logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.XLEN-1:0] rvfi_rs2_o, + // Original instruction bits for AES + output logic [5:0] orig_instr_aes_bits ); localparam OPERANDS_PER_INSTR = CVA6Cfg.NrRgprPorts / CVA6Cfg.NrIssuePorts; typedef struct packed { - logic none, load, store, alu, alu2, ctrl_flow, mult, csr, fpu, fpu_vec, cvxif, accel; + logic none, load, store, alu, alu2, ctrl_flow, mult, csr, fpu, fpu_vec, cvxif, accel, aes; } fus_busy_t; - logic [CVA6Cfg.NrIssuePorts-1:0] stall_raw, stall_waw, stall_rs1, stall_rs2, stall_rs3; + logic [CVA6Cfg.NrIssuePorts-1:0] stall_raw, stall_rs1, stall_rs2, stall_rs3; logic [CVA6Cfg.NrIssuePorts-1:0] fu_busy; // functional unit is busy fus_busy_t [CVA6Cfg.NrIssuePorts-1:0] fus_busy; // which functional units are considered busy logic [CVA6Cfg.NrIssuePorts-1:0] issue_ack; @@ -147,12 +154,13 @@ module issue_read_operands rs3_len_t operand_c_fpr; // output flipflop (ID <-> EX) fu_data_t [CVA6Cfg.NrIssuePorts-1:0] fu_data_n, fu_data_q; - logic [CVA6Cfg.VLEN-1:0] pc_n; - logic is_compressed_instr_n; - branchpredict_sbe_t branch_predict_n; - logic [CVA6Cfg.XLEN-1:0] imm_forward_rs3; + logic [ CVA6Cfg.VLEN-1:0] pc_n; + logic is_compressed_instr_n; + branchpredict_sbe_t branch_predict_n; + logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.XLEN-1:0] imm_forward_rs3; logic [CVA6Cfg.NrIssuePorts-1:0] alu_valid_n, alu_valid_q; + logic [CVA6Cfg.NrIssuePorts-1:0] aes_valid_n, aes_valid_q; logic [CVA6Cfg.NrIssuePorts-1:0] mult_valid_n, mult_valid_q; logic [CVA6Cfg.NrIssuePorts-1:0] fpu_valid_n, fpu_valid_q; logic [1:0] fpu_fmt_n, fpu_fmt_q; @@ -163,37 +171,45 @@ module issue_read_operands logic [CVA6Cfg.NrIssuePorts-1:0] branch_valid_n, branch_valid_q; logic [CVA6Cfg.NrIssuePorts-1:0] cvxif_valid_n, cvxif_valid_q; logic [31:0] cvxif_off_instr_n, cvxif_off_instr_q; - logic cvxif_instruction_valid; + logic cvxif_instruction_valid; - //fwd logic - logic [CVA6Cfg.NrIssuePorts-1:0] rs1_has_raw; - logic [CVA6Cfg.NrIssuePorts-1:0] rs2_has_raw; - logic [CVA6Cfg.NrIssuePorts-1:0] rs3_has_raw; + //RAW detection + logic [ CVA6Cfg.NrIssuePorts-1:0][ CVA6Cfg.TRANS_ID_BITS-1:0] idx_hzd_rs1; + logic [ CVA6Cfg.NrIssuePorts-1:0] rs1_raw_check; + logic [ CVA6Cfg.NrIssuePorts-1:0] rs1_has_raw; + logic [ CVA6Cfg.NrIssuePorts-1:0] rs1_fpr; - logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.XLEN-1:0] rs3; - logic [CVA6Cfg.NrIssuePorts-1:0] rs3_fpr; + logic [ CVA6Cfg.NrIssuePorts-1:0][ CVA6Cfg.TRANS_ID_BITS-1:0] idx_hzd_rs2; + logic [ CVA6Cfg.NrIssuePorts-1:0] rs2_raw_check; + logic [ CVA6Cfg.NrIssuePorts-1:0] rs2_has_raw; + logic [ CVA6Cfg.NrIssuePorts-1:0] rs2_fpr; - logic [CVA6Cfg.NrIssuePorts-1:0] rs1_valid; - logic [CVA6Cfg.NrIssuePorts-1:0] rs2_valid; - logic [CVA6Cfg.NrIssuePorts-1:0] rs3_valid; + logic [ CVA6Cfg.NrIssuePorts-1:0][ CVA6Cfg.TRANS_ID_BITS-1:0] idx_hzd_rs3; + logic [ CVA6Cfg.NrIssuePorts-1:0] rs3_raw_check; + logic [ CVA6Cfg.NrIssuePorts-1:0] rs3_has_raw; + logic [ CVA6Cfg.NrIssuePorts-1:0] rs3_fpr; + logic [ CVA6Cfg.NrIssuePorts-1:0] rs3_gpr_cvxif; - logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.XLEN-1:0] rs1_res; - logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.XLEN-1:0] rs2_res; - logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.XLEN-1:0] rs3_res; - // clobber - fu_t [2**ariane_pkg::REG_ADDR_SIZE-1:0] rd_clobber_gpr, rd_clobber_fpr; - logic [2**ariane_pkg::REG_ADDR_SIZE-1:0][CVA6Cfg.NR_SB_ENTRIES:0] gpr_clobber_vld; - logic [2**ariane_pkg::REG_ADDR_SIZE-1:0][CVA6Cfg.NR_SB_ENTRIES:0] fpr_clobber_vld; - ariane_pkg::fu_t [ CVA6Cfg.NR_SB_ENTRIES:0] clobber_fu; + logic [CVA6Cfg.NR_SB_ENTRIES-1:0][ariane_pkg::REG_ADDR_SIZE-1:0] rd_list; + logic [CVA6Cfg.NR_SB_ENTRIES-1:0] rd_fpr; + + //fwd logic + logic [CVA6Cfg.NR_SB_ENTRIES-1:0][ CVA6Cfg.XLEN-1:0] fwd_res; + logic [CVA6Cfg.NR_SB_ENTRIES-1:0] fwd_res_valid; - //forward logic - logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.NR_SB_ENTRIES+CVA6Cfg.NrWbPorts-1:0] - rs1_fwd_req, rs2_fwd_req, rs3_fwd_req; - logic [CVA6Cfg.NrIssuePorts-1:0] rs1_is_not_gpr0, rs2_is_not_gpr0, rs3_is_not_gpr0; - logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.NR_SB_ENTRIES+CVA6Cfg.NrWbPorts-1:0][CVA6Cfg.XLEN-1:0] rs_data; - logic [CVA6Cfg.NrIssuePorts-1:0] rs1_available, rs2_available, rs3_available; + logic [CVA6Cfg.NR_SB_ENTRIES-1:0] rs1_is_not_csr; + logic [CVA6Cfg.NR_SB_ENTRIES-1:0] rs2_is_not_csr; + logic [ CVA6Cfg.NrIssuePorts-1:0][ CVA6Cfg.XLEN-1:0] rs3; + + logic [ CVA6Cfg.NrIssuePorts-1:0] rs1_valid; + logic [ CVA6Cfg.NrIssuePorts-1:0] rs2_valid; + logic [ CVA6Cfg.NrIssuePorts-1:0] rs3_valid; + + logic [ CVA6Cfg.NrIssuePorts-1:0][ CVA6Cfg.XLEN-1:0] rs1_res; + logic [ CVA6Cfg.NrIssuePorts-1:0][ CVA6Cfg.XLEN-1:0] rs2_res; + logic [ CVA6Cfg.NrIssuePorts-1:0][ CVA6Cfg.XLEN-1:0] rs3_res; logic [CVA6Cfg.NrIssuePorts-1:0][31:0] tinst_n, tinst_q; // transformed instruction @@ -201,8 +217,15 @@ module issue_read_operands logic [CVA6Cfg.NrIssuePorts-1:0] forward_rs1, forward_rs2, forward_rs3; // original instruction - riscv::instruction_t orig_instr; - assign orig_instr = riscv::instruction_t'(orig_instr_i[0]); + riscv::instruction_t [CVA6Cfg.NrIssuePorts-1:0] orig_instr; + for (genvar i = 0; i < CVA6Cfg.NrIssuePorts; i++) begin + assign orig_instr[i] = riscv::instruction_t'(orig_instr_i[i]); + end + + // ALU-ALU bypass signals + alu_bypass_t alu_bypass, alu_bypass_n, alu_bypass_q; + logic is_alu_bypass; + logic [1:0] use_alu2; // CVXIF Signals logic cvxif_req_allowed; @@ -246,7 +269,7 @@ module issue_read_operands // TODO check only for 1st instruction ?? // Allow a cvxif transaction if we WaW condition are ok. - assign cvxif_req_allowed = (issue_instr_i[0].fu == CVXIF) && !stall_waw[0]; + assign cvxif_req_allowed = (issue_instr_i[0].fu == CVXIF); assign cvxif_instruction_valid = !issue_instr_i[0].ex.valid && issue_instr_valid_i[0] && cvxif_req_allowed; assign x_transaction_accepted_o = x_issue_valid_o && x_issue_ready_i && x_issue_resp_i.accept; assign x_transaction_rejected = x_issue_valid_o && x_issue_ready_i && ~x_issue_resp_i.accept; @@ -262,8 +285,10 @@ module issue_read_operands assign rvfi_rs2_o[i] = fu_data_n[i].operand_b; end + assign alu_bypass_o = alu_bypass_q; assign fu_data_o = fu_data_q; assign alu_valid_o = alu_valid_q; + assign aes_valid_o = aes_valid_q; assign branch_valid_o = branch_valid_q; assign lsu_valid_o = lsu_valid_q; assign csr_valid_o = csr_valid_q; @@ -276,6 +301,28 @@ module issue_read_operands assign cvxif_off_instr_o = CVA6Cfg.CvxifEn ? cvxif_off_instr_q : '0; assign stall_issue_o = stall_raw[0]; assign tinst_o = CVA6Cfg.RVH ? tinst_q : '0; + + // ALU bypass signals + if (CVA6Cfg.ALUBypass) begin + // If it is a ALU -> ALU, we can fuse all operation beside CPOP (maybe can be optimized OP -> CPOP, to explore) + assign is_alu_bypass = + (issue_instr_i[0].fu == ALU && issue_instr_i[1].fu == ALU) && + !((issue_instr_i[0].op inside {CPOP, CPOPW}) || (issue_instr_i[1].op inside {CPOP, CPOPW})); + end else begin + assign is_alu_bypass = 1'b0; + end + + if (CVA6Cfg.SuperscalarEn) begin + // When a bypass is possible or an FPU instruction is present on the second issue port, + // an instruction uses `alu2` only when `alu` is already busy + // In all other scenarios `alu2` is preferred over `alu`, unless it is busy + for (genvar i = 0; i < 2; i++) begin + assign use_alu2[i] = is_alu_bypass || (issue_instr_i[1].fu inside {FPU, FPU_VEC}) ? fus_busy[i].alu : !fus_busy[i].alu2; + end + end else begin + assign use_alu2 = '0; + end + // --------------- // Issue Stage // --------------- @@ -287,6 +334,7 @@ module issue_read_operands // Since we can not have two CVXIF instruction on 1st issue port, CVXIF is always ready for the pending instruction. if (!flu_ready_i) begin fus_busy[0].alu = 1'b1; + fus_busy[0].aes = 1'b1; fus_busy[0].ctrl_flow = 1'b1; fus_busy[0].csr = 1'b1; fus_busy[0].mult = 1'b1; @@ -296,6 +344,7 @@ module issue_read_operands // otherwise we will get contentions on the fixed latency bus if (|mult_valid_q) begin fus_busy[0].alu = 1'b1; + fus_busy[0].aes = 1'b1; fus_busy[0].ctrl_flow = 1'b1; fus_busy[0].csr = 1'b1; end @@ -303,7 +352,6 @@ module issue_read_operands if (CVA6Cfg.FpPresent && !fpu_ready_i) begin fus_busy[0].fpu = 1'b1; fus_busy[0].fpu_vec = 1'b1; - if (CVA6Cfg.SuperscalarEn) fus_busy[0].alu2 = 1'b1; end if (!lsu_ready_i) begin @@ -312,6 +360,11 @@ module issue_read_operands end if (CVA6Cfg.SuperscalarEn) begin + + if (fpu_early_valid_i) begin + fus_busy[0].alu2 = 1'b1; + end + fus_busy[1] = fus_busy[0]; // Never issue CSR instruction on second issue port. @@ -327,8 +380,6 @@ module issue_read_operands fus_busy[1].alu = 1'b1; fus_busy[1].ctrl_flow = 1'b1; fus_busy[1].csr = 1'b1; - // Speculative non-idempotent loads are not supported yet - fus_busy[1].load = 1'b1; // The store buffer cannot be partially flushed yet fus_busy[1].store = 1'b1; end else begin @@ -344,12 +395,8 @@ module issue_read_operands end end ALU: begin - if (CVA6Cfg.SuperscalarEn && !fus_busy[0].alu2) begin + if (use_alu2[0]) begin fus_busy[1].alu2 = 1'b1; - // TODO is there a minimum float execution time? - // If so we could issue FPU & ALU2 the same cycle - fus_busy[1].fpu = 1'b1; - fus_busy[1].fpu_vec = 1'b1; end else begin fus_busy[1].alu = 1'b1; fus_busy[1].ctrl_flow = 1'b1; @@ -364,10 +411,18 @@ module issue_read_operands FPU, FPU_VEC: begin fus_busy[1].fpu = 1'b1; fus_busy[1].fpu_vec = 1'b1; + if (issue_instr_i[1].op inside {[FLD : FSB]}) begin + fus_busy[1].load = 1'b1; + fus_busy[1].store = 1'b1; + end end LOAD, STORE: begin fus_busy[1].load = 1'b1; fus_busy[1].store = 1'b1; + if (issue_instr_i[0].op inside {[FLD : FSB]}) begin + fus_busy[1].fpu = 1'b1; + fus_busy[1].fpu_vec = 1'b1; + end end CVXIF: ; default: ; @@ -382,7 +437,7 @@ module issue_read_operands unique case (issue_instr_i[i].fu) NONE: fu_busy[i] = fus_busy[i].none; ALU: begin - if (CVA6Cfg.SuperscalarEn && !fus_busy[i].alu2) begin + if (CVA6Cfg.SuperscalarEn && use_alu2[i]) begin fu_busy[i] = fus_busy[i].alu2; end else begin fu_busy[i] = fus_busy[i].alu; @@ -394,6 +449,7 @@ module issue_read_operands LOAD: fu_busy[i] = fus_busy[i].load; STORE: fu_busy[i] = fus_busy[i].store; CVXIF: fu_busy[i] = fus_busy[i].cvxif; + AES: fu_busy[i] = fus_busy[i].aes; default: if (CVA6Cfg.FpPresent) begin unique case (issue_instr_i[i].fu) @@ -408,226 +464,105 @@ module issue_read_operands end end - // ------------------- - // RD clobber process - // ------------------- - // rd_clobber output: output currently clobbered destination registers - - always_comb begin : clobber_assign - gpr_clobber_vld = '0; - fpr_clobber_vld = '0; - - // default (highest entry hast lowest prio in arbiter tree below) - clobber_fu[CVA6Cfg.NR_SB_ENTRIES] = ariane_pkg::NONE; - for (int unsigned i = 0; i < 2 ** ariane_pkg::REG_ADDR_SIZE; i++) begin - gpr_clobber_vld[i][CVA6Cfg.NR_SB_ENTRIES] = 1'b1; - fpr_clobber_vld[i][CVA6Cfg.NR_SB_ENTRIES] = 1'b1; - end - - // check for all valid entries and set the clobber accordingly - - for (int unsigned i = 0; i < CVA6Cfg.NR_SB_ENTRIES; i++) begin - gpr_clobber_vld[fwd_i.sbe[i].rd][i] = fwd_i.still_issued[i] & ~(CVA6Cfg.FpPresent && ariane_pkg::is_rd_fpr( - fwd_i.sbe[i].op)); - fpr_clobber_vld[fwd_i.sbe[i].rd][i] = fwd_i.still_issued[i] & (CVA6Cfg.FpPresent && ariane_pkg::is_rd_fpr( - fwd_i.sbe[i].op)); - clobber_fu[i] = fwd_i.sbe[i].fu; - end + for (genvar i = 0; i < CVA6Cfg.NrIssuePorts; i++) begin + assign rs1_fpr[i] = (CVA6Cfg.FpPresent && ariane_pkg::is_rs1_fpr(issue_instr_i[i].op)); + assign rs2_fpr[i] = (CVA6Cfg.FpPresent && ariane_pkg::is_rs2_fpr(issue_instr_i[i].op)); + assign rs3_fpr[i] = (CVA6Cfg.FpPresent && ariane_pkg::is_imm_fpr(issue_instr_i[i].op)); + assign rs3_gpr_cvxif[i] = CVA6Cfg.CvxifEn && (OPERANDS_PER_INSTR == 3) + && issue_instr_i[i].op == OFFLOAD; + end - // GPR[0] is always free - gpr_clobber_vld[0] = '0; + // ---------------------------------- + // Renaming + // ---------------------------------- + for (genvar i = 0; i < CVA6Cfg.NR_SB_ENTRIES; i++) begin + assign rd_list[i] = fwd_i.sbe[i].rd; + assign rd_fpr[i] = CVA6Cfg.FpPresent && ariane_pkg::is_rd_fpr(fwd_i.sbe[i].op); end - for (genvar k = 0; k < 2 ** ariane_pkg::REG_ADDR_SIZE; k++) begin : gen_sel_clobbers - // get fu that is going to clobber this register (there should be only one) - rr_arb_tree #( - .NumIn(CVA6Cfg.NR_SB_ENTRIES + 1), - .DataType(ariane_pkg::fu_t), - .ExtPrio(1'b1), - .AxiVldRdy(1'b1) - ) i_sel_gpr_clobbers ( - .clk_i (clk_i), - .rst_ni (rst_ni), - .flush_i(1'b0), - .rr_i ('0), - .req_i (gpr_clobber_vld[k]), - .gnt_o (), - .data_i (clobber_fu), - .gnt_i (1'b1), - .req_o (), - .data_o (rd_clobber_gpr[k]), - .idx_o () + for (genvar i = 0; i < CVA6Cfg.NrIssuePorts; i++) begin : gen_raw_checks + raw_checker #( + .CVA6Cfg(CVA6Cfg) + ) i_rs1_last_raw ( + .clk_i(clk_i), + .rst_ni(rst_ni), + .rs_i(issue_instr_i[i].rs1), + .rs_fpr_i(rs1_fpr[i]), + .rd_i(rd_list), + .rd_fpr_i(rd_fpr), + .still_issued_i(fwd_i.still_issued), + .issue_pointer_i(fwd_i.issue_pointer), + .idx_o(idx_hzd_rs1[i]), + .valid_o(rs1_raw_check[i]) ); - if (CVA6Cfg.FpPresent) begin - rr_arb_tree #( - .NumIn(CVA6Cfg.NR_SB_ENTRIES + 1), - .DataType(ariane_pkg::fu_t), - .ExtPrio(1'b1), - .AxiVldRdy(1'b1) - ) i_sel_fpr_clobbers ( - .clk_i (clk_i), - .rst_ni (rst_ni), - .flush_i(1'b0), - .rr_i ('0), - .req_i (fpr_clobber_vld[k]), - .gnt_o (), - .data_i (clobber_fu), - .gnt_i (1'b1), - .req_o (), - .data_o (rd_clobber_fpr[k]), - .idx_o () - ); - end else begin - assign rd_clobber_fpr[k] = NONE; - end + assign rs1_has_raw[i] = rs1_raw_check[i] && !issue_instr_i[i].use_zimm; + + raw_checker #( + .CVA6Cfg(CVA6Cfg) + ) i_rs2_last_raw ( + .clk_i(clk_i), + .rst_ni(rst_ni), + .rs_i(issue_instr_i[i].rs2), + .rs_fpr_i(rs2_fpr[i]), + .rd_i(rd_list), + .rd_fpr_i(rd_fpr), + .still_issued_i(fwd_i.still_issued), + .issue_pointer_i(fwd_i.issue_pointer), + .idx_o(idx_hzd_rs2[i]), + .valid_o(rs2_raw_check[i]) + ); + assign rs2_has_raw[i] = rs2_raw_check[i]; + + raw_checker #( + .CVA6Cfg(CVA6Cfg) + ) i_rs3_last_raw ( + .clk_i(clk_i), + .rst_ni(rst_ni), + .rs_i(issue_instr_i[i].result[ariane_pkg::REG_ADDR_SIZE-1:0]), + .rs_fpr_i(rs3_fpr[i]), + .rd_i(rd_list), + .rd_fpr_i(rd_fpr), + .still_issued_i(fwd_i.still_issued), + .issue_pointer_i(fwd_i.issue_pointer), + .idx_o(idx_hzd_rs3[i]), + .valid_o(rs3_raw_check[i]) + ); + assign rs3_has_raw[i] = rs3_raw_check[i] && (rs3_fpr[i] || rs3_gpr_cvxif[i]); end // ---------------------------------- // Read Operands (a.k.a forwarding) // ---------------------------------- - // read operand interface: same logic as register file - - // WB ports have higher prio than entries - for (genvar i = 0; i < CVA6Cfg.NrIssuePorts; i++) begin - for (genvar k = 0; unsigned'(k) < CVA6Cfg.NrWbPorts; k++) begin : gen_rs_wb - - assign rs1_fwd_req[i][k] = (fwd_i.sbe[fwd_i.wb[k].trans_id].rd == issue_instr_i[i].rs1) & (fwd_i.still_issued[fwd_i.wb[k].trans_id]) & fwd_i.wb[k].valid & (~fwd_i.wb[k].ex_valid) & ((CVA6Cfg.FpPresent && ariane_pkg::is_rd_fpr( - fwd_i.sbe[fwd_i.wb[k].trans_id].op - )) == (CVA6Cfg.FpPresent && ariane_pkg::is_rs1_fpr( - issue_instr_i[i].op - ))); - - assign rs2_fwd_req[i][k] = (fwd_i.sbe[fwd_i.wb[k].trans_id].rd == issue_instr_i[i].rs2) & (fwd_i.still_issued[fwd_i.wb[k].trans_id]) & fwd_i.wb[k].valid & (~fwd_i.wb[k].ex_valid) & ((CVA6Cfg.FpPresent && ariane_pkg::is_rd_fpr( - fwd_i.sbe[fwd_i.wb[k].trans_id].op - )) == (CVA6Cfg.FpPresent && ariane_pkg::is_rs2_fpr( - issue_instr_i[i].op - ))); - - assign rs3_fwd_req[i][k] = (fwd_i.sbe[fwd_i.wb[k].trans_id].rd == issue_instr_i[i].result[ariane_pkg::REG_ADDR_SIZE-1:0]) & (fwd_i.still_issued[fwd_i.wb[k].trans_id]) & fwd_i.wb[k].valid & (~fwd_i.wb[k].ex_valid) & ((CVA6Cfg.FpPresent && ariane_pkg::is_rd_fpr( - fwd_i.sbe[fwd_i.wb[k].trans_id].op - )) == (CVA6Cfg.FpPresent && ariane_pkg::is_imm_fpr( - issue_instr_i[i].op - ))); - - assign rs_data[i][k] = fwd_i.wb[k].data; + always_comb begin + for (int unsigned i = 0; i < CVA6Cfg.NR_SB_ENTRIES; i++) begin + fwd_res[i] = fwd_i.sbe[i].result; + fwd_res_valid[i] = fwd_i.sbe[i].valid & (~fwd_i.sbe[i].ex.valid); end - - for (genvar k = 0; unsigned'(k) < CVA6Cfg.NR_SB_ENTRIES; k++) begin : gen_rs_entries - - assign rs1_fwd_req[i][k+CVA6Cfg.NrWbPorts] = (fwd_i.sbe[k].rd == issue_instr_i[i].rs1) & fwd_i.still_issued[k] & fwd_i.sbe[k].valid & ((CVA6Cfg.FpPresent && ariane_pkg::is_rd_fpr( - fwd_i.sbe[k].op - )) == (CVA6Cfg.FpPresent && ariane_pkg::is_rs1_fpr( - issue_instr_i[i].op - ))); - - assign rs2_fwd_req[i][k+CVA6Cfg.NrWbPorts] = (fwd_i.sbe[k].rd == issue_instr_i[i].rs2) & fwd_i.still_issued[k] & fwd_i.sbe[k].valid & ((CVA6Cfg.FpPresent && ariane_pkg::is_rd_fpr( - fwd_i.sbe[k].op - )) == (CVA6Cfg.FpPresent && ariane_pkg::is_rs2_fpr( - issue_instr_i[i].op - ))); - - assign rs3_fwd_req[i][k+CVA6Cfg.NrWbPorts] = (fwd_i.sbe[k].rd == issue_instr_i[i].result[ariane_pkg::REG_ADDR_SIZE-1:0]) & fwd_i.still_issued[k] & fwd_i.sbe[k].valid & ((CVA6Cfg.FpPresent && ariane_pkg::is_rd_fpr( - fwd_i.sbe[k].op - )) == (CVA6Cfg.FpPresent && ariane_pkg::is_imm_fpr( - issue_instr_i[i].op - ))); - - assign rs_data[i][k+CVA6Cfg.NrWbPorts] = fwd_i.sbe[k].result; + for (int unsigned i = 0; i < CVA6Cfg.NrWbPorts; i++) begin + if (fwd_i.wb[i].valid && !fwd_i.wb[i].ex_valid) begin + fwd_res[fwd_i.wb[i].trans_id] = fwd_i.wb[i].data; + fwd_res_valid[fwd_i.wb[i].trans_id] = 1'b1; + end end + end - // use fixed prio here - // this implicitly gives higher prio to WB ports - rr_arb_tree #( - .NumIn(CVA6Cfg.NR_SB_ENTRIES + CVA6Cfg.NrWbPorts), - .DataWidth(CVA6Cfg.XLEN), - .ExtPrio(1'b1), - .AxiVldRdy(1'b1) - ) i_sel_rs1 ( - .clk_i (clk_i), - .rst_ni (rst_ni), - .flush_i(1'b0), - .rr_i ('0), - .req_i (rs1_fwd_req[i]), - .gnt_o (), - .data_i (rs_data[i]), - .gnt_i (1'b1), - .req_o (rs1_available[i]), - .data_o (rs1_res[i]), - .idx_o () - ); - - rr_arb_tree #( - .NumIn(CVA6Cfg.NR_SB_ENTRIES + CVA6Cfg.NrWbPorts), - .DataWidth(CVA6Cfg.XLEN), - .ExtPrio(1'b1), - .AxiVldRdy(1'b1) - ) i_sel_rs2 ( - .clk_i (clk_i), - .rst_ni (rst_ni), - .flush_i(1'b0), - .rr_i ('0), - .req_i (rs2_fwd_req[i]), - .gnt_o (), - .data_i (rs_data[i]), - .gnt_i (1'b1), - .req_o (rs2_available[i]), - .data_o (rs2_res[i]), - .idx_o () - ); + for (genvar i = 0; i < CVA6Cfg.NrIssuePorts; i++) begin + assign rs1_res[i] = fwd_res[idx_hzd_rs1[i]]; + assign rs1_is_not_csr[i] = rs1_fpr[i] || (fwd_i.sbe[idx_hzd_rs1[i]].fu != ariane_pkg::CSR) || (CVA6Cfg.RVS && issue_instr_i[i].op == ariane_pkg::SFENCE_VMA); + assign rs1_valid[i] = fwd_res_valid[idx_hzd_rs1[i]] && rs1_is_not_csr[i]; + assign rs2_res[i] = fwd_res[idx_hzd_rs2[i]]; + assign rs2_is_not_csr[i] = rs2_fpr[i] || (fwd_i.sbe[idx_hzd_rs2[i]].fu != ariane_pkg::CSR) || (CVA6Cfg.RVS && issue_instr_i[i].op == ariane_pkg::SFENCE_VMA); + assign rs2_valid[i] = fwd_res_valid[idx_hzd_rs2[i]] && rs2_is_not_csr[i]; - rr_arb_tree #( - .NumIn(CVA6Cfg.NR_SB_ENTRIES + CVA6Cfg.NrWbPorts), - .DataWidth(CVA6Cfg.XLEN), - .ExtPrio(1'b1), - .AxiVldRdy(1'b1) - ) i_sel_rs3 ( - .clk_i (clk_i), - .rst_ni (rst_ni), - .flush_i(1'b0), - .rr_i ('0), - .req_i (rs3_fwd_req[i]), - .gnt_o (), - .data_i (rs_data[i]), - .gnt_i (1'b1), - .req_o (rs3_available[i]), - .data_o (rs3[i]), - .idx_o () - ); + assign rs3[i] = fwd_res[idx_hzd_rs3[i]]; + assign rs3_valid[i] = fwd_res_valid[idx_hzd_rs3[i]]; - if (CVA6Cfg.NrRgprPorts == 3) begin : gen_gp_three_port - assign rs3_res[i] = rs3[i][riscv::XLEN-1:0]; - end else begin : gen_fp_three_port + if (CVA6Cfg.NrRgprPorts == 3) begin + assign rs3_res[i] = rs3[i][CVA6Cfg.XLEN-1:0]; + end else begin assign rs3_res[i] = rs3[i][CVA6Cfg.FLen-1:0]; end - - assign rs1_has_raw[i] = !issue_instr_i[i].use_zimm && ((CVA6Cfg.FpPresent && is_rs1_fpr( - issue_instr_i[i].op - )) ? rd_clobber_fpr[issue_instr_i[i].rs1] != NONE : - rd_clobber_gpr[issue_instr_i[i].rs1] != NONE); - - assign rs1_valid[i] = rs1_available[i] && (CVA6Cfg.FpPresent && is_rs1_fpr( - issue_instr_i[i].op - ) ? 1'b1 : ((rd_clobber_gpr[issue_instr_i[i].rs1] != CSR) || - (CVA6Cfg.RVS && issue_instr_i[i].op == SFENCE_VMA))); - - assign rs2_has_raw[i] = ((CVA6Cfg.FpPresent && is_rs2_fpr( - issue_instr_i[i].op - )) ? rd_clobber_fpr[issue_instr_i[i].rs2] != NONE : - rd_clobber_gpr[issue_instr_i[i].rs2] != NONE); - - assign rs2_valid[i] = rs2_available[i] && (CVA6Cfg.FpPresent && is_rs2_fpr( - issue_instr_i[i].op - ) ? 1'b1 : ((rd_clobber_gpr[issue_instr_i[i].rs2] != CSR) || - (CVA6Cfg.RVS && issue_instr_i[i].op == SFENCE_VMA))); - - assign rs3_has_raw[i] = ((CVA6Cfg.FpPresent && is_imm_fpr( - issue_instr_i[i].op - )) ? rd_clobber_fpr[issue_instr_i[i].result[REG_ADDR_SIZE-1:0]] != NONE : 0); - - assign rs3_valid[i] = rs3_available[i]; - assign rs3_fpr[i] = (CVA6Cfg.FpPresent && ariane_pkg::is_imm_fpr(issue_instr_i[i].op)); - end // --------------- @@ -636,6 +571,8 @@ module issue_read_operands // check that all operands are available, otherwise stall // forward corresponding register always_comb begin : operands_available + alu_bypass = '0; + stall_raw = '{default: stall_i}; stall_rs1 = '{default: stall_i}; stall_rs2 = '{default: stall_i}; @@ -643,7 +580,7 @@ module issue_read_operands // operand forwarding signals forward_rs1 = '0; forward_rs2 = '0; - forward_rs3 = '0; // FPR only + forward_rs3 = '0; // FPR and CV-X-IF only for (int unsigned i = 0; i < CVA6Cfg.NrIssuePorts; i++) begin if (rs1_has_raw[i]) begin @@ -664,7 +601,7 @@ module issue_read_operands end end - if (rs3_has_raw[i] && rs3_fpr[i]) begin + if (rs3_has_raw[i]) begin if (rs3_valid[i]) begin forward_rs3[i] = 1'b1; end else begin // the operand is not available -> stall @@ -675,7 +612,7 @@ module issue_read_operands end if (CVA6Cfg.CvxifEn) begin - // Remove unecessary forward and stall in case source register is not needed by coprocessor. + // Remove unnecessary forward and stall in case source register is not needed by coprocessor. if (x_issue_valid_o && x_issue_resp_i.accept) begin if (~x_issue_resp_i.register_read[0]) begin forward_rs1[0] = 1'b0; @@ -699,7 +636,11 @@ module issue_read_operands ) == is_rd_fpr( issue_instr_i[0].op ))) && issue_instr_i[1].rs1 == issue_instr_i[0].rd && issue_instr_i[1].rs1 != '0) begin - stall_raw[1] = 1'b1; + if (is_alu_bypass) begin + alu_bypass.rs1_from_rd = 1'b1; + end else begin + stall_raw[1] = 1'b1; // RS1[1] NEEDS RD[0] + end end if ((!CVA6Cfg.FpPresent || (is_rs2_fpr( @@ -707,7 +648,11 @@ module issue_read_operands ) == is_rd_fpr( issue_instr_i[0].op ))) && issue_instr_i[1].rs2 == issue_instr_i[0].rd && issue_instr_i[1].rs2 != '0) begin - stall_raw[1] = 1'b1; + if (is_alu_bypass) begin + alu_bypass.rs2_from_rd = 1'b1; + end else begin + stall_raw[1] = 1'b1; // RS2[1] NEEDS RD[0] + end end // Only check clobbered gpr for OFFLOADED instruction @@ -724,10 +669,12 @@ module issue_read_operands end // third operand from fp regfile or gp regfile if NR_RGPR_PORTS == 3 - if (OPERANDS_PER_INSTR == 3) begin : gen_gp_rs3 - assign imm_forward_rs3 = rs3_res[0]; - end else begin : gen_fp_rs3 - assign imm_forward_rs3 = {{CVA6Cfg.XLEN - CVA6Cfg.FLen{1'b0}}, rs3_res[0]}; + for (genvar i = 0; i < CVA6Cfg.NrIssuePorts; i++) begin + if (OPERANDS_PER_INSTR == 3) begin : gen_gp_rs3 + assign imm_forward_rs3[i] = rs3_res[i]; + end else begin : gen_fp_rs3 + assign imm_forward_rs3[i] = {{CVA6Cfg.XLEN - CVA6Cfg.FLen{1'b0}}, rs3_res[i]}; + end end // Forwarding/Output MUX @@ -762,7 +709,7 @@ module issue_read_operands fu_data_n[i].operand_b = rs2_res[i]; end if ((CVA6Cfg.FpPresent || (CVA6Cfg.CvxifEn && OPERANDS_PER_INSTR == 3)) && forward_rs3[i]) begin - fu_data_n[i].imm = imm_forward_rs3; + fu_data_n[i].imm = imm_forward_rs3[i]; end // use the PC as operand a @@ -789,6 +736,7 @@ module issue_read_operands always_comb begin alu_valid_n = '0; + aes_valid_n = '0; lsu_valid_n = '0; mult_valid_n = '0; fpu_valid_n = '0; @@ -801,7 +749,7 @@ module issue_read_operands if (!issue_instr_i[i].ex.valid && issue_instr_valid_i[i] && issue_ack_o[i]) begin case (issue_instr_i[i].fu) ALU: begin - if (CVA6Cfg.SuperscalarEn && !fus_busy[i].alu2) begin + if (CVA6Cfg.SuperscalarEn && use_alu2[i]) begin alu2_valid_n[i] = 1'b1; end else begin alu_valid_n[i] = 1'b1; @@ -819,15 +767,18 @@ module issue_read_operands CSR: begin csr_valid_n[i] = 1'b1; end + AES: begin + aes_valid_n[i] = 1'b1; + end default: begin if (issue_instr_i[i].fu == FPU && CVA6Cfg.FpPresent) begin fpu_valid_n[i] = 1'b1; - fpu_fmt_n = orig_instr.rftype.fmt; // fmt bits from instruction - fpu_rm_n = orig_instr.rftype.rm; // rm bits from instruction + fpu_fmt_n = orig_instr[i].rftype.fmt; // fmt bits from instruction + fpu_rm_n = orig_instr[i].rftype.rm; // rm bits from instruction end else if (issue_instr_i[i].fu == FPU_VEC && CVA6Cfg.FpPresent) begin fpu_valid_n[i] = 1'b1; - fpu_fmt_n = orig_instr.rvftype.vfmt; // vfmt bits from instruction - fpu_rm_n = {2'b0, orig_instr.rvftype.repl}; // repl bit from instruction + fpu_fmt_n = orig_instr[i].rvftype.vfmt; // vfmt bits from instruction + fpu_rm_n = {2'b0, orig_instr[i].rvftype.repl}; // repl bit from instruction end end endcase @@ -837,6 +788,7 @@ module issue_read_operands // functional unit with the wrong inputs if (flush_i) begin alu_valid_n = '0; + aes_valid_n = '0; lsu_valid_n = '0; mult_valid_n = '0; fpu_valid_n = '0; @@ -846,10 +798,11 @@ module issue_read_operands end end // FU select, assert the correct valid out signal (in the next cycle) - // This needs to be like this to make verilator happy. I know its ugly. + // This needs to be like this to make verilator happy. I know it's ugly. always_ff @(posedge clk_i or negedge rst_ni) begin if (!rst_ni) begin alu_valid_q <= '0; + aes_valid_q <= '0; lsu_valid_q <= '0; mult_valid_q <= '0; fpu_valid_q <= '0; @@ -860,6 +813,7 @@ module issue_read_operands branch_valid_q <= '0; end else begin alu_valid_q <= alu_valid_n; + aes_valid_q <= aes_valid_n; lsu_valid_q <= lsu_valid_n; mult_valid_q <= mult_valid_n; fpu_valid_q <= fpu_valid_n; @@ -880,7 +834,7 @@ module issue_read_operands case (issue_instr_i[i].fu) CVXIF: begin cvxif_valid_n[i] = 1'b1; - cvxif_off_instr_n = orig_instr[i]; + cvxif_off_instr_n = orig_instr_i[i]; end default: ; endcase @@ -902,40 +856,6 @@ module issue_read_operands end end - always_comb begin : gen_check_waw_dependencies - stall_waw = '1; - for (int unsigned i = 0; i < CVA6Cfg.NrIssuePorts; i++) begin - if (issue_instr_valid_i[i] && !fu_busy[i]) begin - // ----------------------------------------- - // WAW - Write After Write Dependency Check - // ----------------------------------------- - // no other instruction has the same destination register -> issue the instruction - if ((CVA6Cfg.FpPresent && ariane_pkg::is_rd_fpr( - issue_instr_i[i].op - )) ? (rd_clobber_fpr[issue_instr_i[i].rd] == NONE) : - (rd_clobber_gpr[issue_instr_i[i].rd] == NONE)) begin - stall_waw[i] = 1'b0; - end - // or check that the target destination register will be written in this cycle by the - // commit stage - for (int unsigned c = 0; c < CVA6Cfg.NrCommitPorts; c++) begin - if ((CVA6Cfg.FpPresent && ariane_pkg::is_rd_fpr( - issue_instr_i[i].op - )) ? (we_fpr_i[c] && waddr_i[c] == issue_instr_i[i].rd) : - (we_gpr_i[c] && waddr_i[c] == issue_instr_i[i].rd)) begin - stall_waw[i] = 1'b0; - end - end - if (i > 0) begin - if ((issue_instr_i[i].rd == issue_instr_i[i-1].rd) && (issue_instr_i[i].rd != '0)) begin - stall_waw[i] = 1'b1; - end - end - end - end - end - - // We can issue an instruction if we do not detect that any other instruction is writing the same // destination register. // We also need to check if there is an unresolved branch in the scoreboard. @@ -946,7 +866,7 @@ module issue_read_operands // check that the instruction we got is valid // and that the functional unit we need is not busy if (issue_instr_valid_i[i] && !fu_busy[i]) begin - if (!stall_raw[i] && !stall_waw[i]) begin + if (!stall_raw[i]) begin issue_ack[i] = 1'b1; end if (issue_instr_i[i].ex.valid) begin @@ -956,7 +876,7 @@ module issue_read_operands end issue_ack_o = issue_ack; - // Do not acknoledge the issued instruction if transaction is not completed. + // Do not acknowledge the issued instruction if transaction is not completed. if (issue_instr_i[0].fu == CVXIF && !(x_transaction_accepted_o || x_transaction_rejected)) begin issue_ack_o[0] = issue_instr_i[0].ex.valid && issue_instr_valid_i[0]; end @@ -978,7 +898,7 @@ module issue_read_operands logic [CVA6Cfg.NrCommitPorts-1:0][CVA6Cfg.XLEN-1:0] wdata_pack; logic [CVA6Cfg.NrCommitPorts-1:0] we_pack; - //adjust address to read from register file (when synchronous RAM is used reads take one cycle, so we advance the address) + //adjust address to read from register file (when synchronous RAM is used reads take one cycle, so we advance the address) for (genvar i = 0; i <= CVA6Cfg.NrIssuePorts - 1; i++) begin assign raddr_pack[i*OPERANDS_PER_INSTR+0] = CVA6Cfg.FpgaEn && CVA6Cfg.FpgaAlteraEn ? issue_instr_i_prev[i].rs1[4:0] : issue_instr_i[i].rs1[4:0]; assign raddr_pack[i*OPERANDS_PER_INSTR+1] = CVA6Cfg.FpgaEn && CVA6Cfg.FpgaAlteraEn ? issue_instr_i_prev[i].rs2[4:0] : issue_instr_i[i].rs2[4:0]; @@ -1041,7 +961,7 @@ module issue_read_operands }; if (CVA6Cfg.SuperscalarEn) begin - if (!(issue_instr_i[0].fu inside {FPU, FPU_VEC})) begin + if (!(issue_instr_i[0].fu inside {FPU, FPU_VEC} || issue_instr_i[0].op inside {[FLD:FSB]})) begin fp_raddr_pack = { issue_instr_i[1].result[4:0], issue_instr_i[1].rs2[4:0], issue_instr_i[1].rs1[4:0] }; @@ -1140,6 +1060,7 @@ module issue_read_operands end end + assign alu_bypass_n = &issue_ack_o ? alu_bypass : '0; always_ff @(posedge clk_i or negedge rst_ni) begin if (!rst_ni) begin @@ -1152,29 +1073,24 @@ module issue_read_operands is_compressed_instr_o <= 1'b0; branch_predict_o <= {cf_t'(0), {CVA6Cfg.VLEN{1'b0}}}; x_transaction_rejected_o <= 1'b0; + alu_bypass_q <= '0; end else begin fu_data_q <= fu_data_n; + alu_bypass_q <= alu_bypass_n; + if (CVA6Cfg.ZKN) begin + orig_instr_aes_bits <= {orig_instr_i[0][31:30], orig_instr_i[0][23:20]}; + end if (CVA6Cfg.RVH) begin tinst_q <= tinst_n; end - if (CVA6Cfg.SuperscalarEn) begin - if (issue_instr_i[1].fu == CTRL_FLOW) begin - pc_o <= issue_instr_i[1].pc; - is_compressed_instr_o <= issue_instr_i[1].is_compressed; - branch_predict_o <= issue_instr_i[1].bp; - end - end + pc_o <= pc_n; + is_compressed_instr_o <= is_compressed_instr_n; + branch_predict_o <= branch_predict_n; if (issue_instr_i[0].fu == CTRL_FLOW) begin - pc_o <= issue_instr_i[0].pc; - is_compressed_instr_o <= issue_instr_i[0].is_compressed; - branch_predict_o <= issue_instr_i[0].bp; if (CVA6Cfg.RVZCMT) is_zcmt_o <= issue_instr_i[0].is_zcmt; else is_zcmt_o <= '0; end - x_transaction_rejected_o <= 1'b0; - if (issue_instr_i[0].fu == CVXIF) begin - x_transaction_rejected_o <= x_transaction_rejected; - end + x_transaction_rejected_o <= x_transaction_rejected_n; end end @@ -1188,20 +1104,6 @@ module issue_read_operands ); end - // FPU does not declare that it will return a result the subsequent cycle so - // it is not possible for issue stage to know when ALU2 can be used if there - // is an FPU. As there are discussions to change the FPU, I did not explore - // its architecture to create this "FPU returns next cycle" signal. Also, a - // "lookahead" optimization should be added to be performant with FPU: when - // issue port 2 is issuing to FPU, issue port 1 should issue to ALU1 instead - // of ALU2 so that FPU is not busy. However, if FPU has a minimum execution - // time of 2 cycles, it is possible to simply not raise fus_busy[1].alu2. - initial begin - assert (!(CVA6Cfg.SuperscalarEn && CVA6Cfg.FpPresent)) - else - $fatal(1, "FPU is not yet supported in superscalar CVA6, see comments above this assertion."); - end - for (genvar i = 0; i < CVA6Cfg.NrIssuePorts; i++) begin assert property (@(posedge clk_i) (branch_valid_q) |-> (!$isunknown( fu_data_q[i].operand_a diff --git a/core/issue_stage.sv b/core/issue_stage.sv index 4ffc5382e89..09cbeeb862f 100644 --- a/core/issue_stage.sv +++ b/core/issue_stage.sv @@ -50,7 +50,7 @@ module issue_stage input logic [CVA6Cfg.NrIssuePorts-1:0] decoded_instr_valid_i, // Is instruction a control flow instruction - ID_STAGE input logic [CVA6Cfg.NrIssuePorts-1:0] is_ctrl_flow_i, - // Handshake's acknowlege with decode stage - ID_STAGE + // Handshake's acknowledge with decode stage - ID_STAGE output logic [CVA6Cfg.NrIssuePorts-1:0] decoded_instr_ack_o, // rs1 forwarding - EX_STAGE output [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.VLEN-1:0] rs1_forwarding_o, @@ -58,6 +58,8 @@ module issue_stage output [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.VLEN-1:0] rs2_forwarding_o, // FU data useful to execute instruction - EX_STAGE output fu_data_t [CVA6Cfg.NrIssuePorts-1:0] fu_data_o, + // ALU to ALU bypass control - EX_STAGE + output alu_bypass_t alu_bypass_o, // Program Counter - EX_STAGE output logic [CVA6Cfg.VLEN-1:0] pc_o, // Is zcmt instruction - EX_STAGE @@ -70,6 +72,8 @@ module issue_stage input logic flu_ready_i, // ALU output is valid - EX_STAGE output logic [CVA6Cfg.NrIssuePorts-1:0] alu_valid_o, + // AES output is valid - EX_STAGE + output logic [CVA6Cfg.NrIssuePorts-1:0] aes_valid_o, // Branch unit is valid - EX_STAGE output logic [CVA6Cfg.NrIssuePorts-1:0] branch_valid_o, // Information of branch prediction - EX_STAGE @@ -90,6 +94,8 @@ module issue_stage output logic [1:0] fpu_fmt_o, // FPU rm field - EX_STAGE output logic [2:0] fpu_rm_o, + // FPU early valid - EX_STAGE + input logic fpu_early_valid_i, // ALU2 FU is valid - EX_STAGE output logic [CVA6Cfg.NrIssuePorts-1:0] alu2_valid_o, // CSR is valid - EX_STAGE @@ -163,7 +169,9 @@ module issue_stage // Information dedicated to RVFI - RVFI output logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.XLEN-1:0] rvfi_rs1_o, // Information dedicated to RVFI - RVFI - output logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.XLEN-1:0] rvfi_rs2_o + output logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.XLEN-1:0] rvfi_rs2_o, + // Original instruction bits for AES + output logic [5:0] orig_instr_aes_bits ); // --------------------------------------------------- // Scoreboard (SB) <-> Issue and Read Operands (IRO) @@ -258,6 +266,7 @@ module issue_stage .issue_ack_o (issue_ack_iro_sb), .fwd_i (fwd), .fu_data_o (fu_data_o), + .alu_bypass_o (alu_bypass_o), .rs1_forwarding_o (rs1_forwarding_o), .rs2_forwarding_o (rs2_forwarding_o), .pc_o, @@ -265,6 +274,7 @@ module issue_stage .is_compressed_instr_o, .flu_ready_i (flu_ready_i), .alu_valid_o (alu_valid_o), + .aes_valid_o (aes_valid_o), .branch_valid_o (branch_valid_o), .tinst_o (tinst_o), .branch_predict_o, @@ -275,6 +285,7 @@ module issue_stage .fpu_valid_o, .fpu_fmt_o, .fpu_rm_o, + .fpu_early_valid_i, .alu2_valid_o, .csr_valid_o, .cvxif_valid_o (xfu_valid_o), @@ -300,7 +311,8 @@ module issue_stage .we_fpr_i, .stall_issue_o, .rvfi_rs1_o (rvfi_rs1_o), - .rvfi_rs2_o (rvfi_rs2_o) + .rvfi_rs2_o (rvfi_rs2_o), + .orig_instr_aes_bits (orig_instr_aes_bits) ); endmodule diff --git a/core/load_store_unit.sv b/core/load_store_unit.sv index 0fec645319a..12562063e62 100644 --- a/core/load_store_unit.sv +++ b/core/load_store_unit.sv @@ -25,7 +25,11 @@ module load_store_unit parameter type icache_arsp_t = logic, parameter type icache_dreq_t = logic, parameter type icache_drsp_t = logic, - parameter type lsu_ctrl_t = logic + parameter type lsu_ctrl_t = logic, + parameter type acc_mmu_req_t = logic, + parameter type acc_mmu_resp_t = logic, + parameter type cbo_t = logic, + parameter type bp_resolve_t = logic ) ( // Subsystem Clock - SUBSYSTEM input logic clk_i, @@ -37,6 +41,8 @@ module load_store_unit input logic stall_st_pending_i, // TO_BE_COMPLETED - TO_BE_COMPLETED output logic no_st_pending_o, + // Shared TLB is busy processing a multi-cycle flush + output logic shared_tlb_flush_busy_o, // TO_BE_COMPLETED - TO_BE_COMPLETED input logic amo_valid_commit_i, // TO_BE_COMPLETED - TO_BE_COMPLETED @@ -47,6 +53,8 @@ module load_store_unit output logic lsu_ready_o, // Load Store Unit instruction is valid - ISSUE_STAGE input logic lsu_valid_i, + // Signals speculative loads for non-idempotent load handling - EX_STAGE + input logic speculative_load_i, // Load transaction ID - ISSUE_STAGE output logic [CVA6Cfg.TRANS_ID_BITS-1:0] load_trans_id_o, @@ -72,7 +80,8 @@ module load_store_unit output logic commit_ready_o, // Commit transaction ID - TO_BE_COMPLETED input logic [CVA6Cfg.TRANS_ID_BITS-1:0] commit_tran_id_i, - + // Result from branch unit - EX_STAGE + input bp_resolve_t resolved_branch_i, // Enable virtual memory translation - TO_BE_COMPLETED input logic enable_translation_i, // Enable G-Stage memory translation - TO_BE_COMPLETED @@ -82,6 +91,10 @@ module load_store_unit // Enable G-Stage memory translation for load/stores - TO_BE_COMPLETED input logic en_ld_st_g_translation_i, + // Accelerator request for CVA6's MMU + input acc_mmu_req_t acc_mmu_req_i, + output acc_mmu_resp_t acc_mmu_resp_o, + // Instruction cache input request - CACHES input icache_arsp_t icache_areq_i, // Instruction cache output request - CACHES @@ -89,6 +102,8 @@ module load_store_unit // Current privilege mode - CSR_REGFILE input riscv::priv_lvl_t priv_lvl_i, + // Data Endian mode - CSR_REGFILE + input logic mbe_i, // Current virtualization mode - CSR_REGFILE input logic v_i, // Privilege level at which load and stores should happen - CSR_REGFILE @@ -148,37 +163,43 @@ module load_store_unit input amo_resp_t amo_resp_i, // PMP configuration - CSR_REGFILE - input riscv::pmpcfg_t [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0] pmpcfg_i, + input riscv::pmpcfg_t [avoid_neg(CVA6Cfg.NrPMPEntries-1):0] pmpcfg_i, // PMP address - CSR_REGFILE - input logic [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0][CVA6Cfg.PLEN-3:0] pmpaddr_i, + input logic [avoid_neg(CVA6Cfg.NrPMPEntries-1):0][CVA6Cfg.PLEN-3:0] pmpaddr_i, - // RVFI inforamtion - RVFI + // RVFI information - RVFI output lsu_ctrl_t rvfi_lsu_ctrl_o, // RVFI information - RVFI - output logic [CVA6Cfg.PLEN-1:0] rvfi_mem_paddr_o + output logic [CVA6Cfg.PLEN-1:0] rvfi_mem_paddr_o, + //Trigger module communication + input logic sdtrig_load_stall_i, + input logic sdtrig_load_cancel_i, + input logic [CVA6Cfg.XLEN-1:0] sdtrig_load_action_i, + input logic sdtrig_store_stall_i, + input logic [CVA6Cfg.XLEN-1:0] sdtrig_store_action_i ); // data is misaligned - logic data_misaligned; + logic data_misaligned; // -------------------------------------- // 1st register stage - (stall registers) // -------------------------------------- // those are the signals which are always correct // e.g.: they keep the value in the stall case - lsu_ctrl_t lsu_ctrl; + lsu_ctrl_t lsu_ctrl, lsu_ctrl_byp; - logic pop_st; - logic pop_ld; + logic pop_st; + logic pop_ld; // ------------------------------ // Address Generation Unit (AGU) // ------------------------------ // virtual address as calculated by the AGU in the first cycle - logic [ CVA6Cfg.VLEN-1:0] vaddr_i; - logic [ CVA6Cfg.XLEN-1:0] vaddr_xlen; - logic overflow; - logic g_overflow; - logic [(CVA6Cfg.XLEN/8)-1:0] be_i; + logic [ CVA6Cfg.VLEN-1:0] vaddr_i; + logic [ CVA6Cfg.XLEN-1:0] vaddr_xlen; + logic overflow; + logic g_overflow; + logic [(CVA6Cfg.XLEN/8)-1:0] be_i; assign vaddr_xlen = $unsigned($signed(fu_data_i.imm) + $signed(fu_data_i.operand_a)); assign vaddr_i = vaddr_xlen[CVA6Cfg.VLEN-1:0]; @@ -190,10 +211,10 @@ module load_store_unit assign g_overflow = 1'b0; end - logic st_valid_i; - logic ld_valid_i; - logic ld_translation_req; - logic st_translation_req; + logic st_valid_i; + logic ld_valid_i; + logic ld_translation_req; + logic st_translation_req, cva6_st_translation_req, acc_st_translation_req; logic [CVA6Cfg.VLEN-1:0] ld_vaddr; logic [ 31:0] ld_tinst; logic ld_hs_ld_st_inst; @@ -202,41 +223,44 @@ module load_store_unit logic [ 31:0] st_tinst; logic st_hs_ld_st_inst; logic st_hlvx_inst; - logic translation_req; - logic translation_valid; - logic [CVA6Cfg.VLEN-1:0] mmu_vaddr; - logic [CVA6Cfg.PLEN-1:0] mmu_paddr, lsu_paddr; - logic [ 31:0] mmu_tinst; - logic mmu_hs_ld_st_inst; - logic mmu_hlvx_inst; - exception_t mmu_exception; - exception_t pmp_exception; - icache_areq_t pmp_icache_areq_i; - logic pmp_translation_valid; - logic dtlb_hit; - logic [ CVA6Cfg.PPNW-1:0] dtlb_ppn; - - logic ld_valid; - logic [CVA6Cfg.TRANS_ID_BITS-1:0] ld_trans_id; - logic [ CVA6Cfg.XLEN-1:0] ld_result; - logic st_valid; - logic [CVA6Cfg.TRANS_ID_BITS-1:0] st_trans_id; - logic [ CVA6Cfg.XLEN-1:0] st_result; - - logic [ 11:0] page_offset; - logic page_offset_matches; - - exception_t misaligned_exception; - exception_t ld_ex; - exception_t st_ex; - - logic hs_ld_st_inst; - logic hlvx_inst; - + logic translation_req, cva6_translation_req, acc_translation_req; + logic translation_valid, cva6_translation_valid; + logic [CVA6Cfg.VLEN-1:0] mmu_vaddr, cva6_mmu_vaddr, acc_mmu_vaddr; + logic [CVA6Cfg.PLEN-1:0] mmu_paddr, cva6_mmu_paddr, acc_mmu_paddr, lsu_paddr; + logic [CVA6Cfg.VLEN-1:0] pmp_vaddr_q; + logic pmp_is_store_q; + logic pmp_hlvx_inst_q; + logic [ 31:0] mmu_tinst; + logic mmu_hs_ld_st_inst; + logic mmu_hlvx_inst; + exception_t mmu_exception, cva6_mmu_exception, acc_mmu_exception; + exception_t pmp_exception; + icache_areq_t pmp_icache_areq_i; + logic pmp_translation_valid; + logic dtlb_hit, cva6_dtlb_hit, acc_dtlb_hit; + logic [CVA6Cfg.PPNW-1:0] dtlb_ppn, cva6_dtlb_ppn, acc_dtlb_ppn; + + logic ld_valid; + logic [CVA6Cfg.TRANS_ID_BITS-1:0] ld_trans_id; + logic [ CVA6Cfg.XLEN-1:0] ld_result; + logic st_valid; + logic [CVA6Cfg.TRANS_ID_BITS-1:0] st_trans_id; + logic [ CVA6Cfg.XLEN-1:0] st_result; + + logic [ 11:0] page_offset; + logic page_offset_matches; + + exception_t misaligned_exception, cva6_misaligned_exception, acc_misaligned_exception; + exception_t ld_ex; + exception_t st_ex; + + logic hs_ld_st_inst; + logic hlvx_inst; logic [1:0] sum, mxr; logic [CVA6Cfg.PPNW-1:0] satp_ppn[2:0]; logic [CVA6Cfg.ASID_WIDTH-1:0] asid[2:0], asid_to_be_flushed[1:0]; logic [CVA6Cfg.VLEN-1:0] vaddr_to_be_flushed[1:0]; + // ------------------- // MMU e.g.: TLBs/PTW // ------------------- @@ -276,6 +300,9 @@ module load_store_unit .lsu_valid_o (pmp_translation_valid), .lsu_paddr_o (lsu_paddr), + .lsu_vaddr_o (pmp_vaddr_q), + .lsu_is_store_o (pmp_is_store_q), + .lsu_hlvx_inst_o(pmp_hlvx_inst_q), .lsu_exception_o(pmp_exception), .priv_lvl_i (priv_lvl_i), @@ -286,6 +313,7 @@ module load_store_unit .vs_sum_i, .mxr_i, .vmxr_i, + .mbe_i (mbe_i), .hlvx_inst_i (mmu_hlvx_inst), .hs_ld_st_inst_i(mmu_hs_ld_st_inst), @@ -305,6 +333,7 @@ module load_store_unit .itlb_miss_o(itlb_miss_o), .dtlb_miss_o(dtlb_miss_o), + .shared_tlb_flush_busy_o(shared_tlb_flush_busy_o), .req_port_i(dcache_req_ports_i[0]), .req_port_o(dcache_req_ports_o[0]), @@ -315,6 +344,7 @@ module load_store_unit end else begin : gen_no_mmu // icache request without MMU, virtual and physical address are identical assign pmp_icache_areq_i.fetch_valid = icache_areq_i.fetch_req; + assign shared_tlb_flush_busy_o = 1'b0; //default 0 for shared_tlb flush if (CVA6Cfg.VLEN >= CVA6Cfg.PLEN) begin : gen_virtual_physical_address_instruction_vlen_greater assign pmp_icache_areq_i.fetch_paddr = icache_areq_i.fetch_vaddr[CVA6Cfg.PLEN-1:0]; end else begin : gen_virtual_physical_address_instruction_plen_greater @@ -326,6 +356,9 @@ module load_store_unit always_ff @(posedge clk_i or negedge rst_ni) begin if (~rst_ni) begin lsu_paddr <= '0; + pmp_vaddr_q <= '0; + pmp_is_store_q <= 1'b0; + pmp_hlvx_inst_q <= 1'b0; pmp_exception <= '0; pmp_translation_valid <= 1'b0; end else begin @@ -334,6 +367,9 @@ module load_store_unit end else begin lsu_paddr <= CVA6Cfg.PLEN'(mmu_vaddr); end + pmp_vaddr_q <= mmu_vaddr; + pmp_is_store_q <= st_translation_req; + pmp_hlvx_inst_q <= mmu_hlvx_inst; pmp_exception <= misaligned_exception; pmp_translation_valid <= translation_req; end @@ -347,6 +383,7 @@ module load_store_unit assign dcache_req_ports_o[0].data_be = '1; assign dcache_req_ports_o[0].data_size = 2'b11; assign dcache_req_ports_o[0].data_we = 1'b0; + assign dcache_req_ports_o[0].data_wuser = '0; assign dcache_req_ports_o[0].kill_req = '0; assign dcache_req_ports_o[0].tag_valid = 1'b0; @@ -373,9 +410,10 @@ module load_store_unit .icache_fetch_vaddr_i(icache_areq_i.fetch_vaddr), .lsu_valid_i (pmp_translation_valid), .lsu_paddr_i (lsu_paddr), - .lsu_vaddr_i (mmu_vaddr), + .lsu_vaddr_i (pmp_vaddr_q), .lsu_exception_i (pmp_exception), - .lsu_is_store_i (st_translation_req), + .lsu_is_store_i (pmp_is_store_q), + .lsu_hlvx_inst_i (pmp_hlvx_inst_q), .lsu_valid_o (translation_valid), .lsu_paddr_o (mmu_paddr), .lsu_exception_o (mmu_exception), @@ -387,6 +425,108 @@ module load_store_unit .pmpaddr_i (pmpaddr_i) ); + // ------------------ + // External MMU port + // ------------------ + + if (CVA6Cfg.EnableAccelerator) begin + // The MMU can be connected to CVA6 or the ACCELERATOR + enum logic { + CVA6, + ACC + } + mmu_state_d, mmu_state_q; + always_ff @(posedge clk_i or negedge rst_ni) begin + if (~rst_ni) begin + mmu_state_q <= CVA6; + end else begin + mmu_state_q <= mmu_state_d; + end + end + // Straightforward and slow-reactive MMU arbitration logic + // This logic can be optimized to reduce answer latency and contention + always_comb begin + // Maintain state + mmu_state_d = mmu_state_q; + // Serve CVA6 and gate the accelerator by default + // MMU input + misaligned_exception = cva6_misaligned_exception; + st_translation_req = cva6_st_translation_req; + translation_req = cva6_translation_req; + mmu_vaddr = cva6_mmu_vaddr; + // MMU output + cva6_translation_valid = translation_valid; + cva6_mmu_paddr = mmu_paddr; + cva6_mmu_exception = mmu_exception; + cva6_dtlb_hit = dtlb_hit; + cva6_dtlb_ppn = dtlb_ppn; + acc_mmu_resp_o.acc_mmu_valid = '0; + acc_mmu_resp_o.acc_mmu_paddr = '0; + acc_mmu_resp_o.acc_mmu_exception = '0; + acc_mmu_resp_o.acc_mmu_dtlb_hit = '0; + acc_mmu_resp_o.acc_mmu_dtlb_ppn = '0; + unique case (mmu_state_q) + CVA6: begin + // Only the accelerator is requesting, and the lsu bypass queue is empty. + if (acc_mmu_req_i.acc_mmu_req && !lsu_valid_i && lsu_ready_o) begin + // Lock the MMU to the accelerator. + // If the issue stage is firing a mem op in this cycle, + // the bypass queue will buffer it. + mmu_state_d = ACC; + end + // Make this a mealy FSM to cut some latency. + // It should be okay timing-wise since cva6's requests already + // depend on lsu_valid_i. Moreover, lsu_ready_o is sequentially + // generated by the bypass and, in this first implementation, + // the acc request already depends combinatorially upon acc_mmu_req_i.acc_mmu_req. + end + ACC: begin + // MMU input + misaligned_exception = acc_mmu_req_i.acc_mmu_misaligned_ex; + st_translation_req = acc_mmu_req_i.acc_mmu_is_store; + translation_req = acc_mmu_req_i.acc_mmu_req; + mmu_vaddr = acc_mmu_req_i.acc_mmu_vaddr; + // MMU output + acc_mmu_resp_o.acc_mmu_valid = translation_valid; + acc_mmu_resp_o.acc_mmu_paddr = mmu_paddr; + acc_mmu_resp_o.acc_mmu_exception = mmu_exception; + acc_mmu_resp_o.acc_mmu_dtlb_hit = dtlb_hit; + acc_mmu_resp_o.acc_mmu_dtlb_ppn = dtlb_ppn; + cva6_translation_valid = '0; + cva6_mmu_paddr = '0; + cva6_mmu_exception = '0; + cva6_dtlb_hit = '0; + cva6_dtlb_ppn = '0; + // Get back to CVA6 after the translation + if (translation_valid) mmu_state_d = CVA6; + end + default: mmu_state_d = CVA6; + endcase + end + always_comb begin + // Feed forward + lsu_ctrl = lsu_ctrl_byp; + // Mask the lsu valid so that cva6's req gets buffered in the + // bypass queue when the MMU is being used by the accelerator. + lsu_ctrl.valid = (mmu_state_q == ACC) ? 1'b0 : lsu_ctrl_byp.valid; + end + end else begin + // MMU input + assign misaligned_exception = cva6_misaligned_exception; + assign st_translation_req = cva6_st_translation_req; + assign translation_req = cva6_translation_req; + assign mmu_vaddr = cva6_mmu_vaddr; + // MMU output + assign cva6_translation_valid = translation_valid; + assign cva6_mmu_paddr = mmu_paddr; + assign cva6_mmu_exception = mmu_exception; + assign cva6_dtlb_hit = dtlb_hit; + assign cva6_dtlb_ppn = dtlb_ppn; + // No accelerator + assign acc_mmu_resp_o = '0; + // Feed forward the lsu_ctrl bypass + assign lsu_ctrl = lsu_ctrl_byp; + end logic store_buffer_empty; // ------------------ @@ -397,7 +537,8 @@ module load_store_unit .dcache_req_i_t(dcache_req_i_t), .dcache_req_o_t(dcache_req_o_t), .exception_t(exception_t), - .lsu_ctrl_t(lsu_ctrl_t) + .lsu_ctrl_t(lsu_ctrl_t), + .cbo_t(cbo_t) ) i_store_unit ( .clk_i, .rst_ni, @@ -412,21 +553,22 @@ module load_store_unit .commit_i, .commit_ready_o, .amo_valid_commit_i, + .mbe_i (mbe_i), .valid_o (st_valid), .trans_id_o (st_trans_id), .result_o (st_result), .ex_o (st_ex), // MMU port - .translation_req_o (st_translation_req), + .translation_req_o (cva6_st_translation_req), .vaddr_o (st_vaddr), .rvfi_mem_paddr_o (rvfi_mem_paddr_o), .tinst_o (st_tinst), .hs_ld_st_inst_o (st_hs_ld_st_inst), .hlvx_inst_o (st_hlvx_inst), - .paddr_i (mmu_paddr), - .ex_i (mmu_exception), - .dtlb_hit_i (dtlb_hit), + .paddr_i (cva6_mmu_paddr), + .ex_i (cva6_mmu_exception), + .dtlb_hit_i (cva6_dtlb_hit), // Load Unit .page_offset_i (page_offset), .page_offset_matches_o(page_offset_matches), @@ -435,7 +577,10 @@ module load_store_unit .amo_resp_i, // to memory arbiter .req_port_i (dcache_req_ports_i[2]), - .req_port_o (dcache_req_ports_o[2]) + .req_port_o (dcache_req_ports_o[2]), + //Trigger module + .sdtrig_store_stall_i (sdtrig_store_stall_i), + .sdtrig_store_action_i(sdtrig_store_action_i) ); // ------------------ @@ -459,16 +604,17 @@ module load_store_unit .trans_id_o (ld_trans_id), .result_o (ld_result), .ex_o (ld_ex), + .mbe_i (mbe_i), // MMU port .translation_req_o (ld_translation_req), .vaddr_o (ld_vaddr), .tinst_o (ld_tinst), .hs_ld_st_inst_o (ld_hs_ld_st_inst), .hlvx_inst_o (ld_hlvx_inst), - .paddr_i (mmu_paddr), - .ex_i (mmu_exception), - .dtlb_hit_i (dtlb_hit), - .dtlb_ppn_i (dtlb_ppn), + .paddr_i (cva6_mmu_paddr), + .ex_i (cva6_mmu_exception), + .dtlb_hit_i (cva6_dtlb_hit), + .dtlb_ppn_i (cva6_dtlb_ppn), // to store unit .page_offset_o (page_offset), .page_offset_matches_i(page_offset_matches), @@ -477,7 +623,11 @@ module load_store_unit // to memory arbiter .req_port_i (dcache_req_ports_i[1]), .req_port_o (dcache_req_ports_o[1]), - .dcache_wbuffer_not_ni_i + .dcache_wbuffer_not_ni_i, + //sdtrig + .sdtrig_load_stall_i (sdtrig_load_stall_i), + .sdtrig_load_cancel_i (sdtrig_load_cancel_i), + .sdtrig_load_action_i (sdtrig_load_action_i) ); // ---------------------------- @@ -510,22 +660,22 @@ module load_store_unit // determine whether this is a load or store always_comb begin : which_op - ld_valid_i = 1'b0; - st_valid_i = 1'b0; + ld_valid_i = 1'b0; + st_valid_i = 1'b0; - translation_req = 1'b0; - mmu_vaddr = {CVA6Cfg.VLEN{1'b0}}; - mmu_tinst = {32{1'b0}}; - mmu_hs_ld_st_inst = 1'b0; - mmu_hlvx_inst = 1'b0; + cva6_translation_req = 1'b0; + cva6_mmu_vaddr = {CVA6Cfg.VLEN{1'b0}}; + mmu_tinst = {32{1'b0}}; + mmu_hs_ld_st_inst = 1'b0; + mmu_hlvx_inst = 1'b0; // check the operation to activate the right functional unit accordingly unique case (lsu_ctrl.fu) // all loads go here LOAD: begin - ld_valid_i = lsu_ctrl.valid; - translation_req = ld_translation_req; - mmu_vaddr = ld_vaddr; + ld_valid_i = lsu_ctrl.valid; + cva6_translation_req = ld_translation_req; + cva6_mmu_vaddr = ld_vaddr; if (CVA6Cfg.RVH) begin mmu_tinst = ld_tinst; mmu_hs_ld_st_inst = ld_hs_ld_st_inst; @@ -534,9 +684,9 @@ module load_store_unit end // all stores go here STORE: begin - st_valid_i = lsu_ctrl.valid; - translation_req = st_translation_req; - mmu_vaddr = st_vaddr; + st_valid_i = lsu_ctrl.valid; + cva6_translation_req = st_translation_req; + cva6_mmu_vaddr = st_vaddr; if (CVA6Cfg.RVH) begin mmu_tinst = st_tinst; mmu_hs_ld_st_inst = st_hs_ld_st_inst; @@ -594,7 +744,7 @@ module load_store_unit // the misaligned exception is passed to the functional unit via the MMU, which in case // can augment the exception if other memory related exceptions like a page fault or access errors always_comb begin : data_misaligned_detection - misaligned_exception = { + cva6_misaligned_exception = { {CVA6Cfg.XLEN{1'b0}}, {CVA6Cfg.XLEN{1'b0}}, {CVA6Cfg.GPLEN{1'b0}}, {32{1'b0}}, 1'b0, 1'b0 }; data_misaligned = 1'b0; @@ -640,26 +790,26 @@ module load_store_unit if (data_misaligned) begin case (lsu_ctrl.fu) LOAD: begin - misaligned_exception.cause = riscv::LD_ADDR_MISALIGNED; - misaligned_exception.valid = 1'b1; + cva6_misaligned_exception.cause = riscv::LD_ADDR_MISALIGNED; + cva6_misaligned_exception.valid = 1'b1; if (CVA6Cfg.TvalEn) - misaligned_exception.tval = {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{1'b0}}, lsu_ctrl.vaddr}; + cva6_misaligned_exception.tval = {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{1'b0}}, lsu_ctrl.vaddr}; if (CVA6Cfg.RVH) begin - misaligned_exception.tval2 = '0; - misaligned_exception.tinst = lsu_ctrl.tinst; - misaligned_exception.gva = ld_st_v_i; + cva6_misaligned_exception.tval2 = '0; + cva6_misaligned_exception.tinst = lsu_ctrl.tinst; + cva6_misaligned_exception.gva = ld_st_v_i; end end STORE: begin - misaligned_exception.cause = riscv::ST_ADDR_MISALIGNED; - misaligned_exception.valid = 1'b1; + cva6_misaligned_exception.cause = riscv::ST_ADDR_MISALIGNED; + cva6_misaligned_exception.valid = 1'b1; if (CVA6Cfg.TvalEn) - misaligned_exception.tval = {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{1'b0}}, lsu_ctrl.vaddr}; + cva6_misaligned_exception.tval = {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{1'b0}}, lsu_ctrl.vaddr}; if (CVA6Cfg.RVH) begin - misaligned_exception.tval2 = '0; - misaligned_exception.tinst = lsu_ctrl.tinst; - misaligned_exception.gva = ld_st_v_i; + cva6_misaligned_exception.tval2 = '0; + cva6_misaligned_exception.tinst = lsu_ctrl.tinst; + cva6_misaligned_exception.gva = ld_st_v_i; end end default: ; @@ -670,25 +820,25 @@ module load_store_unit case (lsu_ctrl.fu) LOAD: begin - misaligned_exception.cause = riscv::LOAD_PAGE_FAULT; - misaligned_exception.valid = 1'b1; + cva6_misaligned_exception.cause = riscv::LOAD_PAGE_FAULT; + cva6_misaligned_exception.valid = 1'b1; if (CVA6Cfg.TvalEn) - misaligned_exception.tval = {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{1'b0}}, lsu_ctrl.vaddr}; + cva6_misaligned_exception.tval = {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{1'b0}}, lsu_ctrl.vaddr}; if (CVA6Cfg.RVH) begin - misaligned_exception.tval2 = '0; - misaligned_exception.tinst = lsu_ctrl.tinst; - misaligned_exception.gva = ld_st_v_i; + cva6_misaligned_exception.tval2 = '0; + cva6_misaligned_exception.tinst = lsu_ctrl.tinst; + cva6_misaligned_exception.gva = ld_st_v_i; end end STORE: begin - misaligned_exception.cause = riscv::STORE_PAGE_FAULT; - misaligned_exception.valid = 1'b1; + cva6_misaligned_exception.cause = riscv::STORE_PAGE_FAULT; + cva6_misaligned_exception.valid = 1'b1; if (CVA6Cfg.TvalEn) - misaligned_exception.tval = {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{1'b0}}, lsu_ctrl.vaddr}; + cva6_misaligned_exception.tval = {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{1'b0}}, lsu_ctrl.vaddr}; if (CVA6Cfg.RVH) begin - misaligned_exception.tval2 = '0; - misaligned_exception.tinst = lsu_ctrl.tinst; - misaligned_exception.gva = ld_st_v_i; + cva6_misaligned_exception.tval2 = '0; + cva6_misaligned_exception.tinst = lsu_ctrl.tinst; + cva6_misaligned_exception.gva = ld_st_v_i; end end default: ; @@ -699,25 +849,25 @@ module load_store_unit case (lsu_ctrl.fu) LOAD: begin - misaligned_exception.cause = riscv::LOAD_GUEST_PAGE_FAULT; - misaligned_exception.valid = 1'b1; + cva6_misaligned_exception.cause = riscv::LOAD_GUEST_PAGE_FAULT; + cva6_misaligned_exception.valid = 1'b1; if (CVA6Cfg.TvalEn) - misaligned_exception.tval = {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{1'b0}}, lsu_ctrl.vaddr}; + cva6_misaligned_exception.tval = {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{1'b0}}, lsu_ctrl.vaddr}; if (CVA6Cfg.RVH) begin - misaligned_exception.tval2 = '0; - misaligned_exception.tinst = lsu_ctrl.tinst; - misaligned_exception.gva = ld_st_v_i; + cva6_misaligned_exception.tval2 = '0; + cva6_misaligned_exception.tinst = lsu_ctrl.tinst; + cva6_misaligned_exception.gva = ld_st_v_i; end end STORE: begin - misaligned_exception.cause = riscv::STORE_GUEST_PAGE_FAULT; - misaligned_exception.valid = 1'b1; + cva6_misaligned_exception.cause = riscv::STORE_GUEST_PAGE_FAULT; + cva6_misaligned_exception.valid = 1'b1; if (CVA6Cfg.TvalEn) - misaligned_exception.tval = {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{1'b0}}, lsu_ctrl.vaddr}; + cva6_misaligned_exception.tval = {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{1'b0}}, lsu_ctrl.vaddr}; if (CVA6Cfg.RVH) begin - misaligned_exception.tval2 = '0; - misaligned_exception.tinst = lsu_ctrl.tinst; - misaligned_exception.gva = ld_st_v_i; + cva6_misaligned_exception.tval2 = '0; + cva6_misaligned_exception.tinst = lsu_ctrl.tinst; + cva6_misaligned_exception.gva = ld_st_v_i; end end default: ; @@ -744,12 +894,15 @@ module load_store_unit be_i, fu_data_i.fu, fu_data_i.operation, - fu_data_i.trans_id + fu_data_i.trans_id, + speculative_load_i, + 1'b0 }; lsu_bypass #( .CVA6Cfg(CVA6Cfg), - .lsu_ctrl_t(lsu_ctrl_t) + .lsu_ctrl_t(lsu_ctrl_t), + .bp_resolve_t(bp_resolve_t) ) lsu_bypass_i ( .clk_i, .rst_ni, @@ -758,13 +911,12 @@ module load_store_unit .lsu_req_valid_i(lsu_valid_i), .pop_ld_i (pop_ld), .pop_st_i (pop_st), + .resolved_branch_i, - .lsu_ctrl_o(lsu_ctrl), + .lsu_ctrl_o(lsu_ctrl_byp), .ready_o (lsu_ready_o) ); assign rvfi_lsu_ctrl_o = lsu_ctrl; endmodule - - diff --git a/core/load_unit.sv b/core/load_unit.sv index 0a66c51062e..f0c5cd3bf07 100644 --- a/core/load_unit.sv +++ b/core/load_unit.sv @@ -47,6 +47,8 @@ module load_unit output logic [CVA6Cfg.XLEN-1:0] result_o, // Load exception - ISSUE_STAGE output exception_t ex_o, + // Data Endian mode - CSR_REGFILE + input logic mbe_i, // Request address translation - MMU output logic translation_req_o, // Virtual address - MMU @@ -78,7 +80,12 @@ module load_unit // Data cache request in - CACHES output dcache_req_i_t req_port_o, // Presence of non-idempotent operations in the D$ write buffer - CACHES - input logic dcache_wbuffer_not_ni_i + input logic dcache_wbuffer_not_ni_i, + + //Trigger module + input logic sdtrig_load_stall_i, + input logic sdtrig_load_cancel_i, + input logic [CVA6Cfg.XLEN-1:0] sdtrig_load_action_i ); enum logic [3:0] { IDLE, @@ -89,16 +96,17 @@ module load_unit ABORT_TRANSACTION_NI, WAIT_TRANSLATION, WAIT_FLUSH, - WAIT_WB_EMPTY + WAIT_WB_EMPTY, + WAIT_SPEC_LOAD } state_d, state_q; // in order to decouple the response interface from the request interface, // we need a a buffer which can hold all inflight memory load requests typedef struct packed { - logic [CVA6Cfg.TRANS_ID_BITS-1:0] trans_id; // scoreboard identifier - logic [CVA6Cfg.XLEN_ALIGN_BYTES-1:0] address_offset; // least significant bits of the address - fu_op operation; // type of load + logic [CVA6Cfg.TRANS_ID_BITS-1:0] trans_id; // scoreboard identifier + logic [CVA6Cfg.VLEN-1:0] vaddr; // virtual address + fu_op operation; // type of load } ldbuf_t; @@ -153,10 +161,6 @@ module load_unit ldbuf_flushed_d = ldbuf_flushed_q; ldbuf_valid_d = ldbuf_valid_q; - // In case of flush, raise the flushed flag in all slots. - if (flush_i) begin - ldbuf_flushed_d = '1; - end // Free read entry (in the case of fall-through mode, free the entry // only if there is no pending load) if (ldbuf_r && (!LDBUF_FALLTHROUGH || !ldbuf_w)) begin @@ -167,6 +171,15 @@ module load_unit ldbuf_flushed_d[ldbuf_windex] = 1'b0; ldbuf_valid_d[ldbuf_windex] = 1'b1; end + // In case of flush, raise the flushed flag in all slots, including any + // slot just allocated by ldbuf_w in the same cycle. This branch must + // appear after ldbuf_w so that flush_i wins the lexical priority contest + // for the newly written slot; if it appeared before, a simultaneous + // data_gnt would clear flushed_d[windex] back to 0 and the slot would + // survive the flush, later producing a phantom valid_o writeback. + if (flush_i) begin + ldbuf_flushed_d = '1; + end end always_ff @(posedge clk_i or negedge rst_ni) begin : ldbuf_ff @@ -196,10 +209,9 @@ module load_unit // this is a read-only interface so set the write enable to 0 assign req_port_o.data_we = 1'b0; assign req_port_o.data_wdata = '0; + assign req_port_o.cbo_op = ariane_pkg::CBO_NONE; // compose the load buffer write data, control is handled in the FSM - assign ldbuf_wdata = { - lsu_ctrl_i.trans_id, lsu_ctrl_i.vaddr[CVA6Cfg.XLEN_ALIGN_BYTES-1:0], lsu_ctrl_i.operation - }; + assign ldbuf_wdata = {lsu_ctrl_i.trans_id, lsu_ctrl_i.vaddr, lsu_ctrl_i.operation}; // output address // we can now output the lower 12 bit as the index to the cache assign req_port_o.address_index = lsu_ctrl_i.vaddr[CVA6Cfg.DCACHE_INDEX_WIDTH-1:0]; @@ -209,12 +221,8 @@ module load_unit CVA6Cfg.DCACHE_INDEX_WIDTH]; // request id = index of the load buffer's entry assign req_port_o.data_id = ldbuf_windex; - // directly forward exception fields (valid bit is set below) - assign ex_o.cause = ex_i.cause; - assign ex_o.tval = ex_i.tval; - assign ex_o.tval2 = CVA6Cfg.RVH ? ex_i.tval2 : '0; - assign ex_o.tinst = CVA6Cfg.RVH ? ex_i.tinst : '0; - assign ex_o.gva = CVA6Cfg.RVH ? ex_i.gva : 1'b0; + // user field not used + assign req_port_o.data_wuser = '0; // Check that NI operations follow the necessary conditions logic paddr_ni; @@ -226,7 +234,7 @@ module load_unit ); assign not_commit_time = commit_tran_id_i != lsu_ctrl_i.trans_id; assign inflight_stores = (!dcache_wbuffer_not_ni_i || !store_buffer_empty_i); - assign stall_ni = (inflight_stores || not_commit_time) && (paddr_ni && CVA6Cfg.NonIdemPotenceEn); + assign stall_ni = (inflight_stores || not_commit_time) && (paddr_ni && CVA6Cfg.NonIdemPotenceEn) || sdtrig_load_stall_i; // --------------- // Load Control @@ -249,166 +257,210 @@ module load_unit // when the load buffer is not full or if there is a response and the // load buffer is in fall-through mode accept_req = (valid_i && (!ldbuf_full || (LDBUF_FALLTHROUGH && ldbuf_r))); + if (sdtrig_load_cancel_i) begin + //cancel any possible memory access + req_port_o.data_req = 1'b0; + req_port_o.tag_valid = 1'b0; + req_port_o.kill_req = 1'b1; + translation_req_o = 1'b0; + pop_ld_o = 1'b0; + //stall load unit + state_d = IDLE; + end else begin - case (state_q) - IDLE: begin - if (accept_req) begin - // start the translation process even though we do not know if the addresses match - // this should ease timing - translation_req_o = 1'b1; - // check if the page offset matches with a store, if it does then stall and wait - if (!page_offset_matches_i) begin - // make a load request to memory - req_port_o.data_req = 1'b1; - // we got no data grant so wait for the grant before sending the tag - if (!req_port_i.data_gnt) begin - state_d = WAIT_GNT; + case (state_q) + IDLE: begin + if (accept_req) begin + if (sdtrig_load_stall_i) begin + //Stalls the load unit + req_port_o.data_req = 1'b0; + pop_ld_o = 1'b0; + state_d = IDLE; end else begin - if (CVA6Cfg.MmuPresent && !dtlb_hit_i) begin - state_d = ABORT_TRANSACTION; - end else begin - if (!stall_ni) begin - // we got a grant and a hit on the DTLB so we can send the tag in the next cycle - state_d = SEND_TAG; - pop_ld_o = 1'b1; - // translation valid but this is to NC and the WB is not yet empty. - end else if (CVA6Cfg.NonIdemPotenceEn) begin - state_d = ABORT_TRANSACTION_NI; + // start the translation process even though we do not know if the addresses match this should ease timing + // don't start the translation for speculative loads that miss on tlb + translation_req_o = (!CVA6Cfg.SpeculativeSb || dtlb_hit_i || !lsu_ctrl_i.is_speculative_load); + // check if load is speculative and non idempotent, if it is then stall and wait for branch result + if (!CVA6Cfg.SpeculativeSb || !lsu_ctrl_i.is_speculative_load || (dtlb_hit_i && !paddr_ni)) begin + // check if the page offset matches with a store, if it does then stall and wait + if (!page_offset_matches_i) begin + // make a load request to memory + req_port_o.data_req = 1'b1; + // we got no data grant so wait for the grant before sending the tag + if (!req_port_i.data_gnt) begin + state_d = WAIT_GNT; + end else begin + if (CVA6Cfg.MmuPresent && !dtlb_hit_i) begin + state_d = ABORT_TRANSACTION; + end else begin + if (!stall_ni) begin + // we got a grant and a hit on the DTLB so we can send the tag in the next cycle + state_d = SEND_TAG; + pop_ld_o = 1'b1; + // translation valid but this is to NC and the WB is not yet empty. + end else if (CVA6Cfg.NonIdemPotenceEn) begin + state_d = ABORT_TRANSACTION_NI; + end + end + end + end else begin + // wait for the store buffer to train and the page offset to not match anymore + state_d = WAIT_PAGE_OFFSET; end + end else begin + // check branch result on the next cycle + state_d = WAIT_SPEC_LOAD; end end - end else begin - // wait for the store buffer to train and the page offset to not match anymore - state_d = WAIT_PAGE_OFFSET; end end - end - // wait here for the page offset to not match anymore - WAIT_PAGE_OFFSET: begin - // we make a new request as soon as the page offset does not match anymore - if (!page_offset_matches_i) begin - state_d = WAIT_GNT; + // wait here for the page offset to not match anymore + WAIT_PAGE_OFFSET: begin + // we make a new request as soon as the page offset does not match anymore + if (!page_offset_matches_i) begin + state_d = WAIT_GNT; + end end - end - WAIT_GNT: begin - // keep the translation request up - translation_req_o = 1'b1; - // keep the request up - req_port_o.data_req = 1'b1; - // we finally got a data grant - if (req_port_i.data_gnt) begin - // so we send the tag in the next cycle - if (CVA6Cfg.MmuPresent && !dtlb_hit_i) begin - state_d = ABORT_TRANSACTION; - end else begin - if (!stall_ni) begin - // we got a grant and a hit on the DTLB so we can send the tag in the next cycle - state_d = SEND_TAG; + WAIT_SPEC_LOAD: begin + // if we have a misspredicted speculative load + if (CVA6Cfg.SpeculativeSb && lsu_ctrl_i.is_speculative_load_miss) begin + // pop load - but only if we are not getting an rvalid in here - otherwise we will over-write an incoming transaction + if (!req_port_i.data_rvalid) begin + state_d = IDLE; pop_ld_o = 1'b1; - // translation valid but this is to NC and the WB is not yet empty. - end else if (CVA6Cfg.NonIdemPotenceEn) begin - state_d = ABORT_TRANSACTION_NI; end + // if we have a correct prediction this is now a regular load + end else begin + state_d = IDLE; end - end - // otherwise we keep waiting on our grant - end - // we know for sure that the tag we want to send is valid - SEND_TAG: begin - req_port_o.tag_valid = 1'b1; - state_d = IDLE; - - if (accept_req) begin - // start the translation process even though we do not know if the addresses match - // this should ease timing - translation_req_o = 1'b1; - // check if the page offset matches with a store, if it does stall and wait - if (!page_offset_matches_i) begin - // make a load request to memory - req_port_o.data_req = 1'b1; - // we got no data grant so wait for the grant before sending the tag - if (!req_port_i.data_gnt) begin - state_d = WAIT_GNT; + + WAIT_GNT: begin + // keep the translation request up + translation_req_o = 1'b1; + // keep the request up + req_port_o.data_req = 1'b1; + // we finally got a data grant + if (req_port_i.data_gnt) begin + // so we send the tag in the next cycle + if (CVA6Cfg.MmuPresent && !dtlb_hit_i) begin + state_d = ABORT_TRANSACTION; end else begin - // we got a grant so we can send the tag in the next cycle - if (CVA6Cfg.MmuPresent && !dtlb_hit_i) begin - state_d = ABORT_TRANSACTION; - end else begin - if (!stall_ni) begin - // we got a grant and a hit on the DTLB so we can send the tag in the next cycle - state_d = SEND_TAG; - pop_ld_o = 1'b1; - // translation valid but this is to NC and the WB is not yet empty. - end else if (CVA6Cfg.NonIdemPotenceEn) begin - state_d = ABORT_TRANSACTION_NI; - end + if (!stall_ni) begin + // we got a grant and a hit on the DTLB so we can send the tag in the next cycle + state_d = SEND_TAG; + pop_ld_o = 1'b1; + // translation valid but this is to NC and the WB is not yet empty. + end else if (CVA6Cfg.NonIdemPotenceEn) begin + state_d = ABORT_TRANSACTION_NI; end end - end else begin - // wait for the store buffer to train and the page offset to not match anymore - state_d = WAIT_PAGE_OFFSET; + end + // otherwise we keep waiting on our grant end - // ---------- - // Exception - // ---------- - // if we got an exception we need to kill the request immediately - if (ex_i.valid) begin - req_port_o.kill_req = 1'b1; - end - end + // we know for sure that the tag we want to send is valid + SEND_TAG: begin + req_port_o.tag_valid = 1'b1; + state_d = IDLE; - WAIT_FLUSH: begin - // the D$ arbiter will take care of presenting this to the memory only in case we - // have an outstanding request - req_port_o.kill_req = 1'b1; - req_port_o.tag_valid = 1'b1; - // we've killed the current request so we can go back to idle - state_d = IDLE; - end + if (accept_req) begin + // start the translation process even though we do not know if the addresses match this should ease timing + // don't start the translation for speculative loads that miss on tlb + translation_req_o = (!CVA6Cfg.SpeculativeSb || dtlb_hit_i || !lsu_ctrl_i.is_speculative_load); + // check if load is speculative and non idempotent, if it is then stall and wait for branch result + if (!CVA6Cfg.SpeculativeSb || !lsu_ctrl_i.is_speculative_load || (dtlb_hit_i && !paddr_ni)) begin + // check if the page offset matches with a store, if it does stall and wait + if (!page_offset_matches_i) begin + // make a load request to memory + req_port_o.data_req = 1'b1; + // we got no data grant so wait for the grant before sending the tag + if (!req_port_i.data_gnt) begin + state_d = WAIT_GNT; + end else begin + // we got a grant so we can send the tag in the next cycle + if (CVA6Cfg.MmuPresent && !dtlb_hit_i) begin + state_d = ABORT_TRANSACTION; + end else begin + if (!stall_ni) begin + // we got a grant and a hit on the DTLB so we can send the tag in the next cycle + state_d = SEND_TAG; + pop_ld_o = 1'b1; + // translation valid but this is to NC and the WB is not yet empty. + end else if (CVA6Cfg.NonIdemPotenceEn) begin + state_d = ABORT_TRANSACTION_NI; + end + end + end + end else begin + // wait for the store buffer to train and the page offset to not match anymore + state_d = WAIT_PAGE_OFFSET; + end + end else begin + // check branch result on the next cycle + state_d = WAIT_SPEC_LOAD; + end + end + // ---------- + // Exception + // ---------- + // if we got an exception we need to kill the request immediately + if (ex_i.valid) begin + req_port_o.kill_req = 1'b1; + end + end - default: begin - // abort the previous request - free the D$ arbiter - // we are here because of a TLB miss, we need to abort the current request and give way for the - // PTW walker to satisfy the TLB miss - if (state_q == ABORT_TRANSACTION && CVA6Cfg.MmuPresent) begin - req_port_o.kill_req = 1'b1; - req_port_o.tag_valid = 1'b1; - // wait until the WB is empty - state_d = WAIT_TRANSLATION; - end else if (state_q == ABORT_TRANSACTION_NI && CVA6Cfg.NonIdemPotenceEn) begin + WAIT_FLUSH: begin + // the D$ arbiter will take care of presenting this to the memory only in case we + // have an outstanding request req_port_o.kill_req = 1'b1; req_port_o.tag_valid = 1'b1; - // re-do the request - state_d = WAIT_WB_EMPTY; - end else if (state_q == WAIT_WB_EMPTY && CVA6Cfg.NonIdemPotenceEn && dcache_wbuffer_not_ni_i) begin - // Wait until the write-back buffer is empty in the data cache. - // the write buffer is empty, so lets go and re-do the translation. - state_d = WAIT_TRANSLATION; - end else if(state_q == WAIT_TRANSLATION && (CVA6Cfg.MmuPresent || CVA6Cfg.NonIdemPotenceEn)) begin - translation_req_o = 1'b1; - // we've got a hit and we can continue with the request process - if (dtlb_hit_i) state_d = WAIT_GNT; - - // we got an exception - if (ex_i.valid) begin - // the next state will be the idle state - state_d = IDLE; - // pop load - but only if we are not getting an rvalid in here - otherwise we will over-write an incoming transaction - pop_ld_o = ~req_port_i.data_rvalid; - end - end else begin + // we've killed the current request so we can go back to idle state_d = IDLE; end - end - endcase - // if we just flushed and the queue is not empty or we are getting an rvalid this cycle wait in a extra stage - if (flush_i) begin - state_d = WAIT_FLUSH; + default: begin + // abort the previous request - free the D$ arbiter + // we are here because of a TLB miss, we need to abort the current request and give way for the + // PTW walker to satisfy the TLB miss + if (state_q == ABORT_TRANSACTION && CVA6Cfg.MmuPresent) begin + req_port_o.kill_req = 1'b1; + req_port_o.tag_valid = 1'b1; + // wait until the WB is empty + state_d = WAIT_TRANSLATION; + end else if (state_q == ABORT_TRANSACTION_NI && CVA6Cfg.NonIdemPotenceEn) begin + req_port_o.kill_req = 1'b1; + req_port_o.tag_valid = 1'b1; + // re-do the request + state_d = WAIT_WB_EMPTY; + end else if (state_q == WAIT_WB_EMPTY && CVA6Cfg.NonIdemPotenceEn && dcache_wbuffer_not_ni_i) begin + // Wait until the write-back buffer is empty in the data cache. + // the write buffer is empty, so let's go and re-do the translation. + state_d = WAIT_TRANSLATION; + end else if(state_q == WAIT_TRANSLATION && (CVA6Cfg.MmuPresent || CVA6Cfg.NonIdemPotenceEn)) begin + translation_req_o = 1'b1; + // we've got a hit and we can continue with the request process + if (dtlb_hit_i) state_d = WAIT_GNT; + + // we got an exception + if (ex_i.valid) begin + // the next state will be the idle state + state_d = IDLE; + // pop load - but only if we are not getting an rvalid in here - otherwise we will over-write an incoming transaction + pop_ld_o = ~req_port_i.data_rvalid; + end + end else begin + state_d = IDLE; + end + end + endcase + + // if we just flushed and the queue is not empty or we are getting an rvalid this cycle wait in an extra stage + if (flush_i) begin + state_d = WAIT_FLUSH; + end end end @@ -418,27 +470,46 @@ module load_unit // --------------- // Retire Load // --------------- - assign ldbuf_rindex = (CVA6Cfg.NrLoadBufEntries > 1) ? ldbuf_id_t'(req_port_i.data_rid) : 1'b0, - ldbuf_rdata = ldbuf_q[ldbuf_rindex]; + assign ldbuf_rindex = (CVA6Cfg.NrLoadBufEntries > 1) ? ldbuf_id_t'(req_port_i.data_rid) : 1'b0; + assign ldbuf_rdata = ldbuf_q[ldbuf_rindex]; // decoupled rvalid process always_comb begin : rvalid_output // read the pending load buffer - ldbuf_r = req_port_i.data_rvalid; + ldbuf_r = req_port_i.data_rvalid; trans_id_o = ldbuf_q[ldbuf_rindex].trans_id; - valid_o = 1'b0; - ex_o.valid = 1'b0; + valid_o = 1'b0; - // we got an rvalid and it's corresponding request was not flushed + // directly forward exception fields (valid bit is set below) + ex_o.valid = 1'b0; + ex_o.cause = (sdtrig_load_action_i != '0) ? sdtrig_load_action_i : ex_i.cause; + ex_o.tval = (CVA6Cfg.TvalEn && (sdtrig_load_action_i != '0)) ? lsu_ctrl_i.vaddr : ex_i.tval; + ex_o.tval2 = CVA6Cfg.RVH ? ex_i.tval2 : '0; + ex_o.tinst = CVA6Cfg.RVH ? ex_i.tinst : '0; + ex_o.gva = CVA6Cfg.RVH ? ex_i.gva : 1'b0; + ex_o.timing = (sdtrig_load_stall_i && req_port_i.data_rvalid && sdtrig_load_action_i != '0) ? 1'b1 : 1'b0; + + // we got an rvalid and its corresponding request was not flushed if (req_port_i.data_rvalid && !ldbuf_flushed_q[ldbuf_rindex]) begin // if the response corresponds to the last request, check that we are not killing it - if ((ldbuf_last_id_q != ldbuf_rindex) || !req_port_o.kill_req) valid_o = 1'b1; + if ((ldbuf_last_id_q != ldbuf_rindex) || !req_port_o.kill_req) begin + valid_o = 1'b1; + ex_o.valid = req_port_i.data_error; + ex_o.cause = riscv::HARDWARE_ERROR; + if (CVA6Cfg.TvalEn) begin + ex_o.tval = ldbuf_rdata.vaddr; + end + end // the output is also valid if we got an exception. An exception arrives one cycle after // dtlb_hit_i is asserted, i.e. when we are in SEND_TAG. Otherwise, the exception // corresponds to the next request that is already being translated (see below). - if (ex_i.valid && (state_q == SEND_TAG)) begin + if ((state_q == SEND_TAG) && (ex_i.valid || req_port_i.data_error)) begin valid_o = 1'b1; ex_o.valid = 1'b1; + ex_o.cause = req_port_i.data_error ? riscv::HARDWARE_ERROR : ex_i.cause; + if (CVA6Cfg.TvalEn && req_port_i.data_error) begin + ex_o.tval = ldbuf_rdata.vaddr; + end end end @@ -446,11 +517,18 @@ module load_unit // exceptions can retire out-of-order -> but we need to give priority to non-excepting load and stores // so we simply check if we got an rvalid if so we prioritize it by not retiring the exception - we simply go for another // round in the load FSM - if ((CVA6Cfg.MmuPresent || CVA6Cfg.NonIdemPotenceEn) && (state_q == WAIT_TRANSLATION) && !req_port_i.data_rvalid && ex_i.valid && valid_i) begin + if (sdtrig_load_cancel_i || (CVA6Cfg.MmuPresent || CVA6Cfg.NonIdemPotenceEn) && (state_q == WAIT_TRANSLATION) && !req_port_i.data_rvalid && ex_i.valid && valid_i) begin trans_id_o = lsu_ctrl_i.trans_id; valid_o = 1'b1; ex_o.valid = 1'b1; end + + // raise valid when removing a misspredicted speculative load + if (CVA6Cfg.SpeculativeSb && (state_q == WAIT_SPEC_LOAD) && lsu_ctrl_i.is_speculative_load_miss && !req_port_i.data_rvalid && valid_i) begin + trans_id_o = lsu_ctrl_i.trans_id; + valid_o = 1'b1; + ex_o.valid = 1'b0; + end end @@ -467,11 +545,16 @@ module load_unit // Sign Extend // --------------- logic [CVA6Cfg.XLEN-1:0] shifted_data; + logic [CVA6Cfg.XLEN_ALIGN_BYTES-1:0] ldbuf_addroff; + + assign ldbuf_addroff = ldbuf_rdata.vaddr[CVA6Cfg.XLEN_ALIGN_BYTES-1:0]; // realign as needed - assign shifted_data = req_port_i.data_rdata >> {ldbuf_rdata.address_offset, 3'b000}; + // ldbuf_rdata.address_offset is just the last three bits of the load address which select the byte address within the word + assign shifted_data = req_port_i.data_rdata >> {ldbuf_addroff, 3'b000}; - /* // result mux (leaner code, but more logic stages. + // The code here is legacy - from the days before CVA6 was Big Endian Capable :) + /*// result mux (leaner code, but more logic stages. // can be used instead of the code below (in between //result mux fast) if timing is not so critical) always_comb begin unique case (ldbuf_rdata.operation) @@ -485,6 +568,50 @@ module load_unit endcase end */ + /* + // BIG ENDIAN CAPABLE result mux + // Can be used instead of the code below (in between "BIG ENDIAN CAPABLE result mux fast" and "end BIG ENDIAN CAPABLE result mux fast") if timing is not so critical. + // This code has been tested and is functionally identical to "BIG ENDIAN CAPABLE result mux fast", and while commented out it still aids in the readability of load_unit.sv. + always_comb begin + unique case (ldbuf_rdata.operation) + LWU: result_o = 64'(unsigned'(mbe_i ? {<<8{shifted_data[31:0]}} : shifted_data[31:0])); + LHU: result_o = 64'(unsigned'(mbe_i ? {<<8{shifted_data[15:0]}} : shifted_data[15:0])); + LBU: result_o = 64'(unsigned'(shifted_data[7:0])); + LW: result_o = 64'(signed'(mbe_i ? {<<8{shifted_data[31:0]}} : shifted_data[31:0])); + LH: result_o = 64'(signed'(mbe_i ? {<<8{shifted_data[15:0]}} : shifted_data[15:0])); + LB: result_o = 64'(signed'(shifted_data[ 7:0])); + default: result_o = mbe_i ? {<<8{shifted_data}} : shifted_data; + endcase + end + */ + + // BIG ENDIAN CAPABLE result mux fast + logic [CVA6Cfg.XLEN-1:0] endian_data; + + // Reversing the order of the Bytes in the data loaded from memory if mbe=1 -> which comes from the CSRregfile meaning the processor is in Big Endian Mode. + // If mbe=1 then the processor should treat Data memory as Big Endian. The internals of CVA6 are Little endian, so we achieve this by Reversing the Byte Order to Little Endian when it enters the processor through a Load. + always_comb begin + endian_data = shifted_data; + if (mbe_i) begin + case (ldbuf_rdata.operation) + LB, LBU, HLV_B, HLV_BU, FLB: begin + // If we are just loading a byte, then this needs not be touched + endian_data[7:0] = {shifted_data[7:0]}; + end + LH, LHU, HLV_H, HLV_HU, HLVX_HU, FLH: begin + endian_data[15:0] = {<<8{shifted_data[15:0]}}; + end + LW, LWU, HLV_W, HLV_WU, HLVX_WU, FLW, AMO_LRW, AMO_SCW, AMO_SWAPW, AMO_ADDW, + AMO_ANDW, AMO_ORW, AMO_XORW, AMO_MAXW, AMO_MAXWU, AMO_MINW, AMO_MINWU: begin + endian_data[31:0] = {<<8{shifted_data[31:0]}}; + end + default: begin + endian_data[CVA6Cfg.XLEN-1:0] = {<<8{shifted_data[CVA6Cfg.XLEN-1:0]}}; + end + endcase + end + end + // result mux fast logic [ (CVA6Cfg.XLEN/8)-1:0] rdata_sign_bits; logic [CVA6Cfg.XLEN_ALIGN_BYTES-1:0] rdata_offset; @@ -494,9 +621,10 @@ module load_unit // prepare these signals for faster selection in the next cycle assign rdata_is_signed = ldbuf_rdata.operation inside {ariane_pkg::LW, ariane_pkg::LH, ariane_pkg::LB, ariane_pkg::HLV_W, ariane_pkg::HLV_H, ariane_pkg::HLV_B}; assign rdata_is_fp_signed = ldbuf_rdata.operation inside {ariane_pkg::FLW, ariane_pkg::FLH, ariane_pkg::FLB}; - assign rdata_offset = ((ldbuf_rdata.operation inside {ariane_pkg::LW, ariane_pkg::FLW, ariane_pkg::HLV_W}) & CVA6Cfg.IS_XLEN64) ? ldbuf_rdata.address_offset + 3 : - ( ldbuf_rdata.operation inside {ariane_pkg::LH, ariane_pkg::FLH, ariane_pkg::HLV_H}) ? ldbuf_rdata.address_offset + 1 : - ldbuf_rdata.address_offset; + // If we are in Big Endian Mode, we don't need to add anything to the address offset to find the byte that contains the sign bit, as it is always the lowest addressed byte that has the sign bit. + assign rdata_offset = ((ldbuf_rdata.operation inside {ariane_pkg::LW, ariane_pkg::FLW, ariane_pkg::HLV_W}) && CVA6Cfg.IS_XLEN64 && (~mbe_i)) ? ldbuf_addroff + 3 : + ( ldbuf_rdata.operation inside {ariane_pkg::LH, ariane_pkg::FLH, ariane_pkg::HLV_H} && (~mbe_i)) ? ldbuf_addroff + 1 : + ldbuf_addroff; for (genvar i = 0; i < (CVA6Cfg.XLEN / 8); i++) begin : gen_sign_bits assign rdata_sign_bits[i] = req_port_i.data_rdata[(i+1)*8-1]; @@ -505,41 +633,41 @@ module load_unit // select correct sign bit in parallel to result shifter above // pull to 0 if unsigned - assign rdata_sign_bit = rdata_is_signed & rdata_sign_bits[rdata_offset] | (CVA6Cfg.FpPresent && rdata_is_fp_signed); + assign rdata_sign_bit = (rdata_is_signed && rdata_sign_bits[rdata_offset]) || (CVA6Cfg.FpPresent && rdata_is_fp_signed); // result mux always_comb begin unique case (ldbuf_rdata.operation) ariane_pkg::LW, ariane_pkg::LWU, ariane_pkg::HLV_W, ariane_pkg::HLV_WU, ariane_pkg::HLVX_WU: - result_o = {{CVA6Cfg.XLEN - 32{rdata_sign_bit}}, shifted_data[31:0]}; + result_o = {{CVA6Cfg.XLEN - 32{rdata_sign_bit}}, endian_data[31:0]}; ariane_pkg::LH, ariane_pkg::LHU, ariane_pkg::HLV_H, ariane_pkg::HLV_HU, ariane_pkg::HLVX_HU: - result_o = {{CVA6Cfg.XLEN - 32 + 16{rdata_sign_bit}}, shifted_data[15:0]}; + result_o = {{CVA6Cfg.XLEN - 32 + 16{rdata_sign_bit}}, endian_data[15:0]}; ariane_pkg::LB, ariane_pkg::LBU, ariane_pkg::HLV_B, ariane_pkg::HLV_BU: - result_o = {{CVA6Cfg.XLEN - 32 + 24{rdata_sign_bit}}, shifted_data[7:0]}; + result_o = {{CVA6Cfg.XLEN - 32 + 24{rdata_sign_bit}}, endian_data[7:0]}; default: begin // FLW, FLH and FLB have been defined here in default case to improve Code Coverage if (CVA6Cfg.FpPresent) begin unique case (ldbuf_rdata.operation) ariane_pkg::FLW: begin - result_o = {{CVA6Cfg.XLEN - 32{rdata_sign_bit}}, shifted_data[31:0]}; + result_o = {{CVA6Cfg.XLEN - 32{rdata_sign_bit}}, endian_data[31:0]}; end ariane_pkg::FLH: begin - result_o = {{CVA6Cfg.XLEN - 32 + 16{rdata_sign_bit}}, shifted_data[15:0]}; + result_o = {{CVA6Cfg.XLEN - 32 + 16{rdata_sign_bit}}, endian_data[15:0]}; end ariane_pkg::FLB: begin - result_o = {{CVA6Cfg.XLEN - 32 + 24{rdata_sign_bit}}, shifted_data[7:0]}; + result_o = {{CVA6Cfg.XLEN - 32 + 24{rdata_sign_bit}}, endian_data[7:0]}; end default: begin - result_o = shifted_data[CVA6Cfg.XLEN-1:0]; + result_o = endian_data[CVA6Cfg.XLEN-1:0]; end endcase end else begin - result_o = shifted_data[CVA6Cfg.XLEN-1:0]; + result_o = endian_data[CVA6Cfg.XLEN-1:0]; end end endcase end - // end result mux fast + // end BIG ENDIAN CAPABLE result mux fast /////////////////////////////////////////////////////// // assertions @@ -552,15 +680,18 @@ module load_unit // check invalid offsets, but only issue a warning as these conditions actually trigger a load address misaligned exception addr_offset0 : assert property (@(posedge clk_i) disable iff (~rst_ni) - ldbuf_w |-> (ldbuf_wdata.operation inside {ariane_pkg::LW, ariane_pkg::LWU}) |-> ldbuf_wdata.address_offset < 5) - else $fatal(1, "invalid address offset used with {LW, LWU}"); + ldbuf_w |-> (ldbuf_wdata.operation inside {ariane_pkg::LW, ariane_pkg::LWU}) + |-> ldbuf_wdata.vaddr[CVA6Cfg.XLEN_ALIGN_BYTES-1:0] < 5) + else $warning("invalid address offset used with {LW, LWU}"); addr_offset1 : assert property (@(posedge clk_i) disable iff (~rst_ni) - ldbuf_w |-> (ldbuf_wdata.operation inside {ariane_pkg::LH, ariane_pkg::LHU}) |-> ldbuf_wdata.address_offset < 7) - else $fatal(1, "invalid address offset used with {LH, LHU}"); + ldbuf_w |-> (ldbuf_wdata.operation inside {ariane_pkg::LH, ariane_pkg::LHU}) + |-> ldbuf_wdata.vaddr[CVA6Cfg.XLEN_ALIGN_BYTES-1:0] < 7) + else $warning("invalid address offset used with {LH, LHU}"); addr_offset2 : assert property (@(posedge clk_i) disable iff (~rst_ni) - ldbuf_w |-> (ldbuf_wdata.operation inside {ariane_pkg::LB, ariane_pkg::LBU}) |-> ldbuf_wdata.address_offset < 8) + ldbuf_w |-> (ldbuf_wdata.operation inside {ariane_pkg::LB, ariane_pkg::LBU}) + |-> ldbuf_wdata.vaddr[CVA6Cfg.XLEN_ALIGN_BYTES-1:0] < 8) else $fatal(1, "invalid address offset used with {LB, LBU}"); //pragma translate_on diff --git a/core/lsu_bypass.sv b/core/lsu_bypass.sv index 2b9f2aaa6fa..f184a4d26a8 100644 --- a/core/lsu_bypass.sv +++ b/core/lsu_bypass.sv @@ -16,8 +16,8 @@ // ------------------ // LSU Control // ------------------ -// The LSU consists of two independent block which share a common address translation block. -// The one block is the load unit, the other one is the store unit. They will signal their readiness +// The LSU consists of two independent blocks which share a common address translation block. +// One block is the load unit, the other one is the store unit. They will signal their readiness // with separate signals. If they are not ready the LSU control should keep the last applied signals stable. // Furthermore it can be the case that another request for one of the two store units arrives in which case // the LSU control should sample it and store it for later application to the units. It does so, by storing it in a @@ -27,7 +27,8 @@ module lsu_bypass import ariane_pkg::*; #( parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty, - parameter type lsu_ctrl_t = logic + parameter type lsu_ctrl_t = logic, + parameter type bp_resolve_t = logic ) ( // Subsystem Clock - SUBSYSTEM input logic clk_i, @@ -45,6 +46,9 @@ module lsu_bypass // TO_BE_COMPLETED - TO_BE_COMPLETED input logic pop_st_i, + // Result from branch unit - EX_STAGE + input bp_resolve_t resolved_branch_i, + // TO_BE_COMPLETED - TO_BE_COMPLETED output lsu_ctrl_t lsu_ctrl_o, // TO_BE_COMPLETED - TO_BE_COMPLETED @@ -73,6 +77,15 @@ module lsu_bypass // we've got a valid LSU request if (lsu_req_valid_i) begin mem_n[write_pointer_q] = lsu_req_i; + if (lsu_req_i.is_speculative_load && resolved_branch_i.valid) begin + if (resolved_branch_i.is_mispredict) begin + // missprediction: mark speculative loads as misspredicted + mem_n[write_pointer_q].is_speculative_load_miss = 1'b1; + end else begin + // correct prediction: the load is no longer speculative + mem_n[write_pointer_q].is_speculative_load = 1'b0; + end + end write_pointer++; status_cnt++; end diff --git a/core/macro_decoder.sv b/core/macro_decoder.sv index 0d695a3372b..a182cf56e48 100644 --- a/core/macro_decoder.sv +++ b/core/macro_decoder.sv @@ -20,14 +20,14 @@ module macro_decoder #( input logic [31:0] instr_i, input logic clk_i, // Clock input logic rst_ni, // Synchronous reset - input logic is_macro_instr_i, // Intruction is of macro extension + input logic is_macro_instr_i, // Instruction is of macro extension input logic illegal_instr_i, // From compressed decoder input logic is_compressed_i, - input logic issue_ack_i, // Check if the intruction is acknowledged + input logic issue_ack_i, // Check if the instruction is acknowledged output logic [31:0] instr_o, output logic illegal_instr_o, output logic is_compressed_o, - output logic fetch_stall_o, //Wait while push/pop/move instructions expand + output logic fetch_stall_o, // Wait while push/pop/move instructions expand output logic is_last_macro_instr_o, output logic is_double_rd_macro_instr_o ); @@ -82,6 +82,11 @@ module macro_decoder #( unique case (instr_i[12:10]) // push or pop 3'b110: begin + if (instr_i[7:4] < 4'b0100) begin + illegal_instr_o = 1'b1; + instr_o_reg = instr_i; + end + unique case (instr_i[9:8]) 2'b00: begin macro_instr_type = PUSH; @@ -97,6 +102,11 @@ module macro_decoder #( end // popret or popretz 3'b111: begin + if (instr_i[7:4] < 4'b0100) begin + illegal_instr_o = 1'b1; + instr_o_reg = instr_i; + end + unique case (instr_i[9:8]) 2'b00: begin macro_instr_type = POPRETZ; @@ -133,7 +143,7 @@ module macro_decoder #( // Calculate xreg1 & xreg2 for move instructions if (macro_instr_type == MVSA01 || macro_instr_type == MVA01S) begin - if (instr_i[9:7] != instr_i[4:2]) begin + if (macro_instr_type == MVA01S || instr_i[9:7] != instr_i[4:2]) begin xreg1 = {instr_i[9:8] > 0, instr_i[9:8] == 0, instr_i[9:7]}; xreg2 = {instr_i[4:3] > 0, instr_i[4:3] == 0, instr_i[4:2]}; end else begin @@ -162,7 +172,7 @@ module macro_decoder #( default: reg_numbers = '0; endcase - if (CVA6Cfg.XLEN == 32) begin + if (CVA6Cfg.IS_XLEN32) begin unique case (instr_i[7:4]) 4'b0100, 4'b0101, 4'b0110, 4'b0111: begin unique case (instr_i[3:2]) @@ -272,7 +282,7 @@ module macro_decoder #( unique case (state_q) IDLE: begin - if (is_macro_instr_i) begin + if (is_macro_instr_i && !illegal_instr_o) begin reg_numbers_d = reg_numbers - 1'b1; state_d = issue_ack_i ? INIT : IDLE; case (macro_instr_type) @@ -311,7 +321,9 @@ module macro_decoder #( is_double_rd_macro_instr_o = 1; // addi xreg1, a0, 0 instr_o_reg = {12'h0, 5'hA, 3'h0, xreg1, riscv::OpcodeOpImm}; - state_d = MOVE; + if (issue_ack_i) begin + state_d = MOVE; + end end if (macro_instr_type == MVA01S) begin @@ -319,7 +331,9 @@ module macro_decoder #( is_double_rd_macro_instr_o = 1; // addi a0, xreg1, 0 instr_o_reg = {12'h0, xreg1, 3'h0, 5'hA, riscv::OpcodeOpImm}; - state_d = MOVE; + if (issue_ack_i) begin + state_d = MOVE; + end end if (macro_instr_type == PUSH) begin @@ -327,7 +341,7 @@ module macro_decoder #( fetch_stall_o = 1'b1; // stall inst fetch if (reg_numbers == 4'b0001) begin - if (CVA6Cfg.XLEN == 64) begin + if (CVA6Cfg.IS_XLEN64) begin instr_o_reg = { 7'b1111111, 5'h1, 5'h2, 3'h3, 5'b11000, riscv::OpcodeStore }; // sd store_reg, -4(sp) @@ -336,11 +350,13 @@ module macro_decoder #( 7'b1111111, 5'h1, 5'h2, 3'h2, 5'b11100, riscv::OpcodeStore }; // sw store_reg, -4(sp) end - state_d = PUSH_ADDI; + if (issue_ack_i) begin + state_d = PUSH_ADDI; + end end if (reg_numbers == 4'b0010) begin - if (CVA6Cfg.XLEN == 64) begin + if (CVA6Cfg.IS_XLEN64) begin instr_o_reg = {7'b1111111, 5'h8, 5'h2, 3'h3, 5'b11000, riscv::OpcodeStore}; end else begin instr_o_reg = {7'b1111111, 5'h8, 5'h2, 3'h2, 5'b11100, riscv::OpcodeStore}; @@ -348,7 +364,7 @@ module macro_decoder #( end if (reg_numbers == 4'b0011) begin - if (CVA6Cfg.XLEN == 64) begin + if (CVA6Cfg.IS_XLEN64) begin instr_o_reg = {7'b1111111, 5'h9, 5'h2, 3'h3, 5'b11000, riscv::OpcodeStore}; end else begin instr_o_reg = {7'b1111111, 5'h9, 5'h2, 3'h2, 5'b11100, riscv::OpcodeStore}; @@ -357,13 +373,13 @@ module macro_decoder #( end if (reg_numbers >= 4 && reg_numbers <= 12) begin - if (CVA6Cfg.XLEN == 64) begin + if (CVA6Cfg.IS_XLEN64) begin instr_o_reg = {7'b1111111, store_reg, 5'h2, 3'h3, 5'b11000, riscv::OpcodeStore}; end else begin instr_o_reg = {7'b1111111, store_reg, 5'h2, 3'h2, 5'b11100, riscv::OpcodeStore}; end - if (reg_numbers == 12) begin + if (reg_numbers == 12 && issue_ack_i) begin state_d = PUSH_POP_INSTR_2; end end @@ -372,7 +388,7 @@ module macro_decoder #( if ((macro_instr_type == POP || macro_instr_type == POPRETZ || macro_instr_type == POPRET)) begin fetch_stall_o = 1; // stall inst fetch if (reg_numbers == 1) begin - if (CVA6Cfg.XLEN == 64) begin + if (CVA6Cfg.IS_XLEN64) begin instr_o_reg = { offset_reg - 12'h4, 5'h2, 3'h3, 5'h1, riscv::OpcodeLoad }; // ld store_reg, Imm(sp) @@ -381,19 +397,21 @@ module macro_decoder #( offset_reg, 5'h2, 3'h2, 5'h1, riscv::OpcodeLoad }; // lw store_reg, Imm(sp) end - unique case (macro_instr_type) - PUSH, POP, POPRET: begin - state_d = PUSH_ADDI; - end - POPRETZ: begin - state_d = POPRETZ_1; - end - default: ; - endcase + if (issue_ack_i) begin + unique case (macro_instr_type) + PUSH, POP, POPRET: begin + state_d = PUSH_ADDI; + end + POPRETZ: begin + state_d = POPRETZ_1; + end + default: ; + endcase + end end if (reg_numbers == 2) begin - if (CVA6Cfg.XLEN == 64) begin + if (CVA6Cfg.IS_XLEN64) begin instr_o_reg = {offset_reg - 12'h4, 5'h2, 3'h3, 5'h8, riscv::OpcodeLoad}; end else begin instr_o_reg = {offset_reg, 5'h2, 3'h2, 5'h8, riscv::OpcodeLoad}; @@ -401,7 +419,7 @@ module macro_decoder #( end if (reg_numbers == 3) begin - if (CVA6Cfg.XLEN == 64) begin + if (CVA6Cfg.IS_XLEN64) begin instr_o_reg = {offset_reg - 12'h4, 5'h2, 3'h3, 5'h9, riscv::OpcodeLoad}; end else begin instr_o_reg = {offset_reg, 5'h2, 3'h2, 5'h9, riscv::OpcodeLoad}; @@ -409,13 +427,13 @@ module macro_decoder #( end if (reg_numbers >= 4 && reg_numbers <= 12) begin - if (CVA6Cfg.XLEN == 64) begin + if (CVA6Cfg.IS_XLEN64) begin instr_o_reg = {offset_reg - 12'h4, 5'h2, 3'h3, store_reg, riscv::OpcodeLoad}; end else begin instr_o_reg = {offset_reg, 5'h2, 3'h2, store_reg, riscv::OpcodeLoad}; end - if (reg_numbers == 12) begin + if (reg_numbers == 12 && issue_ack_i) begin state_d = PUSH_POP_INSTR_2; end end @@ -426,7 +444,7 @@ module macro_decoder #( fetch_stall_o = is_macro_instr_i; // stall inst fetch if (issue_ack_i && is_macro_instr_i && macro_instr_type == PUSH) begin if (reg_numbers_q == 4'b0001) begin - if (CVA6Cfg.XLEN == 64) begin + if (CVA6Cfg.IS_XLEN64) begin instr_o_reg = { offset_d[11:5], 5'h1, @@ -444,7 +462,7 @@ module macro_decoder #( end if (reg_numbers_q == 4'b0010) begin - if (CVA6Cfg.XLEN == 64) begin + if (CVA6Cfg.IS_XLEN64) begin instr_o_reg = { offset_d[11:5], 5'h8, @@ -459,11 +477,11 @@ module macro_decoder #( instr_o_reg = {offset_d[11:5], 5'h8, 5'h2, 3'h2, offset_d[4:0], riscv::OpcodeStore}; end reg_numbers_d = reg_numbers_q - 1; - offset_d = offset_q + 12'hFFC; // decrement offset by -4 i.e. add 2's compilment of 4 + offset_d = offset_q + 12'hFFC; // decrement offset by -4 i.e. add 2's complement of 4 end if (reg_numbers_q == 4'b0011) begin - if (CVA6Cfg.XLEN == 64) begin + if (CVA6Cfg.IS_XLEN64) begin instr_o_reg = { offset_d[11:5], 5'h9, @@ -482,7 +500,7 @@ module macro_decoder #( end if (reg_numbers_q >= 4 && reg_numbers_q <= 12) begin - if (CVA6Cfg.XLEN == 64) begin + if (CVA6Cfg.IS_XLEN64) begin instr_o_reg = { offset_d[11:5], store_reg_q, @@ -510,7 +528,7 @@ module macro_decoder #( if (issue_ack_i && is_macro_instr_i && (macro_instr_type == POP || macro_instr_type == POPRETZ || macro_instr_type == POPRET)) begin if (reg_numbers_q == 1) begin - if (CVA6Cfg.XLEN == 64) begin + if (CVA6Cfg.IS_XLEN64) begin instr_o_reg = { offset_d[11:3], 1'b0, offset_d[1:0], 5'h2, 3'h3, 5'h1, riscv::OpcodeLoad }; @@ -529,7 +547,7 @@ module macro_decoder #( end if (reg_numbers_q == 2) begin - if (CVA6Cfg.XLEN == 64) begin + if (CVA6Cfg.IS_XLEN64) begin instr_o_reg = { offset_d[11:3], 1'b0, offset_d[1:0], 5'h2, 3'h3, 5'h8, riscv::OpcodeLoad }; @@ -541,7 +559,7 @@ module macro_decoder #( end if (reg_numbers_q == 3) begin - if (CVA6Cfg.XLEN == 64) begin + if (CVA6Cfg.IS_XLEN64) begin instr_o_reg = { offset_d[11:3], 1'b0, offset_d[1:0], 5'h2, 3'h3, 5'h9, riscv::OpcodeLoad }; @@ -553,7 +571,7 @@ module macro_decoder #( end if (reg_numbers_q >= 4 && reg_numbers_q <= 12) begin - if (CVA6Cfg.XLEN == 64) begin + if (CVA6Cfg.IS_XLEN64) begin instr_o_reg = { offset_d[11:3], 1'b0, offset_d[1:0], 5'h2, 3'h3, store_reg_q, riscv::OpcodeLoad }; @@ -600,7 +618,7 @@ module macro_decoder #( end PUSH_ADDI: begin - if (CVA6Cfg.XLEN == 64) begin + if (CVA6Cfg.IS_XLEN64) begin if (issue_ack_i && is_macro_instr_i && macro_instr_type == PUSH) begin // addi sp, sp, stack_adj instr_o_reg = {itype_inst.imm - 12'h4, 5'h2, 3'h0, 5'h2, riscv::OpcodeOpImm}; @@ -646,7 +664,7 @@ module macro_decoder #( end PUSH_POP_INSTR_2: begin - if (CVA6Cfg.XLEN == 64) begin + if (CVA6Cfg.IS_XLEN64) begin case (macro_instr_type) PUSH: begin if (issue_ack_i) begin diff --git a/core/multiplier.sv b/core/multiplier.sv index b6c44f7f7b3..7ae4b50af65 100644 --- a/core/multiplier.sv +++ b/core/multiplier.sv @@ -144,6 +144,9 @@ module multiplier clmulr_q <= clmulr_d; end end + end else begin + assign clmul_q = '0; + assign clmulr_q = '0; end // ----------------------- // Output pipeline register diff --git a/core/pmp/README.md b/core/pmp/README.md index bd046dd5be2..0103035a7a9 100644 --- a/core/pmp/README.md +++ b/core/pmp/README.md @@ -1,5 +1,5 @@ # PMP -This repository houses a purely combinatorial and parametrizable physical memory protection (PMP) unit. +This repository houses a purely combinatorial and parameterizable physical memory protection (PMP) unit. __Warning__: The PMP unit does only check the exact byte that is addressed. If the processor wants to load a 8 byte value, then every single byte should get checked. Due to the default granularity of PMPs of 4 bytes, this only comes into play for 8byte RISC-V memory accesses. An easy fix is to increase the granularity to 8 bytes. You can do this by setting the lowest bit of conf_addr_i to 1 if the pmp is in NAPOT mode, or to 0 if the PMP is in TOR mode. \ No newline at end of file diff --git a/core/pmp/src/pmp.sv b/core/pmp/src/pmp.sv index f3498711edf..b6d0dbf2ec9 100644 --- a/core/pmp/src/pmp.sv +++ b/core/pmp/src/pmp.sv @@ -12,7 +12,9 @@ // Date: 2.10.2019 // Description: purely combinatorial PMP unit (with extraction for more complex configs such as NAPOT) -module pmp #( +module pmp + import ariane_pkg::*; +#( parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty ) ( // Input @@ -20,8 +22,8 @@ module pmp #( input riscv::pmp_access_t access_type_i, input riscv::priv_lvl_t priv_lvl_i, // Configuration - input logic [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0][CVA6Cfg.PLEN-3:0] conf_addr_i, - input riscv::pmpcfg_t [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0] conf_i, + input logic [avoid_neg(CVA6Cfg.NrPMPEntries-1):0][CVA6Cfg.PLEN-3:0] conf_addr_i, + input riscv::pmpcfg_t [avoid_neg(CVA6Cfg.NrPMPEntries-1):0] conf_i, // Output output logic allow_o ); diff --git a/core/pmp/src/pmp_data_if.sv b/core/pmp/src/pmp_data_if.sv index d18149fb29b..a944a2bed58 100644 --- a/core/pmp/src/pmp_data_if.sv +++ b/core/pmp/src/pmp_data_if.sv @@ -27,6 +27,7 @@ module pmp_data_if input logic [CVA6Cfg.VLEN-1:0] lsu_vaddr_i, // virtual address in, for tval only input exception_t lsu_exception_i, // lsu exception coming from MMU, or misaligned exception input logic lsu_is_store_i, // the translation is requested by a store + input logic lsu_hlvx_inst_i, output logic lsu_valid_o, // translation is valid output logic [CVA6Cfg.PLEN-1:0] lsu_paddr_o, // translated address output exception_t lsu_exception_o, // address translation threw an exception @@ -36,8 +37,8 @@ module pmp_data_if input riscv::priv_lvl_t ld_st_priv_lvl_i, input logic ld_st_v_i, // PMP - input riscv::pmpcfg_t [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0] pmpcfg_i, - input logic [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0][CVA6Cfg.PLEN-3:0] pmpaddr_i + input riscv::pmpcfg_t [avoid_neg(CVA6Cfg.NrPMPEntries-1):0] pmpcfg_i, + input logic [avoid_neg(CVA6Cfg.NrPMPEntries-1):0][CVA6Cfg.PLEN-3:0] pmpaddr_i ); // virtual address causing the exception logic [CVA6Cfg.XLEN-1:0] fetch_vaddr_xlen, lsu_vaddr_xlen; @@ -78,18 +79,25 @@ module pmp_data_if // if it didn't match any execute region throw an `Instruction Access Fault` (PMA) // or if PMP reject the access - if (!match_any_execute_region || !pmp_if_allow) begin - icache_areq_o.fetch_exception.cause = riscv::INSTR_ACCESS_FAULT; - icache_areq_o.fetch_exception.valid = 1'b1; - // For exception, the virtual address is required for tval, if no MMU is - // instantiated then it will be equal to physical address - if (CVA6Cfg.TvalEn) begin - icache_areq_o.fetch_exception.tval = fetch_vaddr_xlen; - end - if (CVA6Cfg.RVH) begin - icache_areq_o.fetch_exception.tval2 = '0; - icache_areq_o.fetch_exception.tinst = '0; - icache_areq_o.fetch_exception.gva = v_i; + // Per RISCV privilege spec, a page fault has higher priority than access + // fault, therefore do not change the exception type in case of double + // exception + if (icache_areq_i.fetch_valid) begin + if (icache_areq_o.fetch_exception.cause != riscv::INSTR_PAGE_FAULT) begin + if (!match_any_execute_region || !pmp_if_allow) begin + icache_areq_o.fetch_exception.cause = riscv::INSTR_ACCESS_FAULT; + icache_areq_o.fetch_exception.valid = 1'b1; + // For exception, the virtual address is required for tval, if no MMU is + // instantiated then it will be equal to physical address + if (CVA6Cfg.TvalEn) begin + icache_areq_o.fetch_exception.tval = fetch_vaddr_xlen; + end + if (CVA6Cfg.RVH) begin + icache_areq_o.fetch_exception.tval2 = '0; + icache_areq_o.fetch_exception.tinst = '0; + icache_areq_o.fetch_exception.gva = v_i; + end + end end end end @@ -116,10 +124,20 @@ module pmp_data_if lsu_valid_o = lsu_valid_i; lsu_paddr_o = lsu_paddr_i; lsu_exception_o = lsu_exception_i; - pmp_access_type = lsu_is_store_i ? riscv::ACCESS_WRITE : riscv::ACCESS_READ; + if (lsu_is_store_i) begin + pmp_access_type = riscv::ACCESS_WRITE; + end else if (lsu_hlvx_inst_i) begin + pmp_access_type = riscv::pmp_access_t'(riscv::ACCESS_READ | riscv::ACCESS_EXEC); + end else begin + pmp_access_type = riscv::ACCESS_READ; + end // If translation is not enabled, check the paddr immediately against PMPs - if (lsu_valid_i && !data_allow_o) begin + // A misaligned exception has higher priority than an access fault, so don't + // overwrite it (RISC-V privilege spec, simultaneous trap cause priority). + if (lsu_valid_i && !data_allow_o && + !(lsu_exception_i.valid && + (lsu_exception_i.cause inside {riscv::LD_ADDR_MISALIGNED, riscv::ST_ADDR_MISALIGNED}))) begin lsu_exception_o.valid = 1'b1; if (CVA6Cfg.TvalEn) begin diff --git a/core/pmp/src/pmp_entry.sv b/core/pmp/src/pmp_entry.sv index d024a9a09f3..6101e761f2a 100644 --- a/core/pmp/src/pmp_entry.sv +++ b/core/pmp/src/pmp_entry.sv @@ -29,11 +29,16 @@ module pmp_entry #( output logic match_o ); logic [CVA6Cfg.PLEN-1:0] conf_addr_n; + logic [CVA6Cfg.PLEN-3:0] tor_conf_addr; + logic [CVA6Cfg.PLEN-3:0] tor_conf_addr_prev; logic [$clog2(CVA6Cfg.PLEN)-1:0] trail_ones; logic [CVA6Cfg.PLEN-1:0] base; logic [CVA6Cfg.PLEN-1:0] mask; int unsigned size; assign conf_addr_n = {2'b11, ~conf_addr_i}; + // CVA6 implements G=1. Bit 0 does not participate in either TOR boundary. + assign tor_conf_addr = {conf_addr_i[CVA6Cfg.PLEN-3:1], 1'b0}; + assign tor_conf_addr_prev = {conf_addr_prev_i[CVA6Cfg.PLEN-3:1], 1'b0}; lzc #( .WIDTH(CVA6Cfg.PLEN), .MODE (1'b0) @@ -51,15 +56,15 @@ module pmp_entry #( size = '0; // check that the requested address is in between the two // configuration addresses - if (addr_i >= ({2'b0, conf_addr_prev_i} << 2) && addr_i < ({2'b0, conf_addr_i} << 2)) begin + if (addr_i >= ({2'b0, tor_conf_addr_prev} << 2) && addr_i < ({2'b0, tor_conf_addr} << 2)) begin match_o = 1'b1; end else match_o = 1'b0; // synthesis translate_off if (match_o == 0) begin - assert (addr_i >= ({2'b0, conf_addr_i} << 2) || addr_i < ({2'b0, conf_addr_prev_i} << 2)); + assert (addr_i >= ({2'b0, tor_conf_addr} << 2) || addr_i < ({2'b0, tor_conf_addr_prev} << 2)); end else begin - assert (addr_i < ({2'b0, conf_addr_i} << 2) && addr_i >= ({2'b0, conf_addr_prev_i} << 2)); + assert (addr_i < ({2'b0, tor_conf_addr} << 2) && addr_i >= ({2'b0, tor_conf_addr_prev} << 2)); end // synthesis translate_on diff --git a/core/raw_checker.sv b/core/raw_checker.sv new file mode 100644 index 00000000000..01337cad9e3 --- /dev/null +++ b/core/raw_checker.sv @@ -0,0 +1,73 @@ +// Copyright 2024 Thales DIS France SAS +// +// Licensed under the Solderpad Hardware Licence, Version 0.51 (the "License"); +// you may not use this file except in compliance with the License. +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +// You may obtain a copy of the License at https://solderpad.org/licenses/ +// +// Original Author: Junheng Zheng - Thales + +module raw_checker + import ariane_pkg::*; +#( + parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty +) ( + // Subsystem Clock - SUBSYSTEM + input logic clk_i, + // Asynchronous reset active low - SUBSYSTEM + input logic rst_ni, + // Register source of the instruction to check RAW dependencies - SCOREBOARD + input logic [REG_ADDR_SIZE-1:0] rs_i, + // Type of register source (FPR or GPR) - SCOREBOARD + input logic rs_fpr_i, + // Registers of destination of the instructions already issued in the scoreboard - SCOREBOARD + input logic [CVA6Cfg.NR_SB_ENTRIES-1:0][REG_ADDR_SIZE-1:0] rd_i, + // Type of registers of destination (FPR or GPR) - SCOREBOARD + input logic [CVA6Cfg.NR_SB_ENTRIES-1:0] rd_fpr_i, + // Instructions in the scoreboard are still issued - SCOREBOARD + input logic [CVA6Cfg.NR_SB_ENTRIES-1:0] still_issued_i, + // Issue pointer - SCOREBOARD + input logic [CVA6Cfg.TRANS_ID_BITS-1:0] issue_pointer_i, + + // Index in the scoreboard of the most recent RAW dependency - SCOREBOARD + output logic [CVA6Cfg.TRANS_ID_BITS-1:0] idx_o, + // Indicates if there is a RAW dependency - SCOREBOARD + output logic valid_o +); + + logic [CVA6Cfg.NR_SB_ENTRIES-1:0] same_rd_as_rs; + + logic [CVA6Cfg.NR_SB_ENTRIES-1:0] same_rd_as_rs_before; + logic [CVA6Cfg.TRANS_ID_BITS-1:0] last_before_idx; + + logic [CVA6Cfg.NR_SB_ENTRIES-1:0] same_rd_as_rs_after; + logic [CVA6Cfg.TRANS_ID_BITS-1:0] last_after_idx; + + logic rs_is_gpr0; + + for (genvar i = 0; i < CVA6Cfg.NR_SB_ENTRIES; i++) begin + assign same_rd_as_rs[i] = (rs_fpr_i == rd_fpr_i[i]) && (rs_i == rd_i[i]) && still_issued_i[i]; + assign same_rd_as_rs_before[i] = (i < issue_pointer_i) && same_rd_as_rs[i]; + assign same_rd_as_rs_after[i] = (i >= issue_pointer_i) && same_rd_as_rs[i]; + end + + always_comb begin + last_before_idx = '0; + last_after_idx = '0; + + for (int unsigned i = 0; i < CVA6Cfg.NR_SB_ENTRIES; i++) begin + if (same_rd_as_rs_before[i]) begin + last_before_idx = i; + end + if (same_rd_as_rs_after[i]) begin + last_after_idx = i; + end + end + end + + assign idx_o = |same_rd_as_rs_before ? last_before_idx : last_after_idx; + + assign rs_is_gpr0 = (rs_i == '0) && !rs_fpr_i; + assign valid_o = |same_rd_as_rs && !rs_is_gpr0; + +endmodule diff --git a/core/scoreboard.sv b/core/scoreboard.sv index 6a1b3d094f2..2768d8e3ad3 100644 --- a/core/scoreboard.sv +++ b/core/scoreboard.sv @@ -54,7 +54,7 @@ module scoreboard #( input logic [CVA6Cfg.NrIssuePorts-1:0][31:0] orig_instr_i, // Handshake's valid with decode stage - ID_STAGE input logic [CVA6Cfg.NrIssuePorts-1:0] decoded_instr_valid_i, - // Handshake's acknowlege with decode stage - ID_STAGE + // Handshake's acknowledge with decode stage - ID_STAGE output logic [CVA6Cfg.NrIssuePorts-1:0] decoded_instr_ack_o, // instruction to issue logic, if issue_instr_valid and issue_ready is asserted, advance the issue pointer @@ -146,7 +146,7 @@ module scoreboard #( assign issue_pointer[i+1] = issue_pointer[i] + 'd1; end - // an instruction is ready for issue if we have place in the issue FIFO and it the decoder says it is valid + // an instruction is ready for issue if we have place in the issue FIFO and the decoder says it is valid always_comb begin issue_instr_o = decoded_instr_i; orig_instr_o = orig_instr_i; @@ -166,7 +166,7 @@ module scoreboard #( mem_n = mem_q; num_issue = '0; - // if we got a acknowledge from the issue stage, put this scoreboard entry in the queue + // if we got an acknowledge from the issue stage, put this scoreboard entry in the queue for (int unsigned i = 0; i < CVA6Cfg.NrIssuePorts; i++) begin if (decoded_instr_valid_i[i] && decoded_instr_ack_o[i] && !flush_unissued_instr_i) begin // the decoded instruction we put in there is valid (1st bit) @@ -216,7 +216,7 @@ module scoreboard #( else mem_n[trans_id_i[i]].sbe.rd = 5'b0; end // write the exception back if it is valid - if (ex_i[i].valid) mem_n[trans_id_i[i]].sbe.ex = ex_i[i]; + if (ex_i[i].valid || ex_i[i].timing) mem_n[trans_id_i[i]].sbe.ex = ex_i[i]; // write the fflags back from the FPU (exception valid is never set), leave tval intact else if(CVA6Cfg.FpPresent && (mem_q[trans_id_i[i]].sbe.fu == ariane_pkg::FPU || mem_q[trans_id_i[i]].sbe.fu == ariane_pkg::FPU_VEC)) begin mem_n[trans_id_i[i]].sbe.ex.cause = ex_i[i].cause; @@ -294,7 +294,7 @@ module scoreboard #( end assign fwd_o.still_issued = still_issued; - assign fwd_o.issue_pointer = issue_pointer; + assign fwd_o.issue_pointer = issue_pointer[0]; assign fwd_o.wb = wb; for (genvar i = 0; i < CVA6Cfg.NR_SB_ENTRIES; i++) begin assign fwd_o.sbe[i] = mem_q[i].sbe; diff --git a/core/store_buffer.sv b/core/store_buffer.sv index 7c22a97fe2f..aad6f8a8bb0 100644 --- a/core/store_buffer.sv +++ b/core/store_buffer.sv @@ -17,9 +17,10 @@ module store_buffer import ariane_pkg::*; #( - parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty, - parameter type dcache_req_i_t = logic, - parameter type dcache_req_o_t = logic + parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty, + parameter type dcache_req_i_t = logic, + parameter type dcache_req_o_t = logic, + parameter type cbo_t = logic ) ( input logic clk_i, // Clock input logic rst_ni, // Asynchronous reset active low @@ -45,6 +46,7 @@ module store_buffer input logic [CVA6Cfg.XLEN-1:0] data_i, // data which is placed in the queue input logic [(CVA6Cfg.XLEN/8)-1:0] be_i, // byte enable in input logic [1:0] data_size_i, // type of request we are making (e.g.: bytes to write) + input cbo_t cbo_op_i, // type of cache block operation // D$ interface input dcache_req_o_t req_port_i, @@ -59,7 +61,9 @@ module store_buffer logic [CVA6Cfg.XLEN-1:0] data; logic [(CVA6Cfg.XLEN/8)-1:0] be; logic [1:0] data_size; + cbo_t cbo_op; logic valid; // this entry is valid, we need this for checking if the address offset matches + logic wait_rvalid; // need to wait for rvalid... } speculative_queue_n[DEPTH_SPEC-1:0], speculative_queue_q[DEPTH_SPEC-1:0], @@ -96,6 +100,8 @@ module store_buffer speculative_queue_n[speculative_write_pointer_q].be = be_i; speculative_queue_n[speculative_write_pointer_q].data_size = data_size_i; speculative_queue_n[speculative_write_pointer_q].valid = 1'b1; + speculative_queue_n[speculative_write_pointer_q].cbo_op = cbo_op_i; + speculative_queue_n[speculative_write_pointer_q].wait_rvalid = 1'b0; // advance the write pointer speculative_write_pointer_n = speculative_write_pointer_q + 1'b1; speculative_status_cnt++; @@ -166,19 +172,40 @@ module store_buffer commit_queue_n = commit_queue_q; req_port_o.data_req = 1'b0; + req_port_o.cbo_op = commit_queue_q[commit_read_pointer_q].cbo_op; // there should be no commit when we are flushing // if the entry in the commit queue is valid and not speculative anymore we can issue this instruction - if (commit_queue_q[commit_read_pointer_q].valid && !stall_st_pending_i) begin + if (commit_queue_q[commit_read_pointer_q].valid && !stall_st_pending_i && !commit_queue_q[commit_read_pointer_q].wait_rvalid) begin req_port_o.data_req = 1'b1; if (req_port_i.data_gnt) begin - // we can evict it from the commit buffer + if (commit_queue_q[commit_read_pointer_q].cbo_op == ariane_pkg::CBO_NONE || req_port_i.data_rvalid) begin + // not CBO or rvalid as well -> we can evict it from the commit buffer + // check for rvalid is technically superfluous, as CBO latency is >= 1 cycle, but check it anyway just to be safe + commit_queue_n[commit_read_pointer_q].valid = 1'b0; + // advance the read_pointer + commit_read_pointer_n = commit_read_pointer_q + 1'b1; + commit_status_cnt--; + end else if (commit_queue_q[commit_read_pointer_q].cbo_op != ariane_pkg::CBO_NONE) begin + // CBO and have gotten data grant -> proceed to wait for rvalid + commit_queue_n[commit_read_pointer_q].wait_rvalid = 1'b1; + end + end + end + + if(commit_queue_q[commit_read_pointer_q].valid && commit_queue_q[commit_read_pointer_q].wait_rvalid) + begin + // wait for rvalid, but no need to raise another request / wait for grant + if (req_port_i.data_rvalid) begin + // CMO did commit + // we can evict the entry from the commit buffer commit_queue_n[commit_read_pointer_q].valid = 1'b0; // advance the read_pointer commit_read_pointer_n = commit_read_pointer_q + 1'b1; commit_status_cnt--; end end + // we ignore the rvalid signal for now as we assume that the store // happened if we got a grant diff --git a/core/store_unit.sv b/core/store_unit.sv index 141763dda78..82193fb756a 100644 --- a/core/store_unit.sv +++ b/core/store_unit.sv @@ -20,7 +20,8 @@ module store_unit parameter type dcache_req_i_t = logic, parameter type dcache_req_o_t = logic, parameter type exception_t = logic, - parameter type lsu_ctrl_t = logic + parameter type lsu_ctrl_t = logic, + parameter type cbo_t = logic ) ( // Subsystem Clock - SUBSYSTEM input logic clk_i, @@ -46,6 +47,8 @@ module store_unit output logic commit_ready_o, // TO_BE_COMPLETED - TO_BE_COMPLETED input logic amo_valid_commit_i, + // Data Endian mode - CSR_REGFILE + input logic mbe_i, // Store result is valid - ISSUE_STAGE output logic valid_o, // Transaction ID - ISSUE_STAGE @@ -83,7 +86,10 @@ module store_unit // Data cache request - CACHES input dcache_req_o_t req_port_i, // Data cache response - CACHES - output dcache_req_i_t req_port_o + output dcache_req_i_t req_port_o, + //Trigger module + input logic sdtrig_store_stall_i, + input logic [CVA6Cfg.XLEN-1:0] sdtrig_store_action_i ); // align data to address e.g.: shift data to be naturally 64 @@ -135,15 +141,16 @@ module store_unit logic [(CVA6Cfg.XLEN/8)-1:0] st_be_n, st_be_q; logic [1:0] st_data_size_n, st_data_size_q; amo_t amo_op_d, amo_op_q; + cbo_t cbo_op_d, cbo_op_q; logic [CVA6Cfg.TRANS_ID_BITS-1:0] trans_id_n, trans_id_q; // output assignments - assign vaddr_o = lsu_ctrl_i.vaddr; // virtual address + assign vaddr_o = lsu_ctrl_i.vaddr; // virtual address assign hs_ld_st_inst_o = CVA6Cfg.RVH ? lsu_ctrl_i.hs_ld_st_inst : 1'b0; - assign hlvx_inst_o = CVA6Cfg.RVH ? lsu_ctrl_i.hlvx_inst : 1'b0; - assign tinst_o = CVA6Cfg.RVH ? lsu_ctrl_i.tinst : '0; // transformed instruction - assign trans_id_o = trans_id_q; // transaction id from previous cycle + assign hlvx_inst_o = CVA6Cfg.RVH ? lsu_ctrl_i.hlvx_inst : 1'b0; + assign tinst_o = CVA6Cfg.RVH ? lsu_ctrl_i.tinst : '0; // transformed instruction + assign trans_id_o = (sdtrig_store_stall_i && valid_i) ? lsu_ctrl_i.trans_id : trans_id_q; // transaction id from previous cycle always_comb begin : store_control translation_req_o = 1'b0; @@ -155,93 +162,128 @@ module store_unit trans_id_n = lsu_ctrl_i.trans_id; state_d = state_q; - case (state_q) - // we got a valid store - IDLE: begin - if (valid_i) begin - state_d = VALID_STORE; - translation_req_o = 1'b1; - pop_st_o = 1'b1; - // check if translation was valid and we have space in the store buffer - // otherwise simply stall - if (CVA6Cfg.MmuPresent && !dtlb_hit_i) begin - state_d = WAIT_TRANSLATION; - pop_st_o = 1'b0; - end + if (sdtrig_store_stall_i && valid_i) begin + //validation of the store architecturally but do not store any result nor commit it + pop_st_o = 1'b0; + valid_o = 1'b1; + st_valid = 1'b0; + translation_req_o = 1'b0; + //generate exception + ex_o.valid = 1'b1; + ex_o.cause = sdtrig_store_action_i; + ex_o.tval = lsu_ctrl_i.vaddr; + + //stall store unit + state_d = IDLE; + end else begin + case (state_q) + // we got a valid store + IDLE: begin + if (valid_i) begin + state_d = VALID_STORE; + translation_req_o = 1'b1; + pop_st_o = 1'b1; + // check if translation was valid and we have space in the store buffer + // otherwise simply stall + if (CVA6Cfg.MmuPresent && !dtlb_hit_i) begin + state_d = WAIT_TRANSLATION; + pop_st_o = 1'b0; + end - if (!st_ready) begin - state_d = WAIT_STORE_READY; - pop_st_o = 1'b0; + if (!st_ready) begin + state_d = WAIT_STORE_READY; + pop_st_o = 1'b0; + end end end - end - VALID_STORE: begin - valid_o = 1'b1; - // post this store to the store buffer if we are not flushing - if (!flush_i) st_valid = 1'b1; + VALID_STORE: begin + valid_o = 1'b1; + // post this store to the store buffer if we are not flushing + if (!flush_i && !sdtrig_store_stall_i) st_valid = 1'b1; - st_valid_without_flush = 1'b1; + st_valid_without_flush = 1'b1; - // we have another request and its not an AMO (the AMO buffer only has depth 1) - if ((valid_i && CVA6Cfg.RVA && !instr_is_amo) || (valid_i && !CVA6Cfg.RVA)) begin + // we have another request and its not an AMO (the AMO buffer only has depth 1) + if ((valid_i && CVA6Cfg.RVA && !instr_is_amo) || (valid_i && !CVA6Cfg.RVA)) begin - translation_req_o = 1'b1; - state_d = VALID_STORE; - pop_st_o = 1'b1; + translation_req_o = 1'b1; + state_d = VALID_STORE; + pop_st_o = 1'b1; - if (CVA6Cfg.MmuPresent && !dtlb_hit_i) begin - state_d = WAIT_TRANSLATION; - pop_st_o = 1'b0; - end + if (CVA6Cfg.MmuPresent && !dtlb_hit_i) begin + state_d = WAIT_TRANSLATION; + pop_st_o = 1'b0; + end - if (!st_ready) begin - state_d = WAIT_STORE_READY; - pop_st_o = 1'b0; + if (!st_ready) begin + state_d = WAIT_STORE_READY; + pop_st_o = 1'b0; + end + // if we do not have another request go back to idle + end else begin + state_d = IDLE; end - // if we do not have another request go back to idle - end else begin - state_d = IDLE; end - end - // the store queue is currently full - WAIT_STORE_READY: begin - // keep the translation request high - translation_req_o = 1'b1; + // the store queue is currently full + WAIT_STORE_READY: begin + // keep the translation request high + translation_req_o = 1'b1; - if (st_ready && dtlb_hit_i) begin - state_d = IDLE; + if (st_ready && dtlb_hit_i) begin + state_d = IDLE; + end end - end - default: begin - // we didn't receive a valid translation, wait for one - // but we know that the store queue is not full as we could only have landed here if - // it wasn't full - if (state_q == WAIT_TRANSLATION && CVA6Cfg.MmuPresent) begin - translation_req_o = 1'b1; + default: begin + // we didn't receive a valid translation, wait for one + // but we know that the store queue is not full as we could only have landed here if + // it wasn't full + if (state_q == WAIT_TRANSLATION && CVA6Cfg.MmuPresent) begin + translation_req_o = 1'b1; - if (dtlb_hit_i) begin - state_d = IDLE; + if (dtlb_hit_i) begin + state_d = IDLE; + end end end + endcase + + // ----------------- + // Access Exception + // ----------------- + // we got an address translation exception (access rights, misaligned or page fault) + if (ex_i.valid && (state_q != IDLE)) begin + // the only difference is that we do not want to store this request + pop_st_o = 1'b1; + st_valid = 1'b0; + state_d = IDLE; + valid_o = 1'b1; end - endcase - // ----------------- - // Access Exception - // ----------------- - // we got an address translation exception (access rights, misaligned or page fault) - if (ex_i.valid && (state_q != IDLE)) begin - // the only difference is that we do not want to store this request - pop_st_o = 1'b1; - st_valid = 1'b0; - state_d = IDLE; - valid_o = 1'b1; + if (flush_i) state_d = IDLE; end + end + + // ------------- + // Byte-Swapper + // ------------- + // We need to reverse the byte order of what we intend to Store in Data Memory if we are in Big Endian Mode (mbe defines endianness and comes from CSRregfile). + logic [CVA6Cfg.XLEN-1:0] endian_data; - if (flush_i) state_d = IDLE; + always_comb begin + endian_data = lsu_ctrl_i.data; + if (mbe_i) begin + case (lsu_ctrl_i.operation) + SB, HSV_B, FSB: endian_data[7:0] = {lsu_ctrl_i.data[7:0]}; + SH, HSV_H, FSH: endian_data[15:0] = {<<8{lsu_ctrl_i.data[15:0]}}; + SW, HSV_W, FSW, AMO_LRW, AMO_SCW, AMO_SWAPW, AMO_ADDW, AMO_ANDW, AMO_ORW, AMO_XORW, AMO_MAXW, + AMO_MINW, AMO_MAXWU, AMO_MINWU: + endian_data[31:0] = {<<8{lsu_ctrl_i.data[31:0]}}; + default: endian_data[CVA6Cfg.XLEN-1:0] = {<<8{lsu_ctrl_i.data[CVA6Cfg.XLEN-1:0]}}; + endcase + end end // ----------- @@ -251,8 +293,8 @@ module store_unit always_comb begin st_be_n = lsu_ctrl_i.be; // don't shift the data if we are going to perform an AMO as we still need to operate on this data - st_data_n = (CVA6Cfg.RVA && instr_is_amo) ? lsu_ctrl_i.data[CVA6Cfg.XLEN-1:0] : - data_align(lsu_ctrl_i.vaddr[2:0], {{64 - CVA6Cfg.XLEN{1'b0}}, lsu_ctrl_i.data}); + st_data_n = ((CVA6Cfg.RVA && instr_is_amo) ? endian_data[CVA6Cfg.XLEN-1:0] : + data_align(lsu_ctrl_i.vaddr[2:0], {{64 - CVA6Cfg.XLEN{1'b0}}, endian_data})); st_data_size_n = extract_transfer_size(lsu_ctrl_i.operation); // save AMO op for next cycle if (CVA6Cfg.RVA) begin @@ -273,6 +315,17 @@ module store_unit end else begin amo_op_d = AMO_NONE; end + + if (CVA6Cfg.RVZiCbom) begin + case (lsu_ctrl_i.operation) + ariane_pkg::CBO_INVAL: cbo_op_d = ariane_pkg::CBO_INVAL; + ariane_pkg::CBO_CLEAN: cbo_op_d = ariane_pkg::CBO_CLEAN; + ariane_pkg::CBO_FLUSH: cbo_op_d = ariane_pkg::CBO_FLUSH; + default: cbo_op_d = ariane_pkg::CBO_NONE; + endcase + end else begin + cbo_op_d = ariane_pkg::CBO_NONE; + end end logic store_buffer_valid, amo_buffer_valid; @@ -288,9 +341,10 @@ module store_unit // Store Queue // --------------- store_buffer #( - .CVA6Cfg(CVA6Cfg), + .CVA6Cfg (CVA6Cfg), .dcache_req_i_t(dcache_req_i_t), - .dcache_req_o_t(dcache_req_o_t) + .dcache_req_o_t(dcache_req_o_t), + .cbo_t (cbo_t) ) store_buffer_i ( .clk_i, .rst_ni, @@ -306,13 +360,14 @@ module store_unit .valid_i (store_buffer_valid), // the flush signal can be critical and we need this valid // signal to check whether the page_offset matches or not, - // functionaly it doesn't make a difference whether we use + // functionally it doesn't make a difference whether we use // the correct valid signal or not as we are flushing // the whole pipeline anyway .valid_without_flush_i(st_valid_without_flush), .paddr_i, .rvfi_mem_paddr_o (rvfi_mem_paddr_o), .data_i (st_data_q), + .cbo_op_i (cbo_op_q), .be_i (st_be_q), .data_size_i (st_data_size_q), .req_port_i (req_port_i), @@ -353,6 +408,7 @@ module store_unit st_data_size_q <= '0; trans_id_q <= '0; amo_op_q <= AMO_NONE; + cbo_op_q <= ariane_pkg::CBO_NONE; end else begin state_q <= state_d; st_be_q <= st_be_n; @@ -360,6 +416,7 @@ module store_unit trans_id_q <= trans_id_n; st_data_size_q <= st_data_size_n; amo_op_q <= amo_op_d; + cbo_op_q <= cbo_op_d; end end diff --git a/core/trigger_module.sv b/core/trigger_module.sv new file mode 100644 index 00000000000..1d4ce371b09 --- /dev/null +++ b/core/trigger_module.sv @@ -0,0 +1,1124 @@ +// Copyright 2026 10x Engineers +// Copyright 2026 Thales DIS design services SAS +// +// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +// You may obtain a copy of the License at https://solderpad.org/licenses/ +// +// Original Author: Munail Waqar - 10x Engineers +// Contributors : Mounsaf YOUSFI - Thales DIS + +module trigger_module + import ariane_pkg::*; + import triggers_pkg::*; +#( + parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty, + parameter type exception_t = logic +) ( + input logic clk_i, + input logic rst_ni, + input logic [CVA6Cfg.NrCommitPorts-1:0] commit_ack_i, + input exception_t ex_i, + input riscv::priv_lvl_t priv_lvl_i, + input logic debug_mode_i, + input logic mret_i, + input logic sret_i, + input logic mstatus_mie_i, + input logic mstatus_sie_i, + input logic medeleg_breakpoint_i, + input logic [CVA6Cfg.VLEN-1:0] sdtrig_lsu_inputs_vaddr_i, + input logic [CVA6Cfg.XLEN-1:0] sdtrig_lsu_inputs_data_i, + input logic sdtrig_lsu_inputs_fu_i, + input fu_op sdtrig_lsu_inputs_op_i, + input logic sdtrig_lsu_inputs_valid_i, + input logic [CVA6Cfg.XLEN-1:0] sdtrig_load_data_i, + input logic sdtrig_load_valid_i, + + input logic [CVA6Cfg.XLEN-1:0] scontext_i, + + input logic [CVA6Cfg.XLEN-1:0] tdata1_i, + input logic [CVA6Cfg.XLEN-1:0] tdata2_i, + input logic [CVA6Cfg.XLEN-1:0] tdata3_i, + input logic [CVA6Cfg.XLEN-1:0] tselect_i, + input logic tselect_we, + input logic tdata1_we, + input logic tdata2_we, + input logic tdata3_we, + + output logic [CVA6Cfg.XLEN-1:0] tselect_o, + output logic [CVA6Cfg.XLEN-1:0] tdata1_o, + output logic [CVA6Cfg.XLEN-1:0] tdata2_o, + output logic [CVA6Cfg.XLEN-1:0] tdata3_o, + output logic flush_o, + + input logic [CVA6Cfg.XLEN-1:0] mepc_i, + input logic [CVA6Cfg.XLEN-1:0] mcause_i, + input logic [CVA6Cfg.XLEN-1:0] mtval_i, + output logic etrigger_context_saved_valid_o, + output logic [CVA6Cfg.XLEN-1:0] etrigger_context_mepc_o, + output logic [CVA6Cfg.XLEN-1:0] etrigger_context_mcause_o, + output logic [CVA6Cfg.XLEN-1:0] etrigger_context_mtval_o, + + input logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.VLEN-1:0] fetch_sdtrig_pc_i, + input logic [CVA6Cfg.NrIssuePorts-1:0][CVA6Cfg.XLEN-1:0] fetch_sdtrig_instr_i, + output logic [CVA6Cfg.XLEN-1:0] sdtrig_decoder_action_o[CVA6Cfg.NrIssuePorts], + + output logic sdtrig_load_stall_o, + output logic sdtrig_load_cancel_o, + output logic [CVA6Cfg.XLEN-1:0] sdtrig_load_action_o, + output logic sdtrig_store_stall_o, + output logic [CVA6Cfg.XLEN-1:0] sdtrig_store_action_o, + + output logic sdtrig_commit_std_exception_valid_o, + output logic sdtrig_commit_icount_valid_o, + output logic [CVA6Cfg.XLEN-1:0] sdtrig_commit_action_o, + output logic [$clog2(CVA6Cfg.NrCommitPorts)-1:0] sdtrig_commit_icount_nr_instr_o +); + + function automatic logic std_match(input logic [CVA6Cfg.XLEN-1:0] tdata2_ref, + input logic [CVA6Cfg.XLEN-1:0] comp_val, + input logic [3:0] match_type); + logic match = 0; + + unique case (match_type) + 4'd0: + if (CVA6Cfg.SdtrigSupportedMatch[0]) // equal + match = (tdata2_ref == comp_val); + + 4'd1: + if (CVA6Cfg.SdtrigSupportedMatch[1]) begin //napot + if (CVA6Cfg.IS_XLEN32) match = (napot_match32(tdata2_ref, comp_val)); + else if (CVA6Cfg.IS_XLEN64) match = (napot_match64(tdata2_ref, comp_val)); + end + + 4'd2: + if (CVA6Cfg.SdtrigSupportedMatch[2]) //greater or equal than + match = (tdata2_ref[CVA6Cfg.XLEN-1:0] >= comp_val); + + 4'd3: + if (CVA6Cfg.SdtrigSupportedMatch[3]) //lower than + match = (tdata2_ref[CVA6Cfg.XLEN-1:0] < comp_val); + + 4'd4: + if (CVA6Cfg.SdtrigSupportedMatch[4]) //mask low + match = ((tdata2_ref[CVA6Cfg.XLEN-1:(CVA6Cfg.XLEN)/2] & comp_val[(CVA6Cfg.XLEN)/2-1:0]) == tdata2_ref[(CVA6Cfg.XLEN)/2-1:0]); + + 4'd5: + if (CVA6Cfg.SdtrigSupportedMatch[5]) //mask high + match = ((tdata2_ref[CVA6Cfg.XLEN-1:(CVA6Cfg.XLEN)/2] & comp_val[CVA6Cfg.XLEN-1:(CVA6Cfg.XLEN)/2]) == tdata2_ref[(CVA6Cfg.XLEN)/2-1:0]); + + 4'd8: + if (CVA6Cfg.SdtrigSupportedMatch[6]) //not equal + match = (tdata2_ref[CVA6Cfg.XLEN-1:0] != comp_val); + + 4'd9: + if (CVA6Cfg.SdtrigSupportedMatch[7]) begin //not napot + if (CVA6Cfg.IS_XLEN32) match = !(napot_match32(tdata2_ref, comp_val)); + else if (CVA6Cfg.IS_XLEN64) match = !(napot_match64(tdata2_ref, comp_val)); + end + + 4'd12: + if (CVA6Cfg.SdtrigSupportedMatch[8]) //not mask low + match = !((tdata2_ref[CVA6Cfg.XLEN-1:(CVA6Cfg.XLEN)/2] & comp_val[(CVA6Cfg.XLEN)/2-1:0]) == tdata2_ref[(CVA6Cfg.XLEN)/2-1:0]); + + 4'd13: + if (CVA6Cfg.SdtrigSupportedMatch[9]) //not mask high + match = !((tdata2_ref[CVA6Cfg.XLEN-1:(CVA6Cfg.XLEN)/2] & comp_val[CVA6Cfg.XLEN-1:(CVA6Cfg.XLEN)/2]) == tdata2_ref[(CVA6Cfg.XLEN)/2-1:0]); + + default: match = '0; + endcase + + return match; + endfunction + + // tdata1 is WARL. action=1 (enter Debug Mode) is legal only with dmode=1. + // The actions that are not supported become 0 (breakpoint exception). + function automatic logic [5:0] legal_action(input logic [5:0] action, input logic dmode); + return (CVA6Cfg.SdtrigSupportedActions[1] && dmode && action == 6'd1) ? 6'd1 : 6'd0; + endfunction + + // Bit "code" of tdata2 selects the trap with this code. The codes from XLEN up are not selected. + function automatic logic cause_selected(input logic [CVA6Cfg.XLEN-1:0] tdata2, + input logic [CVA6Cfg.XLEN-1:0] cause); + return (cause[CVA6Cfg.XLEN-2:$clog2(CVA6Cfg.XLEN)] == '0) && + tdata2[cause[$clog2(CVA6Cfg.XLEN)-1:0]]; + endfunction + + typedef struct packed { + logic valid; + logic [CVA6Cfg.XLEN-1:0] action; + } fire_req_t; + + // Trigger Module Helpers + logic + trigger_chain_vector_d[CVA6Cfg.SdtrigNrTriggers], + trigger_chain_vector_q[CVA6Cfg.SdtrigNrTriggers]; + logic matchEA, matchED, matchSX, matchLA, matchLD; + //EA = Match Control 6 Exec Address; ED = MC6 Exec Data; SX = MC6 Store (both addr. and data);... + fire_req_t + fire_req_EA[CVA6Cfg.NrIssuePorts], + fire_req_ED[CVA6Cfg.NrIssuePorts], + fire_req_SX, + fire_req_LA, + fire_req_LD, + fire_req_Icount, + fire_req_Etrigger, + fire_req_Itrigger; + logic [$clog2(CVA6Cfg.SdtrigNrTriggers)-1:0] previous_trigg_i; + logic sdtrig_commit_icount_valid_d; + logic [CVA6Cfg.XLEN-1:0] sdtrig_commit_action_d; + logic [CVA6Cfg.XLEN-1:0] sdtrig_load_action_d, sdtrig_load_action_q; + logic [$clog2(CVA6Cfg.NrCommitPorts)-1:0] sdtrig_commit_icount_nr_instr_d; + logic [CVA6Cfg.SdtrigNrTriggers-1:0] e_matched_q, e_matched_d; + logic + sdtrig_commit_std_exception_valid_q, + sdtrig_commit_std_exception_valid_d, + sdtrig_load_stall_s, + sdtrig_load_cancel_d, + sdtrig_load_cancel_q; + logic etrigger_context_saved_valid_q, etrigger_context_saved_valid_d; + logic [CVA6Cfg.XLEN-1:0] etrigger_context_mepc_q, etrigger_context_mepc_d; + logic [CVA6Cfg.XLEN-1:0] etrigger_context_mcause_q, etrigger_context_mcause_d; + logic [CVA6Cfg.XLEN-1:0] etrigger_context_mtval_q, etrigger_context_mtval_d; + + logic [$clog2(CVA6Cfg.SdtrigNrTriggers)-1:0] tselect_q, tselect_d; + logic [3:0] trigger_type_q[CVA6Cfg.SdtrigNrTriggers], trigger_type_d[CVA6Cfg.SdtrigNrTriggers]; + logic [CVA6Cfg.SdtrigNrTriggers-1:0] priv_match, scontext_match; + logic [CVA6Cfg.XLEN-1:0] tdata2_q[CVA6Cfg.SdtrigNrTriggers], tdata2_d[CVA6Cfg.SdtrigNrTriggers]; + trigger_32_tdata1_type + trigger_32_tdata1_q[CVA6Cfg.SdtrigNrTriggers], trigger_32_tdata1_d[CVA6Cfg.SdtrigNrTriggers]; + textra32_tdata3_t + textra32_tdata3_q[CVA6Cfg.SdtrigNrTriggers], textra32_tdata3_d[CVA6Cfg.SdtrigNrTriggers]; + textra64_tdata3_t + textra64_tdata3_q[CVA6Cfg.SdtrigNrTriggers], textra64_tdata3_d[CVA6Cfg.SdtrigNrTriggers]; + + for (genvar i = 0; i < CVA6Cfg.SdtrigNrTriggers; i++) begin + if (!CVA6Cfg.SdtrigSupportTextra) begin + assign textra32_tdata3_d[i] = '0; + assign textra64_tdata3_d[i] = '0; + assign textra32_tdata3_q[i] = '0; + assign textra64_tdata3_q[i] = '0; + end + end + + logic [CVA6Cfg.NrIssuePorts-1:0] fire_req_EA_valid, fire_req_ED_valid; + logic [CVA6Cfg.XLEN-1:0] + fire_req_EA_action[CVA6Cfg.NrIssuePorts], fire_req_ED_action[CVA6Cfg.NrIssuePorts]; + + for (genvar i = 0; i < CVA6Cfg.NrIssuePorts; i++) begin + assign fire_req_EA_valid[i] = fire_req_EA[i].valid; + assign fire_req_ED_valid[i] = fire_req_ED[i].valid; + assign fire_req_EA_action[i] = fire_req_EA[i].action; + assign fire_req_ED_action[i] = fire_req_ED[i].action; + end + + // A trap is taken. A Debug Mode entry is not a trap. An exception in Debug Mode is not a trap. + logic trap_taken; + assign trap_taken = ex_i.valid && !debug_mode_i && !(ex_i.cause inside {riscv::DEBUG_REQUEST, riscv::DEBUG_TRIGGER}); + + // A trigger with action=0 does not match or fire in M-mode while MIE=0, and in S-mode while + // SIE=0 when the breakpoint exceptions go to S-mode (first solution of Native Triggers) + logic native_allowed; + assign native_allowed = !(priv_lvl_i == riscv::PRIV_LVL_M && !mstatus_mie_i) && + !(priv_lvl_i == riscv::PRIV_LVL_S && medeleg_breakpoint_i && !mstatus_sie_i); + + // lr is a load and sc is a store. An AMO is a load and a store. The store unit executes the + // three of them (sdtrig_lsu_inputs_fu_i=1). + logic lsu_load_access, lsu_store_access; + assign lsu_store_access = sdtrig_lsu_inputs_fu_i && !(sdtrig_lsu_inputs_op_i inside {AMO_LRW, AMO_LRD}); + assign lsu_load_access = !sdtrig_lsu_inputs_fu_i || (is_amo( + sdtrig_lsu_inputs_op_i + ) && !(sdtrig_lsu_inputs_op_i inside {AMO_SCW, AMO_SCD})); + + // icount matches on each instruction that retires, or on the trap that is taken + logic [$clog2(CVA6Cfg.NrCommitPorts+1)-1:0] icount_events; + always_comb begin : icount_match_events + icount_events = '0; + if (trap_taken) icount_events = 1; + else if (!ex_i.valid && !debug_mode_i) + for (int p = 0; p < CVA6Cfg.NrCommitPorts; p++) icount_events += commit_ack_i[p]; + end + + // Trigger CSRs write/update logic + always_comb begin : write_path + // defaults + if (CVA6Cfg.SdtrigSupportTextra && CVA6Cfg.IS_XLEN32) textra32_tdata3_d = textra32_tdata3_q; + if (CVA6Cfg.SdtrigSupportTextra && CVA6Cfg.IS_XLEN64) textra64_tdata3_d = textra64_tdata3_q; + + trigger_type_d = trigger_type_q; + trigger_32_tdata1_d = trigger_32_tdata1_q; + tdata2_d = tdata2_q; + tselect_d = tselect_q; + matchEA = 1'b0; + matchED = 1'b0; + matchSX = 1'b0; + matchLA = 1'b0; + matchLD = 1'b0; + sdtrig_load_cancel_d = 1'b0; + sdtrig_load_stall_o = (ex_i.valid) ? 1'b0 : sdtrig_load_stall_s; + sdtrig_store_stall_o = 1'b0; + sdtrig_commit_icount_valid_d = 1'b0; + sdtrig_commit_icount_nr_instr_d = '0; + sdtrig_commit_action_d = '0; + sdtrig_commit_std_exception_valid_d = 1'b0; + sdtrig_load_action_d = sdtrig_load_action_q; + sdtrig_load_action_o = sdtrig_load_cancel_q ? sdtrig_load_action_q : '0; + sdtrig_store_action_o = '0; + flush_o = 1'b0; + + //Break from mcontrol6 from execution is a comb. only signal that + //informs decode stage that the currently decoded PC/instr must generate + //a breakpoint exception or a debug request + for (int i = 0; i < CVA6Cfg.NrIssuePorts; i++) begin + sdtrig_decoder_action_o[i] = '0; + fire_req_EA[i].valid = 1'b0; + fire_req_EA[i].action = '0; + fire_req_ED[i].valid = 1'b0; + fire_req_ED[i].action = '0; + end + + if (ex_i.valid || !CVA6Cfg.SdtrigTriggerChaining) begin + for (int i = 0; i < CVA6Cfg.SdtrigNrTriggers; i++) trigger_chain_vector_d[i] = 1'b0; + end else if (CVA6Cfg.SdtrigTriggerChaining) trigger_chain_vector_d = trigger_chain_vector_q; + + previous_trigg_i = '0; + + //Trigger fire requests reset + fire_req_SX.valid = 1'b0; + fire_req_SX.action = '0; + fire_req_LA.valid = 1'b0; + fire_req_LA.action = '0; + fire_req_LD.valid = 1'b0; + fire_req_LD.action = '0; + fire_req_Icount.valid = 1'b0; + fire_req_Icount.action = '0; + fire_req_Etrigger.valid = 1'b0; + fire_req_Etrigger.action = '0; + fire_req_Itrigger.valid = 1'b0; + fire_req_Itrigger.action = '0; + + etrigger_context_saved_valid_d = (mret_i) ? 1'b0 : etrigger_context_saved_valid_q; + etrigger_context_mepc_d = etrigger_context_mepc_q; + etrigger_context_mcause_d = etrigger_context_mcause_q; + etrigger_context_mtval_d = etrigger_context_mtval_q; + + e_matched_d = e_matched_q; + + if (CVA6Cfg.Sdtrig) begin + // Triggers Match Logic + for (int i = 0; i < CVA6Cfg.SdtrigNrTriggers; i++) begin + matchEA = 1'b0; + matchED = 1'b0; + matchSX = 1'b0; + matchLD = 1'b0; + matchLA = 1'b0; + + if (CVA6Cfg.SdtrigTriggerChaining) + previous_trigg_i = CVA6Cfg.SdtrigNrTriggers'((i - 1 + CVA6Cfg.SdtrigNrTriggers) % CVA6Cfg.SdtrigNrTriggers); + priv_match[i] = 1'b0; + // icount match logic + if (trigger_type_d[i] == 4'd3 && CVA6Cfg.SdtrigIcount) begin + case(priv_lvl_i) // trigger will only fire if current priv lvl is same as the trigger configuration + riscv::PRIV_LVL_M: if (trigger_32_tdata1_d[i].icount_type.m) priv_match[i] = 1'b1; + riscv::PRIV_LVL_S: if (trigger_32_tdata1_d[i].icount_type.s) priv_match[i] = 1'b1; + riscv::PRIV_LVL_U: if (trigger_32_tdata1_d[i].icount_type.u) priv_match[i] = 1'b1; + default: priv_match[i] = 1'b0; + endcase + // Context match check (textra), in all modes + if (CVA6Cfg.SdtrigSupportTextra) begin + if (CVA6Cfg.IS_XLEN32) begin + scontext_match[i] = match_scontext32( + scontext_i, + textra32_tdata3_d[i].sselect, + textra32_tdata3_d[i].sbytemask, + textra32_tdata3_d[i].svalue, + 1'b0 + ); + end else begin + scontext_match[i] = match_scontext64( + scontext_i, + textra64_tdata3_d[i].sselect, + textra64_tdata3_d[i].sbytemask, + textra64_tdata3_d[i].svalue, + 1'b1 + ); + end + priv_match[i] &= scontext_match[i]; + end + if (trigger_32_tdata1_d[i].icount_type.action == '0 && !native_allowed) + priv_match[i] = 1'b0; + // A match in a mode where the trigger is enabled decrements count. + // pending becomes set when count goes to 0. A write of count=0 does not set it. + if (priv_match[i] && icount_events != 0 && trigger_32_tdata1_q[i].icount_type.count != 0) begin + if (trigger_32_tdata1_q[i].icount_type.count > 14'(icount_events)) begin + trigger_32_tdata1_d[i].icount_type.count = trigger_32_tdata1_q[i].icount_type.count - 14'(icount_events); + end else begin + trigger_32_tdata1_d[i].icount_type.count = '0; + trigger_32_tdata1_d[i].icount_type.pending = 1'b1; + end + end + // The commit stage takes the trigger action on the next instruction to execute + // in an enabled mode (count=0), or retires one instruction at a time (count=1). + if (priv_match[i] && !debug_mode_i) begin + if (trigger_32_tdata1_d[i].icount_type.pending || + trigger_32_tdata1_d[i].icount_type.count != 0 && trigger_32_tdata1_d[i].icount_type.count < CVA6Cfg.NrCommitPorts) begin + fire_req_Icount.valid = 1'b1; + sdtrig_commit_icount_nr_instr_d = trigger_32_tdata1_d[i].icount_type.pending ? '0 : + $bits(sdtrig_commit_icount_nr_instr_d)'(trigger_32_tdata1_d[i].icount_type.count); + unique case (trigger_32_tdata1_d[i].icount_type.action) + 6'd0: + if (CVA6Cfg.SdtrigSupportedActions[0]) fire_req_Icount.action = riscv::BREAKPOINT; + 6'd1: + if (CVA6Cfg.SdtrigSupportedActions[1]) + fire_req_Icount.action = riscv::DEBUG_TRIGGER; + default: ; + endcase + end + end + // The trigger fires when the commit stage takes its action. pending is cleared. + if (trigger_32_tdata1_q[i].icount_type.pending && ex_i.valid && sdtrig_commit_icount_valid_o + && sdtrig_commit_icount_nr_instr_o == '0) begin + trigger_32_tdata1_d[i].icount_type.hit = 1'b1; + trigger_32_tdata1_d[i].icount_type.pending = 1'b0; + fire_req_Icount.valid = 1'b0; + fire_req_Icount.action = '0; + end + end + // mcontrol6 match logic + if (trigger_type_d[i] == 4'd6 && CVA6Cfg.SdtrigMcontrol6) begin + case(priv_lvl_i) // trigger will only fire if current priv lvl is same as the trigger configuration + riscv::PRIV_LVL_M: if (trigger_32_tdata1_d[i].mc6_type.m) priv_match[i] = 1'b1; + riscv::PRIV_LVL_S: if (trigger_32_tdata1_d[i].mc6_type.s) priv_match[i] = 1'b1; + riscv::PRIV_LVL_U: if (trigger_32_tdata1_d[i].mc6_type.u) priv_match[i] = 1'b1; + default: priv_match[i] = 1'b0; + endcase + // Context match check (textra), in all modes + if (CVA6Cfg.SdtrigSupportTextra) begin + if (CVA6Cfg.IS_XLEN32) begin + scontext_match[i] = match_scontext32( + scontext_i, + textra32_tdata3_d[i].sselect, + textra32_tdata3_d[i].sbytemask, + textra32_tdata3_d[i].svalue, + 1'b0 + ); + end else if (CVA6Cfg.IS_XLEN64) begin + scontext_match[i] = match_scontext64( + scontext_i, + textra64_tdata3_d[i].sselect, + textra64_tdata3_d[i].sbytemask, + textra64_tdata3_d[i].svalue, + 1'b1 + ); + end + priv_match[i] &= scontext_match[i]; + end + if (trigger_32_tdata1_d[i].mc6_type.action == '0 && !native_allowed) priv_match[i] = 1'b0; + + //Execute triggers + if ((CVA6Cfg.SdtrigMcontrol6ExecAddr || CVA6Cfg.SdtrigMcontrol6ExecData) && trigger_32_tdata1_d[i].mc6_type.execute) begin + for (int n = 0; n < CVA6Cfg.NrIssuePorts; n++) begin + //Execute trigger on address + if (CVA6Cfg.SdtrigMcontrol6ExecAddr) begin + if (!trigger_32_tdata1_d[i].mc6_type.select) begin + matchEA = std_match( + { + {{CVA6Cfg.XLEN - CVA6Cfg.VLEN} {1'b0}}, tdata2_d[i][CVA6Cfg.VLEN-1:0] + }, + { + {{CVA6Cfg.XLEN - CVA6Cfg.VLEN} {1'b0}}, fetch_sdtrig_pc_i[n] + }, + trigger_32_tdata1_d[i].mc6_type.match + ); + end + end + //Execute trigger on data + if (CVA6Cfg.SdtrigMcontrol6ExecData) begin + if (trigger_32_tdata1_d[i].mc6_type.select) begin + matchED = std_match(tdata2_d[i], fetch_sdtrig_instr_i[n], + trigger_32_tdata1_d[i].mc6_type.match); + end + end + //Request fire + if (priv_match[i] && (CVA6Cfg.SdtrigMcontrol6ExecAddr && matchEA || CVA6Cfg.SdtrigMcontrol6ExecData && matchED)) begin + trigger_32_tdata1_d[i].mc6_type.hit0 = 1'b1; //before + trigger_32_tdata1_d[i].mc6_type.hit1 = 1'b0; + if (CVA6Cfg.SdtrigTriggerChaining) begin + if(!trigger_32_tdata1_d[previous_trigg_i].mc6_type.chain && trigger_32_tdata1_d[i].mc6_type.chain || trigger_chain_vector_d[previous_trigg_i] && trigger_32_tdata1_d[i].mc6_type.chain) + trigger_chain_vector_d[i] = 1'b1; + if(trigger_chain_vector_d[previous_trigg_i] && !trigger_32_tdata1_d[i].mc6_type.chain || !trigger_32_tdata1_d[previous_trigg_i].mc6_type.chain && !trigger_32_tdata1_d[i].mc6_type.chain) begin + if (matchEA && CVA6Cfg.SdtrigMcontrol6ExecAddr) begin + fire_req_EA[n].valid = 1'b1; + + if(CVA6Cfg.SdtrigSupportedActions[0] && trigger_32_tdata1_d[i].mc6_type.action == 4'd0) begin + fire_req_EA[n].action = riscv::BREAKPOINT; + end + else if (CVA6Cfg.SdtrigSupportedActions[1] && trigger_32_tdata1_d[i].mc6_type.action == 4'd1) begin + if (CVA6Cfg.DebugEn && !debug_mode_i) begin + fire_req_EA[n].action = riscv::DEBUG_TRIGGER; + end + end + end + end else begin + fire_req_EA[n].valid = 1'b1; + if(CVA6Cfg.SdtrigSupportedActions[0] && trigger_32_tdata1_d[i].mc6_type.action == 4'd0) begin + fire_req_EA[n].action = riscv::BREAKPOINT; + end + else if (CVA6Cfg.SdtrigSupportedActions[1] && trigger_32_tdata1_d[i].mc6_type.action == 4'd1) begin + if (CVA6Cfg.DebugEn && !debug_mode_i) begin + fire_req_EA[n].action = riscv::DEBUG_TRIGGER; + end + end + end + end else if (matchEA) begin + fire_req_EA[n].valid = 1'b1; + if(CVA6Cfg.SdtrigSupportedActions[0] && trigger_32_tdata1_d[i].mc6_type.action == 4'd0) begin + fire_req_EA[n].action = riscv::BREAKPOINT; + end + else if (CVA6Cfg.SdtrigSupportedActions[1] && trigger_32_tdata1_d[i].mc6_type.action == 4'd1) begin + if (CVA6Cfg.DebugEn && !debug_mode_i) begin + fire_req_EA[n].action = riscv::DEBUG_TRIGGER; + end + end + end + end + if (priv_match[i] && CVA6Cfg.SdtrigMcontrol6ExecData && matchED) begin + trigger_32_tdata1_d[i].mc6_type.hit0 = 1'b1; //before + trigger_32_tdata1_d[i].mc6_type.hit1 = 1'b0; + if (CVA6Cfg.SdtrigTriggerChaining) begin + if(!trigger_32_tdata1_d[previous_trigg_i].mc6_type.chain && trigger_32_tdata1_d[i].mc6_type.chain || trigger_chain_vector_d[previous_trigg_i] && trigger_32_tdata1_d[i].mc6_type.chain) + trigger_chain_vector_d[i] = 1'b1; + if(trigger_chain_vector_d[previous_trigg_i] && !trigger_32_tdata1_d[i].mc6_type.chain || !trigger_32_tdata1_d[previous_trigg_i].mc6_type.chain && !trigger_32_tdata1_d[i].mc6_type.chain) begin + fire_req_ED[n].valid = 1'b1; + if(CVA6Cfg.SdtrigSupportedActions[0] && trigger_32_tdata1_d[i].mc6_type.action == 4'd0) begin + fire_req_ED[n].action = riscv::BREAKPOINT; + end + else if (CVA6Cfg.SdtrigSupportedActions[1] && trigger_32_tdata1_d[i].mc6_type.action == 4'd1) begin + if (CVA6Cfg.DebugEn && !debug_mode_i) begin + fire_req_ED[n].action = riscv::DEBUG_TRIGGER; + end + end + end + end else begin + fire_req_ED[n].valid = 1'b1; + if(CVA6Cfg.SdtrigSupportedActions[0] && trigger_32_tdata1_d[i].mc6_type.action == 4'd0) begin + fire_req_ED[n].action = riscv::BREAKPOINT; + end + else if (CVA6Cfg.SdtrigSupportedActions[1] && trigger_32_tdata1_d[i].mc6_type.action == 4'd1) begin + if (CVA6Cfg.DebugEn && !debug_mode_i) begin + fire_req_ED[n].action = riscv::DEBUG_TRIGGER; + end + end + end + end + end + end + + //Store triggers + if (CVA6Cfg.SdtrigMcontrol6Store && trigger_32_tdata1_d[i].mc6_type.store) begin + //Store trigger on data + if (CVA6Cfg.SdtrigMcontrol6Store) begin + if (trigger_32_tdata1_d[i].mc6_type.select) begin + if (sdtrig_lsu_inputs_valid_i && lsu_store_access) begin + matchSX = std_match(tdata2_d[i], sdtrig_lsu_inputs_data_i, + trigger_32_tdata1_d[i].mc6_type.match); + end + end + if (!trigger_32_tdata1_d[i].mc6_type.select) begin + if (sdtrig_lsu_inputs_valid_i && lsu_store_access) begin + matchSX = std_match(tdata2_d[i], sdtrig_lsu_inputs_vaddr_i, + trigger_32_tdata1_d[i].mc6_type.match); + end + end + end + //Request fire + if (priv_match[i] && matchSX) begin + trigger_32_tdata1_d[i].mc6_type.hit0 = 1'b1; //before + trigger_32_tdata1_d[i].mc6_type.hit1 = 1'b0; + if (CVA6Cfg.SdtrigTriggerChaining) begin + if(!trigger_32_tdata1_d[previous_trigg_i].mc6_type.chain && trigger_32_tdata1_d[i].mc6_type.chain || trigger_chain_vector_d[previous_trigg_i] && trigger_32_tdata1_d[i].mc6_type.chain) + trigger_chain_vector_d[i] = 1'b1; + if(trigger_chain_vector_d[previous_trigg_i] && !trigger_32_tdata1_d[i].mc6_type.chain || !trigger_32_tdata1_d[previous_trigg_i].mc6_type.chain && !trigger_32_tdata1_d[i].mc6_type.chain) begin + if (matchSX && CVA6Cfg.SdtrigMcontrol6Store) fire_req_SX.valid = 1'b1; + unique case (trigger_32_tdata1_d[i].mc6_type.action) + 4'd0: + if (CVA6Cfg.SdtrigSupportedActions[0] == 1'b1) begin + if (matchSX && CVA6Cfg.SdtrigMcontrol6Store) + fire_req_SX.action = riscv::BREAKPOINT; + end + 4'd1: + if (CVA6Cfg.SdtrigSupportedActions[1] == 1'b1) + if (CVA6Cfg.DebugEn && !debug_mode_i) begin + if (matchSX && CVA6Cfg.SdtrigMcontrol6Store) + fire_req_SX.action = riscv::DEBUG_TRIGGER; + end + default: ; + endcase + end + end else begin + if (matchSX && CVA6Cfg.SdtrigMcontrol6Store) fire_req_SX.valid = 1'b1; + unique case (trigger_32_tdata1_d[i].mc6_type.action) + 4'd0: + if (CVA6Cfg.SdtrigSupportedActions[0] == 1'b1) begin + if (matchSX && CVA6Cfg.SdtrigMcontrol6Store) + fire_req_SX.action = riscv::BREAKPOINT; + end + 4'd1: + if (CVA6Cfg.SdtrigSupportedActions[1] == 1'b1) + if (CVA6Cfg.DebugEn && !debug_mode_i) begin + if (matchSX && CVA6Cfg.SdtrigMcontrol6Store) + fire_req_SX.action = riscv::DEBUG_TRIGGER; + end + default: ; + endcase + end + end + end + + //Load triggers + if ((CVA6Cfg.SdtrigMcontrol6LoadAddr || CVA6Cfg.SdtrigMcontrol6LoadData) && trigger_32_tdata1_d[i].mc6_type.load) begin + //Load trigger on data + if (CVA6Cfg.SdtrigMcontrol6LoadData) begin + if (trigger_32_tdata1_d[i].mc6_type.select) begin + matchLD = std_match(tdata2_d[i], sdtrig_load_data_i, + trigger_32_tdata1_d[i].mc6_type.match); + //If the load unit result is the data to trigger on, stall load unit so it doesn't make any mem. access + //but do not generate any exception yet as we want this load's data to be saved + if (priv_match[i] && matchLD) begin + trigger_32_tdata1_d[i].mc6_type.hit0 = 1'b1; + trigger_32_tdata1_d[i].mc6_type.hit1 = 1'b1; //immediately after + if (CVA6Cfg.SdtrigTriggerChaining) begin + if(!trigger_32_tdata1_d[previous_trigg_i].mc6_type.chain && trigger_32_tdata1_d[i].mc6_type.chain || trigger_chain_vector_d[previous_trigg_i] && trigger_32_tdata1_d[i].mc6_type.chain) + trigger_chain_vector_d[i] = 1'b1; + if(trigger_chain_vector_d[previous_trigg_i] && !trigger_32_tdata1_d[i].mc6_type.chain || !trigger_32_tdata1_d[previous_trigg_i].mc6_type.chain && !trigger_32_tdata1_d[i].mc6_type.chain) begin + fire_req_LD.valid = 1'b1; + unique case (trigger_32_tdata1_d[i].mc6_type.action) + 4'd0: + if (CVA6Cfg.SdtrigSupportedActions[0] == 1'b1) + fire_req_LD.action = riscv::BREAKPOINT; + 4'd1: + if (CVA6Cfg.SdtrigSupportedActions[1] == 1'b1 && CVA6Cfg.DebugEn && !debug_mode_i) + fire_req_LD.action = riscv::DEBUG_TRIGGER; + default: ; + endcase + end + end else begin + fire_req_LD.valid = 1'b1; + unique case (trigger_32_tdata1_d[i].mc6_type.action) + 4'd0: + if (CVA6Cfg.SdtrigSupportedActions[0] == 1'b1) + fire_req_LD.action = riscv::BREAKPOINT; + 4'd1: + if (CVA6Cfg.SdtrigSupportedActions[1] == 1'b1 && CVA6Cfg.DebugEn && !debug_mode_i) + fire_req_LD.action = riscv::DEBUG_TRIGGER; + default: ; + endcase + end + end + end + end + //Load trigger on address + if (CVA6Cfg.SdtrigMcontrol6LoadAddr) begin + if (!trigger_32_tdata1_d[i].mc6_type.select) begin + if (sdtrig_lsu_inputs_valid_i && lsu_load_access) begin + matchLA = std_match(tdata2_d[i], sdtrig_lsu_inputs_vaddr_i, + trigger_32_tdata1_d[i].mc6_type.match); + end + //Load trigger on address fire logic + if (priv_match[i] && matchLA) begin + trigger_32_tdata1_d[i].mc6_type.hit0 = 1'b1; //before + trigger_32_tdata1_d[i].mc6_type.hit1 = 1'b0; + if (CVA6Cfg.SdtrigTriggerChaining) begin + if(!trigger_32_tdata1_d[previous_trigg_i].mc6_type.chain && trigger_32_tdata1_d[i].mc6_type.chain || trigger_chain_vector_d[previous_trigg_i] && trigger_32_tdata1_d[i].mc6_type.chain) + trigger_chain_vector_d[i] = 1'b1; + if(trigger_chain_vector_d[previous_trigg_i] && !trigger_32_tdata1_d[i].mc6_type.chain || !trigger_32_tdata1_d[previous_trigg_i].mc6_type.chain && !trigger_32_tdata1_d[i].mc6_type.chain) begin + fire_req_LA.valid = 1'b1; + unique case (trigger_32_tdata1_d[i].mc6_type.action) + 4'd0: + if (CVA6Cfg.SdtrigSupportedActions[0] == 1'b1) + fire_req_LA.action = riscv::BREAKPOINT; + 4'd1: + if (CVA6Cfg.SdtrigSupportedActions[1] == 1'b1 && CVA6Cfg.DebugEn && !debug_mode_i) + fire_req_LA.action = riscv::DEBUG_TRIGGER; + default: ; + endcase + end + end else begin + fire_req_LA.valid = 1'b1; + unique case (trigger_32_tdata1_d[i].mc6_type.action) + 4'd0: + if (CVA6Cfg.SdtrigSupportedActions[0] == 1'b1) + fire_req_LA.action = riscv::BREAKPOINT; + 4'd1: + if (CVA6Cfg.SdtrigSupportedActions[1] == 1'b1 && CVA6Cfg.DebugEn && !debug_mode_i) + fire_req_LA.action = riscv::DEBUG_TRIGGER; + default: ; + endcase + end + end + end + end + end + end + // etrigger match logic + if (trigger_type_d[i] == 4'd5 && CVA6Cfg.SdtrigEtrigger) begin + case(priv_lvl_i) // trigger will only fire if current priv lvl is same as the trigger configuration + riscv::PRIV_LVL_M: if (trigger_32_tdata1_d[i].etrigger_type.m) priv_match[i] = 1'b1; + riscv::PRIV_LVL_S: if (trigger_32_tdata1_d[i].etrigger_type.s) priv_match[i] = 1'b1; + riscv::PRIV_LVL_U: if (trigger_32_tdata1_d[i].etrigger_type.u) priv_match[i] = 1'b1; + default: priv_match[i] = 1'b0; + endcase + // Context match check (textra), in all modes + if (CVA6Cfg.SdtrigSupportTextra) begin + if (CVA6Cfg.IS_XLEN32) begin + scontext_match[i] = match_scontext32( + scontext_i, + textra32_tdata3_d[i].sselect, + textra32_tdata3_d[i].sbytemask, + textra32_tdata3_d[i].svalue, + 1'b0 + ); + end else begin + scontext_match[i] = match_scontext64( + scontext_i, + textra64_tdata3_d[i].sselect, + textra64_tdata3_d[i].sbytemask, + textra64_tdata3_d[i].svalue, + 1'b1 + ); + end + priv_match[i] &= scontext_match[i]; + end + // Only an exception matches, not an interrupt + if (trap_taken && !ex_i.cause[CVA6Cfg.XLEN-1] && cause_selected( + tdata2_d[i], ex_i.cause + ) && priv_match[i] && !etrigger_context_saved_valid_q) begin + e_matched_d[i] = 1'b1; + end + if (e_matched_q[i] && trigger_32_tdata1_d[i].etrigger_type.action == '0 && !native_allowed) begin + // The trap handler runs where an action=0 trigger cannot fire: drop the match + e_matched_d[i] = 1'b0; + etrigger_context_saved_valid_d = 1'b0; + end else if (e_matched_q[i]) begin + fire_req_Etrigger.valid = 1'b1; + unique case (trigger_32_tdata1_d[i].etrigger_type.action) + 6'd0: + if (CVA6Cfg.SdtrigSupportedActions[0]) fire_req_Etrigger.action = riscv::BREAKPOINT; + 6'd1: + if (CVA6Cfg.SdtrigSupportedActions[1]) + fire_req_Etrigger.action = riscv::DEBUG_TRIGGER; + default: ; + endcase + end + if (e_matched_q[i] && sdtrig_commit_std_exception_valid_q && (ex_i.valid || debug_mode_i)) begin + trigger_32_tdata1_d[i].etrigger_type.hit = 1'b1; + e_matched_d[i] = 1'b0; + fire_req_Etrigger.valid = 1'b0; + end + if (e_matched_d[i] && ex_i.valid) begin + etrigger_context_saved_valid_d = 1'b1; + etrigger_context_mepc_d = mepc_i; + etrigger_context_mcause_d = mcause_i; + etrigger_context_mtval_d = mtval_i; + end + end + // itrigger match logic + if (trigger_type_d[i] == 4'd4 && CVA6Cfg.SdtrigItrigger) begin + case(priv_lvl_i) // trigger will only fire if current priv lvl is same as the trigger configuration + riscv::PRIV_LVL_M: if (trigger_32_tdata1_d[i].itrigger_type.m) priv_match[i] = 1'b1; + riscv::PRIV_LVL_S: if (trigger_32_tdata1_d[i].itrigger_type.s) priv_match[i] = 1'b1; + riscv::PRIV_LVL_U: if (trigger_32_tdata1_d[i].itrigger_type.u) priv_match[i] = 1'b1; + default: priv_match[i] = 1'b0; + endcase + // Context match check (textra), in all modes + if (CVA6Cfg.SdtrigSupportTextra) begin + if (CVA6Cfg.IS_XLEN32) begin + scontext_match[i] = match_scontext32( + scontext_i, + textra32_tdata3_d[i].sselect, + textra32_tdata3_d[i].sbytemask, + textra32_tdata3_d[i].svalue, + 1'b0 + ); + end else begin + scontext_match[i] = match_scontext64( + scontext_i, + textra64_tdata3_d[i].sselect, + textra64_tdata3_d[i].sbytemask, + textra64_tdata3_d[i].svalue, + 1'b1 + ); + end + priv_match[i] &= scontext_match[i]; + end + // Only an interrupt matches, not an exception. Checking etrigger context valid bit avoids + // conflicts and context loss because of concurrent triggering by different types + if (trap_taken && ex_i.cause[CVA6Cfg.XLEN-1] && cause_selected( + tdata2_d[i], ex_i.cause + ) && priv_match[i] && !etrigger_context_saved_valid_q) begin + e_matched_d[i] = 1'b1; + end + // The trigger fires just before the first instruction of the trap handler + if (e_matched_q[i] && trigger_32_tdata1_d[i].itrigger_type.action == '0 && !native_allowed) begin + // The trap handler runs where an action=0 trigger cannot fire: drop the match + e_matched_d[i] = 1'b0; + etrigger_context_saved_valid_d = 1'b0; + end else if (e_matched_q[i]) begin + fire_req_Itrigger.valid = 1'b1; + case (trigger_32_tdata1_d[i].itrigger_type.action) + 6'd0: + if (CVA6Cfg.SdtrigSupportedActions[0]) fire_req_Itrigger.action = riscv::BREAKPOINT; + 6'd1: + if (CVA6Cfg.SdtrigSupportedActions[1]) + fire_req_Itrigger.action = riscv::DEBUG_TRIGGER; + default: ; + endcase + end + if (e_matched_q[i] && sdtrig_commit_std_exception_valid_q && (ex_i.valid || debug_mode_i)) begin + trigger_32_tdata1_d[i].itrigger_type.hit = 1'b1; + e_matched_d[i] = 1'b0; + fire_req_Itrigger.valid = 1'b0; + end + if (e_matched_d[i] && ex_i.valid) begin + etrigger_context_saved_valid_d = 1'b1; + etrigger_context_mepc_d = mepc_i; + etrigger_context_mcause_d = mcause_i; + etrigger_context_mtval_d = mtval_i; + end + end + end + + + //Trigger fire logic + //Priorities : load data > execute address > execute data > load address/store address/store data + if (CVA6Cfg.SdtrigMcontrol6LoadData && fire_req_LD.valid || CVA6Cfg.SdtrigIcount && fire_req_Icount.valid || CVA6Cfg.SdtrigEtrigger && fire_req_Etrigger.valid || CVA6Cfg.SdtrigItrigger && fire_req_Itrigger.valid) begin + if (fire_req_LD.valid) begin + sdtrig_load_stall_o = 1'b1; + sdtrig_load_action_o = fire_req_LD.action; + end + if (fire_req_Icount.valid) begin + sdtrig_commit_icount_valid_d = 1'b1; + sdtrig_commit_action_d = fire_req_Icount.action; + end + if (fire_req_Etrigger.valid) begin + sdtrig_commit_std_exception_valid_d = 1'b1; + sdtrig_commit_action_d = fire_req_Etrigger.action; + end + if (fire_req_Itrigger.valid) begin + sdtrig_commit_std_exception_valid_d = 1'b1; + sdtrig_commit_action_d = fire_req_Itrigger.action; + end + end else if (CVA6Cfg.SdtrigMcontrol6ExecAddr && |fire_req_EA_valid) begin + sdtrig_decoder_action_o = fire_req_EA_action; + end else if (CVA6Cfg.SdtrigMcontrol6ExecData && |fire_req_ED_valid) begin + sdtrig_decoder_action_o = fire_req_ED_action; + end else + + if (CVA6Cfg.SdtrigMcontrol6LoadAddr && fire_req_LA.valid || CVA6Cfg.SdtrigMcontrol6Store && fire_req_SX.valid) begin + if (CVA6Cfg.SdtrigMcontrol6LoadAddr && fire_req_LA.valid && !sdtrig_lsu_inputs_fu_i) begin + sdtrig_load_cancel_d = (sdtrig_load_cancel_q) ? 1'b0 : 1'b1; + if (!sdtrig_load_cancel_q) sdtrig_load_action_d = fire_req_LA.action; + sdtrig_load_action_o = sdtrig_load_cancel_q ? sdtrig_load_action_q : fire_req_LA.action; + end + // The store unit executes lr and the AMOs: it takes the action of a load address match too + if (CVA6Cfg.SdtrigMcontrol6Store && fire_req_SX.valid) begin + sdtrig_store_action_o = fire_req_SX.action; + sdtrig_store_stall_o = 1'b1; + end else if (CVA6Cfg.SdtrigMcontrol6LoadAddr && fire_req_LA.valid && sdtrig_lsu_inputs_fu_i) begin + sdtrig_store_action_o = fire_req_LA.action; + sdtrig_store_stall_o = 1'b1; + end + end + end + + // Trigger module CSRs + if (tselect_we) begin + tselect_d = (tselect_i < CVA6Cfg.SdtrigNrTriggers) ? + tselect_i[$clog2(CVA6Cfg.SdtrigNrTriggers)-1:0] : tselect_q; + end + if (tdata1_we && (!trigger_32_tdata1_q[tselect_q].tdata1_type[27] || debug_mode_i)) begin + if (CVA6Cfg.IS_XLEN32) begin + if (CVA6Cfg.Sdtrig && CVA6Cfg.SdtrigNrTriggers > 0) begin + if( CVA6Cfg.SdtrigIcount && tdata1_i[31:28] == 4'd3 + || CVA6Cfg.SdtrigMcontrol6 && tdata1_i[31:28] == 4'd6 + || CVA6Cfg.SdtrigEtrigger && tdata1_i[31:28] == 4'd5 + || CVA6Cfg.SdtrigItrigger && tdata1_i[31:28] == 4'd4) begin + trigger_type_d[tselect_q] = tdata1_i[31:28]; + end else begin + // Type 0, type 15 and the types that are not supported disable the trigger + trigger_type_d[tselect_q] = 4'd15; + end + if (trigger_type_d[tselect_q] == 4'd15) begin + trigger_32_tdata1_d[tselect_q] = '0; + trigger_32_tdata1_d[tselect_q].tdata1_type[31:27] = { + 4'd15, debug_mode_i && tdata1_i[27] + }; + flush_o = 1'b1; + end else if (CVA6Cfg.SdtrigIcount && trigger_type_d[tselect_q] == 4'd3) begin + trigger_32_tdata1_d[tselect_q].icount_type.t_type = trigger_type_d[tselect_q]; + trigger_32_tdata1_d[tselect_q].icount_type.dmode = debug_mode_i && tdata1_i[27]; + trigger_32_tdata1_d[tselect_q].icount_type.vs = 0; + trigger_32_tdata1_d[tselect_q].icount_type.vu = 0; + trigger_32_tdata1_d[tselect_q].icount_type.hit = tdata1_i[24]; + trigger_32_tdata1_d[tselect_q].icount_type.count = tdata1_i[23:10]; + trigger_32_tdata1_d[tselect_q].icount_type.m = tdata1_i[9]; + trigger_32_tdata1_d[tselect_q].icount_type.pending = tdata1_i[8]; + trigger_32_tdata1_d[tselect_q].icount_type.s = tdata1_i[7]; + trigger_32_tdata1_d[tselect_q].icount_type.u = tdata1_i[6]; + trigger_32_tdata1_d[tselect_q].icount_type.action = + legal_action(tdata1_i[5:0], debug_mode_i && tdata1_i[27]); + flush_o = 1'b1; + end else if (CVA6Cfg.SdtrigMcontrol6 && trigger_type_d[tselect_q] == 4'd6) begin + trigger_32_tdata1_d[tselect_q].mc6_type.t_type = trigger_type_d[tselect_q]; + trigger_32_tdata1_d[tselect_q].mc6_type.dmode = debug_mode_i && tdata1_i[27]; + trigger_32_tdata1_d[tselect_q].mc6_type.uncertain = 0; + trigger_32_tdata1_d[tselect_q].mc6_type.hit1 = tdata1_i[25]; + trigger_32_tdata1_d[tselect_q].mc6_type.vs = 0; + trigger_32_tdata1_d[tselect_q].mc6_type.vu = 0; + trigger_32_tdata1_d[tselect_q].mc6_type.hit0 = tdata1_i[22]; + trigger_32_tdata1_d[tselect_q].mc6_type.select = tdata1_i[21]; + trigger_32_tdata1_d[tselect_q].mc6_type.zeroes = '0; + trigger_32_tdata1_d[tselect_q].mc6_type.size = tdata1_i[18:16]; + trigger_32_tdata1_d[tselect_q].mc6_type.action = + 4'(legal_action(6'(tdata1_i[15:12]), debug_mode_i && tdata1_i[27])); + trigger_32_tdata1_d[tselect_q].mc6_type.chain = tdata1_i[11]; + trigger_32_tdata1_d[tselect_q].mc6_type.match = tdata1_i[10:7]; + trigger_32_tdata1_d[tselect_q].mc6_type.m = tdata1_i[6]; + trigger_32_tdata1_d[tselect_q].mc6_type.uncertainen = 0; + trigger_32_tdata1_d[tselect_q].mc6_type.s = tdata1_i[4]; + trigger_32_tdata1_d[tselect_q].mc6_type.u = tdata1_i[3]; + trigger_32_tdata1_d[tselect_q].mc6_type.execute = tdata1_i[2]; + trigger_32_tdata1_d[tselect_q].mc6_type.store = tdata1_i[1]; + trigger_32_tdata1_d[tselect_q].mc6_type.load = tdata1_i[0]; + flush_o = 1'b1; + end else if (CVA6Cfg.SdtrigEtrigger && trigger_type_d[tselect_q] == 4'd5) begin + trigger_32_tdata1_d[tselect_q].etrigger_type.t_type = trigger_type_d[tselect_q]; + trigger_32_tdata1_d[tselect_q].etrigger_type.dmode = debug_mode_i && tdata1_i[27]; + trigger_32_tdata1_d[tselect_q].etrigger_type.hit = tdata1_i[26]; + trigger_32_tdata1_d[tselect_q].etrigger_type.zeroes = '0; + trigger_32_tdata1_d[tselect_q].etrigger_type.vs = 0; + trigger_32_tdata1_d[tselect_q].etrigger_type.vu = 0; + trigger_32_tdata1_d[tselect_q].etrigger_type.zeroed = 0; + trigger_32_tdata1_d[tselect_q].etrigger_type.m = tdata1_i[9]; + trigger_32_tdata1_d[tselect_q].etrigger_type.zero = 0; + trigger_32_tdata1_d[tselect_q].etrigger_type.s = tdata1_i[7]; + trigger_32_tdata1_d[tselect_q].etrigger_type.u = tdata1_i[6]; + trigger_32_tdata1_d[tselect_q].etrigger_type.action = + legal_action(tdata1_i[5:0], debug_mode_i && tdata1_i[27]); + end else if (CVA6Cfg.SdtrigItrigger && trigger_type_d[tselect_q] == 4'd4) begin + trigger_32_tdata1_d[tselect_q].itrigger_type.t_type = trigger_type_d[tselect_q]; + trigger_32_tdata1_d[tselect_q].itrigger_type.dmode = debug_mode_i && tdata1_i[27]; + trigger_32_tdata1_d[tselect_q].itrigger_type.hit = tdata1_i[26]; + trigger_32_tdata1_d[tselect_q].itrigger_type.zeroed = '0; + trigger_32_tdata1_d[tselect_q].itrigger_type.vs = 0; + trigger_32_tdata1_d[tselect_q].itrigger_type.vu = 0; + trigger_32_tdata1_d[tselect_q].itrigger_type.nmi = 0; + trigger_32_tdata1_d[tselect_q].itrigger_type.m = tdata1_i[9]; + trigger_32_tdata1_d[tselect_q].itrigger_type.zero = 0; + trigger_32_tdata1_d[tselect_q].itrigger_type.s = tdata1_i[7]; + trigger_32_tdata1_d[tselect_q].itrigger_type.u = tdata1_i[6]; + trigger_32_tdata1_d[tselect_q].itrigger_type.action = + legal_action(tdata1_i[5:0], debug_mode_i && tdata1_i[27]); + end + end + end else if (CVA6Cfg.IS_XLEN64) begin + if (CVA6Cfg.SdtrigIcount && tdata1_i[63:60] == 4'd3) begin + trigger_type_d[tselect_q] = tdata1_i[63:60]; + trigger_32_tdata1_d[tselect_q].icount_type.t_type = (tdata1_i[63:60] == 4'd3 || tdata1_i[63:60] == 4'd15) ? tdata1_i[63:60] : trigger_type_q[tselect_q]; + trigger_32_tdata1_d[tselect_q].icount_type.dmode = debug_mode_i && tdata1_i[59]; + trigger_32_tdata1_d[tselect_q].icount_type.vs = 0; + trigger_32_tdata1_d[tselect_q].icount_type.vu = 0; + trigger_32_tdata1_d[tselect_q].icount_type.hit = tdata1_i[24]; + trigger_32_tdata1_d[tselect_q].icount_type.count = tdata1_i[23:10]; + trigger_32_tdata1_d[tselect_q].icount_type.m = tdata1_i[9]; + trigger_32_tdata1_d[tselect_q].icount_type.pending = tdata1_i[8]; + trigger_32_tdata1_d[tselect_q].icount_type.s = tdata1_i[7]; + trigger_32_tdata1_d[tselect_q].icount_type.u = tdata1_i[6]; + trigger_32_tdata1_d[tselect_q].icount_type.action = + legal_action(tdata1_i[5:0], debug_mode_i && tdata1_i[59]); + flush_o = 1'b1; + end else if (CVA6Cfg.SdtrigMcontrol6 && tdata1_i[63:60] == 4'd6) begin + trigger_type_d[tselect_q] = tdata1_i[63:60]; + trigger_32_tdata1_d[tselect_q].mc6_type.t_type = (tdata1_i[63:60] == 4'd6 || tdata1_i[63:60] == 4'd15) ? tdata1_i[63:60] : trigger_type_q[tselect_q]; + trigger_32_tdata1_d[tselect_q].mc6_type.dmode = debug_mode_i && tdata1_i[59]; + trigger_32_tdata1_d[tselect_q].mc6_type.uncertain = 0; + trigger_32_tdata1_d[tselect_q].mc6_type.hit1 = tdata1_i[25]; + trigger_32_tdata1_d[tselect_q].mc6_type.vs = 0; + trigger_32_tdata1_d[tselect_q].mc6_type.vu = 0; + trigger_32_tdata1_d[tselect_q].mc6_type.hit0 = tdata1_i[22]; + trigger_32_tdata1_d[tselect_q].mc6_type.select = tdata1_i[21]; + trigger_32_tdata1_d[tselect_q].mc6_type.zeroes = '0; + trigger_32_tdata1_d[tselect_q].mc6_type.size = tdata1_i[18:16]; + trigger_32_tdata1_d[tselect_q].mc6_type.action = + 4'(legal_action(6'(tdata1_i[15:12]), debug_mode_i && tdata1_i[59])); + trigger_32_tdata1_d[tselect_q].mc6_type.chain = tdata1_i[11]; + trigger_32_tdata1_d[tselect_q].mc6_type.match = tdata1_i[10:7]; + trigger_32_tdata1_d[tselect_q].mc6_type.m = tdata1_i[6]; + trigger_32_tdata1_d[tselect_q].mc6_type.uncertainen = 0; + trigger_32_tdata1_d[tselect_q].mc6_type.s = tdata1_i[4]; + trigger_32_tdata1_d[tselect_q].mc6_type.u = tdata1_i[3]; + trigger_32_tdata1_d[tselect_q].mc6_type.execute = tdata1_i[2]; + trigger_32_tdata1_d[tselect_q].mc6_type.store = tdata1_i[1]; + trigger_32_tdata1_d[tselect_q].mc6_type.load = tdata1_i[0]; + flush_o = 1'b1; + end else if (CVA6Cfg.SdtrigEtrigger && tdata1_i[63:60] == 4'd5) begin + trigger_type_d[tselect_q] = tdata1_i[63:60]; + trigger_32_tdata1_d[tselect_q].etrigger_type.t_type = (tdata1_i[63:60] == 4'd5 || tdata1_i[63:60] == 4'd15) ? tdata1_i[63:60] : trigger_type_q[tselect_q]; + trigger_32_tdata1_d[tselect_q].etrigger_type.dmode = debug_mode_i && tdata1_i[59]; + trigger_32_tdata1_d[tselect_q].etrigger_type.hit = tdata1_i[58]; + trigger_32_tdata1_d[tselect_q].etrigger_type.zeroes = '0; + trigger_32_tdata1_d[tselect_q].etrigger_type.vs = 0; + trigger_32_tdata1_d[tselect_q].etrigger_type.vu = 0; + trigger_32_tdata1_d[tselect_q].etrigger_type.zeroed = 0; + trigger_32_tdata1_d[tselect_q].etrigger_type.m = tdata1_i[9]; + trigger_32_tdata1_d[tselect_q].etrigger_type.zero = 0; + trigger_32_tdata1_d[tselect_q].etrigger_type.s = tdata1_i[7]; + trigger_32_tdata1_d[tselect_q].etrigger_type.u = tdata1_i[6]; + trigger_32_tdata1_d[tselect_q].etrigger_type.action = + legal_action(tdata1_i[5:0], debug_mode_i && tdata1_i[59]); + end else if (CVA6Cfg.SdtrigItrigger && tdata1_i[63:60] == 4'd4) begin + trigger_type_d[tselect_q] = tdata1_i[63:60]; + trigger_32_tdata1_d[tselect_q].itrigger_type.t_type = (tdata1_i[63:60] == 4'd4 || tdata1_i[63:60] == 4'd15) ? tdata1_i[63:60] : trigger_type_q[tselect_q]; + trigger_32_tdata1_d[tselect_q].itrigger_type.dmode = debug_mode_i && tdata1_i[59]; + trigger_32_tdata1_d[tselect_q].itrigger_type.hit = tdata1_i[58]; + trigger_32_tdata1_d[tselect_q].itrigger_type.zeroed = '0; + trigger_32_tdata1_d[tselect_q].itrigger_type.vs = 0; + trigger_32_tdata1_d[tselect_q].itrigger_type.vu = 0; + trigger_32_tdata1_d[tselect_q].itrigger_type.nmi = 0; + trigger_32_tdata1_d[tselect_q].itrigger_type.m = tdata1_i[9]; + trigger_32_tdata1_d[tselect_q].itrigger_type.zero = 0; + trigger_32_tdata1_d[tselect_q].itrigger_type.s = tdata1_i[7]; + trigger_32_tdata1_d[tselect_q].itrigger_type.u = tdata1_i[6]; + trigger_32_tdata1_d[tselect_q].itrigger_type.action = + legal_action(tdata1_i[5:0], debug_mode_i && tdata1_i[59]); + end else begin + // Type 0, type 15 and the types that are not supported disable the trigger + trigger_type_d[tselect_q] = 4'd15; + trigger_32_tdata1_d[tselect_q] = '0; + trigger_32_tdata1_d[tselect_q].tdata1_type[31:27] = {4'd15, debug_mode_i && tdata1_i[59]}; + flush_o = 1'b1; + end + end + end + if (tdata2_we && (!trigger_32_tdata1_q[tselect_q].tdata1_type[27] || debug_mode_i)) begin + tdata2_d[tselect_q] = tdata2_i; + flush_o = 1'b1; + end + if (CVA6Cfg.SdtrigSupportTextra && tdata3_we && (!trigger_32_tdata1_q[tselect_q].tdata1_type[27] || debug_mode_i)) begin + if (CVA6Cfg.IS_XLEN32) begin + textra32_tdata3_d[tselect_q].mhvalue = '0; + textra32_tdata3_d[tselect_q].mhselect = '0; + textra32_tdata3_d[tselect_q].zeroes = '0; + textra32_tdata3_d[tselect_q].sbytemask = tdata3_i[19:18]; + textra32_tdata3_d[tselect_q].svalue = tdata3_i[17:2]; + textra32_tdata3_d[tselect_q].sselect = (tdata3_i[1:0] == 2'd1) ? 2'd1 : 2'd0; + end + if (CVA6Cfg.IS_XLEN64) begin // textra64 + textra64_tdata3_d[tselect_q].mhvalue = '0; + textra64_tdata3_d[tselect_q].mhselect = '0; + textra64_tdata3_d[tselect_q].zeroes = '0; + textra64_tdata3_d[tselect_q].sbytemask = tdata3_i[39:36]; + textra64_tdata3_d[tselect_q].zero_field = '0; + textra64_tdata3_d[tselect_q].svalue = tdata3_i[33:2]; + textra64_tdata3_d[tselect_q].sselect = (tdata3_i[1:0] == 2'd1) ? 2'd1 : 2'd0; + end + end + end + + always_comb begin : read_path + // TSELECT read + tselect_o = {{(CVA6Cfg.XLEN - CVA6Cfg.SdtrigNrTriggers) {1'b0}}, tselect_q}; + + // TDATA1 read (depends on trigger type) + unique case (trigger_type_q[tselect_q]) + 4'd3: + tdata1_o = (CVA6Cfg.IS_XLEN32) ? trigger_32_tdata1_q[tselect_q] : { trigger_32_tdata1_q[tselect_q].icount_type.t_type, trigger_32_tdata1_q[tselect_q].icount_type.dmode, 32'd0, trigger_32_tdata1_q[tselect_q][26:0] }; + 4'd6: + tdata1_o = (CVA6Cfg.IS_XLEN32) ? trigger_32_tdata1_q[tselect_q] : { trigger_32_tdata1_q[tselect_q].mc6_type.t_type, trigger_32_tdata1_q[tselect_q].mc6_type.dmode, 32'd0, trigger_32_tdata1_q[tselect_q][26:0] }; + 4'd5: + tdata1_o = (CVA6Cfg.IS_XLEN32) ? trigger_32_tdata1_q[tselect_q] : { trigger_32_tdata1_q[tselect_q].etrigger_type.t_type, trigger_32_tdata1_q[tselect_q].etrigger_type.dmode, trigger_32_tdata1_q[tselect_q].etrigger_type.hit, 45'd0, trigger_32_tdata1_q[tselect_q][12:0] }; + 4'd4: + tdata1_o = (CVA6Cfg.IS_XLEN32) ? trigger_32_tdata1_q[tselect_q] : { trigger_32_tdata1_q[tselect_q].itrigger_type.t_type, trigger_32_tdata1_q[tselect_q].itrigger_type.dmode, trigger_32_tdata1_q[tselect_q].itrigger_type.hit, 45'd0, trigger_32_tdata1_q[tselect_q][12:0] }; + 4'd15: + tdata1_o = { + 4'd15, trigger_32_tdata1_q[tselect_q].tdata1_type[27], {(CVA6Cfg.XLEN - 5) {1'b0}} + }; + default: tdata1_o = '0; + endcase + + // TDATA2 read + tdata2_o = {{(CVA6Cfg.XLEN - CVA6Cfg.VLEN) {1'b0}}, tdata2_q[tselect_q]}; + + // TDATA3 read + if (CVA6Cfg.SdtrigSupportTextra) + tdata3_o = (CVA6Cfg.IS_XLEN32) ? textra32_tdata3_q[tselect_q] : textra64_tdata3_q[tselect_q]; + end + + + always_ff @(posedge clk_i or negedge rst_ni) begin : state_update + if (~rst_ni) begin + if (CVA6Cfg.Sdtrig) begin + tselect_q <= '0; + e_matched_q <= '0; + sdtrig_commit_std_exception_valid_q <= 0; + sdtrig_commit_icount_valid_o <= 1'b0; + sdtrig_commit_icount_nr_instr_o <= '0; + sdtrig_commit_action_o <= '0; + sdtrig_load_stall_s <= '0; + sdtrig_load_cancel_q <= '0; + sdtrig_load_action_q <= '0; + etrigger_context_saved_valid_q <= 1'b0; + etrigger_context_mepc_q <= '0; + etrigger_context_mcause_q <= '0; + etrigger_context_mtval_q <= '0; + for (int i = 0; i < CVA6Cfg.SdtrigNrTriggers; ++i) begin + trigger_type_q[i] <= 4'd15; + trigger_32_tdata1_q[i] <= {4'd15, 28'd0}; + if (CVA6Cfg.SdtrigTriggerChaining) trigger_chain_vector_q[i] <= '0; + if (CVA6Cfg.SdtrigSupportTextra && CVA6Cfg.IS_XLEN32) textra32_tdata3_q[i] <= '0; + if (CVA6Cfg.SdtrigSupportTextra && CVA6Cfg.IS_XLEN64) textra64_tdata3_q[i] <= '0; + tdata2_q[i] <= '0; + end + end + end else begin + if (CVA6Cfg.Sdtrig) begin + if (CVA6Cfg.SdtrigSupportTextra && CVA6Cfg.IS_XLEN32) + textra32_tdata3_q <= textra32_tdata3_d; + if (CVA6Cfg.SdtrigSupportTextra && CVA6Cfg.IS_XLEN64) + textra64_tdata3_q <= textra64_tdata3_d; + + trigger_type_q <= trigger_type_d; + trigger_32_tdata1_q <= trigger_32_tdata1_d; + tselect_q <= tselect_d; + tdata2_q <= tdata2_d; + sdtrig_commit_icount_valid_o <= sdtrig_commit_icount_valid_d; + sdtrig_commit_icount_nr_instr_o <= sdtrig_commit_icount_nr_instr_d; + sdtrig_commit_action_o <= sdtrig_commit_action_d; + etrigger_context_saved_valid_q <= etrigger_context_saved_valid_d; + etrigger_context_mepc_q <= etrigger_context_mepc_d; + etrigger_context_mcause_q <= etrigger_context_mcause_d; + etrigger_context_mtval_q <= etrigger_context_mtval_d; + sdtrig_commit_std_exception_valid_q <= sdtrig_commit_std_exception_valid_d; + e_matched_q <= e_matched_d; + sdtrig_load_stall_s <= sdtrig_load_stall_o; + sdtrig_load_cancel_q <= sdtrig_load_cancel_d; + sdtrig_load_action_q <= sdtrig_load_action_d; + if (CVA6Cfg.SdtrigTriggerChaining) trigger_chain_vector_q <= trigger_chain_vector_d; + end + end + end + + // Outputs + assign sdtrig_commit_std_exception_valid_o = sdtrig_commit_std_exception_valid_q; + assign etrigger_context_saved_valid_o = etrigger_context_saved_valid_q; + assign etrigger_context_mepc_o = etrigger_context_mepc_q; + assign etrigger_context_mcause_o = etrigger_context_mcause_q; + if (CVA6Cfg.TvalEn) begin + assign etrigger_context_mtval_o = etrigger_context_mtval_q; + end else begin + assign etrigger_context_mtval_o = '0; + end + assign sdtrig_load_cancel_o = sdtrig_load_cancel_q; + +endmodule diff --git a/core/zcmt_decoder.sv b/core/zcmt_decoder.sv index c37c11fda5b..e02f541aea1 100644 --- a/core/zcmt_decoder.sv +++ b/core/zcmt_decoder.sv @@ -80,15 +80,15 @@ module zcmt_decoder #( IDLE: begin fetch_stall_o = 1'b0; if (is_zcmt_instr_i) begin - if (CVA6Cfg.XLEN == 32) begin //It is only target for 32 bit targets in cva6 with No MMU - table_address = {jvt_i.base, 6'b000000} + {24'h0, instr_i[7:2], 2'b00}; + if (CVA6Cfg.IS_XLEN32) begin //It is only target for 32 bit targets in cva6 with No MMU + table_address = {jvt_i.base, 6'b000000} + {22'h0, instr_i[9:2], 2'b00}; req_port_o.address_index = table_address[9:0]; req_port_o.address_tag = table_address[CVA6Cfg.VLEN-1:10]; // No MMU support state_d = TABLE_JUMP; req_port_o.data_req = 1'b1; fetch_stall_o = 1'b1; end else illegal_instr_o = 1'b1; - // Condition may be extented for 64 bits embedded targets with No MMU + // Condition may be extended for 64 bits embedded targets with No MMU end else begin illegal_instr_o = illegal_instr_i; instr_o = instr_i; @@ -97,16 +97,17 @@ module zcmt_decoder #( end TABLE_JUMP: begin if (req_port_i.data_rvalid) begin - // save the PC relative Xlen table jump address - jump_address_o = $unsigned($signed(req_port_i.data_rdata) - $signed(pc_i)); + // Clear bit 0 of the JVT target before converting it to a PC-relative offset. + jump_address_o = + $unsigned($signed({req_port_i.data_rdata[CVA6Cfg.XLEN-1:1], 1'b0}) - $signed(pc_i)); if (instr_i[9:2] < 32) begin // jal pc_offset, x0 for no return stack instr_o = { 20'h0, 5'h0, riscv::OpcodeJal - }; // immidiate assigned here (0) will be overwrite in decode stage with jump_address_o + }; // immediate assigned here (0) will be overwrite in decode stage with jump_address_o end else if ((instr_i[9:2] >= 32) & (instr_i[9:2] <= 255)) begin //- jal pc_offset, x1 for return stack instr_o = { 20'h0, 5'h1, riscv::OpcodeJal - }; // immidiate assigned here (0) will be overwrite in decode stage with jump_address_o + }; // immediate assigned here (0) will be overwrite in decode stage with jump_address_o end else begin illegal_instr_o = 1'b1; instr_o = instr_i; diff --git a/corev_apu/altera/Makefile b/corev_apu/altera/Makefile index f3f8983f755..e118135c758 100644 --- a/corev_apu/altera/Makefile +++ b/corev_apu/altera/Makefile @@ -52,7 +52,8 @@ all: create_project \ write_source_files \ write_timing_constraints \ generate_ips \ - sta + sta \ + rbf clean: $(RM) -rf *.rpt *.chg smart.log *.htm *.eqn *.pin *.sof *.pof db incremental_db *.summary *.smsg *.jdi $(ASSIGNMENT_FILES) @@ -72,9 +73,13 @@ create_project: @touch "$(PROJECT).qsf" $(QSYS_PATH)qsys-script --script=ip/interconnect.tcl $(QSYS_PATH)qsys-generate interconnect.qsys --quartus_project=ip/interconnect --synthesis + $(QSYS_PATH)qsys-script --script=ip/hps_cva6_altera.tcl + $(QSYS_PATH)qsys-generate system.qsys --quartus_project=ip/hps_cva6_altera --synthesis rm -f interconnect/*.v rm -f interconnect/*.vhd rm -f interconnect/synth/*.v + rm -f system/*.v + rm -f system/*.vhd write_settings: @echo "Reading from settings.csv and writing to $(PROJECT).qsf with modifications" @@ -108,6 +113,7 @@ write_search_paths: write_source_files: @find ./interconnect -type f -name "*.v" -o -name "*.sv" -o -name "*.svh" >> $(SOURCES_FILE) + @find ./system -type f -name "*.v" -o -name "*.sv" -o -name "*.svh" >> $(SOURCES_FILE) @echo $(var) @echo >> $(SOURCES_FILE) @echo "Reading from $(SOURCES_FILE) and writing to $(PROJECT).qsf with modifications" @@ -159,12 +165,16 @@ sta: asm @echo "Running Quartus Timing Analysis" $(QUARTUS_PATH)quartus_sta $(PROJECT) --do_report_timing +rbf: sta + @echo "Running Quartus Prime Programming File Generator" + $(QUARTUS_PATH)/quartus_pfg -c output_files/*.sof output_files/cva6-hps.rbf -o hps_path=u-boot-spl-dtb.hex + + clean: @echo "Cleaning project files" rm -f $(PROJECT).qsf $(PROJECT).qpf $(PROJECT).map.rpt $(PROJECT).fit.rpt $(PROJECT).asm.rpt $(PROJECT).sta.rpt rm -f interconnect.qsys* rm -f *.backup - rm -f *.hex rm -f *.txt rm -f *.ip rm -f ip/board.info @@ -191,6 +201,7 @@ clean: rm -rf interconnect rm -rf io_pll rm -rf iobuf + rm -rf system $(QUARTUS_PATH)quartus_ipgenerate --clean $(PROJECT) diff --git a/corev_apu/altera/io_standard_constraints.csv b/corev_apu/altera/io_standard_constraints.csv index e4fbc9e30e1..9ac64b8fcc4 100644 --- a/corev_apu/altera/io_standard_constraints.csv +++ b/corev_apu/altera/io_standard_constraints.csv @@ -5,3 +5,71 @@ IO_STANDARD "1.2 V" -to led[3] -entity cva6_altera IO_STANDARD "1.2 V" -to led[2] -entity cva6_altera IO_STANDARD "1.2 V" -to led[1] -entity cva6_altera IO_STANDARD "1.2 V" -to led[0] -entity cva6_altera +IO_STANDARD "1.8-V" -to hps_emac0_MDC -entity ghrd +IO_STANDARD "1.8-V" -to hps_emac0_MDIO -entity ghrd +IO_STANDARD "1.8-V" -to hps_emac0_RXD0 -entity ghrd +IO_STANDARD "1.8-V" -to hps_emac0_RXD1 -entity ghrd +IO_STANDARD "1.8-V" -to hps_emac0_RXD2 -entity ghrd +IO_STANDARD "1.8-V" -to hps_emac0_RXD3 -entity ghrd +IO_STANDARD "1.8-V" -to hps_emac0_RX_CLK -entity ghrd +IO_STANDARD "1.8-V" -to hps_emac0_RX_CTL -entity ghrd +IO_STANDARD "1.8-V" -to hps_emac0_TXD0 -entity ghrd +IO_STANDARD "1.8-V" -to hps_emac0_TXD1 -entity ghrd +IO_STANDARD "1.8-V" -to hps_emac0_TXD2 -entity ghrd +IO_STANDARD "1.8-V" -to hps_emac0_TXD3 -entity ghrd +IO_STANDARD "1.8-V" -to hps_emac0_TX_CLK -entity ghrd +IO_STANDARD "1.8-V" -to hps_emac0_TX_CTL -entity ghrd +IO_STANDARD "1.8-V" -to hps_i2c1_SCL -entity ghrd +IO_STANDARD "1.8-V" -to hps_i2c1_SDA -entity ghrd +IO_STANDARD "1.8-V" -to hps_jtag_tck -entity ghrd +IO_STANDARD "1.8-V" -to hps_jtag_tdo -entity ghrd +IO_STANDARD "1.8-V" -to hps_ref_clk -entity ghrd +IO_STANDARD "1.8 V" -to hps_sdmmc_CMD -entity ghrd +IO_STANDARD "1.8 V" -to hps_sdmmc_CCLK -entity ghrd +IO_STANDARD "1.8 V" -to hps_sdmmc_D0 -entity ghrd +IO_STANDARD "1.8 V" -to hps_sdmmc_D1 -entity ghrd +IO_STANDARD "1.8 V" -to hps_sdmmc_D2 -entity ghrd +IO_STANDARD "1.8 V" -to hps_sdmmc_D3 -entity ghrd +IO_STANDARD "1.8 V" -to hps_uart0_TX -entity ghrd +IO_STANDARD "1.8 V" -to hps_uart0_RX -entity ghrd +IO_STANDARD "TRUE DIFFERENTIAL SIGNALING" -to fpga_clk_100 -entity ghrd +CURRENT_STRENGTH_NEW 4MA -to hps_emac0_MDC -entity ghrd +CURRENT_STRENGTH_NEW 4MA -to hps_emac0_MDIO -entity ghrd +AUTO_OPEN_DRAIN_PINS ON -to hps_emac0_MDIO -entity ghrd +WEAK_PULL_UP_RESISTOR ON -to hps_emac0_MDIO -entity ghrd +WEAK_PULL_UP_RESISTOR ON -to hps_emac0_RXD0 -entity ghrd +WEAK_PULL_UP_RESISTOR ON -to hps_emac0_RXD1 -entity ghrd +WEAK_PULL_UP_RESISTOR ON -to hps_emac0_RXD2 -entity ghrd +WEAK_PULL_UP_RESISTOR ON -to hps_emac0_RXD3 -entity ghrd +WEAK_PULL_UP_RESISTOR ON -to hps_emac0_RX_CLK -entity ghrd +WEAK_PULL_UP_RESISTOR ON -to hps_emac0_RX_CTL -entity ghrd +CURRENT_STRENGTH_NEW 8MA -to hps_emac0_TXD0 -entity ghrd +CURRENT_STRENGTH_NEW 8MA -to hps_emac0_TXD1 -entity ghrd +CURRENT_STRENGTH_NEW 8MA -to hps_emac0_TXD2 -entity ghrd +CURRENT_STRENGTH_NEW 8MA -to hps_emac0_TXD3 -entity ghrd +CURRENT_STRENGTH_NEW 8MA -to hps_emac0_TX_CLK -entity ghrd +CURRENT_STRENGTH_NEW 8MA -to hps_emac0_TX_CTL -entity ghrd +CURRENT_STRENGTH_NEW 4MA -to hps_i2c1_SCL -entity ghrd +AUTO_OPEN_DRAIN_PINS ON -to hps_i2c1_SCL -entity ghrd +WEAK_PULL_UP_RESISTOR ON -to hps_i2c1_SCL -entity ghrd +CURRENT_STRENGTH_NEW 4MA -to hps_i2c1_SDA -entity ghrd +AUTO_OPEN_DRAIN_PINS ON -to hps_i2c1_SDA -entity ghrd +WEAK_PULL_UP_RESISTOR ON -to hps_i2c1_SDA -entity ghrd +WEAK_PULL_UP_RESISTOR ON -to hps_jtag_tck -entity ghrd +IO_STANDARD "1.8-V" -to hps_jtag_tdi -entity ghrd +WEAK_PULL_UP_RESISTOR ON -to hps_jtag_tdi -entity ghrd +CURRENT_STRENGTH_NEW 4MA -to hps_jtag_tdo -entity ghrd +WEAK_PULL_UP_RESISTOR ON -to hps_jtag_tms -entity ghrd +CURRENT_STRENGTH_NEW 8MA -to hps_sdmmc_CMD -entity ghrd +CURRENT_STRENGTH_NEW 8MA -to hps_sdmmc_CCLK -entity ghrd +WEAK_PULL_UP_RESISTOR ON -to hps_sdmmc_CMD -entity ghrd +CURRENT_STRENGTH_NEW 8MA -to hps_sdmmc_D0 -entity ghrd +WEAK_PULL_UP_RESISTOR ON -to hps_sdmmc_D0 -entity ghrd +CURRENT_STRENGTH_NEW 8MA -to hps_sdmmc_D1 -entity ghrd +WEAK_PULL_UP_RESISTOR ON -to hps_sdmmc_D1 -entity ghrd +CURRENT_STRENGTH_NEW 8MA -to hps_sdmmc_D2 -entity ghrd +WEAK_PULL_UP_RESISTOR ON -to hps_sdmmc_D2 -entity ghrd +CURRENT_STRENGTH_NEW 8MA -to hps_sdmmc_D3 -entity ghrd +WEAK_PULL_UP_RESISTOR ON -to hps_sdmmc_D3 -entity ghrd +CURRENT_STRENGTH_NEW 4MA -to hps_uart0_TX -entity ghrd +WEAK_PULL_UP_RESISTOR ON -to hps_uart0_RX -entity ghrd \ No newline at end of file diff --git a/corev_apu/altera/ip/emif_cal.tcl b/corev_apu/altera/ip/emif_cal.tcl index 97f7a6f4265..055eb919395 100644 --- a/corev_apu/altera/ip/emif_cal.tcl +++ b/corev_apu/altera/ip/emif_cal.tcl @@ -24,7 +24,7 @@ proc do_create_emif_cal {} { set_instance_parameter_value emif_cal_0 {DIAG_SIM_VERBOSE} {0} set_instance_parameter_value emif_cal_0 {DIAG_SYNTH_FOR_SIM} {0} set_instance_parameter_value emif_cal_0 {ENABLE_DDRT} {0} - set_instance_parameter_value emif_cal_0 {NUM_CALBUS_INTERFACE} {1} + set_instance_parameter_value emif_cal_0 {NUM_CALBUS_INTERFACE} {2} set_instance_parameter_value emif_cal_0 {PHY_DDRT_EXPORT_CLK_STP_IF} {0} set_instance_parameter_value emif_cal_0 {SHORT_QSYS_INTERFACE_NAMES} {1} set_instance_property emif_cal_0 AUTO_EXPORT true diff --git a/corev_apu/altera/ip/hps_cva6_altera.tcl b/corev_apu/altera/ip/hps_cva6_altera.tcl new file mode 100644 index 00000000000..7e667be3647 --- /dev/null +++ b/corev_apu/altera/ip/hps_cva6_altera.tcl @@ -0,0 +1,2542 @@ +package require -exact qsys 24.1 + +# create the system "system" +proc do_create_system {} { + # create the system + create_system system + set_project_property BOARD {default} + set_project_property DEVICE {AGFB014R24B2E2V} + set_project_property DEVICE_FAMILY {Agilex 7} + set_project_property HIDE_FROM_IP_CATALOG {false} + set_use_testbench_naming_pattern 0 {} + + # add HDL parameters + + # add the components + add_component hps ip/system/hps.ip intel_agilex_hps hps 24.0.0 + load_component hps + set_component_parameter_value CLK_MAIN_PLL_SOURCE2 {0} + set_component_parameter_value CLK_PERI_PLL_SOURCE2 {0} + set_component_parameter_value CM_Mode {N/A} + set_component_parameter_value CM_PinMuxing {Unused} + set_component_parameter_value CONFIG_HPS_DIV_GPIO {1} + set_component_parameter_value CTI_Enable {0} + set_component_parameter_value CUSTOM_MPU_CLK {800.0} + set_component_parameter_value DDR_ATB_Enable {0} + set_component_parameter_value DEBUG_APB_Enable {0} + set_component_parameter_value DISABLE_PERI_PLL {0} + set_component_parameter_value DMA_Enable {No No No No No No No No} + set_component_parameter_value EMAC0_CLK {250} + set_component_parameter_value EMAC0_Mode {RGMII_with_MDIO} + set_component_parameter_value EMAC0_PTP {0} + set_component_parameter_value EMAC0_PinMuxing {IO} + set_component_parameter_value EMAC0_SWITCH_Enable {0} + set_component_parameter_value EMAC1_CLK {250} + set_component_parameter_value EMAC1_Mode {N/A} + set_component_parameter_value EMAC1_PTP {0} + set_component_parameter_value EMAC1_PinMuxing {Unused} + set_component_parameter_value EMAC1_SWITCH_Enable {0} + set_component_parameter_value EMAC2_CLK {250} + set_component_parameter_value EMAC2_Mode {N/A} + set_component_parameter_value EMAC2_PTP {0} + set_component_parameter_value EMAC2_PinMuxing {Unused} + set_component_parameter_value EMAC2_SWITCH_Enable {0} + set_component_parameter_value EMAC_PTP_REF_CLK {100} + set_component_parameter_value EMIF_CONDUIT_Enable {1} + set_component_parameter_value EMIF_DDR_WIDTH {64} + set_component_parameter_value F2H_FREE_CLK_Enable {0} + set_component_parameter_value F2H_FREE_CLK_FREQ {200} + set_component_parameter_value F2SINTERRUPT_Enable {0} + set_component_parameter_value F2S_ADDRESS_WIDTH {32} + set_component_parameter_value F2S_Route_config {2} + set_component_parameter_value F2S_Width {3} + set_component_parameter_value F2S_mode {1} + set_component_parameter_value FPGA_PERIPHERAL_OUTPUT_CLOCK_FREQ_EMAC0_GTX_CLK {125} + set_component_parameter_value FPGA_PERIPHERAL_OUTPUT_CLOCK_FREQ_EMAC0_MD_CLK {2.5} + set_component_parameter_value FPGA_PERIPHERAL_OUTPUT_CLOCK_FREQ_EMAC1_GTX_CLK {125} + set_component_parameter_value FPGA_PERIPHERAL_OUTPUT_CLOCK_FREQ_EMAC1_MD_CLK {2.5} + set_component_parameter_value FPGA_PERIPHERAL_OUTPUT_CLOCK_FREQ_EMAC2_GTX_CLK {125} + set_component_parameter_value FPGA_PERIPHERAL_OUTPUT_CLOCK_FREQ_EMAC2_MD_CLK {2.5} + set_component_parameter_value FPGA_PERIPHERAL_OUTPUT_CLOCK_FREQ_I2C0_CLK {125} + set_component_parameter_value FPGA_PERIPHERAL_OUTPUT_CLOCK_FREQ_I2C1_CLK {125} + set_component_parameter_value FPGA_PERIPHERAL_OUTPUT_CLOCK_FREQ_I2CEMAC0_CLK {125} + set_component_parameter_value FPGA_PERIPHERAL_OUTPUT_CLOCK_FREQ_I2CEMAC1_CLK {125} + set_component_parameter_value FPGA_PERIPHERAL_OUTPUT_CLOCK_FREQ_I2CEMAC2_CLK {125} + set_component_parameter_value FPGA_PERIPHERAL_OUTPUT_CLOCK_FREQ_SDMMC_CCLK {125} + set_component_parameter_value FPGA_PERIPHERAL_OUTPUT_CLOCK_FREQ_SPIM0_SCLK_OUT {125} + set_component_parameter_value FPGA_PERIPHERAL_OUTPUT_CLOCK_FREQ_SPIM1_SCLK_OUT {125} + set_component_parameter_value FP_EMIF_CONDUIT_Enable {1} + set_component_parameter_value FP_F2S_Width {0} + set_component_parameter_value GP_Enable {0} + set_component_parameter_value H2F_COLD_RST_Enable {0} + set_component_parameter_value H2F_PENDING_RST_Enable {0} + set_component_parameter_value H2F_USER0_CLK_Enable {0} + set_component_parameter_value H2F_USER0_CLK_FREQ {500} + set_component_parameter_value H2F_USER1_CLK_Enable {0} + set_component_parameter_value H2F_USER1_CLK_FREQ {500} + set_component_parameter_value HNOC_Interface_Mode {0} + set_component_parameter_value HPS_DIV_GPIO_FREQ2 {100} + set_component_parameter_value HPS_IOA_10_open_drain_en {0} + set_component_parameter_value HPS_IOA_11_open_drain_en {0} + set_component_parameter_value HPS_IOA_12_open_drain_en {0} + set_component_parameter_value HPS_IOA_13_open_drain_en {0} + set_component_parameter_value HPS_IOA_14_open_drain_en {0} + set_component_parameter_value HPS_IOA_15_open_drain_en {0} + set_component_parameter_value HPS_IOA_16_open_drain_en {0} + set_component_parameter_value HPS_IOA_17_open_drain_en {0} + set_component_parameter_value HPS_IOA_18_open_drain_en {0} + set_component_parameter_value HPS_IOA_19_open_drain_en {0} + set_component_parameter_value HPS_IOA_1_open_drain_en {0} + set_component_parameter_value HPS_IOA_20_open_drain_en {0} + set_component_parameter_value HPS_IOA_21_open_drain_en {0} + set_component_parameter_value HPS_IOA_22_open_drain_en {0} + set_component_parameter_value HPS_IOA_23_open_drain_en {0} + set_component_parameter_value HPS_IOA_24_open_drain_en {0} + set_component_parameter_value HPS_IOA_2_open_drain_en {0} + set_component_parameter_value HPS_IOA_3_open_drain_en {0} + set_component_parameter_value HPS_IOA_4_open_drain_en {0} + set_component_parameter_value HPS_IOA_5_open_drain_en {0} + set_component_parameter_value HPS_IOA_6_open_drain_en {0} + set_component_parameter_value HPS_IOA_7_open_drain_en {0} + set_component_parameter_value HPS_IOA_8_open_drain_en {0} + set_component_parameter_value HPS_IOA_9_open_drain_en {0} + set_component_parameter_value HPS_IOB_10_open_drain_en {0} + set_component_parameter_value HPS_IOB_11_open_drain_en {0} + set_component_parameter_value HPS_IOB_12_open_drain_en {0} + set_component_parameter_value HPS_IOB_13_open_drain_en {0} + set_component_parameter_value HPS_IOB_14_open_drain_en {0} + set_component_parameter_value HPS_IOB_15_open_drain_en {0} + set_component_parameter_value HPS_IOB_16_open_drain_en {0} + set_component_parameter_value HPS_IOB_17_open_drain_en {0} + set_component_parameter_value HPS_IOB_18_open_drain_en {0} + set_component_parameter_value HPS_IOB_19_open_drain_en {0} + set_component_parameter_value HPS_IOB_1_open_drain_en {0} + set_component_parameter_value HPS_IOB_20_open_drain_en {0} + set_component_parameter_value HPS_IOB_21_open_drain_en {0} + set_component_parameter_value HPS_IOB_22_open_drain_en {0} + set_component_parameter_value HPS_IOB_23_open_drain_en {0} + set_component_parameter_value HPS_IOB_24_open_drain_en {0} + set_component_parameter_value HPS_IOB_2_open_drain_en {0} + set_component_parameter_value HPS_IOB_3_open_drain_en {0} + set_component_parameter_value HPS_IOB_4_open_drain_en {0} + set_component_parameter_value HPS_IOB_5_open_drain_en {0} + set_component_parameter_value HPS_IOB_6_open_drain_en {0} + set_component_parameter_value HPS_IOB_7_open_drain_en {0} + set_component_parameter_value HPS_IOB_8_open_drain_en {0} + set_component_parameter_value HPS_IOB_9_open_drain_en {0} + set_component_parameter_value HPS_IO_Enable {NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE EMAC0:TX_CLK EMAC0:TX_CTL EMAC0:RX_CLK EMAC0:RX_CTL EMAC0:TXD0 EMAC0:TXD1 EMAC0:RXD0 EMAC0:RXD1 EMAC0:TXD2 EMAC0:TXD3 EMAC0:RXD2 EMAC0:RXD3 GPIO NONE UART0:TX UART0:RX NONE NONE I2C1:SDA I2C1:SCL JTAG:TCK JTAG:TMS JTAG:TDO JTAG:TDI SDMMC:D0 SDMMC:CMD SDMMC:CCLK SDMMC:D1 SDMMC:D2 SDMMC:D3 HPS_OSC_CLK NONE NONE NONE MDIO0:MDIO MDIO0:MDC} + set_component_parameter_value I2C0_Mode {N/A} + set_component_parameter_value I2C0_PinMuxing {Unused} + set_component_parameter_value I2C1_Mode {default} + set_component_parameter_value I2C1_PinMuxing {IO} + set_component_parameter_value I2CEMAC0_Mode {N/A} + set_component_parameter_value I2CEMAC0_PinMuxing {Unused} + set_component_parameter_value I2CEMAC1_Mode {N/A} + set_component_parameter_value I2CEMAC1_PinMuxing {Unused} + set_component_parameter_value I2CEMAC2_Mode {N/A} + set_component_parameter_value I2CEMAC2_PinMuxing {Unused} + set_component_parameter_value INTERNAL_OSCILLATOR_ENABLE {60} + set_component_parameter_value IO_INPUT_DELAY0 {0} + set_component_parameter_value IO_INPUT_DELAY1 {0} + set_component_parameter_value IO_INPUT_DELAY10 {0} + set_component_parameter_value IO_INPUT_DELAY11 {0} + set_component_parameter_value IO_INPUT_DELAY12 {0} + set_component_parameter_value IO_INPUT_DELAY13 {0} + set_component_parameter_value IO_INPUT_DELAY14 {0} + set_component_parameter_value IO_INPUT_DELAY15 {0} + set_component_parameter_value IO_INPUT_DELAY16 {0} + set_component_parameter_value IO_INPUT_DELAY17 {0} + set_component_parameter_value IO_INPUT_DELAY18 {0} + set_component_parameter_value IO_INPUT_DELAY19 {0} + set_component_parameter_value IO_INPUT_DELAY2 {0} + set_component_parameter_value IO_INPUT_DELAY20 {0} + set_component_parameter_value IO_INPUT_DELAY21 {0} + set_component_parameter_value IO_INPUT_DELAY22 {0} + set_component_parameter_value IO_INPUT_DELAY23 {0} + set_component_parameter_value IO_INPUT_DELAY24 {0} + set_component_parameter_value IO_INPUT_DELAY25 {0} + set_component_parameter_value IO_INPUT_DELAY26 {0} + set_component_parameter_value IO_INPUT_DELAY27 {0} + set_component_parameter_value IO_INPUT_DELAY28 {0} + set_component_parameter_value IO_INPUT_DELAY29 {0} + set_component_parameter_value IO_INPUT_DELAY3 {0} + set_component_parameter_value IO_INPUT_DELAY30 {0} + set_component_parameter_value IO_INPUT_DELAY31 {0} + set_component_parameter_value IO_INPUT_DELAY32 {0} + set_component_parameter_value IO_INPUT_DELAY33 {0} + set_component_parameter_value IO_INPUT_DELAY34 {0} + set_component_parameter_value IO_INPUT_DELAY35 {0} + set_component_parameter_value IO_INPUT_DELAY36 {0} + set_component_parameter_value IO_INPUT_DELAY37 {0} + set_component_parameter_value IO_INPUT_DELAY38 {0} + set_component_parameter_value IO_INPUT_DELAY39 {0} + set_component_parameter_value IO_INPUT_DELAY4 {0} + set_component_parameter_value IO_INPUT_DELAY40 {0} + set_component_parameter_value IO_INPUT_DELAY41 {0} + set_component_parameter_value IO_INPUT_DELAY42 {0} + set_component_parameter_value IO_INPUT_DELAY43 {0} + set_component_parameter_value IO_INPUT_DELAY44 {0} + set_component_parameter_value IO_INPUT_DELAY45 {0} + set_component_parameter_value IO_INPUT_DELAY46 {0} + set_component_parameter_value IO_INPUT_DELAY47 {0} + set_component_parameter_value IO_INPUT_DELAY5 {0} + set_component_parameter_value IO_INPUT_DELAY6 {0} + set_component_parameter_value IO_INPUT_DELAY7 {0} + set_component_parameter_value IO_INPUT_DELAY8 {0} + set_component_parameter_value IO_INPUT_DELAY9 {0} + set_component_parameter_value IO_OUTPUT_DELAY0 {0} + set_component_parameter_value IO_OUTPUT_DELAY1 {0} + set_component_parameter_value IO_OUTPUT_DELAY10 {0} + set_component_parameter_value IO_OUTPUT_DELAY11 {0} + set_component_parameter_value IO_OUTPUT_DELAY12 {0} + set_component_parameter_value IO_OUTPUT_DELAY13 {0} + set_component_parameter_value IO_OUTPUT_DELAY14 {0} + set_component_parameter_value IO_OUTPUT_DELAY15 {0} + set_component_parameter_value IO_OUTPUT_DELAY16 {0} + set_component_parameter_value IO_OUTPUT_DELAY17 {0} + set_component_parameter_value IO_OUTPUT_DELAY18 {0} + set_component_parameter_value IO_OUTPUT_DELAY19 {0} + set_component_parameter_value IO_OUTPUT_DELAY2 {0} + set_component_parameter_value IO_OUTPUT_DELAY20 {0} + set_component_parameter_value IO_OUTPUT_DELAY21 {0} + set_component_parameter_value IO_OUTPUT_DELAY22 {0} + set_component_parameter_value IO_OUTPUT_DELAY23 {0} + set_component_parameter_value IO_OUTPUT_DELAY24 {0} + set_component_parameter_value IO_OUTPUT_DELAY25 {0} + set_component_parameter_value IO_OUTPUT_DELAY26 {0} + set_component_parameter_value IO_OUTPUT_DELAY27 {0} + set_component_parameter_value IO_OUTPUT_DELAY28 {0} + set_component_parameter_value IO_OUTPUT_DELAY29 {0} + set_component_parameter_value IO_OUTPUT_DELAY3 {0} + set_component_parameter_value IO_OUTPUT_DELAY30 {0} + set_component_parameter_value IO_OUTPUT_DELAY31 {0} + set_component_parameter_value IO_OUTPUT_DELAY32 {0} + set_component_parameter_value IO_OUTPUT_DELAY33 {0} + set_component_parameter_value IO_OUTPUT_DELAY34 {0} + set_component_parameter_value IO_OUTPUT_DELAY35 {0} + set_component_parameter_value IO_OUTPUT_DELAY36 {0} + set_component_parameter_value IO_OUTPUT_DELAY37 {0} + set_component_parameter_value IO_OUTPUT_DELAY38 {0} + set_component_parameter_value IO_OUTPUT_DELAY39 {0} + set_component_parameter_value IO_OUTPUT_DELAY4 {0} + set_component_parameter_value IO_OUTPUT_DELAY40 {0} + set_component_parameter_value IO_OUTPUT_DELAY41 {0} + set_component_parameter_value IO_OUTPUT_DELAY42 {0} + set_component_parameter_value IO_OUTPUT_DELAY43 {0} + set_component_parameter_value IO_OUTPUT_DELAY44 {0} + set_component_parameter_value IO_OUTPUT_DELAY45 {0} + set_component_parameter_value IO_OUTPUT_DELAY46 {0} + set_component_parameter_value IO_OUTPUT_DELAY47 {0} + set_component_parameter_value IO_OUTPUT_DELAY5 {0} + set_component_parameter_value IO_OUTPUT_DELAY6 {0} + set_component_parameter_value IO_OUTPUT_DELAY7 {0} + set_component_parameter_value IO_OUTPUT_DELAY8 {0} + set_component_parameter_value IO_OUTPUT_DELAY9 {0} + set_component_parameter_value IPXACT_Enable {0} + set_component_parameter_value L3_MAIN_FREE_CLK {400} + set_component_parameter_value L4_SYS_FREE_CLK {2} + set_component_parameter_value LWH2F_ADDRESS_WIDTH {21} + set_component_parameter_value LWH2F_Enable {1} + set_component_parameter_value MAINPLL_FDIV_EN {0} + set_component_parameter_value MANUAL_CLK_EMACA_SOURCE {0} + set_component_parameter_value MANUAL_CLK_EMACB_SOURCE {1} + set_component_parameter_value MANUAL_CLK_EMAC_PTP_SOURCE {1} + set_component_parameter_value MANUAL_CLK_GPIO_SOURCE {1} + set_component_parameter_value MANUAL_CLK_MPU_SOURCE {0} + set_component_parameter_value MANUAL_CLK_NOC_SOURCE {1} + set_component_parameter_value MANUAL_CLK_PSI_SOURCE {0} + set_component_parameter_value MANUAL_CLK_S2F_USER0_SOURCE {0} + set_component_parameter_value MANUAL_CLK_S2F_USER1_SOURCE {0} + set_component_parameter_value MANUAL_CLK_SDMMC_SOURCE {1} + set_component_parameter_value MANUAL_CLK_SRC_EN {0} + set_component_parameter_value MANUAL_MAINPLL_C0 {1000.0} + set_component_parameter_value MANUAL_MAINPLL_C2 {500.0} + set_component_parameter_value MANUAL_MAINPLL_C3 {200.0} + set_component_parameter_value MANUAL_MAINPLL_CFREQ_EN {0} + set_component_parameter_value MANUAL_PERPLL_C0 {1200.0} + set_component_parameter_value MANUAL_PERPLL_C2 {480.0} + set_component_parameter_value MANUAL_PERPLL_C3 {200.0} + set_component_parameter_value MANUAL_PERPLL_CFREQ_EN {0} + set_component_parameter_value MPU_EVENTS_Enable {1} + set_component_parameter_value Mem_Interleave_Enable {0} + set_component_parameter_value NAND_Mode {N/A} + set_component_parameter_value NAND_PinMuxing {Unused} + set_component_parameter_value NOCDIV_CS_ATCLK {0} + set_component_parameter_value NOCDIV_CS_PDBGCLK {2} + set_component_parameter_value NOCDIV_CS_TRACECLK {0} + set_component_parameter_value NOCDIV_L4MAINCLK {0} + set_component_parameter_value NOCDIV_L4MPCLK {1} + set_component_parameter_value NOCDIV_L4SPCLK {2} + set_component_parameter_value OVERIDE_PERI_PLL {0} + set_component_parameter_value PERI_PLL_MANUAL_VCO_FREQ {2000} + set_component_parameter_value PERPLL_FDIV_EN {0} + set_component_parameter_value PLL_CLK0 {Unused} + set_component_parameter_value PLL_CLK1 {Unused} + set_component_parameter_value PLL_CLK2 {Unused} + set_component_parameter_value PLL_CLK3 {Unused} + set_component_parameter_value PLL_CLK4 {Unused} + set_component_parameter_value PSI_CLK_FREQ {500} + set_component_parameter_value RUN_INTERNAL_BUILD_CHECKS {0} + set_component_parameter_value S2FINTERRUPT_CLOCKPERIPHERAL_Enable {0} + set_component_parameter_value S2FINTERRUPT_DMA_Enable {0} + set_component_parameter_value S2FINTERRUPT_EMAC0_Enable {0} + set_component_parameter_value S2FINTERRUPT_EMAC1_Enable {0} + set_component_parameter_value S2FINTERRUPT_EMAC2_Enable {0} + set_component_parameter_value S2FINTERRUPT_GPIO_Enable {0} + set_component_parameter_value S2FINTERRUPT_I2C0_Enable {0} + set_component_parameter_value S2FINTERRUPT_I2C1_Enable {0} + set_component_parameter_value S2FINTERRUPT_I2CEMAC0_Enable {0} + set_component_parameter_value S2FINTERRUPT_I2CEMAC1_Enable {0} + set_component_parameter_value S2FINTERRUPT_I2CEMAC2_Enable {0} + set_component_parameter_value S2FINTERRUPT_L4TIMER_Enable {0} + set_component_parameter_value S2FINTERRUPT_NAND_Enable {0} + set_component_parameter_value S2FINTERRUPT_SDMMC_Enable {1} + set_component_parameter_value S2FINTERRUPT_SPIM0_Enable {0} + set_component_parameter_value S2FINTERRUPT_SPIM1_Enable {0} + set_component_parameter_value S2FINTERRUPT_SPIS0_Enable {0} + set_component_parameter_value S2FINTERRUPT_SPIS1_Enable {0} + set_component_parameter_value S2FINTERRUPT_SYSTEMMANAGER_Enable {0} + set_component_parameter_value S2FINTERRUPT_SYSTIMER_Enable {0} + set_component_parameter_value S2FINTERRUPT_UART0_Enable {0} + set_component_parameter_value S2FINTERRUPT_UART1_Enable {0} + set_component_parameter_value S2FINTERRUPT_USB0_Enable {0} + set_component_parameter_value S2FINTERRUPT_USB1_Enable {0} + set_component_parameter_value S2FINTERRUPT_WATCHDOG_Enable {0} + set_component_parameter_value S2F_ADDRESS_WIDTH {32} + set_component_parameter_value S2F_Width {2} + set_component_parameter_value SDMMC_Mode {4-bit} + set_component_parameter_value SDMMC_PinMuxing {IO} + set_component_parameter_value SDMMC_REF_CLK {200} + set_component_parameter_value SMMU_rsb_sid_const {0} + set_component_parameter_value SMMU_rsb_ssd_const {0} + set_component_parameter_value SMMU_sid_config {0} + set_component_parameter_value SMMU_ssd_config {0} + set_component_parameter_value SMMU_wsb_sid_const {0} + set_component_parameter_value SMMU_wsb_ssd_const {0} + set_component_parameter_value SPIM0_Mode {N/A} + set_component_parameter_value SPIM0_PinMuxing {Unused} + set_component_parameter_value SPIM1_Mode {N/A} + set_component_parameter_value SPIM1_PinMuxing {Unused} + set_component_parameter_value SPIS0_Mode {N/A} + set_component_parameter_value SPIS0_PinMuxing {Unused} + set_component_parameter_value SPIS1_Mode {N/A} + set_component_parameter_value SPIS1_PinMuxing {Unused} + set_component_parameter_value STM_Enable {0} + set_component_parameter_value TESTIOCTRL_DEBUGCLKSEL {16} + set_component_parameter_value TESTIOCTRL_MAINCLKSEL {8} + set_component_parameter_value TESTIOCTRL_PERICLKSEL {8} + set_component_parameter_value TEST_Enable {0} + set_component_parameter_value TPIU_Select {HPS Clock Manager} + set_component_parameter_value TRACE_Mode {N/A} + set_component_parameter_value TRACE_PinMuxing {Unused} + set_component_parameter_value UART0_Mode {No_flow_control} + set_component_parameter_value UART0_PinMuxing {IO} + set_component_parameter_value UART1_Mode {N/A} + set_component_parameter_value UART1_PinMuxing {Unused} + set_component_parameter_value USB0_Mode {N/A} + set_component_parameter_value USB0_PinMuxing {Unused} + set_component_parameter_value USB1_Mode {N/A} + set_component_parameter_value USB1_PinMuxing {Unused} + set_component_parameter_value USE_DEFAULT_MPU_CLK {0} + set_component_parameter_value W_RESET_ACTION {0} + set_component_parameter_value eosc1_clk_mhz {25.0} + set_component_parameter_value watchdog_reset {0} + set_component_project_property HIDE_FROM_IP_CATALOG {false} + save_component + load_instantiation hps + remove_instantiation_interfaces_and_ports + add_instantiation_interface h2f_mpu_events conduit INPUT + set_instantiation_interface_parameter_value h2f_mpu_events associatedClock {} + set_instantiation_interface_parameter_value h2f_mpu_events associatedReset {} + set_instantiation_interface_parameter_value h2f_mpu_events prSafe {false} + add_instantiation_interface_port h2f_mpu_events h2f_mpu_fpga_eventi fpga_eventi 1 STD_LOGIC Input + add_instantiation_interface_port h2f_mpu_events h2f_mpu_fpga_evento fpga_evento 1 STD_LOGIC Output + add_instantiation_interface_port h2f_mpu_events h2f_mpu_fpga_standbywfe fpga_standbywfe 4 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_mpu_events h2f_mpu_fpga_standbywfi fpga_standbywfi 4 STD_LOGIC_VECTOR Output + add_instantiation_interface hps_emif conduit INPUT + set_instantiation_interface_parameter_value hps_emif associatedClock {} + set_instantiation_interface_parameter_value hps_emif associatedReset {} + set_instantiation_interface_parameter_value hps_emif prSafe {false} + add_instantiation_interface_port hps_emif hps_emif_emif_to_hps emif_to_hps 4096 STD_LOGIC_VECTOR Input + add_instantiation_interface_port hps_emif hps_emif_hps_to_emif hps_to_emif 4096 STD_LOGIC_VECTOR Output + add_instantiation_interface_port hps_emif hps_emif_emif_to_gp emif_to_gp 1 STD_LOGIC Input + add_instantiation_interface_port hps_emif hps_emif_gp_to_emif gp_to_emif 2 STD_LOGIC_VECTOR Output + add_instantiation_interface h2f_sdmmc_interrupt interrupt INPUT + set_instantiation_interface_parameter_value h2f_sdmmc_interrupt associatedAddressablePoint {} + set_instantiation_interface_parameter_value h2f_sdmmc_interrupt associatedClock {} + set_instantiation_interface_parameter_value h2f_sdmmc_interrupt associatedReset {} + set_instantiation_interface_parameter_value h2f_sdmmc_interrupt bridgedReceiverOffset {0} + set_instantiation_interface_parameter_value h2f_sdmmc_interrupt bridgesToReceiver {} + set_instantiation_interface_parameter_value h2f_sdmmc_interrupt irqScheme {NONE} + add_instantiation_interface_port h2f_sdmmc_interrupt s2f_sdmmc_irq irq 1 STD_LOGIC Output + add_instantiation_interface hps_io conduit INPUT + set_instantiation_interface_parameter_value hps_io associatedClock {} + set_instantiation_interface_parameter_value hps_io associatedReset {} + set_instantiation_interface_parameter_value hps_io prSafe {false} + add_instantiation_interface_port hps_io EMAC0_TX_CLK EMAC0_TX_CLK 1 STD_LOGIC Output + add_instantiation_interface_port hps_io EMAC0_TXD0 EMAC0_TXD0 1 STD_LOGIC Output + add_instantiation_interface_port hps_io EMAC0_TXD1 EMAC0_TXD1 1 STD_LOGIC Output + add_instantiation_interface_port hps_io EMAC0_TXD2 EMAC0_TXD2 1 STD_LOGIC Output + add_instantiation_interface_port hps_io EMAC0_TXD3 EMAC0_TXD3 1 STD_LOGIC Output + add_instantiation_interface_port hps_io EMAC0_RX_CTL EMAC0_RX_CTL 1 STD_LOGIC Input + add_instantiation_interface_port hps_io EMAC0_TX_CTL EMAC0_TX_CTL 1 STD_LOGIC Output + add_instantiation_interface_port hps_io EMAC0_RX_CLK EMAC0_RX_CLK 1 STD_LOGIC Input + add_instantiation_interface_port hps_io EMAC0_RXD0 EMAC0_RXD0 1 STD_LOGIC Input + add_instantiation_interface_port hps_io EMAC0_RXD1 EMAC0_RXD1 1 STD_LOGIC Input + add_instantiation_interface_port hps_io EMAC0_RXD2 EMAC0_RXD2 1 STD_LOGIC Input + add_instantiation_interface_port hps_io EMAC0_RXD3 EMAC0_RXD3 1 STD_LOGIC Input + add_instantiation_interface_port hps_io EMAC0_MDIO EMAC0_MDIO 1 STD_LOGIC Bidir + add_instantiation_interface_port hps_io EMAC0_MDC EMAC0_MDC 1 STD_LOGIC Output + add_instantiation_interface_port hps_io SDMMC_CMD SDMMC_CMD 1 STD_LOGIC Bidir + add_instantiation_interface_port hps_io SDMMC_D0 SDMMC_D0 1 STD_LOGIC Bidir + add_instantiation_interface_port hps_io SDMMC_D1 SDMMC_D1 1 STD_LOGIC Bidir + add_instantiation_interface_port hps_io SDMMC_D2 SDMMC_D2 1 STD_LOGIC Bidir + add_instantiation_interface_port hps_io SDMMC_D3 SDMMC_D3 1 STD_LOGIC Bidir + add_instantiation_interface_port hps_io SDMMC_CCLK SDMMC_CCLK 1 STD_LOGIC Output + add_instantiation_interface_port hps_io UART0_RX UART0_RX 1 STD_LOGIC Input + add_instantiation_interface_port hps_io UART0_TX UART0_TX 1 STD_LOGIC Output + add_instantiation_interface_port hps_io I2C1_SDA I2C1_SDA 1 STD_LOGIC Bidir + add_instantiation_interface_port hps_io I2C1_SCL I2C1_SCL 1 STD_LOGIC Bidir + add_instantiation_interface_port hps_io gpio1_io0 gpio1_io0 1 STD_LOGIC Bidir + add_instantiation_interface_port hps_io jtag_tck jtag_tck 1 STD_LOGIC Input + add_instantiation_interface_port hps_io jtag_tms jtag_tms 1 STD_LOGIC Input + add_instantiation_interface_port hps_io jtag_tdo jtag_tdo 1 STD_LOGIC Output + add_instantiation_interface_port hps_io jtag_tdi jtag_tdi 1 STD_LOGIC Input + add_instantiation_interface_port hps_io hps_osc_clk hps_osc_clk 1 STD_LOGIC Input + add_instantiation_interface h2f_reset reset OUTPUT + set_instantiation_interface_parameter_value h2f_reset associatedClock {} + set_instantiation_interface_parameter_value h2f_reset associatedDirectReset {} + set_instantiation_interface_parameter_value h2f_reset associatedResetSinks {none} + set_instantiation_interface_parameter_value h2f_reset synchronousEdges {NONE} + add_instantiation_interface_port h2f_reset h2f_rst reset 1 STD_LOGIC Output + add_instantiation_interface h2f_axi_clock clock INPUT + set_instantiation_interface_parameter_value h2f_axi_clock clockRate {0} + set_instantiation_interface_parameter_value h2f_axi_clock externallyDriven {false} + set_instantiation_interface_parameter_value h2f_axi_clock ptfSchematicName {} + add_instantiation_interface_port h2f_axi_clock h2f_axi_clk clk 1 STD_LOGIC Input + add_instantiation_interface h2f_axi_reset reset INPUT + set_instantiation_interface_parameter_value h2f_axi_reset associatedClock {h2f_axi_clock} + set_instantiation_interface_parameter_value h2f_axi_reset synchronousEdges {DEASSERT} + add_instantiation_interface_port h2f_axi_reset h2f_axi_rst_n reset_n 1 STD_LOGIC Input + add_instantiation_interface h2f_axi_master axi4 OUTPUT + set_instantiation_interface_parameter_value h2f_axi_master associatedClock {h2f_axi_clock} + set_instantiation_interface_parameter_value h2f_axi_master associatedReset {h2f_axi_reset} + set_instantiation_interface_parameter_value h2f_axi_master combinedIssuingCapability {16} + set_instantiation_interface_parameter_value h2f_axi_master issuesFIXEDBursts {true} + set_instantiation_interface_parameter_value h2f_axi_master issuesINCRBursts {true} + set_instantiation_interface_parameter_value h2f_axi_master issuesWRAPBursts {true} + set_instantiation_interface_parameter_value h2f_axi_master maximumOutstandingReads {1} + set_instantiation_interface_parameter_value h2f_axi_master maximumOutstandingTransactions {1} + set_instantiation_interface_parameter_value h2f_axi_master maximumOutstandingWrites {1} + set_instantiation_interface_parameter_value h2f_axi_master poison {false} + set_instantiation_interface_parameter_value h2f_axi_master readIssuingCapability {16} + set_instantiation_interface_parameter_value h2f_axi_master traceSignals {false} + set_instantiation_interface_parameter_value h2f_axi_master trustzoneAware {true} + set_instantiation_interface_parameter_value h2f_axi_master uniqueIdSupport {false} + set_instantiation_interface_parameter_value h2f_axi_master wakeupSignals {false} + set_instantiation_interface_parameter_value h2f_axi_master writeIssuingCapability {16} + add_instantiation_interface_port h2f_axi_master h2f_AWID awid 4 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_axi_master h2f_AWADDR awaddr 32 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_axi_master h2f_AWLEN awlen 8 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_axi_master h2f_AWSIZE awsize 3 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_axi_master h2f_AWBURST awburst 2 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_axi_master h2f_AWLOCK awlock 1 STD_LOGIC Output + add_instantiation_interface_port h2f_axi_master h2f_AWCACHE awcache 4 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_axi_master h2f_AWPROT awprot 3 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_axi_master h2f_AWVALID awvalid 1 STD_LOGIC Output + add_instantiation_interface_port h2f_axi_master h2f_AWREADY awready 1 STD_LOGIC Input + add_instantiation_interface_port h2f_axi_master h2f_WDATA wdata 64 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_axi_master h2f_WSTRB wstrb 8 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_axi_master h2f_WLAST wlast 1 STD_LOGIC Output + add_instantiation_interface_port h2f_axi_master h2f_WVALID wvalid 1 STD_LOGIC Output + add_instantiation_interface_port h2f_axi_master h2f_WREADY wready 1 STD_LOGIC Input + add_instantiation_interface_port h2f_axi_master h2f_BID bid 4 STD_LOGIC_VECTOR Input + add_instantiation_interface_port h2f_axi_master h2f_BRESP bresp 2 STD_LOGIC_VECTOR Input + add_instantiation_interface_port h2f_axi_master h2f_BVALID bvalid 1 STD_LOGIC Input + add_instantiation_interface_port h2f_axi_master h2f_BREADY bready 1 STD_LOGIC Output + add_instantiation_interface_port h2f_axi_master h2f_ARID arid 4 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_axi_master h2f_ARADDR araddr 32 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_axi_master h2f_ARLEN arlen 8 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_axi_master h2f_ARSIZE arsize 3 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_axi_master h2f_ARBURST arburst 2 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_axi_master h2f_ARLOCK arlock 1 STD_LOGIC Output + add_instantiation_interface_port h2f_axi_master h2f_ARCACHE arcache 4 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_axi_master h2f_ARPROT arprot 3 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_axi_master h2f_ARVALID arvalid 1 STD_LOGIC Output + add_instantiation_interface_port h2f_axi_master h2f_ARREADY arready 1 STD_LOGIC Input + add_instantiation_interface_port h2f_axi_master h2f_RID rid 4 STD_LOGIC_VECTOR Input + add_instantiation_interface_port h2f_axi_master h2f_RDATA rdata 64 STD_LOGIC_VECTOR Input + add_instantiation_interface_port h2f_axi_master h2f_RRESP rresp 2 STD_LOGIC_VECTOR Input + add_instantiation_interface_port h2f_axi_master h2f_RLAST rlast 1 STD_LOGIC Input + add_instantiation_interface_port h2f_axi_master h2f_RVALID rvalid 1 STD_LOGIC Input + add_instantiation_interface_port h2f_axi_master h2f_RREADY rready 1 STD_LOGIC Output + add_instantiation_interface h2f_lw_axi_clock clock INPUT + set_instantiation_interface_parameter_value h2f_lw_axi_clock clockRate {0} + set_instantiation_interface_parameter_value h2f_lw_axi_clock externallyDriven {false} + set_instantiation_interface_parameter_value h2f_lw_axi_clock ptfSchematicName {} + add_instantiation_interface_port h2f_lw_axi_clock h2f_lw_axi_clk clk 1 STD_LOGIC Input + add_instantiation_interface h2f_lw_axi_reset reset INPUT + set_instantiation_interface_parameter_value h2f_lw_axi_reset associatedClock {h2f_lw_axi_clock} + set_instantiation_interface_parameter_value h2f_lw_axi_reset synchronousEdges {DEASSERT} + add_instantiation_interface_port h2f_lw_axi_reset h2f_lw_axi_rst_n reset_n 1 STD_LOGIC Input + add_instantiation_interface h2f_lw_axi_master axi4 OUTPUT + set_instantiation_interface_parameter_value h2f_lw_axi_master associatedClock {h2f_lw_axi_clock} + set_instantiation_interface_parameter_value h2f_lw_axi_master associatedReset {h2f_lw_axi_reset} + set_instantiation_interface_parameter_value h2f_lw_axi_master combinedIssuingCapability {16} + set_instantiation_interface_parameter_value h2f_lw_axi_master issuesFIXEDBursts {true} + set_instantiation_interface_parameter_value h2f_lw_axi_master issuesINCRBursts {true} + set_instantiation_interface_parameter_value h2f_lw_axi_master issuesWRAPBursts {true} + set_instantiation_interface_parameter_value h2f_lw_axi_master maximumOutstandingReads {1} + set_instantiation_interface_parameter_value h2f_lw_axi_master maximumOutstandingTransactions {1} + set_instantiation_interface_parameter_value h2f_lw_axi_master maximumOutstandingWrites {1} + set_instantiation_interface_parameter_value h2f_lw_axi_master poison {false} + set_instantiation_interface_parameter_value h2f_lw_axi_master readIssuingCapability {16} + set_instantiation_interface_parameter_value h2f_lw_axi_master traceSignals {false} + set_instantiation_interface_parameter_value h2f_lw_axi_master trustzoneAware {true} + set_instantiation_interface_parameter_value h2f_lw_axi_master uniqueIdSupport {false} + set_instantiation_interface_parameter_value h2f_lw_axi_master wakeupSignals {false} + set_instantiation_interface_parameter_value h2f_lw_axi_master writeIssuingCapability {16} + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_AWID awid 4 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_AWADDR awaddr 21 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_AWLEN awlen 8 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_AWSIZE awsize 3 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_AWBURST awburst 2 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_AWLOCK awlock 1 STD_LOGIC Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_AWCACHE awcache 4 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_AWPROT awprot 3 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_AWVALID awvalid 1 STD_LOGIC Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_AWREADY awready 1 STD_LOGIC Input + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_WDATA wdata 32 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_WSTRB wstrb 4 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_WLAST wlast 1 STD_LOGIC Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_WVALID wvalid 1 STD_LOGIC Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_WREADY wready 1 STD_LOGIC Input + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_BID bid 4 STD_LOGIC_VECTOR Input + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_BRESP bresp 2 STD_LOGIC_VECTOR Input + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_BVALID bvalid 1 STD_LOGIC Input + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_BREADY bready 1 STD_LOGIC Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_ARID arid 4 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_ARADDR araddr 21 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_ARLEN arlen 8 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_ARSIZE arsize 3 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_ARBURST arburst 2 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_ARLOCK arlock 1 STD_LOGIC Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_ARCACHE arcache 4 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_ARPROT arprot 3 STD_LOGIC_VECTOR Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_ARVALID arvalid 1 STD_LOGIC Output + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_ARREADY arready 1 STD_LOGIC Input + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_RID rid 4 STD_LOGIC_VECTOR Input + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_RDATA rdata 32 STD_LOGIC_VECTOR Input + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_RRESP rresp 2 STD_LOGIC_VECTOR Input + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_RLAST rlast 1 STD_LOGIC Input + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_RVALID rvalid 1 STD_LOGIC Input + add_instantiation_interface_port h2f_lw_axi_master h2f_lw_RREADY rready 1 STD_LOGIC Output + add_instantiation_interface f2h_axi_clock clock INPUT + set_instantiation_interface_parameter_value f2h_axi_clock clockRate {0} + set_instantiation_interface_parameter_value f2h_axi_clock externallyDriven {false} + set_instantiation_interface_parameter_value f2h_axi_clock ptfSchematicName {} + add_instantiation_interface_port f2h_axi_clock f2h_axi_clk clk 1 STD_LOGIC Input + add_instantiation_interface f2h_axi_reset reset INPUT + set_instantiation_interface_parameter_value f2h_axi_reset associatedClock {f2h_axi_clock} + set_instantiation_interface_parameter_value f2h_axi_reset synchronousEdges {DEASSERT} + add_instantiation_interface_port f2h_axi_reset f2h_axi_rst_n reset_n 1 STD_LOGIC Input + add_instantiation_interface f2h_axi_slave acelite INPUT + set_instantiation_interface_parameter_value f2h_axi_slave associatedClock {f2h_axi_clock} + set_instantiation_interface_parameter_value f2h_axi_slave associatedReset {f2h_axi_reset} + set_instantiation_interface_parameter_value f2h_axi_slave bridgesToMaster {} + set_instantiation_interface_parameter_value f2h_axi_slave combinedAcceptanceCapability {16} + set_instantiation_interface_parameter_value f2h_axi_slave dfhFeatureGuid {0} + set_instantiation_interface_parameter_value f2h_axi_slave dfhFeatureId {35} + set_instantiation_interface_parameter_value f2h_axi_slave dfhFeatureMajorVersion {0} + set_instantiation_interface_parameter_value f2h_axi_slave dfhFeatureMinorVersion {0} + set_instantiation_interface_parameter_value f2h_axi_slave dfhFeatureType {3} + set_instantiation_interface_parameter_value f2h_axi_slave dfhGroupId {0} + set_instantiation_interface_parameter_value f2h_axi_slave dfhParameterData {} + set_instantiation_interface_parameter_value f2h_axi_slave dfhParameterDataLength {} + set_instantiation_interface_parameter_value f2h_axi_slave dfhParameterId {} + set_instantiation_interface_parameter_value f2h_axi_slave dfhParameterName {} + set_instantiation_interface_parameter_value f2h_axi_slave dfhParameterVersion {} + set_instantiation_interface_parameter_value f2h_axi_slave maximumOutstandingReads {1} + set_instantiation_interface_parameter_value f2h_axi_slave maximumOutstandingTransactions {1} + set_instantiation_interface_parameter_value f2h_axi_slave maximumOutstandingWrites {1} + set_instantiation_interface_parameter_value f2h_axi_slave poison {false} + set_instantiation_interface_parameter_value f2h_axi_slave readAcceptanceCapability {16} + set_instantiation_interface_parameter_value f2h_axi_slave readDataReorderingDepth {8} + set_instantiation_interface_parameter_value f2h_axi_slave traceSignals {false} + set_instantiation_interface_parameter_value f2h_axi_slave trustzoneAware {true} + set_instantiation_interface_parameter_value f2h_axi_slave uniqueIdSupport {false} + set_instantiation_interface_parameter_value f2h_axi_slave wakeupSignals {false} + set_instantiation_interface_parameter_value f2h_axi_slave writeAcceptanceCapability {16} + add_instantiation_interface_port f2h_axi_slave f2h_AWID awid 5 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_AWADDR awaddr 32 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_AWLEN awlen 8 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_AWSIZE awsize 3 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_AWBURST awburst 2 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_AWLOCK awlock 1 STD_LOGIC Input + add_instantiation_interface_port f2h_axi_slave f2h_AWCACHE awcache 4 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_AWPROT awprot 3 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_AWVALID awvalid 1 STD_LOGIC Input + add_instantiation_interface_port f2h_axi_slave f2h_AWREADY awready 1 STD_LOGIC Output + add_instantiation_interface_port f2h_axi_slave f2h_AWQOS awqos 4 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_WDATA wdata 128 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_WSTRB wstrb 16 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_WLAST wlast 1 STD_LOGIC Input + add_instantiation_interface_port f2h_axi_slave f2h_WVALID wvalid 1 STD_LOGIC Input + add_instantiation_interface_port f2h_axi_slave f2h_WREADY wready 1 STD_LOGIC Output + add_instantiation_interface_port f2h_axi_slave f2h_BID bid 5 STD_LOGIC_VECTOR Output + add_instantiation_interface_port f2h_axi_slave f2h_BRESP bresp 2 STD_LOGIC_VECTOR Output + add_instantiation_interface_port f2h_axi_slave f2h_BVALID bvalid 1 STD_LOGIC Output + add_instantiation_interface_port f2h_axi_slave f2h_BREADY bready 1 STD_LOGIC Input + add_instantiation_interface_port f2h_axi_slave f2h_ARID arid 5 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_ARADDR araddr 32 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_ARLEN arlen 8 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_ARSIZE arsize 3 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_ARBURST arburst 2 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_ARLOCK arlock 1 STD_LOGIC Input + add_instantiation_interface_port f2h_axi_slave f2h_ARCACHE arcache 4 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_ARPROT arprot 3 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_ARVALID arvalid 1 STD_LOGIC Input + add_instantiation_interface_port f2h_axi_slave f2h_ARREADY arready 1 STD_LOGIC Output + add_instantiation_interface_port f2h_axi_slave f2h_ARQOS arqos 4 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_RID rid 5 STD_LOGIC_VECTOR Output + add_instantiation_interface_port f2h_axi_slave f2h_RDATA rdata 128 STD_LOGIC_VECTOR Output + add_instantiation_interface_port f2h_axi_slave f2h_RRESP rresp 2 STD_LOGIC_VECTOR Output + add_instantiation_interface_port f2h_axi_slave f2h_RLAST rlast 1 STD_LOGIC Output + add_instantiation_interface_port f2h_axi_slave f2h_RVALID rvalid 1 STD_LOGIC Output + add_instantiation_interface_port f2h_axi_slave f2h_RREADY rready 1 STD_LOGIC Input + add_instantiation_interface_port f2h_axi_slave f2h_AWDOMAIN awdomain 2 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_AWBAR awbar 2 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_ARDOMAIN ardomain 2 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_ARBAR arbar 2 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_ARSNOOP arsnoop 4 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_AWSNOOP awsnoop 3 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_ARUSER aruser 23 STD_LOGIC_VECTOR Input + add_instantiation_interface_port f2h_axi_slave f2h_AWUSER awuser 23 STD_LOGIC_VECTOR Input + save_instantiation + add_component hps_emif ip/system/hps_emif.ip altera_emif_fm_hps hps_emif 2.7.4 + load_component hps_emif + set_component_parameter_value BOARD_DDR3_AC_TO_CK_SKEW_NS {0.0} + set_component_parameter_value BOARD_DDR3_BRD_SKEW_WITHIN_AC_NS {0.02} + set_component_parameter_value BOARD_DDR3_BRD_SKEW_WITHIN_DQS_NS {0.02} + set_component_parameter_value BOARD_DDR3_DQS_TO_CK_SKEW_NS {0.02} + set_component_parameter_value BOARD_DDR3_IS_SKEW_WITHIN_AC_DESKEWED {1} + set_component_parameter_value BOARD_DDR3_IS_SKEW_WITHIN_DQS_DESKEWED {0} + set_component_parameter_value BOARD_DDR3_MAX_CK_DELAY_NS {0.6} + set_component_parameter_value BOARD_DDR3_MAX_DQS_DELAY_NS {0.6} + set_component_parameter_value BOARD_DDR3_PKG_BRD_SKEW_WITHIN_AC_NS {0.02} + set_component_parameter_value BOARD_DDR3_PKG_BRD_SKEW_WITHIN_DQS_NS {0.02} + set_component_parameter_value BOARD_DDR3_SKEW_BETWEEN_DIMMS_NS {0.05} + set_component_parameter_value BOARD_DDR3_SKEW_BETWEEN_DQS_NS {0.02} + set_component_parameter_value BOARD_DDR3_USER_AC_ISI_NS {0.0} + set_component_parameter_value BOARD_DDR3_USER_AC_SLEW_RATE {2.0} + set_component_parameter_value BOARD_DDR3_USER_CK_SLEW_RATE {4.0} + set_component_parameter_value BOARD_DDR3_USER_RCLK_ISI_NS {0.0} + set_component_parameter_value BOARD_DDR3_USER_RCLK_SLEW_RATE {5.0} + set_component_parameter_value BOARD_DDR3_USER_RDATA_ISI_NS {0.0} + set_component_parameter_value BOARD_DDR3_USER_RDATA_SLEW_RATE {2.5} + set_component_parameter_value BOARD_DDR3_USER_WCLK_ISI_NS {0.0} + set_component_parameter_value BOARD_DDR3_USER_WCLK_SLEW_RATE {4.0} + set_component_parameter_value BOARD_DDR3_USER_WDATA_ISI_NS {0.0} + set_component_parameter_value BOARD_DDR3_USER_WDATA_SLEW_RATE {2.0} + set_component_parameter_value BOARD_DDR3_USE_DEFAULT_ISI_VALUES {1} + set_component_parameter_value BOARD_DDR3_USE_DEFAULT_SLEW_RATES {1} + set_component_parameter_value BOARD_DDR4_AC_TO_CK_SKEW_NS {0.0} + set_component_parameter_value BOARD_DDR4_BRD_SKEW_WITHIN_AC_NS {0.02} + set_component_parameter_value BOARD_DDR4_BRD_SKEW_WITHIN_DQS_NS {0.02} + set_component_parameter_value BOARD_DDR4_DQS_TO_CK_SKEW_NS {0.02} + set_component_parameter_value BOARD_DDR4_IS_SKEW_WITHIN_AC_DESKEWED {0} + set_component_parameter_value BOARD_DDR4_IS_SKEW_WITHIN_DQS_DESKEWED {0} + set_component_parameter_value BOARD_DDR4_MAX_CK_DELAY_NS {0.6} + set_component_parameter_value BOARD_DDR4_MAX_DQS_DELAY_NS {0.6} + set_component_parameter_value BOARD_DDR4_PKG_BRD_SKEW_WITHIN_AC_NS {0.02} + set_component_parameter_value BOARD_DDR4_PKG_BRD_SKEW_WITHIN_DQS_NS {0.02} + set_component_parameter_value BOARD_DDR4_SKEW_BETWEEN_DIMMS_NS {0.05} + set_component_parameter_value BOARD_DDR4_SKEW_BETWEEN_DQS_NS {0.02} + set_component_parameter_value BOARD_DDR4_USER_AC_ISI_NS {0.0} + set_component_parameter_value BOARD_DDR4_USER_AC_SLEW_RATE {2.0} + set_component_parameter_value BOARD_DDR4_USER_CK_SLEW_RATE {4.0} + set_component_parameter_value BOARD_DDR4_USER_RCLK_ISI_NS {0.0} + set_component_parameter_value BOARD_DDR4_USER_RCLK_SLEW_RATE {8.0} + set_component_parameter_value BOARD_DDR4_USER_RDATA_ISI_NS {0.0} + set_component_parameter_value BOARD_DDR4_USER_RDATA_SLEW_RATE {4.0} + set_component_parameter_value BOARD_DDR4_USER_WCLK_ISI_NS {0.0} + set_component_parameter_value BOARD_DDR4_USER_WCLK_SLEW_RATE {4.0} + set_component_parameter_value BOARD_DDR4_USER_WDATA_ISI_NS {0.0} + set_component_parameter_value BOARD_DDR4_USER_WDATA_SLEW_RATE {2.0} + set_component_parameter_value BOARD_DDR4_USE_DEFAULT_ISI_VALUES {1} + set_component_parameter_value BOARD_DDR4_USE_DEFAULT_SLEW_RATES {1} + set_component_parameter_value BOARD_DDRT_AC_TO_CK_SKEW_NS {0.0} + set_component_parameter_value BOARD_DDRT_BRD_SKEW_WITHIN_AC_NS {0.02} + set_component_parameter_value BOARD_DDRT_BRD_SKEW_WITHIN_DQS_NS {0.02} + set_component_parameter_value BOARD_DDRT_DQS_TO_CK_SKEW_NS {0.02} + set_component_parameter_value BOARD_DDRT_IS_SKEW_WITHIN_AC_DESKEWED {0} + set_component_parameter_value BOARD_DDRT_IS_SKEW_WITHIN_DQS_DESKEWED {1} + set_component_parameter_value BOARD_DDRT_MAX_CK_DELAY_NS {0.6} + set_component_parameter_value BOARD_DDRT_MAX_DQS_DELAY_NS {0.6} + set_component_parameter_value BOARD_DDRT_PKG_BRD_SKEW_WITHIN_AC_NS {0.02} + set_component_parameter_value BOARD_DDRT_PKG_BRD_SKEW_WITHIN_DQS_NS {0.02} + set_component_parameter_value BOARD_DDRT_SKEW_BETWEEN_DIMMS_NS {0.05} + set_component_parameter_value BOARD_DDRT_SKEW_BETWEEN_DQS_NS {0.02} + set_component_parameter_value BOARD_DDRT_USER_AC_ISI_NS {0.0} + set_component_parameter_value BOARD_DDRT_USER_AC_SLEW_RATE {2.0} + set_component_parameter_value BOARD_DDRT_USER_CK_SLEW_RATE {4.0} + set_component_parameter_value BOARD_DDRT_USER_RCLK_ISI_NS {0.0} + set_component_parameter_value BOARD_DDRT_USER_RCLK_SLEW_RATE {8.0} + set_component_parameter_value BOARD_DDRT_USER_RDATA_ISI_NS {0.0} + set_component_parameter_value BOARD_DDRT_USER_RDATA_SLEW_RATE {4.0} + set_component_parameter_value BOARD_DDRT_USER_WCLK_ISI_NS {0.0} + set_component_parameter_value BOARD_DDRT_USER_WCLK_SLEW_RATE {4.0} + set_component_parameter_value BOARD_DDRT_USER_WDATA_ISI_NS {0.0} + set_component_parameter_value BOARD_DDRT_USER_WDATA_SLEW_RATE {2.0} + set_component_parameter_value BOARD_DDRT_USE_DEFAULT_ISI_VALUES {1} + set_component_parameter_value BOARD_DDRT_USE_DEFAULT_SLEW_RATES {1} + set_component_parameter_value BOARD_LPDDR3_AC_TO_CK_SKEW_NS {0.0} + set_component_parameter_value BOARD_LPDDR3_BRD_SKEW_WITHIN_AC_NS {0.02} + set_component_parameter_value BOARD_LPDDR3_BRD_SKEW_WITHIN_DQS_NS {0.02} + set_component_parameter_value BOARD_LPDDR3_DQS_TO_CK_SKEW_NS {0.02} + set_component_parameter_value BOARD_LPDDR3_IS_SKEW_WITHIN_AC_DESKEWED {1} + set_component_parameter_value BOARD_LPDDR3_IS_SKEW_WITHIN_DQS_DESKEWED {0} + set_component_parameter_value BOARD_LPDDR3_MAX_CK_DELAY_NS {0.6} + set_component_parameter_value BOARD_LPDDR3_MAX_DQS_DELAY_NS {0.6} + set_component_parameter_value BOARD_LPDDR3_PKG_BRD_SKEW_WITHIN_AC_NS {0.02} + set_component_parameter_value BOARD_LPDDR3_PKG_BRD_SKEW_WITHIN_DQS_NS {0.02} + set_component_parameter_value BOARD_LPDDR3_SKEW_BETWEEN_DIMMS_NS {0.05} + set_component_parameter_value BOARD_LPDDR3_SKEW_BETWEEN_DQS_NS {0.02} + set_component_parameter_value BOARD_LPDDR3_USER_AC_ISI_NS {0.0} + set_component_parameter_value BOARD_LPDDR3_USER_AC_SLEW_RATE {2.0} + set_component_parameter_value BOARD_LPDDR3_USER_CK_SLEW_RATE {4.0} + set_component_parameter_value BOARD_LPDDR3_USER_RCLK_ISI_NS {0.0} + set_component_parameter_value BOARD_LPDDR3_USER_RCLK_SLEW_RATE {4.0} + set_component_parameter_value BOARD_LPDDR3_USER_RDATA_ISI_NS {0.0} + set_component_parameter_value BOARD_LPDDR3_USER_RDATA_SLEW_RATE {2.0} + set_component_parameter_value BOARD_LPDDR3_USER_WCLK_ISI_NS {0.0} + set_component_parameter_value BOARD_LPDDR3_USER_WCLK_SLEW_RATE {4.0} + set_component_parameter_value BOARD_LPDDR3_USER_WDATA_ISI_NS {0.0} + set_component_parameter_value BOARD_LPDDR3_USER_WDATA_SLEW_RATE {2.0} + set_component_parameter_value BOARD_LPDDR3_USE_DEFAULT_ISI_VALUES {1} + set_component_parameter_value BOARD_LPDDR3_USE_DEFAULT_SLEW_RATES {1} + set_component_parameter_value BOARD_QDR2_AC_TO_K_SKEW_NS {0.0} + set_component_parameter_value BOARD_QDR2_BRD_SKEW_WITHIN_AC_NS {0.02} + set_component_parameter_value BOARD_QDR2_BRD_SKEW_WITHIN_D_NS {0.02} + set_component_parameter_value BOARD_QDR2_BRD_SKEW_WITHIN_Q_NS {0.02} + set_component_parameter_value BOARD_QDR2_IS_SKEW_WITHIN_AC_DESKEWED {1} + set_component_parameter_value BOARD_QDR2_IS_SKEW_WITHIN_D_DESKEWED {0} + set_component_parameter_value BOARD_QDR2_IS_SKEW_WITHIN_Q_DESKEWED {0} + set_component_parameter_value BOARD_QDR2_MAX_K_DELAY_NS {0.6} + set_component_parameter_value BOARD_QDR2_PKG_BRD_SKEW_WITHIN_AC_NS {0.02} + set_component_parameter_value BOARD_QDR2_PKG_BRD_SKEW_WITHIN_D_NS {0.02} + set_component_parameter_value BOARD_QDR2_PKG_BRD_SKEW_WITHIN_Q_NS {0.02} + set_component_parameter_value BOARD_QDR2_USER_AC_ISI_NS {0.0} + set_component_parameter_value BOARD_QDR2_USER_AC_SLEW_RATE {2.0} + set_component_parameter_value BOARD_QDR2_USER_K_SLEW_RATE {4.0} + set_component_parameter_value BOARD_QDR2_USER_RCLK_ISI_NS {0.0} + set_component_parameter_value BOARD_QDR2_USER_RCLK_SLEW_RATE {4.0} + set_component_parameter_value BOARD_QDR2_USER_RDATA_ISI_NS {0.0} + set_component_parameter_value BOARD_QDR2_USER_RDATA_SLEW_RATE {2.0} + set_component_parameter_value BOARD_QDR2_USER_WCLK_ISI_NS {0.0} + set_component_parameter_value BOARD_QDR2_USER_WDATA_ISI_NS {0.0} + set_component_parameter_value BOARD_QDR2_USER_WDATA_SLEW_RATE {2.0} + set_component_parameter_value BOARD_QDR2_USE_DEFAULT_ISI_VALUES {1} + set_component_parameter_value BOARD_QDR2_USE_DEFAULT_SLEW_RATES {1} + set_component_parameter_value BOARD_QDR4_AC_TO_CK_SKEW_NS {0.0} + set_component_parameter_value BOARD_QDR4_BRD_SKEW_WITHIN_AC_NS {0.02} + set_component_parameter_value BOARD_QDR4_BRD_SKEW_WITHIN_QK_NS {0.02} + set_component_parameter_value BOARD_QDR4_DK_TO_CK_SKEW_NS {-0.02} + set_component_parameter_value BOARD_QDR4_IS_SKEW_WITHIN_AC_DESKEWED {1} + set_component_parameter_value BOARD_QDR4_IS_SKEW_WITHIN_QK_DESKEWED {1} + set_component_parameter_value BOARD_QDR4_MAX_CK_DELAY_NS {0.6} + set_component_parameter_value BOARD_QDR4_MAX_DK_DELAY_NS {0.6} + set_component_parameter_value BOARD_QDR4_PKG_BRD_SKEW_WITHIN_AC_NS {0.02} + set_component_parameter_value BOARD_QDR4_PKG_BRD_SKEW_WITHIN_QK_NS {0.02} + set_component_parameter_value BOARD_QDR4_SKEW_BETWEEN_DIMMS_NS {0.05} + set_component_parameter_value BOARD_QDR4_SKEW_BETWEEN_DK_NS {0.02} + set_component_parameter_value BOARD_QDR4_USER_AC_ISI_NS {0.0} + set_component_parameter_value BOARD_QDR4_USER_AC_SLEW_RATE {2.0} + set_component_parameter_value BOARD_QDR4_USER_CK_SLEW_RATE {4.0} + set_component_parameter_value BOARD_QDR4_USER_RCLK_ISI_NS {0.0} + set_component_parameter_value BOARD_QDR4_USER_RCLK_SLEW_RATE {5.0} + set_component_parameter_value BOARD_QDR4_USER_RDATA_ISI_NS {0.0} + set_component_parameter_value BOARD_QDR4_USER_RDATA_SLEW_RATE {2.5} + set_component_parameter_value BOARD_QDR4_USER_WCLK_ISI_NS {0.0} + set_component_parameter_value BOARD_QDR4_USER_WCLK_SLEW_RATE {4.0} + set_component_parameter_value BOARD_QDR4_USER_WDATA_ISI_NS {0.0} + set_component_parameter_value BOARD_QDR4_USER_WDATA_SLEW_RATE {2.0} + set_component_parameter_value BOARD_QDR4_USE_DEFAULT_ISI_VALUES {1} + set_component_parameter_value BOARD_QDR4_USE_DEFAULT_SLEW_RATES {1} + set_component_parameter_value BOARD_RLD3_AC_TO_CK_SKEW_NS {0.0} + set_component_parameter_value BOARD_RLD3_BRD_SKEW_WITHIN_AC_NS {0.02} + set_component_parameter_value BOARD_RLD3_BRD_SKEW_WITHIN_QK_NS {0.02} + set_component_parameter_value BOARD_RLD3_DK_TO_CK_SKEW_NS {-0.02} + set_component_parameter_value BOARD_RLD3_IS_SKEW_WITHIN_AC_DESKEWED {1} + set_component_parameter_value BOARD_RLD3_IS_SKEW_WITHIN_QK_DESKEWED {0} + set_component_parameter_value BOARD_RLD3_MAX_CK_DELAY_NS {0.6} + set_component_parameter_value BOARD_RLD3_MAX_DK_DELAY_NS {0.6} + set_component_parameter_value BOARD_RLD3_PKG_BRD_SKEW_WITHIN_AC_NS {0.02} + set_component_parameter_value BOARD_RLD3_PKG_BRD_SKEW_WITHIN_QK_NS {0.02} + set_component_parameter_value BOARD_RLD3_SKEW_BETWEEN_DIMMS_NS {0.05} + set_component_parameter_value BOARD_RLD3_SKEW_BETWEEN_DK_NS {0.02} + set_component_parameter_value BOARD_RLD3_USER_AC_ISI_NS {0.0} + set_component_parameter_value BOARD_RLD3_USER_AC_SLEW_RATE {2.0} + set_component_parameter_value BOARD_RLD3_USER_CK_SLEW_RATE {4.0} + set_component_parameter_value BOARD_RLD3_USER_RCLK_ISI_NS {0.0} + set_component_parameter_value BOARD_RLD3_USER_RCLK_SLEW_RATE {7.0} + set_component_parameter_value BOARD_RLD3_USER_RDATA_ISI_NS {0.0} + set_component_parameter_value BOARD_RLD3_USER_RDATA_SLEW_RATE {3.5} + set_component_parameter_value BOARD_RLD3_USER_WCLK_ISI_NS {0.0} + set_component_parameter_value BOARD_RLD3_USER_WCLK_SLEW_RATE {4.0} + set_component_parameter_value BOARD_RLD3_USER_WDATA_ISI_NS {0.0} + set_component_parameter_value BOARD_RLD3_USER_WDATA_SLEW_RATE {2.0} + set_component_parameter_value BOARD_RLD3_USE_DEFAULT_ISI_VALUES {1} + set_component_parameter_value BOARD_RLD3_USE_DEFAULT_SLEW_RATES {1} + set_component_parameter_value CTRL_DDR3_ADDR_ORDER_ENUM {DDR3_CTRL_ADDR_ORDER_CS_R_B_C} + set_component_parameter_value CTRL_DDR3_AUTO_POWER_DOWN_CYCS {32} + set_component_parameter_value CTRL_DDR3_AUTO_POWER_DOWN_EN {0} + set_component_parameter_value CTRL_DDR3_AUTO_PRECHARGE_EN {0} + set_component_parameter_value CTRL_DDR3_AVL_PROTOCOL_ENUM {CTRL_AVL_PROTOCOL_MM} + set_component_parameter_value CTRL_DDR3_ECC_AUTO_CORRECTION_EN {0} + set_component_parameter_value CTRL_DDR3_ECC_EN {0} + set_component_parameter_value CTRL_DDR3_ECC_READDATAERROR_EN {1} + set_component_parameter_value CTRL_DDR3_ECC_STATUS_EN {0} + set_component_parameter_value CTRL_DDR3_MMR_EN {0} + set_component_parameter_value CTRL_DDR3_RD_TO_RD_DIFF_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDR3_RD_TO_WR_DIFF_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDR3_RD_TO_WR_SAME_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDR3_REORDER_EN {1} + set_component_parameter_value CTRL_DDR3_SELF_REFRESH_EN {0} + set_component_parameter_value CTRL_DDR3_STARVE_LIMIT {10} + set_component_parameter_value CTRL_DDR3_USER_PRIORITY_EN {0} + set_component_parameter_value CTRL_DDR3_USER_REFRESH_EN {0} + set_component_parameter_value CTRL_DDR3_WR_TO_RD_DIFF_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDR3_WR_TO_RD_SAME_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDR3_WR_TO_WR_DIFF_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDR4_ADDR_ORDER_ENUM {DDR4_CTRL_ADDR_ORDER_CS_R_B_C_BG} + set_component_parameter_value CTRL_DDR4_AUTO_POWER_DOWN_CYCS {32} + set_component_parameter_value CTRL_DDR4_AUTO_POWER_DOWN_EN {0} + set_component_parameter_value CTRL_DDR4_AUTO_PRECHARGE_EN {0} + set_component_parameter_value CTRL_DDR4_AVL_PROTOCOL_ENUM {CTRL_AVL_PROTOCOL_ST} + set_component_parameter_value CTRL_DDR4_ECC_AUTO_CORRECTION_EN {1} + set_component_parameter_value CTRL_DDR4_ECC_EN {0} + set_component_parameter_value CTRL_DDR4_ECC_READDATAERROR_EN {0} + set_component_parameter_value CTRL_DDR4_ECC_STATUS_EN {0} + set_component_parameter_value CTRL_DDR4_MAJOR_MODE_EN {0} + set_component_parameter_value CTRL_DDR4_MMR_EN {0} + set_component_parameter_value CTRL_DDR4_POST_REFRESH_EN {0} + set_component_parameter_value CTRL_DDR4_POST_REFRESH_LOWER_LIMIT {0} + set_component_parameter_value CTRL_DDR4_POST_REFRESH_UPPER_LIMIT {2} + set_component_parameter_value CTRL_DDR4_PRE_REFRESH_EN {0} + set_component_parameter_value CTRL_DDR4_PRE_REFRESH_UPPER_LIMIT {1} + set_component_parameter_value CTRL_DDR4_RD_TO_RD_DIFF_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDR4_RD_TO_WR_DIFF_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDR4_RD_TO_WR_SAME_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDR4_REORDER_EN {1} + set_component_parameter_value CTRL_DDR4_SELF_REFRESH_EN {0} + set_component_parameter_value CTRL_DDR4_STARVE_LIMIT {10} + set_component_parameter_value CTRL_DDR4_USER_PRIORITY_EN {0} + set_component_parameter_value CTRL_DDR4_USER_REFRESH_EN {0} + set_component_parameter_value CTRL_DDR4_WR_TO_RD_DIFF_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDR4_WR_TO_RD_SAME_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDR4_WR_TO_WR_DIFF_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDRT_ADDR_INTERLEAVING {COARSE} + set_component_parameter_value CTRL_DDRT_ADDR_ORDER_ENUM {DDRT_CTRL_ADDR_ORDER_CS_R_B_C_BG} + set_component_parameter_value CTRL_DDRT_AUTO_POWER_DOWN_CYCS {32} + set_component_parameter_value CTRL_DDRT_AUTO_POWER_DOWN_EN {0} + set_component_parameter_value CTRL_DDRT_AUTO_PRECHARGE_EN {0} + set_component_parameter_value CTRL_DDRT_AVL_PROTOCOL_ENUM {CTRL_AVL_PROTOCOL_MM} + set_component_parameter_value CTRL_DDRT_DIMM_DENSITY {128} + set_component_parameter_value CTRL_DDRT_DIMM_VIRAL_FLOW_EN {0} + set_component_parameter_value CTRL_DDRT_ECC_AUTO_CORRECTION_EN {0} + set_component_parameter_value CTRL_DDRT_ECC_EN {0} + set_component_parameter_value CTRL_DDRT_ECC_READDATAERROR_EN {1} + set_component_parameter_value CTRL_DDRT_ECC_STATUS_EN {1} + set_component_parameter_value CTRL_DDRT_ERR_INJECT_EN {0} + set_component_parameter_value CTRL_DDRT_ERR_REPLAY_EN {0} + set_component_parameter_value CTRL_DDRT_EXT_ERR_INJECT_EN {0} + set_component_parameter_value CTRL_DDRT_GNT_TO_GNT_DIFF_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDRT_GNT_TO_WR_DIFF_CHIP_DELTA_CYCS {1} + set_component_parameter_value CTRL_DDRT_GNT_TO_WR_SAME_CHIP_DELTA_CYCS {1} + set_component_parameter_value CTRL_DDRT_HOST_VIRAL_FLOW_EN {0} + set_component_parameter_value CTRL_DDRT_MMR_EN {0} + set_component_parameter_value CTRL_DDRT_NUM_OF_AXIS_ID {1} + set_component_parameter_value CTRL_DDRT_PARITY_CMD_EN {0} + set_component_parameter_value CTRL_DDRT_PMM_ADR_FLOW_EN {0} + set_component_parameter_value CTRL_DDRT_PMM_WPQ_FLUSH_EN {0} + set_component_parameter_value CTRL_DDRT_POISON_DETECTION_EN {0} + set_component_parameter_value CTRL_DDRT_PORT_AFI_C_WIDTH {2} + set_component_parameter_value CTRL_DDRT_RD_TO_RD_DIFF_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDRT_RD_TO_WR_DIFF_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDRT_RD_TO_WR_SAME_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDRT_REORDER_EN {1} + set_component_parameter_value CTRL_DDRT_SELF_REFRESH_EN {0} + set_component_parameter_value CTRL_DDRT_STARVE_LIMIT {10} + set_component_parameter_value CTRL_DDRT_UPI_EN {0} + set_component_parameter_value CTRL_DDRT_UPI_ID_WIDTH {8} + set_component_parameter_value CTRL_DDRT_USER_PRIORITY_EN {0} + set_component_parameter_value CTRL_DDRT_USER_REFRESH_EN {0} + set_component_parameter_value CTRL_DDRT_WR_ACK_POLICY {POSTED} + set_component_parameter_value CTRL_DDRT_WR_TO_GNT_DIFF_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDRT_WR_TO_GNT_SAME_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDRT_WR_TO_RD_DIFF_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDRT_WR_TO_RD_SAME_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDRT_WR_TO_WR_DIFF_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_DDRT_ZQ_INTERVAL_MS {3} + set_component_parameter_value CTRL_LPDDR3_ADDR_ORDER_ENUM {LPDDR3_CTRL_ADDR_ORDER_CS_R_B_C} + set_component_parameter_value CTRL_LPDDR3_AUTO_POWER_DOWN_CYCS {32} + set_component_parameter_value CTRL_LPDDR3_AUTO_POWER_DOWN_EN {0} + set_component_parameter_value CTRL_LPDDR3_AUTO_PRECHARGE_EN {0} + set_component_parameter_value CTRL_LPDDR3_AVL_PROTOCOL_ENUM {CTRL_AVL_PROTOCOL_MM} + set_component_parameter_value CTRL_LPDDR3_MMR_EN {0} + set_component_parameter_value CTRL_LPDDR3_RD_TO_RD_DIFF_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_LPDDR3_RD_TO_WR_DIFF_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_LPDDR3_RD_TO_WR_SAME_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_LPDDR3_REORDER_EN {1} + set_component_parameter_value CTRL_LPDDR3_SELF_REFRESH_EN {0} + set_component_parameter_value CTRL_LPDDR3_STARVE_LIMIT {10} + set_component_parameter_value CTRL_LPDDR3_USER_PRIORITY_EN {0} + set_component_parameter_value CTRL_LPDDR3_USER_REFRESH_EN {0} + set_component_parameter_value CTRL_LPDDR3_WR_TO_RD_DIFF_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_LPDDR3_WR_TO_RD_SAME_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_LPDDR3_WR_TO_WR_DIFF_CHIP_DELTA_CYCS {0} + set_component_parameter_value CTRL_QDR2_AVL_ENABLE_POWER_OF_TWO_BUS {0} + set_component_parameter_value CTRL_QDR2_AVL_MAX_BURST_COUNT {4} + set_component_parameter_value CTRL_QDR2_AVL_PROTOCOL_ENUM {CTRL_AVL_PROTOCOL_MM} + set_component_parameter_value CTRL_QDR4_ADD_RAW_TURNAROUND_DELAY_CYC {0} + set_component_parameter_value CTRL_QDR4_ADD_WAR_TURNAROUND_DELAY_CYC {0} + set_component_parameter_value CTRL_QDR4_AVL_ENABLE_POWER_OF_TWO_BUS {0} + set_component_parameter_value CTRL_QDR4_AVL_MAX_BURST_COUNT {4} + set_component_parameter_value CTRL_QDR4_AVL_PROTOCOL_ENUM {CTRL_AVL_PROTOCOL_MM} + set_component_parameter_value CTRL_QDR4_DEF_RAW_TURNAROUND_DELAY_CYC {4} + set_component_parameter_value CTRL_RLD2_AVL_PROTOCOL_ENUM {CTRL_AVL_PROTOCOL_MM} + set_component_parameter_value CTRL_RLD3_ADDR_ORDER_ENUM {RLD3_CTRL_ADDR_ORDER_CS_R_B_C} + set_component_parameter_value CTRL_RLD3_AVL_PROTOCOL_ENUM {CTRL_AVL_PROTOCOL_MM} + set_component_parameter_value DIAG_ADD_READY_PIPELINE {1} + set_component_parameter_value DIAG_BOARD_DELAY_CONFIG_STR {} + set_component_parameter_value DIAG_DB_RESET_AUTO_RELEASE {avl_release} + set_component_parameter_value DIAG_DDR3_ABSTRACT_PHY {0} + set_component_parameter_value DIAG_DDR3_AC_PARITY_ERR {0} + set_component_parameter_value DIAG_DDR3_CAL_ADDR0 {0} + set_component_parameter_value DIAG_DDR3_CAL_ADDR1 {8} + set_component_parameter_value DIAG_DDR3_CAL_ENABLE_MICRON_AP {0} + set_component_parameter_value DIAG_DDR3_CAL_ENABLE_NON_DES {0} + set_component_parameter_value DIAG_DDR3_CAL_FULL_CAL_ON_RESET {1} + set_component_parameter_value DIAG_DDR3_CA_DESKEW_EN {1} + set_component_parameter_value DIAG_DDR3_CA_LEVEL_EN {1} + set_component_parameter_value DIAG_DDR3_DISABLE_AFI_P2C_REGISTERS {0} + set_component_parameter_value DIAG_DDR3_EFFICIENCY_MONITOR {EFFMON_MODE_DISABLED} + set_component_parameter_value DIAG_DDR3_ENABLE_DEFAULT_MODE {0} + set_component_parameter_value DIAG_DDR3_ENABLE_USER_MODE {1} + set_component_parameter_value DIAG_DDR3_EXPORT_SEQ_AVALON_HEAD_OF_CHAIN {1} + set_component_parameter_value DIAG_DDR3_EXPORT_SEQ_AVALON_MASTER {0} + set_component_parameter_value DIAG_DDR3_EXPORT_SEQ_AVALON_SLAVE {CAL_DEBUG_EXPORT_MODE_DISABLED} + set_component_parameter_value DIAG_DDR3_EXPORT_TG_CFG_AVALON_SLAVE {TG_CFG_AMM_EXPORT_MODE_JTAG} + set_component_parameter_value DIAG_DDR3_EX_DESIGN_ISSP_EN {0} + set_component_parameter_value DIAG_DDR3_EX_DESIGN_NUM_OF_SLAVES {1} + set_component_parameter_value DIAG_DDR3_EX_DESIGN_SEPARATE_RZQS {1} + set_component_parameter_value DIAG_DDR3_INTERFACE_ID {0} + set_component_parameter_value DIAG_DDR3_SEPARATE_READ_WRITE_ITFS {0} + set_component_parameter_value DIAG_DDR3_SIM_CAL_MODE_ENUM {SIM_CAL_MODE_SKIP} + set_component_parameter_value DIAG_DDR3_SIM_VERBOSE {1} + set_component_parameter_value DIAG_DDR3_TG2_TEST_DURATION {SHORT} + set_component_parameter_value DIAG_DDR3_USER_SIM_MEMORY_PRELOAD {0} + set_component_parameter_value DIAG_DDR3_USER_SIM_MEMORY_PRELOAD_PRI_EMIF_FILE {EMIF_PRI_PRELOAD.txt} + set_component_parameter_value DIAG_DDR3_USER_SIM_MEMORY_PRELOAD_SEC_EMIF_FILE {EMIF_SEC_PRELOAD.txt} + set_component_parameter_value DIAG_DDR3_USER_USE_SIM_MEMORY_VALIDATION_TG {1} + set_component_parameter_value DIAG_DDR3_USE_NEW_EFFMON_S10 {0} + set_component_parameter_value DIAG_DDR3_USE_TG_AVL_2 {0} + set_component_parameter_value DIAG_DDR3_USE_TG_HBM {0} + set_component_parameter_value DIAG_DDR4_ABSTRACT_PHY {0} + set_component_parameter_value DIAG_DDR4_AC_PARITY_ERR {0} + set_component_parameter_value DIAG_DDR4_CAL_ADDR0 {0} + set_component_parameter_value DIAG_DDR4_CAL_ADDR1 {8} + set_component_parameter_value DIAG_DDR4_CAL_ENABLE_NON_DES {0} + set_component_parameter_value DIAG_DDR4_CAL_FULL_CAL_ON_RESET {1} + set_component_parameter_value DIAG_DDR4_DISABLE_AFI_P2C_REGISTERS {0} + set_component_parameter_value DIAG_DDR4_EFFICIENCY_MONITOR {EFFMON_MODE_DISABLED} + set_component_parameter_value DIAG_DDR4_ENABLE_DEFAULT_MODE {0} + set_component_parameter_value DIAG_DDR4_ENABLE_USER_MODE {1} + set_component_parameter_value DIAG_DDR4_EXPORT_SEQ_AVALON_HEAD_OF_CHAIN {1} + set_component_parameter_value DIAG_DDR4_EXPORT_SEQ_AVALON_MASTER {0} + set_component_parameter_value DIAG_DDR4_EXPORT_SEQ_AVALON_SLAVE {CAL_DEBUG_EXPORT_MODE_DISABLED} + set_component_parameter_value DIAG_DDR4_EXPORT_TG_CFG_AVALON_SLAVE {TG_CFG_AMM_EXPORT_MODE_JTAG} + set_component_parameter_value DIAG_DDR4_EX_DESIGN_ISSP_EN {0} + set_component_parameter_value DIAG_DDR4_EX_DESIGN_NUM_OF_SLAVES {1} + set_component_parameter_value DIAG_DDR4_EX_DESIGN_SEPARATE_RZQS {1} + set_component_parameter_value DIAG_DDR4_INTERFACE_ID {0} + set_component_parameter_value DIAG_DDR4_SEPARATE_READ_WRITE_ITFS {0} + set_component_parameter_value DIAG_DDR4_SIM_CAL_MODE_ENUM {SIM_CAL_MODE_SKIP} + set_component_parameter_value DIAG_DDR4_SIM_VERBOSE {1} + set_component_parameter_value DIAG_DDR4_SKIP_AC_PARITY_CHECK {0} + set_component_parameter_value DIAG_DDR4_SKIP_CA_DESKEW {0} + set_component_parameter_value DIAG_DDR4_SKIP_CA_LEVEL {0} + set_component_parameter_value DIAG_DDR4_SKIP_VREF_CAL {0} + set_component_parameter_value DIAG_DDR4_TG2_TEST_DURATION {SHORT} + set_component_parameter_value DIAG_DDR4_USER_SIM_MEMORY_PRELOAD {0} + set_component_parameter_value DIAG_DDR4_USER_SIM_MEMORY_PRELOAD_PRI_EMIF_FILE {EMIF_PRI_PRELOAD.txt} + set_component_parameter_value DIAG_DDR4_USER_SIM_MEMORY_PRELOAD_SEC_EMIF_FILE {EMIF_SEC_PRELOAD.txt} + set_component_parameter_value DIAG_DDR4_USER_USE_SIM_MEMORY_VALIDATION_TG {1} + set_component_parameter_value DIAG_DDR4_USE_NEW_EFFMON_S10 {0} + set_component_parameter_value DIAG_DDR4_USE_TG_AVL_2 {0} + set_component_parameter_value DIAG_DDR4_USE_TG_HBM {0} + set_component_parameter_value DIAG_DDRT_ABSTRACT_PHY {0} + set_component_parameter_value DIAG_DDRT_AC_PARITY_ERR {0} + set_component_parameter_value DIAG_DDRT_CAL_ADDR0 {0} + set_component_parameter_value DIAG_DDRT_CAL_ADDR1 {8} + set_component_parameter_value DIAG_DDRT_CAL_ENABLE_NON_DES {0} + set_component_parameter_value DIAG_DDRT_CAL_FULL_CAL_ON_RESET {1} + set_component_parameter_value DIAG_DDRT_DISABLE_AFI_P2C_REGISTERS {0} + set_component_parameter_value DIAG_DDRT_EFFICIENCY_MONITOR {EFFMON_MODE_DISABLED} + set_component_parameter_value DIAG_DDRT_EFF_TEST {0} + set_component_parameter_value DIAG_DDRT_ENABLE_DEFAULT_MODE {1} + set_component_parameter_value DIAG_DDRT_ENABLE_DRIVER_MARGINING {0} + set_component_parameter_value DIAG_DDRT_ENABLE_ENHANCED_TESTING {0} + set_component_parameter_value DIAG_DDRT_ENABLE_USER_MODE {0} + set_component_parameter_value DIAG_DDRT_EXPORT_SEQ_AVALON_HEAD_OF_CHAIN {1} + set_component_parameter_value DIAG_DDRT_EXPORT_SEQ_AVALON_MASTER {0} + set_component_parameter_value DIAG_DDRT_EXPORT_SEQ_AVALON_SLAVE {CAL_DEBUG_EXPORT_MODE_DISABLED} + set_component_parameter_value DIAG_DDRT_EXPORT_TG_CFG_AVALON_SLAVE {TG_CFG_AMM_EXPORT_MODE_JTAG} + set_component_parameter_value DIAG_DDRT_EX_DESIGN_ISSP_EN {1} + set_component_parameter_value DIAG_DDRT_EX_DESIGN_NUM_OF_SLAVES {1} + set_component_parameter_value DIAG_DDRT_EX_DESIGN_SEPARATE_RZQS {1} + set_component_parameter_value DIAG_DDRT_INTERFACE_ID {0} + set_component_parameter_value DIAG_DDRT_SEPARATE_READ_WRITE_ITFS {0} + set_component_parameter_value DIAG_DDRT_SIM_CAL_MODE_ENUM {SIM_CAL_MODE_SKIP} + set_component_parameter_value DIAG_DDRT_SIM_VERBOSE {1} + set_component_parameter_value DIAG_DDRT_SKIP_CA_DESKEW {0} + set_component_parameter_value DIAG_DDRT_SKIP_CA_LEVEL {0} + set_component_parameter_value DIAG_DDRT_SKIP_VREF_CAL {0} + set_component_parameter_value DIAG_DDRT_TG2_TEST_DURATION {SHORT} + set_component_parameter_value DIAG_DDRT_USER_SIM_MEMORY_PRELOAD {0} + set_component_parameter_value DIAG_DDRT_USER_SIM_MEMORY_PRELOAD_PRI_EMIF_FILE {EMIF_PRI_PRELOAD.txt} + set_component_parameter_value DIAG_DDRT_USER_SIM_MEMORY_PRELOAD_SEC_EMIF_FILE {EMIF_SEC_PRELOAD.txt} + set_component_parameter_value DIAG_DDRT_USER_USE_SIM_MEMORY_VALIDATION_TG {1} + set_component_parameter_value DIAG_DDRT_USE_NEW_EFFMON_S10 {0} + set_component_parameter_value DIAG_DDRT_USE_TG_AVL_2 {1} + set_component_parameter_value DIAG_DDRT_USE_TG_HBM {0} + set_component_parameter_value DIAG_ECLIPSE_DEBUG {0} + set_component_parameter_value DIAG_ENABLE_HPS_EMIF_DEBUG {0} + set_component_parameter_value DIAG_ENABLE_JTAG_UART {0} + set_component_parameter_value DIAG_ENABLE_JTAG_UART_HEX {0} + set_component_parameter_value DIAG_EXPORT_PLL_LOCKED {0} + set_component_parameter_value DIAG_EXPORT_PLL_REF_CLK_OUT {0} + set_component_parameter_value DIAG_EXPORT_VJI {0} + set_component_parameter_value DIAG_EXPOSE_DFT_SIGNALS {0} + set_component_parameter_value DIAG_EXPOSE_EARLY_READY {0} + set_component_parameter_value DIAG_EXPOSE_RD_TYPE {0} + set_component_parameter_value DIAG_EXTRA_CONFIGS {} + set_component_parameter_value DIAG_EXT_DOCS {0} + set_component_parameter_value DIAG_EX_DESIGN_ADD_TEST_EMIFS {} + set_component_parameter_value DIAG_EX_DESIGN_SEPARATE_RESETS {0} + set_component_parameter_value DIAG_FAST_SIM_OVERRIDE {FAST_SIM_OVERRIDE_DEFAULT} + set_component_parameter_value DIAG_HMC_HRC {auto} + set_component_parameter_value DIAG_LPDDR3_ABSTRACT_PHY {0} + set_component_parameter_value DIAG_LPDDR3_AC_PARITY_ERR {0} + set_component_parameter_value DIAG_LPDDR3_DISABLE_AFI_P2C_REGISTERS {0} + set_component_parameter_value DIAG_LPDDR3_EFFICIENCY_MONITOR {EFFMON_MODE_DISABLED} + set_component_parameter_value DIAG_LPDDR3_ENABLE_DEFAULT_MODE {0} + set_component_parameter_value DIAG_LPDDR3_ENABLE_USER_MODE {1} + set_component_parameter_value DIAG_LPDDR3_EXPORT_SEQ_AVALON_HEAD_OF_CHAIN {1} + set_component_parameter_value DIAG_LPDDR3_EXPORT_SEQ_AVALON_MASTER {0} + set_component_parameter_value DIAG_LPDDR3_EXPORT_SEQ_AVALON_SLAVE {CAL_DEBUG_EXPORT_MODE_DISABLED} + set_component_parameter_value DIAG_LPDDR3_EXPORT_TG_CFG_AVALON_SLAVE {TG_CFG_AMM_EXPORT_MODE_JTAG} + set_component_parameter_value DIAG_LPDDR3_EX_DESIGN_ISSP_EN {1} + set_component_parameter_value DIAG_LPDDR3_EX_DESIGN_NUM_OF_SLAVES {1} + set_component_parameter_value DIAG_LPDDR3_EX_DESIGN_SEPARATE_RZQS {1} + set_component_parameter_value DIAG_LPDDR3_INTERFACE_ID {0} + set_component_parameter_value DIAG_LPDDR3_SEPARATE_READ_WRITE_ITFS {0} + set_component_parameter_value DIAG_LPDDR3_SIM_CAL_MODE_ENUM {SIM_CAL_MODE_SKIP} + set_component_parameter_value DIAG_LPDDR3_SIM_VERBOSE {1} + set_component_parameter_value DIAG_LPDDR3_SKIP_CA_DESKEW {0} + set_component_parameter_value DIAG_LPDDR3_SKIP_CA_LEVEL {0} + set_component_parameter_value DIAG_LPDDR3_TG2_TEST_DURATION {SHORT} + set_component_parameter_value DIAG_LPDDR3_USER_SIM_MEMORY_PRELOAD {0} + set_component_parameter_value DIAG_LPDDR3_USER_SIM_MEMORY_PRELOAD_PRI_EMIF_FILE {EMIF_PRI_PRELOAD.txt} + set_component_parameter_value DIAG_LPDDR3_USER_SIM_MEMORY_PRELOAD_SEC_EMIF_FILE {EMIF_SEC_PRELOAD.txt} + set_component_parameter_value DIAG_LPDDR3_USER_USE_SIM_MEMORY_VALIDATION_TG {1} + set_component_parameter_value DIAG_LPDDR3_USE_NEW_EFFMON_S10 {0} + set_component_parameter_value DIAG_LPDDR3_USE_TG_AVL_2 {0} + set_component_parameter_value DIAG_LPDDR3_USE_TG_HBM {0} + set_component_parameter_value DIAG_QDR2_ABSTRACT_PHY {0} + set_component_parameter_value DIAG_QDR2_AC_PARITY_ERR {0} + set_component_parameter_value DIAG_QDR2_DISABLE_AFI_P2C_REGISTERS {0} + set_component_parameter_value DIAG_QDR2_EFFICIENCY_MONITOR {EFFMON_MODE_DISABLED} + set_component_parameter_value DIAG_QDR2_ENABLE_DEFAULT_MODE {0} + set_component_parameter_value DIAG_QDR2_ENABLE_USER_MODE {1} + set_component_parameter_value DIAG_QDR2_EXPORT_SEQ_AVALON_HEAD_OF_CHAIN {1} + set_component_parameter_value DIAG_QDR2_EXPORT_SEQ_AVALON_MASTER {0} + set_component_parameter_value DIAG_QDR2_EXPORT_SEQ_AVALON_SLAVE {CAL_DEBUG_EXPORT_MODE_DISABLED} + set_component_parameter_value DIAG_QDR2_EXPORT_TG_CFG_AVALON_SLAVE {TG_CFG_AMM_EXPORT_MODE_JTAG} + set_component_parameter_value DIAG_QDR2_EX_DESIGN_ISSP_EN {1} + set_component_parameter_value DIAG_QDR2_EX_DESIGN_NUM_OF_SLAVES {1} + set_component_parameter_value DIAG_QDR2_EX_DESIGN_SEPARATE_RZQS {1} + set_component_parameter_value DIAG_QDR2_INTERFACE_ID {0} + set_component_parameter_value DIAG_QDR2_SEPARATE_READ_WRITE_ITFS {0} + set_component_parameter_value DIAG_QDR2_SIM_CAL_MODE_ENUM {SIM_CAL_MODE_SKIP} + set_component_parameter_value DIAG_QDR2_SIM_VERBOSE {1} + set_component_parameter_value DIAG_QDR2_TG2_TEST_DURATION {SHORT} + set_component_parameter_value DIAG_QDR2_USER_SIM_MEMORY_PRELOAD {0} + set_component_parameter_value DIAG_QDR2_USER_SIM_MEMORY_PRELOAD_PRI_EMIF_FILE {EMIF_PRI_PRELOAD.txt} + set_component_parameter_value DIAG_QDR2_USER_SIM_MEMORY_PRELOAD_SEC_EMIF_FILE {EMIF_SEC_PRELOAD.txt} + set_component_parameter_value DIAG_QDR2_USER_USE_SIM_MEMORY_VALIDATION_TG {1} + set_component_parameter_value DIAG_QDR2_USE_NEW_EFFMON_S10 {0} + set_component_parameter_value DIAG_QDR2_USE_TG_AVL_2 {0} + set_component_parameter_value DIAG_QDR2_USE_TG_HBM {0} + set_component_parameter_value DIAG_QDR4_ABSTRACT_PHY {0} + set_component_parameter_value DIAG_QDR4_AC_PARITY_ERR {0} + set_component_parameter_value DIAG_QDR4_DISABLE_AFI_P2C_REGISTERS {0} + set_component_parameter_value DIAG_QDR4_EFFICIENCY_MONITOR {EFFMON_MODE_DISABLED} + set_component_parameter_value DIAG_QDR4_ENABLE_DEFAULT_MODE {0} + set_component_parameter_value DIAG_QDR4_ENABLE_USER_MODE {1} + set_component_parameter_value DIAG_QDR4_EXPORT_SEQ_AVALON_HEAD_OF_CHAIN {1} + set_component_parameter_value DIAG_QDR4_EXPORT_SEQ_AVALON_MASTER {0} + set_component_parameter_value DIAG_QDR4_EXPORT_SEQ_AVALON_SLAVE {CAL_DEBUG_EXPORT_MODE_DISABLED} + set_component_parameter_value DIAG_QDR4_EXPORT_TG_CFG_AVALON_SLAVE {TG_CFG_AMM_EXPORT_MODE_JTAG} + set_component_parameter_value DIAG_QDR4_EX_DESIGN_ISSP_EN {1} + set_component_parameter_value DIAG_QDR4_EX_DESIGN_NUM_OF_SLAVES {1} + set_component_parameter_value DIAG_QDR4_EX_DESIGN_SEPARATE_RZQS {1} + set_component_parameter_value DIAG_QDR4_INTERFACE_ID {0} + set_component_parameter_value DIAG_QDR4_SEPARATE_READ_WRITE_ITFS {0} + set_component_parameter_value DIAG_QDR4_SIM_CAL_MODE_ENUM {SIM_CAL_MODE_SKIP} + set_component_parameter_value DIAG_QDR4_SIM_VERBOSE {1} + set_component_parameter_value DIAG_QDR4_SKIP_VREF_CAL {0} + set_component_parameter_value DIAG_QDR4_TG2_TEST_DURATION {SHORT} + set_component_parameter_value DIAG_QDR4_USER_SIM_MEMORY_PRELOAD {0} + set_component_parameter_value DIAG_QDR4_USER_SIM_MEMORY_PRELOAD_PRI_EMIF_FILE {EMIF_PRI_PRELOAD.txt} + set_component_parameter_value DIAG_QDR4_USER_SIM_MEMORY_PRELOAD_SEC_EMIF_FILE {EMIF_SEC_PRELOAD.txt} + set_component_parameter_value DIAG_QDR4_USER_USE_SIM_MEMORY_VALIDATION_TG {1} + set_component_parameter_value DIAG_QDR4_USE_NEW_EFFMON_S10 {0} + set_component_parameter_value DIAG_QDR4_USE_TG_AVL_2 {0} + set_component_parameter_value DIAG_QDR4_USE_TG_HBM {0} + set_component_parameter_value DIAG_RLD2_ABSTRACT_PHY {0} + set_component_parameter_value DIAG_RLD2_AC_PARITY_ERR {0} + set_component_parameter_value DIAG_RLD2_DISABLE_AFI_P2C_REGISTERS {0} + set_component_parameter_value DIAG_RLD2_EFFICIENCY_MONITOR {EFFMON_MODE_DISABLED} + set_component_parameter_value DIAG_RLD2_ENABLE_DEFAULT_MODE {0} + set_component_parameter_value DIAG_RLD2_ENABLE_USER_MODE {1} + set_component_parameter_value DIAG_RLD2_EXPORT_SEQ_AVALON_HEAD_OF_CHAIN {1} + set_component_parameter_value DIAG_RLD2_EXPORT_SEQ_AVALON_MASTER {0} + set_component_parameter_value DIAG_RLD2_EXPORT_SEQ_AVALON_SLAVE {CAL_DEBUG_EXPORT_MODE_DISABLED} + set_component_parameter_value DIAG_RLD2_EXPORT_TG_CFG_AVALON_SLAVE {TG_CFG_AMM_EXPORT_MODE_JTAG} + set_component_parameter_value DIAG_RLD2_EX_DESIGN_ISSP_EN {1} + set_component_parameter_value DIAG_RLD2_EX_DESIGN_NUM_OF_SLAVES {1} + set_component_parameter_value DIAG_RLD2_EX_DESIGN_SEPARATE_RZQS {1} + set_component_parameter_value DIAG_RLD2_INTERFACE_ID {0} + set_component_parameter_value DIAG_RLD2_SEPARATE_READ_WRITE_ITFS {0} + set_component_parameter_value DIAG_RLD2_SIM_CAL_MODE_ENUM {SIM_CAL_MODE_SKIP} + set_component_parameter_value DIAG_RLD2_SIM_VERBOSE {1} + set_component_parameter_value DIAG_RLD2_TG2_TEST_DURATION {SHORT} + set_component_parameter_value DIAG_RLD2_USER_SIM_MEMORY_PRELOAD {0} + set_component_parameter_value DIAG_RLD2_USER_SIM_MEMORY_PRELOAD_PRI_EMIF_FILE {EMIF_PRI_PRELOAD.txt} + set_component_parameter_value DIAG_RLD2_USER_SIM_MEMORY_PRELOAD_SEC_EMIF_FILE {EMIF_SEC_PRELOAD.txt} + set_component_parameter_value DIAG_RLD2_USER_USE_SIM_MEMORY_VALIDATION_TG {1} + set_component_parameter_value DIAG_RLD2_USE_NEW_EFFMON_S10 {0} + set_component_parameter_value DIAG_RLD2_USE_TG_AVL_2 {0} + set_component_parameter_value DIAG_RLD2_USE_TG_HBM {0} + set_component_parameter_value DIAG_RLD3_ABSTRACT_PHY {0} + set_component_parameter_value DIAG_RLD3_AC_PARITY_ERR {0} + set_component_parameter_value DIAG_RLD3_CA_DESKEW_EN {1} + set_component_parameter_value DIAG_RLD3_CA_LEVEL_EN {1} + set_component_parameter_value DIAG_RLD3_DISABLE_AFI_P2C_REGISTERS {0} + set_component_parameter_value DIAG_RLD3_EFFICIENCY_MONITOR {EFFMON_MODE_DISABLED} + set_component_parameter_value DIAG_RLD3_ENABLE_DEFAULT_MODE {0} + set_component_parameter_value DIAG_RLD3_ENABLE_USER_MODE {1} + set_component_parameter_value DIAG_RLD3_EXPORT_SEQ_AVALON_HEAD_OF_CHAIN {1} + set_component_parameter_value DIAG_RLD3_EXPORT_SEQ_AVALON_MASTER {0} + set_component_parameter_value DIAG_RLD3_EXPORT_SEQ_AVALON_SLAVE {CAL_DEBUG_EXPORT_MODE_DISABLED} + set_component_parameter_value DIAG_RLD3_EXPORT_TG_CFG_AVALON_SLAVE {TG_CFG_AMM_EXPORT_MODE_JTAG} + set_component_parameter_value DIAG_RLD3_EX_DESIGN_ISSP_EN {1} + set_component_parameter_value DIAG_RLD3_EX_DESIGN_NUM_OF_SLAVES {1} + set_component_parameter_value DIAG_RLD3_EX_DESIGN_SEPARATE_RZQS {1} + set_component_parameter_value DIAG_RLD3_INTERFACE_ID {0} + set_component_parameter_value DIAG_RLD3_SEPARATE_READ_WRITE_ITFS {0} + set_component_parameter_value DIAG_RLD3_SIM_CAL_MODE_ENUM {SIM_CAL_MODE_SKIP} + set_component_parameter_value DIAG_RLD3_SIM_VERBOSE {1} + set_component_parameter_value DIAG_RLD3_TG2_TEST_DURATION {SHORT} + set_component_parameter_value DIAG_RLD3_USER_SIM_MEMORY_PRELOAD {0} + set_component_parameter_value DIAG_RLD3_USER_SIM_MEMORY_PRELOAD_PRI_EMIF_FILE {EMIF_PRI_PRELOAD.txt} + set_component_parameter_value DIAG_RLD3_USER_SIM_MEMORY_PRELOAD_SEC_EMIF_FILE {EMIF_SEC_PRELOAD.txt} + set_component_parameter_value DIAG_RLD3_USER_USE_SIM_MEMORY_VALIDATION_TG {1} + set_component_parameter_value DIAG_RLD3_USE_NEW_EFFMON_S10 {0} + set_component_parameter_value DIAG_RLD3_USE_TG_AVL_2 {0} + set_component_parameter_value DIAG_RLD3_USE_TG_HBM {0} + set_component_parameter_value DIAG_RS232_UART_BAUDRATE {57600} + set_component_parameter_value DIAG_SEQ_RESET_AUTO_RELEASE {avl} + set_component_parameter_value DIAG_SIM_REGTEST_MODE {0} + set_component_parameter_value DIAG_SOFT_NIOS_CLOCK_FREQUENCY {100} + set_component_parameter_value DIAG_SOFT_NIOS_MODE {SOFT_NIOS_MODE_DISABLED} + set_component_parameter_value DIAG_SYNTH_FOR_SIM {0} + set_component_parameter_value DIAG_TG_AVL_2_NUM_CFG_INTERFACES {0} + set_component_parameter_value DIAG_TIMING_REGTEST_MODE {0} + set_component_parameter_value DIAG_USE_BOARD_DELAY_MODEL {0} + set_component_parameter_value DIAG_USE_RS232_UART {0} + set_component_parameter_value DIAG_VERBOSE_IOAUX {0} + set_component_parameter_value EMIF_0_CONN_TO_CALIP {CALIP_0} + set_component_parameter_value EMIF_0_REF_CLK_SHARING {EXPORTED} + set_component_parameter_value EMIF_0_STORED_PARAM {} + set_component_parameter_value EMIF_10_CONN_TO_CALIP {CALIP_0} + set_component_parameter_value EMIF_10_REF_CLK_SHARING {EXPORTED} + set_component_parameter_value EMIF_10_STORED_PARAM {} + set_component_parameter_value EMIF_11_CONN_TO_CALIP {CALIP_0} + set_component_parameter_value EMIF_11_REF_CLK_SHARING {EXPORTED} + set_component_parameter_value EMIF_11_STORED_PARAM {} + set_component_parameter_value EMIF_12_CONN_TO_CALIP {CALIP_0} + set_component_parameter_value EMIF_12_REF_CLK_SHARING {EXPORTED} + set_component_parameter_value EMIF_12_STORED_PARAM {} + set_component_parameter_value EMIF_13_CONN_TO_CALIP {CALIP_0} + set_component_parameter_value EMIF_13_REF_CLK_SHARING {EXPORTED} + set_component_parameter_value EMIF_13_STORED_PARAM {} + set_component_parameter_value EMIF_14_CONN_TO_CALIP {CALIP_0} + set_component_parameter_value EMIF_14_REF_CLK_SHARING {EXPORTED} + set_component_parameter_value EMIF_14_STORED_PARAM {} + set_component_parameter_value EMIF_15_CONN_TO_CALIP {CALIP_0} + set_component_parameter_value EMIF_15_REF_CLK_SHARING {EXPORTED} + set_component_parameter_value EMIF_15_STORED_PARAM {} + set_component_parameter_value EMIF_1_CONN_TO_CALIP {CALIP_0} + set_component_parameter_value EMIF_1_REF_CLK_SHARING {EXPORTED} + set_component_parameter_value EMIF_1_STORED_PARAM {} + set_component_parameter_value EMIF_2_CONN_TO_CALIP {CALIP_0} + set_component_parameter_value EMIF_2_REF_CLK_SHARING {EXPORTED} + set_component_parameter_value EMIF_2_STORED_PARAM {} + set_component_parameter_value EMIF_3_CONN_TO_CALIP {CALIP_0} + set_component_parameter_value EMIF_3_REF_CLK_SHARING {EXPORTED} + set_component_parameter_value EMIF_3_STORED_PARAM {} + set_component_parameter_value EMIF_4_CONN_TO_CALIP {CALIP_0} + set_component_parameter_value EMIF_4_REF_CLK_SHARING {EXPORTED} + set_component_parameter_value EMIF_4_STORED_PARAM {} + set_component_parameter_value EMIF_5_CONN_TO_CALIP {CALIP_0} + set_component_parameter_value EMIF_5_REF_CLK_SHARING {EXPORTED} + set_component_parameter_value EMIF_5_STORED_PARAM {} + set_component_parameter_value EMIF_6_CONN_TO_CALIP {CALIP_0} + set_component_parameter_value EMIF_6_REF_CLK_SHARING {EXPORTED} + set_component_parameter_value EMIF_6_STORED_PARAM {} + set_component_parameter_value EMIF_7_CONN_TO_CALIP {CALIP_0} + set_component_parameter_value EMIF_7_REF_CLK_SHARING {EXPORTED} + set_component_parameter_value EMIF_7_STORED_PARAM {} + set_component_parameter_value EMIF_8_CONN_TO_CALIP {CALIP_0} + set_component_parameter_value EMIF_8_REF_CLK_SHARING {EXPORTED} + set_component_parameter_value EMIF_8_STORED_PARAM {} + set_component_parameter_value EMIF_9_CONN_TO_CALIP {CALIP_0} + set_component_parameter_value EMIF_9_REF_CLK_SHARING {EXPORTED} + set_component_parameter_value EMIF_9_STORED_PARAM {} + set_component_parameter_value EX_DESIGN_GUI_DDR3_GEN_BSI {0} + set_component_parameter_value EX_DESIGN_GUI_DDR3_GEN_CDC {0} + set_component_parameter_value EX_DESIGN_GUI_DDR3_GEN_SIM {1} + set_component_parameter_value EX_DESIGN_GUI_DDR3_GEN_SYNTH {1} + set_component_parameter_value EX_DESIGN_GUI_DDR3_HDL_FORMAT {HDL_FORMAT_VERILOG} + set_component_parameter_value EX_DESIGN_GUI_DDR3_PREV_PRESET {TARGET_DEV_KIT_NONE} + set_component_parameter_value EX_DESIGN_GUI_DDR3_SEL_DESIGN {AVAIL_EX_DESIGNS_GEN_DESIGN} + set_component_parameter_value EX_DESIGN_GUI_DDR3_TARGET_DEV_KIT {TARGET_DEV_KIT_NONE} + set_component_parameter_value EX_DESIGN_GUI_DDR4_GEN_BSI {0} + set_component_parameter_value EX_DESIGN_GUI_DDR4_GEN_CDC {0} + set_component_parameter_value EX_DESIGN_GUI_DDR4_GEN_SIM {1} + set_component_parameter_value EX_DESIGN_GUI_DDR4_GEN_SYNTH {1} + set_component_parameter_value EX_DESIGN_GUI_DDR4_HDL_FORMAT {HDL_FORMAT_VERILOG} + set_component_parameter_value EX_DESIGN_GUI_DDR4_PREV_PRESET {TARGET_DEV_KIT_NONE} + set_component_parameter_value EX_DESIGN_GUI_DDR4_SEL_DESIGN {AVAIL_EX_DESIGNS_GEN_DESIGN} + set_component_parameter_value EX_DESIGN_GUI_DDR4_TARGET_DEV_KIT {TARGET_DEV_KIT_NONE} + set_component_parameter_value EX_DESIGN_GUI_DDRT_GEN_BSI {0} + set_component_parameter_value EX_DESIGN_GUI_DDRT_GEN_CDC {0} + set_component_parameter_value EX_DESIGN_GUI_DDRT_GEN_SIM {1} + set_component_parameter_value EX_DESIGN_GUI_DDRT_GEN_SYNTH {1} + set_component_parameter_value EX_DESIGN_GUI_DDRT_HDL_FORMAT {HDL_FORMAT_VERILOG} + set_component_parameter_value EX_DESIGN_GUI_DDRT_PREV_PRESET {TARGET_DEV_KIT_NONE} + set_component_parameter_value EX_DESIGN_GUI_DDRT_SEL_DESIGN {AVAIL_EX_DESIGNS_GEN_DESIGN} + set_component_parameter_value EX_DESIGN_GUI_DDRT_TARGET_DEV_KIT {TARGET_DEV_KIT_NONE} + set_component_parameter_value EX_DESIGN_GUI_LPDDR3_GEN_BSI {0} + set_component_parameter_value EX_DESIGN_GUI_LPDDR3_GEN_CDC {0} + set_component_parameter_value EX_DESIGN_GUI_LPDDR3_GEN_SIM {1} + set_component_parameter_value EX_DESIGN_GUI_LPDDR3_GEN_SYNTH {1} + set_component_parameter_value EX_DESIGN_GUI_LPDDR3_HDL_FORMAT {HDL_FORMAT_VERILOG} + set_component_parameter_value EX_DESIGN_GUI_LPDDR3_PREV_PRESET {TARGET_DEV_KIT_NONE} + set_component_parameter_value EX_DESIGN_GUI_LPDDR3_SEL_DESIGN {AVAIL_EX_DESIGNS_GEN_DESIGN} + set_component_parameter_value EX_DESIGN_GUI_LPDDR3_TARGET_DEV_KIT {TARGET_DEV_KIT_NONE} + set_component_parameter_value EX_DESIGN_GUI_QDR2_GEN_BSI {0} + set_component_parameter_value EX_DESIGN_GUI_QDR2_GEN_CDC {0} + set_component_parameter_value EX_DESIGN_GUI_QDR2_GEN_SIM {1} + set_component_parameter_value EX_DESIGN_GUI_QDR2_GEN_SYNTH {1} + set_component_parameter_value EX_DESIGN_GUI_QDR2_HDL_FORMAT {HDL_FORMAT_VERILOG} + set_component_parameter_value EX_DESIGN_GUI_QDR2_PREV_PRESET {TARGET_DEV_KIT_NONE} + set_component_parameter_value EX_DESIGN_GUI_QDR2_SEL_DESIGN {AVAIL_EX_DESIGNS_GEN_DESIGN} + set_component_parameter_value EX_DESIGN_GUI_QDR2_TARGET_DEV_KIT {TARGET_DEV_KIT_NONE} + set_component_parameter_value EX_DESIGN_GUI_QDR4_GEN_BSI {0} + set_component_parameter_value EX_DESIGN_GUI_QDR4_GEN_CDC {0} + set_component_parameter_value EX_DESIGN_GUI_QDR4_GEN_SIM {1} + set_component_parameter_value EX_DESIGN_GUI_QDR4_GEN_SYNTH {1} + set_component_parameter_value EX_DESIGN_GUI_QDR4_HDL_FORMAT {HDL_FORMAT_VERILOG} + set_component_parameter_value EX_DESIGN_GUI_QDR4_PREV_PRESET {TARGET_DEV_KIT_NONE} + set_component_parameter_value EX_DESIGN_GUI_QDR4_SEL_DESIGN {AVAIL_EX_DESIGNS_GEN_DESIGN} + set_component_parameter_value EX_DESIGN_GUI_QDR4_TARGET_DEV_KIT {TARGET_DEV_KIT_NONE} + set_component_parameter_value EX_DESIGN_GUI_RLD2_GEN_BSI {0} + set_component_parameter_value EX_DESIGN_GUI_RLD2_GEN_CDC {0} + set_component_parameter_value EX_DESIGN_GUI_RLD2_GEN_SIM {1} + set_component_parameter_value EX_DESIGN_GUI_RLD2_GEN_SYNTH {1} + set_component_parameter_value EX_DESIGN_GUI_RLD2_HDL_FORMAT {HDL_FORMAT_VERILOG} + set_component_parameter_value EX_DESIGN_GUI_RLD2_PREV_PRESET {TARGET_DEV_KIT_NONE} + set_component_parameter_value EX_DESIGN_GUI_RLD2_SEL_DESIGN {AVAIL_EX_DESIGNS_GEN_DESIGN} + set_component_parameter_value EX_DESIGN_GUI_RLD2_TARGET_DEV_KIT {TARGET_DEV_KIT_NONE} + set_component_parameter_value EX_DESIGN_GUI_RLD3_GEN_BSI {0} + set_component_parameter_value EX_DESIGN_GUI_RLD3_GEN_CDC {0} + set_component_parameter_value EX_DESIGN_GUI_RLD3_GEN_SIM {1} + set_component_parameter_value EX_DESIGN_GUI_RLD3_GEN_SYNTH {1} + set_component_parameter_value EX_DESIGN_GUI_RLD3_HDL_FORMAT {HDL_FORMAT_VERILOG} + set_component_parameter_value EX_DESIGN_GUI_RLD3_PREV_PRESET {TARGET_DEV_KIT_NONE} + set_component_parameter_value EX_DESIGN_GUI_RLD3_SEL_DESIGN {AVAIL_EX_DESIGNS_GEN_DESIGN} + set_component_parameter_value EX_DESIGN_GUI_RLD3_TARGET_DEV_KIT {TARGET_DEV_KIT_NONE} + set_component_parameter_value INTERNAL_TESTING_MODE {0} + set_component_parameter_value IS_ED_SLAVE {0} + set_component_parameter_value MEM_DDR3_ALERT_N_DQS_GROUP {0} + set_component_parameter_value MEM_DDR3_ALERT_N_PLACEMENT_ENUM {DDR3_ALERT_N_PLACEMENT_AC_LANES} + set_component_parameter_value MEM_DDR3_ASR_ENUM {DDR3_ASR_MANUAL} + set_component_parameter_value MEM_DDR3_ATCL_ENUM {DDR3_ATCL_DISABLED} + set_component_parameter_value MEM_DDR3_BANK_ADDR_WIDTH {3} + set_component_parameter_value MEM_DDR3_BL_ENUM {DDR3_BL_BL8} + set_component_parameter_value MEM_DDR3_BT_ENUM {DDR3_BT_SEQUENTIAL} + set_component_parameter_value MEM_DDR3_CFG_GEN_DBE {0} + set_component_parameter_value MEM_DDR3_CFG_GEN_SBE {0} + set_component_parameter_value MEM_DDR3_CKE_PER_DIMM {1} + set_component_parameter_value MEM_DDR3_CK_WIDTH {1} + set_component_parameter_value MEM_DDR3_COL_ADDR_WIDTH {10} + set_component_parameter_value MEM_DDR3_DISCRETE_CS_WIDTH {1} + set_component_parameter_value MEM_DDR3_DISCRETE_MIRROR_ADDRESSING_EN {0} + set_component_parameter_value MEM_DDR3_DLL_EN {1} + set_component_parameter_value MEM_DDR3_DM_EN {1} + set_component_parameter_value MEM_DDR3_DQ_PER_DQS {8} + set_component_parameter_value MEM_DDR3_DQ_WIDTH {72} + set_component_parameter_value MEM_DDR3_DRV_STR_ENUM {DDR3_DRV_STR_RZQ_7} + set_component_parameter_value MEM_DDR3_FORMAT_ENUM {MEM_FORMAT_UDIMM} + set_component_parameter_value MEM_DDR3_HIDE_ADV_MR_SETTINGS {1} + set_component_parameter_value MEM_DDR3_LRDIMM_EXTENDED_CONFIG {000000000000000000} + set_component_parameter_value MEM_DDR3_MIRROR_ADDRESSING_EN {1} + set_component_parameter_value MEM_DDR3_NUM_OF_DIMMS {1} + set_component_parameter_value MEM_DDR3_PD_ENUM {DDR3_PD_OFF} + set_component_parameter_value MEM_DDR3_RANKS_PER_DIMM {1} + set_component_parameter_value MEM_DDR3_RDIMM_CONFIG {0000000000000000} + set_component_parameter_value MEM_DDR3_ROW_ADDR_WIDTH {15} + set_component_parameter_value MEM_DDR3_RTT_NOM_ENUM {DDR3_RTT_NOM_ODT_DISABLED} + set_component_parameter_value MEM_DDR3_RTT_WR_ENUM {DDR3_RTT_WR_RZQ_4} + set_component_parameter_value MEM_DDR3_R_ODT0_1X1 {off} + set_component_parameter_value MEM_DDR3_R_ODT0_2X2 {off off} + set_component_parameter_value MEM_DDR3_R_ODT0_4X2 {off off on on} + set_component_parameter_value MEM_DDR3_R_ODT0_4X4 {off off on off} + set_component_parameter_value MEM_DDR3_R_ODT1_2X2 {off off} + set_component_parameter_value MEM_DDR3_R_ODT1_4X2 {on on off off} + set_component_parameter_value MEM_DDR3_R_ODT1_4X4 {off off off on} + set_component_parameter_value MEM_DDR3_R_ODT2_4X4 {on off off off} + set_component_parameter_value MEM_DDR3_R_ODT3_4X4 {off on off off} + set_component_parameter_value MEM_DDR3_R_ODTN_1X1 {Rank\ 0} + set_component_parameter_value MEM_DDR3_R_ODTN_2X2 {Rank\ 0 Rank\ 1} + set_component_parameter_value MEM_DDR3_R_ODTN_4X2 {Rank\ 0 Rank\ 1 Rank\ 2 Rank\ 3} + set_component_parameter_value MEM_DDR3_R_ODTN_4X4 {Rank\ 0 Rank\ 1 Rank\ 2 Rank\ 3} + set_component_parameter_value MEM_DDR3_SPEEDBIN_ENUM {DDR3_SPEEDBIN_2133} + set_component_parameter_value MEM_DDR3_SRT_ENUM {DDR3_SRT_NORMAL} + set_component_parameter_value MEM_DDR3_TCL {14} + set_component_parameter_value MEM_DDR3_TDH_DC_MV {100} + set_component_parameter_value MEM_DDR3_TDH_PS {55} + set_component_parameter_value MEM_DDR3_TDQSCK_PS {180} + set_component_parameter_value MEM_DDR3_TDQSQ_PS {75} + set_component_parameter_value MEM_DDR3_TDQSS_CYC {0.27} + set_component_parameter_value MEM_DDR3_TDSH_CYC {0.18} + set_component_parameter_value MEM_DDR3_TDSS_CYC {0.18} + set_component_parameter_value MEM_DDR3_TDS_AC_MV {135} + set_component_parameter_value MEM_DDR3_TDS_PS {53} + set_component_parameter_value MEM_DDR3_TFAW_NS {25.0} + set_component_parameter_value MEM_DDR3_TIH_DC_MV {100} + set_component_parameter_value MEM_DDR3_TIH_PS {95} + set_component_parameter_value MEM_DDR3_TINIT_US {500} + set_component_parameter_value MEM_DDR3_TIS_AC_MV {135} + set_component_parameter_value MEM_DDR3_TIS_PS {60} + set_component_parameter_value MEM_DDR3_TMRD_CK_CYC {4} + set_component_parameter_value MEM_DDR3_TQH_CYC {0.38} + set_component_parameter_value MEM_DDR3_TQSH_CYC {0.4} + set_component_parameter_value MEM_DDR3_TRAS_NS {33.0} + set_component_parameter_value MEM_DDR3_TRCD_NS {13.09} + set_component_parameter_value MEM_DDR3_TREFI_US {7.8} + set_component_parameter_value MEM_DDR3_TRFC_NS {160.0} + set_component_parameter_value MEM_DDR3_TRP_NS {13.09} + set_component_parameter_value MEM_DDR3_TRRD_CYC {6} + set_component_parameter_value MEM_DDR3_TRTP_CYC {8} + set_component_parameter_value MEM_DDR3_TWLH_PS {125.0} + set_component_parameter_value MEM_DDR3_TWLS_PS {125.0} + set_component_parameter_value MEM_DDR3_TWR_NS {15.0} + set_component_parameter_value MEM_DDR3_TWTR_CYC {8} + set_component_parameter_value MEM_DDR3_USE_DEFAULT_ODT {1} + set_component_parameter_value MEM_DDR3_WTCL {10} + set_component_parameter_value MEM_DDR3_W_ODT0_1X1 {on} + set_component_parameter_value MEM_DDR3_W_ODT0_2X2 {on off} + set_component_parameter_value MEM_DDR3_W_ODT0_4X2 {off off on on} + set_component_parameter_value MEM_DDR3_W_ODT0_4X4 {on off on off} + set_component_parameter_value MEM_DDR3_W_ODT1_2X2 {off on} + set_component_parameter_value MEM_DDR3_W_ODT1_4X2 {on on off off} + set_component_parameter_value MEM_DDR3_W_ODT1_4X4 {off on off on} + set_component_parameter_value MEM_DDR3_W_ODT2_4X4 {on off on off} + set_component_parameter_value MEM_DDR3_W_ODT3_4X4 {off on off on} + set_component_parameter_value MEM_DDR3_W_ODTN_1X1 {Rank\ 0} + set_component_parameter_value MEM_DDR3_W_ODTN_2X2 {Rank\ 0 Rank\ 1} + set_component_parameter_value MEM_DDR3_W_ODTN_4X2 {Rank\ 0 Rank\ 1 Rank\ 2 Rank\ 3} + set_component_parameter_value MEM_DDR3_W_ODTN_4X4 {Rank\ 0 Rank\ 1 Rank\ 2 Rank\ 3} + set_component_parameter_value MEM_DDR4_AC_PARITY_LATENCY {DDR4_AC_PARITY_LATENCY_DISABLE} + set_component_parameter_value MEM_DDR4_AC_PERSISTENT_ERROR {0} + set_component_parameter_value MEM_DDR4_ALERT_N_AC_LANE {0} + set_component_parameter_value MEM_DDR4_ALERT_N_AC_PIN {0} + set_component_parameter_value MEM_DDR4_ALERT_N_DQS_GROUP {0} + set_component_parameter_value MEM_DDR4_ALERT_N_PLACEMENT_ENUM {DDR4_ALERT_N_PLACEMENT_AUTO} + set_component_parameter_value MEM_DDR4_ALERT_PAR_EN {1} + set_component_parameter_value MEM_DDR4_ASR_ENUM {DDR4_ASR_MANUAL_NORMAL} + set_component_parameter_value MEM_DDR4_ATCL_ENUM {DDR4_ATCL_DISABLED} + set_component_parameter_value MEM_DDR4_BANK_ADDR_WIDTH {2} + set_component_parameter_value MEM_DDR4_BANK_GROUP_WIDTH {2} + set_component_parameter_value MEM_DDR4_BL_ENUM {DDR4_BL_BL8} + set_component_parameter_value MEM_DDR4_BT_ENUM {DDR4_BT_SEQUENTIAL} + set_component_parameter_value MEM_DDR4_CAL_MODE {0} + set_component_parameter_value MEM_DDR4_CFG_GEN_DBE {0} + set_component_parameter_value MEM_DDR4_CFG_GEN_SBE {0} + set_component_parameter_value MEM_DDR4_CHIP_ID_WIDTH {0} + set_component_parameter_value MEM_DDR4_CKE_PER_DIMM {1} + set_component_parameter_value MEM_DDR4_CK_WIDTH {1} + set_component_parameter_value MEM_DDR4_COL_ADDR_WIDTH {10} + set_component_parameter_value MEM_DDR4_DB_DQ_DRV_ENUM {DDR4_DB_DRV_STR_RZQ_7} + set_component_parameter_value MEM_DDR4_DB_RTT_NOM_ENUM {DDR4_DB_RTT_NOM_ODT_DISABLED} + set_component_parameter_value MEM_DDR4_DB_RTT_PARK_ENUM {DDR4_DB_RTT_PARK_ODT_DISABLED} + set_component_parameter_value MEM_DDR4_DB_RTT_WR_ENUM {DDR4_DB_RTT_WR_RZQ_3} + set_component_parameter_value MEM_DDR4_DEFAULT_VREFOUT {1} + set_component_parameter_value MEM_DDR4_DISCRETE_CS_WIDTH {1} + set_component_parameter_value MEM_DDR4_DISCRETE_MIRROR_ADDRESSING_EN {0} + set_component_parameter_value MEM_DDR4_DLL_EN {1} + set_component_parameter_value MEM_DDR4_DM_EN {1} + set_component_parameter_value MEM_DDR4_DQ_PER_DQS {8} + set_component_parameter_value MEM_DDR4_DQ_WIDTH {64} + set_component_parameter_value MEM_DDR4_DRV_STR_ENUM {DDR4_DRV_STR_RZQ_7} + set_component_parameter_value MEM_DDR4_FINE_GRANULARITY_REFRESH {DDR4_FINE_REFRESH_FIXED_1X} + set_component_parameter_value MEM_DDR4_FORMAT_ENUM {MEM_FORMAT_RDIMM} + set_component_parameter_value MEM_DDR4_GEARDOWN {DDR4_GEARDOWN_HR} + set_component_parameter_value MEM_DDR4_HIDE_ADV_MR_SETTINGS {1} + set_component_parameter_value MEM_DDR4_INTEL_DEFAULT_TERM {1} + set_component_parameter_value MEM_DDR4_INTERNAL_VREFDQ_MONITOR {0} + set_component_parameter_value MEM_DDR4_LRDIMM_ODT_LESS_BS {0} + set_component_parameter_value MEM_DDR4_LRDIMM_ODT_LESS_BS_PARK_OHM {240} + set_component_parameter_value MEM_DDR4_LRDIMM_VREFDQ_VALUE {} + set_component_parameter_value MEM_DDR4_MAX_POWERDOWN {0} + set_component_parameter_value MEM_DDR4_MIRROR_ADDRESSING_EN {1} + set_component_parameter_value MEM_DDR4_MPR_READ_FORMAT {DDR4_MPR_READ_FORMAT_SERIAL} + set_component_parameter_value MEM_DDR4_NUM_OF_DIMMS {1} + set_component_parameter_value MEM_DDR4_ODT_IN_POWERDOWN {1} + set_component_parameter_value MEM_DDR4_PER_DRAM_ADDR {0} + set_component_parameter_value MEM_DDR4_RANKS_PER_DIMM {1} + set_component_parameter_value MEM_DDR4_RCD_CA_IBT_ENUM {DDR4_RCD_CA_IBT_100} + set_component_parameter_value MEM_DDR4_RCD_CKE_IBT_ENUM {DDR4_RCD_CKE_IBT_100} + set_component_parameter_value MEM_DDR4_RCD_CS_IBT_ENUM {DDR4_RCD_CS_IBT_100} + set_component_parameter_value MEM_DDR4_RCD_ODT_IBT_ENUM {DDR4_RCD_ODT_IBT_100} + set_component_parameter_value MEM_DDR4_READ_DBI {1} + set_component_parameter_value MEM_DDR4_READ_PREAMBLE {2} + set_component_parameter_value MEM_DDR4_READ_PREAMBLE_TRAINING {0} + set_component_parameter_value MEM_DDR4_ROW_ADDR_WIDTH {16} + set_component_parameter_value MEM_DDR4_RTT_NOM_ENUM {DDR4_RTT_NOM_RZQ_4} + set_component_parameter_value MEM_DDR4_RTT_PARK {DDR4_RTT_PARK_ODT_DISABLED} + set_component_parameter_value MEM_DDR4_RTT_WR_ENUM {DDR4_RTT_WR_ODT_DISABLED} + set_component_parameter_value MEM_DDR4_R_ODT0_1X1 {off} + set_component_parameter_value MEM_DDR4_R_ODT0_2X2 {off off} + set_component_parameter_value MEM_DDR4_R_ODT0_4X2 {off off on on} + set_component_parameter_value MEM_DDR4_R_ODT0_4X4 {off off on off} + set_component_parameter_value MEM_DDR4_R_ODT1_2X2 {off off} + set_component_parameter_value MEM_DDR4_R_ODT1_4X2 {on on off off} + set_component_parameter_value MEM_DDR4_R_ODT1_4X4 {off off off on} + set_component_parameter_value MEM_DDR4_R_ODT2_4X4 {on off off off} + set_component_parameter_value MEM_DDR4_R_ODT3_4X4 {off on off off} + set_component_parameter_value MEM_DDR4_R_ODTN_1X1 {Rank\ 0} + set_component_parameter_value MEM_DDR4_R_ODTN_2X2 {Rank\ 0 Rank\ 1} + set_component_parameter_value MEM_DDR4_R_ODTN_4X2 {Rank\ 0 Rank\ 1 Rank\ 2 Rank\ 3} + set_component_parameter_value MEM_DDR4_R_ODTN_4X4 {Rank\ 0 Rank\ 1 Rank\ 2 Rank\ 3} + set_component_parameter_value MEM_DDR4_SELF_RFSH_ABORT {0} + set_component_parameter_value MEM_DDR4_SPD_133_RCD_DB_VENDOR_LSB {0} + set_component_parameter_value MEM_DDR4_SPD_134_RCD_DB_VENDOR_MSB {0} + set_component_parameter_value MEM_DDR4_SPD_135_RCD_REV {0} + set_component_parameter_value MEM_DDR4_SPD_137_RCD_CA_DRV {101} + set_component_parameter_value MEM_DDR4_SPD_138_RCD_CK_DRV {5} + set_component_parameter_value MEM_DDR4_SPD_139_DB_REV {0} + set_component_parameter_value MEM_DDR4_SPD_140_DRAM_VREFDQ_R0 {29} + set_component_parameter_value MEM_DDR4_SPD_141_DRAM_VREFDQ_R1 {29} + set_component_parameter_value MEM_DDR4_SPD_142_DRAM_VREFDQ_R2 {29} + set_component_parameter_value MEM_DDR4_SPD_143_DRAM_VREFDQ_R3 {29} + set_component_parameter_value MEM_DDR4_SPD_144_DB_VREFDQ {37} + set_component_parameter_value MEM_DDR4_SPD_145_DB_MDQ_DRV {21} + set_component_parameter_value MEM_DDR4_SPD_148_DRAM_DRV {0} + set_component_parameter_value MEM_DDR4_SPD_149_DRAM_RTT_WR_NOM {20} + set_component_parameter_value MEM_DDR4_SPD_152_DRAM_RTT_PARK {39} + set_component_parameter_value MEM_DDR4_SPD_155_DB_VREFDQ_RANGE {0} + set_component_parameter_value MEM_DDR4_SPEEDBIN_ENUM {DDR4_SPEEDBIN_2666} + set_component_parameter_value MEM_DDR4_TCCD_L_CYC {6} + set_component_parameter_value MEM_DDR4_TCCD_S_CYC {4} + set_component_parameter_value MEM_DDR4_TCL {23} + set_component_parameter_value MEM_DDR4_TDIVW_DJ_CYC {0.1} + set_component_parameter_value MEM_DDR4_TDIVW_TOTAL_UI {0.2} + set_component_parameter_value MEM_DDR4_TDQSCK_PS {175} + set_component_parameter_value MEM_DDR4_TDQSQ_PS {66} + set_component_parameter_value MEM_DDR4_TDQSQ_UI {0.14} + set_component_parameter_value MEM_DDR4_TDQSS_CYC {0.27} + set_component_parameter_value MEM_DDR4_TDSH_CYC {0.18} + set_component_parameter_value MEM_DDR4_TDSS_CYC {0.18} + set_component_parameter_value MEM_DDR4_TDVWP_UI {0.72} + set_component_parameter_value MEM_DDR4_TEMP_CONTROLLED_RFSH_ENA {0} + set_component_parameter_value MEM_DDR4_TEMP_CONTROLLED_RFSH_RANGE {DDR4_TEMP_CONTROLLED_RFSH_NORMAL} + set_component_parameter_value MEM_DDR4_TEMP_SENSOR_READOUT {0} + set_component_parameter_value MEM_DDR4_TFAW_DLR_CYC {16} + set_component_parameter_value MEM_DDR4_TFAW_NS {21.0} + set_component_parameter_value MEM_DDR4_TIH_DC_MV {75} + set_component_parameter_value MEM_DDR4_TIH_PS {87} + set_component_parameter_value MEM_DDR4_TINIT_US {500} + set_component_parameter_value MEM_DDR4_TIS_AC_MV {100} + set_component_parameter_value MEM_DDR4_TIS_PS {62} + set_component_parameter_value MEM_DDR4_TMRD_CK_CYC {8} + set_component_parameter_value MEM_DDR4_TQH_CYC {0.38} + set_component_parameter_value MEM_DDR4_TQH_UI {0.74} + set_component_parameter_value MEM_DDR4_TQSH_CYC {0.4} + set_component_parameter_value MEM_DDR4_TRAS_NS {32.0} + set_component_parameter_value MEM_DDR4_TRCD_NS {14.16} + set_component_parameter_value MEM_DDR4_TREFI_US {7.8} + set_component_parameter_value MEM_DDR4_TRFC_DLR_NS {90.0} + set_component_parameter_value MEM_DDR4_TRFC_NS {350.0} + set_component_parameter_value MEM_DDR4_TRP_NS {14.16} + set_component_parameter_value MEM_DDR4_TRRD_DLR_CYC {4} + set_component_parameter_value MEM_DDR4_TRRD_L_CYC {6} + set_component_parameter_value MEM_DDR4_TRRD_S_CYC {4} + set_component_parameter_value MEM_DDR4_TWLH_CYC {0.13} + set_component_parameter_value MEM_DDR4_TWLH_PS {0.0} + set_component_parameter_value MEM_DDR4_TWLS_CYC {0.13} + set_component_parameter_value MEM_DDR4_TWLS_PS {0.0} + set_component_parameter_value MEM_DDR4_TWR_NS {15.0} + set_component_parameter_value MEM_DDR4_TWTR_L_CYC {9} + set_component_parameter_value MEM_DDR4_TWTR_S_CYC {3} + set_component_parameter_value MEM_DDR4_USER_VREFDQ_TRAINING_RANGE {DDR4_VREFDQ_TRAINING_RANGE_1} + set_component_parameter_value MEM_DDR4_USER_VREFDQ_TRAINING_VALUE {56.0} + set_component_parameter_value MEM_DDR4_USE_DEFAULT_ODT {1} + set_component_parameter_value MEM_DDR4_VDIVW_TOTAL {130} + set_component_parameter_value MEM_DDR4_WRITE_CRC {0} + set_component_parameter_value MEM_DDR4_WRITE_DBI {0} + set_component_parameter_value MEM_DDR4_WRITE_PREAMBLE {1} + set_component_parameter_value MEM_DDR4_WTCL {18} + set_component_parameter_value MEM_DDR4_W_ODT0_1X1 {on} + set_component_parameter_value MEM_DDR4_W_ODT0_2X2 {on off} + set_component_parameter_value MEM_DDR4_W_ODT0_4X2 {off off on on} + set_component_parameter_value MEM_DDR4_W_ODT0_4X4 {on off on off} + set_component_parameter_value MEM_DDR4_W_ODT1_2X2 {off on} + set_component_parameter_value MEM_DDR4_W_ODT1_4X2 {on on off off} + set_component_parameter_value MEM_DDR4_W_ODT1_4X4 {off on off on} + set_component_parameter_value MEM_DDR4_W_ODT2_4X4 {on off on off} + set_component_parameter_value MEM_DDR4_W_ODT3_4X4 {off on off on} + set_component_parameter_value MEM_DDR4_W_ODTN_1X1 {Rank\ 0} + set_component_parameter_value MEM_DDR4_W_ODTN_2X2 {Rank\ 0 Rank\ 1} + set_component_parameter_value MEM_DDR4_W_ODTN_4X2 {Rank\ 0 Rank\ 1 Rank\ 2 Rank\ 3} + set_component_parameter_value MEM_DDR4_W_ODTN_4X4 {Rank\ 0 Rank\ 1 Rank\ 2 Rank\ 3} + set_component_parameter_value MEM_DDRT_AC_PARITY_LATENCY {DDRT_AC_PARITY_LATENCY_DISABLE} + set_component_parameter_value MEM_DDRT_AC_PERSISTENT_ERROR {0} + set_component_parameter_value MEM_DDRT_ALERT_N_AC_LANE {0} + set_component_parameter_value MEM_DDRT_ALERT_N_AC_PIN {0} + set_component_parameter_value MEM_DDRT_ALERT_N_DQS_GROUP {0} + set_component_parameter_value MEM_DDRT_ALERT_N_PLACEMENT_ENUM {DDRT_ALERT_N_PLACEMENT_AUTO} + set_component_parameter_value MEM_DDRT_ALERT_PAR_EN {1} + set_component_parameter_value MEM_DDRT_ASR_ENUM {DDRT_ASR_MANUAL_NORMAL} + set_component_parameter_value MEM_DDRT_ATCL_ENUM {DDRT_ATCL_DISABLED} + set_component_parameter_value MEM_DDRT_BANK_ADDR_WIDTH {2} + set_component_parameter_value MEM_DDRT_BANK_GROUP_WIDTH {2} + set_component_parameter_value MEM_DDRT_BL_ENUM {DDRT_BL_BL8} + set_component_parameter_value MEM_DDRT_BT_ENUM {DDRT_BT_SEQUENTIAL} + set_component_parameter_value MEM_DDRT_CAL_MODE {0} + set_component_parameter_value MEM_DDRT_CFG_GEN_DBE {0} + set_component_parameter_value MEM_DDRT_CFG_GEN_SBE {0} + set_component_parameter_value MEM_DDRT_CKE_PER_DIMM {1} + set_component_parameter_value MEM_DDRT_COL_ADDR_WIDTH {10} + set_component_parameter_value MEM_DDRT_DB_DQ_DRV_ENUM {DDRT_DB_DRV_STR_RZQ_7} + set_component_parameter_value MEM_DDRT_DB_RTT_NOM_ENUM {DDRT_DB_RTT_NOM_ODT_DISABLED} + set_component_parameter_value MEM_DDRT_DB_RTT_PARK_ENUM {DDRT_DB_RTT_PARK_ODT_DISABLED} + set_component_parameter_value MEM_DDRT_DB_RTT_WR_ENUM {DDRT_DB_RTT_WR_RZQ_4} + set_component_parameter_value MEM_DDRT_DEFAULT_ADDED_LATENCY {1} + set_component_parameter_value MEM_DDRT_DEFAULT_PREAMBLE {1} + set_component_parameter_value MEM_DDRT_DEFAULT_VREFOUT {1} + set_component_parameter_value MEM_DDRT_DISCRETE_CS_WIDTH {1} + set_component_parameter_value MEM_DDRT_DISCRETE_MIRROR_ADDRESSING_EN {0} + set_component_parameter_value MEM_DDRT_DLL_EN {1} + set_component_parameter_value MEM_DDRT_DM_EN {0} + set_component_parameter_value MEM_DDRT_DQ_PER_DQS {4} + set_component_parameter_value MEM_DDRT_DQ_WIDTH {72} + set_component_parameter_value MEM_DDRT_DRV_STR_ENUM {DDRT_DRV_STR_RZQ_7} + set_component_parameter_value MEM_DDRT_FINE_GRANULARITY_REFRESH {DDRT_FINE_REFRESH_FIXED_1X} + set_component_parameter_value MEM_DDRT_FORMAT_ENUM {MEM_FORMAT_LRDIMM} + set_component_parameter_value MEM_DDRT_GEARDOWN {DDRT_GEARDOWN_HR} + set_component_parameter_value MEM_DDRT_HIDE_ADV_MR_SETTINGS {1} + set_component_parameter_value MEM_DDRT_HIDE_LATENCY_SETTINGS {1} + set_component_parameter_value MEM_DDRT_I2C_DIMM_0_SA {0} + set_component_parameter_value MEM_DDRT_I2C_DIMM_1_SA {1} + set_component_parameter_value MEM_DDRT_I2C_DIMM_2_SA {2} + set_component_parameter_value MEM_DDRT_I2C_DIMM_3_SA {3} + set_component_parameter_value MEM_DDRT_INTERNAL_VREFDQ_MONITOR {0} + set_component_parameter_value MEM_DDRT_LRDIMM_ODT_LESS_BS {0} + set_component_parameter_value MEM_DDRT_LRDIMM_ODT_LESS_BS_PARK_OHM {240} + set_component_parameter_value MEM_DDRT_LRDIMM_VREFDQ_VALUE {} + set_component_parameter_value MEM_DDRT_MAX_POWERDOWN {0} + set_component_parameter_value MEM_DDRT_MIRROR_ADDRESSING_EN {1} + set_component_parameter_value MEM_DDRT_MPR_READ_FORMAT {DDRT_MPR_READ_FORMAT_SERIAL} + set_component_parameter_value MEM_DDRT_NUM_OF_DIMMS {1} + set_component_parameter_value MEM_DDRT_ODT_IN_POWERDOWN {1} + set_component_parameter_value MEM_DDRT_PARTIAL_WRITES {0} + set_component_parameter_value MEM_DDRT_PERSISTENT_MODE {1} + set_component_parameter_value MEM_DDRT_PER_DRAM_ADDR {0} + set_component_parameter_value MEM_DDRT_PWR_MODE {DDRT_PWR_MODE_12W} + set_component_parameter_value MEM_DDRT_RANKS_PER_DIMM {1} + set_component_parameter_value MEM_DDRT_RCD_CA_IBT_ENUM {DDRT_RCD_CA_IBT_100} + set_component_parameter_value MEM_DDRT_RCD_CKE_IBT_ENUM {DDRT_RCD_CKE_IBT_100} + set_component_parameter_value MEM_DDRT_RCD_CS_IBT_ENUM {DDRT_RCD_CS_IBT_100} + set_component_parameter_value MEM_DDRT_RCD_ODT_IBT_ENUM {DDRT_RCD_ODT_IBT_100} + set_component_parameter_value MEM_DDRT_READ_DBI {0} + set_component_parameter_value MEM_DDRT_READ_PREAMBLE_TRAINING {0} + set_component_parameter_value MEM_DDRT_ROW_ADDR_WIDTH {18} + set_component_parameter_value MEM_DDRT_RTT_NOM_ENUM {DDRT_RTT_NOM_RZQ_4} + set_component_parameter_value MEM_DDRT_RTT_PARK {DDRT_RTT_PARK_ODT_DISABLED} + set_component_parameter_value MEM_DDRT_RTT_WR_ENUM {DDRT_RTT_WR_ODT_DISABLED} + set_component_parameter_value MEM_DDRT_R_ODT0_1X1 {off} + set_component_parameter_value MEM_DDRT_R_ODT0_2X2 {off off} + set_component_parameter_value MEM_DDRT_R_ODT0_4X2 {off off on on} + set_component_parameter_value MEM_DDRT_R_ODT0_4X4 {off off off off} + set_component_parameter_value MEM_DDRT_R_ODT1_2X2 {off off} + set_component_parameter_value MEM_DDRT_R_ODT1_4X2 {on on off off} + set_component_parameter_value MEM_DDRT_R_ODT1_4X4 {off off on on} + set_component_parameter_value MEM_DDRT_R_ODT2_4X4 {off off off off} + set_component_parameter_value MEM_DDRT_R_ODT3_4X4 {on on off off} + set_component_parameter_value MEM_DDRT_R_ODTN_1X1 {Rank\ 0} + set_component_parameter_value MEM_DDRT_R_ODTN_2X2 {Rank\ 0 Rank\ 1} + set_component_parameter_value MEM_DDRT_R_ODTN_4X2 {Rank\ 0 Rank\ 1 Rank\ 2 Rank\ 3} + set_component_parameter_value MEM_DDRT_R_ODTN_4X4 {Rank\ 0 Rank\ 1 Rank\ 2 Rank\ 3} + set_component_parameter_value MEM_DDRT_SELF_RFSH_ABORT {0} + set_component_parameter_value MEM_DDRT_SPD_133_RCD_DB_VENDOR_LSB {0} + set_component_parameter_value MEM_DDRT_SPD_134_RCD_DB_VENDOR_MSB {0} + set_component_parameter_value MEM_DDRT_SPD_135_RCD_REV {0} + set_component_parameter_value MEM_DDRT_SPD_137_RCD_CA_DRV {85} + set_component_parameter_value MEM_DDRT_SPD_138_RCD_CK_DRV {5} + set_component_parameter_value MEM_DDRT_SPD_139_DB_REV {0} + set_component_parameter_value MEM_DDRT_SPD_140_DRAM_VREFDQ_R0 {29} + set_component_parameter_value MEM_DDRT_SPD_141_DRAM_VREFDQ_R1 {29} + set_component_parameter_value MEM_DDRT_SPD_142_DRAM_VREFDQ_R2 {29} + set_component_parameter_value MEM_DDRT_SPD_143_DRAM_VREFDQ_R3 {29} + set_component_parameter_value MEM_DDRT_SPD_144_DB_VREFDQ {25} + set_component_parameter_value MEM_DDRT_SPD_145_DB_MDQ_DRV {21} + set_component_parameter_value MEM_DDRT_SPD_148_DRAM_DRV {0} + set_component_parameter_value MEM_DDRT_SPD_149_DRAM_RTT_WR_NOM {20} + set_component_parameter_value MEM_DDRT_SPD_152_DRAM_RTT_PARK {39} + set_component_parameter_value MEM_DDRT_SPEEDBIN_ENUM {DDRT_SPEEDBIN_2400} + set_component_parameter_value MEM_DDRT_TCCD_L_CYC {6} + set_component_parameter_value MEM_DDRT_TCCD_S_CYC {4} + set_component_parameter_value MEM_DDRT_TCL {15} + set_component_parameter_value MEM_DDRT_TDIVW_DJ_CYC {0.1} + set_component_parameter_value MEM_DDRT_TDIVW_TOTAL_UI {0.2} + set_component_parameter_value MEM_DDRT_TDQSCK_PS {165} + set_component_parameter_value MEM_DDRT_TDQSQ_PS {66} + set_component_parameter_value MEM_DDRT_TDQSQ_UI {0.16} + set_component_parameter_value MEM_DDRT_TDQSS_CYC {0.27} + set_component_parameter_value MEM_DDRT_TDSH_CYC {0.18} + set_component_parameter_value MEM_DDRT_TDSS_CYC {0.18} + set_component_parameter_value MEM_DDRT_TDVWP_UI {0.72} + set_component_parameter_value MEM_DDRT_TEMP_CONTROLLED_RFSH_ENA {0} + set_component_parameter_value MEM_DDRT_TEMP_CONTROLLED_RFSH_RANGE {DDRT_TEMP_CONTROLLED_RFSH_NORMAL} + set_component_parameter_value MEM_DDRT_TEMP_SENSOR_READOUT {0} + set_component_parameter_value MEM_DDRT_TFAW_DLR_CYC {16} + set_component_parameter_value MEM_DDRT_TFAW_NS {21.0} + set_component_parameter_value MEM_DDRT_TIH_DC_MV {75} + set_component_parameter_value MEM_DDRT_TIH_PS {95} + set_component_parameter_value MEM_DDRT_TINIT_US {500} + set_component_parameter_value MEM_DDRT_TIS_AC_MV {100} + set_component_parameter_value MEM_DDRT_TIS_PS {60} + set_component_parameter_value MEM_DDRT_TMRD_CK_CYC {8} + set_component_parameter_value MEM_DDRT_TQH_CYC {0.38} + set_component_parameter_value MEM_DDRT_TQH_UI {0.76} + set_component_parameter_value MEM_DDRT_TQSH_CYC {0.38} + set_component_parameter_value MEM_DDRT_TRAS_NS {32.0} + set_component_parameter_value MEM_DDRT_TRCD_NS {15.0} + set_component_parameter_value MEM_DDRT_TREFI_US {7.8} + set_component_parameter_value MEM_DDRT_TRFC_DLR_NS {90.0} + set_component_parameter_value MEM_DDRT_TRFC_NS {260.0} + set_component_parameter_value MEM_DDRT_TRP_NS {15.0} + set_component_parameter_value MEM_DDRT_TRRD_DLR_CYC {4} + set_component_parameter_value MEM_DDRT_TRRD_L_CYC {6} + set_component_parameter_value MEM_DDRT_TRRD_S_CYC {4} + set_component_parameter_value MEM_DDRT_TWLH_CYC {0.13} + set_component_parameter_value MEM_DDRT_TWLH_PS {0.0} + set_component_parameter_value MEM_DDRT_TWLS_CYC {0.13} + set_component_parameter_value MEM_DDRT_TWLS_PS {0.0} + set_component_parameter_value MEM_DDRT_TWR_NS {15.0} + set_component_parameter_value MEM_DDRT_TWTR_L_CYC {9} + set_component_parameter_value MEM_DDRT_TWTR_S_CYC {3} + set_component_parameter_value MEM_DDRT_USER_READ_PREAMBLE {1} + set_component_parameter_value MEM_DDRT_USER_TCL_ADDED {0} + set_component_parameter_value MEM_DDRT_USER_VREFDQ_TRAINING_RANGE {DDRT_VREFDQ_TRAINING_RANGE_1} + set_component_parameter_value MEM_DDRT_USER_VREFDQ_TRAINING_VALUE {56.0} + set_component_parameter_value MEM_DDRT_USER_WRITE_PREAMBLE {1} + set_component_parameter_value MEM_DDRT_USER_WTCL_ADDED {6} + set_component_parameter_value MEM_DDRT_USE_DEFAULT_ODT {1} + set_component_parameter_value MEM_DDRT_VDIVW_TOTAL {136} + set_component_parameter_value MEM_DDRT_WRITE_CRC {0} + set_component_parameter_value MEM_DDRT_WRITE_DBI {0} + set_component_parameter_value MEM_DDRT_WTCL {18} + set_component_parameter_value MEM_DDRT_W_ODT0_1X1 {on} + set_component_parameter_value MEM_DDRT_W_ODT0_2X2 {on off} + set_component_parameter_value MEM_DDRT_W_ODT0_4X2 {off off on on} + set_component_parameter_value MEM_DDRT_W_ODT0_4X4 {on on off off} + set_component_parameter_value MEM_DDRT_W_ODT1_2X2 {off on} + set_component_parameter_value MEM_DDRT_W_ODT1_4X2 {on on off off} + set_component_parameter_value MEM_DDRT_W_ODT1_4X4 {off off on on} + set_component_parameter_value MEM_DDRT_W_ODT2_4X4 {off off on on} + set_component_parameter_value MEM_DDRT_W_ODT3_4X4 {on on off off} + set_component_parameter_value MEM_DDRT_W_ODTN_1X1 {Rank\ 0} + set_component_parameter_value MEM_DDRT_W_ODTN_2X2 {Rank\ 0 Rank\ 1} + set_component_parameter_value MEM_DDRT_W_ODTN_4X2 {Rank\ 0 Rank\ 1 Rank\ 2 Rank\ 3} + set_component_parameter_value MEM_DDRT_W_ODTN_4X4 {Rank\ 0 Rank\ 1 Rank\ 2 Rank\ 3} + set_component_parameter_value MEM_LPDDR3_BANK_ADDR_WIDTH {3} + set_component_parameter_value MEM_LPDDR3_BL {LPDDR3_BL_BL8} + set_component_parameter_value MEM_LPDDR3_CK_WIDTH {1} + set_component_parameter_value MEM_LPDDR3_COL_ADDR_WIDTH {10} + set_component_parameter_value MEM_LPDDR3_DATA_LATENCY {LPDDR3_DL_RL12_WL6} + set_component_parameter_value MEM_LPDDR3_DISCRETE_CS_WIDTH {1} + set_component_parameter_value MEM_LPDDR3_DM_EN {1} + set_component_parameter_value MEM_LPDDR3_DQODT {LPDDR3_DQODT_DISABLE} + set_component_parameter_value MEM_LPDDR3_DQ_WIDTH {32} + set_component_parameter_value MEM_LPDDR3_DRV_STR {LPDDR3_DRV_STR_40D_40U} + set_component_parameter_value MEM_LPDDR3_PDODT {LPDDR3_PDODT_DISABLED} + set_component_parameter_value MEM_LPDDR3_ROW_ADDR_WIDTH {15} + set_component_parameter_value MEM_LPDDR3_R_ODT0_1X1 {off} + set_component_parameter_value MEM_LPDDR3_R_ODT0_2X2 {off off} + set_component_parameter_value MEM_LPDDR3_R_ODT0_4X4 {off off off off} + set_component_parameter_value MEM_LPDDR3_R_ODT1_2X2 {off off} + set_component_parameter_value MEM_LPDDR3_R_ODT1_4X4 {off off off off} + set_component_parameter_value MEM_LPDDR3_R_ODT2_4X4 {off off off off} + set_component_parameter_value MEM_LPDDR3_R_ODT3_4X4 {off off off off} + set_component_parameter_value MEM_LPDDR3_R_ODTN_1X1 {Rank\ 0} + set_component_parameter_value MEM_LPDDR3_R_ODTN_2X2 {Rank\ 0 Rank\ 1} + set_component_parameter_value MEM_LPDDR3_R_ODTN_4X4 {Rank\ 0 Rank\ 1 Rank\ 2 Rank\ 3} + set_component_parameter_value MEM_LPDDR3_SPEEDBIN_ENUM {LPDDR3_SPEEDBIN_1600} + set_component_parameter_value MEM_LPDDR3_TDH_DC_MV {100} + set_component_parameter_value MEM_LPDDR3_TDH_PS {100} + set_component_parameter_value MEM_LPDDR3_TDQSCKDL {614} + set_component_parameter_value MEM_LPDDR3_TDQSQ_PS {135} + set_component_parameter_value MEM_LPDDR3_TDQSS_CYC {1.25} + set_component_parameter_value MEM_LPDDR3_TDSH_CYC {0.2} + set_component_parameter_value MEM_LPDDR3_TDSS_CYC {0.2} + set_component_parameter_value MEM_LPDDR3_TDS_AC_MV {150} + set_component_parameter_value MEM_LPDDR3_TDS_PS {75} + set_component_parameter_value MEM_LPDDR3_TFAW_NS {50.0} + set_component_parameter_value MEM_LPDDR3_TIH_DC_MV {100} + set_component_parameter_value MEM_LPDDR3_TIH_PS {100} + set_component_parameter_value MEM_LPDDR3_TINIT_US {500} + set_component_parameter_value MEM_LPDDR3_TIS_AC_MV {150} + set_component_parameter_value MEM_LPDDR3_TIS_PS {75} + set_component_parameter_value MEM_LPDDR3_TMRR_CK_CYC {4} + set_component_parameter_value MEM_LPDDR3_TMRW_CK_CYC {10} + set_component_parameter_value MEM_LPDDR3_TQH_CYC {0.38} + set_component_parameter_value MEM_LPDDR3_TQSH_CYC {0.38} + set_component_parameter_value MEM_LPDDR3_TRAS_NS {42.5} + set_component_parameter_value MEM_LPDDR3_TRCD_NS {18.0} + set_component_parameter_value MEM_LPDDR3_TREFI_US {3.9} + set_component_parameter_value MEM_LPDDR3_TRFC_NS {210.0} + set_component_parameter_value MEM_LPDDR3_TRP_NS {18.0} + set_component_parameter_value MEM_LPDDR3_TRRD_CYC {8} + set_component_parameter_value MEM_LPDDR3_TRTP_CYC {6} + set_component_parameter_value MEM_LPDDR3_TWLH_PS {175.0} + set_component_parameter_value MEM_LPDDR3_TWLS_PS {175.0} + set_component_parameter_value MEM_LPDDR3_TWR_NS {15.0} + set_component_parameter_value MEM_LPDDR3_TWTR_CYC {6} + set_component_parameter_value MEM_LPDDR3_USE_DEFAULT_ODT {1} + set_component_parameter_value MEM_LPDDR3_W_ODT0_1X1 {on} + set_component_parameter_value MEM_LPDDR3_W_ODT0_2X2 {on on} + set_component_parameter_value MEM_LPDDR3_W_ODT0_4X4 {on on on on} + set_component_parameter_value MEM_LPDDR3_W_ODT1_2X2 {off off} + set_component_parameter_value MEM_LPDDR3_W_ODT1_4X4 {off off off off} + set_component_parameter_value MEM_LPDDR3_W_ODT2_4X4 {off off off off} + set_component_parameter_value MEM_LPDDR3_W_ODT3_4X4 {off off off off} + set_component_parameter_value MEM_LPDDR3_W_ODTN_1X1 {Rank\ 0} + set_component_parameter_value MEM_LPDDR3_W_ODTN_2X2 {Rank\ 0 Rank\ 1} + set_component_parameter_value MEM_LPDDR3_W_ODTN_4X4 {Rank\ 0 Rank\ 1 Rank\ 2 Rank\ 3} + set_component_parameter_value MEM_QDR2_ADDR_WIDTH {19} + set_component_parameter_value MEM_QDR2_BL {4} + set_component_parameter_value MEM_QDR2_BWS_EN {1} + set_component_parameter_value MEM_QDR2_DATA_PER_DEVICE {36} + set_component_parameter_value MEM_QDR2_INTERNAL_JITTER_NS {0.08} + set_component_parameter_value MEM_QDR2_SPEEDBIN_ENUM {QDR2_SPEEDBIN_633} + set_component_parameter_value MEM_QDR2_TCCQO_NS {0.45} + set_component_parameter_value MEM_QDR2_TCQDOH_NS {-0.09} + set_component_parameter_value MEM_QDR2_TCQD_NS {0.09} + set_component_parameter_value MEM_QDR2_TCQH_NS {0.71} + set_component_parameter_value MEM_QDR2_THA_NS {0.18} + set_component_parameter_value MEM_QDR2_THD_NS {0.18} + set_component_parameter_value MEM_QDR2_TRL_CYC {2.5} + set_component_parameter_value MEM_QDR2_TSA_NS {0.23} + set_component_parameter_value MEM_QDR2_TSD_NS {0.23} + set_component_parameter_value MEM_QDR2_WIDTH_EXPANDED {0} + set_component_parameter_value MEM_QDR4_AC_ODT_MODE_ENUM {QDR4_ODT_25_PCT} + set_component_parameter_value MEM_QDR4_ADDR_INV_ENA {0} + set_component_parameter_value MEM_QDR4_ADDR_WIDTH {21} + set_component_parameter_value MEM_QDR4_CK_ODT_MODE_ENUM {QDR4_ODT_25_PCT} + set_component_parameter_value MEM_QDR4_DATA_INV_ENA {1} + set_component_parameter_value MEM_QDR4_DATA_ODT_MODE_ENUM {QDR4_ODT_25_PCT} + set_component_parameter_value MEM_QDR4_DQ_PER_PORT_PER_DEVICE {36} + set_component_parameter_value MEM_QDR4_MEM_TYPE_ENUM {MEM_XP} + set_component_parameter_value MEM_QDR4_PD_OUTPUT_DRIVE_MODE_ENUM {QDR4_OUTPUT_DRIVE_25_PCT} + set_component_parameter_value MEM_QDR4_PU_OUTPUT_DRIVE_MODE_ENUM {QDR4_OUTPUT_DRIVE_25_PCT} + set_component_parameter_value MEM_QDR4_SKIP_ODT_SWEEPING {1} + set_component_parameter_value MEM_QDR4_SPEEDBIN_ENUM {QDR4_SPEEDBIN_2133} + set_component_parameter_value MEM_QDR4_TASH_PS {170} + set_component_parameter_value MEM_QDR4_TCKDK_MAX_PS {150} + set_component_parameter_value MEM_QDR4_TCKDK_MIN_PS {-150} + set_component_parameter_value MEM_QDR4_TCKQK_MAX_PS {225} + set_component_parameter_value MEM_QDR4_TCSH_PS {170} + set_component_parameter_value MEM_QDR4_TISH_PS {150} + set_component_parameter_value MEM_QDR4_TQH_CYC {0.4} + set_component_parameter_value MEM_QDR4_TQKQ_MAX_PS {75} + set_component_parameter_value MEM_QDR4_USE_ADDR_PARITY {0} + set_component_parameter_value MEM_QDR4_WIDTH_EXPANDED {0} + set_component_parameter_value MEM_RLD2_ADDR_WIDTH {21} + set_component_parameter_value MEM_RLD2_BANK_ADDR_WIDTH {3} + set_component_parameter_value MEM_RLD2_BL {4} + set_component_parameter_value MEM_RLD2_CONFIG_ENUM {RLD2_CONFIG_TRC_8_TRL_8_TWL_9} + set_component_parameter_value MEM_RLD2_DM_EN {1} + set_component_parameter_value MEM_RLD2_DQ_PER_DEVICE {9} + set_component_parameter_value MEM_RLD2_DRIVE_IMPEDENCE_ENUM {RLD2_DRIVE_IMPEDENCE_INTERNAL_50} + set_component_parameter_value MEM_RLD2_ODT_MODE_ENUM {RLD2_ODT_ON} + set_component_parameter_value MEM_RLD2_REFRESH_INTERVAL_US {0.24} + set_component_parameter_value MEM_RLD2_SPEEDBIN_ENUM {RLD2_SPEEDBIN_18} + set_component_parameter_value MEM_RLD2_TAH_NS {0.3} + set_component_parameter_value MEM_RLD2_TAS_NS {0.3} + set_component_parameter_value MEM_RLD2_TCKDK_MAX_NS {0.3} + set_component_parameter_value MEM_RLD2_TCKDK_MIN_NS {-0.3} + set_component_parameter_value MEM_RLD2_TCKH_CYC {0.45} + set_component_parameter_value MEM_RLD2_TCKQK_MAX_NS {0.2} + set_component_parameter_value MEM_RLD2_TDH_NS {0.17} + set_component_parameter_value MEM_RLD2_TDS_NS {0.17} + set_component_parameter_value MEM_RLD2_TQKH_HCYC {0.9} + set_component_parameter_value MEM_RLD2_TQKQ_MAX_NS {0.12} + set_component_parameter_value MEM_RLD2_TQKQ_MIN_NS {-0.12} + set_component_parameter_value MEM_RLD2_WIDTH_EXPANDED {0} + set_component_parameter_value MEM_RLD3_ADDR_WIDTH {20} + set_component_parameter_value MEM_RLD3_AREF_PROTOCOL_ENUM {RLD3_AREF_BAC} + set_component_parameter_value MEM_RLD3_BANK_ADDR_WIDTH {4} + set_component_parameter_value MEM_RLD3_BL {2} + set_component_parameter_value MEM_RLD3_DATA_LATENCY_MODE_ENUM {RLD3_DL_RL16_WL17} + set_component_parameter_value MEM_RLD3_DEPTH_EXPANDED {0} + set_component_parameter_value MEM_RLD3_DM_EN {1} + set_component_parameter_value MEM_RLD3_DQ_PER_DEVICE {36} + set_component_parameter_value MEM_RLD3_ODT_MODE_ENUM {RLD3_ODT_40} + set_component_parameter_value MEM_RLD3_OUTPUT_DRIVE_MODE_ENUM {RLD3_OUTPUT_DRIVE_40} + set_component_parameter_value MEM_RLD3_SPEEDBIN_ENUM {RLD3_SPEEDBIN_093E} + set_component_parameter_value MEM_RLD3_TCKDK_MAX_CYC {0.27} + set_component_parameter_value MEM_RLD3_TCKDK_MIN_CYC {-0.27} + set_component_parameter_value MEM_RLD3_TCKQK_MAX_PS {135} + set_component_parameter_value MEM_RLD3_TDH_DC_MV {100} + set_component_parameter_value MEM_RLD3_TDH_PS {5} + set_component_parameter_value MEM_RLD3_TDS_AC_MV {150} + set_component_parameter_value MEM_RLD3_TDS_PS {-30} + set_component_parameter_value MEM_RLD3_TIH_DC_MV {100} + set_component_parameter_value MEM_RLD3_TIH_PS {65} + set_component_parameter_value MEM_RLD3_TIS_AC_MV {150} + set_component_parameter_value MEM_RLD3_TIS_PS {85} + set_component_parameter_value MEM_RLD3_TQH_CYC {0.38} + set_component_parameter_value MEM_RLD3_TQKQ_MAX_PS {75} + set_component_parameter_value MEM_RLD3_T_RC_MODE_ENUM {RLD3_TRC_9} + set_component_parameter_value MEM_RLD3_WIDTH_EXPANDED {0} + set_component_parameter_value MEM_RLD3_WRITE_PROTOCOL_ENUM {RLD3_WRITE_1BANK} + set_component_parameter_value NUM_IPS {1} + set_component_parameter_value PHY_DDR3_CAL_ADDR0 {0} + set_component_parameter_value PHY_DDR3_CAL_ADDR1 {8} + set_component_parameter_value PHY_DDR3_CAL_ENABLE_NON_DES {0} + set_component_parameter_value PHY_DDR3_CONFIG_ENUM {CONFIG_PHY_AND_HARD_CTRL} + set_component_parameter_value PHY_DDR3_CORE_CLKS_SHARING_ENUM {CORE_CLKS_SHARING_DISABLED} + set_component_parameter_value PHY_DDR3_CORE_CLKS_SHARING_EXPOSE_SLAVE_OUT {0} + set_component_parameter_value PHY_DDR3_DEFAULT_IO {1} + set_component_parameter_value PHY_DDR3_DEFAULT_REF_CLK_FREQ {1} + set_component_parameter_value PHY_DDR3_HPS_ENABLE_EARLY_RELEASE {0} + set_component_parameter_value PHY_DDR3_IO_VOLTAGE {1.5} + set_component_parameter_value PHY_DDR3_MEM_CLK_FREQ_MHZ {1066.667} + set_component_parameter_value PHY_DDR3_MIMIC_HPS_EMIF {0} + set_component_parameter_value PHY_DDR3_RATE_ENUM {RATE_QUARTER} + set_component_parameter_value PHY_DDR3_REF_CLK_JITTER_PS {10.0} + set_component_parameter_value PHY_DDR3_USER_AC_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_DDR3_USER_AC_IO_STD_ENUM {unset} + set_component_parameter_value PHY_DDR3_USER_AC_MODE_ENUM {unset} + set_component_parameter_value PHY_DDR3_USER_AC_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_DDR3_USER_AUTO_STARTING_VREFIN_EN {1} + set_component_parameter_value PHY_DDR3_USER_CK_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_DDR3_USER_CK_IO_STD_ENUM {unset} + set_component_parameter_value PHY_DDR3_USER_CK_MODE_ENUM {unset} + set_component_parameter_value PHY_DDR3_USER_CK_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_DDR3_USER_DATA_IN_MODE_ENUM {unset} + set_component_parameter_value PHY_DDR3_USER_DATA_IO_STD_ENUM {unset} + set_component_parameter_value PHY_DDR3_USER_DATA_OUT_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_DDR3_USER_DATA_OUT_MODE_ENUM {unset} + set_component_parameter_value PHY_DDR3_USER_DATA_OUT_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_DDR3_USER_DLL_CORE_UPDN_EN {1} + set_component_parameter_value PHY_DDR3_USER_PERIODIC_OCT_RECAL_ENUM {PERIODIC_OCT_RECAL_AUTO} + set_component_parameter_value PHY_DDR3_USER_PING_PONG_EN {0} + set_component_parameter_value PHY_DDR3_USER_PLL_REF_CLK_IO_STD_ENUM {unset} + set_component_parameter_value PHY_DDR3_USER_REF_CLK_FREQ_MHZ {-1.0} + set_component_parameter_value PHY_DDR3_USER_RZQ_IO_STD_ENUM {unset} + set_component_parameter_value PHY_DDR3_USER_STARTING_VREFIN {70.0} + set_component_parameter_value PHY_DDR4_ALLOW_72_DQ_WIDTH {0} + set_component_parameter_value PHY_DDR4_CONFIG_ENUM {CONFIG_PHY_AND_HARD_CTRL} + set_component_parameter_value PHY_DDR4_CORE_CLKS_SHARING_ENUM {CORE_CLKS_SHARING_DISABLED} + set_component_parameter_value PHY_DDR4_CORE_CLKS_SHARING_EXPOSE_SLAVE_OUT {0} + set_component_parameter_value PHY_DDR4_DEFAULT_IO {0} + set_component_parameter_value PHY_DDR4_DEFAULT_REF_CLK_FREQ {0} + set_component_parameter_value PHY_DDR4_HPS_ENABLE_EARLY_RELEASE {0} + set_component_parameter_value PHY_DDR4_IO_VOLTAGE {1.2} + set_component_parameter_value PHY_DDR4_MEM_CLK_FREQ_MHZ {1200.0} + set_component_parameter_value PHY_DDR4_MIMIC_HPS_EMIF {0} + set_component_parameter_value PHY_DDR4_RATE_ENUM {RATE_QUARTER} + set_component_parameter_value PHY_DDR4_REF_CLK_JITTER_PS {10.0} + set_component_parameter_value PHY_DDR4_USER_AC_DEEMPHASIS_ENUM {DEEMPHASIS_MODE_OFF} + set_component_parameter_value PHY_DDR4_USER_AC_IO_STD_ENUM {IO_STD_SSTL_12} + set_component_parameter_value PHY_DDR4_USER_AC_MODE_ENUM {OUT_OCT_40_CAL} + set_component_parameter_value PHY_DDR4_USER_AC_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_DDR4_USER_AUTO_STARTING_VREFIN_EN {1} + set_component_parameter_value PHY_DDR4_USER_CK_DEEMPHASIS_ENUM {DEEMPHASIS_MODE_OFF} + set_component_parameter_value PHY_DDR4_USER_CK_IO_STD_ENUM {IO_STD_SSTL_12} + set_component_parameter_value PHY_DDR4_USER_CK_MODE_ENUM {OUT_OCT_40_CAL} + set_component_parameter_value PHY_DDR4_USER_CK_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_DDR4_USER_CLAMSHELL_EN {0} + set_component_parameter_value PHY_DDR4_USER_DATA_IN_MODE_ENUM {IN_OCT_60_CAL} + set_component_parameter_value PHY_DDR4_USER_DATA_IO_STD_ENUM {IO_STD_POD_12} + set_component_parameter_value PHY_DDR4_USER_DATA_OUT_DEEMPHASIS_ENUM {DEEMPHASIS_MODE_HIGH} + set_component_parameter_value PHY_DDR4_USER_DATA_OUT_MODE_ENUM {OUT_OCT_40_CAL} + set_component_parameter_value PHY_DDR4_USER_DATA_OUT_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_DDR4_USER_DLL_CORE_UPDN_EN {1} + set_component_parameter_value PHY_DDR4_USER_PERIODIC_OCT_RECAL_ENUM {PERIODIC_OCT_RECAL_AUTO} + set_component_parameter_value PHY_DDR4_USER_PING_PONG_EN {0} + set_component_parameter_value PHY_DDR4_USER_PLL_REF_CLK_IO_STD_ENUM {IO_STD_TRUE_DIFF_SIGNALING} + set_component_parameter_value PHY_DDR4_USER_REF_CLK_FREQ_MHZ {33.333} + set_component_parameter_value PHY_DDR4_USER_RZQ_IO_STD_ENUM {IO_STD_CMOS_12} + set_component_parameter_value PHY_DDR4_USER_STARTING_VREFIN {70.0} + set_component_parameter_value PHY_DDRT_2CH_EN {0} + set_component_parameter_value PHY_DDRT_CONFIG_ENUM {CONFIG_PHY_AND_SOFT_CTRL} + set_component_parameter_value PHY_DDRT_CORE_CLKS_SHARING_ENUM {CORE_CLKS_SHARING_DISABLED} + set_component_parameter_value PHY_DDRT_CORE_CLKS_SHARING_EXPOSE_SLAVE_OUT {0} + set_component_parameter_value PHY_DDRT_DEFAULT_IO {1} + set_component_parameter_value PHY_DDRT_DEFAULT_REF_CLK_FREQ {1} + set_component_parameter_value PHY_DDRT_EXPORT_CLK_STP_IF {0} + set_component_parameter_value PHY_DDRT_HPS_ENABLE_EARLY_RELEASE {0} + set_component_parameter_value PHY_DDRT_I2C_USE_SMC {0} + set_component_parameter_value PHY_DDRT_IC_EN {1} + set_component_parameter_value PHY_DDRT_IO_VOLTAGE {1.2} + set_component_parameter_value PHY_DDRT_MEM_CLK_FREQ_MHZ {1200.0} + set_component_parameter_value PHY_DDRT_MIMIC_HPS_EMIF {0} + set_component_parameter_value PHY_DDRT_RATE_ENUM {RATE_QUARTER} + set_component_parameter_value PHY_DDRT_REF_CLK_JITTER_PS {10.0} + set_component_parameter_value PHY_DDRT_USER_AC_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_DDRT_USER_AC_IN_MODE_ENUM {unset} + set_component_parameter_value PHY_DDRT_USER_AC_IO_STD_ENUM {unset} + set_component_parameter_value PHY_DDRT_USER_AC_MODE_ENUM {unset} + set_component_parameter_value PHY_DDRT_USER_AC_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_DDRT_USER_AUTO_STARTING_VREFIN_EN {1} + set_component_parameter_value PHY_DDRT_USER_CK_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_DDRT_USER_CK_IO_STD_ENUM {unset} + set_component_parameter_value PHY_DDRT_USER_CK_MODE_ENUM {unset} + set_component_parameter_value PHY_DDRT_USER_CK_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_DDRT_USER_DATA_IN_MODE_ENUM {unset} + set_component_parameter_value PHY_DDRT_USER_DATA_IO_STD_ENUM {unset} + set_component_parameter_value PHY_DDRT_USER_DATA_OUT_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_DDRT_USER_DATA_OUT_MODE_ENUM {unset} + set_component_parameter_value PHY_DDRT_USER_DATA_OUT_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_DDRT_USER_DLL_CORE_UPDN_EN {0} + set_component_parameter_value PHY_DDRT_USER_PERIODIC_OCT_RECAL_ENUM {PERIODIC_OCT_RECAL_AUTO} + set_component_parameter_value PHY_DDRT_USER_PING_PONG_EN {0} + set_component_parameter_value PHY_DDRT_USER_PLL_REF_CLK_IO_STD_ENUM {unset} + set_component_parameter_value PHY_DDRT_USER_REF_CLK_FREQ_MHZ {-1.0} + set_component_parameter_value PHY_DDRT_USER_RZQ_IO_STD_ENUM {unset} + set_component_parameter_value PHY_DDRT_USER_STARTING_VREFIN {70.0} + set_component_parameter_value PHY_DDRT_USE_OLD_SMBUS_MULTICOL {0} + set_component_parameter_value PHY_LPDDR3_CONFIG_ENUM {CONFIG_PHY_AND_HARD_CTRL} + set_component_parameter_value PHY_LPDDR3_CORE_CLKS_SHARING_ENUM {CORE_CLKS_SHARING_DISABLED} + set_component_parameter_value PHY_LPDDR3_CORE_CLKS_SHARING_EXPOSE_SLAVE_OUT {0} + set_component_parameter_value PHY_LPDDR3_DEFAULT_IO {1} + set_component_parameter_value PHY_LPDDR3_DEFAULT_REF_CLK_FREQ {1} + set_component_parameter_value PHY_LPDDR3_HPS_ENABLE_EARLY_RELEASE {0} + set_component_parameter_value PHY_LPDDR3_IO_VOLTAGE {1.2} + set_component_parameter_value PHY_LPDDR3_MEM_CLK_FREQ_MHZ {800.0} + set_component_parameter_value PHY_LPDDR3_MIMIC_HPS_EMIF {0} + set_component_parameter_value PHY_LPDDR3_RATE_ENUM {RATE_QUARTER} + set_component_parameter_value PHY_LPDDR3_REF_CLK_JITTER_PS {10.0} + set_component_parameter_value PHY_LPDDR3_USER_AC_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_LPDDR3_USER_AC_IO_STD_ENUM {unset} + set_component_parameter_value PHY_LPDDR3_USER_AC_MODE_ENUM {unset} + set_component_parameter_value PHY_LPDDR3_USER_AC_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_LPDDR3_USER_AUTO_STARTING_VREFIN_EN {1} + set_component_parameter_value PHY_LPDDR3_USER_CK_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_LPDDR3_USER_CK_IO_STD_ENUM {unset} + set_component_parameter_value PHY_LPDDR3_USER_CK_MODE_ENUM {unset} + set_component_parameter_value PHY_LPDDR3_USER_CK_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_LPDDR3_USER_DATA_IN_MODE_ENUM {unset} + set_component_parameter_value PHY_LPDDR3_USER_DATA_IO_STD_ENUM {unset} + set_component_parameter_value PHY_LPDDR3_USER_DATA_OUT_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_LPDDR3_USER_DATA_OUT_MODE_ENUM {unset} + set_component_parameter_value PHY_LPDDR3_USER_DATA_OUT_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_LPDDR3_USER_DLL_CORE_UPDN_EN {1} + set_component_parameter_value PHY_LPDDR3_USER_PERIODIC_OCT_RECAL_ENUM {PERIODIC_OCT_RECAL_AUTO} + set_component_parameter_value PHY_LPDDR3_USER_PING_PONG_EN {0} + set_component_parameter_value PHY_LPDDR3_USER_PLL_REF_CLK_IO_STD_ENUM {unset} + set_component_parameter_value PHY_LPDDR3_USER_REF_CLK_FREQ_MHZ {-1.0} + set_component_parameter_value PHY_LPDDR3_USER_RZQ_IO_STD_ENUM {unset} + set_component_parameter_value PHY_LPDDR3_USER_STARTING_VREFIN {70.0} + set_component_parameter_value PHY_QDR2_CONFIG_ENUM {CONFIG_PHY_AND_SOFT_CTRL} + set_component_parameter_value PHY_QDR2_CORE_CLKS_SHARING_ENUM {CORE_CLKS_SHARING_DISABLED} + set_component_parameter_value PHY_QDR2_CORE_CLKS_SHARING_EXPOSE_SLAVE_OUT {0} + set_component_parameter_value PHY_QDR2_DEFAULT_IO {1} + set_component_parameter_value PHY_QDR2_DEFAULT_REF_CLK_FREQ {1} + set_component_parameter_value PHY_QDR2_HPS_ENABLE_EARLY_RELEASE {0} + set_component_parameter_value PHY_QDR2_IO_VOLTAGE {1.5} + set_component_parameter_value PHY_QDR2_MEM_CLK_FREQ_MHZ {633.333} + set_component_parameter_value PHY_QDR2_MIMIC_HPS_EMIF {0} + set_component_parameter_value PHY_QDR2_RATE_ENUM {RATE_HALF} + set_component_parameter_value PHY_QDR2_REF_CLK_JITTER_PS {10.0} + set_component_parameter_value PHY_QDR2_USER_AC_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_QDR2_USER_AC_IO_STD_ENUM {unset} + set_component_parameter_value PHY_QDR2_USER_AC_MODE_ENUM {unset} + set_component_parameter_value PHY_QDR2_USER_AC_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_QDR2_USER_AUTO_STARTING_VREFIN_EN {1} + set_component_parameter_value PHY_QDR2_USER_CK_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_QDR2_USER_CK_IO_STD_ENUM {unset} + set_component_parameter_value PHY_QDR2_USER_CK_MODE_ENUM {unset} + set_component_parameter_value PHY_QDR2_USER_CK_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_QDR2_USER_DATA_IN_MODE_ENUM {unset} + set_component_parameter_value PHY_QDR2_USER_DATA_IO_STD_ENUM {unset} + set_component_parameter_value PHY_QDR2_USER_DATA_OUT_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_QDR2_USER_DATA_OUT_MODE_ENUM {unset} + set_component_parameter_value PHY_QDR2_USER_DATA_OUT_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_QDR2_USER_DLL_CORE_UPDN_EN {1} + set_component_parameter_value PHY_QDR2_USER_PERIODIC_OCT_RECAL_ENUM {PERIODIC_OCT_RECAL_AUTO} + set_component_parameter_value PHY_QDR2_USER_PING_PONG_EN {0} + set_component_parameter_value PHY_QDR2_USER_PLL_REF_CLK_IO_STD_ENUM {unset} + set_component_parameter_value PHY_QDR2_USER_REF_CLK_FREQ_MHZ {-1.0} + set_component_parameter_value PHY_QDR2_USER_RZQ_IO_STD_ENUM {unset} + set_component_parameter_value PHY_QDR2_USER_STARTING_VREFIN {70.0} + set_component_parameter_value PHY_QDR4_CONFIG_ENUM {CONFIG_PHY_AND_SOFT_CTRL} + set_component_parameter_value PHY_QDR4_CORE_CLKS_SHARING_ENUM {CORE_CLKS_SHARING_DISABLED} + set_component_parameter_value PHY_QDR4_CORE_CLKS_SHARING_EXPOSE_SLAVE_OUT {0} + set_component_parameter_value PHY_QDR4_DEFAULT_IO {1} + set_component_parameter_value PHY_QDR4_DEFAULT_REF_CLK_FREQ {1} + set_component_parameter_value PHY_QDR4_HPS_ENABLE_EARLY_RELEASE {0} + set_component_parameter_value PHY_QDR4_IO_VOLTAGE {1.2} + set_component_parameter_value PHY_QDR4_MEM_CLK_FREQ_MHZ {1066.667} + set_component_parameter_value PHY_QDR4_MIMIC_HPS_EMIF {0} + set_component_parameter_value PHY_QDR4_RATE_ENUM {RATE_QUARTER} + set_component_parameter_value PHY_QDR4_REF_CLK_JITTER_PS {10.0} + set_component_parameter_value PHY_QDR4_USER_AC_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_QDR4_USER_AC_IO_STD_ENUM {unset} + set_component_parameter_value PHY_QDR4_USER_AC_MODE_ENUM {unset} + set_component_parameter_value PHY_QDR4_USER_AC_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_QDR4_USER_AUTO_STARTING_VREFIN_EN {1} + set_component_parameter_value PHY_QDR4_USER_CK_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_QDR4_USER_CK_IO_STD_ENUM {unset} + set_component_parameter_value PHY_QDR4_USER_CK_MODE_ENUM {unset} + set_component_parameter_value PHY_QDR4_USER_CK_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_QDR4_USER_DATA_IN_MODE_ENUM {unset} + set_component_parameter_value PHY_QDR4_USER_DATA_IO_STD_ENUM {unset} + set_component_parameter_value PHY_QDR4_USER_DATA_OUT_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_QDR4_USER_DATA_OUT_MODE_ENUM {unset} + set_component_parameter_value PHY_QDR4_USER_DATA_OUT_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_QDR4_USER_DLL_CORE_UPDN_EN {1} + set_component_parameter_value PHY_QDR4_USER_PERIODIC_OCT_RECAL_ENUM {PERIODIC_OCT_RECAL_AUTO} + set_component_parameter_value PHY_QDR4_USER_PING_PONG_EN {0} + set_component_parameter_value PHY_QDR4_USER_PLL_REF_CLK_IO_STD_ENUM {unset} + set_component_parameter_value PHY_QDR4_USER_REF_CLK_FREQ_MHZ {-1.0} + set_component_parameter_value PHY_QDR4_USER_RZQ_IO_STD_ENUM {unset} + set_component_parameter_value PHY_QDR4_USER_STARTING_VREFIN {70.0} + set_component_parameter_value PHY_RLD2_CONFIG_ENUM {CONFIG_PHY_AND_SOFT_CTRL} + set_component_parameter_value PHY_RLD2_CORE_CLKS_SHARING_ENUM {CORE_CLKS_SHARING_DISABLED} + set_component_parameter_value PHY_RLD2_CORE_CLKS_SHARING_EXPOSE_SLAVE_OUT {0} + set_component_parameter_value PHY_RLD2_DEFAULT_IO {1} + set_component_parameter_value PHY_RLD2_DEFAULT_REF_CLK_FREQ {1} + set_component_parameter_value PHY_RLD2_HPS_ENABLE_EARLY_RELEASE {0} + set_component_parameter_value PHY_RLD2_IO_VOLTAGE {1.8} + set_component_parameter_value PHY_RLD2_MEM_CLK_FREQ_MHZ {533.333} + set_component_parameter_value PHY_RLD2_MIMIC_HPS_EMIF {0} + set_component_parameter_value PHY_RLD2_RATE_ENUM {RATE_HALF} + set_component_parameter_value PHY_RLD2_REF_CLK_JITTER_PS {10.0} + set_component_parameter_value PHY_RLD2_USER_AC_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_RLD2_USER_AC_IO_STD_ENUM {unset} + set_component_parameter_value PHY_RLD2_USER_AC_MODE_ENUM {unset} + set_component_parameter_value PHY_RLD2_USER_AC_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_RLD2_USER_AUTO_STARTING_VREFIN_EN {1} + set_component_parameter_value PHY_RLD2_USER_CK_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_RLD2_USER_CK_IO_STD_ENUM {unset} + set_component_parameter_value PHY_RLD2_USER_CK_MODE_ENUM {unset} + set_component_parameter_value PHY_RLD2_USER_CK_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_RLD2_USER_DATA_IN_MODE_ENUM {unset} + set_component_parameter_value PHY_RLD2_USER_DATA_IO_STD_ENUM {unset} + set_component_parameter_value PHY_RLD2_USER_DATA_OUT_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_RLD2_USER_DATA_OUT_MODE_ENUM {unset} + set_component_parameter_value PHY_RLD2_USER_DATA_OUT_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_RLD2_USER_DLL_CORE_UPDN_EN {1} + set_component_parameter_value PHY_RLD2_USER_PERIODIC_OCT_RECAL_ENUM {PERIODIC_OCT_RECAL_AUTO} + set_component_parameter_value PHY_RLD2_USER_PING_PONG_EN {0} + set_component_parameter_value PHY_RLD2_USER_PLL_REF_CLK_IO_STD_ENUM {unset} + set_component_parameter_value PHY_RLD2_USER_REF_CLK_FREQ_MHZ {-1.0} + set_component_parameter_value PHY_RLD2_USER_RZQ_IO_STD_ENUM {unset} + set_component_parameter_value PHY_RLD2_USER_STARTING_VREFIN {70.0} + set_component_parameter_value PHY_RLD3_CONFIG_ENUM {CONFIG_PHY_ONLY} + set_component_parameter_value PHY_RLD3_CORE_CLKS_SHARING_ENUM {CORE_CLKS_SHARING_DISABLED} + set_component_parameter_value PHY_RLD3_CORE_CLKS_SHARING_EXPOSE_SLAVE_OUT {0} + set_component_parameter_value PHY_RLD3_DEFAULT_IO {1} + set_component_parameter_value PHY_RLD3_DEFAULT_REF_CLK_FREQ {1} + set_component_parameter_value PHY_RLD3_HPS_ENABLE_EARLY_RELEASE {0} + set_component_parameter_value PHY_RLD3_IO_VOLTAGE {1.2} + set_component_parameter_value PHY_RLD3_MEM_CLK_FREQ_MHZ {1066.667} + set_component_parameter_value PHY_RLD3_MIMIC_HPS_EMIF {0} + set_component_parameter_value PHY_RLD3_RATE_ENUM {RATE_QUARTER} + set_component_parameter_value PHY_RLD3_REF_CLK_JITTER_PS {10.0} + set_component_parameter_value PHY_RLD3_USER_AC_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_RLD3_USER_AC_IO_STD_ENUM {unset} + set_component_parameter_value PHY_RLD3_USER_AC_MODE_ENUM {unset} + set_component_parameter_value PHY_RLD3_USER_AC_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_RLD3_USER_AUTO_STARTING_VREFIN_EN {1} + set_component_parameter_value PHY_RLD3_USER_CK_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_RLD3_USER_CK_IO_STD_ENUM {unset} + set_component_parameter_value PHY_RLD3_USER_CK_MODE_ENUM {unset} + set_component_parameter_value PHY_RLD3_USER_CK_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_RLD3_USER_DATA_IN_MODE_ENUM {unset} + set_component_parameter_value PHY_RLD3_USER_DATA_IO_STD_ENUM {unset} + set_component_parameter_value PHY_RLD3_USER_DATA_OUT_DEEMPHASIS_ENUM {unset} + set_component_parameter_value PHY_RLD3_USER_DATA_OUT_MODE_ENUM {unset} + set_component_parameter_value PHY_RLD3_USER_DATA_OUT_SLEW_RATE_ENUM {unset} + set_component_parameter_value PHY_RLD3_USER_DLL_CORE_UPDN_EN {1} + set_component_parameter_value PHY_RLD3_USER_PERIODIC_OCT_RECAL_ENUM {PERIODIC_OCT_RECAL_AUTO} + set_component_parameter_value PHY_RLD3_USER_PING_PONG_EN {0} + set_component_parameter_value PHY_RLD3_USER_PLL_REF_CLK_IO_STD_ENUM {unset} + set_component_parameter_value PHY_RLD3_USER_REF_CLK_FREQ_MHZ {-1.0} + set_component_parameter_value PHY_RLD3_USER_RZQ_IO_STD_ENUM {unset} + set_component_parameter_value PHY_RLD3_USER_STARTING_VREFIN {70.0} + set_component_parameter_value PLL_ADD_EXTRA_CLKS {0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_DUTY_CYCLE_0 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_DUTY_CYCLE_1 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_DUTY_CYCLE_2 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_DUTY_CYCLE_3 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_DUTY_CYCLE_4 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_DUTY_CYCLE_5 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_DUTY_CYCLE_6 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_DUTY_CYCLE_7 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_DUTY_CYCLE_8 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_DUTY_CYCLE_GUI_0 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_DUTY_CYCLE_GUI_1 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_DUTY_CYCLE_GUI_2 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_DUTY_CYCLE_GUI_3 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_DUTY_CYCLE_GUI_4 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_DUTY_CYCLE_GUI_5 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_DUTY_CYCLE_GUI_6 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_DUTY_CYCLE_GUI_7 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_DUTY_CYCLE_GUI_8 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_FREQ_MHZ_GUI_0 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_FREQ_MHZ_GUI_1 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_FREQ_MHZ_GUI_2 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_FREQ_MHZ_GUI_3 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_FREQ_MHZ_GUI_4 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_FREQ_MHZ_GUI_5 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_FREQ_MHZ_GUI_6 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_FREQ_MHZ_GUI_7 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_FREQ_MHZ_GUI_8 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_PHASE_DEG_GUI_0 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_PHASE_DEG_GUI_1 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_PHASE_DEG_GUI_2 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_PHASE_DEG_GUI_3 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_PHASE_DEG_GUI_4 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_PHASE_DEG_GUI_5 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_PHASE_DEG_GUI_6 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_PHASE_DEG_GUI_7 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_PHASE_DEG_GUI_8 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_PHASE_PS_GUI_0 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_PHASE_PS_GUI_1 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_PHASE_PS_GUI_2 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_PHASE_PS_GUI_3 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_PHASE_PS_GUI_4 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_PHASE_PS_GUI_5 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_PHASE_PS_GUI_6 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_PHASE_PS_GUI_7 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_ACTUAL_PHASE_PS_GUI_8 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_DUTY_CYCLE_GUI_0 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_DUTY_CYCLE_GUI_1 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_DUTY_CYCLE_GUI_2 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_DUTY_CYCLE_GUI_3 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_DUTY_CYCLE_GUI_4 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_DUTY_CYCLE_GUI_5 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_DUTY_CYCLE_GUI_6 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_DUTY_CYCLE_GUI_7 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_DUTY_CYCLE_GUI_8 {50.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_FREQ_MHZ_GUI_0 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_FREQ_MHZ_GUI_1 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_FREQ_MHZ_GUI_2 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_FREQ_MHZ_GUI_3 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_FREQ_MHZ_GUI_4 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_FREQ_MHZ_GUI_5 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_FREQ_MHZ_GUI_6 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_FREQ_MHZ_GUI_7 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_FREQ_MHZ_GUI_8 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_PHASE_GUI_0 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_PHASE_GUI_1 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_PHASE_GUI_2 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_PHASE_GUI_3 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_PHASE_GUI_4 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_PHASE_GUI_5 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_PHASE_GUI_6 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_PHASE_GUI_7 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_DESIRED_PHASE_GUI_8 {0.0} + set_component_parameter_value PLL_EXTRA_CLK_PHASE_SHIFT_UNIT_GUI_0 {ps} + set_component_parameter_value PLL_EXTRA_CLK_PHASE_SHIFT_UNIT_GUI_1 {ps} + set_component_parameter_value PLL_EXTRA_CLK_PHASE_SHIFT_UNIT_GUI_2 {ps} + set_component_parameter_value PLL_EXTRA_CLK_PHASE_SHIFT_UNIT_GUI_3 {ps} + set_component_parameter_value PLL_EXTRA_CLK_PHASE_SHIFT_UNIT_GUI_4 {ps} + set_component_parameter_value PLL_EXTRA_CLK_PHASE_SHIFT_UNIT_GUI_5 {ps} + set_component_parameter_value PLL_EXTRA_CLK_PHASE_SHIFT_UNIT_GUI_6 {ps} + set_component_parameter_value PLL_EXTRA_CLK_PHASE_SHIFT_UNIT_GUI_7 {ps} + set_component_parameter_value PLL_EXTRA_CLK_PHASE_SHIFT_UNIT_GUI_8 {ps} + set_component_parameter_value PLL_USER_NUM_OF_EXTRA_CLKS {0} + set_component_parameter_value PROTOCOL_ENUM {PROTOCOL_DDR4} + set_component_parameter_value SHORT_QSYS_INTERFACE_NAMES {1} + set_component_project_property HIDE_FROM_IP_CATALOG {false} + save_component + load_instantiation hps_emif + remove_instantiation_interfaces_and_ports + add_instantiation_interface pll_ref_clk clock INPUT + set_instantiation_interface_parameter_value pll_ref_clk clockRate {0} + set_instantiation_interface_parameter_value pll_ref_clk externallyDriven {false} + set_instantiation_interface_parameter_value pll_ref_clk ptfSchematicName {} + add_instantiation_interface_port pll_ref_clk pll_ref_clk clk 1 STD_LOGIC Input + add_instantiation_interface oct conduit INPUT + set_instantiation_interface_parameter_value oct associatedClock {} + set_instantiation_interface_parameter_value oct associatedReset {} + set_instantiation_interface_parameter_value oct prSafe {false} + add_instantiation_interface_port oct oct_rzqin oct_rzqin 1 STD_LOGIC Input + add_instantiation_interface mem conduit INPUT + set_instantiation_interface_parameter_value mem associatedClock {} + set_instantiation_interface_parameter_value mem associatedReset {} + set_instantiation_interface_parameter_value mem prSafe {false} + add_instantiation_interface_port mem mem_ck mem_ck 1 STD_LOGIC_VECTOR Output + add_instantiation_interface_port mem mem_ck_n mem_ck_n 1 STD_LOGIC_VECTOR Output + add_instantiation_interface_port mem mem_a mem_a 17 STD_LOGIC_VECTOR Output + add_instantiation_interface_port mem mem_act_n mem_act_n 1 STD_LOGIC_VECTOR Output + add_instantiation_interface_port mem mem_ba mem_ba 2 STD_LOGIC_VECTOR Output + add_instantiation_interface_port mem mem_bg mem_bg 2 STD_LOGIC_VECTOR Output + add_instantiation_interface_port mem mem_cke mem_cke 1 STD_LOGIC_VECTOR Output + add_instantiation_interface_port mem mem_cs_n mem_cs_n 1 STD_LOGIC_VECTOR Output + add_instantiation_interface_port mem mem_odt mem_odt 1 STD_LOGIC_VECTOR Output + add_instantiation_interface_port mem mem_reset_n mem_reset_n 1 STD_LOGIC_VECTOR Output + add_instantiation_interface_port mem mem_par mem_par 1 STD_LOGIC_VECTOR Output + add_instantiation_interface_port mem mem_alert_n mem_alert_n 1 STD_LOGIC_VECTOR Input + add_instantiation_interface_port mem mem_dqs mem_dqs 8 STD_LOGIC_VECTOR Bidir + add_instantiation_interface_port mem mem_dqs_n mem_dqs_n 8 STD_LOGIC_VECTOR Bidir + add_instantiation_interface_port mem mem_dq mem_dq 64 STD_LOGIC_VECTOR Bidir + add_instantiation_interface_port mem mem_dbi_n mem_dbi_n 8 STD_LOGIC_VECTOR Bidir + add_instantiation_interface hps_emif conduit INPUT + set_instantiation_interface_parameter_value hps_emif associatedClock {} + set_instantiation_interface_parameter_value hps_emif associatedReset {} + set_instantiation_interface_parameter_value hps_emif prSafe {false} + add_instantiation_interface_port hps_emif hps_to_emif hps_to_emif 4096 STD_LOGIC_VECTOR Input + add_instantiation_interface_port hps_emif emif_to_hps emif_to_hps 4096 STD_LOGIC_VECTOR Output + add_instantiation_interface_port hps_emif hps_to_emif_gp gp_to_emif 2 STD_LOGIC_VECTOR Input + add_instantiation_interface_port hps_emif emif_to_hps_gp emif_to_gp 1 STD_LOGIC_VECTOR Output + add_instantiation_interface emif_calbus conduit INPUT + set_instantiation_interface_parameter_value emif_calbus associatedClock {emif_calbus_clk} + set_instantiation_interface_parameter_value emif_calbus associatedReset {} + set_instantiation_interface_parameter_value emif_calbus prSafe {false} + add_instantiation_interface_port emif_calbus calbus_read calbus_read 1 STD_LOGIC Input + add_instantiation_interface_port emif_calbus calbus_write calbus_write 1 STD_LOGIC Input + add_instantiation_interface_port emif_calbus calbus_address calbus_address 20 STD_LOGIC_VECTOR Input + add_instantiation_interface_port emif_calbus calbus_wdata calbus_wdata 32 STD_LOGIC_VECTOR Input + add_instantiation_interface_port emif_calbus calbus_rdata calbus_rdata 32 STD_LOGIC_VECTOR Output + add_instantiation_interface_port emif_calbus calbus_seq_param_tbl calbus_seq_param_tbl 4096 STD_LOGIC_VECTOR Output + add_instantiation_interface emif_calbus_clk clock INPUT + set_instantiation_interface_parameter_value emif_calbus_clk clockRate {0} + set_instantiation_interface_parameter_value emif_calbus_clk externallyDriven {false} + set_instantiation_interface_parameter_value emif_calbus_clk ptfSchematicName {} + add_instantiation_interface_port emif_calbus_clk calbus_clk clk 1 STD_LOGIC Input + save_instantiation + add_component init_done ip/system/init_done.ip altera_s10_user_rst_clkgate init_done 19.4.7 + load_component init_done + set_component_parameter_value outputType {Conduit Interface} + set_component_project_property HIDE_FROM_IP_CATALOG {false} + save_component + load_instantiation init_done + remove_instantiation_interfaces_and_ports + add_instantiation_interface ninit_done conduit INPUT + set_instantiation_interface_parameter_value ninit_done associatedClock {} + set_instantiation_interface_parameter_value ninit_done associatedReset {} + set_instantiation_interface_parameter_value ninit_done prSafe {false} + add_instantiation_interface_port ninit_done ninit_done ninit_done 1 STD_LOGIC Output + save_instantiation + add_component system_intel_cache_coherency_translator ip/system/system_intel_cache_coherency_translator.ip intel_cache_coherency_translator system_intel_cache_coherency_translator 1.0.3 + load_component system_intel_cache_coherency_translator + set_component_parameter_value ADDR_WIDTH {32} + set_component_parameter_value ARBAR_OVERRIDE {0} + set_component_parameter_value ARCACHE_OVERRIDE {0} + set_component_parameter_value ARCACHE_OVERRIDE_EN {1} + set_component_parameter_value ARDOMAIN_OVERRIDE {1} + set_component_parameter_value ARSNOOP_OVERRIDE {0} + set_component_parameter_value AWBAR_OVERRIDE {0} + set_component_parameter_value AWCACHE_OVERRIDE {0} + set_component_parameter_value AWCACHE_OVERRIDE_EN {1} + set_component_parameter_value AWDOMAIN_OVERRIDE {1} + set_component_parameter_value AWSNOOP_OVERRIDE {0} + set_component_parameter_value AXM_ID_WIDTH {5} + set_component_parameter_value AXS_ID_WIDTH {5} + set_component_parameter_value AxPROT_OVERRIDE {3} + set_component_parameter_value AxPROT_OVERRIDE_EN {1} + set_component_parameter_value AxUSER_SELECTION {0} + set_component_parameter_value CONTROL_INTERFACE {0} + set_component_parameter_value CombinedIssuingCapability {16} + set_component_parameter_value DATA_WIDTH {128} + set_component_parameter_value ReadIssuingCapability {8} + set_component_parameter_value WriteIssuingCapability {8} + set_component_project_property HIDE_FROM_IP_CATALOG {false} + save_component + load_instantiation system_intel_cache_coherency_translator + remove_instantiation_interfaces_and_ports + add_instantiation_interface clock clock INPUT + set_instantiation_interface_parameter_value clock clockRate {0} + set_instantiation_interface_parameter_value clock externallyDriven {false} + set_instantiation_interface_parameter_value clock ptfSchematicName {} + add_instantiation_interface_port clock clk clk 1 STD_LOGIC Input + add_instantiation_interface reset reset INPUT + set_instantiation_interface_parameter_value reset associatedClock {clock} + set_instantiation_interface_parameter_value reset synchronousEdges {DEASSERT} + add_instantiation_interface_port reset reset reset 1 STD_LOGIC Input + add_instantiation_interface m0 acelite OUTPUT + set_instantiation_interface_parameter_value m0 associatedClock {clock} + set_instantiation_interface_parameter_value m0 associatedReset {reset} + set_instantiation_interface_parameter_value m0 combinedIssuingCapability {1} + set_instantiation_interface_parameter_value m0 issuesFIXEDBursts {true} + set_instantiation_interface_parameter_value m0 issuesINCRBursts {true} + set_instantiation_interface_parameter_value m0 issuesWRAPBursts {true} + set_instantiation_interface_parameter_value m0 maximumOutstandingReads {1} + set_instantiation_interface_parameter_value m0 maximumOutstandingTransactions {1} + set_instantiation_interface_parameter_value m0 maximumOutstandingWrites {1} + set_instantiation_interface_parameter_value m0 poison {false} + set_instantiation_interface_parameter_value m0 readIssuingCapability {1} + set_instantiation_interface_parameter_value m0 traceSignals {false} + set_instantiation_interface_parameter_value m0 trustzoneAware {true} + set_instantiation_interface_parameter_value m0 uniqueIdSupport {false} + set_instantiation_interface_parameter_value m0 wakeupSignals {false} + set_instantiation_interface_parameter_value m0 writeIssuingCapability {1} + add_instantiation_interface_port m0 axm_m0_araddr araddr 32 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_arburst arburst 2 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_arcache arcache 4 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_arid arid 5 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_arlen arlen 8 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_arlock arlock 1 STD_LOGIC Output + add_instantiation_interface_port m0 axm_m0_arprot arprot 3 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_arqos arqos 4 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_arready arready 1 STD_LOGIC Input + add_instantiation_interface_port m0 axm_m0_arsize arsize 3 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_arvalid arvalid 1 STD_LOGIC Output + add_instantiation_interface_port m0 axm_m0_arsnoop arsnoop 4 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_ardomain ardomain 2 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_arbar arbar 2 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_aruser aruser 23 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_awaddr awaddr 32 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_awburst awburst 2 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_awcache awcache 4 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_awid awid 5 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_awlen awlen 8 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_awlock awlock 1 STD_LOGIC Output + add_instantiation_interface_port m0 axm_m0_awprot awprot 3 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_awready awready 1 STD_LOGIC Input + add_instantiation_interface_port m0 axm_m0_awsize awsize 3 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_awvalid awvalid 1 STD_LOGIC Output + add_instantiation_interface_port m0 axm_m0_awqos awqos 4 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_awuser awuser 23 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_bid bid 5 STD_LOGIC_VECTOR Input + add_instantiation_interface_port m0 axm_m0_bready bready 1 STD_LOGIC Output + add_instantiation_interface_port m0 axm_m0_bresp bresp 2 STD_LOGIC_VECTOR Input + add_instantiation_interface_port m0 axm_m0_bvalid bvalid 1 STD_LOGIC Input + add_instantiation_interface_port m0 axm_m0_rdata rdata 128 STD_LOGIC_VECTOR Input + add_instantiation_interface_port m0 axm_m0_rid rid 5 STD_LOGIC_VECTOR Input + add_instantiation_interface_port m0 axm_m0_rlast rlast 1 STD_LOGIC Input + add_instantiation_interface_port m0 axm_m0_rready rready 1 STD_LOGIC Output + add_instantiation_interface_port m0 axm_m0_rresp rresp 2 STD_LOGIC_VECTOR Input + add_instantiation_interface_port m0 axm_m0_rvalid rvalid 1 STD_LOGIC Input + add_instantiation_interface_port m0 axm_m0_wdata wdata 128 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_wlast wlast 1 STD_LOGIC Output + add_instantiation_interface_port m0 axm_m0_wready wready 1 STD_LOGIC Input + add_instantiation_interface_port m0 axm_m0_wstrb wstrb 16 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_wvalid wvalid 1 STD_LOGIC Output + add_instantiation_interface_port m0 axm_m0_awsnoop awsnoop 3 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_awdomain awdomain 2 STD_LOGIC_VECTOR Output + add_instantiation_interface_port m0 axm_m0_awbar awbar 2 STD_LOGIC_VECTOR Output + add_instantiation_interface s0 axi4 INPUT + set_instantiation_interface_parameter_value s0 associatedClock {clock} + set_instantiation_interface_parameter_value s0 associatedReset {reset} + set_instantiation_interface_parameter_value s0 bridgesToMaster {m0} + set_instantiation_interface_parameter_value s0 combinedAcceptanceCapability {1} + set_instantiation_interface_parameter_value s0 dfhFeatureGuid {0} + set_instantiation_interface_parameter_value s0 dfhFeatureId {35} + set_instantiation_interface_parameter_value s0 dfhFeatureMajorVersion {0} + set_instantiation_interface_parameter_value s0 dfhFeatureMinorVersion {0} + set_instantiation_interface_parameter_value s0 dfhFeatureType {3} + set_instantiation_interface_parameter_value s0 dfhGroupId {0} + set_instantiation_interface_parameter_value s0 dfhParameterData {} + set_instantiation_interface_parameter_value s0 dfhParameterDataLength {} + set_instantiation_interface_parameter_value s0 dfhParameterId {} + set_instantiation_interface_parameter_value s0 dfhParameterName {} + set_instantiation_interface_parameter_value s0 dfhParameterVersion {} + set_instantiation_interface_parameter_value s0 maximumOutstandingReads {1} + set_instantiation_interface_parameter_value s0 maximumOutstandingTransactions {1} + set_instantiation_interface_parameter_value s0 maximumOutstandingWrites {1} + set_instantiation_interface_parameter_value s0 poison {false} + set_instantiation_interface_parameter_value s0 readAcceptanceCapability {1} + set_instantiation_interface_parameter_value s0 readDataReorderingDepth {8} + set_instantiation_interface_parameter_value s0 traceSignals {false} + set_instantiation_interface_parameter_value s0 trustzoneAware {true} + set_instantiation_interface_parameter_value s0 uniqueIdSupport {false} + set_instantiation_interface_parameter_value s0 wakeupSignals {false} + set_instantiation_interface_parameter_value s0 writeAcceptanceCapability {1} + set_instantiation_interface_sysinfo_parameter_value s0 address_map {} + set_instantiation_interface_sysinfo_parameter_value s0 address_width {} + set_instantiation_interface_sysinfo_parameter_value s0 max_slave_data_width {} + add_instantiation_interface_port s0 axs_s0_araddr araddr 32 STD_LOGIC_VECTOR Input + add_instantiation_interface_port s0 axs_s0_arburst arburst 2 STD_LOGIC_VECTOR Input + add_instantiation_interface_port s0 axs_s0_arcache arcache 4 STD_LOGIC_VECTOR Input + add_instantiation_interface_port s0 axs_s0_arid arid 5 STD_LOGIC_VECTOR Input + add_instantiation_interface_port s0 axs_s0_arlen arlen 8 STD_LOGIC_VECTOR Input + add_instantiation_interface_port s0 axs_s0_arlock arlock 1 STD_LOGIC Input + add_instantiation_interface_port s0 axs_s0_arprot arprot 3 STD_LOGIC_VECTOR Input + add_instantiation_interface_port s0 axs_s0_arready arready 1 STD_LOGIC Output + add_instantiation_interface_port s0 axs_s0_arsize arsize 3 STD_LOGIC_VECTOR Input + add_instantiation_interface_port s0 axs_s0_arvalid arvalid 1 STD_LOGIC Input + add_instantiation_interface_port s0 axs_s0_awaddr awaddr 32 STD_LOGIC_VECTOR Input + add_instantiation_interface_port s0 axs_s0_awburst awburst 2 STD_LOGIC_VECTOR Input + add_instantiation_interface_port s0 axs_s0_awcache awcache 4 STD_LOGIC_VECTOR Input + add_instantiation_interface_port s0 axs_s0_awid awid 5 STD_LOGIC_VECTOR Input + add_instantiation_interface_port s0 axs_s0_awlen awlen 8 STD_LOGIC_VECTOR Input + add_instantiation_interface_port s0 axs_s0_awlock awlock 1 STD_LOGIC Input + add_instantiation_interface_port s0 axs_s0_awprot awprot 3 STD_LOGIC_VECTOR Input + add_instantiation_interface_port s0 axs_s0_awready awready 1 STD_LOGIC Output + add_instantiation_interface_port s0 axs_s0_awsize awsize 3 STD_LOGIC_VECTOR Input + add_instantiation_interface_port s0 axs_s0_awvalid awvalid 1 STD_LOGIC Input + add_instantiation_interface_port s0 axs_s0_bid bid 5 STD_LOGIC_VECTOR Output + add_instantiation_interface_port s0 axs_s0_bready bready 1 STD_LOGIC Input + add_instantiation_interface_port s0 axs_s0_bresp bresp 2 STD_LOGIC_VECTOR Output + add_instantiation_interface_port s0 axs_s0_bvalid bvalid 1 STD_LOGIC Output + add_instantiation_interface_port s0 axs_s0_rdata rdata 128 STD_LOGIC_VECTOR Output + add_instantiation_interface_port s0 axs_s0_rid rid 5 STD_LOGIC_VECTOR Output + add_instantiation_interface_port s0 axs_s0_rlast rlast 1 STD_LOGIC Output + add_instantiation_interface_port s0 axs_s0_rready rready 1 STD_LOGIC Input + add_instantiation_interface_port s0 axs_s0_rresp rresp 2 STD_LOGIC_VECTOR Output + add_instantiation_interface_port s0 axs_s0_rvalid rvalid 1 STD_LOGIC Output + add_instantiation_interface_port s0 axs_s0_wdata wdata 128 STD_LOGIC_VECTOR Input + add_instantiation_interface_port s0 axs_s0_wlast wlast 1 STD_LOGIC Input + add_instantiation_interface_port s0 axs_s0_wready wready 1 STD_LOGIC Output + add_instantiation_interface_port s0 axs_s0_wstrb wstrb 16 STD_LOGIC_VECTOR Input + add_instantiation_interface_port s0 axs_s0_wvalid wvalid 1 STD_LOGIC Input + save_instantiation + + # add wirelevel expressions + + # preserve ports for debug + + # add the connections + add_connection hps_emif.hps_emif/hps.hps_emif + set_connection_parameter_value hps_emif.hps_emif/hps.hps_emif endPort {} + set_connection_parameter_value hps_emif.hps_emif/hps.hps_emif endPortLSB {0} + set_connection_parameter_value hps_emif.hps_emif/hps.hps_emif startPort {} + set_connection_parameter_value hps_emif.hps_emif/hps.hps_emif startPortLSB {0} + set_connection_parameter_value hps_emif.hps_emif/hps.hps_emif width {0} + add_connection system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave addressMapSysInfo {} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave addressWidthSysInfo {} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave arbitrationPriority {1} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave baseAddress {0x0000} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave defaultConnection {0} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave domainAlias {} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave qsys_mm.burstAdapterImplementation {GENERIC_CONVERTER} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave qsys_mm.clockCrossingAdapter {HANDSHAKE} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave qsys_mm.enableAllPipelines {FALSE} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave qsys_mm.enableEccProtection {FALSE} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave qsys_mm.enableInstrumentation {FALSE} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave qsys_mm.enableOutOfOrderSupport {FALSE} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave qsys_mm.insertDefaultSlave {FALSE} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave qsys_mm.interconnectResetSource {DEFAULT} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave qsys_mm.interconnectType {STANDARD} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave qsys_mm.maxAdditionalLatency {1} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave qsys_mm.optimizeRdFifoSize {FALSE} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave qsys_mm.piplineType {PIPELINE_STAGE} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave qsys_mm.responseFifoType {REGISTER_BASED} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave qsys_mm.syncResets {TRUE} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave qsys_mm.widthAdapterImplementation {GENERIC_CONVERTER} + set_connection_parameter_value system_intel_cache_coherency_translator.m0/hps.f2h_axi_slave slaveDataWidthSysInfo {-1} + + # add the exports + set_interface_property hps_h2f_sdmmc_interrupt EXPORT_OF hps.h2f_sdmmc_interrupt + set_interface_property hps_hps_io EXPORT_OF hps.hps_io + set_interface_property h2f_reset EXPORT_OF hps.h2f_reset + set_interface_property hps_h2f_axi_clock EXPORT_OF hps.h2f_axi_clock + set_interface_property hps_h2f_axi_reset EXPORT_OF hps.h2f_axi_reset + set_interface_property hps_h2f_axi_master EXPORT_OF hps.h2f_axi_master + set_interface_property hps_h2f_lw_axi_clock EXPORT_OF hps.h2f_lw_axi_clock + set_interface_property hps_h2f_lw_axi_reset EXPORT_OF hps.h2f_lw_axi_reset + set_interface_property hps_h2f_lw_axi_master EXPORT_OF hps.h2f_lw_axi_master + set_interface_property hps_f2h_axi_clock EXPORT_OF hps.f2h_axi_clock + set_interface_property hps_f2h_axi_reset EXPORT_OF hps.f2h_axi_reset + set_interface_property hps_emif_pll_ref_clk EXPORT_OF hps_emif.pll_ref_clk + set_interface_property hps_emif_oct EXPORT_OF hps_emif.oct + set_interface_property hps_emif_mem EXPORT_OF hps_emif.mem + set_interface_property hps_emif_emif_calbus EXPORT_OF hps_emif.emif_calbus + set_interface_property hps_emif_emif_calbus_clk EXPORT_OF hps_emif.emif_calbus_clk + set_interface_property ninit_done EXPORT_OF init_done.ninit_done + set_interface_property system_intel_cache_coherency_translator_clock EXPORT_OF system_intel_cache_coherency_translator.clock + set_interface_property system_intel_cache_coherency_translator_reset EXPORT_OF system_intel_cache_coherency_translator.reset + set_interface_property system_intel_cache_coherency_translator_s0 EXPORT_OF system_intel_cache_coherency_translator.s0 + + # set values for exposed HDL parameters + set_domain_assignment system_intel_cache_coherency_translator.m0 qsys_mm.burstAdapterImplementation GENERIC_CONVERTER + set_domain_assignment system_intel_cache_coherency_translator.m0 qsys_mm.clockCrossingAdapter HANDSHAKE + set_domain_assignment system_intel_cache_coherency_translator.m0 qsys_mm.enableAllPipelines FALSE + set_domain_assignment system_intel_cache_coherency_translator.m0 qsys_mm.enableEccProtection FALSE + set_domain_assignment system_intel_cache_coherency_translator.m0 qsys_mm.enableInstrumentation FALSE + set_domain_assignment system_intel_cache_coherency_translator.m0 qsys_mm.enableOutOfOrderSupport FALSE + set_domain_assignment system_intel_cache_coherency_translator.m0 qsys_mm.insertDefaultSlave FALSE + set_domain_assignment system_intel_cache_coherency_translator.m0 qsys_mm.interconnectResetSource DEFAULT + set_domain_assignment system_intel_cache_coherency_translator.m0 qsys_mm.interconnectType STANDARD + set_domain_assignment system_intel_cache_coherency_translator.m0 qsys_mm.maxAdditionalLatency 1 + set_domain_assignment system_intel_cache_coherency_translator.m0 qsys_mm.optimizeRdFifoSize FALSE + set_domain_assignment system_intel_cache_coherency_translator.m0 qsys_mm.piplineType PIPELINE_STAGE + set_domain_assignment system_intel_cache_coherency_translator.m0 qsys_mm.responseFifoType REGISTER_BASED + set_domain_assignment system_intel_cache_coherency_translator.m0 qsys_mm.syncResets TRUE + set_domain_assignment system_intel_cache_coherency_translator.m0 qsys_mm.widthAdapterImplementation GENERIC_CONVERTER + + # set the the module properties + set_module_property BONUS_DATA { + + + + + + + + + + + + + + + + + + + + +} + set_module_property FILE {system.qsys} + set_module_property GENERATION_ID {0x00000000} + set_module_property NAME {system} + + # save the system + sync_sysinfo_parameters + save_system system +} + +proc do_set_exported_interface_sysinfo_parameters {} { +} + +# create all the systems, from bottom up +do_create_system + +# set system info parameters on exported interface, from bottom up +do_set_exported_interface_sysinfo_parameters diff --git a/corev_apu/altera/ip/io_pll.tcl b/corev_apu/altera/ip/io_pll.tcl index ea1e4b29869..c67e16ae36b 100644 --- a/corev_apu/altera/ip/io_pll.tcl +++ b/corev_apu/altera/ip/io_pll.tcl @@ -143,7 +143,7 @@ proc do_create_io_pll {} { set_instance_parameter_value iopll_0 {gui_new_mif_file_path} {~/pll.mif} set_instance_parameter_value iopll_0 {gui_number_of_clocks} {5} set_instance_parameter_value iopll_0 {gui_operation_mode} {direct} - set_instance_parameter_value iopll_0 {gui_output_clock_frequency0} {200.0} + set_instance_parameter_value iopll_0 {gui_output_clock_frequency0} {100.0} set_instance_parameter_value iopll_0 {gui_output_clock_frequency1} {125.0} set_instance_parameter_value iopll_0 {gui_output_clock_frequency10} {100.0} set_instance_parameter_value iopll_0 {gui_output_clock_frequency11} {100.0} @@ -161,7 +161,7 @@ proc do_create_io_pll {} { set_instance_parameter_value iopll_0 {gui_output_clock_frequency7} {100.0} set_instance_parameter_value iopll_0 {gui_output_clock_frequency8} {100.0} set_instance_parameter_value iopll_0 {gui_output_clock_frequency9} {100.0} - set_instance_parameter_value iopll_0 {gui_output_clock_frequency_ps0} {5000.0} + set_instance_parameter_value iopll_0 {gui_output_clock_frequency_ps0} {10000.0} set_instance_parameter_value iopll_0 {gui_output_clock_frequency_ps1} {8000.0} set_instance_parameter_value iopll_0 {gui_output_clock_frequency_ps10} {10000.0} set_instance_parameter_value iopll_0 {gui_output_clock_frequency_ps11} {10000.0} diff --git a/corev_apu/altera/ip_files.csv b/corev_apu/altera/ip_files.csv index 9bdb7ff77e2..4b5063b2742 100644 --- a/corev_apu/altera/ip_files.csv +++ b/corev_apu/altera/ip_files.csv @@ -7,3 +7,7 @@ ./emif_cal.ip ./vJTAG.ip ./cva6_intel_jtag_uart_0.ip +./ip/system/hps.ip +./ip/system/hps_emif.ip +./ip/system/init_done.ip +./ip/system/system_intel_cache_coherency_translator.ip diff --git a/corev_apu/altera/loc_constraints.csv b/corev_apu/altera/loc_constraints.csv index 0ac21bf1c04..72b60fe972e 100644 --- a/corev_apu/altera/loc_constraints.csv +++ b/corev_apu/altera/loc_constraints.csv @@ -137,3 +137,134 @@ PIN_N34 -to ddr4_act_n PIN_P33 -to ddr4_reset_n PIN_AA6 -to tx PIN_F1 -to rx +PIN_L10 -to emif_hps_pll_ref_clk_p +PIN_M9 -to emif_hps_oct_oct_rzqin +PIN_T17 -to emif_hps_mem_mem_a[0] +PIN_V17 -to emif_hps_mem_mem_a[1] +PIN_U16 -to emif_hps_mem_mem_a[2] +PIN_W16 -to emif_hps_mem_mem_a[3] +PIN_T15 -to emif_hps_mem_mem_a[4] +PIN_V15 -to emif_hps_mem_mem_a[5] +PIN_U14 -to emif_hps_mem_mem_a[6] +PIN_W14 -to emif_hps_mem_mem_a[7] +PIN_T13 -to emif_hps_mem_mem_a[8] +PIN_V13 -to emif_hps_mem_mem_a[9] +PIN_U12 -to emif_hps_mem_mem_a[10] +PIN_W12 -to emif_hps_mem_mem_a[11] +PIN_P9 -to emif_hps_mem_mem_a[12] +PIN_L8 -to emif_hps_mem_mem_a[13] +PIN_N8 -to emif_hps_mem_mem_a[14] +PIN_M7 -to emif_hps_mem_mem_a[15] +PIN_P7 -to emif_hps_mem_mem_a[16] +PIN_N6 -to emif_hps_mem_mem_ba[0] +PIN_M5 -to emif_hps_mem_mem_ba[1] +PIN_P5 -to emif_hps_mem_mem_bg[0] +PIN_N16 -to emif_hps_mem_mem_act_n +PIN_L6 -to emif_hps_mem_mem_alert_n +PIN_M13 -to emif_hps_mem_mem_ck[0] +PIN_P13 -to emif_hps_mem_mem_ck_n[0] +PIN_L14 -to emif_hps_mem_mem_cke[0] +PIN_L16 -to emif_hps_mem_mem_cs_n[0] +PIN_M15 -to emif_hps_mem_mem_odt[0] +PIN_N12 -to emif_hps_mem_mem_par +PIN_P17 -to emif_hps_mem_mem_reset_n +PIN_A8 -to emif_hps_mem_mem_dqs[0] +PIN_G8 -to emif_hps_mem_mem_dqs[1] +PIN_F15 -to emif_hps_mem_mem_dqs[2] +PIN_B15 -to emif_hps_mem_mem_dqs[3] +PIN_U22 -to emif_hps_mem_mem_dqs[4] +PIN_L22 -to emif_hps_mem_mem_dqs[5] +PIN_M29 -to emif_hps_mem_mem_dqs[6] +PIN_T29 -to emif_hps_mem_mem_dqs[7] +PIN_U8 -to emif_hps_mem_mem_dqs[8] +PIN_C8 -to emif_hps_mem_mem_dqs_n[0] +PIN_J8 -to emif_hps_mem_mem_dqs_n[1] +PIN_H15 -to emif_hps_mem_mem_dqs_n[2] +PIN_D15 -to emif_hps_mem_mem_dqs_n[3] +PIN_W22 -to emif_hps_mem_mem_dqs_n[4] +PIN_N22 -to emif_hps_mem_mem_dqs_n[5] +PIN_P29 -to emif_hps_mem_mem_dqs_n[6] +PIN_V29 -to emif_hps_mem_mem_dqs_n[7] +PIN_W8 -to emif_hps_mem_mem_dqs_n[8] +PIN_B7 -to emif_hps_mem_mem_dbi_n[0] +PIN_F7 -to emif_hps_mem_mem_dbi_n[1] +PIN_G14 -to emif_hps_mem_mem_dbi_n[2] +PIN_A14 -to emif_hps_mem_mem_dbi_n[3] +PIN_T21 -to emif_hps_mem_mem_dbi_n[4] +PIN_M21 -to emif_hps_mem_mem_dbi_n[5] +PIN_L28 -to emif_hps_mem_mem_dbi_n[6] +PIN_U28 -to emif_hps_mem_mem_dbi_n[7] +PIN_T7 -to emif_hps_mem_mem_dbi_n[8] +PIN_A10 -to emif_hps_mem_mem_dq[0] +PIN_C10 -to emif_hps_mem_mem_dq[1] +PIN_B9 -to emif_hps_mem_mem_dq[2] +PIN_D9 -to emif_hps_mem_mem_dq[3] +PIN_A6 -to emif_hps_mem_mem_dq[4] +PIN_B5 -to emif_hps_mem_mem_dq[5] +PIN_C6 -to emif_hps_mem_mem_dq[6] +PIN_D5 -to emif_hps_mem_mem_dq[7] +PIN_G10 -to emif_hps_mem_mem_dq[8] +PIN_J10 -to emif_hps_mem_mem_dq[9] +PIN_F9 -to emif_hps_mem_mem_dq[10] +PIN_H9 -to emif_hps_mem_mem_dq[11] +PIN_G6 -to emif_hps_mem_mem_dq[12] +PIN_J6 -to emif_hps_mem_mem_dq[13] +PIN_F5 -to emif_hps_mem_mem_dq[14] +PIN_H5 -to emif_hps_mem_mem_dq[15] +PIN_F17 -to emif_hps_mem_mem_dq[16] +PIN_H17 -to emif_hps_mem_mem_dq[17] +PIN_G16 -to emif_hps_mem_mem_dq[18] +PIN_J16 -to emif_hps_mem_mem_dq[19] +PIN_F13 -to emif_hps_mem_mem_dq[20] +PIN_J12 -to emif_hps_mem_mem_dq[21] +PIN_H13 -to emif_hps_mem_mem_dq[22] +PIN_G12 -to emif_hps_mem_mem_dq[23] +PIN_B17 -to emif_hps_mem_mem_dq[24] +PIN_D17 -to emif_hps_mem_mem_dq[25] +PIN_A16 -to emif_hps_mem_mem_dq[26] +PIN_C16 -to emif_hps_mem_mem_dq[27] +PIN_B13 -to emif_hps_mem_mem_dq[28] +PIN_D13 -to emif_hps_mem_mem_dq[29] +PIN_A12 -to emif_hps_mem_mem_dq[30] +PIN_C12 -to emif_hps_mem_mem_dq[31] +PIN_U24 -to emif_hps_mem_mem_dq[32] +PIN_W24 -to emif_hps_mem_mem_dq[33] +PIN_T23 -to emif_hps_mem_mem_dq[34] +PIN_V23 -to emif_hps_mem_mem_dq[35] +PIN_U20 -to emif_hps_mem_mem_dq[36] +PIN_W20 -to emif_hps_mem_mem_dq[37] +PIN_T19 -to emif_hps_mem_mem_dq[38] +PIN_V19 -to emif_hps_mem_mem_dq[39] +PIN_L24 -to emif_hps_mem_mem_dq[40] +PIN_N24 -to emif_hps_mem_mem_dq[41] +PIN_M23 -to emif_hps_mem_mem_dq[42] +PIN_P23 -to emif_hps_mem_mem_dq[43] +PIN_L20 -to emif_hps_mem_mem_dq[44] +PIN_P19 -to emif_hps_mem_mem_dq[45] +PIN_N20 -to emif_hps_mem_mem_dq[46] +PIN_M19 -to emif_hps_mem_mem_dq[47] +PIN_M31 -to emif_hps_mem_mem_dq[48] +PIN_P31 -to emif_hps_mem_mem_dq[49] +PIN_L30 -to emif_hps_mem_mem_dq[50] +PIN_N30 -to emif_hps_mem_mem_dq[51] +PIN_M27 -to emif_hps_mem_mem_dq[52] +PIN_P27 -to emif_hps_mem_mem_dq[53] +PIN_L26 -to emif_hps_mem_mem_dq[54] +PIN_N26 -to emif_hps_mem_mem_dq[55] +PIN_T31 -to emif_hps_mem_mem_dq[56] +PIN_V31 -to emif_hps_mem_mem_dq[57] +PIN_U30 -to emif_hps_mem_mem_dq[58] +PIN_W30 -to emif_hps_mem_mem_dq[59] +PIN_T27 -to emif_hps_mem_mem_dq[60] +PIN_W26 -to emif_hps_mem_mem_dq[61] +PIN_V27 -to emif_hps_mem_mem_dq[62] +PIN_U26 -to emif_hps_mem_mem_dq[63] +PIN_U10 -to emif_hps_mem_mem_dq[64] +PIN_W10 -to emif_hps_mem_mem_dq[65] +PIN_T9 -to emif_hps_mem_mem_dq[66] +PIN_V9 -to emif_hps_mem_mem_dq[67] +PIN_U6 -to emif_hps_mem_mem_dq[68] +PIN_W6 -to emif_hps_mem_mem_dq[69] +PIN_T5 -to emif_hps_mem_mem_dq[70] +PIN_V5 -to emif_hps_mem_mem_dq[71] +PIN_M17 -to emif_hps_mem_mem_bg[1] -comment IOBANK_3D diff --git a/corev_apu/altera/settings.csv b/corev_apu/altera/settings.csv index b069925db44..9ee2e8d1486 100644 --- a/corev_apu/altera/settings.csv +++ b/corev_apu/altera/settings.csv @@ -43,3 +43,24 @@ FITTER_AGGRESSIVE_ROUTABILITY_OPTIMIZATION ALWAYS GLOBAL_PLACEMENT_EFFORT "MAXIMUM EFFORT" QII_AUTO_PACKED_REGISTERS SPARSE OPTIMIZATION_TECHNIQUE SPEED +AUTO_RESTART_CONFIGURATION OFF +USE_PWRMGT_SCL SDM_IO14 +USE_PWRMGT_SDA SDM_IO11 +USE_CONF_DONE SDM_IO16 +USE_INIT_DONE SDM_IO0 +USE_CVP_CONFDONE SDM_IO10 +POWER_APPLY_THERMAL_MARGIN ADDITIONAL +PWRMGT_BUS_SPEED_MODE "100 KHZ" +PWRMGT_SLAVE_DEVICE_TYPE ED8401 +PWRMGT_SLAVE_DEVICE0_ADDRESS 47 +PWRMGT_SLAVE_DEVICE1_ADDRESS 00 +PWRMGT_SLAVE_DEVICE2_ADDRESS 00 +PWRMGT_SLAVE_DEVICE3_ADDRESS 00 +PWRMGT_SLAVE_DEVICE4_ADDRESS 00 +PWRMGT_SLAVE_DEVICE5_ADDRESS 00 +PWRMGT_SLAVE_DEVICE6_ADDRESS 00 +PWRMGT_SLAVE_DEVICE7_ADDRESS 00 +PWRMGT_TRANSLATED_VOLTAGE_VALUE_UNIT VOLTS +PWRMGT_PAGE_COMMAND_ENABLE OFF +PWRMGT_VOLTAGE_OUTPUT_FORMAT "LINEAR FORMAT" +PWRMGT_LINEAR_FORMAT_N "-13" \ No newline at end of file diff --git a/corev_apu/altera/src/cva6_altera.sv b/corev_apu/altera/src/cva6_altera.sv index f047c330679..226a4cb767d 100644 --- a/corev_apu/altera/src/cva6_altera.sv +++ b/corev_apu/altera/src/cva6_altera.sv @@ -44,7 +44,57 @@ module cva6_altera ( input logic [ 0:0] ddr4_alert_n, input logic oct_rzqin , - output logic [ 3:0] led + output logic [ 3:0] led , + //HPS +// HPS EMIF +output wire [0:0] emif_hps_mem_mem_ck, +output wire [0:0] emif_hps_mem_mem_ck_n, +output wire [16:0] emif_hps_mem_mem_a, +output wire [0:0] emif_hps_mem_mem_act_n, +output wire [1:0] emif_hps_mem_mem_ba, +output wire [1:0] emif_hps_mem_mem_bg, +output wire [0:0] emif_hps_mem_mem_cke, +output wire [0:0] emif_hps_mem_mem_cs_n, +output wire [0:0] emif_hps_mem_mem_odt, +output wire [0:0] emif_hps_mem_mem_reset_n, +output wire [0:0] emif_hps_mem_mem_par, +input wire [0:0] emif_hps_mem_mem_alert_n, +input wire emif_hps_oct_oct_rzqin, +input wire emif_hps_pll_ref_clk_p, +inout wire [8-1:0] emif_hps_mem_mem_dbi_n, +inout wire [64-1:0] emif_hps_mem_mem_dq, +inout wire [8-1:0] emif_hps_mem_mem_dqs, +inout wire [8-1:0] emif_hps_mem_mem_dqs_n, +input wire hps_jtag_tck, +input wire hps_jtag_tms, +output wire hps_jtag_tdo, +input wire hps_jtag_tdi, +output wire hps_sdmmc_CCLK, +inout wire hps_sdmmc_CMD, +inout wire hps_sdmmc_D0, +inout wire hps_sdmmc_D1, +inout wire hps_sdmmc_D2, +inout wire hps_sdmmc_D3, +output wire hps_emac0_TX_CLK, +input wire hps_emac0_RX_CLK, +output wire hps_emac0_TX_CTL, +input wire hps_emac0_RX_CTL, +output wire hps_emac0_TXD0, +output wire hps_emac0_TXD1, +input wire hps_emac0_RXD0, +input wire hps_emac0_RXD1, +output wire hps_emac0_TXD2, +output wire hps_emac0_TXD3, +input wire hps_emac0_RXD2, +input wire hps_emac0_RXD3, +inout wire hps_emac0_MDIO, +output wire hps_emac0_MDC, +input wire hps_uart0_RX, +output wire hps_uart0_TX, +inout wire hps_i2c1_SDA, +inout wire hps_i2c1_SCL, +inout wire hps_gpio1_io0, +input wire hps_ref_clk ); // CVA6 Intel configuration @@ -99,7 +149,7 @@ AXI_BUS #( .AXI_DATA_WIDTH ( AxiDataWidth ), .AXI_ID_WIDTH ( AxiIdWidthSlaves ), .AXI_USER_WIDTH ( AxiUserWidth ) -) master[ariane_soc::NB_PERIPHERALS-1:0](); +) master[ariane_soc::NB_PERIPHERALS:0](); AXI_BUS #( .AXI_ADDR_WIDTH ( CVA6Cfg.XLEN ), @@ -170,7 +220,7 @@ assign rst = ~ddr_sync_reset; // AXI Xbar // --------------- -axi_pkg::xbar_rule_64_t [ariane_soc::NB_PERIPHERALS-1:0] addr_map; +axi_pkg::xbar_rule_64_t [ariane_soc::NB_PERIPHERALS:0] addr_map; assign addr_map = '{ '{ idx: ariane_soc::Debug, start_addr: ariane_soc::DebugBase, end_addr: ariane_soc::DebugBase + ariane_soc::DebugLength }, @@ -182,12 +232,13 @@ assign addr_map = '{ '{ idx: ariane_soc::SPI, start_addr: ariane_soc::SPIBase, end_addr: ariane_soc::SPIBase + ariane_soc::SPILength }, '{ idx: ariane_soc::Ethernet, start_addr: ariane_soc::EthernetBase, end_addr: ariane_soc::EthernetBase + ariane_soc::EthernetLength }, '{ idx: ariane_soc::GPIO, start_addr: ariane_soc::GPIOBase, end_addr: ariane_soc::GPIOBase + ariane_soc::GPIOLength }, - '{ idx: ariane_soc::DRAM, start_addr: ariane_soc::DRAMBase, end_addr: ariane_soc::DRAMBase + ariane_soc::DRAMLength } + '{ idx: ariane_soc::DRAM, start_addr: ariane_soc::DRAMBase, end_addr: ariane_soc::DRAMBase + ariane_soc::DRAMLength }, + '{ idx: ariane_soc::HPS, start_addr: ariane_soc::HPSBase, end_addr: ariane_soc::HPSBase + ariane_soc::HPSLength } }; localparam axi_pkg::xbar_cfg_t AXI_XBAR_CFG = '{ NoSlvPorts: ariane_soc::NrSlaves, - NoMstPorts: ariane_soc::NB_PERIPHERALS, + NoMstPorts: ariane_soc::NB_PERIPHERALS+1, MaxMstTrans: 1, // Probably requires update MaxSlvTrans: 1, // Probably requires update FallThrough: 1'b0, @@ -197,7 +248,7 @@ localparam axi_pkg::xbar_cfg_t AXI_XBAR_CFG = '{ UniqueIds: 1'b0, AxiAddrWidth: AxiAddrWidth, AxiDataWidth: AxiDataWidth, - NoAddrRules: ariane_soc::NB_PERIPHERALS + NoAddrRules: ariane_soc::NB_PERIPHERALS+1 }; axi_xbar_intf #( @@ -339,7 +390,7 @@ axi2mem #( .data_i ( dm_slave_rdata ) ); -if (CVA6Cfg.XLEN==32 ) begin +if (CVA6Cfg.IS_XLEN32) begin assign master_to_dm[0].aw_user = '0; assign master_to_dm[0].w_user = '0; @@ -437,60 +488,60 @@ if (CVA6Cfg.XLEN==32 ) begin end else begin - assign master[ariane_soc::Debug].aw_id = master_to_dm[0].aw_id; - assign master[ariane_soc::Debug].aw_addr = master_to_dm[0].aw_addr; - assign master[ariane_soc::Debug].aw_len = master_to_dm[0].aw_len; - assign master[ariane_soc::Debug].aw_size = master_to_dm[0].aw_size; - assign master[ariane_soc::Debug].aw_burst = master_to_dm[0].aw_burst; - assign master[ariane_soc::Debug].aw_lock = master_to_dm[0].aw_lock; - assign master[ariane_soc::Debug].aw_cache = master_to_dm[0].aw_cache; - assign master[ariane_soc::Debug].aw_prot = master_to_dm[0].aw_prot; - assign master[ariane_soc::Debug].aw_qos = master_to_dm[0].aw_qos; - assign master[ariane_soc::Debug].aw_atop = master_to_dm[0].aw_atop; - assign master[ariane_soc::Debug].aw_region = master_to_dm[0].aw_region; - assign master[ariane_soc::Debug].aw_user = master_to_dm[0].aw_user; - assign master[ariane_soc::Debug].aw_valid = master_to_dm[0].aw_valid; - - assign master_to_dm[0].aw_ready =master[ariane_soc::Debug].aw_ready; - - assign master[ariane_soc::Debug].w_data = master_to_dm[0].w_data; - assign master[ariane_soc::Debug].w_strb = master_to_dm[0].w_strb; - assign master[ariane_soc::Debug].w_last = master_to_dm[0].w_last; - assign master[ariane_soc::Debug].w_user = master_to_dm[0].w_user; - assign master[ariane_soc::Debug].w_valid = master_to_dm[0].w_valid; - - assign master_to_dm[0].w_ready =master[ariane_soc::Debug].w_ready; - - assign master_to_dm[0].b_id =master[ariane_soc::Debug].b_id; - assign master_to_dm[0].b_resp =master[ariane_soc::Debug].b_resp; - assign master_to_dm[0].b_user =master[ariane_soc::Debug].b_user; - assign master_to_dm[0].b_valid =master[ariane_soc::Debug].b_valid; - - assign master[ariane_soc::Debug].b_ready = master_to_dm[0].b_ready; - - assign master[ariane_soc::Debug].ar_id = master_to_dm[0].ar_id; - assign master[ariane_soc::Debug].ar_addr = master_to_dm[0].ar_addr; - assign master[ariane_soc::Debug].ar_len = master_to_dm[0].ar_len; - assign master[ariane_soc::Debug].ar_size = master_to_dm[0].ar_size; - assign master[ariane_soc::Debug].ar_burst = master_to_dm[0].ar_burst; - assign master[ariane_soc::Debug].ar_lock = master_to_dm[0].ar_lock; - assign master[ariane_soc::Debug].ar_cache = master_to_dm[0].ar_cache; - assign master[ariane_soc::Debug].ar_prot = master_to_dm[0].ar_prot; - assign master[ariane_soc::Debug].ar_qos = master_to_dm[0].ar_qos; - assign master[ariane_soc::Debug].ar_region = master_to_dm[0].ar_region; - assign master[ariane_soc::Debug].ar_user = master_to_dm[0].ar_user; - assign master[ariane_soc::Debug].ar_valid = master_to_dm[0].ar_valid; - - assign master_to_dm[0].ar_ready =master[ariane_soc::Debug].ar_ready; - - assign master_to_dm[0].r_id =master[ariane_soc::Debug].r_id; - assign master_to_dm[0].r_data =master[ariane_soc::Debug].r_data; - assign master_to_dm[0].r_resp =master[ariane_soc::Debug].r_resp; - assign master_to_dm[0].r_last =master[ariane_soc::Debug].r_last; - assign master_to_dm[0].r_user =master[ariane_soc::Debug].r_user; - assign master_to_dm[0].r_valid =master[ariane_soc::Debug].r_valid; - - assign master[ariane_soc::Debug].r_ready = master_to_dm[0].r_ready; + assign master_to_dm[0].aw_id = master[ariane_soc::Debug].aw_id; + assign master_to_dm[0].aw_addr = master[ariane_soc::Debug].aw_addr; + assign master_to_dm[0].aw_len = master[ariane_soc::Debug].aw_len; + assign master_to_dm[0].aw_size = master[ariane_soc::Debug].aw_size; + assign master_to_dm[0].aw_burst= master[ariane_soc::Debug].aw_burst; + assign master_to_dm[0].aw_lock = master[ariane_soc::Debug].aw_lock; + assign master_to_dm[0].aw_cache= master[ariane_soc::Debug].aw_cache; + assign master_to_dm[0].aw_prot = master[ariane_soc::Debug].aw_prot; + assign master_to_dm[0].aw_qos = master[ariane_soc::Debug].aw_qos; + assign master_to_dm[0].aw_atop = master[ariane_soc::Debug].aw_atop; + assign master_to_dm[0].aw_region = master[ariane_soc::Debug].aw_region; + assign master_to_dm[0].aw_user = master[ariane_soc::Debug].aw_user; + assign master_to_dm[0].aw_valid= master[ariane_soc::Debug].aw_valid; + + assign master[ariane_soc::Debug].aw_ready = master_to_dm[0].aw_ready; + + assign master_to_dm[0].w_data = master[ariane_soc::Debug].w_data; + assign master_to_dm[0].w_strb = master[ariane_soc::Debug].w_strb; + assign master_to_dm[0].w_last = master[ariane_soc::Debug].w_last; + assign master_to_dm[0].w_user = master[ariane_soc::Debug].w_user; + assign master_to_dm[0].w_valid= master[ariane_soc::Debug].w_valid; + + assign master[ariane_soc::Debug].w_ready = master_to_dm[0].w_ready; + + assign master[ariane_soc::Debug].b_id = master_to_dm[0].b_id; + assign master[ariane_soc::Debug].b_resp = master_to_dm[0].b_resp; + assign master[ariane_soc::Debug].b_user = master_to_dm[0].b_user; + assign master[ariane_soc::Debug].b_valid= master_to_dm[0].b_valid; + + assign master_to_dm[0].b_ready = master[ariane_soc::Debug].b_ready; + + assign master_to_dm[0].ar_id = master[ariane_soc::Debug].ar_id; + assign master_to_dm[0].ar_addr = master[ariane_soc::Debug].ar_addr; + assign master_to_dm[0].ar_len = master[ariane_soc::Debug].ar_len; + assign master_to_dm[0].ar_size = master[ariane_soc::Debug].ar_size; + assign master_to_dm[0].ar_burst = master[ariane_soc::Debug].ar_burst; + assign master_to_dm[0].ar_lock = master[ariane_soc::Debug].ar_lock; + assign master_to_dm[0].ar_cache = master[ariane_soc::Debug].ar_cache; + assign master_to_dm[0].ar_prot = master[ariane_soc::Debug].ar_prot; + assign master_to_dm[0].ar_qos = master[ariane_soc::Debug].ar_qos; + assign master_to_dm[0].ar_region = master[ariane_soc::Debug].ar_region; + assign master_to_dm[0].ar_user = master[ariane_soc::Debug].ar_user; + assign master_to_dm[0].ar_valid = master[ariane_soc::Debug].ar_valid; + + assign master[ariane_soc::Debug].ar_ready = master_to_dm[0].ar_ready; + + assign master[ariane_soc::Debug].r_id = master_to_dm[0].r_id; + assign master[ariane_soc::Debug].r_data = master_to_dm[0].r_data; + assign master[ariane_soc::Debug].r_resp = master_to_dm[0].r_resp; + assign master[ariane_soc::Debug].r_last = master_to_dm[0].r_last; + assign master[ariane_soc::Debug].r_user = master_to_dm[0].r_user; + assign master[ariane_soc::Debug].r_valid = master_to_dm[0].r_valid; + + assign master_to_dm[0].r_ready = master[ariane_soc::Debug].r_ready; end @@ -498,7 +549,7 @@ end logic [1:0] axi_adapter_size; -assign axi_adapter_size = (CVA6Cfg.XLEN == 64) ? 2'b11 : 2'b10; +assign axi_adapter_size = CVA6Cfg.IS_XLEN64 ? 2'b11 : 2'b10; axi_adapter #( .CVA6Cfg ( CVA6Cfg ), @@ -527,7 +578,7 @@ axi_adapter #( .axi_resp_i ( dm_axi_m_resp ) ); -if (CVA6Cfg.XLEN==32 ) begin +if (CVA6Cfg.IS_XLEN32) begin logic [31 : 0] dm_master_m_awaddr; logic [31 : 0] dm_master_m_araddr; @@ -720,7 +771,7 @@ axi2mem #( .data_i ( rom_rdata ) ); -if (CVA6Cfg.XLEN==32 ) begin +if (CVA6Cfg.IS_XLEN32) begin bootrom_32 i_bootrom ( .clk_i ( clk ), .req_i ( rom_req ), @@ -744,19 +795,13 @@ end logic clk_200MHz_ref; -AXI_BUS #( - .AXI_ADDR_WIDTH ( AxiAddrWidth ), - .AXI_DATA_WIDTH ( AxiDataWidth ), - .AXI_ID_WIDTH ( AxiIdWidthSlaves ), - .AXI_USER_WIDTH ( AxiUserWidth ) -) uart_bus(); cva6_peripherals #( .AxiAddrWidth ( AxiAddrWidth ), .AxiDataWidth ( AxiDataWidth ), .AxiIdWidth ( AxiIdWidthSlaves ), .AxiUserWidth ( AxiUserWidth ), - .InclUART ( 1'b0 ), + .InclUART ( 1'b1 ), .InclGPIO ( 1'b1 ), .InclSPI ( 1'b0 ), .InclEthernet ( 1'b0 ) @@ -765,8 +810,7 @@ cva6_peripherals #( .clk_200MHz_i ( clk_200MHz_ref ), .rst_ni ( ndmreset_n ), .plic ( master[ariane_soc::PLIC] ), - // .uart ( master[ariane_soc::UART] ), - .uart ( uart_bus ), + .uart ( master[ariane_soc::UART] ), .spi ( master[ariane_soc::SPI] ), .gpio ( master[ariane_soc::GPIO] ), .eth_clk_i ( eth_clk ), @@ -785,7 +829,7 @@ cva6_peripherals #( // .eth_mdio, // .eth_mdc, .phy_tx_clk_i ( phy_tx_clk ), - .sd_clk_i ( sd_clk_sys ), + .sd_irq ( sd_irq ), // .spi_clk_o ( spi_clk_o ), // .spi_mosi ( spi_mosi ), // .spi_miso ( spi_miso ), @@ -797,84 +841,6 @@ cva6_peripherals #( -// UART Through JTAG// - -logic uart_amm_ready; -logic uart_amm_read; -logic uart_amm_write; -logic uart_amm_read_n; -logic uart_amm_write_n; -logic uart_amm_chipselect; -logic uart_amm_irq; -logic [0:0] uart_amm_address; -logic [31:0] uart_amm_rdata; -logic [31:0] uart_amm_wdata; - - -assign uart_amm_read_n = ~uart_amm_read; -assign uart_amm_write_n = ~uart_amm_write; - -cva6_intel_jtag_uart_0 uart_i ( - .clk (clk), // input, width = 1, clk.clk - .rst_n (ndmreset_n), // input, width = 1, reset.reset_n - .av_chipselect (uart_amm_chipselect), // input, width = 1, avalon_jtag_slave.chipselect - .av_address (uart_amm_address), // input, width = 1, .address - .av_read_n (uart_amm_read_n), // input, width = 1, .read_n - .av_readdata (uart_amm_rdata), // output, width = 32, .readdata - .av_write_n (uart_amm_write_n), // input, width = 1, .write_n - .av_writedata (uart_amm_wdata), // input, width = 32, .writedata - .av_waitrequest (uart_amm_ready), // output, width = 1, .waitrequest - .av_irq (uart_amm_irq) // output, width = 1, irq.irq -); - -//axi4 to avalon converter -interconnect_altera_mm_interconnect_1920_v5r556a axi_to_avalon_uart ( - .axi_bridge_1_m0_awid (master[ariane_soc::UART].aw_id), // input, width = 8, axi_bridge_1_m0.awid - .axi_bridge_1_m0_awaddr (master[ariane_soc::UART].aw_addr), // input, width = 64, .awaddr - .axi_bridge_1_m0_awlen (master[ariane_soc::UART].aw_len), // input, width = 8, .awlen - .axi_bridge_1_m0_awsize (master[ariane_soc::UART].aw_size), // input, width = 3, .awsize - .axi_bridge_1_m0_awburst (master[ariane_soc::UART].aw_burst), // input, width = 2, .awburst - .axi_bridge_1_m0_awlock (master[ariane_soc::UART].aw_lock), // input, width = 1, .awlock - .axi_bridge_1_m0_awcache (master[ariane_soc::UART].aw_cache), // input, width = 4, .awcache - .axi_bridge_1_m0_awprot (master[ariane_soc::UART].aw_prot), // input, width = 3, .awprot - .axi_bridge_1_m0_awvalid (master[ariane_soc::UART].aw_valid), // input, width = 1, .awvalid - .axi_bridge_1_m0_awready (master[ariane_soc::UART].aw_ready), // output, width = 1, .awready - .axi_bridge_1_m0_wdata (master[ariane_soc::UART].w_data), // input, width = 64, .wdata - .axi_bridge_1_m0_wstrb (master[ariane_soc::UART].w_strb), // input, width = 8, .wstrb - .axi_bridge_1_m0_wlast (master[ariane_soc::UART].w_last), // input, width = 1, .wlast - .axi_bridge_1_m0_wvalid (master[ariane_soc::UART].w_valid), // input, width = 1, .wvalid - .axi_bridge_1_m0_wready (master[ariane_soc::UART].w_ready), // output, width = 1, .wready - .axi_bridge_1_m0_bid (master[ariane_soc::UART].b_id), // output, width = 8, .bid - .axi_bridge_1_m0_bresp (master[ariane_soc::UART].b_resp), // output, width = 2, .bresp - .axi_bridge_1_m0_bvalid (master[ariane_soc::UART].b_valid), // output, width = 1, .bvalid - .axi_bridge_1_m0_bready (master[ariane_soc::UART].b_ready), // input, width = 1, .bready - .axi_bridge_1_m0_arid (master[ariane_soc::UART].ar_id), // input, width = 8, .arid - .axi_bridge_1_m0_araddr (master[ariane_soc::UART].ar_addr), // input, width = 64, .araddr - .axi_bridge_1_m0_arlen (master[ariane_soc::UART].ar_len), // input, width = 8, .arlen - .axi_bridge_1_m0_arsize (master[ariane_soc::UART].ar_size), // input, width = 3, .arsize - .axi_bridge_1_m0_arburst (master[ariane_soc::UART].ar_burst), // input, width = 2, .arburst - .axi_bridge_1_m0_arlock (master[ariane_soc::UART].ar_lock), // input, width = 1, .arlock - .axi_bridge_1_m0_arcache (master[ariane_soc::UART].ar_cache), // input, width = 4, .arcache - .axi_bridge_1_m0_arprot (master[ariane_soc::UART].ar_prot), // input, width = 3, .arprot - .axi_bridge_1_m0_arvalid (master[ariane_soc::UART].ar_valid), // input, width = 1, .arvalid - .axi_bridge_1_m0_arready (master[ariane_soc::UART].ar_ready), // output, width = 1, .arready - .axi_bridge_1_m0_rid (master[ariane_soc::UART].r_id), // output, width = 8, .rid - .axi_bridge_1_m0_rdata (master[ariane_soc::UART].r_data), // output, width = 64, .rdata - .axi_bridge_1_m0_rresp (master[ariane_soc::UART].r_resp), // output, width = 2, .rresp - .axi_bridge_1_m0_rlast (master[ariane_soc::UART].r_last), // output, width = 1, .rlast - .axi_bridge_1_m0_rvalid (master[ariane_soc::UART].r_valid), // output, width = 1, .rvalid - .axi_bridge_1_m0_rready (master[ariane_soc::UART].r_ready), // input, width = 1, .rready - .jtag_uart_0_avalon_jtag_slave_address (uart_amm_address), // output, width = 1, jtag_uart_0_avalon_jtag_slave.address - .jtag_uart_0_avalon_jtag_slave_write (uart_amm_write), // output, width = 1, .write - .jtag_uart_0_avalon_jtag_slave_read (uart_amm_read), // output, width = 1, .read - .jtag_uart_0_avalon_jtag_slave_readdata (uart_amm_rdata), // input, width = 32, .readdata - .jtag_uart_0_avalon_jtag_slave_writedata (uart_amm_wdata), // output, width = 32, .writedata - .jtag_uart_0_avalon_jtag_slave_waitrequest (uart_amm_ready), // input, width = 1, .waitrequest - .jtag_uart_0_avalon_jtag_slave_chipselect (uart_amm_chipselect), // output, width = 1, .chipselect - .axi_bridge_1_clk_reset_reset_bridge_in_reset_reset (~ndmreset_n), // input, width = 1, axi_bridge_1_clk_reset_reset_bridge_in_reset.reset - .axi_bridge_1_m0_translator_clk_reset_reset_bridge_in_reset_reset (~ndmreset_n), // input, width = 1, axi_bridge_1_m0_translator_clk_reset_reset_bridge_in_reset.reset - .emif_fm_0_emif_usr_clk_clk (clk) // input, width = 1, emif_fm_0_emif_usr_clk.clk - ); // --------------------- // Board peripherals @@ -903,13 +869,14 @@ logic [6:0] ddr_sc_amm_burstcount; logic [63:0] ddr_sc_amm_byteenable; logic ddr_sc_amm_readdatavalid; -logic calbus_read, calbus_write, calbus_clk, ddr_pll_locked, ddr_rst_req, ddr_rst_done; -logic [19:0] calbus_addr; -logic [31:0] calbus_wdata; -logic [31:0] calbus_rdata; -logic [4095:0] calbus_seq_param_tbl; +logic calbus_read, calbus_write, calbus_clk, calbus_read1, calbus_write1, calbus_clk1, ddr_pll_locked, ddr_rst_req, ddr_rst_done; +logic [19:0] calbus_addr,calbus_addr1; +logic [31:0] calbus_wdata, calbus_wdata1; +logic [31:0] calbus_rdata, calbus_rdata1; +logic [4095:0] calbus_seq_param_tbl, calbus_seq_param_tbl1; logic cal_success; logic ddr_amm_wait_request; +logic sd_irq; assign ddr_amm_wait_request = ~ddr_amm_ready; @@ -1125,9 +1092,215 @@ emif_cal ddr_calibration ( .calbus_wdata_0 (calbus_wdata), // output, width = 32, .calbus_wdata .calbus_rdata_0 (calbus_rdata), // input, width = 32, .calbus_rdata .calbus_seq_param_tbl_0 (calbus_seq_param_tbl), // input, width = 4096, .calbus_seq_param_tbl - .calbus_clk (calbus_clk) // output, width = 1, emif_calbus_clk.clk -); + + .calbus_read_1 (calbus_read1), // output, width = 1, emif_calbus_1.calbus_read + .calbus_write_1 (calbus_write1), // output, width = 1, .calbus_write + .calbus_address_1 (calbus_addr1), // output, width = 20, .calbus_address + .calbus_wdata_1 (calbus_wdata1), // output, width = 32, .calbus_wdata + .calbus_rdata_1 (calbus_rdata1), // input, width = 32, .calbus_rdata + .calbus_seq_param_tbl_1 (calbus_seq_param_tbl1), // input, width = 4096, .calbus_seq_param_tbl + .calbus_clk (calbus_clk) // output, width = 1, emif_calbus_clk.clk + ); +wire h2f_reset; +wire ninit_done; + +assign system_reset_n = ~h2f_reset & ~ninit_done; + +AXI_BUS #( + .AXI_ADDR_WIDTH ( CVA6Cfg.XLEN ), + .AXI_DATA_WIDTH ( 128 ), + .AXI_ID_WIDTH ( AxiIdWidthSlaves ), + .AXI_USER_WIDTH ( AxiUserWidth ) +) master_to_hps[0:0](); + +axi_dw_adapter #( + .ADDR_WIDTH (CVA6Cfg.XLEN), + .S_DATA_WIDTH (AxiAddrWidth), + .M_DATA_WIDTH (128), + .ID_WIDTH (AxiIdWidthSlaves) +)i_axi_dwidth_converter_hps( + .clk(clk), + .rst(~ndmreset_n), + .s_axi_awid(master[ariane_soc::HPS].aw_id), + .s_axi_awaddr(master[ariane_soc::HPS].aw_addr[31:0]), + .s_axi_awlen(master[ariane_soc::HPS].aw_len), + .s_axi_awsize(master[ariane_soc::HPS].aw_size), + .s_axi_awburst(master[ariane_soc::HPS].aw_burst), + .s_axi_awlock(master[ariane_soc::HPS].aw_lock), + .s_axi_awcache(master[ariane_soc::HPS].aw_cache), + .s_axi_awprot(master[ariane_soc::HPS].aw_prot), + .s_axi_awregion(master[ariane_soc::HPS].aw_region), + .s_axi_awqos(master[ariane_soc::HPS].aw_qos), + .s_axi_awvalid(master[ariane_soc::HPS].aw_valid), + .s_axi_awready(master[ariane_soc::HPS].aw_ready), + .s_axi_wdata(master[ariane_soc::HPS].w_data), + .s_axi_wstrb(master[ariane_soc::HPS].w_strb), + .s_axi_wlast(master[ariane_soc::HPS].w_last), + .s_axi_wvalid(master[ariane_soc::HPS].w_valid), + .s_axi_wready(master[ariane_soc::HPS].w_ready), + .s_axi_bid(master[ariane_soc::HPS].b_id), + .s_axi_bresp(master[ariane_soc::HPS].b_resp), + .s_axi_bvalid(master[ariane_soc::HPS].b_valid), + .s_axi_bready(master[ariane_soc::HPS].b_ready), + .s_axi_arid(master[ariane_soc::HPS].ar_id), + .s_axi_araddr(master[ariane_soc::HPS].ar_addr[31:0]), + .s_axi_arlen(master[ariane_soc::HPS].ar_len), + .s_axi_arsize(master[ariane_soc::HPS].ar_size), + .s_axi_arburst(master[ariane_soc::HPS].ar_burst), + .s_axi_arlock(master[ariane_soc::HPS].ar_lock), + .s_axi_arcache(master[ariane_soc::HPS].ar_cache), + .s_axi_arprot(master[ariane_soc::HPS].ar_prot), + .s_axi_arregion(master[ariane_soc::HPS].ar_region), + .s_axi_arqos(master[ariane_soc::HPS].ar_qos), + .s_axi_arvalid(master[ariane_soc::HPS].ar_valid), + .s_axi_arready(master[ariane_soc::HPS].ar_ready), + .s_axi_rid(master[ariane_soc::HPS].r_id), + .s_axi_rdata(master[ariane_soc::HPS].r_data), + .s_axi_rresp(master[ariane_soc::HPS].r_resp), + .s_axi_rlast(master[ariane_soc::HPS].r_last), + .s_axi_rvalid(master[ariane_soc::HPS].r_valid), + .s_axi_rready(master[ariane_soc::HPS].r_ready), + .m_axi_awaddr(master_to_hps[0].aw_addr), + .m_axi_awlen(master_to_hps[0].aw_len), + .m_axi_awsize(master_to_hps[0].aw_size), + .m_axi_awburst(master_to_hps[0].aw_burst), + .m_axi_awlock(master_to_hps[0].aw_lock), + .m_axi_awcache(master_to_hps[0].aw_cache), + .m_axi_awprot(master_to_hps[0].aw_prot), + .m_axi_awregion(master_to_hps[0].aw_region), + .m_axi_awqos(master_to_hps[0].aw_qos), + .m_axi_awvalid(master_to_hps[0].aw_valid), + .m_axi_awready(master_to_hps[0].aw_ready), + .m_axi_wdata(master_to_hps[0].w_data ), + .m_axi_wstrb(master_to_hps[0].w_strb), + .m_axi_wlast(master_to_hps[0].w_last), + .m_axi_wvalid(master_to_hps[0].w_valid), + .m_axi_wready(master_to_hps[0].w_ready), + .m_axi_bresp(master_to_hps[0].b_resp), + .m_axi_bvalid(master_to_hps[0].b_valid), + .m_axi_bready(master_to_hps[0].b_ready), + .m_axi_araddr(master_to_hps[0].ar_addr), + .m_axi_arlen(master_to_hps[0].ar_len), + .m_axi_arsize(master_to_hps[0].ar_size), + .m_axi_arburst(master_to_hps[0].ar_burst), + .m_axi_arlock(master_to_hps[0].ar_lock), + .m_axi_arcache(master_to_hps[0].ar_cache), + .m_axi_arprot(master_to_hps[0].ar_prot), + .m_axi_arregion(master_to_hps[0].ar_region), + .m_axi_arqos(master_to_hps[0].ar_qos), + .m_axi_arvalid(master_to_hps[0].ar_valid), + .m_axi_arready(master_to_hps[0].ar_ready), + .m_axi_rdata(master_to_hps[0].r_data), + .m_axi_rresp(master_to_hps[0].r_resp), + .m_axi_rlast(master_to_hps[0].r_last), + .m_axi_rvalid(master_to_hps[0].r_valid), + .m_axi_rready(master_to_hps[0].r_ready) + ); + +system hps_minimal ( + .hps_h2f_sdmmc_interrupt_irq(sd_irq), // output, width = 1 + .hps_hps_io_EMAC0_TX_CLK (hps_emac0_TX_CLK), // output, width = 1, hps_hps_io.EMAC0_TX_CLK + .hps_hps_io_EMAC0_TXD0 (hps_emac0_TXD0), // output, width = 1, .EMAC0_TXD0 + .hps_hps_io_EMAC0_TXD1 (hps_emac0_TXD1), // output, width = 1, .EMAC0_TXD1 + .hps_hps_io_EMAC0_TXD2 (hps_emac0_TXD2), // output, width = 1, .EMAC0_TXD2 + .hps_hps_io_EMAC0_TXD3 (hps_emac0_TXD3), // output, width = 1, .EMAC0_TXD3 + .hps_hps_io_EMAC0_RX_CTL (hps_emac0_RX_CTL), // input, width = 1, .EMAC0_RX_CTL + .hps_hps_io_EMAC0_TX_CTL (hps_emac0_TX_CTL), // output, width = 1, .EMAC0_TX_CTL + .hps_hps_io_EMAC0_RX_CLK (hps_emac0_RX_CLK), // input, width = 1, .EMAC0_RX_CLK + .hps_hps_io_EMAC0_RXD0 (hps_emac0_RXD0), // input, width = 1, .EMAC0_RXD0 + .hps_hps_io_EMAC0_RXD1 (hps_emac0_RXD1), // input, width = 1, .EMAC0_RXD1 + .hps_hps_io_EMAC0_RXD2 (hps_emac0_RXD2), // input, width = 1, .EMAC0_RXD2 + .hps_hps_io_EMAC0_RXD3 (hps_emac0_RXD3), // input, width = 1, .EMAC0_RXD3 + .hps_hps_io_EMAC0_MDIO (hps_emac0_MDIO), // inout, width = 1, .EMAC0_MDIO + .hps_hps_io_EMAC0_MDC (hps_emac0_MDC), // output, width = 1, .EMAC0_MDC + .hps_hps_io_SDMMC_CMD (hps_sdmmc_CMD), // inout, width = 1, .SDMMC_CMD + .hps_hps_io_SDMMC_D0 (hps_sdmmc_D0), // inout, width = 1, .SDMMC_D0 + .hps_hps_io_SDMMC_D1 (hps_sdmmc_D1), // inout, width = 1, .SDMMC_D1 + .hps_hps_io_SDMMC_D2 (hps_sdmmc_D2), // inout, width = 1, .SDMMC_D2 + .hps_hps_io_SDMMC_D3 (hps_sdmmc_D3), // inout, width = 1, .SDMMC_D3 + .hps_hps_io_SDMMC_CCLK (hps_sdmmc_CCLK), // output, width = 1, .SDMMC_CCLK + .hps_hps_io_UART0_RX (hps_uart0_RX), // input, width = 1, .UART0_RX + .hps_hps_io_UART0_TX (hps_uart0_TX), // output, width = 1, .UART0_TX + .hps_hps_io_I2C1_SDA (hps_i2c1_SDA), // inout, width = 1, .I2C1_SDA + .hps_hps_io_I2C1_SCL (hps_i2c1_SCL), // inout, width = 1, .I2C1_SCL + .hps_hps_io_gpio1_io0 (hps_gpio1_io0), // inout, width = 1, .gpio1_io0 + .hps_hps_io_jtag_tck (hps_jtag_tck), // input, width = 1, .jtag_tck + .hps_hps_io_jtag_tms (hps_jtag_tms), // input, width = 1, .jtag_tms + .hps_hps_io_jtag_tdo (hps_jtag_tdo), // output, width = 1, .jtag_tdo + .hps_hps_io_jtag_tdi (hps_jtag_tdi), // input, width = 1, .jtag_tdi + .hps_hps_io_hps_osc_clk (hps_ref_clk), // input, width = 1, .hps_osc_clk + .h2f_reset_reset (h2f_reset), // output, width = 1, h2f_reset.reset + + .hps_f2h_axi_clock_clk (clk), // input, width = 1, hps_f2h_axi_clock.clk + .hps_f2h_axi_reset_reset_n(ndmreset_n), // input, width = 1, hps_f2h_axi_reset.reset_n + .hps_emif_pll_ref_clk_clk (emif_hps_pll_ref_clk_p), // input, width = 1, hps_emif_pll_ref_clk.clk + .hps_emif_oct_oct_rzqin (emif_hps_oct_oct_rzqin), // input, width = 1, hps_emif_oct.oct_rzqin + .hps_emif_mem_mem_ck (emif_hps_mem_mem_ck), // output, width = 1, hps_emif_mem.mem_ck + .hps_emif_mem_mem_ck_n (emif_hps_mem_mem_ck_n), // output, width = 1, .mem_ck_n + .hps_emif_mem_mem_a (emif_hps_mem_mem_a), // output, width = 17, .mem_a + .hps_emif_mem_mem_act_n (emif_hps_mem_mem_act_n), // output, width = 1, .mem_act_n + .hps_emif_mem_mem_ba (emif_hps_mem_mem_ba), // output, width = 2, .mem_ba + .hps_emif_mem_mem_bg (emif_hps_mem_mem_bg), // output, width = 2, .mem_bg + .hps_emif_mem_mem_cke (emif_hps_mem_mem_cke), // output, width = 1, .mem_cke + .hps_emif_mem_mem_cs_n (emif_hps_mem_mem_cs_n), // output, width = 1, .mem_cs_n + .hps_emif_mem_mem_odt (emif_hps_mem_mem_odt), // output, width = 1, .mem_odt + .hps_emif_mem_mem_reset_n (emif_hps_mem_mem_reset_n), // output, width = 1, .mem_reset_n + .hps_emif_mem_mem_par (emif_hps_mem_mem_par), // output, width = 1, .mem_par + .hps_emif_mem_mem_alert_n (emif_hps_mem_mem_alert_n), // input, width = 1, .mem_alert_n + .hps_emif_mem_mem_dqs (emif_hps_mem_mem_dqs), // inout, width = 8, .mem_dqs + .hps_emif_mem_mem_dqs_n (emif_hps_mem_mem_dqs_n), // inout, width = 8, .mem_dqs_n + .hps_emif_mem_mem_dq (emif_hps_mem_mem_dq), // inout, width = 64, .mem_dq + .hps_emif_mem_mem_dbi_n (emif_hps_mem_mem_dbi_n), // inout, width = 8, .mem_dbi_n + + .hps_emif_emif_calbus_calbus_read (calbus_read1), // input, width = 1, hps_emif_emif_calbus.calbus_read + .hps_emif_emif_calbus_calbus_write (calbus_write1), // input, width = 1, .calbus_write + .hps_emif_emif_calbus_calbus_address (calbus_address1), // input, width = 20, .calbus_address + .hps_emif_emif_calbus_calbus_wdata (calbus_wdata1), // input, width = 32, .calbus_wdata + .hps_emif_emif_calbus_calbus_rdata (calbus_rdata1), // output, width = 32, .calbus_rdata + .hps_emif_emif_calbus_calbus_seq_param_tbl (calbus_seq_param_tbl1), // output, width = 4096, .calbus_seq_param_tbl + .hps_emif_emif_calbus_clk_clk (calbus_clk), // input, width = 1, hps_emif_emif_calbus_clk.clk + + .ninit_done_ninit_done (ninit_done), // output, width = 1, ninit_done.ninit_done + + .system_intel_cache_coherency_translator_clock_clk (clk), // input, width = 1, system_intel_cache_coherency_translator_clock.clk + .system_intel_cache_coherency_translator_reset_reset (~ndmreset_n), // input, width = 1, system_intel_cache_coherency_translator_reset.reset + .system_intel_cache_coherency_translator_s0_araddr (master_to_hps[0].ar_addr), // input, width = 32, system_intel_cache_coherency_translator_s0.araddr + .system_intel_cache_coherency_translator_s0_arburst (master_to_hps[0].ar_burst), // input, width = 2, .arburst + .system_intel_cache_coherency_translator_s0_arcache (master_to_hps[0].ar_cache), // input, width = 4, .arcache + .system_intel_cache_coherency_translator_s0_arid (master_to_hps[0].ar_id), // input, width = 5, .arid + .system_intel_cache_coherency_translator_s0_arlen (master_to_hps[0].ar_len), // input, width = 8, .arlen + .system_intel_cache_coherency_translator_s0_arlock (master_to_hps[0].ar_lock), // input, width = 1, .arlock + .system_intel_cache_coherency_translator_s0_arprot (master_to_hps[0].ar_prot), // input, width = 3, .arprot + .system_intel_cache_coherency_translator_s0_arready (master_to_hps[0].ar_ready), // output, width = 1, .arready + .system_intel_cache_coherency_translator_s0_arsize (master_to_hps[0].ar_size), // input, width = 3, .arsize + .system_intel_cache_coherency_translator_s0_arvalid (master_to_hps[0].ar_valid), // input, width = 1, .arvalid + .system_intel_cache_coherency_translator_s0_awaddr (master_to_hps[0].aw_addr), // input, width = 32, .awaddr + .system_intel_cache_coherency_translator_s0_awburst (master_to_hps[0].aw_burst), // input, width = 2, .awburst + .system_intel_cache_coherency_translator_s0_awcache (master_to_hps[0].aw_cache), // input, width = 4, .awcache + .system_intel_cache_coherency_translator_s0_awid (master_to_hps[0].aw_id), // input, width = 5, .awid + .system_intel_cache_coherency_translator_s0_awlen (master_to_hps[0].aw_len), // input, width = 8, .awlen + .system_intel_cache_coherency_translator_s0_awlock (master_to_hps[0].aw_lock), // input, width = 1, .awlock + .system_intel_cache_coherency_translator_s0_awprot (master_to_hps[0].aw_prot), // input, width = 3, .awprot + .system_intel_cache_coherency_translator_s0_awready (master_to_hps[0].aw_ready), // output, width = 1, .awready + .system_intel_cache_coherency_translator_s0_awsize (master_to_hps[0].aw_size), // input, width = 3, .awsize + .system_intel_cache_coherency_translator_s0_awvalid (master_to_hps[0].aw_valid), // input, width = 1, .awvalid + .system_intel_cache_coherency_translator_s0_bid (master_to_hps[0].b_id), // output, width = 5, .bid + .system_intel_cache_coherency_translator_s0_bready (master_to_hps[0].b_ready), // input, width = 1, .bready + .system_intel_cache_coherency_translator_s0_bresp (master_to_hps[0].b_resp), // output, width = 2, .bresp + .system_intel_cache_coherency_translator_s0_bvalid (master_to_hps[0].b_valid), // output, width = 1, .bvalid + .system_intel_cache_coherency_translator_s0_rdata (master_to_hps[0].r_data), // output, width = 128, .rdata + .system_intel_cache_coherency_translator_s0_rid (master_to_hps[0].r_id), // output, width = 5, .rid + .system_intel_cache_coherency_translator_s0_rlast (master_to_hps[0].r_last), // output, width = 1, .rlast + .system_intel_cache_coherency_translator_s0_rready (master_to_hps[0].r_ready), // input, width = 1, .rready + .system_intel_cache_coherency_translator_s0_rresp (master_to_hps[0].r_resp), // output, width = 2, .rresp + .system_intel_cache_coherency_translator_s0_rvalid (master_to_hps[0].r_valid), // output, width = 1, .rvalid + .system_intel_cache_coherency_translator_s0_wdata (master_to_hps[0].w_data), // input, width = 128, .wdata + .system_intel_cache_coherency_translator_s0_wlast (master_to_hps[0].w_last), // input, width = 1, .wlast + .system_intel_cache_coherency_translator_s0_wready (master_to_hps[0].w_ready), // output, width = 1, .wready + .system_intel_cache_coherency_translator_s0_wstrb (master_to_hps[0].w_strb), // input, width = 16, .wstrb + .system_intel_cache_coherency_translator_s0_wvalid (master_to_hps[0].w_valid) // input, width = 1, .wvalid + ); // //clocks diff --git a/corev_apu/altera/src/cva6_altera_peripherals.sv b/corev_apu/altera/src/cva6_altera_peripherals.sv index dbab741d68f..1a6e09d0150 100644 --- a/corev_apu/altera/src/cva6_altera_peripherals.sv +++ b/corev_apu/altera/src/cva6_altera_peripherals.sv @@ -57,7 +57,7 @@ module cva6_peripherals #( input logic spi_miso , output logic spi_ss , // SD Card - input logic sd_clk_i , + input logic sd_irq , output logic [7:0] leds_o , input logic [7:0] dip_switches_i ); @@ -68,7 +68,8 @@ module cva6_peripherals #( logic [ariane_soc::NumSources-1:0] irq_sources; // Unused interrupt sources - assign irq_sources[ariane_soc::NumSources-1:7] = '0; + assign irq_sources[ariane_soc::NumSources-1:8] = '0; + assign irq_sources[7] = sd_irq; REG_BUS #( .ADDR_WIDTH ( 32 ), @@ -192,123 +193,85 @@ module cva6_peripherals #( // --------------- // 2. UART // --------------- - logic uart_penable; - logic uart_pwrite; - logic [31:0] uart_paddr; - logic uart_psel; - logic [31:0] uart_pwdata; - logic [31:0] uart_prdata; - logic uart_pready; - logic uart_pslverr; - axi2apb_64_32 #( - .AXI4_ADDRESS_WIDTH ( AxiAddrWidth ), - .AXI4_RDATA_WIDTH ( AxiDataWidth ), - .AXI4_WDATA_WIDTH ( AxiDataWidth ), - .AXI4_ID_WIDTH ( AxiIdWidth ), - .AXI4_USER_WIDTH ( AxiUserWidth ), - .BUFF_DEPTH_SLAVE ( 2 ), - .APB_ADDR_WIDTH ( 32 ) - ) i_axi2apb_64_32_uart ( - .ACLK ( clk_i ), - .ARESETn ( rst_ni ), - .test_en_i ( 1'b0 ), - .AWID_i ( uart.aw_id ), - .AWADDR_i ( uart.aw_addr ), - .AWLEN_i ( uart.aw_len ), - .AWSIZE_i ( uart.aw_size ), - .AWBURST_i ( uart.aw_burst ), - .AWLOCK_i ( uart.aw_lock ), - .AWCACHE_i ( uart.aw_cache ), - .AWPROT_i ( uart.aw_prot ), - .AWREGION_i( uart.aw_region ), - .AWUSER_i ( uart.aw_user ), - .AWQOS_i ( uart.aw_qos ), - .AWVALID_i ( uart.aw_valid ), - .AWREADY_o ( uart.aw_ready ), - .WDATA_i ( uart.w_data ), - .WSTRB_i ( uart.w_strb ), - .WLAST_i ( uart.w_last ), - .WUSER_i ( uart.w_user ), - .WVALID_i ( uart.w_valid ), - .WREADY_o ( uart.w_ready ), - .BID_o ( uart.b_id ), - .BRESP_o ( uart.b_resp ), - .BVALID_o ( uart.b_valid ), - .BUSER_o ( uart.b_user ), - .BREADY_i ( uart.b_ready ), - .ARID_i ( uart.ar_id ), - .ARADDR_i ( uart.ar_addr ), - .ARLEN_i ( uart.ar_len ), - .ARSIZE_i ( uart.ar_size ), - .ARBURST_i ( uart.ar_burst ), - .ARLOCK_i ( uart.ar_lock ), - .ARCACHE_i ( uart.ar_cache ), - .ARPROT_i ( uart.ar_prot ), - .ARREGION_i( uart.ar_region ), - .ARUSER_i ( uart.ar_user ), - .ARQOS_i ( uart.ar_qos ), - .ARVALID_i ( uart.ar_valid ), - .ARREADY_o ( uart.ar_ready ), - .RID_o ( uart.r_id ), - .RDATA_o ( uart.r_data ), - .RRESP_o ( uart.r_resp ), - .RLAST_o ( uart.r_last ), - .RUSER_o ( uart.r_user ), - .RVALID_o ( uart.r_valid ), - .RREADY_i ( uart.r_ready ), - .PENABLE ( uart_penable ), - .PWRITE ( uart_pwrite ), - .PADDR ( uart_paddr ), - .PSEL ( uart_psel ), - .PWDATA ( uart_pwdata ), - .PRDATA ( uart_prdata ), - .PREADY ( uart_pready ), - .PSLVERR ( uart_pslverr ) - ); + // UART Through JTAG// + +logic uart_amm_ready; +logic uart_amm_read; +logic uart_amm_write; +logic uart_amm_read_n; +logic uart_amm_write_n; +logic uart_amm_chipselect; +logic uart_amm_irq; +logic [0:0] uart_amm_address; +logic [31:0] uart_amm_rdata; +logic [31:0] uart_amm_wdata; + + +assign uart_amm_read_n = ~uart_amm_read; +assign uart_amm_write_n = ~uart_amm_write; + +cva6_intel_jtag_uart_0 uart_i ( + .clk (clk_i), // input, width = 1, clk.clk + .rst_n (rst_ni), + .av_chipselect (uart_amm_chipselect), // input, width = 1, avalon_jtag_slave.chipselect + .av_address (uart_amm_address), // input, width = 1, .address + .av_read_n (uart_amm_read_n), // input, width = 1, .read_n + .av_readdata (uart_amm_rdata), // output, width = 32, .readdata + .av_write_n (uart_amm_write_n), // input, width = 1, .write_n + .av_writedata (uart_amm_wdata), // input, width = 32, .writedata + .av_waitrequest (uart_amm_ready), // output, width = 1, .waitrequest + .av_irq (irq_sources[0]) // output, width = 1, irq.irq +); - if (InclUART) begin : gen_uart - apb_uart i_apb_uart ( - .CLK ( clk_i ), - .RSTN ( rst_ni ), - .PSEL ( uart_psel ), - .PENABLE ( uart_penable ), - .PWRITE ( uart_pwrite ), - .PADDR ( uart_paddr[4:2] ), - .PWDATA ( uart_pwdata ), - .PRDATA ( uart_prdata ), - .PREADY ( uart_pready ), - .PSLVERR ( uart_pslverr ), - .INT ( irq_sources[0] ), - .OUT1N ( ), // keep open - .OUT2N ( ), // keep open - .RTSN ( ), // no flow control - .DTRN ( ), // no flow control - .CTSN ( 1'b0 ), - .DSRN ( 1'b0 ), - .DCDN ( 1'b0 ), - .RIN ( 1'b0 ), - .SIN ( rx_i ), - .SOUT ( tx_o ) - ); - end else begin - /* pragma translate_off */ - `ifndef VERILATOR - mock_uart i_mock_uart ( - .clk_i ( clk_i ), - .rst_ni ( rst_ni ), - .penable_i ( uart_penable ), - .pwrite_i ( uart_pwrite ), - .paddr_i ( uart_paddr ), - .psel_i ( uart_psel ), - .pwdata_i ( uart_pwdata ), - .prdata_o ( uart_prdata ), - .pready_o ( uart_pready ), - .pslverr_o ( uart_pslverr ) - ); - `endif - /* pragma translate_on */ - end +//axi4 to avalon converter +interconnect_altera_mm_interconnect_1920_v5r556a axi_to_avalon_uart ( + .axi_bridge_1_m0_awid (uart.aw_id), // input, width = 8, axi_bridge_1_m0.awid + .axi_bridge_1_m0_awaddr (uart.aw_addr), // input, width = 64, .awaddr + .axi_bridge_1_m0_awlen (uart.aw_len), // input, width = 8, .awlen + .axi_bridge_1_m0_awsize (uart.aw_size), // input, width = 3, .awsize + .axi_bridge_1_m0_awburst (uart.aw_burst), // input, width = 2, .awburst + .axi_bridge_1_m0_awlock (uart.aw_lock), // input, width = 1, .awlock + .axi_bridge_1_m0_awcache (uart.aw_cache), // input, width = 4, .awcache + .axi_bridge_1_m0_awprot (uart.aw_prot), // input, width = 3, .awprot + .axi_bridge_1_m0_awvalid (uart.aw_valid), // input, width = 1, .awvalid + .axi_bridge_1_m0_awready (uart.aw_ready), // output, width = 1, .awready + .axi_bridge_1_m0_wdata (uart.w_data), // input, width = 64, .wdata + .axi_bridge_1_m0_wstrb (uart.w_strb), // input, width = 8, .wstrb + .axi_bridge_1_m0_wlast (uart.w_last), // input, width = 1, .wlast + .axi_bridge_1_m0_wvalid (uart.w_valid), // input, width = 1, .wvalid + .axi_bridge_1_m0_wready (uart.w_ready), // output, width = 1, .wready + .axi_bridge_1_m0_bid (uart.b_id), // output, width = 8, .bid + .axi_bridge_1_m0_bresp (uart.b_resp), // output, width = 2, .bresp + .axi_bridge_1_m0_bvalid (uart.b_valid), // output, width = 1, .bvalid + .axi_bridge_1_m0_bready (uart.b_ready), // input, width = 1, .bready + .axi_bridge_1_m0_arid (uart.ar_id), // input, width = 8, .arid + .axi_bridge_1_m0_araddr (uart.ar_addr), // input, width = 64, .araddr + .axi_bridge_1_m0_arlen (uart.ar_len), // input, width = 8, .arlen + .axi_bridge_1_m0_arsize (uart.ar_size), // input, width = 3, .arsize + .axi_bridge_1_m0_arburst (uart.ar_burst), // input, width = 2, .arburst + .axi_bridge_1_m0_arlock (uart.ar_lock), // input, width = 1, .arlock + .axi_bridge_1_m0_arcache (uart.ar_cache), // input, width = 4, .arcache + .axi_bridge_1_m0_arprot (uart.ar_prot), // input, width = 3, .arprot + .axi_bridge_1_m0_arvalid (uart.ar_valid), // input, width = 1, .arvalid + .axi_bridge_1_m0_arready (uart.ar_ready), // output, width = 1, .arready + .axi_bridge_1_m0_rid (uart.r_id), // output, width = 8, .rid + .axi_bridge_1_m0_rdata (uart.r_data), // output, width = 64, .rdata + .axi_bridge_1_m0_rresp (uart.r_resp), // output, width = 2, .rresp + .axi_bridge_1_m0_rlast (uart.r_last), // output, width = 1, .rlast + .axi_bridge_1_m0_rvalid (uart.r_valid), // output, width = 1, .rvalid + .axi_bridge_1_m0_rready (uart.r_ready), // input, width = 1, .rready + .jtag_uart_0_avalon_jtag_slave_address (uart_amm_address), // output, width = 1, jtag_uart_0_avalon_jtag_slave.address + .jtag_uart_0_avalon_jtag_slave_write (uart_amm_write), // output, width = 1, .write + .jtag_uart_0_avalon_jtag_slave_read (uart_amm_read), // output, width = 1, .read + .jtag_uart_0_avalon_jtag_slave_readdata (uart_amm_rdata), // input, width = 32, .readdata + .jtag_uart_0_avalon_jtag_slave_writedata (uart_amm_wdata), // output, width = 32, .writedata + .jtag_uart_0_avalon_jtag_slave_waitrequest (uart_amm_ready), // input, width = 1, .waitrequest + .jtag_uart_0_avalon_jtag_slave_chipselect (uart_amm_chipselect), // output, width = 1, .chipselect + .axi_bridge_1_clk_reset_reset_bridge_in_reset_reset (~rst_ni), // input, width = 1, axi_bridge_1_clk_reset_reset_bridge_in_reset.reset + .axi_bridge_1_m0_translator_clk_reset_reset_bridge_in_reset_reset (~rst_ni), // input, width = 1, axi_bridge_1_m0_translator_clk_reset_reset_bridge_in_reset.reset + .emif_fm_0_emif_usr_clk_clk (clk_i) // input, width = 1, emif_fm_0_emif_usr_clk.clk + ); // --------------- // 3. SPI diff --git a/corev_apu/altera/src/dmi_vjtag.sv b/corev_apu/altera/src/dmi_vjtag.sv index 7204ec76b42..e2a57b76c82 100644 --- a/corev_apu/altera/src/dmi_vjtag.sv +++ b/corev_apu/altera/src/dmi_vjtag.sv @@ -42,9 +42,9 @@ module dmi_vjtag #( output logic tdo_oe_o, // Data out output enable input logic[IrLength-1:0] ir_in_i, // Virtual IR in input logic jtag_state_tlr_i, // Test logic reset - input logic virtual_state_cdr_i, // Virtual Captude DR + input logic virtual_state_cdr_i, // Virtual Capture DR input logic virtual_state_sdr_i, // Virtual Shift DR - input logic virtual_state_udr_i // Virutal Update DR + input logic virtual_state_udr_i // Virtual Update DR ); assign dmi_rst_no = rst_ni; @@ -85,7 +85,7 @@ module dmi_vjtag #( assign dmi_req.addr = address_q; assign dmi_req.data = data_q; assign dmi_req.op = (state_q == Write) ? dm::DTM_WRITE : dm::DTM_READ; - // we'will always be ready to accept the data we requested + // we will always be ready to accept the data we requested assign dmi_resp_ready = 1'b1; logic error_dmi_busy; diff --git a/corev_apu/altera/src/dmi_vjtag_tap.sv b/corev_apu/altera/src/dmi_vjtag_tap.sv index 44e4008481a..8f36b61a119 100644 --- a/corev_apu/altera/src/dmi_vjtag_tap.sv +++ b/corev_apu/altera/src/dmi_vjtag_tap.sv @@ -35,9 +35,9 @@ module dmi_vjtag_tap #( input logic testmode_i, input logic[IrLength-1:0] ir_in_i, // Virtual IR in input logic jtag_state_tlr_i, // Test logic reset - input logic virtual_state_cdr_i, // Virtual Captude DR + input logic virtual_state_cdr_i, // Virtual Capture DR input logic virtual_state_sdr_i, // Virtual Shift DR - input logic virtual_state_udr_i, // Virutal Update DR + input logic virtual_state_udr_i, // Virtual Update DR // we want to access DMI register output logic dmi_access_o, diff --git a/corev_apu/altera/u-boot-spl-dtb.hex b/corev_apu/altera/u-boot-spl-dtb.hex new file mode 100644 index 00000000000..408f9a011f8 --- /dev/null +++ b/corev_apu/altera/u-boot-spl-dtb.hex @@ -0,0 +1,9599 @@ +:02000004FFE01B +:100000000A0000141F2003D500002000000000009B +:10001000884302000000000000001040FFFFFFFFC7 +:1000200098061040FFFFFFFF62000014414238D5E0 +:100030003F2000F16C000054E0000054AB0100547C +:1000400000113ED5000C40B200111ED55F111ED527 +:100050000A00001401113CD5C10010B721007BB289 +:1000600001111CD5E07F86D240111CD5030000147D +:100070000006A0D2401018D5FF4403D5404238D521 +:100080001F2000F14C01005440000054AB0000540C +:10009000000438D5000C7492E00000B50400001490 +:1000A000000438D5001C7892600000B56008005844 +:1000B00000E01BD5DF3F03D5414238D53F2000F19A +:1000C0006C000054C0000054AB00005420F239D53D +:1000D00000007AB220F219D5DF3F03D50D0000945D +:1000E0004A010094A00038D5009C409200DC609248 +:1000F000C00000B45F2003D541060058200040F93D +:10010000A0FFFFB400001FD6BF4100D5B90800947E +:10011000FD031EAA000038D500FC44D3002C4092F9 +:100120001F0C34F100010054000038D500FC44D30A +:10013000002C40921F1C34F180000054FE031DAAC5 +:10014000C0035FD6FEFFFF17FDFFFF17FD031EAACA +:10015000A00038D5009C409200DC6092600000B5A1 +:1001600040030058D10800940003005821030058B0 +:10017000E4080094A00038D5009C409200DC609216 +:10018000C00000B460020058F00800946400001041 +:100190004502005869080094FE031DAAC0035FD6FB +:1001A00040010058E5080014C0035FD6C0035FD6C5 +:1001B0009FFFFF17000000000084D7170000000019 +:1001C0001022D1FF000000000010FCFF0000000022 +:1001D0000020FCFF00000000010000000000000003 +:1001E000FD7BBFA9FD0300917C3300940000805289 +:1001F000FD7BC1A8C0035FD6FD7BBEA92000805255 +:1002000005008052FD030091E7630091E6730091C1 +:10021000040080D2030080520200805261028052AA +:10022000E01F00B975010094C00000340001009087 +:10023000006C0891A0150094000080520700001483 +:10024000E01B40B91F04003180FFFF541FFC037105 +:1002500088000054001C0012FD7BC2A8C0035FD6BA +:100260000001009000380991F3FFFF17FD7BBDA945 +:10027000FD030091F30B00F9F30300AADFFFFF97E2 +:10028000021C0012E10000D0E08300912130379180 +:10029000283A0094E1830091E00313AAC634009445 +:1002A000F30B40F9FD7BC3A8C0035FD6FD7BBEA95D +:1002B000FD030091F35301A9F403002A13008052B7 +:1002C0008A000094000440B9BF3F03D59F02206A12 +:1002D00061FFFF54730600117F2A007121FFFF5454 +:1002E000F35341A9FD7BC2A8C0035FD6FD7BBDA926 +:1002F000FD030091F35301A9F51300F97B0000946D +:1003000013100091000080D266350094F40300AA17 +:1003100015C489D2600240B9BF3F03D52001003621 +:10032000E00314AA5F3500941F0015EB4801005448 +:10033000200080D29435009408190094F6FFFF172E +:1003400000008052F35341A9F51340F9FD7BC3A887 +:10035000C0035FD6A00D8012FBFFFF171F9C0F711B +:10036000C9020054FD7BBEA9017D8052FD030091AE +:10037000F30B00F91308C11AE00000F0004C0791DC +:10038000E103132A153A009455000094000042B985 +:10039000BF3F03D5000C04121300132ABF3F03D53F +:1003A0004F000094130002B900008052F30B40F993 +:1003B000FD7BC2A8C0035FD6A0028012C0035FD637 +:1003C000FD7BBFA9FD03009145000094000042B9E8 +:1003D000BF3F03D5006C0012017D8052FD7BC1A898 +:1003E000007C011BC0035FD6FD7BBCA9E20300AA11 +:1003F000FD030091F35301A9F40301AA0100801247 +:10040000F51300F9556A40F9E00315AAF92E009496 +:10041000F303002A0002F837E103002AE00315AADB +:100420000431009420020034E103132AE4C3009154 +:10043000E00315AA030080520201009042A40B9130 +:100440008A320094F303002A60000035E01B40F973 +:10045000800200F9E003132AF35341A9F51340F990 +:10046000FD7BC4A8C0035FD653028012FAFFFF17BA +:10047000FD7BBEA90001009000C40991FD0300911D +:10048000F30B00F9130100B073421C91E10313AAAE +:10049000D6FFFF974000003407340094000100901D +:1004A0006122009100F80991D0FFFF9760FFFF35AE +:1004B0000001009061420091002C0A91CBFFFF9750 +:1004C000C0FEFF35F30B40F9FD7BC2A8C0035FD629 +:1004D000000100B0008843F9C0035FD6000100B0FE +:1004E000008C43F9C0035FD6000100B0009043F9CF +:1004F000C0035FD6FD7BBBA9010100F021C01991AB +:10050000FD030091E2830091F30B00F9F303002A4D +:10051000C0038052BA490094A0000034000080D289 +:10052000F30B40F9FD7BC5A8C0035FD6E01340F98B +:10053000E1A30091F32300F9F040009400FFFF379E +:10054000E0A3009148410094011800913F0400F19C +:10055000A1048092048041FA41FEFF54F0FFFF178E +:10056000FD7BBEA9C0038052FD030091F30B00F98F +:10057000137D80D2E0FFFF970108D39AE00000F0DE +:10058000005805919539009400048052DAFFFF97D6 +:100590000108D39AE00000F000A805918F3900947B +:1005A00060008052D4FFFF970108D39AE00000F06A +:1005B00000FC05918939009420048052CEFFFF97FA +:1005C0000108D39AE00000F00050069183390094AE +:1005D00040048052C8FFFF970108D39AE00000F062 +:1005E00000A406917D39009400068052C2FFFF9757 +:1005F0000108D39AE00000F0F30B40F900F80691EF +:10060000FD7BC2A875390014FD031EAAE40B005837 +:10061000850040F9E10B00583F0005EBE101005473 +:10062000A00038D5009C409200DC6092200100B50B +:100630009F0000F9240B00589F0000B941C03ED52F +:1006400021007FB241C01ED5DF3F03D59F3F03D5B8 +:100650007F2003D5FFFFFF17440A0058850040F9AB +:10066000A6006D92460300B5040A0058850440B9FF +:10067000A00038D5010C4092C20900584220C19A0E +:10068000A600028A860000B5840800589F0000B9C1 +:1006900003000014A4080058820400B9A00038D553 +:1006A000009C409200DC6092200200B46407005875 +:1006B000850040F9450000B4A0001FD6A00038D541 +:1006C000009C409200DC609220FFFFB56406005859 +:1006D000850040F9450000B4A0001FD6A00038D521 +:1006E000009C409200DC609220FFFFB4600600583E +:1006F0006E070094200600584106005881070094B8 +:10070000A00038D5009C409200DC6092C00000B48C +:10071000800500588D07009464000010650500589E +:1007200006070094A00038D5009C409200DC60923F +:10073000600200B5A1030058200040F9A20400584F +:10074000000002EAA100005480040058A1040058EF +:10075000C20400580400001440040058E10300588B +:1007600082040058030040B900100091230000B932 +:10077000211000913F0002EB61FFFF54FE031DAA10 +:10078000C0035FD6000000001822D1FF0000000067 +:10079000E7E52812000000001022D1FF0000000051 +:1007A0002022D1FF000000000010D1FF0000000057 +:1007B00000010000000000000010FCFF000000002D +:1007C0000020FCFF0000000001000000000000000D +:1007D000000F0F00000000001017E2FF00000000F3 +:1007E000D022E2FF00000000782EE2FF00000000AF +:1007F000B822E2FF000000005F1C00720E1C001215 +:10080000E8079F1A000C0853FD7BBAA91E0698D270 +:10081000082C082A60281453FD0300910000012AC7 +:100820000801002A109080D2094888D28F0080D217 +:10083000910480D21EFDA7F20B8080D2A51C00126D +:1008400008010432F35301A9130480D2F4031E2AD1 +:10085000F55B02A9150298D26D00805270F4BFF2C8 +:100860000A7D80D2E901A0F26FF4BFF271F4BFF209 +:1008700073F4BFF26BF4BFF215FDA7F2F76303A99F +:10088000F96B04A9FB7305A9A5030034800580D288 +:1008900060F4BFF20C0040B9BF3F03D58C011812C1 +:1008A000BF3F03D501C01DB8BF3F03D52000805214 +:1008B000600100B9027D8052000240B9BF3F03D5FC +:1008C00080170035DF3F03D536E03BD500E03BD550 +:1008D000007C0A9B0008C99A0000168B0004009156 +:1008E000DF3F03D536E03BD5DF0200EBA3FFFF542B +:1008F0004204007121FEFF54210000143FFC1F71CF +:100900002813005460F4BFD2160040B9BF3F03D58E +:10091000D6120012177D8052C006001102008052CC +:100920000010001238008052790240B9BF3F03D551 +:100930001F00196B6105005462000035BF3F03D5ED +:10094000780100B9DF3F03D539E03BD502E03BD564 +:10095000427C0A9B4208C99A4200198B42040091CA +:10096000DF3F03D539E03BD53F0302EBA3FFFF5444 +:10097000F70600712200805281FDFF54A00D801205 +:100980001FFC077104184B7AE1010054DF3F03D5C7 +:1009900036E03BD502E03BD517FA80D2427C179B6C +:1009A0004208C99A4200168B42040091DF3F03D5EA +:1009B00036E03BD5DF0202EBA3FFFF54AD0500712B +:1009C00041F6FF54F35341A9F55B42A9F76343A9EC +:1009D000F96B44A9FB7345A9FD7BC6A8C0035FD68C +:1009E000BF3F03D50202985202FDA772D602020B46 +:1009F000D67A7ED3C80200B9BF3F03D579F4BFD2FF +:100A0000170080D23A008052200300B97F00176B94 +:100A1000C9F4FF54160400119B7877B8D61200125F +:100A2000187D8052020080527C0240B9BF3F03D53E +:100A3000DF021C6B6102005462000035BF3F03D52A +:100A40007A0100B9DF3F03D53CE03BD502E03BD55E +:100A5000427C0A9B4208C99A42001C8B42040091C6 +:100A6000DF3F03D53CE03BD59F0302EBA3FFFF54E0 +:100A7000180700712200805281FDFF54C0FFFF174C +:100A8000BF3F03D50000158B00F47ED31B0000B9D7 +:100A9000BF3F03D5F7060091E003162A360300B9DD +:100AA000DBFFFF17E20140B9BF3F03D5200240B989 +:100AB000BF3F03D55F00006BE0EFFF54C043228BC4 +:100AC00000F47ED3000040B9BF3F03D542040011BB +:100AD000420C0012BF3F03D5167C1C53E20100B943 +:100AE000DF06007181EEFF54166C58D3DF020E6BE7 +:100AF00021EEFF54E60000B4D70040B9DF0000B992 +:100B000018584CD3B8000035002800129DFFFF177D +:100B100017008052FBFFFF1719FA80D2360240B946 +:100B2000BF3F03D5DF02026B21020054DF3F03D534 +:100B30003AE03BD516E03BD5D67E0A9BD60AC99A49 +:100B4000D6021A8BD6060091DF3F03D53AE03BD59B +:100B50005F0316EBA3FFFF54390700F101FEFF54BA +:100B600087FFFF17A002801286FFFF175600140BA5 +:100B7000D67A7ED3D60240B9BF3F03D542040011D6 +:100B800018070051420C0012BF3F03D5E20100B923 +:100B9000B7FBFF34D90040B9F7060051F67839B8F1 +:100BA000D60040B9D6060011D60000B9D6FFFF170F +:100BB000BF3F03D51F0200B965F7FF34800580D21F +:100BC00060F4BFF2000040B9BF3F03D50000181227 +:100BD0001F000C6BA0088012E013801A69FFFF173A +:100BE000FD7BBEA9FD030091F35301A9BF3F03D5CF +:100BF000930180D27420805273F4BFF2740200B962 +:100C0000BF3F03D5000180D260F4BFF21F0000B9DE +:100C1000BF3F03D51F7804B925008052070080D25A +:100C2000E003052A060080D2040080D2030080522F +:100C30000200805241008052F0FEFF9760000035B4 +:100C4000BF3F03D5740200B9F35341A9FD7BC2A88D +:100C5000C0035FD6070080D2060080D20500805214 +:100C6000040080D20300805202008052610680524C +:100C700020008052E1FEFF17FD7BBDA9070080D256 +:100C8000060080D2FD03009105008052040080D24E +:100C900003008052020080524106805220008052A0 +:100CA000F30B00F9D5FEFF9760020035200080525B +:100CB000E7A30091E6B3009105008052040080D2C2 +:100CC000030080520200805261078052E02F00B979 +:100CD000CAFEFF97F303002AA0000035E02B40B9BD +:100CE0009FFDFF97F303002A20020034DAFFFF97ED +:100CF0000F000014D8FFFF97F303002A800100358E +:100D0000070080D2060080D205008052040080D205 +:100D1000030080520200805241068052200080521F +:100D2000B6FEFF97F303002A20FCFF34E003132AEA +:100D3000F30B40F9FD7BC3A8C0035FD6FD7BBFA9C1 +:100D4000070080D2060080D2FD030091050080528A +:100D5000040080D20300805202008052E1088052D9 +:100D600020008052A5FEFF9740000034D23100944D +:100D7000FD7BC1A8C0035FD6FD7BBEA923008052C6 +:100D8000070080D2FD030091E4730091060080D239 +:100D90000500805202008052A10B8052E01F00B972 +:100DA000E003032A95FEFF97FD7BC2A8C0035FD630 +:100DB000FD7BBFA9FD030091C6FDFF97010040B96F +:100DC000BF3F03D540E08152FD7BC1A8E001A07286 +:100DD0002000000AC0035FD6FD7BBEA9FD03009181 +:100DE000F30B00F9F3FFFF97F303002A000200342E +:100DF000E10000F0218C3991F3010836E20000F0A7 +:100E000042A43991E00000F0001C3A91733700943D +:100E1000607A1E7261010054F30B40F9E00000D0CB +:100E2000FD7BC2A800A42D91A3120014E10000F0E4 +:100E300021D43991E20000D042A82D91F2FFFF1792 +:100E4000013C0012E1020035007C101322028052A6 +:100E50001F1C007261000054007C08134220001126 +:100E60001F0C40F261000054007C0413421000117A +:100E70001F0440F261000054007C0213420800117C +:100E80001F0040F24214821A5F400071EC000054CF +:100E9000E10000F042240051210C3A9106000014B8 +:100EA00022008052EBFFFF17E10000F042440051A6 +:100EB00021E83991F30B40F9E00000F0FD7BC2A876 +:100EC00000643A9145370014FD7BBEA9FD030091F3 +:100ED000F35301A9BF3F03D5008082D22100805285 +:100EE00040FABFF22120A07205008052E77F8052B5 +:100EF000010000B9E100009021402991240041291E +:100F0000A5040011261040B9238441F8E220C01A3C +:100F1000E920C61A4200092A8020C01A680040B998 +:100F20008420C61A0000042A0201220A620000B9C5 +:100F3000620040B90000022A600000B9BF240071BD +:100F4000E1FDFF5466FDFF97134440B91440A152E0 +:100F500063FDFF977302142A134400B960FDFF97E5 +:100F6000134840B95EFDFF977302142A134800B975 +:100F70005BFDFF97134C40B959FDFF977302142A8C +:100F8000134C00B956FDFF97133440B954FDFF9739 +:100F90004104A0527302012A133400B950FDFF9797 +:100FA000132C40B94EFDFF9773021B32132C00B96E +:100FB0004BFDFF97133840B949FDFF977302173275 +:100FC000133800B946FDFF97133C40B944FDFF9725 +:100FD00073021732133C00B9F35341A9FD7BC2A839 +:100FE000C0035FD6FD7BBEA9FD030091F30B00F9A2 +:100FF0003BFDFF97002053B9BF3F03D51F0400718D +:10100000F3179F1A36FDFF97736E1C53005453B9A4 +:10101000BF3F03D51F040071410000547302183212 +:101020002FFDFF97002853B9BF3F03D51F04007160 +:10103000410000547302103229FDFF97002C53B970 +:10104000BF3F03D51F0400714100005473020832F2 +:10105000BF3F03D522FDFF97136C00B920FDFF971A +:10106000000053B9BF3F03D51F040071F3179F1A47 +:101070001BFDFF97000453B9BF3F03D51F04007148 +:10108000410000547302183215FDFF97000853B950 +:10109000BF3F03D51F04007141000054730210329A +:1010A000BF3F03D50EFDFF97137000B9F30B40F956 +:1010B000FD7BC2A8C0035FD6FD7BBAA900029ED209 +:1010C00060FCBFF2FD030091F35301A9F55B02A997 +:1010D000F76303A9180080D2F96B04A9FB2B00F970 +:1010E000B7000094F703002A00349ED260FCBFF2E0 +:1010F000B3000094FF02006BF603002AF322801A6B +:1011000000669ED260FCBFF2AD000094F503002A99 +:10111000007E9ED260FCBFF2A9000094BF02006B6B +:10112000F403002AA122801A000C80523F00136BA6 +:101130002120931AFF820171F792801A00029ED239 +:1011400021F47ED3E203172A213C009160FCBFF218 +:1011500021787C92FF6321CBF30300917A120091F6 +:10116000E10313AAA6000094FF02186B08060054BE +:10117000DF82017179120091000C8052170080D239 +:101180001A2682D2D692801A00349ED2E203162A00 +:10119000E10313AA60FCBFF299000094DF02176B11 +:1011A00068050054BFA200717812009100058052BA +:1011B000160080D2196082D2B592801A00669ED243 +:1011C000E203152AE10313AA60FCBFF28C0000942D +:1011D000BF02166BC80400549F8201717712009100 +:1011E000000C8052150080D2188082D29492801A0E +:1011F000007E9ED2E203142AE10313AA60FCBFF230 +:101200007F0000949F02156B28040054BF030091D7 +:10121000F35341A9F55B42A9F76343A9F96B44A9CC +:10122000FB2B40F9FD7BC6A8C0035FD65B7B78B87B +:10123000BF3F03D5797A78B8A9FCFF97180B0091C6 +:10124000390740913B6B20B8C8FFFF173B7B77B84D +:10125000BF3F03D5787A77B8A1FCFF97F70A0091D2 +:1012600018031A8B1B6B20B8CDFFFF171A7B76B8BB +:10127000BF3F03D5777A76B899FCFF97D60A0091DD +:10128000F702198BFA6A20B8D2FFFF17F97A75B8FE +:10129000BF3F03D5767A75B891FCFF97B50A0091E8 +:1012A000D602188BD96A20B8D7FFFF17FD7BBFA9DC +:1012B000FD03009181FFFF97FD7BC1A84AFFFF1747 +:1012C000BF3F03D5010082D26000805201FABFF215 +:1012D000200000B920E21BD50000801200E21BD5DF +:1012E00000008052C0035FD621E8885201CAA8726C +:1012F0001F00016B60030054E8010054616A8952C9 +:101300008169A8721F00016BC0020054212B885212 +:101310008189A8721F00016B4002005481EA895242 +:10132000E149A8721F00016BE0079F1A0004001139 +:10133000C0035FD661688A5221A9A9721F00016BA0 +:101340000001005401AB8A52A109AA721F00016B6F +:1013500080000054816A8852E129A972F2FFFF17C8 +:1013600020008052F3FFFF17FD7BBFA9E30300AA13 +:10137000E20301AAFD030091000040B9BF3F03D57D +:10138000DAFFFF97400000B91F08007141010054C7 +:10139000600040B9BF3F03D50008C05AD3FFFF9794 +:1013A0001F080071400000B9E0139F5AFD7BC1A8DF +:1013B000C0035FD600008052FDFFFF17FD7BBEA972 +:1013C000E40300AAFD030091E1730091E7FFFF979A +:1013D00020010035800440B9BF3F03D5E11F40B96B +:1013E0003F040071410000540008C05A0040005101 +:1013F000007C0253FD7BC2A8C0035FD6FD7BBEA963 +:10140000E50301AAE40300AAFD030091E603022A12 +:10141000E1730091D5FFFF9780010035811040B93D +:10142000BF3F03D5E21F40B95F04007121010054A2 +:101430002108C05AA10000B98350009122008052B7 +:101440005F00066BA3000054FD7BC2A8C0035FD6FB +:1014500042FFFF35F8FFFF17610040B9A51000916A +:10146000BF3F03D5E41F40B99F04007181000054C1 +:101470002108C05AA10000B902000014C4FFFF34C3 +:101480004204001163100091EEFFFF1702B09ED2DC +:1014900062FCBFF2410040B9BF3F03D5606A895288 +:1014A0002308C05A8069A8727F00006BC1010054F4 +:1014B000BF3F03D500B29ED24240029160FCBFF212 +:1014C000430017B8010040B92108C05A014400B8D0 +:1014D0001F0002EB81FFFF5400B29ED260FCBFF2FE +:1014E000C0035FD63F00006B80FFFF54000080D236 +:1014F000FCFFFF17FD7BBEA980BF9ED260FCBFF240 +:10150000FD030091F30B00F9130040B9BF3F03D571 +:10151000BF3F03D5F2FBFF97130402B9F0FBFF971F +:10152000000442B9BF3F03D5F30B40F9FD7BC2A8CD +:10153000C0035FD600809052E0FAA272C0035FD66B +:10154000FD7BBEA900C09ED260FCBFF2FD030091EE +:10155000F30B00F9130040B9BF3F03D5BF3F03D5DC +:10156000DFFBFF97130802B9DDFBFF97000842B9C4 +:10157000BF3F03D5F30B40F9FD7BC2A8C0035FD684 +:10158000FD7BBEA9FD0300919F0400944000003440 +:10159000C92F0094B7FBFF97BF3F03D5D0FBFF9740 +:1015A000E1E18152E1E1BF72010800B9BF3F03D51B +:1015B000004284D220FABFF21F0000F941FFFF97DA +:1015C0003BFFFF97E263009101008052C00380520D +:1015D000BA450094E0FDFF35D367009413050094ED +:1015E000FEFDFF97DFFBFF9701010090211C0D918D +:1015F000E2630091A0098052BE450094E103002AF5 +:10160000A0000034E00000B000543791733500941E +:10161000E0FFFF17E263009101008052A0038052B7 +:10162000A645009460FBFF35E26300910100805203 +:10163000400C8052A1450094C0FAFF3569FDFF9728 +:101640008EFDFF97FD7BC2A8C0035FD6FD7BBFA9BF +:10165000FD0300911DFEFF97FD7BC1A82000805275 +:10166000C6FDFF17FD7BB8A9E10000F021C0149171 +:10167000FD030091F35301A9F30300AAF55B02A94E +:10168000F76303A9F96B04A9FB7305A9586A40F92C +:10169000E00318AA5E290094530300B4632200D12A +:1016A000F703002A200080D2627A60B8F403002A8F +:1016B00000040091617860B85F00016B60FFFF5427 +:1016C000570CF836E10000B0E00000B021F82A9194 +:1016D00000AC33914135009420008052600200B983 +:1016E0009F02006BE000005400018052600600B9C8 +:1016F0009F0A00716000005480008052600A00B9A7 +:10170000F35341A9F55B42A9F76343A9F96B44A9D7 +:10171000FB7345A9FD7BC8A8C0035FD6BF02146B4D +:10172000AB010054E203142AE10000B0F35341A9D5 +:1017300021F82A91F55B42A9E00000B0F76343A9C4 +:1017400000443491F96B44A9FB7345A9FD7BC8A8FB +:1017500022350014E00318AA2D290094FC03002A66 +:101760004004F837E103002AE2E30191406A40F9BE +:10177000E03700F9200980527A4500946005003472 +:10178000E2E30191E1031C2A600E8052754500944A +:1017900040050034E2E30191E1031C2A6009805214 +:1017A00070450094E0040034E03740F9E1031C2A5E +:1017B000E2031AAA030080D28F280094FC0300AA37 +:1017C000400100B4E1031BAA7B2F00940003003406 +:1017D000E10000B0E00000B0E2031CAA2140299122 +:1017E00000143591FD340094D6060011E103172A48 +:1017F000E303162AE20319AAE00318AA040080D220 +:10180000BC290094E10300AAA0F8FFB5B5F7FF35A5 +:10181000E10000B021F82A91B6020035E00000B0E6 +:1018200000DC3591ACFFFF172000805260DA35B83C +:10183000B5060011EDFFFF1700018052FCFFFF17F6 +:1018400080008052FAFFFF17F90000B0FA0000B0E4 +:10185000FB0000D0398735915AE734917BDF169130 +:101860001600805215008052E1FFFF17F35341A983 +:10187000E00000B0F55B42A900883691F76343A908 +:10188000F96B44A9FB7345A9FD7BC8A8D3340014A8 +:1018900000E03BD5C0035FD6DF3F03D520E03BD55A +:1018A000404E01B9C0035FD6FD7BBBA9FD0300918B +:1018B000F55B02A9F50300AA600080520000024B0C +:1018C000360080D2F35301A9F30301AA000C000BE8 +:1018D00000300011F76303A9F703022AD622C09A49 +:1018E000F80303AAF96B04A9D90600D15A04001120 +:1018F000F30000B5F35341A9F55B42A9F76343A98F +:10190000F96B44A9FD7BC5A8C0035FD6FF02007137 +:101910003403158A60C256FAA3000054940000B53F +:10192000B502168B730216CBF2FFFF17000340B906 +:10193000D40214CB9F0213EBE30318AA0004001196 +:10194000000300B99492939AE00315AAE2031A2ABD +:10195000E10314AA730214CBB502148BD3FFFF97D3 +:10196000E4FFFF17FD7BBEA9FD030091F30B00F917 +:1019700053BA40F941BA40F92104409141BA00F903 +:1019800041BA40F943B240F942B640F9210003CBD5 +:101990003F0002EB0901005443BA40F9E00000D0D7 +:1019A00041B240F900D0079142B640F9610001CB45 +:1019B00043300094E00313AA020082D20100805257 +:1019C000512F0094E00313AAF30B40F9FD7BC2A84A +:1019D000C0035FD6FD7BBDA9430080526300014B6D +:1019E000FD030091F35301A9F40300AA630C030B58 +:1019F000F55B02A9160040F9C00600121F04007131 +:101A0000C0000054E00000F0E20316AAE10314AAAB +:101A100000A41E912A300094F503012A73300011AE +:101A2000D1FFFF97040080D28320D39A630016AAC7 +:101A3000610440B2BF0A00716310819A037824F8F0 +:101A4000840400919F0008F101FFFF54020440B29A +:101A5000F55B42A9820200F9F35341A9FD7BC3A8BB +:101A6000C0035FD666008052C600034BFD7BBAA957 +:101A7000C60C060BC6300011FD030091F76303A9E5 +:101A8000380080D21823C69A0624C69AF70300AA03 +:101A9000C6207DD3F35301A9F30302AAF55B02A983 +:101AA000F50305AA9600068BF96B04A9190700D166 +:101AB0007A040011FB7305A9FB0301AAFC03032AA6 +:101AC000130100B5F35341A9F55B42A9F76343A99C +:101AD000F96B44A9FB7345A9FD7BC6A8C0035FD67B +:101AE0009F0300713403178A60C258FA83010054BF +:101AF000740100B5600315AA9F0F007141000054E6 +:101B0000000440B2F702188B7B03188B730218CBCA +:101B1000C00200F9D6220091EAFFFF17C00240F987 +:101B200000040072610200548FFFFF97000440B26E +:101B3000C00200F9140314CBE1031BAA9F0213EBAC +:101B4000E00317AAC40240F99492939AE50315AAF8 +:101B5000E3031A2AE20314AAF702148B7B03148B03 +:101B6000730214CB848C7492BFFFFF97EAFFFF17B8 +:101B70001F0C007100FEFF54E1031C2AE00316AAAB +:101B800095FFFF97ECFFFF17E60300AA434238D505 +:101B9000630C02537F080071A100005400113CD572 +:101BA0001F005EF2E3179F1A63040011000100900A +:101BB000040080D2009443F9050840F9850400B57B +:101BC000020C40F9420400B50000C2D29F0000EBB5 +:101BD000880400540080C0D29F0000EB88040054A9 +:101BE0000020C0D29F0000EB880400540002C0D245 +:101BF0009F0000EB880400542000C0D29F0000EB3F +:101C0000E2979F9A840480D2000480D28480809AD4 +:101C10000510B0D27F040071A08002AAA54002AADC +:101C2000A510809A030880D2630004CB00A086D25E +:101C3000630005AA600000AA460000B4C20000F9D3 +:101C4000410000B4240000F9C0035FD6020442F84A +:101C5000A500028B9F0005EB8420859AD7FFFF1714 +:101C6000040680D2A20080D2EAFFFF17840580D24A +:101C7000820080D2E7FFFF17440580D2620080D245 +:101C8000E4FFFF17040580D2420080D2E1FFFF1776 +:101C9000FD7BBEA9000080D2FD030091E1630091AD +:101CA000FF1700B9B9FFFF97E00F40F9040080D299 +:101CB000060100901F9800F1E5879F1AC09443F930 +:101CC0000000048B010840F9010100B5030C40F944 +:101CD000C30000B5E11780B9000088D2FD7BC2A81F +:101CE0000034018BC0035FD6000040F9E35300913C +:101CF000E203052A84800091ECFEFF97F0FFFF17B6 +:101D0000FD7BBCA9FD030091F35301A9F51300F974 +:101D100041BA40F9610000B440B240F9800000B51A +:101D2000E00000F0002C0591652F0094130080D294 +:101D300014010090358080D20BFFFF97899643F9FC +:101D40002701138BE02041A9000100AAA00000B5E3 +:101D5000F35341A9F51340F9FD7BC4A8C0035FD636 +:101D6000E1E30091000080D288FFFF97E01F40F977 +:101D7000050115AAE18840A91F9800F1206973F8B0 +:101D8000E3879F1A44B240F97382009136FFFF97B0 +:101D9000EBFFFF17FD7BBEA9FD030091F35301A9E3 +:101DA00053B240F954B640F953BA00F9D5FFFF9742 +:101DB00042BA40F941B240F943B640F92100038BE1 +:101DC000210002CB41B600F941BA40F941B200F915 +:101DD000CCFFFF9741B240F941BE00F953B200F980 +:101DE00054B600F9F35341A9FD7BC2A8C0035FD6E6 +:101DF000FD7BBFA9FD03009140BA40F9400000B54A +:101E0000E5FFFF97474238D5010080D2E70C025327 +:101E1000000080D248B240F95CFFFF979F3F03D596 +:101E2000018080D2FF0400718181A8F2E11FC0F21D +:101E300061020054082018D5402018D501A218D5F9 +:101E4000DF3F03D5404238D5000C02531F04007118 +:101E500001030054001038D500000032414238D54B +:101E6000210C02533F04007101030054001018D5E7 +:101E7000DF3F03D5FD7BC1A8C0035FD6FF0800711B +:101E8000A100005408201CD540201CD501A21CD55F +:101E9000ECFFFF17FF0C0071A100005408201ED5B5 +:101EA00040201ED501A21ED5E6FFFF17822D00940B +:101EB0001F0800716100005400103CD5E7FFFF17B8 +:101EC00000103ED5E5FFFF173F0800716100005488 +:101ED00000101CD5E7FFFF1700101ED5E5FFFF1708 +:101EE000FD7BBFA9FD030091DF000094FD7BC1A82D +:101EF000FE000014EE000014E1000014FD7BBFA9F9 +:101F0000FD030091404238D5000C02531F040071BC +:101F1000E1020054001038D580000037F1FFFF9730 +:101F2000F4000094B3FFFF9740BA40F9400000B5B9 +:101F300099FFFF97404238D5000C02531F040071EF +:101F400021020054001038D500001E32414238D51D +:101F5000210C02533F04007121020054001018D5D7 +:101F6000DF3F03D5FD7BC1A8C0035FD61F0800710A +:101F70006100005400103CD5E8FFFF1700103ED56B +:101F8000E6FFFF171F0800716100005400103CD5E8 +:101F9000EEFFFF1700103ED5ECFFFF173F08007162 +:101FA0006100005400101CD5EEFFFF1700101ED575 +:101FB000ECFFFF17404238D5000C02531F0400719C +:101FC00021020054001038D560031036FD7BBFA9F4 +:101FD00000787F9200F87D92FD030091414238D550 +:101FE000210C02533F040071A1010054001018D5C8 +:101FF000DF3F03D59A0000949D000094FD7BC1A8AB +:10200000BC0000141F0800716100005400103CD592 +:10201000EEFFFF1700103ED5ECFFFF173F080071E1 +:102020006100005400101CD5F2FFFF1700101ED5F0 +:10203000F0FFFF17C0035FD6404238D5000C0253B3 +:102040001F04007181000054001038D500080253AD +:10205000C0035FD61F0800716100005400103CD51A +:10206000FBFFFF1700103ED5F9FFFF17404238D5A0 +:10207000000C02531F04007161010054001038D598 +:10208000007C409200F87392414238D5210C0253F3 +:102090003F04007141010054001018D5DF3F03D503 +:1020A000C0035FD61F0800716100005400103CD5CA +:1020B000F4FFFF1700103ED5F2FFFF173F08007135 +:1020C0006100005400101CD5F5FFFF1700101ED54D +:1020D000F3FFFF17404238D5000C02531F04007174 +:1020E00081000054001038D500000012C0035FD6F4 +:1020F0001F0800716100005400103CD5FBFFFF1762 +:1021000000103ED5F9FFFF17FD7BBFA9FD0300912D +:1021100073000094FD7BC1A857000014FD7BBFA98C +:10212000FD030091F9FFFF97404238D5000C0253A0 +:102130001F04007161010054001038D500001432F2 +:10214000414238D5210C02533F0400716101005413 +:10215000001018D5DF3F03D5FD7BC1A8C0035FD6B3 +:102160001F0800716100005400103CD5F4FFFF17F8 +:1021700000103ED5F2FFFF173F08007161000054C8 +:1021800000101CD5F4FFFF1700101ED5F2FFFF173B +:102190000CF87FD30C001AD5DF3F03D5060039D5E4 +:1021A000C20840D3900000B4C35C43D3C4DC60D306 +:1021B00003000014C33043D3C46C4DD342100091CC +:1021C0006510C05AE60303AAC720C59A890107AA69 +:1021D0008720C29A290107AA61000036497608D5EE +:1021E00002000014497E08D5C60400F1EAFEFF543F +:1021F000840400F18AFEFF54C0035FD6E10300AA05 +:102200009F3F03D52A0039D54B6958D36B0200B4E0 +:10221000EF031EAA500738D5105E54D3000080D2B9 +:102220000C04008B4C25CC9A8C0940929F0900F13C +:102230004B000054D7FFFF97000400917F0100EB93 +:102240000CFFFF54000080D200001AD59F3F03D539 +:10225000DF3F03D5FE030FAAC0035FD6000080D284 +:10226000E7FFFF17200080D2E5FFFF17000080D2B4 +:10227000C0035FD6000080D2C0035FD623003BD5E9 +:10228000634C50D3820080D24220C39A430400D1D1 +:102290000000238A207E0BD50000028B1F0001EB7B +:1022A000A3FFFF549F3F03D5C0035FD623003BD558 +:1022B000634C50D3820080D24220C39A430400D1A1 +:1022C0000000238A207608D50000028B1F0001EB56 +:1022D000A3FFFF549F3F03D5C0035FD61F7108D5EE +:1022E000DF3F03D5C0035FD6000080D2C0035FD6B6 +:1022F000494238D53F2100F16C000054C000005421 +:102300002B0100541F870ED59F3F03D5DF3F03D518 +:10231000080000141F870CD59F3F03D5DF3F03D56E +:10232000040000141F8708D59F3F03D5DF3F03D566 +:10233000C0035FD600000000464238D5DF2000F120 +:10234000EC000054400000542B000054BF0400F186 +:10235000400000542500009480001FD65F111ED558 +:10236000E67F86D246111CD57FE01CD5A602005818 +:1023700006101CD5E603009106411ED506C03ED5C9 +:1023800006C01CD5BF0000F1E0000054E601005873 +:1023900006111ED5E601005806401ED524401ED564 +:1023A000E0039FD6A601005806111ED5A6010058CD +:1023B00006401ED524401ED5E0039FD60000000035 +:1023C0003008C53000000000B1050000000000002A +:1023D000C903000000000000B1010000000000007F +:1023E000DA01000000000000C0035FD6000000001A +:1023F000000300581FEC7C92E0030091DD0500947F +:102400001F000091F20300AADE050094000080D2B4 +:102410005CFCFF97910100941F0000F11210929A4A +:10242000E10300911F0000F10010819A1F0000914C +:1024300040010058610100581F8400F81F0001EBA3 +:10244000C3FFFF54E00312AA413A40F90A01001405 +:1024500000F0E3FF000000000000F03F000000007B +:102460009806F03F00000000FD7BBDA943008052AC +:10247000FD030091410240F9223C40F9E20B00F9D2 +:10248000224040F9E21300F9228448A9E20F00F942 +:10249000E11700F9E2830091E14300914F060094B7 +:1024A000FD7BC3A8C0035FD6414238D53F2000F171 +:1024B0006C000054400200542B020054690080520A +:1024C000090000B9090440B92A1100128A01003438 +:1024D0000B00029109008012694500B8694500B8F7 +:1024E0004A050051CAFFFF35C10300586000805201 +:1024F000200000B900108052200400B9C0035FD64C +:10250000424238D55F2000F16C0000544001005475 +:102510002B01005409008012098000B92900805263 +:10252000090001B9E93C8052290000B90910805224 +:10253000290400B9C0035FD6090090520920A07297 +:1025400009000FB9C0035FD67F2003D5092040B929 +:10255000092400B92925001289FFFF35C0035FD681 +:102560000020FCFF00000000FD7BBFA9FD030091DF +:10257000000C40F900003FD6FD7BBFA9010084D2CA +:10258000FD030091419600F95F9A00F9C62A009474 +:1025900080000035FD7BC1A8200080523A40001425 +:1025A000FD7BC1A8C0035FD6400400B4FD7BBEA97B +:1025B000FD030091F30B00F9F30300AA1723009425 +:1025C0000001F836A7260094E10300AAF30B40F9B6 +:1025D000E00000D0FD7BC2A800D815917F31001427 +:1025E000E00313AA01008052C8060094E000003501 +:1025F000E00000D00010169101008052F30B40F96A +:10260000FD7BC2A875310014E00313AA97FFFF9762 +:10261000E103002A80000034E00000D000A41691FD +:10262000F7FFFF17F30B40F9FD7BC2A8C0035FD68D +:10263000C0035FD60001009001E00A91025C41F9FD +:1026400040688AD220ABA9F25F0000EB6100005421 +:10265000200440F9C0035FD600008092FEFFFF1700 +:10266000000080D2C0035FD6C0035FD6000048914F +:10267000C0035FD6A0028012C0035FD6A002801202 +:10268000C0035FD6450040B9E4A4805224C3AA72B7 +:10269000BF00046B61000054E10302AAF8FFFF17BA +:1026A000FD7BBFA9030880D2FD030091F2FFFF97D5 +:1026B0001F000071A10280120000811AFD7BC1A8D9 +:1026C000C0035FD6FD7BBCA9FD030091F35301A9B4 +:1026D000F30302AAF40300AAE0078092F55B02A9C3 +:1026E000F60304AAF71B00F9F70301AA010880D238 +:1026F000DFFFFF97640640F9F50300AAE30300AA91 +:10270000601280B9E10316AA02FC0091E00300CB3D +:102710004200008AE00313AA80003FD61FFC00712C +:1027200089050054A10240B900BA8152C0BFBD72F0 +:102730003F00006B41010054E30315AAE20316AA0F +:10274000E10313AAE00314AAF35341A9F55B42A9DC +:10275000F71B40F9FD7BC4A8DC010014E20315AAB5 +:10276000E10317AAE00314AAC7FFFF97F503002AA5 +:1027700020030035651240B9830A40F9A1040051D5 +:10278000822E40B9A07C4093040400D1E00300CB2A +:102790008400028B630002CB823240B981C021CB1E +:1027A0002100008A4200048B6300018B640640F91B +:1027B000420001CB4200008AC102018BE00313AA50 +:1027C00080003FD6813240B93F00006B4900005481 +:1027D00095008012E003152AF35341A9F55B42A945 +:1027E000F71B40F9FD7BC4A8C0035FD6400240F947 +:1027F000800000B5E00000F000C02091400200F928 +:10280000C0035FD6FD7BBFA9FD0300915BFFFF976F +:1028100080000035410640F9210071B2410600F9FF +:10282000FD7BC1A8C0035FD6400640F9C0007836E2 +:10283000400640F9000076B2400600F900008052E0 +:10284000C0035FD6FD7BBFA9FD0300914BFFFF973F +:10285000A0000035400640F9000076B2400600F9BD +:1028600000008052FD7BC1A8C0035FD600008052EB +:10287000C0035FD6FD7BB3A9820280D2C10000F005 +:10288000FD030091F55B02A9F6E3019121E00591BA +:10289000E00316AAF35301A9F76303A9F96B04A98E +:1028A000FB7305A9B42B0094010AA0D2D0FFFF97B7 +:1028B00000F4A7D2340C0094410640F9210077B20D +:1028C000410600F9400640F980005037D7FFFF97D6 +:1028D00040000034F82A00947AFAFF97F7DD975207 +:1028E00011630094B7D5BB723EF6FF97150100B097 +:1028F000020880D201008052E0430291822B0094B2 +:10290000E00316AAF7BB00B957FBFF97B5A22891C1 +:10291000000100B000802A91130015CBE0F301B252 +:10292000605595F2FA00009073FE43935A67389110 +:10293000190080D2FB000090737E009B0003805240 +:102940007356209BD87A79B81F03176BC0050054C3 +:10295000F40315AA7C07389126000014800A40B9B8 +:102960001F00186B41040054F40300B4E003182A5C +:102970003CFFFF97E10300AA400000B5810240F947 +:10298000E0031CAA95300094800A40B9E1A30191AC +:10299000E06B00B9E0430291FF3B00F9820A40F985 +:1029A00040003FD640020035E1A30191E04302918F +:1029B000AFFFFF97C0010035E0430291F8BB00B9BB +:1029C00023FBFF97E06342391F640071400200540B +:1029D0001300009073A2159124FFFF97E04302912A +:1029E00060023FD6E0031AAAB30B009494620091F0 +:1029F0009F0213EB41FBFF54390700913F1700F191 +:102A000021FAFF54E000009000E03891AA0B0094F6 +:102A1000B1FFFF17E05B40F9130000B073A22091F3 +:102A2000E2FEFF97EDFFFF17FD7BBFA90140985223 +:102A30002100A072FD030091411200B94F51009492 +:102A4000210080D2411E00F9E00000B0005838910A +:102A5000FD7BC1A8980B0014000080D2C0035FD694 +:102A6000FD7BBCA9FD030091F35301A9F40303AA64 +:102A7000E3F30091F55B02A9F503022AE20301AA40 +:102A8000011440B9000040F9DB230094200200B497 +:102A9000F30300AA16008052DF02156B8B0000546E +:102AA000800200F9000080520B00001401008052E7 +:102AB000D72A0094E13F80B900040091020013CBB3 +:102AC0005F0001EB0A010054D6060011F3FFFF1767 +:102AD000A0028012F35341A9F55B42A9FD7BC4A873 +:102AE000C0035FD6C0008012FBFFFF17FD7BBDA9AE +:102AF000FD030091E3A30091F35301A9F30300AA9E +:102B0000D8FFFF97A0010035611240B9600240F97B +:102B1000F41740F9E20314AA26230094E000F836E3 +:102B2000E203002AE10314AAE00000D0002415917A +:102B30002A300094A0028012F35341A9FD7BC3A860 +:102B4000C0035FD6FD7BB8A9FD030091F35301A933 +:102B5000F30302AAF403032AF55B02A9F76303A9AE +:102B6000F80300AAF70304AAF96B04A9F90301AA60 +:102B7000E103032A550040F9E2A30191E00315AAFD +:102B8000B106009480020034E00A40F9200200B54A +:102B9000020080D2130D8012E103142AE00315AA6B +:102BA000C2220094E10300AAE00000B000342C919E +:102BB0000A300094E003132AF35341A9F55B42A9BC +:102BC000F76343A9F96B44A9FD7BC8A8C0035FD68E +:102BD000E03700F9E2630191E103142AE00315AA4A +:102BE000C706009440010034E2630191E103142A16 +:102BF000E00315AAB0060094E0020035610640F932 +:102C0000E05B40B90000010BE05B00B9E2730191A9 +:102C1000E103142AE00315AACB060094E002003574 +:102C2000F35F40B9F3020035E103142AE00315AA6B +:102C3000020080D29D220094E1000090E20300AAED +:102C4000213C2B91E00000B000EC2C91E32F00948C +:102C5000D9FFFF17E3830191E2C30191E103142A35 +:102C6000E00315AA8006009460080034E00000B07C +:102C700000842D91100B009433008012CEFFFF17BB +:102C8000607E4093E03300F9001340B9E15B40B946 +:102C900003040051E003004B2200030A2100000A54 +:102CA000F63740F95A7C40936202020B21C3218B14 +:102CB000040740F94200030B4200000AD6FE0091CF +:102CC000D6E67A92E00318AAE30316AA427C409360 +:102CD00080003FD6E13340F91F0001EB03050054AB +:102CE000D6021A8B020080D2E103142AE00315AA4F +:102CF0006E220094E10300AAE00000B000F42D91E0 +:102D0000B62F0094E43340F9E30316AA426A40F96F +:102D1000E103142AE00315AADC0600944003003402 +:102D2000E00000B000902E91E30A0094E20346A96F +:102D3000E10316AA902A0094B70100B4E03740F9E5 +:102D4000E00A00F9E03340F9E03200B9E2E3019132 +:102D5000E103142AE00315AA3F0600941F00007146 +:102D6000E03F40F900009FDAE00E00F913008052C6 +:102D700091FFFF17F63B40F9DBFFFF17930080122E +:102D80008DFFFF17130080128BFFFF17FD7BB8A983 +:102D9000FD030091F35301A9F30300AAF55B02A917 +:102DA000F60301AAF50303AAF71B00F9E10000D01E +:102DB000F70302AA21141591143040B90200805281 +:102DC000000840F99402008BE00303AAF42B00F9F9 +:102DD00047FFFF972002F836426A40F9220300B409 +:102DE000406A40F9020440B9E00314AA741200F9E1 +:102DF0004208C05A416A40F95F2A0094F55B42A933 +:102E000001008452601240F9F35341A9F71B40F9C5 +:102E1000FD7BC8A8BD040014E303002AE40301916C +:102E2000E20315AAE10317AAE00316AA46FFFF97DB +:102E30008000F837E02B40F9601200F9F0FFFF172F +:102E4000F35341A9F55B42A9F71B40F9FD7BC8A8E4 +:102E5000C0035FD6C0035FD6FD7BBEA9217C021BE9 +:102E6000000880D2FD030091F30B00F9337C4093FE +:102E700061FE009121E47A924D0D0094A00100B50D +:102E8000E10313AAE0000090008C3991532F0094C5 +:102E9000E000009000283A91502F0094E10313AA1B +:102EA000000080D2F30B40F9FD7BC2A8F0FDFF17B4 +:102EB000F30B40F9FD7BC2A8C0035FD6000080522F +:102EC000C0035FD6C0035FD6FF8304D1FD7B01A999 +:102ED000FD430091F35302A9F30300AAF55B03A994 +:102EE000F76304A9F70301AAF80302AAF96B05A97D +:102EF000FB7306A9600440B90008C05A000C001119 +:102F000000747E92D4FFFF97E21240B9010C009149 +:102F100021F47E92E16B00F941040051E203024B7F +:102F20002100000B2100020A22008052357C4093D0 +:102F3000E00315AAC9FFFF97E40640F9F40300AACD +:102F4000E30300AAE20315AAE10318AAE00317AA03 +:102F500080003FD6F46700F9801900B4D8FFFF97CE +:102F60001F1C007261190054E06740F9D6FFFF97FB +:102F7000E06700F9BD090094E0DF00B9E103002A31 +:102F80006001F836B5028012E003152AFD7B41A9E5 +:102F9000F35342A9F55B43A9F76344A9F96B45A92B +:102FA000FB7346A9FF830491C0035FD6E06740F935 +:102FB000020080D2BD210094E10300AAE00000D00D +:102FC00000201891052F0094E1DF40B9E06740F937 +:102FD00004090094F403002A6000003415008012F4 +:102FE000EAFFFF17E00000B000902E91320A009433 +:102FF000E06740F9E10000D021C01891042300945B +:10300000E0DB00B900FCFF37E023039102008052AF +:10301000E10000B0213C3A91B5FEFF97F603002A8B +:103020002001F836E023039102008052E10000B055 +:1030300021E01891AEFEFF97F603002A00FDFF374E +:1030400034008052E40313AAE303162AE223039117 +:10305000E10318AAE00317AABBFEFF97F503002AB5 +:1030600040F9FF35E06740F962220091E103162A3A +:1030700062050094C00100342002805260220039B1 +:10308000E3230391E20318AAE10317AAE00313AABA +:103090003FFFFF972001F836612240393F4400711D +:1030A000C0000054F503002AB8FFFF176022403922 +:1030B0001F44007160FEFF54FA0000B0FC0000B035 +:1030C0005AE318919C9B2191FB0000B060DB1991A1 +:1030D000E03F00F9E203142AE1031AAAE023039176 +:1030E000FFFF023982FEFF97F903002AA00BF83791 +:1030F0001F00166B6100005494060011F6FFFF17C5 +:10310000E303002AE4830391E2230391E10318AA75 +:10311000E00317AAFF7B00F98BFEFF97FB03002A51 +:103120004001F836E303002AE203142AC10000F04C +:10313000E00000B021042C9100081991F5031B2A2E +:10314000A62E009491FFFF17E06740F9E2FF02917D +:10315000E103192A29050094E0FF42391F44007158 +:1031600001010054E3230391E20318AAE10317AA23 +:10317000E083039106FFFF97E08340F9601200F9B6 +:10318000600E40F91F0400B1A1000054E07F40F937 +:103190001F0400B140000054600E00F9791240F99C +:1031A000D9FAFFB4E3030391E203142AE1031AAA54 +:1031B000E02303912BFEFF9700FAFF37E203142A66 +:1031C000E1031AAAE023039149FEFF97FB03002ABB +:1031D000E103002AE8034CA9E2031CAAE9174FA95E +:1031E000030080D2E41341B9E54B00F9E49F00B934 +:1031F000E9230AA900220094E60300AAE1031B2A9E +:10320000E23F40F9030080D2E06740F9E64700F969 +:10321000F9210094E70300AAE06740F9E1031B2AC3 +:10322000030080D2E20000B042E41991E74300F9C4 +:10323000F1210094E00300F9E71B48A9E103142AF7 +:10324000E9234AA9E00319AAE49F40B9E54B40F9F4 +:10325000E30309AAE20308AA42030094A7FFFF17A9 +:10326000600E40F9000400D11F0C00B16900005449 +:10327000600A40F9600E00F9603640B900001F3264 +:10328000603600B941FFFF17950080123FFFFF171E +:10329000150080523DFFFF17FD7BBBA9FD03009188 +:1032A000F35301A9F40301AAF30300AAE00302AA5D +:1032B000F51300F9F50303AA11480094042840B956 +:1032C000E2E30091011040F9E14B00B901000090E8 +:1032D00021500C91030080D2A422C49AE01F00F96F +:1032E000E00313AAE12300F9E10314AAF6FCFF9717 +:1032F000A0000034E0000090002833916E09009493 +:1033000000008012F35341A9F51340F9FD7BC5A8D5 +:10331000C0035FD6FD7BBEA9FD030091F30B00F94E +:10332000130040F9602A40B94224C09A2124C09A6F +:10333000E00313AAC3330094612A40B9F30B40F9A8 +:103340000020C19AFD7BC2A8C0035FD64000805216 +:10335000C0035FD620008052C0035FD6E00301AAFD +:10336000C0035FD6FEFFFF17FFFFFF1700D44139F0 +:10337000001443D31F1C007100109F1AC0035FD6B6 +:10338000FBFFFF17FD7BB5A9FD030091F35301A9D6 +:10339000F55B02A9F60300AAF50301AAF76303A9E6 +:1033A000F70302AAF803032AF96B04A9F90304AA94 +:1033B000200040B91F040071600300540008005150 +:1033C0001F0400714903005453028012E00000B052 +:1033D00000F81991012E0094F407A0B0800240F982 +:1033E000A00200B5A00240B91F040071E00A005419 +:1033F000000800511F040071280900543A0080524F +:10340000E0031A2ADC460094F303002A200A003461 +:10341000E103002AE00000B000841A91EF2D00942F +:103420004300001413008052ECFFFF17330080525A +:10343000EAFFFF17B2470094000440B97F02006B17 +:1034400021FDFF54800240F9A10240B9C0FFFF975F +:103450001F080071E00400541F0C0071E0090054C3 +:103460001F040071610C0054800240F9E10319AAA5 +:1034700033008052BDFFFF97F90300AA9A0240F97A +:10348000E0031AAA9E470094E2430191E103132A44 +:10349000B82E009480000035E0B342391F880271D5 +:1034A000A0000054730600117F260071A1FEFF5496 +:1034B000F303182AE0031AAA91470094E24301910A +:1034C000E103132AAB2E009420080034E00000B082 +:1034D00000001D91F8080094820240F9E30319AA44 +:1034E000E10315AAE00316AA6CFFFF97E00700347A +:1034F000800240F982470094E20300AAE40317AA7D +:10350000E10315AAE00316AA23008052FB000094F1 +:10351000C00600343300801205000014E00000B043 +:1035200000F81991AD2D009453028012E003132A84 +:10353000F35341A9F55B42A9F76343A9F96B44A989 +:10354000FD7BCBA8C0035FD61A008052ADFFFF17EA +:10355000E0031A2A55470094800200F9E00000B504 +:10356000E1031A2A42028012E00000B0002C1B91F5 +:103570009A2D0094EDFFFF1720440094F303002AD6 +:1035800020F6FF34E103002A9F0200F9E00000B0BA +:1035900000E41B91A2FFFF17800240F979FFFF971B +:1035A000F303002A800240F955470094E103132AEF +:1035B0006F320094F303002A80F5FF34E00000B07E +:1035C00000781C91BC080094D9FFFF17E32B40F949 +:1035D000E2031AAAE10315AAE00316AA2303038B48 +:1035E0002EFFFF97A0F7FF3513008052D0FFFF1783 +:1035F000E00000B0B302801200581D91AE080094A4 +:10360000CBFFFF17FD7BBEA9FD030091F35301A97A +:10361000F40300AAF30301AA200040B94EFFFF976C +:10362000E303002AE10313AAE00314AAF35341A918 +:10363000044080D2FD7BC2A8E20000B042C41D91CC +:1036400051FFFF17FD7BBCA9FD030091F35301A9B6 +:10365000F55B02A9FF3F00B9400500B4F503012A5C +:10366000E10000B021A81591F40300AA682100949C +:10367000E103002AE000F83613008012E003132A69 +:10368000F35341A9F55B42A9FD7BC4A8C0035FD6F3 +:10369000E2F30091E00314AAF60000B0441F009486 +:1036A000D6DA1991F303002A93FEFF37E03F40B9C1 +:1036B0001F0000712DFEFF541F040071E000005434 +:1036C000E103132AE2F30091E00314AA381F0094E7 +:1036D000F303002AF5FFFF17E20316AAE103132AFA +:1036E000E00314AA030080D2C3200094A0FEFFB41C +:1036F000440100941F00156B41FEFF54E0FFFF17CB +:1037000013018012DEFFFF17FD7BBCA9FD030091B2 +:10371000F35301A9F40301AA01008052F71B00F939 +:10372000F707A0B0F3220091F55B02A9F50300AA08 +:10373000F60302AAE00313AA023080D2F227009413 +:10374000602080D2432080D20006A0F2E00600F97B +:1037500060C20091600600F960420391600A00F9BE +:10376000202080D20303A0F2000BA0F2606A00F9CF +:10377000A078805260E200B960220191600E00F9E9 +:1037800060E20191601200F9202080D2631A00F9F2 +:10379000000BA0F2632600F92000C0F2603E00F9A1 +:1037A000756E00F9768200F9A00038D5003C409291 +:1037B000604A00F920798052608A00B960820191E4 +:1037C000601600F9E00313AA633200F9744200F9AD +:1037D000F35341A9F55B42A9F71B40F9FD7BC4A84F +:1037E000C0035FD6C9FFFF17FD7BBDA9FD03009194 +:1037F000E2A30091F35301A9F30300AAF403012A01 +:1038000095030094A0000034E2A30091E103142A80 +:10381000E00313AA8C030094F35341A9E01740F985 +:10382000FD7BC3A8C0035FD6FD7BBDA941038052C9 +:10383000FD030091F35301A9F40300AAF51300F965 +:10384000151040F9E00315AA7FFFFF970003F83732 +:10385000E103002AE00315AAE4FFFF97F30300AA9F +:1038600021028052E00315AA77FFFF97E103002AA7 +:103870002002F837E00315AADCFFFF97E10300AA56 +:10388000E00313AA020080D2940E40F9D6FFFF97FE +:10389000F30300AA0078805220421BD5C6F9FF9797 +:1038A000E00313AA010080D280023FD6130080D229 +:1038B000ECFFFF170104A0D2F2FFFF17FD7BBEA9AA +:1038C000E50301AAE10303AAFD030091000040F90A +:1038D000E4630091E30302AAE20305AAE86200940C +:1038E000017C40931F000071E00F40F9FD7BC2A8EE +:1038F0002010809AC0035FD6FD7BBAA9FD0300911A +:10390000F71B00F9F707A0B0F55B02A9F50300AAC1 +:10391000E00302AAE28A41B9F60301AAF35301A91E +:10392000F40304AA62030035E103032A2A61009428 +:10393000F303002AA0020034E203002AC10000F0D1 +:10394000E00000B021A02991001C1791A32C009445 +:103950001301F836C10000F0E00000B0E303132AC1 +:10396000E20314AA217C2B91008817919B2C0094D0 +:10397000E003132AF35341A9F55B42A9F71B40F971 +:10398000FD7BC6A8C0035FD620008052E08A01B943 +:103990000000009000F02291F48304A900088052F6 +:1039A000E2230191E10316AA040080D2030080D231 +:1039B000E05B00B9E00315AA43FBFF97F303002A7D +:1039C000E4FFFF17FD7BBEA9FD030091F30B00F997 +:1039D000F30302AA000040F900C840F97D4A0094B0 +:1039E0001F00007160029F9AF30B40F9FD7BC2A893 +:1039F000C0035FD60080A052C0035FD60000805293 +:103A0000C0035FD600008052C0035FD6FD7BBBA918 +:103A1000FD030091F35301A9F40301AAF30300AAE3 +:103A2000F51300F9F6FFFF97F503002AF6FFFF975D +:103A300002488852E103002A63008452E003152AF9 +:103A4000E201A072684A0094200100B5E00000B0D5 +:103A500000F01D919807009440028012F35341A991 +:103A6000F51340F9FD7BC5A8C0035FD62100805245 +:103A7000E14B00B90100009021102791E01F00F9EF +:103A8000E12300F9DCFFFF97E103002AE00000B02A +:103A9000003C1E915C3E0094E403002AE2E30091A6 +:103AA000E10314AAE00313AA030080D206FBFF97E8 +:103AB000EBFFFF17FD7BBEA9E00303AA0340A0D2E2 +:103AC000FD0300912100038BF30B00F9F30302AA1D +:103AD00029270094E00313AAF30B40F9FD7BC2A849 +:103AE000C0035FD6FD7BBCA90340A0D2FD030091BB +:103AF000F35301A9F40301AA01BA8152620040B94B +:103B0000C1BFBD725F00016BE0010054F30300AA66 +:103B1000C9FAFF97E20300AA1F0400B1A1000054F4 +:103B2000010880D2E0078092D1FAFF97E20300AA51 +:103B3000E10314AAE00313AAF35341A9FD7BC4A82F +:103B4000D1FAFF1721008052E13B00B9010000903B +:103B500021D02A91020080D2E11B00F9E1A300915B +:103B6000DAFCFF97F35341A9FD7BC4A8C0035FD6DD +:103B7000E13584920000018B00EC7C92C0035FD69B +:103B8000FD7BBEA9023680D201008052FD03009168 +:103B9000F30B00F9F30300AA73C20691DA2600942E +:103BA000539200F9F30B40F9FD7BC2A8C0035FD626 +:103BB000FD7BBEA9FD030091F35301A9F30300AA05 +:103BC000F40302AA600240B96000F83600008012D7 +:103BD00007000014600640F9000100B4E10314AAD4 +:103BE0006D260094A0000035600240B9F35341A94E +:103BF000FD7BC2A8C0035FD673620091F2FFFF177E +:103C0000E20300AAE10000B0C00000D021003A9118 +:103C100000A00091E7FFFF17FD7BBCA9FD03009109 +:103C2000F35301A9F403042AF30301AA010080520B +:103C3000F55B02A9F50300AAF76303A9F70302AA3B +:103C4000F80303AAA4220094F603002A010080527C +:103C5000E00315AAAD22009401741E53C6761E53CC +:103C6000050080D2217C4093C27C409326C0268BE5 +:103C70009F02056B2C0100549F02007180A29F1AC5 +:103C8000F35341A9007C061BF55B42A9F76343A9E6 +:103C9000FD7BC4A8C0035FD6A7F07DD3E17A65F8A9 +:103CA000E46A67B88408C05ADF0A0071410500540D +:103CB000210CC0DA61020039233C08536306003945 +:103CC000235C1053630A0039237C1853630E0039B8 +:103CD000239C60D36312003923BC68D36316003978 +:103CE00023DC70D321FC78D3631A0039611E0039BC +:103CF000076B67B86402028B017B65F8E708C05A5E +:103D00001F080071C1020054210CC0DA616A223818 +:103D1000233C085383040039235C10538308003983 +:103D2000237C1853830C0039239C60D38310003903 +:103D300023BC68D38314003923DC70D321FC78D3EF +:103D400083180039811C00397302068BA504009189 +:103D5000C8FFFF17640200B9E6FFFF17676A22B8C1 +:103D6000FAFFFF17FD7BBDA9FD030091F35301A9E5 +:103D7000F40302AAF55B02A9F50300AAF603012ADF +:103D80008C1E00941F040031A1000054E20314AA09 +:103D9000E103162AE00315AA2C220094F303002A5B +:103DA0002001F836AF200094E30300AAC10000F020 +:103DB000E0000090E20314AA21A42C91001C1391AE +:103DC000862B0094E003132AF35341A9F55B42A923 +:103DD000FD7BC3A8C0035FD6FD7BB7A9FD0300919F +:103DE000F35301A9F55B02A9F503032AF76303A9BD +:103DF000F92300F97F1000710D02005413008012A6 +:103E0000E203152A83008052C10000F0E000009018 +:103E100021E42891004C1391702B0094E003132AA5 +:103E2000F35341A9F55B42A9F76343A9F92340F98C +:103E3000FD7BC9A8C0035FD6F40300AAF60301AA5C +:103E4000F70302AAF51C0094F303002A2001F836B8 +:103E500084200094E20300AAC10000F0E00000907A +:103E600021E42891002C13915C2B0094ECFFFF17A8 +:103E7000F800009018DF1691E20318AAE00314AAD4 +:103E800001008052B8FFFF97F303002A80FCFF3740 +:103E9000D90000F039E73491E30318AAE103002ABE +:103EA000E20319AAE00314AAE400805293210094CB +:103EB000F803002AE004F8366A200094F303182A75 +:103EC000E20300AAE10319AAE000009000A4149103 +:103ED000422B0094D2FFFF1700040091E403002A54 +:103EE000BF02006BAD000054C17A60F861FFFFB5FE +:103EF000E17A60F821FFFFB504030034E30317AA59 +:103F0000E20316AAE1430191E00314AAF50000B010 +:103F100042FFFF97B5A60B91E403002AE103132AA1 +:103F2000E3430191E20315AAE00314AA732100946C +:103F3000F303002A2001F8364A200094E20300AA85 +:103F4000E10315AAE000009000A41491C7FFFF1739 +:103F5000000080D2E2FFFF1713008052B0FFFF176E +:103F6000FD7BB9A9FD030091F35301A9F40300AA55 +:103F7000F55B02A9F60306AAF50307AAF76303A9EE +:103F8000F703042AF96B04A9FA0303AAF90305AAA3 +:103F9000FB2B00F9FB0302AAF83B40F99F1C00949D +:103FA0002002F836F303002A2E200094C10000F00E +:103FB000E20300AA21542C91E0000090002C139100 +:103FC000062B0094E003132AF35341A9F55B42A9A1 +:103FD000F76343A9F96B44A9FB2B40F9FD7BC7A804 +:103FE000C0035FD6E00314AAE20000B001008052D3 +:103FF00042AC15915CFFFF97F303002A40FEFF37A8 +:10400000E103002AE2031BAAE00314AA56FFFF976C +:10401000F303002A80FDFF37430FC0DAE103002AD3 +:10402000E2000090E00314AA429826910401805215 +:10403000E33700F9E3A30191302100943F0700B179 +:1040400040010054250FC0DAC20000F0E3A3019143 +:1040500042A81591E103132AE00314AA0401805237 +:10406000E53700F925210094F70AC05AC20000F094 +:10407000E3A3019142102291E103132AE00314AA61 +:1040800084008052F76B00B91C210094560100B4E3 +:10409000E00316AA68250094E200009004040011D1 +:1040A000E30316AA42982191E103132AE00314AA1C +:1040B00012210094550100B4E00315AA5E25009476 +:1040C000E200009004040011E30315AA42D81991FC +:1040D000E103132AE00314AA0821009458F7FFB45F +:1040E000E00318AA54250094E30318AA040400115D +:1040F000E103132AE00314AAE200009042E41991BC +:10410000FE200094B0FFFF17A00600B4FD7BBCA901 +:10411000E2098252FD030091F35301A9F40300AABE +:1041200013008052F55B02A93500020B4F1D00946D +:10413000F603002A7F02166B6B00005402008052C7 +:104140000D000014E3E30091E2C30091E103132AA0 +:10415000E00314AA381D0094E01B40F99F0200EB15 +:10416000E1020054E103132AE00314AA9920009409 +:1041700022008052930E40B9802E0012812240B955 +:10418000730AC05A2108C05A7302010B7302150B3F +:104190007302000B734E14127302004B600AC05A74 +:1041A000800600B902010035E003132AF35341A948 +:1041B000F55B42A9FD7BC4A8C0035FD6730600115E +:1041C000DDFFFF17E203132AE10314AAE00314AA98 +:1041D00064200094A0FEFF36F5FFFF170000805218 +:1041E000C0035FD6FD7BADA9FD030091F35301A988 +:1041F000F30300AAF40305AAE0C30291F55B02A948 +:10420000F60307AAF76303A9F70307AA1800805269 +:10421000F96B04A9190080121A008052FB7305A9DA +:10422000DB0000B0E67300B9E18F07A901008052FE +:10423000E2131129021080D233250094750A40B987 +:1042400060E30791DF020039B50AC05AF96B00B983 +:10425000FF7700B9E04B00F9FFAB00B9FCAB40B908 +:10426000E2A30291E00313AAE1031C2A001C0094BC +:10427000E06F00B9E07740B9FBAB40B91F000071B7 +:10428000E06F40B90418497A011700540004005146 +:104290001F200071480A0054E14B40F92058607813 +:1042A0006100001020A8208B00001FD6FC6B00B915 +:1042B000EBFFFF17E1031C2A020080D2E00313AAE0 +:1042C0009B1D0094010840B9E00313AA2108C05ABD +:1042D000D71C0094E10300AA600200B540018012DF +:1042E000F35341A9F55B42A9F76343A9F96B44A9CC +:1042F000FB7345A9FD7BD3A8C0035FD6E04340F91B +:10430000E14F00F900787BF87B070091AA24009424 +:10431000E203002AE14F40F980000035FB031C2A2C +:10432000500000141B0080D2E08F40B91F001B6BAF +:104330006CFEFF545F070071E2D79F1AF8FFFF176A +:10434000390700113F830071A0FCFF54E1031C2AD0 +:10435000E2B30291E00313AAD41C0094E10300AA83 +:10436000790000350000403900100035E0AF80B919 +:10437000E20216CB420800914200008BE03341B9C3 +:104380005FC020EBEA0E0054C0060091FF0200EB74 +:10439000A0000054E50317AAE0058052A0140038DD +:1043A000F70305AAE00317AA7D240094E0AF80B9C3 +:1043B0005F0700717B139C1A020080D2F702008B0A +:1043C000E0C302911AD839B8E08B40B91F00026BE4 +:1043D000AC000054DA010035FB031C2A02008052B5 +:1043E00020000014E03F40F9E10316AAE24F00F973 +:1043F000007862F870240094E24F40F94204009182 +:1044000040FEFF355A008052020000145A07005146 +:10441000E2031A2A130000143F07003100F6FF548C +:10442000E1C302912007005121D879B8FF0216EBB1 +:1044300089000054E2FE5F385FBC007181FFFF54C9 +:10444000FF020039E2031A2AF903002AFA03012ABB +:104450001F0400316100005420008052E07700B951 +:10446000E06B40B95F0000710018413A61070054E9 +:10447000E07340B91F0300710013407ACC0100546F +:10448000E000809200CC388B8102008B806A60B89B +:10449000210440B90000010B0000154B1F001C6BEC +:1044A000A100005418070051007F7D93846A60B812 +:1044B0009C00154B5F000071840B413A8001005451 +:1044C000E07340B91F03006BEA000054017F7D9345 +:1044D00080CE388B8203150B68031C4B826A21B88F +:1044E000080400B9180700111C008012E06F40B9E1 +:1044F0001F240071C1EDFF54612640B9E0AB40B903 +:104500002108C05A1F00016B01030054E17340B938 +:104510001F03016BAA010054017F7D9382CE388B6B +:104520009503150B00001C4B956A21B8E13B41B97E +:10453000400400B9A1000034612240B92108C05AEA +:104540000000010B400400B90007001165FFFF17D0 +:1045500022008052C3FFFF17FC6B40B9D6FFFF1744 +:10456000400080125FFFFF17600180125DFFFF17A0 +:10457000FD7BBDA9FD030091F35301A9F30303AA39 +:10458000F40302AAE3B300911B1D0094E00100B400 +:10459000E22F40B9050080D2040080D2437C021390 +:1045A000BF0003EB610100545F200071C90100549A +:1045B000FF8344EB80010054C00000F0E10314AA23 +:1045C0000020219185290094000080120800001429 +:1045D000017865B8A50400912108C05A248004AA76 +:1045E000F0FFFF1700008052640200F9F35341A965 +:1045F000FD7BC3A8C0035FD6FD7BBDA9FD03009171 +:10460000E3B30091F30B00F9F30302AAE200009078 +:1046100042D81991F81C0094000100B479FDFF976D +:10462000011C00120000805261020039F30B40F9B6 +:10463000FD7BC3A8C0035FD6E11F8052000080123B +:10464000FAFFFF17E30302AAE200009042982691C6 +:10465000C8FFFF17E30302AAC20000F042A81591A9 +:10466000C4FFFF17FD7BBDA9FD030091F35301A912 +:10467000F40302AAF30303AAC20000F0E3B300911B +:1046800042102B91DC1C0094800200F9E00000B481 +:10469000E12F80B900008052610200F9F35341A973 +:1046A000FD7BC3A8C0035FD6010080D2000080124A +:1046B000FAFFFF17FD7BBEA9030080D2FD03009126 +:1046C000F30B00F9F30302AAC20000F04294219117 +:1046D000C91C0094000100B4000040B90008C05A91 +:1046E000600200B900008052F30B40F9FD7BC2A8C4 +:1046F000C0035FD620008012FCFFFF17FD7BBEA920 +:10470000030080D2FD030091F30B00F9F30302AA2A +:10471000C20000F042C42191B71C0094000100B413 +:10472000000040B90008C05A600200B90000805281 +:10473000F30B40F9FD7BC2A8C0035FD620008012B6 +:10474000FCFFFF17FD7BBEA9030080D2FD03009193 +:10475000F30B00F9F30302AAC20000F042FC21911E +:10476000A51C0094000100B4000040B90008C05A24 +:10477000600200B900008052F30B40F9FD7BC2A833 +:10478000C0035FD620008012FCFFFF17FD7BBDA990 +:10479000FD030091F30B00F9F30302AAE3B30091C8 +:1047A000C20000F042242291931C0094600200F9A0 +:1047B0001F0000F1E0139F5AF30B40F9FD7BC3A8E3 +:1047C000C0035FD6FD7BBDA9FD030091F35301A992 +:1047D000F40302AAF30303AAC20000F0E3B30091BA +:1047E00042642791841C0094800200F9E00000B428 +:1047F000E12F40B900008052610200B9F35341A992 +:10480000FD7BC3A8C0035FD6010080520000801268 +:10481000FAFFFF17FD7BBCA9FD030091F35301A92B +:10482000F40300AAF30304AAE00302AAF55B02A9B9 +:10483000F503012AF60303AAE1E300916808009456 +:104840000002F837E01F40F9E20316AAE103152A37 +:10485000031840B9040840F9E00314AA80003FD6C9 +:10486000E01F40F9000840B9600200B90000805222 +:10487000F35341A9F55B42A9FD7BC4A8C0035FD6F1 +:1048800000008012FBFFFF17FD7BAFA9FD03009125 +:10489000F55B02A9F50303AAC30000D063A82D911C +:1048A000F60304AAE33F00F923008052E40302AABE +:1048B000E5B30191E20315AAF35301A9F40300AA99 +:1048C000F76303A9F703012AF96B04A9FB2B00F98D +:1048D000E36F00B9E30316AA3F020094A00300347B +:1048E000C00000F01300805200B02491E03F00F9B6 +:1048F000F53F40F9E103132A020080D2E00314AA35 +:104900006A1B0094F30300AAE103172A020080D275 +:10491000E00314AA651B0094E20313AAE30300AAB0 +:10492000E10315AAC00000F000042891AB28009410 +:1049300000008052F35341A9F55B42A9F76343A9F4 +:10494000F96B44A9FB2B40F9FD7BD1A8C0035FD6CE +:10495000E103172AE00314AAD80000F0D90000F000 +:10496000BF1A009418531C91F303002A391B259198 +:10497000F300F8367F220031641A4B3AC10D00541F +:10498000C00000F00094279115000014E103132AE1 +:10499000020080D2E00314AA441B0094FA0300AA88 +:1049A000E00318AA24230094E20300AAE10318AA52 +:1049B000E0031AAA0923009440090035E20302919A +:1049C000E103132AE00314AAFF3F00F970FFFF97E9 +:1049D000A0000034C00000F000402591E03F00F945 +:1049E000C4FFFF17FB4340F9C00000F0001C3B91DF +:1049F000E1031BAA79280094C20000F0E34302916E +:104A000042B42591E103132AE00314AAFA1B00948F +:104A1000200200B4E19340B93F100071C10100547D +:104A2000000040B980010034C00000F000E825918A +:104A30006A280094C00000F0007C27919E03009437 +:104A4000E103132AE00314AA921A0094F303002A44 +:104A5000C8FFFF17E3D30191E2230291E103132A78 +:104A6000E00314AA58FFFF9780000034C00000F054 +:104A700000102691DAFFFF17FA3F0391E4C301917A +:104A80005AE77A92E2031BAAE3031AAAE103162A61 +:104A9000E00315AA60FFFF9780000034C00000F01B +:104AA00000882691CEFFFF17E2034E295F00006BBE +:104AB00080000054C00000F000F42691C8FFFF17EA +:104AC000E14740F9427C4093E0031AAA5D23009439 +:104AD00020FBFF34C00000F000402791C0FFFF170B +:104AE000E06F40B9E0FAFF34E00319AAD222009443 +:104AF000E10319AAE20300AAE0031AAAB72200946C +:104B000000FAFF35446A40F9E6E30191E30316AA8F +:104B1000E20315AAE103132AE00314AA0500801298 +:104B20007D01009480F8FF34C00000F000882791D8 +:104B3000C3FFFF17200080527FFFFF17FD7BBCA93A +:104B4000FD030091F35301A9F30000B073222391F8 +:104B5000F55B02A9F50300AA140080D2F71B00F947 +:104B600080EA7BD3176873F8E00317AAB222009497 +:104B7000E10315AAE20300AAE00317AA9722009412 +:104B8000E0010035E00317AAAB220094A06A603868 +:104B90001FB0007141010054967E7B936002168B1A +:104BA000F35341A9F55B42A9F71B40F9FD7BC4A86B +:104BB000C0035FD6340080D2EAFFFF17D4FFFFB4F2 +:104BC000000080D2F7FFFF17FD7BBDA98105805251 +:104BD000FD030091F35301A9F51300F98C22009411 +:104BE000E00000B5130080D2E00313AAF35341A9FB +:104BF000F51340F9FD7BC3A8C0035FD614040091F0 +:104C0000F30000D0F50000D073E23991B5C23B91BA +:104C10007F0215EB82FEFF54600240F9E10314AA03 +:104C20006522009420FEFF3473A20091F9FFFF1764 +:104C3000FD7BBDA9FD030091F35301A9F51300F914 +:104C4000E00000B5130080D2E00313AAF35341A99A +:104C5000F51340F9FD7BC3A8C0035FD6F50300AA96 +:104C6000F30000F0F40000F0732227919462279182 +:104C70007F0214EB82FEFF54600240F9E10315AAA3 +:104C80004D22009420FEFF3473420091F9FFFF177C +:104C9000FD7BBAA9FD030091F35301A9F30300AA18 +:104CA000F55B02A9F76303A9F70305AAF96B04A949 +:104CB000FA0301AA200440B90100A2520008C05A18 +:104CC0001F00016B89010054C00000F034008052C5 +:104CD000005C2291A00000F9E003142AF35341A9DB +:104CE000F55B42A9F76343A9F96B44A9FD7BC6A80C +:104CF000C0035FD6F603022AF90303AAF803042AC5 +:104D0000E2630191E103162AE0031AAAA0FEFF97CD +:104D1000F403002AC0000034C00000F000402591D8 +:104D200014008012E00200F9ECFFFF17E103162ADD +:104D3000E0031AAA030080D2C20000F042B0229120 +:104D40002D1B0094F50300AA600000B5D50000F00B +:104D5000B53A2291020F80D201008052E00313AADB +:104D600069220094E103162A030080D2E0031AAA04 +:104D7000C20000F042D022911F1B0094600600F98F +:104D8000E02F40F97A0E00F9762200B9601600F99A +:104D90006BFFFF97601A00F9E02F40F98BFFFF9738 +:104DA000602200F9E00315AAA2FFFF97601E00F938 +:104DB000620640F9792600F9E12F40F9785200B9EE +:104DC000C00000F00008239184270094601A40F985 +:104DD000A00000B4602240F9600000B4601E40F9F9 +:104DE000C0F7FFB5C00000F000202391CDFFFF17F2 +:104DF000E50300AAE00303AA830000B40400805284 +:104E00005F00046B4C000054C0035FD6260080B9DD +:104E1000840400112120009163400091A600068BBC +:104E200066001FF826C05FB866801FB8F5FFFF1741 +:104E3000FD7BA4A9FD030091F35301A9F30305AA87 +:104E4000F40300AAF55B02A9F503012AF60303AAFD +:104E5000E103022A020080D2F76303A9F703042AC0 +:104E6000F96B04A9FB7305A9FF4300D10F1A009445 +:104E70007F0200F9E50313AAE403172AE30316AA45 +:104E8000E203152AE10314AAA03700F9A003029156 +:104E900080FFFF9760010035A3C30191A2E3019158 +:104EA000E103152AE00314AA47FEFF97FC03002A3A +:104EB000A0010034C00000F000102691600200F94B +:104EC00000008012BF030091F35341A9F55B42A992 +:104ED000F76343A9F96B44A9FB7345A9FD7BDCA8E3 +:104EE000C0035FD6A3D30191E103152AE00314AAFE +:104EF000C20000F042D81891BF1A0094F90300AA2A +:104F0000C00000B4A17740B918C0218B1F0018EB76 +:104F1000A30000541C010035C00000F0000C1991E2 +:104F2000E7FFFF17021440385F0000719C179C1ABE +:104F3000F7FFFF173F000071CD00005400F35F380A +:104F400080000034C00000F0008C1991DCFFFF17D6 +:104F50009F9301718D000054C00000F000441A912D +:104F6000D7FFFF17807F7D93D60000F0003C0091B3 +:104F7000D6E21A9100EC7C9217008052FF6320CB9E +:104F8000FB430091FA031BAA3F0318EBA300005454 +:104F900057030035C00000F000201B91C8FFFF1729 +:104FA000590300F9E00316AAA3210094E20300AA22 +:104FB000E10319AAE00316AA882100942001003514 +:104FC000203F40391FBC0071C1000054A13740F997 +:104FD00020430091782100941F000071F7169F1A5A +:104FE000E00319AA94210094000400915A2300912F +:104FF0003903008BE5FFFF17F7008052A7E3039109 +:10500000E2031C2AE1031BAA977F171B840080522E +:10501000A30000F063603491E0520011F74E0011DC +:10502000E603172A007C7D93003C009100EC7C9203 +:10503000FF6320CB00198052F8430091E50318AAC2 +:10504000E00300B9E00314AAFF0B00B966FCFF9768 +:10505000F603002A1F0000718A000054C00000D02F +:1050600000B01B9196FFFF1781000054C00000D0D4 +:1050700000241C9192FFFF17FF02006B8C0000546C +:10508000C00000D000641C918DFFFF17C20000D04B +:10509000E103152A42BC1C91E00314AA030080D24C +:1050A000551A0094400100B4C37E7D93810E40B92F +:1050B00002CF368BD60600112108C05A016B23B8E7 +:1050C000000440B90008C05A400400B9FFD336CBF1 +:1050D000E10318AAE7430091E203162AE30307AAB3 +:1050E000E00314AA43FFFF97A06340F9E10307AA76 +:1050F000A47340B9A33F40F9051040F9A003029101 +:10510000A0003FD600EEFF34C00000D000F81C9194 +:105110006BFFFF17FD7BB2A9FD030091DF0000F9D3 +:10512000F35301A9F40300AAF30306AAF55B02A94D +:10513000F503012AF60303AAE30304AAE403052AFC +:10514000E50306AAF71B00F9F70302AAE203012A06 +:10515000E10300AAE0A30191CEFEFF9740010035D4 +:10516000E3330191E2430191E103152AE00314AA1C +:1051700095FDFF9740010034C00000D0001026913B +:10518000600200F900008012F35341A9F55B42A9C7 +:10519000F71B40F9FD7BCEA8C0035FD6E05740F96E +:1051A000F72F00F9E44F40B9E1630191E32B40F997 +:1051B000F66300B9051040F922008052E0A3019186 +:1051C000A0003FD620FEFF34C00000D000F81C91A4 +:1051D000ECFFFF17FD7BB7A9FD030091F35301A975 +:1051E000F40300AA20008052F55B02A9D60000D08B +:1051F000D61A2591F76303A9F50304AAF803012A37 +:10520000F96B04A9F70305AA01008052FB7305A9F5 +:10521000A00000B9E00304AAE20F07A9E20316AA5E +:10522000641900946000F836000080523D000014BC +:10523000E103002ADA0000D0E00315AADB0000D069 +:10524000871800945AE72391F303002A7B8B279158 +:10525000190080529300F83699FEFF34FF0200B91E +:10526000F2FFFF17E2031AAAE103132AE00315AACB +:10527000030080D2E0190094400A00B4C10000F09D +:1052800021A82D91CC200094C0090035C00000B0A9 +:1052900000A82D91E103182AE04700F9E00314AAC1 +:1052A0006F180094FC03002AA004F8361F20003178 +:1052B00004184B3A41020054D60000D0D6962791EC +:1052C000E1031C2A020080D2E00314AAF71800941C +:1052D000E103182AF70300AA020080D2E00314AA0F +:1052E000F2180094E30300AAE20317AAC00000D05A +:1052F000E10316AA0004289138260094020080D207 +:10530000E103132AE00315AAE8180094E10300AAB8 +:10531000C00000D0000824913026009400008012C4 +:10532000F35341A9F55B42A9F76343A9F96B44A97B +:10533000FB7345A9FD7BC9A8C0035FD6020080D2DC +:10534000E1031C2AE00314AAD81800940108805233 +:10535000E03700F9AE200094E00300B5E00316AAA0 +:10536000B5200094E20300AAE10316AAE03740F951 +:105370009A20009460010035E20F47A9E6230291CC +:10538000E40315AAE1031C2AE00314AA0500801215 +:1053900061FFFF97E0000034E0031BAA4601009480 +:1053A000E1031C2AE00314AA3A180094BEFFFF1779 +:1053B00039070011C00000D0007C27913E01009405 +:1053C000E103132AE00315AA32180094F303002A1C +:1053D000A1FFFF17D60000D0D6922391B9FFFF1787 +:1053E000FD7BB7A9020080D2FD030091F35301A910 +:1053F000F40300AAF55B02A9F603012AF76303A9E7 +:10540000F96B04A9FB7305A9556A40F9A718009424 +:1054100001088052F30300AA7D200094E00000B44C +:10542000C00000D0E10313AA00481D91EB250094B1 +:10543000000080120A000014D70000D0F71A25914E +:10544000E20317AAE00315AA01008052D9180094BC +:10545000F303002A2001F83600008052F35341A9DB +:10546000F55B42A9F76343A9F96B44A9FB7345A90E +:10547000FD7BC9A8C0035FD6E103002AC20000D0AB +:10548000E00315AA42E01D91030080D25A1900944E +:10549000200300B4C10000F0213422914620009482 +:1054A0001F000071FA079F1AE103132AE00315AAEF +:1054B000DC0000D0EA1700949C8B2791F303002AAC +:1054C000DB0000D01900805260E723911800805261 +:1054D000E03700F95301F8363F030071001B407AB2 +:1054E000C1FBFF54C00000D0006C1F91BB2500948D +:1054F000D0FFFF173A008052ECFFFF17E23740F968 +:10550000E103132AE00315AA030080D23A1900949C +:10551000200A00B4C10000D021181E91262000945A +:10552000A0090035C00000D0002C1E9139070011E1 +:10553000E103162AE04700F9E00314AAC817009413 +:10554000FB03002A6004F8361F20003104184B3A90 +:1055500081000054C00000D000942791E04700F97A +:10556000E54740F9E1031B2A020080D2E00314AAB8 +:10557000E53F00F94D180094E40300AAE103162A60 +:10558000020080D2E00314AAE43B00F9471800941B +:10559000E30300AAE41747A9C00000D000A01E91B1 +:1055A000E20304AAE10305AA8C2500945A050034FD +:1055B000E103132AE00315AA020080D23B180094ED +:1055C000E10300AAC00000D00008249198FFFF1753 +:1055D000E1031B2A020080D2E00314AA33180094CE +:1055E000E30300AAE00317AAE33B00F912200094AA +:1055F000E20300AAE33B40F9E10317AAE00303AA90 +:10560000F61F009460010035E5230291E403132A9C +:10561000E30315AAE203162AE1031B2AE00314AAF6 +:1056200004FEFF97E0000034E0031CAAA2000094EF +:10563000E1031B2AE00314AA96170094C1FFFF1789 +:10564000C00000D018070011007C27919A00009438 +:105650005AF0FF34E103132AE00315AA8D170094D2 +:10566000F303002A9CFFFF17FD7BBBA9C10000D0FC +:1056700021E01A91FD030091F35301A9F40300AA5C +:10568000F55B02A9F76303A9611900946004F83778 +:10569000E3330191C20000D042402091F303002A7D +:1056A000E103002AE00314AAD3180094D80000D024 +:1056B000E103132AF60300AA18632091E00314AA59 +:1056C00067170094F303002A35008012F300F836C0 +:1056D000E003152AF35341A9F55B42A9F76343A9F7 +:1056E000FD7BC5A8C0035FD6E3330191E20318AA8E +:1056F000E103132AE00314AABF180094F70300AAD9 +:10570000000100B5C10000B0C00000D021002A9106 +:105710000090209131250094B5028012EDFFFF1713 +:10572000560100B4020080D2E103132AE00314AA58 +:10573000DE170094E10300AAE00316AA9E1F00945E +:105740001F000071B512931AE00317AAC8EAFF9769 +:10575000C0000034E103132AE00314AA4D1700949B +:10576000F303002ADAFFFF17F503132AD9FFFF1707 +:10577000010040F93F1440F2A1000054010041A98A +:105780003F0000EBE0179F1AC0035FD60000805275 +:10579000FEFFFF17FD7BBEA9FD030091F35301A996 +:1057A000F30300AAF40304AA010400A9810400D1B0 +:1057B0002100028B020800F9032000B92108C49AD5 +:1057C000217C049B010C00F9A0003FD6600100354C +:1057D000610E40F9E00314AAF5020094600600F996 +:1057E000000200B4612240B981000036610240F934 +:1057F000620A40F9E01F0094610E40F9600640F92A +:1058000021FC009121E47A922100008BBBF1FF97EB +:1058100000008052F35341A9FD7BC2A8C0035FD6AC +:1058200060018012FCFFFF1705000090040880D281 +:10583000A5C01D91D8FFFF17FD7BBEA9FD030091F8 +:10584000F30B00F9F30300AA002040B9E00008368A +:10585000610E40F9600640F921FC009121E47A9242 +:105860002100008BA4F1FF97600640A93F0000EBE8 +:10587000E0000054622240B962000836620A40F932 +:10588000BD1F0094600640F97F0000940000805224 +:10589000F30B40F9FD7BC2A8C0035FD6C207A0F09E +:1058A00042A0079140D860F8022040F9F00302AA14 +:1058B00000021FD6E10300AA120100B4431E40F902 +:1058C000C30000B4420640F962000836200080524E +:1058D000F3FFFF178C450014C0035FD6011C0012B4 +:1058E000920100B4401E40F9400100B4400640F966 +:1058F000C0000836C007A0F000F840F9021C40F9CB +:10590000F00302AA00021FD6E003012A7845001422 +:10591000C0035FD6FD7BBDA9FD030091F51300F91F +:10592000D507A0F0F35301A9B3E640F91400138B97 +:10593000A000F8B6E20300CB01008052E00314AAF5 +:10594000711F0094C007A0F000EC40F91F0014EB99 +:1059500068010054C007A0F000E840F91F0014EBF4 +:10596000E3000054E00313AAB4E600F9F35341A99D +:10597000F51340F9FD7BC3A8C0035FD600008092F9 +:10598000FBFFFF17E20301AAC107A0F00400028B8E +:1059900020EC00F9C107A0F024E800F9C107A0F04D +:1059A00020E400F901008052571F0014FD7BBDA9BF +:1059B000FD030091F51300F9F5000090B522249144 +:1059C000F35301A9A10A40F9340440F994F67E92F8 +:1059D000930200CB737E3F9173CE7492730640D1D5 +:1059E0007FFE3FF1CC00005400008052F35341A9E8 +:1059F000F51340F9FD7BC3A8C0035FD6000080D239 +:105A0000C5FFFF97A10A40F92100148B1F0001EB8D +:105A1000C1FEFF54E00313CBBFFFFF971F0400B18B +:105A2000E1010054000080D2BBFFFF97A20A40F9B9 +:105A3000010002CB3F7C00F18DFDFF54E30000B07C +:105A4000210040B2410400F9638C40F9000003CB0F +:105A5000C307A0F0608C01B9E4FFFF17A00A40F96A +:105A6000C107A0F0940213CB940240B2140400F9D1 +:105A7000208C41B90000134B208C01B920008052CA +:105A8000DBFFFF17410640F9A1094836800900B441 +:105A900006805FF8034000D1E40000908420249148 +:105AA000C1F87F92C60040926500018B870840F9DB +:105AB000A20440F942F47E92BF0007EB6102005459 +:105AC0002200028BE60000B500005FF8630000CB07 +:105AD0004200008B610041A9200C00F9010800F987 +:105AE000400040B2600400F9E00000B0830800F913 +:105AF000009040F95F0000EB23060054C007A0F0BF +:105B000000F040F9AAFFFF17A20400F9660100B5F2 +:105B100000005FF886400091630000CB2100008BFD +:105B2000600840F91F0006EBC0040054660C40F901 +:105B3000060C00F9C00800F900008052A600028B94 +:105B4000C60440F9460100372100028BA20840F943 +:105B5000C0030035864000915F0006EB61030054EE +:105B6000830C02A920008052620801A9220040B2E1 +:105B7000620400F9616821F8200200353FFC07F15A +:105B8000C802005421FC43D322008052207C02131F +:105B9000210400114220C01A21781F53800440F9CB +:105BA00081CC218B000002AA800400F920045FF858 +:105BB000600401A9230800F9030C00F9C0035FD6B3 +:105BC00020008052DEFFFF17A50C40F9450C00F9BC +:105BD000A20800F9E6FFFF1722FC49D33FFC27F19A +:105BE0006802005420FC46D300E0001102040011BA +:105BF00042781F5382CC228B45045FF85F0005EB8F +:105C000041040054007C0213210080522120C01A5C +:105C1000800440F9000001AA800400F9650801A988 +:105C2000430800F9A30C00F9E5FFFF175F5000F1EE +:105C300068000054406C0111EDFFFF175F5001F147 +:105C40008800005420FC4CD300B80111E8FFFF1776 +:105C50005F5005F18800005420FC4FD300DC011197 +:105C6000E3FFFF1720FC52D35F5415F100F0011140 +:105C7000C20F80520030821ADDFFFF17A50840F9DD +:105C80005F0005EBA0000054A00440F900F47E92F0 +:105C90003F0000EB43FFFF54A20C40F9E0FFFF1769 +:105CA000420640F94200483748020014E10300AAC6 +:105CB000C207A0F0C007A0F042E840F900EC40F9AC +:105CC000000002AA600100B5000080D2C0035FD6C8 +:105CD000000080D2F35341A9F55B42A9F76343A9C1 +:105CE000F96B44A9FB2B40F9FD7BC6A8C0035FD626 +:105CF000C1FEFFB7FD7BBAA9215C00913FB800F15E +:105D0000FD030091F35301A9F40000909422249123 +:105D1000F55B02A9F76303A9F96B04A9FB2B00F952 +:105D20004D03005435EC7C92BFDE07F1280300548C +:105D3000A1FE43D32204001142781F5382CE228B4E +:105D4000434000D1400440F91F0003EBA100005480 +:105D5000400C40F9210800115F0000EB20040054C2 +:105D6000018C40A9020C40F921F47E92620C00F9EA +:105D70000100018B430800F9220440F9420040B2BF +:105D8000220400F928000014150480D2E9FFFF174F +:105D9000A0FE49D3400700B41F1000F1880400544E +:105DA000A1FE46D321E000112204001142781F53C6 +:105DB00082CE228B424000D1400C40F95F0000EBC4 +:105DC000E0000054030440F963F47E92650015CBB3 +:105DD000BF7C00F18D050054210400512104001105 +:105DE000801240F9834200911F0003EBC008005469 +:105DF000020440F942F47E92450015CBBF7C00F1CD +:105E00004D0500540400158BA10240B2010400F9B5 +:105E1000A10040B2841202A9818C00A9830C00F970 +:105E2000056822F800400091ABFFFF171F5000F1FA +:105E300068000054016C0111DCFFFF171F5001F1D5 +:105E400088000054A1FE4CD321B80111D7FFFF17E1 +:105E50001F5005F188000054A1FE4FD321DC011131 +:105E6000D2FFFF17A1FE52D31F5415F121F00111EB +:105E7000C00F80522130801ACCFFFF17E1078052FB +:105E8000CAFFFF17040C40F9C500F8B7010840F934 +:105E9000240C00F9810800F90100038BB7FFFF17FC +:105EA000E00304AAC6FFFF17830E02A9C500F8B7D6 +:105EB0000200028B410440F9210040B2410400F984 +:105EC000D9FFFF17860640F95FFC07F1280C005444 +:105ED00042FC43D323008052447C0213420400114D +:105EE00042781F536320C41AC60003AA860600F92D +:105EF00082CE228B43045FF8030801A9400800F911 +:105F0000600C00F9207C0213220080524220C01A4B +:105F1000800640F95F0000EB080400545F0000EACF +:105F2000C100005421741E1242F87FD321100011C9 +:105F30001F0002EAA0FFFF54E80180922304001131 +:105F4000E503012A63781F5303CD238B8302038B60 +:105F5000E60303AAC00C40F9DF0000EBC10D0054BA +:105F6000A5040011C6400091BF0440F241FFFF5458 +:105F70003F0440F2E1100054800640F90000228AFC +:105F8000800600F9800640F942F87FD35F0000EBFD +:105F900048000054221100B5980A40F9170740F94B +:105FA000F7F67E92E20215CB5F7C00F10C160054EE +:105FB000C007A0F0FB0000B01A03178B13F040F9E4 +:105FC000608F40F9B302138B1F0400B1A10F00547E +:105FD00073820091E00313AA4FFEFF97F60300AA15 +:105FE0001F0400B1801300545F0300EB69000054EC +:105FF0001F0314EB01130054D907A0F0208F41B9FF +:106000000000130B208F01B95F0316EB210E005423 +:10601000800A40F9F302138B730240B2130400F9B3 +:10602000C107A0D0208F81B922DC40F91F0002EB0C +:106030004900005420DC00F9C107A0D022E040F95B +:106040001F0002EB8910005420E000F982000014C8 +:1060500044FC49D35FFC27F14802005443FC46D37B +:1060600063E000116404001184781F5384CE248BF4 +:1060700085045FF89F0005EB21040054637C021344 +:10608000220080524220C31AC60002AA860600F9E6 +:10609000051001A9800800F9A00C00F99AFFFF176C +:1060A0009F5000F168000054836C0111EEFFFF1750 +:1060B0009F5001F18800005443FC4CD363B8011198 +:1060C000E9FFFF179F5005F18800005443FC4FD3B0 +:1060D00063DC0111E4FFFF1743FC52D39F5415F119 +:1060E00063F00111C40F80526330841ADEFFFF1782 +:1060F000A50840F99F0005EBA0000054A30440F957 +:1061000063F47E925F0003EB43FFFF54A40C40F95D +:10611000E0FFFF17040440F984F47E92870015CB5A +:10612000FF7C00F1ED010054A10240B2010400F92E +:10613000030840F90200158B010C40F9610C00F9CD +:10614000230800F9E10040B2820A02A994420091BA +:1061500041D000A9540C00F9076824F832FFFF175A +:106160004701F8B70400048B810440F9210040B2D4 +:10617000810400F9010C40F9020C41F8410C00F9CE +:10618000220800F9D4FEFF17000C40F973FFFF1737 +:1061900060045FF8210400517F0000EBA0EEFF5483 +:1061A00079FFFF172110001142F87FD31F0002EA88 +:1061B000A0FFFF5462FFFF17E103052AFCFFFF1752 +:1061C000E00382D27302008B73CE749282FFFF17BA +:1061D000618F40F93F0400B161050054768F00F9EA +:1061E000C00E40F280000054010280D2200000CB9B +:1061F000D602008BD302138B000013CB73FE3F91AA +:1062000073CE74927302008BE00313AAC2FDFF9752 +:106210001F0400B100020054218F41B9000016CBC9 +:106220000000138B960A00F92100130B000040B206 +:10623000218F01B9C00600F91F0314EB20EFFF54B2 +:10624000FF7E00F188020054800A40F9210080D2CC +:10625000010400F9800A40F9020440F942F47E92F8 +:10626000420015CB5F7C00F14DD3FF54800A40F90A +:10627000A10240B2010400F90100158B810A00F966 +:10628000BFFEFF17DA021ACB00001A0B208F01B9EC +:10629000D4FFFF17000740F9F76200D1F7EE7C92B8 +:1062A000210180D200004092000017AA000700F9E7 +:1062B0000003178B018C00F8010400F9FF7E00F148 +:1062C00009EBFF5400430091EFFDFF9755FFFF17C7 +:1062D000FD7BBCA9FD030091F55B02A9157C019B28 +:1062E000F60300AAC00000F0F71B00F9F35301A960 +:1062F000178C44F9E00315AAF40640F969FEFF97EC +:106300003605F8B7F30300AA200300B4410640F9AC +:10631000A1004837E20315AA01008052FA1C00943C +:106320001300001401805FF8034000D182F67E92D2 +:106330007F0017EB21F47E92420041FA4230819AAD +:10634000422000D15F2001F188FEFF545F9C00F1E4 +:10635000A90000541F7C00A95FDC00F14801005433 +:10636000004000911F7C00A91F0800F9E00313AA58 +:10637000F35341A9F55B42A9F71B40F9FD7BC4A883 +:10638000C0035FD61F7C01A95F2001F160000054AB +:1063900000800091F4FFFF1700C000917F7E02A9EA +:1063A000F1FFFF17130080D2F1FFFF17FD7BBCA99F +:1063B000FD030091F35301A9F55B02A9F71B00F956 +:1063C0000101F8B6130080D2E00313AAF35341A9E8 +:1063D000F55B42A9F71B40F9FD7BC4A8C0035FD65B +:1063E000420640F9C2004837F35341A9F55B42A980 +:1063F000F71B40F9FD7BC4A876000014F40300AA43 +:10640000F70301AA1F4000F1E8000054F35341A92B +:10641000E00301AAF55B42A9F71B40F9FD7BC4A884 +:1064200020FEFF17215C0091000480D29F0200EB48 +:1064300036EC7C929422809A3FB800F1D6C2809AC2 +:106440008002008B0000168B16FEFF97E10300AA66 +:10645000800200B5E00317AA12FEFF971508D49A30 +:10646000F30300AAB582149B15FBFFB486FDFF97CA +:10647000950215CBE002158B0AFEFF97E10300AAF7 +:1064800020FAFFB40208D49A4280149B820202CB05 +:10649000BF0202EB620000547BFDFF97CAFFFF17AB +:1064A0002008D49A334000D10084149B800300B4A8 +:1064B000E003144B950600D13500158B007C40930A +:1064C000B502008AB54200D1A00213CB1F7C00F1B7 +:1064D00048000054B502148B600640F9A30213CBA8 +:1064E00000F47E92000003CB020040B2A002008BB9 +:1064F000A20600F9020440F9420040B2020400F989 +:10650000600640F900004092000003AA600600F90E +:10651000F30315AAE00301AA5BFDFF97610640F9AA +:1065200021F47E92210016CB3F7C00F14D010054F6 +:106530006002168B210040B20040009101801FF8DC +:10654000610640F921004092210016AA610600F977 +:106550004DFDFF97734200919CFFFF17429240F957 +:10656000237C4093459A40F94100058B620400D199 +:106570002100028BE30303CB429240F92100038AFE +:10658000000002CB0200018B409640F91F0002EB95 +:1065900022010054FD7BBFA9C00000900060329131 +:1065A000FD0300918D210094000080D2FD7BC1A8E5 +:1065B000C0035FD6421C0091E00301AA42F07D9225 +:1065C000429A00F9C0035FD621008052E4FFFF1712 +:1065D000E20300AAE00301AAE103022AE0FFFF1799 +:1065E000FD7BBCA9FD030091F35301A9F40301AAAB +:1065F000010B80D2F55B02A9F50302AAF60303AAF8 +:10660000F71B00F9F70300AA200080D231FFFF97A3 +:10661000F30300AA000200B4775A00A9E00315AA08 +:10662000261C0094605201A9AD1C0094601200F970 +:1066300061020191E00312AA42CE40F9622200F900 +:10664000420000B4410400F901CC00F90060069159 +:10665000200400F9E00313AAF35341A9F55B42A912 +:10666000F71B40F9FD7BC4A8C0035FD6410640F983 +:1066700021078837FD7BBCA9FD030091F35301A9D5 +:10668000F55B02A9F76303A9410640F953CE40F92F +:1066900021006FB2410600F9F30400B4D50000B048 +:1066A000730201D1B55A0991177182D23800805214 +:1066B000330400B4762240F9891C0094F40300AA44 +:1066C000601E40F99F0200EB04030054600E40F985 +:1066D000610240F90000148B601E00F9600640F969 +:1066E00020003FD6601A40F900040091601A00F9BA +:1066F0007B1C0094020014CB601640F90000028B52 +:10670000601600F95F0017EB09010054604241393F +:10671000C0000035610A40F9E00315AA03718252F6 +:106720002E21009478420139760000B4D30201D1C1 +:10673000E0FFFF17400640F900F86E92400600F9AE +:10674000F35341A9F55B42A9F76343A9FD7BC4A8B4 +:10675000C0035FD6C0035FD6520000B4C4FFFF176A +:10676000C0035FD6000840B91F00036B4C01005402 +:10677000FD7BBFA9FD030091200040B9400000B996 +:10678000E00301AAC0FCFF9700008052FD7BC1A876 +:10679000C0035FD600008012C0035FD6000840B976 +:1067A0001F00036B4C010054FD7BBFA9FD0300914A +:1067B0002000407940000079E00301AAB2FCFF9775 +:1067C00000008052FD7BC1A8C0035FD6000080128C +:1067D000C0035FD6FD7BBEA9FD030091F30B00F95A +:1067E000F30301AAE10302AAE203032A600240B90B +:1067F000FF1A0094600200B900008052F30B40F9C8 +:10680000FD7BC2A8C0035FD6FD7BBEA9800080D2FD +:10681000FD030091F30B00F9F30301AA21FDFF979B +:106820001F0000B9600200F900008052F30B40F92C +:10683000FD7BC2A8C0035FD6FD7BBEA9400080D20D +:10684000FD030091F30B00F9F30301AA15FDFF9777 +:106850001F000079600200F900008052F30B40F93C +:10686000FD7BC2A8C0035FD6FD7BBEA9FD030091DE +:10687000F30B00F9F30301AAE10302AAE203032ADE +:1068800060024079B41A00946002007900008052DE +:10689000F30B40F9FD7BC2A8C0035FD6000840B9E6 +:1068A0001F00036BCC010054FD7BBEA9FD030091CA +:1068B000F30B00F9F30301AAE10302AAE00313AA10 +:1068C000D2110094E00313AA6FFCFF9700008052DE +:1068D000F30B40F9FD7BC2A8C0035FD60000801215 +:1068E000C0035FD6FD7BBFA9E00301AAE10302AAB2 +:1068F000FD030091E203032AC111009400008052BD +:10690000FD7BC1A8C0035FD6FD7BBEA9000D80D270 +:10691000FD030091F35301A9F30301AAE1FCFF97E2 +:10692000F40300AA6C090094740200F9000080527C +:10693000F35341A9FD7BC2A8C0035FD6000840B94C +:106940001F00036BCC010054FD7BBEA9FD03009129 +:10695000F30B00F9F30301AAE10302AAE00313AA6F +:10696000F3080094E00313AA47FCFF97000080524D +:10697000F30B40F9FD7BC2A8C0035FD60000801274 +:10698000C0035FD6FD7BBFA9E00301AAE10302AA11 +:10699000FD030091E203032AE20800940000805204 +:1069A000FD7BC1A8C0035FD6FD7BBEA9000D80D2D0 +:1069B000FD030091F35301A9F30301AAB9FCFF976A +:1069C000F40300AAFB020094740200F90000805254 +:1069D000F35341A9FD7BC2A8C0035FD6FD7BBCA9D0 +:1069E000FD030091F35301A9F300009073A20491F9 +:1069F000F55B02A9F50300AAF60301AA140080D2F0 +:106A0000F76303A9180780D2807E189B016873F88A +:106A1000E00315AAE81A009420010035977E389B00 +:106A20007302178BD30200F9F35341A9F55B42A916 +:106A3000F76343A9FD7BC4A8C0035FD69406009109 +:106A40009F1200F121FEFF54800B8012F7FFFF1709 +:106A5000FD7BBCA9FD030091F35301A9F300009055 +:106A600073A20491F55B02A9F50300AAF60301AA3B +:106A7000F71B00F9F70313AA14008052610240F9D2 +:106A8000E00315AACC1A009460010035611240F9A8 +:106A9000210100B401078052945E219BD40200F9C9 +:106AA000F35341A9F55B42A9F71B40F9FD7BC4A84C +:106AB000C0035FD69406001173E200919F1200712B +:106AC000E1FDFF54800B8012F6FFFF17FD7BBEA98E +:106AD000FD030091F35301A913E47A92740201912A +:106AE000E10314AAE00313AA04EDFF97E10314AA3B +:106AF000E00313AAF35341A9FD7BC2A8FEECFF17E4 +:106B0000FF4309D1FD7B00A9FD030091F55B02A9BC +:106B1000F60301AAF35301A9F30300AAD4FE44D358 +:106B2000F76303A9180080D2F96B04A943EDFF971E +:106B3000D9FE43D3F703002AFA630191F503182A1B +:106B4000F40200B5780240F97F0200F977000034C2 +:106B5000E00313AADEFFFF97600240F9600600B46D +:106B6000A07E4093E2630191210080D2780200F977 +:106B7000000400D13F0301EB88020054E00314AA93 +:106B8000FD7B40A9F35341A9F55B42A9F76343A9F3 +:106B9000F96B44A9FF430991C0035FD681F27DD30D +:106BA000600E148B626A61F8427B38F8E20334AA03 +:106BB000626A21F857000034C5FFFF9794FE4193A5 +:106BC00018070091DEFFFF1723F07DD321F87FD354 +:106BD000447860F8646A23F8E6FFFF1754F07DD329 +:106BE000E103002A837860F8000400D1656A74F834 +:106BF000636A34F8E30322AA42F87FD37F0005EBEF +:106C0000C0010054207C4093000400D13F0302EBFC +:106C100069FBFF5441F07DD342F87FD3837860F85D +:106C2000636A21F8F9FFFF17A0060051E4630191A0 +:106C3000220080D2007C40933F0302EB08FDFF540A +:106C4000F40316AA780200F9CDFFFF17FD7BBAA95D +:106C5000FD030091F35301A9F40301AAF55B02A916 +:106C6000F76303A9F70301AA210C0091F96B04A9AA +:106C7000FA0303AAFB7305A9191840F9FB2640384B +:106C800020E05F383C5B41290000005233F05F3860 +:106C900058001C4B1603164B1300332AC212005126 +:106CA000D60E0051E00317AA731E0012427C4093D7 +:106CB000E41A0094E1CA7638F503002A220F80B95D +:106CC000E0C2368B7B03012A00040091210B40F9BE +:106CD00073021B2A731E0012DA1A0094B502002AEE +:106CE000B502132AF5010035E1031AAA827F409309 +:106CF00080C2388BD31A00941F000071810180126A +:106D00000000811AF35341A9F55B42A9F76343A937 +:106D1000F96B44A9FB7345A9FD7BC6A8C0035FD6E8 +:106D2000A0028012F8FFFF17FD7BB6A9FD030091BA +:106D3000F35301A9F55B02A9F76303A9F96B04A951 +:106D4000FB2B00F9172440F9040FF837F40300AACD +:106D5000F60301AAFB0302AAE103042AF503032AAE +:106D6000F303042AE00317AA030080D2C20000B094 +:106D70004224229120130094E10300AA801640F9D6 +:106D80000D1A009440010034A0018012BF0300914D +:106D9000F35341A9F55B42A9F76343A9F96B44A9F1 +:106DA000FB2B40F9FD7BCAA8C0035FD6E103132A81 +:106DB00003008052E00317AAC20000B042283B91B2 +:106DC0005C160094E103132A03008052C20000B055 +:106DD000425C3B91A09700B9E00317AA55160094B6 +:106DE000A09300B9A3B30191E103132AE00317AA0A +:106DF000C20000B042983B91FF120094A04700F9F6 +:106E0000800000B4A06F40B91F1C007148000054FE +:106E1000BF4700F9E103132A030080D2E00317AA59 +:106E200018018052C20000B042CC3B91B89B00B91F +:106E3000F1120094E103132A030080D2C20000B0D3 +:106E400042FC3B91A04300F9E00317AAEA12009428 +:106E5000A03F00F9A19740B981F9FF34A24340F95E +:106E600042F9FFB420F9FFB4802240F9F703009102 +:106E7000824E43A9190840B95B0500B4DF0200F156 +:106E8000441840FAE0040054D30400B4210CD81A8A +:106E90003F00156B21020054BF020871E801005445 +:106EA000E003152A5A0840B9003C0091A2C30191A1 +:106EB00000707C9201008052FF6320CB4009805219 +:106EC000F80300917D2F0094C0000034C00000B092 +:106ED00000343C91411F0094A00280120F00001466 +:106EE000A03B40F9E4030091A3E30191E203152ADA +:106EF000E1031BAAE64C009400010035650640F949 +:106F0000E4031A2AE30316AAE203192AE10318AAE2 +:106F1000E00314AAA0003FD6FF0200919CFFFF17D8 +:106F200080008012FDFFFF170001801298FFFF17FD +:106F3000FD7BB4A9FD030091F35301A9F55B02A900 +:106F4000F50300AAF60301AAF76303A90100805222 +:106F5000F70302AAF96B04A9C20000B0F803032AE0 +:106F6000192440F942182591E00319AA111200943E +:106F7000E007F837A45240B99F0400316001005483 +:106F8000E303182AE20317AAE10316AAE00315AAED +:106F9000F35341A9F55B42A9F76343A9F96B44A9EF +:106FA000FD7BCCA861FFFF17A30640F9F403002A7C +:106FB000810C80D2E0630191C20000B0420C3B9191 +:106FC000B51E0094E2630191E103142AE00319AABB +:106FD000F8110094E303182AE403002AFA03002AB4 +:106FE000E20317AAE10316AAE00315AA4FFFFF97D1 +:106FF000F303002AE0020034FF5700B9E103142A2A +:10700000E2530191E00319AAE9100094F403002A65 +:107010000002F837E05740B91F000071AD0100547D +:107020001F040071C1FEFF549F021A6B80FEFF54C3 +:10703000E403142AE303182AE20317AAE10316AAB9 +:10704000E00315AA39FFFF97F303002A80FDFF35FF +:10705000E003132AF35341A9F55B42A9F76343A95F +:10706000F96B44A9FD7BCCA8C0035FD63300801226 +:10707000F8FFFF17FD7BBDA9FD030091F35301A9A4 +:10708000F30300AAF40303AAF51300F9F503042A95 +:10709000002040F9030840B9607C4093003C009117 +:1070A00000EC7C92FF6320CB601A40F9040840B9E1 +:1070B0007F00046BEA000054A0028012BF0300911D +:1070C000F35341A9F51340F9FD7BC3A8C0035FD674 +:1070D000040C40F9E3030091000040F980003FD622 +:1070E000C0FEFF37E303152AE20314AAE10300916F +:1070F000E00313AA8FFFFF97F1FFFF1702008052F2 +:10710000040080D2030040B97F00026B48000054A5 +:10711000C0035FD6235862B86300048B040440F9AF +:10712000845862B8630004CB235822B8420400118B +:1071300064FC6093F4FFFF17EA0302AAE80303AAC2 +:1071400003008052020040B95F00036BC800005486 +:10715000020040B9070080525F00076B280200540C +:10716000C0035FD63F5823B863040011F6FFFF1732 +:10717000C37C7ED3225866B8C60400114200048B3B +:10718000046963B86409A49B020440F9426863B8C7 +:107190002215A29B4540248B25682CB80E000014B4 +:1071A000FD7BBFA9FD030091220040B9260080525B +:1071B0004B5967B8040140B9090440B9030440F9C8 +:1071C0006409A49B650040B9827C4092297D041B20 +:1071D0002509A59BC3040051020040B984FC60D37B +:1071E000A5FC60D36CF47ED32308038BDF00026B15 +:1071F00003FCFF548400058B640000B9FF8344EB5B +:1072000040000054BEFFFF97020040B9E7040011A0 +:107210005F00076BA8FCFF54FD7BC1A8C0035FD6CD +:1072200021C8228B030080D224CC5FB88408C05AC6 +:10723000047823B8630400915F00036B6CFFFF5474 +:10724000C0035FD6FD7BB5A9FD030091F35301A9EF +:10725000F55B02A9F76303A9F96B04A9FB7305A900 +:10726000A33B00F9020D00B4F503012AF70300AABD +:10727000410840F9F30302AA406C4329BB031229D9 +:10728000410900B4A0230291020180D23A1900946E +:10729000A44740F9840CC0DAA43700F9A45700F9D8 +:1072A0007B0B0034610640F9210B00B4650240F904 +:1072B000E50A00B4600320511F002071880A0054C1 +:1072C0007B7F0553BB9300B9E2031B2A746B7ED30B +:1072D000933E0091941200D173667C92FF6333CB8E +:1072E000E0030091FF6333CBF6030091A0DB09A913 +:1072F000CCFFFF97E00316AAE10305AAC9FFFF9799 +:10730000A0767E92003C0091E10317AA00707C9267 +:10731000FF6320CBE003152AF8030091E20300AAE3 +:10732000F7030091A03F00F9E00318AA1219009496 +:10733000FF6333CB1403148BF9030091FF6333CB4A +:10734000FC030091FF6333CBF5030091FF6333CB64 +:10735000A43740F9FA030091000080D262008092C5 +:10736000017C029B816A61B82108C05A217B20B848 +:10737000000400917F03006B48FFFF54040100B438 +:10738000E00304AA3300805200FC41D3400400B45F +:10739000730600117F06017181FFFF54B302801252 +:1073A000FF0200914D000014E4830032BBFFFF1781 +:1073B00062FFFF97A35740F98222D39A7F00026AA7 +:1073C000E0000054E3031AAAE20315AAE1031CAA91 +:1073D0005AFFFF97730600511D000014A29340B995 +:1073E000E0031CAA42F47ED3E3180094FAFFFF17CF +:1073F000A05A61B8210400510008C05A404400B8A6 +:10740000310000141301801234000014B301801203 +:10741000320000147F06007120FCFF5404FC073684 +:10742000E20319AAA0430291E30316AAE1031CAAEE +:1074300042FFFF97730A0051A29340B9E0031AAAD2 +:10744000340080D242F47ED3CB180094E3031CAA0C +:10745000E2031CAAE10315AAA0430291B3FAFF3587 +:1074600036FFFF97E1031CAAE30319AAE20315AA5A +:1074700032FFFF97B49340B9E00315AA827E7ED312 +:10748000BD18009484060051A04F40F9847C4093BD +:10749000E400F837A27A64B8017864B85F00016B41 +:1074A000C3000054840400D149FFFF54E10315AA2E +:1074B000A043029112FFFF97A19340B9E20318AADB +:1074C0002104005161F9FF36A00B47A9FF0200918A +:1074D000E10318AAA8180094BF030091E003132A3F +:1074E000F35341A9F55B42A9F76343A9F96B44A99A +:1074F000FB7345A9FD7BCBA8C0035FD65F0000717D +:107500004D050054FD7BBCA9FD030091F35301A977 +:10751000F30301AAF403022AE1C30091F55B02A977 +:10752000F50303AA4BFDFF97C0020035E01B40F9AD +:10753000E1E30091021040F940003FD620020035FF +:107540009406005116008052E00743A9630A40B92F +:10755000620240F9051440F99F02166BAC01005419 +:1075600024008052A0003FD6C0000035E00743A9A8 +:10757000E20315AA030840B9041840F980003FD679 +:10758000F35341A9F55B42A9FD7BC4A8C0035FD6B4 +:107590000400805273420091A0003FD620FFFF35C7 +:1075A000D6060011E9FFFF17A0028012C0035FD6C4 +:1075B000216084D21F7C00A9A1E8ACF22171D5F230 +:1075C000A1F9FDF2010800F9C19F9BD24117B3F266 +:1075D000C18ECAF24106E2F2010C00F9013E9C5252 +:1075E000417AB872012000B9C0035FD6FD7BB5A90E +:1075F000FD030091F35301A9F55B02A9F76303A909 +:10760000F96B04A9FB7305A9E27300B9E203022A2E +:10761000C201003423338FD224749DD2859B97D22C +:10762000C63A98D24350ABF224DBADF265E3B1F237 +:10763000464CB9F2E27340B942040051E27300B91A +:107640005F04003101010054F35341A9F55B42A9E5 +:10765000F76343A9F96B44A9FB7345A9FD7BCBA84C +:10766000C0035FD6220040392100019127105C3809 +:107670002A305C3831705C38472007AA22205C38F9 +:1076800036B05C3835F05C38E24002AA27505C38EE +:107690004A600AAA34305D384209C05AE2AF00B9E4 +:1076A00022405C384A09C05A30705D382FB05D38CE +:1076B000472007AA22605C38E24002AA27905C3883 +:1076C000516011AA220AC05AE2AB00B922805C388C +:1076D000310AC05A472007AA22A05C38E24002AA19 +:1076E00027D05C38566016AA22C05C38C90AC05A36 +:1076F000D60AC05A472007AA22E05C38E24002AA14 +:1077000027105D38556015AA22005D38BC0AC05AA2 +:10771000B50AC05A472007AA22205D38E24002AAD3 +:1077200027505D38546014AA820AC05AE2A700B9F3 +:1077300022405D38940AC05A472007AA22605D386B +:10774000E24002AA27905D38506010AA020AC05A8F +:10775000E2A300B922805D38100AC05A1002038BE0 +:10776000472007AA22A05D38E24002AA4F600FAA74 +:10777000E209C05AE29F00B922C05D3827D05D38C7 +:107780002EF05D382D305E38472007AA22E05D38A4 +:107790002C705E382BB05E38E24002AA27105E38AB +:1077A0004E600EAA28F05E38C209C05AE29B00B9AA +:1077B00022005E3833505F38472007AA22205E3807 +:1077C000E24002AA27505E384D600DAA22405E3882 +:1077D000BA09C05AAD09C05AAD01038B472007AAA8 +:1077E00022605E38E24002AA27905E384C600CAA04 +:1077F00022805E389909C05A472007AA22A05E3825 +:10780000E24002AA27D05E384B600BAA22C05E3845 +:107810007809C05A6B09C05A6B01038B422007AA32 +:1078200027E05E38424007AA27105F38486008AA60 +:107830000209C05AE29700B922005F380809C05A0D +:10784000422007AA27205F38424007AA27305F3826 +:10785000476007AAE208C05AE29300B922405F38A5 +:10786000E708C05A422013AA33605F38424013AA87 +:1078700033705F38426013AA5308C05AF37700B9D7 +:1078800033805F384208C05A37905F381E1C40B9B9 +:10789000732217AA37A05F38734217AA37B05F3830 +:1078A000776217AAF30AC05AF38F00B9F30AC05AD5 +:1078B00037D05F38F33F00F933C05F38732217AA1F +:1078C00037E05F38734217AA37F05F38776217AA3C +:1078D000F30AC05AF38B00B9F30AC05AF34300F914 +:1078E000131040B9F36300B9131440B9F36B00B936 +:1078F000F33340F9171840B97B7E7BD3F36340B96B +:10790000737E1B537B0313AAF3021E4AFE6B40B91E +:1079100073021E0A1E1C40B973021E4A7303138BA6 +:107920001B2040B97B403B8B7B021B8BF33740F91C +:107930004A011B8BFB6340B97E7E62D3F36B40B977 +:10794000737E0253DE0313AAF3021ECA7303130AE3 +:107950007B7F0253730217CAF702038B7102118BEC +:10796000131C40B97340338B3102138B537D1B536F +:1079700073160AAA7302118BF13340F9317E62D378 +:1079800031021BAADB0311CA7B030A8A7B031ECACE +:10799000DE03038B7603168BD702178B767E1B5381 +:1079A000D61613AAD602178B577D0253EA7A0AAA73 +:1079B00037020ACAF702138AF70211CA3102038B8F +:1079C000F502158B777E0253F37A13AABE021E8B43 +:1079D000570113CAD57E1B53B51616AAF702168A8D +:1079E000B5021E8BF7020ACAF402148B9402118BA3 +:1079F000B17E1B53311615AA3102148BD47E02536B +:107A0000967A16AA740216CA9402158A940213CAA8 +:107A100094020A8B2A7E1B539002108BB47E025371 +:107A2000947A15AA4A1511AA4A01108BD00214CAD9 +:107A30001002118A100216CA1302138BF009C05AE1 +:107A40001002038B4F7D1B537002108BEF150AAA97 +:107A5000EF01108B307E0253117A11AA900211CAE5 +:107A600010020A8A100214CA1302168BD009C05AD7 +:107A70001002038BEE7D1B537002108BCE150FAAE4 +:107A8000CE01108B507D0253107A0AAA2A0210CA26 +:107A90004A010F8A4A0111CA4A01148B4D010D8B0C +:107AA000CA7D1B534A150EAA4A010D8BED7D025368 +:107AB000AF790FAA0D020FCAAD010E8AAD0110CA2F +:107AC000B101118B8D09C05AAD01038B4C7D1B5345 +:107AD0002D020D8B8C150AAA8C010D8BCD7D0253C6 +:107AE000AD790EAAEE010DCACE010A8ACE010FCAE7 +:107AF000CE01108B507D0253CB010B8B8E7D1B531F +:107B0000107A0AAACE150CAACE010B8BAB0110CAB3 +:107B10006B010C8A0A01038B6B010DCA6B010F8B81 +:107B20008F7D0253EF790CAA6B010A8B0C020FCAEE +:107B3000CA7D1B538C010E8A4A150EAA8C0110CAED +:107B40004A010B8B8C010D8BCD7D0253AD790EAAB2 +:107B5000EB00038B8C010B8BEE010DCA4B7D1B538D +:107B6000CE010A8A6B150AAACE010FCA6B010C8BD3 +:107B7000CE01108B4C00038B50001A4ACE010C8BA7 +:107B80006C7D1B538C150BAA8C010E8B4E7D025302 +:107B9000CE790AAAAA010ECA4A010B8A4A010DCA65 +:107BA0004F010F8BEA3F40F94A01038BEF010A8B2B +:107BB0008A7D1B534A150CAA4A010F8B6F7D025315 +:107BC000EF790BAACB010FCA6B010C8A6B010ECAAD +:107BD0006D010D8BEB4340F96B01038BAD010B8BFA +:107BE0004B7D1B536B150AAA6B010D8B8D7D0253C8 +:107BF000AC790CAAEDAF40B92D010D4A0D020D4A2A +:107C0000B0FD5FD30D060DAAF0010CCA10020A8A5E +:107C100008010DCA10020FCA10020E8BAE01038BB1 +:107C200010020E8B6E7D1B53CE150BAACE01108B4E +:107C3000507D0253107A0AAAEA8F40B95101194ABD +:107C4000F3AB54298A030A4A6902094A2A020A4AFA +:107C500051FD5FD32A060AAA910110CA31020B8A8C +:107C6000E7000ACA31020CCA31020F8B4F01038BA5 +:107C700031020F8BCF7D1B53EF150EAAEF01118B35 +:107C8000717D02532B7A0BAAF18B40B93102184A4D +:107C90002902094A31FD5FD3290609AA11020BCA3C +:107CA00031020E8A420009CA310210CA31020C8B1D +:107CB0002C01038B31020C8BEC7D1B538C150FAA0E +:107CC0008C01118BD17D0253317A0EAAEEA340B9FB +:107CD000DC011C4A880308CA0E7D1F53C80508AA88 +:107CE0006E0111CACE010F8ACE010BCAD001108BD2 +:107CF0000E01038B10020E8B8E7D1B53CE150CAA2A +:107D0000CE01108BF07D0253107A0FAAEF9F40B97D +:107D1000EF01134AF3A340B9E70107CAEF7C1F53F1 +:107D2000E70507AA2F0210CAEF010CCAEF010B8B5F +:107D3000EB00048BEF010B8BCB7D1B536B150EAA55 +:107D40006B010F8B8F7D0253EF790CAAEC9B40B92E +:107D50008C01134A820102CA4C7C1F53820502AA7D +:107D60000C020FCA8C010ECA8C01118B5100048BBE +:107D70008C01118B717D1B5331160BAA31020C8BB8 +:107D8000CC7D02538E790EAAEC9F40B953030C4A66 +:107D90001A031A4AEC3F40F98C0108CA6C020CCA5B +:107DA000937D1F536C060CAAF3010ECA73020BCA13 +:107DB0007002108B9301048B1002138B337E1B53C4 +:107DC000731611AA7302108B707D02530B7A0BAAE3 +:107DD000F09B40B93403104AF04340F9100207CA3F +:107DE000900210CA147E1F53900610AAD4010BCA29 +:107DF000940211CA370110CA8F020F8B1402048B30 +:107E0000EF01148B747E1B53941613AA94020F8BEC +:107E10002F7E0253F17911AAAF0102CA4F030FCA94 +:107E2000FA7740B9F57D1F53AF060FAA750111CA45 +:107E3000B50213CAB5020E8BEE01048BB5020E8B90 +:107E40008E7E1B53CE1514AACE01158B757E025360 +:107E5000B37A13AAF59740B9B902194A55010CCA69 +:107E6000350315CAF99340B9B67E1F53D50615AA36 +:107E7000360213CAD60214CACB020B8BB602048B8D +:107E80006B01168BD67D1B53D6160EAAD6020B8B12 +:107E90008B7E0253747914AAEB9340B97801184A87 +:107EA000170317CAF89740B9EB7E1F53770517AA37 +:107EB0006B0214CA6B010ECA6B01118BF102048BA9 +:107EC0006B01118BD17E1B53311616AA31020B8B1D +:107ED000CB7D02536E790EAAEB7740B97801184A30 +:107EE0000B010FCA0B030BCA787D1F530B070BAA9C +:107EF00098020ECA180316CA1803138B7301048B59 +:107F00001803138B337E1B53731611AA7302188B3D +:107F1000D87E0253187B16AAF68F40B97B7E025397 +:107F2000D902194AF60015CA360316CA7B7B13AA72 +:107F3000D97E1F53360716AAD90118CA390311CAA8 +:107F40003903148BD402048B3903148B747E1B53B6 +:107F5000941613AA9402198B397E0253397B11AA05 +:107F6000F18B40B93A021A4A510017CA510311CA9B +:107F70003A7E1F53510711AA1A0319CA5A0313CA8A +:107F80004E030E8B3A02048BCE011A8B9A7E1B5342 +:107F90005A1714AA5A030E8BEE3F40F9D3010DCAAB +:107FA0008E010BCA6E020ECAAD0109CA290107CAA9 +:107FB000E7000CCAD37D1F538C010FCA6E060EAAB0 +:107FC00033031BCA730214CA7302188BD801048BC3 +:107FD0007302188B587F1B5318171AAA1803138B98 +:107FE000937E0253747A14AAF34340F97C020ACABE +:107FF000130216CA930313CA4A0108CA080102CA27 +:10800000420010CA7C7E1F53100215CA930713AAA0 +:108010007C0314CA9C031ACA9903198B7C02048B33 +:1080200039031C8B1C7F1B539C1718AA9C03198BAC +:10803000597F02533A7B1AAAF90111CAB90119CA28 +:10804000EF0117CA2D7F1F53B90519AA8D021ACA4D +:10805000AD0118CAAD011B8B3B03048BAD011B8B1B +:108060009B7F1B537B171CAA7B030D8B0D7F025339 +:10807000B87918AAAD020ECA4D010DCAB5020BCAD5 +:10808000AA7D1F534D050DAA4A0318CA4A011CCAEE +:108090005401148BAA01048B94020A8B6A7F1B5330 +:1080A0004A151BAA4A01148B947F0253947A1CAA86 +:1080B000FC0213CA29011CCAF70216CA3C7D1F53D1 +:1080C000890709AA1C0314CA9C031BCA9C031A8BA8 +:1080D0003A01048B9C031A8B5A7D1B535A170AAA28 +:1080E0005A031C8B7C7F02539B7B1BAA7C0119CA01 +:1080F00008011CCA6B0111CA1C7D1F53880708AAFE +:108100009C021BCA9C030ACA9803188B1C01048B8F +:1081100018031C8B5C7F1B539C171AAA9C03188B9B +:10812000587D02530A7B0AAAD8020DCAF80018CA61 +:10813000D6020ECA077F1F53F80418AA67030ACA9B +:10814000E7001ACAF400148B0703048B9402078B10 +:10815000877F1B53E7141CAAE700148B547F02533C +:108160009A7A1AAA340209CA540014CA310213CAEC +:10817000827E1F53540414AA42011ACA42001CCA28 +:108180005B001B8B8202048B7B03028BE27C1B5304 +:10819000421407AA42001B8B9B7F02537B7B1CAAC5 +:1081A000DC0108CA8C030CCACE0119CA9C7D1F537E +:1081B0008C070CAA5C031BCA9C0307CA9C030A8B8E +:1081C0008A01048B9C030A8B4A7C1B534A1502AA22 +:1081D0004A011C8BFC7C0253877B07AA7C0218CACD +:1081E00010021CCA73020DCA1C7E1F53900710AAEE +:1081F0007C0307CA9C0302CA9A031A8B1C02048BD5 +:108200005A031C8B5C7D1B539C170AAA9C031A8B78 +:108210005A7C0253427B02AA3A0314CAFA011ACAD0 +:108220005E01028A390309CA4F7F1F53FA051AAA51 +:108230004F0102AAEF01078AEF011EAAEF011B8B73 +:108240005B03058BEF011B8B9B7F1B537B171CAACA +:108250007B030F8B4F7D0253EA790AAAAF010CCA48 +:10826000B5020FCA9E030A8AAD0108CAAF7E1F532A +:10827000F50515AA8F030AAAEF01028AEF011EAACB +:10828000EF01078BA702058BEF01078B677F1B535D +:10829000E7141BAAE7000F8B8F7F0253FC791CAAFF +:1082A0002F0110CAEF020FCA7E031C8A290118CAC7 +:1082B000F77D1F53EF060FAA77031CAAF7020A8A5D +:1082C000F7021EAAF702028BE201058BF702028B6E +:1082D000E27C1B53421407AA4200178B777F02539C +:1082E000F77A1BAA1B011ACA6B011BCAFE00178A68 +:1082F0007B7D1F536B070BAAFB0017AA7B031C8A0D +:108300007B031EAA6A030A8B7B01058B4A011B8B28 +:108310005B7C1B537B1702AA7B030A8BEA7C02530C +:10832000477907AA0A0315CACA020ACA5E00078A61 +:1083300018030CCA567D1F53CA060AAA560007AA7C +:10834000D602178AD6021EAADC021C8B5601058BA8 +:108350009C03168B767F1B53D6161BAAD6021C8B4A +:108360005C7C0253827B02AA9C020FCA31021CCAA7 +:108370007E03028A3C7E1F53910711AA7C0302AA46 +:108380009C03078A9C031EAA9C03178B3702058B4C +:108390009C03178BD77E1B53F71616AAF7021C8B6C +:1083A0007C7F02539B7B1BAA9C010BCACE011CCA7B +:1083B000DE021B8A8C011ACADC7D1F538E070EAAAF +:1083C000DC021BAA9C03028A9C031EAA9C03078B47 +:1083D000C701058B9C03078BE77E1B53E71417AA85 +:1083E000E7001C8BDC7E0253967B16AA1C020ACA8D +:1083F00073021CCAFE02168A7C7E1F53930713AABF +:10840000FC0216AA9C031B8A9C031EAA8203028BF1 +:108410007C02058B42001C8BFC7C1B539C1707AA1B +:108420009C03028BE27E0253577817AA420311CABB +:10843000220302CAFE00178A5A030FCA597C1F532F +:10844000220702AAF90017AA3903168A39031EAABD +:108450003B031B8B5900058B7B03198B997F1B53A7 +:1084600039171CAA39031B8BFB7C02537B7B07AAA1 +:10847000A7020ECAAD0107CA9E031B8AA77D1F5320 +:10848000ED040DAA87031BAAE700178AE7001EAABE +:108490003E7F1B53E700168BB601058BE700168B5A +:1084A000F60113CA360116CADE1719AADE03078BB6 +:1084B000877F0253FC781CAAC77E1F53F60416AAB6 +:1084C00027031CAA29031C8AE7001B8AE70009AAC4 +:1084D000C902058BE700178B770102CAE700098BF9 +:1084E000C97F1B5329151EAAEF010ACA2901078B50 +:1084F000277F0253F97819AA070114CAE70207CAAD +:10850000D703198A940210CA100215CAE87C1F53B7 +:10851000B5020BCA070507AAC80319AA08011C8AD5 +:108520006B0111CA170117AAE800058BF7021B8B14 +:10853000DB7F0253F702088B287D1B53081509AA1D +:108540007B7B1EAA0801178B57010DCA170317CA98 +:108550003E011B8A4A010ECAF87E1F53170717AA4D +:1085600038011BAA1803198A18031EAA18031C8BAA +:10857000FC02058B18031C8B1C7D1B539C1708AA3F +:108580009C03188B387D0253097B09AA380216CA4E +:10859000980218CA1E01098A310213CA147F1F5398 +:1085A000980618AA140109AA94021B8A94021EAA0A +:1085B0009402198B1903058B9402198B997F1B5315 +:1085C00039171CAA3903148B147D0253887A08AA20 +:1085D000D40107CA940114CA9E03088ACE0102CAB4 +:1085E0008C7E1F53940514AA8C0308AA8C01098A57 +:1085F0008C011EAA8C011B8B9B02058B8C011B8B93 +:108600003B7F1B537B1719AA7B030C8B8C7F025378 +:108610009C791CAA6C0217CA10020CCA3E031C8A61 +:1086200073020DCA0C7E1F53900510AA2C031CAABE +:108630008C01088A8C011EAA8C01098B0902058B0A +:108640008C01098B697F1B5329151BAA29010C8BEF +:108650002C7F0253997919AA4C0018CA4C030CCAF2 +:108660007E03198A420016CA9A7D1F534C070CAA32 +:108670007A0319AA5A031C8A5A031EAA5A03088BA2 +:108680008801058B5A03088B287D1B53081509AAFE +:1086900008011A8B7A7F02535A7B1BAABB0114CAAA +:1086A000B5021BCA3E011A8AAD0107CABB7E1F5321 +:1086B000750715AA3B011AAA7B03198A7B031EAA18 +:1086C0007C031C8BBB02058B9C031B8B1B7D1B53EC +:1086D0007B1708AA7B031C8B3C7D02539C7B09AA59 +:1086E000C90210CAE90109CA1E011C8AD60217CAAA +:1086F0002F7D1F53E90509AA0F011CAAEF011A8A51 +:10870000EF011EAAF901198B2F01058B39030F8B7D +:108710006F7F1B53EF151BAAEF01198B197D0253B5 +:10872000397B08AAE8000CCA680108CA7E03198AC6 +:10873000E70018CA0B7D1F53680508AA6B0319AA26 +:108740006B011C8A6B011EAA6B011A8B1A01058B27 +:108750006B011A8BFA7D1B535A170FAA5A030B8B06 +:108760006B7F02537B791BAAEB0215CA4B010BCA24 +:10877000F70214CA6A7D1F534B050BAA2A031BCAB2 +:108780004A010FCA5C011C8B6A01068B9C030A8B91 +:108790004A7F1B534A151AAA4A011C8BFC7D0253BF +:1087A0008F7B0FAA1C0309CA31021CCA180310CA06 +:1087B0003C7E1F53910711AA7C030FCA9C031ACA5F +:1087C0009C03198B3902068B9C03198B597D1B5313 +:1087D00039170AAA39031C8B5C7F02539A7B1AAAA9 +:1087E0009C0208CACE011CCA94020CCADC7D1F532D +:1087F0008E070EAAFC011ACA9C030ACA9C031B8B93 +:10880000DB01068B9C031B8B3B7F1B537B1719AA39 +:108810007B031C8B5C7D02539C7B0AAA0A020BCA59 +:108820006A020ACA100215CA537D1F536A060AAAB1 +:1088300053031CCA730219CA73020F8B4F01068BB4 +:1088400073020F8B6F7F1B53EF151BAAEF01138B66 +:10885000337F0253737A19AA990111CA220302CAFB +:108860008C0109CA597C1F53220702AA990313CA13 +:1088700039031BCA3A031A8B5900068B5A03198B0A +:10888000F97D1B5339170FAA39031A8B7A7F0253CC +:108890005A7B1BAABB020ECAAD011BCAB50208CA8D +:1088A000BB7D1F536D070DAA7B021ACA7B030FCA3B +:1088B0007C031C8BBB01068B9C031B8B3B7F1B53D8 +:1088C0007B1719AA7B031C8BFC7D02539C7B0FAA90 +:1088D0002F010ACACF020FCA29010BCAF67D1F5306 +:1088E000CF060FAA56031CCAD60219CAD602138B8A +:1088F000F301068BD602138B737F1B5373161BAACF +:108900007302168B367F0253D67A19AA190102CA4E +:10891000F90019CA080111CA277F1F53F90419AABF +:10892000870316CAE7001BCAE7001A8B3A03068BB7 +:10893000E7001A8B7A7E1B535A1713AA5A03078B28 +:10894000677F0253FB781BAA67010DCAF70207CAAB +:108950006B010ECAE77E1F53F70417AAC7021BCA92 +:10896000E70013CAE7001C8BFC02068BE7001C8B98 +:108970005C7F1B539C171AAA9C03078B677E0253CC +:10898000F37813AA27020FCA070307CA31020ACADB +:10899000F87C1F53070707AA780313CA18031ACADB +:1089A0001803168BF600068B1803168B967F1B5345 +:1089B000D6161CAAD602188B587F0253187B1AAA07 +:1089C000DA0119CA94021ACACE0102CA9A7E1F534A +:1089D000540714AA7A0218CA5A031CCA5B031B8BD9 +:1089E0009A02068B7B031A8BDA7E1B535A1716AA40 +:1089F0005A031B8B9B7F02537B7B1CAA5C0117CA0B +:108A000010021CCA4A010DCA1C7E1F53900710AAEF +:108A10001C031BCA9C0316CAEF0110CA9C03138BCC +:108A20001302068B9C03138B537F1B5373161AAAD6 +:108A30002F010FCA73021C8BDC7E0253967B16AA91 +:108A40005C0007CA9C011CCAE97D1F532F050FAAB1 +:108A50008C7F1F53E901068B9C051CAA6C0316CA68 +:108A60008C011ACA39031CCA8C01188B9803068B17 +:108A70008C01188B787E1B53181713AA190119CA79 +:108A800018030C8B4C7F02539A791AAAAC0114CAB2 +:108A9000B5020CCA287F1F53190519AAE7000FCA8F +:108AA000AC7E1F532803068B950515AACC021ACA63 +:108AB0008C0113CAF70215CA9B011B8BAC02068BF3 +:108AC0007B030C8B0C7F1B538C1518AA6B0117CAE8 +:108AD0008C011B8B7B7E02537B7B13AAE70011CAA0 +:108AE00053031BCA940219CA730218CAEF7C1F539E +:108AF0007302168BEF0507AA7302098B897D1B533E +:108B000029150CAAEF01068B2901138B137F025341 +:108B1000737A18AACE0114CA760313CAD6020CCAF5 +:108B2000C27D1F53D6021A8B4E040EAAD602088BA2 +:108B3000287D1B53081509AACE01068B0801168B48 +:108B4000967D0253D67A0CAA6C7D1F53750216CA05 +:108B50008B050BAAB50209CA6C01068BB5021B8BEB +:108B600010020BCAB5020C8B0C7D1B538C1508AA86 +:108B70004A0110CA8C01158B357D0253A97A09AAC6 +:108B8000C70209CAE70008CAE700138BEF01078B89 +:108B9000877D1B53E7140CAAE7000F8B0F7D025350 +:108BA000E87908AA220108CA42000CCA4200168BC2 +:108BB000CE01028BE27C1B53421407AA4E000E8B9F +:108BC000827D02534C780CAA427D1F534A040AAAA4 +:108BD00002010CCA420007CA4A01068B4200098BF7 +:108BE000E96340B94A01028BC27D1B5342140EAAAD +:108BF000E708871342000A8B2201020B021000B91A +:108C0000E26B40B942000E0B021400B9021840B9E1 +:108C1000E700020B021C40B942000C0B07080329B5 +:108C2000022040B94200080B022000B982FAFF1767 +:108C3000FD7BBBA9FD030091F35301A9F40300AA36 +:108C4000F303022AF55B02A916088052F50301AA74 +:108C5000F76303A9F92300F9000040F917144092C3 +:108C60004000000B800200F9F903172AD602174BC7 +:108C70001F4022EB82000054800640F9000400915E +:108C8000800600F9FF0200F1C212537AC8010054B5 +:108C900073020151E10315AA98920091B502168B57 +:108CA0003303130B0003178B170080D2E20316AABD +:108CB000B1120094E10318AAE00314AA2200805222 +:108CC0004BFAFF97627E0653E10315AAE00314AA4C +:108CD00047FAFF97621600728001005473667A9219 +:108CE00080920091A102138B0000178BF35341A9CE +:108CF00042144092F55B42A9F76343A9F92340F976 +:108D0000FD7BC5A89C120014F35341A9F55B42A951 +:108D1000F76343A9F92340F9FD7BC5A8C0035FD6DB +:108D200042000034C3FFFF17C0035FD6FD7BBDA91F +:108D3000FD030091F35301A9F40301AAF30300AA70 +:108D4000010840A923FC5DD3620C02AA030780D26C +:108D50004208C05AE22B00B922F07DD32114409280 +:108D6000630001CB3FDC00F14208C05AE22F00B99A +:108D7000020F80D2420001CB4280839AC100009052 +:108D800021E00591E7FFFF97E1A30091E00313AA1B +:108D900002018052A7FFFF97604E403980020039E0 +:108DA0006026407980060039601240B9007C085383 +:108DB000800A0039601240B9800E0039605E403987 +:108DC00080120039602E407980160039601640B953 +:108DD000007C0853801A0039601640B9801E0039A3 +:108DE000606E403980220039603640798026003933 +:108DF000601A40B9007C0853802A0039601A40B9D3 +:108E0000802E0039607E403980320039603E4079E2 +:108E100080360039601E40B9007C0853803A003922 +:108E2000601E40B9803E0039608E40398042003972 +:108E30006046407980460039602240B9007C085382 +:108E4000804A0039602240B9804E0039F35341A96D +:108E5000FD7BC3A8C0035FD6FD7BB5A9FD030091D0 +:108E6000F35301A9F30300AA7442218BE02301917B +:108E7000F55B02A9F603032AF71B00F9F70302AA20 +:108E8000CCF9FF977F0214EB23010054E10317AAEA +:108E9000E0230191A6FFFF97F35341A9F55B42A997 +:108EA000F71B40F9FD7BCBA8C0035FD6950213CB1F +:108EB000E10313AADF02156BE0230191D532951A65 +:108EC000E203152A73C2358B96FFFF9723F6FF97AF +:108ED000EDFFFF17E1CC9C521F7C00292141AD72B0 +:108EE000010800B9A1D09552E16CB772010C00B92C +:108EF000416E9E52C18DA772011000B941A79E52CA +:108F0000E1A9B472011400B9E14F8A52C121AA72D9 +:108F1000011800B981118D52A160B372011C00B912 +:108F200061359B5261F0A372012000B921A39952CF +:108F3000017CAB72012400B9C0035FD6FD7BB9A9E7 +:108F4000FD030091F35301A9F55B02A9F76303A99F +:108F5000F96B04A9FB7305A9E26F00B9E203022AC9 +:108F6000C2000034E26F40B942040051E26F00B920 +:108F70005F04003101010054F35341A9F55B42A99C +:108F8000F76343A9F96B44A9FB7345A9FD7BC7A807 +:108F9000C0035FD6220040392100019123105C38C4 +:108FA00037305C3838705C38432003AA22205C38A4 +:108FB0003AB05C3839F05C38624002AA23505C3821 +:108FC000576017AA22405C3834305D38F70AC05A1F +:108FD00033705D38422003AA23605C383EB05D38B0 +:108FE00031F05D38424003AA23905C38586018AADB +:108FF00022805C38180BC05A422003AA23A05C3898 +:10900000424003AA23D05C385A601AAA22C05C38B6 +:109010005A0BC05A422003AA23E05C38424003AAFC +:1090200023105D38596019AA22005D38390BC05AE7 +:10903000422003AA23205D38424003AA23505D3812 +:10904000546014AA22405D38940AC05A422003AAF0 +:1090500023605D38424003AA23905D38536013AA11 +:1090600022805D38730AC05A422003AA23A05D38CB +:10907000424003AA23D05D385E601EAA22C05D383C +:10908000DE0BC05A422003AA23E05D38424003AA07 +:10909000516011AA22005E3823105E38310AC05A8E +:1090A00030305E382F705E38422003AA23205E38AD +:1090B0002EB05E382DF05E38424003AA23505E3851 +:1090C000506010AA22405E382B305F38100AC05A18 +:1090D0002A705F38422003AA23605E382CB05F38C4 +:1090E00036F05F38424003AA23905E384F600FAAE3 +:1090F00022805E38EF09C05A422003AA23A05E38BE +:10910000424003AA23D05E384E600EAA22C05E38C9 +:10911000CE09C05A422003AA23E05E38424003AA87 +:1091200023105F384D600DAA22005F38AD09C05A88 +:10913000422003AA23205F38424003AA23505F380D +:109140004B600BAA22405F386B09C05A422003AA29 +:1091500023605F38424003AA23905F384A600AAA1E +:1091600022805F384A09C05A422003AA23A05F38F0 +:10917000424003AA23D05F384C600CAA22C05F385B +:109180008C09C05A422003AA23E05F38424003AA58 +:10919000566016AA021840B9042040B9D60AC05A2F +:1091A00007184129432C82136318C24A6364C24AD8 +:1091B000021C40B94200044A041840B94200040AA3 +:1091C000042040B94200044A04F385526200020BB5 +:1091D000032440B94451A8726300040B040C40B945 +:1091E0004200030B031440B94200170BF7020F0BA8 +:1091F0006900020B030840B965348313A508C34A0C +:10920000A558C34A6300042A041040B96300040A45 +:10921000040840B98400060A6300042A2492885294 +:10922000A500030BE426AE72A500020B020C432935 +:109230004200034A4200090A4200034A032040B99F +:109240004200180B6300040BA43485134200030B87 +:10925000232D89136318C94A8408C54A6364C94A1F +:109260008458C54A4200030B031040B96800020B42 +:10927000030840B96300052A6300060A060840B9DE +:10928000C600050A6300062AE6799F528400030B94 +:10929000031840B98400020B021840B906B8B67230 +:1092A0004200094A4200080A4200034A031C40B92E +:1092B00042001A0B6300060BA600042A4200030BAF +:1092C000032D88136318C84AC600070A6364C84A96 +:1092D000A700040A4200030B030C40B9C600072A8A +:1092E0002701084A7B00020B833484136308C44AB5 +:1092F000E7001B0A6358C44AE700094A6300060BEB +:10930000A6749B526300020B021840B9E700190BC8 +:10931000A636BD724200060B9500032AE700020B39 +:10932000622F9B134218DB4A9C00030A4264DB4A0B +:10933000B502050AE700020B020840B9B5021C2A73 +:109340004600070B623483134208C34A4258C34A9B +:109350004200150B4200070B07011B4AE700060AF3 +:109360007500022AE700084A7C00020AE700090BA0 +:10937000694B9852C92AA7728902090BE700090BA9 +:10938000C92C86132919C64AB502040A2965C64A9A +:10939000B5021C2AE700090B493482132909C24A85 +:1093A000A500070B2959C24A2901150B2901070BF2 +:1093B0006703064AE700050A5500092AE7001B4A29 +:1093C0005C00090AE700080B283E8252283EAB7277 +:1093D0006802080BE700080BA82C85130819C54A7A +:1093E000B502030A0865C54AB5021C2AE700080B46 +:1093F000283589130809C94A8400070B0859C94A46 +:109400000801150BD500054AB502040A0801070B2F +:10941000B502064A87549052B5021B0BE747B27259 +:10942000C703070B3B01082AB502070B872C8413DF +:10943000E718C44A3C01080AE764C44A7B03020AED +:10944000B502070B07358813E708C84A7B031C2AB7 +:10945000E758C84A6300150BE7001B0BE700150B24 +:10946000B500044AB502030A1B01072AB502054AE2 +:109470001C01070AB502060BA6DA8B528663B57289 +:109480002602060BB502060B662C8313C618C34AC8 +:109490007B03090AC664C34A7B031C2AB502060B78 +:1094A000E6348713C608C74A4200150BC658C74A98 +:1094B000C6001B0BC600150B9500034AB502020A35 +:1094C000FB00062AB502044AFC00060AB502050B99 +:1094D00005539552E500BB720502050BB502050B5D +:1094E000452C8213A518C24A7B03080AA564C24A08 +:1094F0007B031C2AB502050BC5348613A508C64A92 +:109500002901150BA558C64AA5001B0BA500150B74 +:109510007500024AB502090ADB00052AB502034AB2 +:10952000DC00050AB502040B24608B526450A27261 +:10953000E401040BB502040B242D89138418C94AD5 +:109540007B03070A8464C94A7B031C2AB502040B07 +:10955000A43485138408C54A0801150B8458C54AEC +:1095600084001B0B8400150B5500094AB502080A3C +:10957000BB00042AB502024ABC00040AB502030B70 +:10958000C3B790522386A472C301030BB502030B29 +:10959000032D88136318C84A7B03060A6364C84A0C +:1095A0007B031C2AB502030B833484136308C44A6B +:1095B000E700150B6358C44A63001B0B6300150BCF +:1095C0003501084AB502070A9B00032AB502094A79 +:1095D0009C00030AB502020B62B88F5282A1AA72E4 +:1095E000A201020BB502020BE22C87134218C74AF4 +:1095F0007B03050A4264C74A7B031C2AB502020B9F +:10960000623483134208C34AC600150B4258C34A4A +:1096100042001B0B4200150B1501074AB502060A52 +:109620007B00022AB502084A7C00020AB502090B37 +:1096300089AE8B52C957AE726901090BB502090B8D +:10964000C92C86132919C64A7B03040A2965C64A10 +:109650007B031C2AB502090B493482132909C24A2B +:10966000A500150B2959C24A29011B0B2901150B0D +:10967000F500064AB502050A5B00092AB502074A49 +:109680005C00090AB502080BC83F9652C81BB072AD +:109690004801080BB502080BA82C85130819C54A08 +:1096A0007B03030A0865C54A7B031C2AB502080B25 +:1096B000283589130809C94A8400150B0859C94A75 +:1096C00008011B0B0801150BD500054AB502040A59 +:1096D0003B01082AB502064A3C01080AB502070BFD +:1096E000E7D48052877BB3728701070BB502070B63 +:1096F000872C8413E718C44A7B03020AE764C44A30 +:109700007B031C2AB502070B07358813E708C84AF4 +:109710006300150BE758C84AE7001B0BE700150B61 +:10972000B500044AB502030A1B01072AB502054A1F +:109730001C01070AB502060B862E9E526633B872CC +:10974000C602060BB502060B662C8313C618C34A65 +:109750007B03090AC664C34A7B031C2AB502060BB5 +:10976000E6348713C608C74A4200150BC658C74AD5 +:10977000C6001B0B9B4D8C13C600150B154B981385 +:109780007B47CC4AB51ED84A7B2B4C4AB50E584A6B +:109790007503150BFB00062AB502170B9700034A49 +:1097A000F702020AFC00060AF702044A7B03080AD1 +:1097B000F702050B25388D526593BC72A502050B87 +:1097C000F702050B452C8213A518C24A7B031C2AFD +:1097D000A564C24A18030E0BF702050BC5348613A5 +:1097E000A508C64A2901170BA558C64AA5001B0B98 +:1097F000DB4E9613A500170B574B9A137B47D64A9F +:10980000F71EDA4A7B2B564AF70E5A4A7703170B94 +:10981000DB00052AF702180B7800024A1803090A30 +:10982000DC00050A1803034A7B03070A1803040B2C +:10983000C4F08852C4F7BD72E402040B1803040B91 +:10984000242D89138418C94A7B031C2A8464C94ABD +:109850005A030D0B1803040BA43485138408C54A5E +:109860000801180B8458C54A84001B0BBB4E951386 +:109870008400180B384B99137B47D54A181FD94AD7 +:109880007B2B554A180F594A7803180BBB00042A42 +:1098900018031A0B5A00094A5A03080ABC00040AA2 +:1098A0005A03024A7B03060A5A03030BC3B89352B6 +:1098B00023F8A1720303030B5A03030B032D881330 +:1098C0006318C84A7B031C2A6364C84A39030B0B1C +:1098D0005A03030B833484136308C44AE7001A0B4A +:1098E0006358C44A63001B0BFB4E971363001A0BAB +:1098F0009A4A94137B47D74A5A1FD44A7B2B574A1C +:109900005A0F544A7A031A0B9B00032A5A03190B65 +:109910003901084A3903070A9C00030A3903094A36 +:109920007B03050A3903020B823994528281A472A7 +:109930004203020B3903020BE22C87134218C74A79 +:109940007B031C2A4264C74A94020A0B3903020BA8 +:10995000623483134208C34AC600190B4258C34AF3 +:1099600042001B0B1B4F98134200190B794A9313AB +:109970007B47D84A391FD34A7B2B584A390F534A61 +:109980007903190B7B00022A3903140B1401074ACF +:109990009402060A7C00020A9402084A7B03040A25 +:1099A0009402090BE98D855229BDA5722903090B83 +:1099B0009402090BC92C86132919C64A7B031C2A59 +:1099C0002965C64A73020C0B9402090B49348213B1 +:1099D0002909C24AA500140B2959C24A29011B0BA7 +:1099E0005B4F9A132901140BD44B9E137B47DA4A21 +:1099F000941EDE4A7B2B5A4A940E5E4A7403140B63 +:109A00005B00092A9402130BF300064A7302050A4D +:109A10005C00090A7302074A7B03030A7302080BFE +:109A200048959052884EA9728802080B7302080B61 +:109A3000A82C85130819C54A7B031C2A0865C54A4A +:109A4000DE03160B7302080B283589130809C94A6F +:109A50008400130B0859C94A08011B0B3B4F99138B +:109A60000801130B334A91137B47D94A731ED14A1D +:109A70007B2B594A730E514A7303130B3B01082A7F +:109A800073021E0BDE00054ADE03040A3C01080ACD +:109A9000DE03064A7B03020ADE03070B873B95526F +:109AA0000796AB726702070BDE03070B872C841344 +:109AB000E718C44A7B031C2AE764C44ADE03070B89 +:109AC00007358813E708C84A63001E0BE758C84AE1 +:109AD000E7001B0BE7001E0B1E4A9013DE1FD04A47 +:109AE0001B01072ADE0F504A1C01070ADE03110B77 +:109AF000914E94133146D44A7B03090A312A544AC1 +:109B00007B031C2A3102150BDE03110BB100044A42 +:109B10003102030A3102054A3102060B461B9152FB +:109B200026DFAE72C603060B3102060B662C8313CA +:109B3000C618C34AC664C34A3102060BE63487130B +:109B4000C608C74A4200110BC658C74AC6001B0BBD +:109B5000C600110BF1498F13311ECF4AFB00062AB4 +:109B6000310E4F4AFC00060A3102100B704E93135F +:109B70001046D34A7B03080A102A534A7B031C2A47 +:109B80001002170B3102100B9000034A1002020A58 +:109B90001002044A1002050B452A8A52C507B37207 +:109BA0002502050B1002050B452C8213A518C24A8D +:109BB000A564C24A1002050BC5348613A508C64A1F +:109BC0002901100BA558C64AA5001B0BA500100BB8 +:109BD000D0498E13101ECE4ADB00052A100E4E4AC5 +:109BE000DC00050A10020F0BCF4F9E13EF45DE4A33 +:109BF0007B03070AEF295E4A7B031C2AEF01180B3F +:109C000010020F0B6F00024AEF01090AEF01034A2D +:109C1000EF01040BA4CD98522406B5720402040B84 +:109C2000EF01040B242D89138418C94A8464C94A9E +:109C3000EF01040BA43485138408C54A08010F0BF7 +:109C40008458C54A84001B0B84000F0BAF498D1349 +:109C5000EF1DCD4ABB00042AEF0D4D4ABC00040A9B +:109C6000EF010E0B2E4E9113CE45D14A7B03060A0F +:109C7000CE29514A7B031C2ACE011A0BEF010E0B91 +:109C80004E00094ACE01080ACE01024ACE01030B5A +:109C900003F984526300B672E301030BCE01030B98 +:109CA000032D88136318C84A6364C84ACE01030BA6 +:109CB000833484136308C44AE7000E0B6358C44A14 +:109CC00063001B0B63000E0B6E498B13CE1DCB4A3A +:109CD0009B00032ACE0D4B4A9C00030ACE010D0BBC +:109CE0000D4E9013AD45D04A7B03050AAD29504A6D +:109CF0007B031C2AAD01190BCE010D0B2D01084A67 +:109D0000AD01070AAD01094AAD01020BE2F88F521D +:109D100022EBB772C201020BAD01020BE22C8713DA +:109D20004218C74A4264C74AAD01020B623483132A +:109D30004208C34AC6000D0B4258C34A42001B0BDF +:109D40005B498A137B1FCA4A42000D0B7B0F4A4AAC +:109D5000ED4D8F137B030B0BAD45CF4A0B01074A2B +:109D6000AD294F4A6B01060AAD01140B6B01084A7D +:109D7000AD011B0B6B01090B697E815209DCB872C6 +:109D8000A901090B6B01090BC92C86132919C64AB5 +:109D90007B00022A2965C64A7C00020A6B01090B76 +:109DA000493482132909C24A7B03040A7B031C2A13 +:109DB0002959C24A29011B0BA5000B0B29010B0BCA +:109DC0008B498C136B1DCC4A5B00092A6B0D4C4AE6 +:109DD0005C00090A6B010A0BCA4D8E134A45CE4A34 +:109DE0007B03030A4A294E4A7B031C2A4A01130BB0 +:109DF0006B010A0BEA00064A4A01050A4A01074AB2 +:109E00004A01080BE8289252E8B4BA726801080BBC +:109E10004A01080BA82C85130819C54A0865C54ACC +:109E20004A01080B283589130809C94A84000A0B1E +:109E30000859C94A08011B0B08010A0BCA4A9613A4 +:109E40004A1DD64A3B01082A4A0D564A3C01080AD7 +:109E50004A010C0BAC4D8D138C45CD4A7B03020A95 +:109E60008C294D4A7B031C2A8C011E0B4A010C0BCA +:109E7000CC00054A8C01040A8C01064A8C01070BB0 +:109E8000276A8C5247D9A0724701070B8C01070B38 +:109E9000872C8413E718C44AE764C44A8C01070B73 +:109EA00007358813E708C84A63000C0BE758C84A0F +:109EB000E7001B0BE7000C0BAC4A95138C1DD54A31 +:109EC0001B01072A8C0D554A1C01070A8C01160B31 +:109ED000764D8B13D646CB4A7B03090AD62A4B4ACA +:109EE0007B031C2AD602110B8C01160BB600044A08 +:109EF000D602030AD602054AD602060BE62C855284 +:109F00002685A2728601060BD602060B662C8313E9 +:109F1000C618C34AC664C34AD602060BE634871382 +:109F2000C608C74A4200160BC658C74AC6001B0BD4 +:109F3000C600160BF64A9713D61ED74AFB00062A10 +:109F4000D60E574AFC00060AD602150B554D8A1349 +:109F5000B546CA4A7B03080AB52A4A4A7B031C2A2B +:109F6000B502100BD602150B9500034AB502020A82 +:109F7000B502044AB502050BA5508152E5F6A4725C +:109F8000C502050BB502050B452C8213A518C24A64 +:109F9000A564C24AB502050BC5348613A508C64A96 +:109FA0002901150BA558C64AA5001B0BA500150BCA +:109FB000154B9813B51ED84ADB00052AB50E584A32 +:109FC000DC00050AB502170B974D8C13F746CC4AF7 +:109FD0007B03070AF72A4C4A7B031C2AF7020F0B64 +:109FE000B502170B7700024AF702090AF702034A83 +:109FF000F702040B0427845264C3A572A402040B65 +:10A00000F702040B242D89138418C94A8464C94AB1 +:10A01000F702040BA43485138408C54A0801170B02 +:10A020008458C54A84001B0B8400170B574B9A13A6 +:10A03000F71EDA4ABB00042AF70E5A4ABC00040A8B +:10A04000F702180BD84E96131847D64A7B03060A18 +:10A05000182B564A7B031C2A18030E0BF702180B09 +:10A060005800094A1803080A1803024A1803030B88 +:10A0700083BF8D5283A5A972E302030B1803030B60 +:10A08000032D88136318C84A6364C84A1803030B76 +:10A09000833484136308C44AE700180B6358C44A26 +:10A0A00063001B0B6300180B384B9913181FD94A18 +:10A0B0009B00032A180F594A9C00030A18031A0B25 +:10A0C000BA4E95135A47D54A7B03050A5A2B554A6F +:10A0D0007B031C2A5A030D0B18031A0B3A01084A7A +:10A0E0005A03070A5A03094A5A03020B62A2815211 +:10A0F0000267AA720203020B5A03020BE22C8713B7 +:10A100004218C74A4264C74A5A03020B6234831397 +:10A110004208C34AC6001A0B4258C34A42001B0BEE +:10A1200042001A0B9A4A94135A1FD44A7B00022AFF +:10A130005A0F544A7C00020A5A03190BF94E97131E +:10A140003947D74A7B03040A392B574A7B031C2A19 +:10A1500039030B0B5A03190B1901074A3903060A75 +:10A160003903084A3903090B896A8E5249A1AC7236 +:10A170004903090B3903090BC92C86132919C64A4F +:10A180002965C64A3903090B493482132909C24A91 +:10A19000A500190B2959C24A29011B0B2901190BCA +:10A1A000794A9313391FD34A5B00092A390F534A5E +:10A1B0005C00090A3903140B144F98139446D84ACB +:10A1C0007B03030A942A584A7B031C2A94020A0B35 +:10A1D0003903140BF400064A9402050A9402074A54 +:10A1E0009402080B6857815248CDAE722803080BC1 +:10A1F0009402080BA82C85130819C54A0865C54A9E +:10A200009402080B283589130809C94A8400140BE5 +:10A210000859C94A08011B0B0801140BD44B9E13A3 +:10A22000941EDE4A3B01082A940E5E4A3C01080A4D +:10A230009402130B534F9A137346DA4A7B03020AB4 +:10A24000732A5A4A7B031C2A73020C0B9402130BC9 +:10A25000D300054A7302040A7302064A7302070B0D +:10A26000C72599524738B0728702070B7302070B54 +:10A27000872C8413E718C44AE764C44A7302070BA7 +:10A2800007358813E708C84A6300130BE758C84A24 +:10A29000E7001B0B3B4F9913E700130B334A911355 +:10A2A000731ED14A7B47D94A730E514A7B2B594AB8 +:10A2B00073021E0BBE00044ADE03030A7B03160B67 +:10A2C000DE03054A73021B0BDE03060BA6908552C4 +:10A2D000464EB2726602060BDE03060B662C831333 +:10A2E000C618C34A1B01072AC664C34A1C01070AD1 +:10A2F000DE03060BE6348713C608C74A7B03090A48 +:10A300007B031C2AC658C74AC6001B0B42001E0B03 +:10A31000C6001E0B1E4A9013DE1FD04AFB00062A01 +:10A32000DE0F504AFC00060ADE03110B914E941317 +:10A330003146D44A7B03080A312A544A7B031C2A3B +:10A340003102150BDE03110B9100034A3102020AA0 +:10A350003102044A3102050B25149D52E557B472AF +:10A36000C503050B3102050B452C8213A518C24A03 +:10A37000A564C24A3102050BC5348613A508C64A36 +:10A380002901110BA558C64AA5001B0BFB498F13C9 +:10A390007B1FCF4AA500110B7B0F4F4A714E9313C1 +:10A3A0007B03100B3146D34A7000024A312A534ACC +:10A3B0001002090A3102170B1002034A31021B0B6B +:10A3C0001002040B64C98C524403B5722402040BBE +:10A3D0001002040B242D89138418C94ADB00052AB6 +:10A3E0008464C94ADC00050A1002040BA4348513F6 +:10A3F0008408C54A7B03070A7B031C2A8458C54A84 +:10A4000084001B0B0801100B8400100BD0498E1325 +:10A41000101ECE4ABB00042A100E4E4ABC00040A8D +:10A4200010020F0BCF4F9E13EF45DE4A7B03060A47 +:10A43000EF295E4A7B031C2AEF01180B10020F0B59 +:10A440004F00094AEF01080AEF01024AEF01030B2E +:10A45000036E91526349B8720302030BEF01030BC1 +:10A46000032D88136318C84A6364C84AEF01030BBD +:10A47000833484136308C44AE7000F0B6358C44A4B +:10A4800063001B0B63000F0BAF498D13EF1DCD4A0B +:10A490009B00032AEF0D4D4A9C00030AEF010E0BAF +:10A4A0002E4E9113CE45D14A7B03050ACE29514A3F +:10A4B0007B031C2ACE011A0BEF010E0B2E01084A5A +:10A4C000CE01070ACE01094ACE01020B62348A523C +:10A4D00082EDB872E201020BCE01020BE22C87136F +:10A4E0004218C74A4264C74ACE01020B6234831342 +:10A4F0004208C34AC6000E0B4258C34A42001B0B17 +:10A5000042000E0B6E498B13CE1DCB4A7B00022AF4 +:10A51000CE0D4B4A7C00020ACE010D0B0D4E90135E +:10A52000AD45D04A7B03040AAD29504A7B031C2A5F +:10A53000AD01190BCE010D0B0D01074AAD01060A45 +:10A54000AD01084AAD01090B29039D524932BA7287 +:10A55000C901090BAD01090BC92C86132919C64A7B +:10A560002965C64AAD01090B493482132909C24A3B +:10A57000A5000D0B2959C24A29011B0B29010D0BFE +:10A580004D498A13AD1DCA4A5B00092AAD0D4A4ADE +:10A590005C00090AAD010B0BEB4D8F136B45CF4AE5 +:10A5A0007B03030A6B294F4A7B031C2A6B01140BA4 +:10A5B000AD010B0BEB00064A6B01050A6B01074A64 +:10A5C0006B01080B88C4805228D3BA72A801080B0B +:10A5D0006B01080BA82C85130819C54A0865C54AE4 +:10A5E0006B01080B283589130809C94A84000B0B35 +:10A5F0000859C94A08011B0B08010B0B8B498C1326 +:10A600006B1DCC4A3B01082A6B0D4C4A3C01080AE1 +:10A610006B010A0BCA4D8E134A45CE4A7B03020AD0 +:10A620004A294E4A7B031C2A4A01130B6B010A0B71 +:10A63000CA00054A4A01040A4A01064A4A01070BB0 +:10A64000A7B08652C781BE726701070B4A01070B8C +:10A65000872C8413E718C44AE764C44A4A01070BED +:10A6600007358813E708C84A63000A0BE758C84A49 +:10A67000E7001B0BE7000A0BCA4A96134A1DD64A8D +:10A680001B01072A4A0D564A1C01070A4A010C0BF6 +:10A69000AC4D8D138C45CD4A7B03090A8C294D4A5C +:10A6A0007B031C2A8C011E0B4A010C0BAC00044AD4 +:10A6B0008C01030A8C01054A8C01060B060E94528C +:10A6C000460DA2724601060B8C01060B662C831305 +:10A6D000C618C34AC664C34A8C01060BE634871306 +:10A6E000C608C74A42000C0BC658C74AC6001B0B17 +:10A6F000C6000C0BAC4A95138C1DD54AFB00062AEC +:10A700008C0D554AFC00060A8C01160B764D8B13F6 +:10A71000D646CB4A7B03080AD62A4B4A7B031C2A1F +:10A72000D602110B8C01160B9600034AD602020AC0 +:10A73000D602044AD602050BC52298528534A3726C +:10A740008501050BD602050B452C8213A518C24ABC +:10A75000A564C24AD602050BC5348613A508C64AAD +:10A760002901160BA558C64AA5001B0BA500160B00 +:10A77000F64A9713D61ED74ADB00052AD60E574A4B +:10A78000DC00050AD602150B554D8A13B546CA4A98 +:10A790007B03070AB52A4A4A7B031C2AB502100B21 +:10A7A000D602150B7500024AB502090AB502034A22 +:10A7B000B502040B04818D52E4C6A372C402040BDB +:10A7C000B502040B242D89138418C94A8464C94A2C +:10A7D000B502040BA43485138408C54A0801150B7F +:10A7E0008458C54A84001B0B8400150B154B981325 +:10A7F000B51ED84ABB00042AB50E584ABC00040A4C +:10A80000B502170B974D8C13F746CC4A7B03060A0B +:10A81000F72A4C4A7B031C2AF7020F0BB502170BD1 +:10A820005700094AF702080AF702024AF702030B27 +:10A8300083E98E5203E9A472A302030BF702030B10 +:10A84000032D88136318C84A6364C84AF702030BD0 +:10A85000833484136308C44AE700170B6358C44A5F +:10A8600063001B0B6300170B574B9A13F71EDA4A52 +:10A870009B00032AF70E5A4A9C00030AF702180BA2 +:10A88000D84E96131847D64A7B03050A182B564A0A +:10A890007B031C2A18030E0BF702180B3801084A19 +:10A8A0001803070A1803094A1803020BA2969752C5 +:10A8B0000296A672E202020B1803020BE22C871327 +:10A8C0004218C74A4264C74A1803020B6234831312 +:10A8D0004208C34AC600180B4258C34A42001B0B29 +:10A8E0004200180B384B9913181FD94A7B00022AD3 +:10A8F000180F594A7C00020A18031A0BBA4E951316 +:10A900005A47D54A7B03040A5A2B554A7B031C2A13 +:10A910005A030D0B18031A0B1A01074A5A03060AA9 +:10A920005A03084A5A03090B699681528923A77270 +:10A930000903090B5A03090BC92C86132919C64AA6 +:10A940002965C64A5A03090BA9001A0B453482131C +:10A95000A508C24AA558C24AA5001B0BA5001A0BA0 +:10A960009A4A94135A1FD44A5B00052A5A0F544A34 +:10A970005C00050A5903190BFA4E97135A47D74A38 +:10A980007B03030A5A2B574A7B031C2A5A030B0BDF +:10A9900039031A0BFA00064A5A03090A5A03074AEE +:10A9A0005A03080B4849955208DBA9722803080B83 +:10A9B0005A03080B282D89130819C94A0865C94A82 +:10A9C0005A03080B88001A0BA43485138408C54A5F +:10A9D0008458C54A84001B0B1B4F981384001A0B24 +:10A9E0007A4A93135A1FD34A7B47D84A5A0F534A7D +:10A9F0007B2B584A7B030A0B5A03140B74031A0B64 +:10AA0000DA00094A5A03080ABB00042A5A03064A14 +:10AA1000BC00040A4703070BFA4999529A73AB72B8 +:10AA20009A021A0BE7001A0B1A2D88135A1BC84AF0 +:10AA30007B03020A5A67C84A7B031C2AE7001A0BE9 +:10AA40007A00070B833484136308C44A6358C44AEA +:10AA500063001B0B6300070BC74B9E13E71CDE4A0A +:10AA60009B00032AE70C5E4A9C00030AE700130BD5 +:10AA7000334F99137346D94A7B03050A732A594AFF +:10AA80007B031C2A73020C0BE700130B3301084AEB +:10AA900073021A0A7302094A7302060B66FE8D528C +:10AAA000C605AD72E600060B7302060B462F9A131D +:10AAB000C618DA4AC664DA4A7302060B4600130B5C +:10AAC000623483134208C34A4258C34A42001B0BF4 +:10AAD0009B4E94137B47D44A4200130B7B2B544A62 +:10AAE000334A91137B03160B731ED14A16011A4A7F +:10AAF000730E514AD602060A73021E0BD602084A8A +:10AB000073021B0BD602090BC95D9052E991AE721C +:10AB10006902090BD602090BC92C86132919C64AEA +:10AB20007B00022A2965C64A7C00020AD602090B6C +:10AB3000493482132909C24A7B03040A2959C24AAB +:10AB40007B031C2A29011B0BA500160B2901160BE0 +:10AB5000164A9013D61ED04A5B00090AD60E504AF8 +:10AB6000D102110BF64C8713D646C74AD62A474A5C +:10AB7000D602150B5503064AB502050A3102160B1B +:10AB8000B5021A4A5600092AB502080BE86D8C5224 +:10AB9000A814AF722802080BB502080BA82C851365 +:10ABA0000819C54AD602030A0865C54AD6021B2AF7 +:10ABB000B502080B283589130809C94A8400150B0A +:10ABC0000859C94A0801160BD600054A0801150B99 +:10ABD000F5498F13B51ECF4AD602040AB50E4F4A67 +:10ABE000D602064AB502100B704E93131046D34A94 +:10ABF000D6021A0B102A534A3A01080A1002170B00 +:10AC00003701082AB502100B90028F521099B072CA +:10AC1000B002100BD602100B902C8413101AC44AE9 +:10AC2000F702020A1066C44AF7021A2AD602100B6B +:10AC300010358813100AC84A6300160B105AC84A08 +:10AC40001002170B1002160BD6498E13D61ECE4AD1 +:10AC50001701100AD60E4E4ACF020F0B364E911333 +:10AC6000D646D14AD12A514A1601102A3102180B70 +:10AC7000D602090AEF01110BB100044A3102030A9E +:10AC8000D602172A3102054A3102060B06418052CC +:10AC9000E698B172E601060B3102060B662C8313AF +:10ACA000C618C34AC664C34A3102060B063690135F +:10ACB000C608D04A4200110BC658D04AC600160B2F +:10ACC000C600110BB1498D13311ECD4A1602060A7A +:10ACD000310E4D4A2E020E0BB14E95133146D54A18 +:10ACE000352A554A9100034A3102020AB502190B6E +:10ACF0003102044ACE01150B3102050B45FF9F526C +:10AD0000C517B272C501050B3102050B452C821324 +:10AD1000A518C24A1502062AA564C24AB502080A45 +:10AD20003102050BC5348613A508C64AB502162A9A +:10AD3000A558C64A2901110BA500150BA500110B3A +:10AD400071498B13311ECB4A310E4B4A2D020D0B2C +:10AD5000F14D8F133146CF4A2F2A4F4AD100052A91 +:10AD6000EF01140B3102100AAD010F0B6F00024A04 +:10AD7000EF01090AD400050AEF01034A3102142A3F +:10AD8000EF01040B649D8D52048AB472A401040B7C +:10AD9000EF01040B242D89138418C94A8464C94A1D +:10ADA000EF01040BA43485138408C54A08010F0B76 +:10ADB0008458C54A8400110B84000F0B4F498A1335 +:10ADC000EF1DCA4AEF0D4A4AE701070BEF7E945286 +:10ADD0002FDFB7726B010F0BEB000B0BC74D8E1300 +:10ADE000E744CE4AEE284E4A4700094ACE01030BFB +:10ADF000032D88136318C84AE700080AE700024ACF +:10AE00006364C84A6300070B6E010E0BCE01030B8F +:10AE1000A700042AE700060A833484136308C44A9F +:10AE2000AB00040AE7000B2A6358C44A6300070B0F +:10AE300087498C13E71CCC4A10020E0BEC0C4C4AD1 +:10AE4000471E8F5227CEB8724A01070B8C01130B95 +:10AE5000A74D8D13E744CD4A63000E0BED284D4AF4 +:10AE60002701084AAD01020B022E90134218D04A66 +:10AE7000E700100A8A010A0BE700094A4264D04A37 +:10AE80004D010D0B4200070B67348313AD01020B1C +:10AE90008200032AE708C34A4200050A8A00030A1F +:10AEA000E758C34A42000A2AE200020B070840B9E9 +:10AEB000E7000D0B4200070B020800B9020C40B975 +:10AEC0004200030B020C00B9021040B94200040B0F +:10AED000021000B9021440B94200050B021400B977 +:10AEE000021840B94200060B42000D0B021800B9CF +:10AEF000021C40B94200100B021C00B9022040B9EC +:10AF00004200080B022000B9022440B94200090B9C +:10AF1000022400B914F8FF17FD7BBCA9FD030091C2 +:10AF2000F35301A9F40300AAF303022AF55B02A973 +:10AF3000F60301AAF76303A917088052000040B97D +:10AF4000151400120000022B800200B9F702154B05 +:10AF500083000054800640B900040011800600B947 +:10AF6000BF020071E212537AE8010054E10316AA0D +:10AF700073020151D602178B98A20091E003152AA3 +:10AF8000B302130B15008052E20317AA0003008BD3 +:10AF9000F9090094E10318AAE00314AA22008052E0 +:10AFA000E7F7FF97627E0653E10316AAE00314AAAF +:10AFB000E3F7FF97621600728001005473667A927D +:10AFC00094A20091E003152AC102138B8002008B2A +:10AFD00042144092F35341A9F55B42A9F76343A998 +:10AFE000FD7BC4A8E4090014F35341A9F55B42A911 +:10AFF000F76343A9FD7BC4A8C0035FD642000034B9 +:10B00000C6FFFF17C0035FD6FD7BBDA903078052B3 +:10B01000FD030091F35301A9F40301AAF30300AA6D +:10B0200001084029427481134208C05AE22B00B93A +:10B0300022701D53211400126300014B3FDC00718C +:10B040004208C05AE22F00B9020F80524200014B61 +:10B050004280831AA10000F021200891E8FFFF97A9 +:10B06000E1A30091E00313AA02018052ABFFFF9716 +:10B07000602E403980020039601640798006003920 +:10B08000600A40B9007C0853800A0039600A40B960 +:10B09000800E0039603E403980120039601E4079D0 +:10B0A00080160039600E40B9007C0853801A0039C0 +:10B0B000600E40B9801E0039604E40398022003950 +:10B0C0006026407980260039601240B9007C085320 +:10B0D000802A0039601240B9802E0039605E403904 +:10B0E00080320039602E407980360039601640B9D0 +:10B0F000007C0853803A0039601640B9803E003920 +:10B10000606E4039804200396036407980460039AF +:10B11000601A40B9007C0853804A0039601A40B96F +:10B12000804E0039607E403980520039603E40795F +:10B1300080560039601E40B9007C0853805A00399F +:10B14000601E40B9805E0039608E403980620039EF +:10B150006046407980660039602240B9007C08531F +:10B16000806A0039602240B9806E0039609E4039A3 +:10B1700080720039604E407980760039602640B98F +:10B18000007C0853807A0039602640B9807E0039FF +:10B19000F35341A9FD7BC3A8C0035FD6FD7BB5A9CE +:10B1A000FD030091F35301A9F30300AA7442218B1C +:10B1B000E0230191F55B02A9F603032AF71B00F9CE +:10B1C000F70302AA44F7FF977F0214EB2301005410 +:10B1D000E10317AAE02301918CFFFF97F35341A9E4 +:10B1E000F55B42A9F71B40F9FD7BCBA8C0035FD6F6 +:10B1F000950213CBE10313AADF02156BE023019143 +:10B20000D532951AE203152A73C2358B7CFFFF975E +:10B2100052EDFF97EDFFFF17010040B900BA8152D0 +:10B22000C0BFBD723F00006B0001801200109F1A6A +:10B23000C0035FD68101F8372200022B420100547F +:10B24000032440B96308C05A5F00036BC800005470 +:10B25000020840B94208C05A41C0218B0000018B4E +:10B26000C0035FD6000080D2FEFFFF17FD7BBFA9A1 +:10B27000E70302AAE2008012FD030091E20000B998 +:10B28000E503012AE80300AA82008052EAFFFF9743 +:10B29000060040B940018012E00000B9C608C05A5B +:10B2A000C10400513F200071E8030054800000D029 +:10B2B000A4100011003008910048613861000010AE +:10B2C0002088208B00001FD6E103042A2200805230 +:10B2D000E00308AA8400020BD7FFFF97600000B4C8 +:10B2E0000000403920FFFF35840C001184741E12C9 +:10B2F000E40000B9E003062AFD7BC1A8C0035FD6C5 +:10B30000E103042AE00308AA82008052CAFFFF97E3 +:10B31000040040B9A53000118408C05AA400040BF1 +:10B32000F2FFFF1726018052F3FFFF17FD7BBEA936 +:10B33000FD030091E11F00B98100F8366000801222 +:10B34000FD7BC2A8C0035FD6E203012A5F0440F27E +:10B3500061FFFF54E2730091C5FFFF971F04007166 +:10B36000E1FEFF54E01F40B9F6FFFF17FD7BBEA9C9 +:10B37000FD030091E11F00B98100F83660008012E2 +:10B38000FD7BC2A8C0035FD6E203012A5F0440F23E +:10B3900061FFFF54E2730091B5FFFF971F0C00712E +:10B3A000E1FEFF54E01F40B9F6FFFF17FD7BBEA989 +:10B3B000EB0300AAEA0302AAFD030091FF1F00B9F4 +:10B3C000A100F837DAFFFF97E01F00B9E903002A70 +:10B3D0000002F837E91F40B9E2730091E0030BAABD +:10B3E000E103092AA2FFFF971F08007180010054A2 +:10B3F0001F240071200200541F040071C1FEFF547D +:10B400008A0000B4400140B900040011400100B9B5 +:10B41000E003092AFD7BC2A8C0035FD6CAFDFFB4C2 +:10B42000410140B921040051410100B941FDFF36FD +:10B43000E91F40B9F7FFFF17E91F40B9C900F83607 +:10B440003F21003161FEFF545F0100F129119F5A35 +:10B45000F0FFFF1709008012EEFFFF17FD7BBEA96A +:10B46000FD030091E2730091FF1F00B9D0FFFF9729 +:10B47000C000F837E11F40B93F04007100009F5A37 +:10B48000FD7BC2A8C0035FD600008012FDFFFF173E +:10B49000FD7BBEA9EC0300AA20008052FD030091B1 +:10B4A000E01F00B9E2730091E0030CAAC0FFFF9710 +:10B4B000E103002A2001F837E01F40B91F000071A6 +:10B4C000CD0000541F040071E1FEFF54E003012A87 +:10B4D000FD7BC2A8C0035FD601008012FCFFFF17EE +:10B4E000FD7BBDA9FD030091F35301A9F30300AA5D +:10B4F000347C4093E00302AAF55B02A9F50302AA9B +:10B500004D0800940004001194C220CB167C409397 +:10B510007402148B7F0214EBE9000054130080D2F4 +:10B52000E00313AAF35341A9F55B42A9FD7BC3A82D +:10B53000C0035FD6E20316AAE10315AAE00313AA2B +:10B54000C0080094E0FEFF3473060091F2FFFF177D +:10B55000021040B94208C05A41D0218B0000018B33 +:10B56000C0035FD6030840B96308C05A61C0218B8D +:10B570000000018B820000B4010440B92108C05AC8 +:10B58000410000B9C0035FD6FD7BBDA9FD0300915A +:10B59000F35301A9F40300AAF303012AE2B30091D3 +:10B5A000E103132AE00314AA31FFFF971F0C007177 +:10B5B000E0000054F32F40B91F2400710101005432 +:10B5C0007F0200714001801273B2801AE003132AD7 +:10B5D000F35341A9FD7BC3A8C0035FD61F100071C0 +:10B5E000E0FDFF5413008012F9FFFF17FD7BBEA999 +:10B5F000FD030091F35301A9F40302AA020C40B920 +:10B600004208C05A41C0218B1300018B940000B442 +:10B61000E00313AA08080094800200B9E00313AA0B +:10B62000F35341A9FD7BC2A8C0035FD6020080D2BC +:10B63000EFFFFF17FD7BBFA9E40302AAFD03009102 +:10B64000C4FFFF97010040F9FD7BC1A8210CC0DABF +:10B65000810000F9000440F9000CC0DA600000F934 +:10B6600000008052C0035FD6E40300AAFD7BBFA99F +:10B6700003008052FD030091E103032AE00304AAC2 +:10B68000B4FFFF97A00000B5E3008012E003032A97 +:10B69000FD7BC1A8C0035FD6000440F980FFFFB462 +:10B6A00063040011F5FFFF17FD7BBEA9FD030091A8 +:10B6B000F35301A9F40302AA020840B94208C05A90 +:10B6C00041C0218B0000018B13100091940000B445 +:10B6D000E00313AAD8070094800200B9E00313AA7C +:10B6E000F35341A9FD7BC2A8C0035FD6FD7BBBA974 +:10B6F000FD030091F35301A9F303012A747C4093E5 +:10B70000F55B02A9F60300AAF71B00F9F70302AAEA +:10B71000FF4B00B9E04B40B90100132A2101F83674 +:10B720001F00007173A29F5AE003132AF35341A92B +:10B73000F55B42A9F71B40F9FD7BC5A8C0035FD6A6 +:10B740001F040071A1020054E2330191E103132AA6 +:10B75000E00316AAD5FFFF97F50300AAE00100B4A5 +:10B76000E20314AAE10317AA360800946001003529 +:10B77000A06A7438A0FDFF34E20314AAE00317AAFC +:10B78000010880523B080094800000B5A06A74381C +:10B790001F000171A0FCFF54E103132AE223019171 +:10B7A000E00316AA02FFFF97F303002ADAFFFF1750 +:10B7B000FD7BBDA9FD030091F35301A9F40300AA89 +:10B7C000F30302AAE00302AAF51300F9F503012A24 +:10B7D00099070094E20313AAE303002AE103152A60 +:10B7E000E00314AAF35341A9F51340F9FD7BC3A864 +:10B7F000BFFFFF17FD7BBEA9FD030091F30B00F90E +:10B80000F30300AACAFEFF97C000F837E103002A3D +:10B81000E00313AAF30B40F9FD7BC2A85BFFFF17FF +:10B82000F30B40F9FD7BC2A8C0035FD6FD7BBEA928 +:10B83000FD030091F30B00F9F30300AACCFEFF9780 +:10B84000C000F837E103002AE00313AAF30B40F924 +:10B85000FD7BC2A84DFFFF17F30B40F9FD7BC2A88B +:10B86000C0035FD6FD7BBAA9FD030091F96B04A963 +:10B870007A7C4093F90302AAF35301A9F55B02A96C +:10B88000F60300AAF50304AAF76303A9F7031AAAAB +:10B89000F80305AAD8FFFF97F303002AA000F836A3 +:10B8A000550000B4A00200B9140080D219000014A1 +:10B8B000E20315AAE103132AE00316AA2AFFFF9761 +:10B8C000F40300AAE2730191E00316AA810A40B9C9 +:10B8D0002108C05A46FFFF97A00000B5E103132AD4 +:10B8E000E00316AAD2FFFF97ECFFFF17E15F40B914 +:10B8F000FF02016B41FFFF54E2031AAAE10319AAF8 +:10B90000D0070094C0FEFF35580000B4130300B9FF +:10B91000E00314AAF35341A9F55B42A9F76343A9D5 +:10B92000F96B44A9FD7BC6A8C0035FD60EFFFF17C5 +:10B93000050080D2CCFFFF17FD7BBDA9FD03009160 +:10B94000F35301A9F40300AAF30302AAE00302AA35 +:10B95000F55B02A9F60303AAF503012A3607009452 +:10B96000E40316AAE303002AE20313AAE103152A5B +:10B97000E00314AAF35341A9F55B42A9FD7BC3A8D8 +:10B98000ECFFFF17FD7BBEA9FD030091E57300915D +:10B99000B5FFFF97400000B400300091FD7BC2A8C6 +:10B9A000C0035FD6FD7BBEA9E40300AAFD0300919E +:10B9B000F35301A9F40302AAE20303AAEAFEFF97E4 +:10B9C000F30300AA000100B4D40000B4610A40B936 +:10B9D000E00304AA2108C05A15FFFF97800200F96E +:10B9E00073320091E00313AAF35341A9FD7BC2A86F +:10B9F000C0035FD6FD7BBDA9FD030091F35301A9F0 +:10BA0000F40300AAF30302AAE00302AAF55B02A969 +:10BA1000F60303AAF503012A07070094E40316AA14 +:10BA2000E303002AE20313AAE103152AE00314AAA0 +:10BA3000F35341A9F55B42A9FD7BC3A8D2FFFF17D1 +:10BA4000FD7BBDA9A2000090425C1591FD03009111 +:10BA5000E3B30091F35301A9F30300AAF403012A0D +:10BA6000E5FFFF97800000B4E12F40B93F1000715F +:10BA700060010054A2000090E3B30091424415918C +:10BA8000E103142AE00313AADBFFFF97200100B4AF +:10BA9000E12F40B93F100071C1000054000040B9CF +:10BAA0000008C05AF35341A9FD7BC3A8C0035FD669 +:10BAB00000008052FCFFFF17FD7BBDA9FD03009134 +:10BAC000F35301A9F40301AAF30300AAA100009013 +:10BAD00021201591F51300F9F503022A4C0000947A +:10BAE0004001F837E103002AE303152AE20314AA10 +:10BAF000E00313AAF35341A9040080D2F51340F9DF +:10BB0000FD7BC3A8A0FFFF17000080D2F35341A91B +:10BB1000F51340F9FD7BC3A8C0035FD6FD7BBCA92C +:10BB2000427C4093FD030091F35301A9F30301AA62 +:10BB3000F55B02A935C0228BF71B00F9F70300AAB9 +:10BB4000200040391FBC0071A0050054E10580525F +:10BB5000E00313AA470700941F0000F11610959AFE +:10BB6000E10313AAC202134BE00317AAD3FFFF9706 +:10BB7000E10300AA800400B4E00317AAF30316AAA5 +:10BB800023000094F403002A7F0215EBC202005444 +:10BB9000F60313AAC00240391FBC0071E001005433 +:10BBA000A20216CBE1058052E00316AA31070094E9 +:10BBB0001F0000F1E103142A1310959AE20316AA5C +:10BBC0006302164BE00317AAC9FEFF97F403002A8D +:10BBD000C0FDFF3604000014D6060091BF0216EB2C +:10BBE000A1FDFF54E003142AF35341A9F55B42A9D8 +:10BBF000F71B40F9FD7BC4A8C0035FD61400805238 +:10BC0000E2FFFF1794008012F7FFFF17FD7BBEA92C +:10BC1000FD030091F35301A9F40300AAF30301AA61 +:10BC2000E00301AA84060094E10313AAE203002AB8 +:10BC3000E00314AAF35341A9FD7BC2A8B8FFFF1784 +:10BC40002201F83600008012C0035FD60000801287 +:10BC5000F35341A9F55B42A9F71B40F9FD7BC5A849 +:10BC6000C0035FD6FD7BBBA9FD030091F35301A97F +:10BC7000F403012AF303022AF55B02A9F50303AAE0 +:10BC800096018012F71B00F9F70300AA000080520A +:10BC9000FF4F00B91F00007100A0547AACFDFF54A3 +:10BCA000E14F40B93F00136BD612801A1F00146B8E +:10BCB000E1000054550000B4A10200B93F00136B2D +:10BCC0006BFCFF54E003162AE2FFFF17E103002A92 +:10BCD000E2330191E00317AAB5FDFF97EEFFFF17CE +:10BCE000FD7BBEA902008052FD030091E373009129 +:10BCF000D4FFFF9740000035E01F40B9FD7BC2A88C +:10BD0000C0035FD6FD7BBEA9FD030091F35301A9DB +:10BD1000F30300AAF403012AF2FFFF970001F837AA +:10BD200002040051E103142AE00313AA030080D2A5 +:10BD3000F35341A9FD7BC2A8C2FFFF17F35341A9EA +:10BD4000FD7BC2A8C0035FD6FD7BBBA9FD030091AC +:10BD5000F76303A9987C4093F70303AAF35301A95F +:10BD6000F40300AAF55B02A9F50318AAF60302AAD8 +:10BD7000020080D28EFDFF97F303002AE000F83620 +:10BD8000E003132AF35341A9F55B42A9F76343A9E2 +:10BD9000FD7BC5A8C0035FD6E3330191E20316AA79 +:10BDA000E103132AE00314AA13FFFF97A00000B5D4 +:10BDB000E103132AE00314AA020080D2EEFFFF176A +:10BDC000E14F40B93F00156B41FFFF54E20318AA51 +:10BDD000E10317AA9B060094C0FEFF35E9FFFF1799 +:10BDE000FD7BBDA9FD030091F35301A9F51300F9F3 +:10BDF000F503012A210400513F0C0031A802005430 +:10BE0000F40300AA020080D20100801268FDFF97AF +:10BE1000F303002AC000F836E003132AF35341A9C4 +:10BE2000F51340F9FD7BC3A8C0035FD6E103132AD5 +:10BE3000E00314AA03FFFF971F00156BE0FEFF54F9 +:10BE4000E103132AE00314AA020080D2F0FFFF17D7 +:10BE5000B3008012F1FFFF17FD7BBCA9FD03009129 +:10BE6000F35301A9F40300AAF303012AE00302AA91 +:10BE7000F55B02A9F71B00F9F70302AAEE0500948F +:10BE800015040011F603002AB57E40937F02166B5D +:10BE90006B010054E20315AAE10314AAE00317AAF8 +:10BEA0006806009420020034627E4093E00314AAE6 +:10BEB000010080526F060094E00000B5000080523F +:10BEC000F35341A9F55B42A9F71B40F9FD7BC4A8D8 +:10BED000C0035FD6140014CB730600517302144BD9 +:10BEE00014040091EAFFFF1720008052F5FFFF17AE +:10BEF000FD7BBCA9FD030091F35301A9F40304AA3F +:10BF0000F55B02A9F603032AE3F30091BAFEFF975B +:10BF1000F30300AAE00000B5740000B5130080D25E +:10BF200019000014E03F40B9800200B91600001467 +:10BF3000F53F80B91500158B7F0215EB8300005487 +:10BF4000F4FEFFB4000080120B000014A10213CB1A +:10BF5000E00313AACF05009401040011E13F00B9EA +:10BF600061C2218B3F0015EBA900005494FDFFB482 +:10BF7000C0018012800200B9E9FFFF17F60000350A +:10BF800054FDFFB5E00313AAF35341A9F55B42A9A1 +:10BF9000FD7BC4A8C0035FD6D6060051F30301AAF7 +:10BFA000E6FFFF17FD7BBDA9FD030091E3B3009100 +:10BFB000F30B00F9F30302AAA2000090427C159152 +:10BFC0008DFEFF97A00000B5E02F40B9F30B40F9BC +:10BFD000FD7BC3A8C0035FD6E12F40B9E20313AADB +:10BFE0009EFFFF971F000071E0179F1AF8FFFF17D1 +:10BFF000FD7BBDA9FD030091F35301A9F40300AA41 +:10C00000F51300F9F50302AA020080D2E8FCFF97BD +:10C01000F303002AC000F836E003132AF35341A9C2 +:10C02000F51340F9FD7BC3A8C0035FD6E20315AA50 +:10C03000E103132AE00314AADBFFFF971F0400317A +:10C04000CB000054A0FEFF34E103132AE00314AA3E +:10C05000020080D2EEFFFF17F303002AEFFFFF1765 +:10C060001F0000718C010054C00100541F480031B2 +:10C07000CB000054E003004B8100009021E034919C +:10C0800020D860F8C00000B5800000F00074169160 +:10C0900003000014800000F000F01591C0035FD68B +:10C0A000800000F000481691FDFFFF17E50300AA8D +:10C0B000E00301AAA40C40B9A12040B98408C05AE9 +:10C0C0002108C05A8400010BA4C0248B4203F83716 +:10C0D00001C0228B487C40933F0004EBC80200540F +:10C0E0001F0005EB83020054637C4093660008CB7D +:10C0F0008600068BDF0005EBE3010054A70440B97E +:10C10000E708C05AA500078BDF0005EB8801005443 +:10C11000840000CBFD7BBFA9820008CBFD0300910A +:10C120000000038BAF05009400008052FD7BC1A886 +:10C13000C0035FD660008012C0035FD6400080124B +:10C14000C0035FD6FD7BBDA9FD030091F35301A998 +:10C15000F303032AF40300AA636C1C53F51300F9DC +:10C16000F503022A426C1C53D1FFFF978001003572 +:10C17000810A40B97302154B2108C05A2110130BD4 +:10C180002108C05A810A00B9810E40B92108C05A5D +:10C190003310130B730AC05A930E00B9F35341A91D +:10C1A000F51340F9FD7BC3A8C0035FD6FD7BBDA995 +:10C1B000FD030091F35301A9F40300AAF303032A3A +:10C1C000F51300F9F503022AB9FFFF978001003546 +:10C1D000812640B96302154B2108C05A6100010B4A +:10C1E0002108C05A812600B9810E40B92108C05AE1 +:10C1F0006300010B6308C05A830E00B9F35341A9D1 +:10C20000F51340F9FD7BC3A8C0035FD6FD7BBAA937 +:10C21000FD030091F35301A9F40300AAF55B02A901 +:10C22000F603032AF76303A9F70304AAF96B04A929 +:10C23000F90302AAFB7305A93DFCFF97F503002A49 +:10C24000A004F837980E40B9E00319AAFA04009444 +:10C25000FA0300AA812240B9180BC05A9802188B21 +:10C26000E20319AAE00318AA2108C05A9DFCFF970F +:10C27000200400B41300184B1307F837810A40B9A3 +:10C28000C30E001163741E12E00314AA2108C05AE1 +:10C290006330001121C0358B020080528102018B76 +:10C2A000E10200F9C2FFFF97F503002A40010035C3 +:10C2B000E00240F90160A052730AC05AD60AC05A7F +:10C2C000010000B9E00240F9130800B9E00240F9AA +:10C2D000160400B9E003152AF35341A9F55B42A9FE +:10C2E000F76343A9F96B44A9FB7345A9FD7BC6A875 +:10C2F000C0035FD69C2240B95A070011810E40B995 +:10C30000E3031A2A9B0BC05A9C0BC05A2108C05A3F +:10C31000E00314AA21001C8B020080528102018BD1 +:10C3200063FFFF97F303002A80FAFF35802240B9AC +:10C33000427F4093E10319AAF3031B2A0008C05A65 +:10C340004003000B0008C05A802200B900031C8B78 +:10C3500009050094C9FFFF17F503132ADEFFFF1735 +:10C36000FD7BBCA9FD030091F35301A9F30300AACF +:10C37000F40302AAF55B02A9F50301AAF71B00F971 +:10C38000BAFCFF97611240B923008052020080522C +:10C390002108C05A36D0208BE00313AA7702168BEF +:10C3A000E10317AA68FFFF97A0000035B50EC0DAB9 +:10C3B000756A36F8940EC0DAF40600F9F35341A911 +:10C3C000F55B42A9F71B40F9FD7BC4A8C0035FD60B +:10C3D000FD7BBDA9FD030091F35301A9F40300AA5D +:10C3E000F51300F9F503012A131040B9730AC05A76 +:10C3F00073D2218B1300138B9CFCFF971F00156BCE +:10C400002D010054E10313AAE00314AAF35341A938 +:10C4100003008052F51340F922008052FD7BC3A82F +:10C4200049FFFF1700008012F35341A9F51340F9AB +:10C43000FD7BC3A8C0035FD6FD7BBBA9FD030091B4 +:10C44000F35301A9F303032AE3130191F55B02A956 +:10C45000F503012AF60304AAF76303A9F80300AA67 +:10C46000F70302AA35FDFF97E02700F9F40300AABD +:10C47000E04740B9340100B51F0400310003005407 +:10C4800000020034F35341A9F55B42A9F76343A9C5 +:10C49000FD7BC5A8C0035FD6000C0011630E001120 +:10C4A00002741E1263741E1281320091E00318AAF6 +:10C4B0003FFFFF9700010035730AC05A930600B989 +:10C4C000E02740F900300091C00200F900008052DE +:10C4D000EDFFFF171F04003161FDFF54E4230191BC +:10C4E000E303132AE20317AAE103152AE00318AABB +:10C4F00047FFFF97E3FFFF17FD7BBCA9FD030091FA +:10C50000F35301A9F303042AE4E30091F51300F9BE +:10C51000F50303AAE303132AC8FFFF97F403002AD5 +:10C52000C0000035B3000034E01F40F9627E409344 +:10C53000E10315AA90040094E003142AF35341A9DF +:10C54000F51340F9FD7BC4A8C0035FD6FD7BBAA9F3 +:10C55000FD030091F35301A9F40300AAF303012A98 +:10C56000F55B02A9757C4093F76303A9F70302AA60 +:10C57000F92300F95EFCFF974006F8361F040031EE +:10C5800041050054E2730191E103132AE00314AA68 +:10C5900037FBFF97F85F40B9E2730191E00314AAFB +:10C5A000E103182A32FBFF97000C00511F040071B1 +:10C5B00029FFFF54960A40B9B312001173761E1278 +:10C5C000E00314AAD60AC05A73220011D6C2388BCF +:10C5D000E303132A9902168B02008052E10319AA81 +:10C5E000F3FEFF97200200350020A052806A36B883 +:10C5F000A21200913413009142F47E920100805205 +:10C60000E00314AA33C3338B3F040094E20315AA5A +:10C61000E10317AAE00314AA570400940040A052B3 +:10C6200060C21FB8E003182AF35341A9F55B42A981 +:10C63000F76343A9F92340F9FD7BC6A8C0035FD681 +:10C6400020008012F9FFFF17FD7BBDA9FD030091BB +:10C65000F35301A9F40300AAF30302AAE00302AA18 +:10C66000F51300F9F503012AF3030094E20313AA7A +:10C67000E303002AE103152AE00314AAF35341A9B6 +:10C68000F51340F9FD7BC3A8B1FFFF17FD7BBEA9E1 +:10C69000FD030091E3730091D7FCFF97E10300AA2B +:10C6A000E01F40B9010100B41F10007101010054E6 +:10C6B000200040B9A10180120008C05A1F1000716B +:10C6C0000090811AFD7BC2A8C0035FD6A001801232 +:10C6D000FDFFFF17FD7BBFA9820000F042E0129131 +:10C6E000FD030091EAFFFF97C00000341F040031F2 +:10C6F0004100005440008052FD7BC1A8C0035FD6BA +:10C70000A0018012FDFFFF17FD7BBFA9820000F092 +:10C7100042C01591FD030091DDFFFF971F0400311A +:10C720004100005420008052FD7BC1A8C0035FD6A9 +:10C73000FD7BBDA9FD030091F30B00F9F303032A70 +:10C74000E3B30091ACFCFF97C00000B4E12F40B907 +:10C750003F0C007169000054130040B9730AC05ABD +:10C76000E003132AF30B40F9FD7BC3A8C0035FD697 +:10C77000FD7BBDA9FD030091F30B00F9F303032A30 +:10C78000E3B300919CFCFF97C00000B4E12F40B9D7 +:10C790003F0C007169000054130040B9730AC05A7D +:10C7A000E003132AF30B40F9FD7BC3A8C0035FD657 +:10C7B000FD7BBDA9FD030091F35301A9F403032AF6 +:10C7C000F30304AAE3B300918BFCFF97200100B4AC +:10C7D000E12F40B93F00146B61018012E1A3811A7F +:10C7E000610200B9F35341A9FD7BC3A8C0035FD622 +:10C7F00001008012FBFFFF17FD7BBFA9FD03009125 +:10C80000E00000B5800000F0002018912AE4FF97B6 +:10C8100020008012FD7BC1A8C0035FD61F0440F238 +:10C8200021FFFF547DFAFF9760FFFF34F6FFFF17EB +:10C83000FD7BBFA9820000F0030080D2FD030091C0 +:10C8400042F017916CFCFF97000100B4810000F0EA +:10C85000210C1891580300941F000071E0179F1AD3 +:10C86000FD7BC1A8C0035FD620008052FDFFFF17EB +:10C87000FD7BBAA9FD030091F35301A9F40300AABB +:10C88000F303022AE00301AAF55B02A9F76303A9F7 +:10C89000F70301AAF96B04A9F90303AA660300943C +:10C8A000E2430191E103132A167C4093E00314AAAA +:10C8B0007EFBFF97F80300AA810000F0E00314AAB2 +:10C8C00021201591D2FCFF97E103002AE00314AA6E +:10C8D000C9FBFF97F303002A1F0000716C0000548E +:10C8E0003500801222000014E103132AE353019162 +:10C8F000E2630191E00314AA2BFCFF97F50300AA61 +:10C90000E1034A291F00016B0B040054BA024039AD +:10C910005FBF0071A1030054A0C2208B00F05F38FC +:10C9200040030035E02F40F9E20316AAE10317AAFD +:10C930002A030094A0020035E1031A2AE00315AA95 +:10C940004403009400040091E10318AA1A03009420 +:10C95000F503002AA0010035E02F40F90A090094F0 +:10C960001F04003120010054200300B9E003152A00 +:10C97000F35341A9F55B42A9F76343A9F96B44A9B5 +:10C98000FD7BC6A8C0035FD6E103132AE00314AA07 +:10C99000A7FBFF97D0FFFF17FD7BBBA9FD0300910D +:10C9A000F35301A9F40300AAE00301AAF55B02A96D +:10C9B00016008012F71B00F9F70301AA1E0300946A +:10C9C000157C4093810000F0E00314AA212015910A +:10C9D0008FFCFF97E103002AE00314AA86FBFF9770 +:10C9E000F303002A7F020071EC000054E003162AD2 +:10C9F000F35341A9F55B42A9F71B40F9FD7BC5A89C +:10CA0000C0035FD6E103132AE3130191E2230191EE +:10CA1000E00314AAE4FBFF97010040393FBC00711A +:10CA2000C1010054E14780B90000018B00F05F387C +:10CA300040010035E02740F9E20315AAE10317AAF7 +:10CA4000E6020094A0000035E02740F9CE080094EB +:10CA5000DF02006BD6A2801AE103132AE00314AAB6 +:10CA600073FBFF97F303002ADFFFFF17000200B4F8 +:10CA7000FD7BBEA9FD030091F35301A9F30300AAB6 +:10CA8000F40301AAA100009021C0149160FCFF975B +:10CA9000E103002AE20314AAE00313AAF35341A915 +:10CAA000030080D2FD7BC2A8D3FBFF17C0035FD673 +:10CAB000FD7BBDA9FD030091F35301A9F303042AF3 +:10CAC000F40303AAE4B3009163761E53FF2F00B969 +:10CAD00038FFFF97E20300AAE02F40B9600100345D +:10CAE000F35341A9FD7BC3A8C0035FD6437861B867 +:10CAF0006308C05A837A21B8210400917F02016B38 +:10CB00006CFFFF54F7FFFF17010080D2FCFFFF17F7 +:10CB1000FD7BBEA9FD030091E3730091B6FBFF9777 +:10CB20001F0000F1E0079F1AFD7BC2A8C0035FD67B +:10CB3000FD7BB9A9FD030091F35301A9F40306AAF3 +:10CB4000F55B02A9F60303AAF503052AE3B30191F5 +:10CB5000F76303A9F70300AAF803042AF96B04A9F1 +:10CB6000FB7305A9A4FBFF97200100B4F96F80B9FE +:10CB7000F30300AA1B00805239F77E921900198B2B +:10CB80007F0219EB83000054F501F8373B00801257 +:10CB90000D000014604640B81A08C05AC0040034A2 +:10CBA000DF0200F16403557A01040054E1031A2AFC +:10CBB000E00317AA8BFCFF97FC03002A4001F8361C +:10CBC000BB028012E0031B2AF35341A9F55B42A983 +:10CBD000F76343A9F96B44A9FB7345A9FD7BC7A87B +:10CBE000C0035FD6560200B4E103002AE20316AA8E +:10CBF000E00317AA03008012CEFEFF971F04003146 +:10CC000000FEFF54614A208B3F0301EBA3FDFF545C +:10CC10007F03156B01030054BAFBFF34340100B5E8 +:10CC20001B008052E8FFFF171C008012E003182A47 +:10CC3000F5FFFF171C00801200008052F5FFFF1760 +:10CC40001F400071010280520290811A9C0A002943 +:10CC500094220091000080D25F00006B29FEFF54F7 +:10CC6000617A60B82108C05A817A20B80004009126 +:10CC7000FAFFFF17734A208B7B070011C1FFFF17D4 +:10CC8000E103012AE30300AA020080D2000080D25F +:10CC90005F0001EB41000054C0035FD6647862B8C6 +:10CCA000420400918408C05A808000AAF9FFFF174F +:10CCB000FD7BBCA9FD030091F35301A9F303052AF1 +:10CCC000F40306AAF55B02A9F603032AF503042A76 +:10CCD000E3F3009148FBFF97200300B4E20300AAAE +:10CCE000A002130BE13F80B9007C161B21F47E9259 +:10CCF00040C8208B4200018B05C8358BA1C8338BFF +:10CD00005F0001EBC3010054E103152ADDFFFF972B +:10CD1000E70300AAB40000B4E103132AE00305AA64 +:10CD2000D8FFFF97800200F9E00307AAF35341A957 +:10CD3000F55B42A9FD7BC4A8C0035FD607008092C3 +:10CD4000FAFFFF17FD7BBBA9FD030091F35301A977 +:10CD5000F30300AAF55B02A9F503022AF60303AA6E +:10CD6000F76303A9F703042AF80305AAF96B04A9DA +:10CD7000FA03012AD91C001257FEFF971F00007109 +:10CD80008D020054F403002AE1031A2AE00313AAD7 +:10CD90005EFEFF97E503002AC001F837E703192A72 +:10CDA000E60318AAE403142AE303172AE20316AAE7 +:10CDB000E103152AE00313AAF35341A9F55B42A945 +:10CDC000F76343A9F96B44A9FD7BC5A8B9FFFF1719 +:10CDD00000008092F35341A9F55B42A9F76343A990 +:10CDE000F96B44A9FD7BC5A8C0035FD6FD7BBCA938 +:10CDF000FD030091F35301A9F30300AAF403012AF0 +:10CE0000F55B02A9F50302AAF603032AF76303A957 +:10CE1000F70304AAB81C0012BBFBFF97A001F83768 +:10CE2000E103002AE603182AE50317AAE403162AF9 +:10CE3000E30315AAE203142AE00313AAF35341A95A +:10CE4000F55B42A9F76343A9FD7BC4A8BEFFFF17AA +:10CE500000008092F35341A9F55B42A9F76343A90F +:10CE6000FD7BC4A8C0035FD6FD7BBAA9FD0300917A +:10CE7000F35301A9F40304AAF55B02A9F503032AFD +:10CE8000F76303A9F70300AAF803012AF92300F9BD +:10CE9000F90302AA9CFBFF97F303002A2002F8374C +:10CEA000E103002AE00317AA0BFEFF97F603002A0E +:10CEB000E103132AE00317AA14FEFF97F303002AE5 +:10CEC000E3730191E20319AAE103182AE00317AA08 +:10CED000C9FAFF97E60300AA200100B5F35F40B945 +:10CEE000E003132AF35341A9F55B42A9F76343A971 +:10CEF000F92340F9FD7BC6A8C0035FD6E25F80B985 +:10CF0000637E409363C0368BC77E409342F47E922B +:10CF10000000805263F47ED3C200028BC100038BF9 +:10CF20003F0002EB6900005413008012EDFFFF1771 +:10CF30001F00156BC1010054E103162AE00306AA85 +:10CF400050FFFF97E50300AA851600A9E103132A05 +:10CF5000C008078B4BFFFF97A500008BA50400D1ED +:10CF600013008052850600F9DEFFFF170004001150 +:10CF7000E60301AAEAFFFF17FD7BBDA9FD030091AF +:10CF8000F35301A9940000D0F30300AA94E634916E +:10CF9000F51300F9950000F0B5DE1691E10314AA2F +:10CFA000E00313AAE20315AAE30080520B190094D0 +:10CFB000F30300AAE103002A406A40F91DFEFF972F +:10CFC000E0FEFF34E00313AAF35341A9F51340F93F +:10CFD000FD7BC3A8C0035FD6FD7BB9A9000080928A +:10CFE000FD030091F35301A9F51300F9E3FFFF9747 +:10CFF0002005F8B7F30300AA1500805214008052F0 +:10D00000E2E30091E103152AE00313AAD918009482 +:10D010004002F837B5060011E0030035410240F93F +:10D02000807E4093001C0091E31F40F92110008B8B +:10D03000E22340F9230400F942040091410240F93F +:10D04000420003CB2010008B020800F9F4000035E9 +:10D0500034008052EBFFFF17E00313AAC7FFFF97CE +:10D06000F30300AAC000F8B600008052F35341A9B0 +:10D07000F51340F9FD7BC7A8C0035FD6E2E300913A +:10D0800001008052BB18009400FFFF37350080522A +:10D09000E2FFFF17A0028012F5FFFF170000805289 +:10D0A000C0035FD6FD7BBFA9A10000F021200E9137 +:10D0B000FD030091416A00F95FEA00B9406A40F956 +:10D0C000CEFDFF9780000035FD7BC1A8406A40F986 +:10D0D000F3FFFF17FD7BC1A8C0035FD6FD7BB7A997 +:10D0E000FD030091F35301A9F30300AAF55B02A924 +:10D0F000F50305AAF76303A9F96B04A9F90303AAC9 +:10D10000FB7305A9E43B00F9E27B00B9610000B5BF +:10D11000810000D021541891E00313AABCFAFF97B4 +:10D12000F403002A2001F83620008012F35341A9AD +:10D13000F55B42A9F76343A9F96B44A9FB7345A9C1 +:10D14000FD7BC9A8C0035FD69A0000F05AA70B91D7 +:10D15000E103002AE3330291E2031AAAE00313AACF +:10D1600025FAFF97F60300AA00FEFFB4E103142A94 +:10D17000E00313AA58FDFF97E06F00B9E103142AFA +:10D18000E00313AA61FDFF979B0000D0F803002A7B +:10D19000E103142AE00313AA9C0000D0B0F8FF9723 +:10D1A0007B6F17919C9B1791F703002A5708F8365D +:10D1B000F703142AB4E20191B50000B4E00314AA05 +:10D1C000020480D2010080524F010094E103172A2B +:10D1D000E00313AA820000D042C817914DFEFF97CA +:10D1E000F38F40B9FA03002A80008052E16F40B902 +:10D1F0001C0080521B0080D2730EC01A007F409327 +:10D2000000C0218B737E4093730200CBD30A138B33 +:10D210007F0216EB63040054E06F40B9C20240B9CC +:10D220001F080071A10800544208C05AD61200918C +:10D23000427C60D3C10240B92108C05A2000028B51 +:10D24000550000B4800200F93F0300F18103005251 +:10D25000E2079F1A5F00016A40000054200300F9B2 +:10D260001F0B0071E0060054C1120091020080D231 +:10D27000F60301AAC14640B82108C05A2100028B1A +:10D280007A0000341FE6FF97E10300AA550000B4BE +:10D29000810600F97B03018B94420091BC040034A9 +:10D2A000E03B40F9400000B41B0000F90000805250 +:10D2B0009FFFFF17E2031BAAE103172A0300801256 +:10D2C000E00313AA1BFDFF97E603002AE2031CAA52 +:10D2D000E103172AE00313AA03008012E67F00B9D6 +:10D2E00014FDFF97C001F837E11B4F29C600010A62 +:10D2F000DF00006B41010054E3330291E2031AAAFC +:10D30000E103172AE00313AABBF9FF97F60300AA6B +:10D3100020F5FFB5A002801285FFFF17E103172A51 +:10D32000E00313AA5BF8FF97F703002AA0FFFF179B +:10D330003C008052B7FFFF17020080D2BEFFFF17EC +:10D34000C20640B9C12200914208C05A427C60D353 +:10D35000C8FFFF17840000B0003C001284582091E1 +:10D36000030080D25F00036B4C000054C0035FD603 +:10D370002568633863040091A520404A001C1853B7 +:10D3800085D86578A000004AF7FFFF17FD7BBEA98E +:10D39000E60302AAE203012AFD030091E10300AAC9 +:10D3A00000008052ECFFFF970004C05AE17B00911F +:10D3B000420080D2E03F0079E00306AAEE0000942C +:10D3C000FD7BC2A8C0035FD6E203022A030080D21D +:10D3D0007F0002EB41000054C0035FD6246863382D +:10D3E000630400910040C41AFAFFFF17FD7BBFA938 +:10D3F000E003202AFD030091F4FFFF97E003202AB9 +:10D40000FD7BC1A8C0035FD6FD7BBDA9FD030091D4 +:10D41000F35301A9F30301AAF403002AF55B02A95F +:10D42000F603032A3540228B7F0215EBC30000541C +:10D43000E003142AF35341A9F55B42A9FD7BC3A87D +:10D44000C0035FD6A50213CBE10313AADF02056B6D +:10D45000E003142AC532851AE203052AE4FFFF9788 +:10D4600073C2258BF403002ABCE4FF97EFFFFF177C +:10D47000FD7BBDA9FD030091F30B00F9F30302AAA4 +:10D48000E203012AE10300AA00008052DFFFFF97B8 +:10D490000008C05AE1B30091820080D2E02F00B9A9 +:10D4A000E00313AAB4000094F30B40F9FD7BC3A87A +:10D4B000C0035FD6FD7BBFA9800000D00034299156 +:10D4C000FD030091FCE0FF9700000014FD7BBDA967 +:10D4D000FD030091F51300F9F503012A01FC009109 +:10D4E000F35301A921E47A92F40300AA000880D240 +:10D4F000AFE3FF97F30300AAA00000B495007836CD +:10D50000E20314AA010080527F000094E00313AAF2 +:10D51000F35341A9F51340F9FD7BC3A8C0035FD6BF +:10D52000420300B4860000B0C6C02D91050080D231 +:10D5300004686538236865384402003423020034E7 +:10D540009F00036B60010054C7C864386700003651 +:10D5500084800011841C0012C7C86338670000363D +:10D5600063800011631C00127F00046BA100005453 +:10D57000A5040091BF0002EBC1FDFF54E303042AA0 +:10D580008000034BC0035FD603008052040080522A +:10D59000FCFFFF17E27F40B2E2FFFF17020080D2DC +:10D5A000236862380368223842040091A3FFFF35E4 +:10D5B000C0035FD6E50300AA030080D22468633865 +:10D5C000A2686338630400914000046B8408407AC9 +:10D5D00061FFFF54C0035FD6E50300AA040080D2B8 +:10D5E0005F0004EB6100005400008052070000144B +:10D5F00026686438A3686438840400916000066B70 +:10D60000C408407AE1FEFF54C0035FD6211C00121B +:10D61000020040395F00016B41000054C0035FD637 +:10D620006200003400040091FAFFFF17000080D26E +:10D63000FBFFFF17E10300AA22004039620000351A +:10D64000200000CBC0035FD621040091FBFFFF1731 +:10D65000FD7BBFA9E40300AAE303012AFD030091B7 +:10D66000631C0012F4FFFF978000008B010040391B +:10D670003F00036BA0000054000400D19F0000EBAA +:10D6800069FFFF54000080D2FD7BC1A8C0035FD6B4 +:10D690000100018BE20300AA5F0001EB600000546F +:10D6A0004300403963000035400000CBC0035FD623 +:10D6B00042040091F9FFFF17000200B4FD7BBEA9F0 +:10D6C000FD030091F30B00F9F30300AADAFFFF97C3 +:10D6D0000004009173E1FF97E40300AA600000B426 +:10D6E000E10313AAAEFFFF97E00304AAF30B40F98E +:10D6F000FD7BC2A8C0035FD6040080D2E00304AA69 +:10D70000C0035FD6030840F2C1020054261C4092B9 +:10D71000040080D205018052C42004AAA50400712F +:10D72000C1FFFF54450003CBBF1C00F1480100546A +:10D7300043FC43D3E4008092637C049B4200038B50 +:10D74000030003CB040080D25F0004EBE10000542F +:10D75000C0035FD6046823F863200091F2FFFF172F +:10D76000E30300AAF8FFFF176168243884040091DE +:10D77000F6FFFF171F0001EB00010054030001AA90 +:10D78000630840F220010054E40300AA030080D2A1 +:10D790005F0003EBE1010054C0035FD6246863F827 +:10D7A000046823F863200091440003CB9F1C00F120 +:10D7B00068FFFF5443FC43D3E4008092637C049BE6 +:10D7C0004200038B040003CB210003CBF0FFFF17C3 +:10D7D000256863388568233863040091EDFFFF17DF +:10D7E000E60300AA1F0001EB890000542300028B0E +:10D7F0007F0000EB08010054FD7BBFA9E00306AAEF +:10D80000FD030091DCFFFF97E00306AAFD7BC1A8A2 +:10D81000C0035FD60100028BE20322AA000080D27F +:10D82000000400D15F0000EB61000054E00306AA91 +:10D83000C0035FD66468603824682038F9FFFF179A +:10D84000E50300AA040080D25F0004EB61000054ED +:10D850000000805206000014A36864382068643811 +:10D86000840400916000006B00FFFF54C0035FD68A +:10D870000200028B211C00121F0002EB6100005409 +:10D88000000080D2C0035FD6E30300AA64144038CE +:10D890009F00016B80FFFF54E00303AAF7FFFF170F +:10D8A000FD7BBEA9FD030091F35301A9F40300AA77 +:10D8B000FACFFF97F30300AAF6CFFF97017D80D23E +:10D8C000E003002A737E019B600AC09A000014CB1B +:10D8D000F35341A9FD7BC2A8C0035FD6FD7BBEA95F +:10D8E000FD030091F30B00F9ECCFFF97F30300AABF +:10D8F000E8CFFF97014888D2E003002AE101A0F2B7 +:10D90000737E019B600AC09AF30B40F9FD7BC2A8AD +:10D91000C0035FD6FD7BBEA9FD030091F30B00F9A8 +:10D92000F30300AADBCFFF97737E009B004888D2E9 +:10D93000E001A0F2600AC09AF30B40F9FD7BC2A897 +:10D94000C0035FD6FD7BBEA9FD030091F35301A97F +:10D95000F40300AAD1CFFF97F30300AAE00314AAAF +:10D96000EDFFFF977302008B73060091CBCFFF97FB +:10D970001F0013EBC3FFFF54F35341A9FD7BC2A863 +:10D98000C0035FD6FD7BBDA9FD030091F35301A940 +:10D99000F30300AAF51300F915D092D21513A0F2E3 +:10D9A0006EE3FF977F0215EB7492959AE00314AA39 +:10D9B000E5FFFF97730214EB41FFFF54F35341A9B6 +:10D9C000F51340F9FD7BC3A8C0035FD6000080D2E9 +:10D9D000C0035FD6FD7BB9A9FD030091F55B02A9E9 +:10D9E000F6430191950000B0B55A2891F35301A96F +:10D9F000F403022AF30301AA020280D2E10315AA6A +:10DA0000F76303A9F70300AAE00316AAF92300F9B4 +:10DA100059FFFF97185580D2E3830191020280D20B +:10DA2000E00303AAA102028BB5000090B592199100 +:10DA300051FFFF97B90580529F0240F21610969A47 +:10DA40009F027FF2A000009000A41991B512809A65 +:10DA5000140080D2C06A7438E10315AAE26A603803 +:10DA6000E00313AA330400940027D49A600100371E +:10DA7000730A0091940600919F4200F1C1FEFF5489 +:10DA8000F35341A9F55B42A9F76343A9F92340F990 +:10DA9000FD7BC7A8C0035FD6730E009179F21F38D3 +:10DAA000F5FFFF17FD7BBFA9FD03009182DFFF9704 +:10DAB000400180528ADFFF977FFEFF97FD7BB7A969 +:10DAC000FD030091E18B05A9E1430291E10703A960 +:10DAD000E1430191E12300F9E1068012E14B00B935 +:10DAE000E1430091FF4F00B9E39306A9E20F43A978 +:10DAF000E20F01A9E20F44A9E20F02A9E59B07A9E1 +:10DB0000E74700F91F0400944001805274DFFF973B +:10DB100069FEFF97281C44D3E20300AA202C48D3B7 +:10DB2000257C0C530301000BC40080526330410B71 +:10DB3000210C0012A60C050BC600080B6304041B85 +:10DB4000A119805244018052677C011BE77C0B5372 +:10DB5000E38C041B63C00011430000390308000B71 +:10DB60006300070B6300062B610000544004009122 +:10DB7000C0035FD6667C011BC67C0B53C004000B40 +:10DB8000C38C041B63C0001143040039A300002AA6 +:10DB90006300003540080091F6FFFF17A301805293 +:10DBA000037C031B637C07536508052B6080041B03 +:10DBB00000C000114008003961000054400C009181 +:10DBC000ECFFFF17A17C011B217C0B532494041B49 +:10DBD00084C00011440C00396100003540100091F0 +:10DBE000E4FFFF1721C000114014009141100039DB +:10DBF000E0FFFF17EBD390D208D490D22B00A0F215 +:10DC00002800A0F2CA008052A71980524601805213 +:10DC1000A90180523F000BEB48000054BEFFFF17E4 +:10DC20002208C89A001400914584089BE10302AAC7 +:10DC3000AD1C0453A22C0853A401020BA37C0C536B +:10DC40008430450BA50C00126C0C030B8C010D0BE2 +:10DC500084140A1B857C071BA57C0B53A490061B10 +:10DC600084C0001104B01F384408020B8400050B67 +:10DC700084000C0B857C071BA57C0B53A204020BB4 +:10DC8000A490061B84C0001104C01F38447C091BEB +:10DC9000847C07538308030B8288061B42C0001153 +:10DCA00002D01F38627C071B427C0B53438C061B3F +:10DCB00042C0001163C0001103E01F3802F01F389A +:10DCC000D5FFFF17FD7BB5A9EF0300AAEE03042AD9 +:10DCD000FD030091F35301A9F40301AAF303062AFB +:10DCE000F55B02A9E10302AAF603032AF76303A97D +:10DCF000F503052AF96B04A9FB2B00F993023036D2 +:10DD00007F280071F9079F1A78021B127A021C12F1 +:10DD100053002036737A1F1233090836C101F8B652 +:10DD2000E10301CBCE050051B7058052D901003582 +:10DD3000DF2A0071C1080054FBA30191E0031BAA74 +:10DD4000ADFFFF9700001B4B0E000014D9001A1204 +:10DD5000EEFFFF17D3061036CE050051770580522F +:10DD600099000034DF420071E0060054CE050051F6 +:10DD700001FEFFB500068052E0A301392000805269 +:10DD80001F00156B2102805205A0951AC401054B96 +:10DD90007F02016A80090054B7000034FF0114EBD0 +:10DDA00042000054F7010039EF050091D901003419 +:10DDB000FF0114EB6200005401068052E1010039BA +:10DDC000E1050091DF420071610800549F0201EB00 +:10DDD00089000054010B80520103012AE10500393A +:10DDE000EF090091DA010035010480527F0240F210 +:10DDF00003068052E203042A6310811AE1030FAA8A +:10DE000042040071C50600549F00007181A09F1A52 +:10DE1000840400518400014BEFC1218BE203052AE9 +:10DE2000E1030FAA0306805236000014930018364F +:10DE3000CE05005117048052CAFFFF171700805209 +:10DE4000C8FFFF17CE09005161F9FFB4DF4200712E +:10DE5000850000D0E3179F1AC7060051630C00111C +:10DE6000E6A30191A5940B91020080D22400078AB9 +:10DE700040040011841C40922124C39AA468643891 +:10DE80000403042A446826384204009101FFFFB5C8 +:10DE9000BCFFFF173F0014EB420000542300003981 +:10DEA000210400914204007165FFFF549F0000713E +:10DEB00081A09F1A840400518400014BEFC1218B83 +:10DEC000B6FFFF17E203042AE1030FAA03048052FE +:10DED000F5FFFF17EF0301AAC3FFFF173F0014EB85 +:10DEE000420000542300003921040091C5FFFF17B0 +:10DEF0003F0014EB4200005423000039210400913C +:10DF0000420400511F00026B4DFFFF54A500004B5F +:10DF100001040051E501058BE3A30191217C4093AD +:10DF2000E20305AA6102F8361F000071E203042A29 +:10DF300000A09F1A03048052A0C0208BE10300AA16 +:10DF400042040071450200549F00007184A09F1A92 +:10DF5000F35341A900C0248BF55B42A9F76343A9A1 +:10DF6000F96B44A9FB2B40F9FD7BCBA8C0035FD61E +:10DF70005F0014EB620000542668633846000039E5 +:10DF800042040091210400D1E7FFFF173F0014EB8A +:10DF9000420000542300003921040091E9FFFF17DB +:10DFA000FD7BBCA9FD030091F35301A9F40300AA72 +:10DFB000F303032AF55B02A9F60301AAF71B00F994 +:10DFC000F703052AC20300B5B5000090B54E1991BC +:10DFD000817C4093E00315AAAEFDFF97E303002A7E +:10DFE00037052036020080D27F00026B4C050054BA +:10DFF000027C40921F00007142A09F9A050480524B +:10E000009402028BE20314AA6402140B8100024BF7 +:10E010007F00016BEB0400547F02006B6102004B38 +:10E0200021A09F9A8002018BF35341A9F55B42A97D +:10E03000F71B40F9FD7BC4A8C0035FD6F50302AA15 +:10E04000E4FFFF175F0016EB420000544500003963 +:10E05000420400918100024B7F00016B4BFFFF5493 +:10E060001F00136B6102004B21D09F9A9402018B19 +:10E07000610600511300134B73D29F1A3300130B28 +:10E08000D9FFFF17E20314AA6402140B050480529F +:10E09000F1FFFF178102028BDF0201EB69000054E0 +:10E0A000A1164038816A223842040091CFFFFF1741 +:10E0B0005F0016EB42000054450000394204009115 +:10E0C000D3FFFF17FD7BB5A9FD030091F35301A911 +:10E0D000F55B02A9F76303A9F80300AAF96B04A989 +:10E0E000F90302AAFB7305A91C0001ABE13300F997 +:10E0F000751840B9735C40A983000054E00320AA5E +:10E100001C008092E03300F99A000090F40318AAF2 +:10E1100040631F919B000090E03700F960C32D9190 +:10E12000E03B00F92003403980010035E03340F93D +:10E13000000100B49F021CEB420000549F02003912 +:10E14000800600919F0300EB420000549FF31F38AC +:10E150008002184B8A0100141F940071C000005403 +:10E160009F021CEB4200005480020039940600918B +:10E17000E400001405008052090000143FB400714F +:10E18000A00000543FC00071C1010054A50000323E +:10E1900002000014A5001C32F90300AA210740392F +:10E1A000200700913FAC0071A001005488FEFF548D +:10E1B0003F800071800100543F8C00718001005449 +:10E1C00022C00051421C00125F240071C803005499 +:10E1D0001A008052440180520A000014A5001E3229 +:10E1E000EEFFFF17A5001D32ECFFFF17A5001A3246 +:10E1F000EAFFFF174107041B000400913AC00051D9 +:10E200000100403922C00051421C00125F240071FD +:10E2100029FFFF54010040393FB80071610D0054DF +:10E22000040440390204009181C00051211C0012F5 +:10E230003F240071280A0054040080524601805295 +:10E240001D0000143FA80071C1020054200B009172 +:10E250003501F837622E0091E10313AA53F07D9245 +:10E260003A0040B99AFDFF36FA031A4BA5001C325A +:10E27000E9FFFF17A22200115F000071CD000054DA +:10E28000632E0091E10313AAF503022A73F07D9235 +:10E29000F4FFFF17E1C2358BF503022AF1FFFF17E8 +:10E2A0001A008012DCFFFF178404061B4204009151 +:10E2B00084C000514100403920C00051001C0012B0 +:10E2C0001F24007129FFFF549F0000719BA09F1A1B +:10E2D0004000403901781D123FA001712001005417 +:10E2E00001300151211C00123FB800718807005411 +:10E2F000230088D20320C8F26124C19A01070036A6 +:10E30000590400911FB00171C1000054410440390B +:10E310003FB001716100005459080091800980529A +:10E32000210340393FE00171080100543F88017129 +:10E33000C80500543F940071E02D00540A02805239 +:10E340003F600171400600549F021CEB62000054C4 +:10E35000A0048052800200392103403980060091D8 +:10E36000812E00349F0300EB4900005481060039E0 +:10E37000940A0091630000149FA80071C102005428 +:10E38000020800911501F837602E0091E103152A6B +:10E3900000F07D92640240B9F503012AF30300AA5C +:10E3A000CAFFFF17A12200113F0000718D00005429 +:10E3B000602E009100F07D92F7FFFF17E00313AA93 +:10E3C000F3C2358BF4FFFF17E20300AA1B00801293 +:10E3D000C0FFFF171B008052BEFFFF17F90302AA00 +:10E3E00000008012CFFFFF17218C01513F540071B4 +:10E3F000C8FAFF54E23740F94158617862000010D2 +:10E4000041A8218B20001FD60A0180521F300171C4 +:10E4100061290054D52BF837763E0091E903152A7F +:10E42000D6F27D92620240F9E603052AE00314AABF +:10E43000E5031B2AE4031A2AE3030A2AE1031CAAC0 +:10E44000E97F00B920FEFF97F40300AAE97F40B9F5 +:10E45000F503092A49000014A5022037E1031A2A0E +:10E46000E00314AA02048052050000141F001CEBF4 +:10E4700042000054020000390004009121040051C0 +:10E480003F0000714CFFFF545F03007140070051D3 +:10E4900000C09F9A410700519402008B20008052D7 +:10E4A00043C3801A0000034B1A00010B9F021CEBB0 +:10E4B00022010054B502F837602E0091E103152ABD +:10E4C00000F07D92620240B9F503012AF30300AA2D +:10E4D0008202003994060091E2031A2AE10314AA89 +:10E4E00000048052420400515F0000710C0200548D +:10E4F000410700515F03007121C09F9A9402018B74 +:10E500003907009108FFFF17A12200113F00007199 +:10E510008D000054602E009100F07D92EAFFFF17FD +:10E52000E00313AAF3C2358BE7FFFF173F001CEB94 +:10E53000420000542000003921040091EAFFFF1737 +:10E540001502F837763E0091E603152AD6F27D9241 +:10E55000620240F9E00314AAE4031B2AE3031A2A27 +:10E56000E1031CAAE67F00B98EFEFF97F40300AA20 +:10E57000E67F40B9F503062AF30316AAE1FFFF1769 +:10E58000A6220011DF0000718D000054763E00913C +:10E59000D6F27D92EFFFFF17F60313AAF3C2358B75 +:10E5A000ECFFFF17D502F837613E0091E00313AA94 +:10E5B00033F07D92160040F920074039E20316AA95 +:10E5C0001F84017140070054080300541F34017177 +:10E5D000600300541F540171600E00541F24017128 +:10E5E000400800545F070031A10600542604805201 +:10E5F0001A028052A600062A32000014A12200113D +:10E600003F000071CD000054623E0091E00313AA68 +:10E61000F503012A53F07D92E7FFFF17E0C2358B27 +:10E62000F503012AE4FFFF171FA40171C005005480 +:10E630001FB4017181FDFF54A5001A32E02302913D +:10E64000890000B0E20300AA29DD2991AB001A126B +:10E65000060080D24C078052CA6A6638411D44D3F6 +:10E660004A0D40922D696138E10300AA2A696A388F +:10E670002D2400380A040039AB000035DF1400F106 +:10E6800060000054010C00910C080039C604009190 +:10E69000DF1800F141020054A57819123F0000393B +:10E6A000E4031B2AE3031A2A2F000014C20240F9D4 +:10E6B00020088052A500002A5A028052A6001B3270 +:10E6C000E5031B2AE4031A2AE1031CAAE00314AAA7 +:10E6D000030280527CFDFF9726000014E00301AA8C +:10E6E000DEFFFF17A5001A32200B4039A57819125A +:10E6F0001FD0007181F7FF54E9230291EC030291CE +:10E70000EA0309AA0B0080D2CD058052C16A6B389A +:10E71000E0030CAAE57F00B9FFFCFF9700000CCBDB +:10E72000E57F40B9E20309AA017C4093210400D1AE +:10E730003F040031210300542941208B7F0D00F15B +:10E74000400000542D1500386B0500917F1100F139 +:10E75000E1FDFF54E4031B2AE3031A2AE2030AAA99 +:10E760003F010039E1031CAAE00314AA0DFEFF9744 +:10E77000F40300AA1F0440B129060054F35341A931 +:10E78000F55B42A9F76343A9F96B44A9FB7345A95B +:10E79000FD7BCBA8C0035FD686696138461400387C +:10E7A000E3FFFF17200B40391FB001712003005415 +:10E7B000080200541F080171000300541F3001714A +:10E7C00062008052E213821AE57F00B9F60200B4BB +:10E7D000E1230291E00316AA7FFCFF97E57F40B991 +:10E7E000E4031B2AE3031A2AE2230291DEFFFF1748 +:10E7F0001FCC017161010054E00316AAE57F00B946 +:10E8000073FCFF97E20300AAE57F40B9A0F4FFB5CF +:10E8100022008052EDFFFF1742008052EBFFFF17EE +:10E8200002008052E9FFFF17E0230291810000F00F +:10E83000214C19915AFBFF97E9FFFF172007403938 +:10E84000E13B40F921686038E00319AA39070091DB +:10E850003F0840F241FFFF54F90300AA29FFFF17C8 +:10E860001FB00171820218CB610200543501F837E4 +:10E87000603E0091E103152A00F07D92630240F9A9 +:10E88000620000F9F503012AF30300AA1DFFFF1738 +:10E89000A12200113F0000718D000054603E0091E4 +:10E8A00000F07D92F6FFFF17E00313AAF3C2358B49 +:10E8B000F3FFFF17F500F837603E0091E103152ADA +:10E8C00000F07D92630240F9620000B9EEFFFF178D +:10E8D000A12200113F0000718D000054603E0091A4 +:10E8E00000F07D92F8FFFF17E00313AAF3C2358B07 +:10E8F000F5FFFF179F021CEBA2C3FF5481020039F2 +:10E900001BFEFF17A5001B320A028052C0FEFF1734 +:10E91000210740393F14017161000054390700910B +:10E92000A5001932A5001F324A018052B8FEFF1718 +:10E93000390700D1F40300AAF2FEFF171FB00171DE +:10E94000A0D6FF54AC0100541F68017140D6FF549B +:10E950001FA00171E00200543505F837762E0091B2 +:10E96000E903152AD6F27D92620240B9E003022A39 +:10E97000427C4093160000141FD00171C0D4FF5494 +:10E980001FE8017180D4FF54F4FFFF17A922001182 +:10E990003F0100718D000054763E0091D6F27D92C9 +:10E9A000A1FEFF17F60313AAF3C2358B9EFEFF17D5 +:10E9B0005501F837762E0091E903152AD6F27D929B +:10E9C000620240B9403C4092423C4093BF007FF21B +:10E9D0004210809A95FEFF17A92200113F01007195 +:10E9E0008D000054762E0091D6F27D92F5FFFF1730 +:10E9F000F60313AAF3C2358BF2FFFF17A922001109 +:10EA00003F0100718D000054762E0091D6F27D9268 +:10EA1000D6FFFF17F60313AAF3C2358BD3FFFF17F8 +:10EA2000FD7BB9A9FD030091F35301A9F30301AAEA +:10EA3000F40300AAE10303AAE0430191F51300F9EE +:10EA4000F50302AA020480D24BFBFF97E00745A919 +:10EA5000E00703A9E3C30091E00746A9E20315AA72 +:10EA6000E00704A9E10313AAE00314AA96FDFF97A7 +:10EA70007FC220EB88000054600600517F0200F145 +:10EA800000109F1AF35341A9F51340F9FD7BC7A865 +:10EA9000C0035FD6FD7BB6A9FD030091E39307A9F0 +:10EAA000E3830291E30F03A9E3C30191E32300F998 +:10EAB000E3048012E34B00B9E3430091FF4F00B938 +:10EAC000E59B08A9E74F00F9E61F43A9E61F01A946 +:10EAD000E41744A9E41702A9E61F05A9E41706A94B +:10EAE00079FDFF97FD7BCAA8C0035FD6FD7BBCA95B +:10EAF000FD030091F35301A9F30300AAF40301AA53 +:10EB0000E10302AA020480D2E063228B1AFBFF9782 +:10EB1000E3830091E20314AAE00313AAE17B40B26D +:10EB200069FDFF97F35341A9FD7BC4A8C0035FD6DD +:10EB3000FD7BB8A9FD030091E20F05A9E203029154 +:10EB4000E20B03A9E2430191E22300F9E2058012FE +:10EB5000E24B00B9FF4F00B9E20F43A9E20F01A950 +:10EB6000E20F44A9E20F02A9E2430091E41706A9CB +:10EB7000E61F07A9DEFFFF97FD7BC8A8C0035FD68D +:10EB8000FF8311D1020480D2FD7B00A9FD03009117 +:10EB9000F30B00F9F30300AAE063228BF6FAFF9768 +:10EBA000E20313AAE3830091E0230191818280D2E2 +:10EBB0009CFFFF97F303002A60000034E0230191DB +:10EBC0003DDBFF97E003132AFD7B40A9F30B40F9DF +:10EBD000FF831191C0035FD6FD7BB7A9FD030091B0 +:10EBE000E18B05A9E1430291E10703A9E14301910A +:10EBF000E12300F9E1068012E14B00B9E143009105 +:10EC0000FF4F00B9E39306A9E20F43A9E20F01A960 +:10EC1000E20F44A9E20F02A9E59B07A9E74700F923 +:10EC2000D8FFFF97FD7BC9A8C0035FD6E30300AA06 +:10EC30000000403986000090C6C02D911FC00071B1 +:10EC4000610400546404403960044039C468643885 +:10EC50006400003600800011001C00121FE00171EA +:10EC6000E10200546308009102028052E803022A84 +:10EC7000000080D287088052640040396500403926 +:10EC8000C46864389F00076AE002005464000036DC +:10EC9000A5800011A51C0012A9C00051A45C01515F +:10ECA000BFE4007184C0899A9F00026B6301005425 +:10ECB000410000B4230000F9C0035FD65F0000717B +:10ECC000000180524210801AE9FFFF175F000071B7 +:10ECD00040018052FCFFFF170011009B630400916C +:10ECE000E6FFFF17042080D2F0FFFF174201805299 +:10ECF000CFFFFF17FD7BBEA9FD030091F35301A9D0 +:10ED0000F40300AAF30302AA610000B54AFAFF97D0 +:10ED10008102008B200400D19F0200EB42020054CC +:10ED200023F05F388200009042C02D914368633821 +:10ED3000A301103603F05F3843686338E3001037EF +:10ED4000530000B4600200F9F35341A9010080D2DE +:10ED5000FD7BC2A8E6FFFF17000400D19F0200EB75 +:10ED6000A1FEFF54530000B4610200F9000080923C +:10ED7000F35341A9FD7BC2A8C0035FD6020080D235 +:10ED8000DDFFFF17010080D2FDFFFF17A10000B0DB +:10ED9000E203002A20602791A10000B021A0289161 +:10EDA000E3E702B2210000CBA39999F221FC43933F +:10EDB000217C039B030580522100239B3F0000EB35 +:10EDC00061000054000080D2C0035FD6030840B940 +:10EDD0007F00026BA0FFFF5400A00091F8FFFF1717 +:10EDE000FD7BBDA9A10000B021A02891FD030091E9 +:10EDF000F35301A9B30000B0F51300F9F50300AA1D +:10EE0000736227910020403920030035340013CB72 +:10EE1000E0E702B2A09999F294FE4393947E009B9E +:10EE200000058052944E209B9F0213EB610000541A +:10EE3000130080D207000014611240F9E00315AA04 +:10EE400020003FD600010035600A40B9A0220039F9 +:10EE5000E00313AAF35341A9F51340F9FD7BC3A8BE +:10EE6000C0035FD673A20091F0FFFF17F35341A9CF +:10EE7000F51340F9FD7BC3A8C5FFFF17FD7BBDA9B6 +:10EE8000A10000B021A02891FD030091F35301A936 +:10EE9000B40000B094622791330014CBF51300F94D +:10EEA000F50300AA1F20003973FE4393E0E702B286 +:10EEB000A09999F2737E009B000580527352209BAB +:10EEC0009F0213EBE0000054811240F9E00315AA01 +:10EED00020003FD6E0000035800A40B9A02200396A +:10EEE000F35341A9F51340F9FD7BC3A8C0035FD6D6 +:10EEF00094A20091F3FFFF17FD7BBDA9FD030091D4 +:10EF0000F35301A9F30300AAF403012AF51300F94E +:10EF1000F50303AA02020035B2FFFF97200200B4F6 +:10EF2000030840F9230200B4E103142AE20315AAFE +:10EF3000E00313AA60003FD61F0000712100801279 +:10EF40000000811AF35341A9F51340F9FD7BC3A8D2 +:10EF5000C0035FD6E003022A8DFFFF97F0FFFF1783 +:10EF6000800B8012F8FFFF17A0048012F6FFFF1736 +:10EF7000E30302AA02008052E0FFFF17FD7BBEA957 +:10EF8000FD030091F30B00F9F30301AA3F0000F920 +:10EF9000010C40F9610600F9810000D0212C3C9160 +:10EFA000001040F9600A00F97F5A00B960E2009150 +:10EFB0007BF9FF9760620091810000B021CC37910E +:10EFC00077F9FF9700008052F30B40F9FD7BC2A850 +:10EFD000C0035FD6E60300AAE403012AE00302AA05 +:10EFE000C50040B9BFB00171E00200542C020054CA +:10EFF000BF240171E00200542C030054BF4C007187 +:10F000004003005481000090BFF0007121F8379157 +:10F0100083000090633038916210819AC30440B934 +:10F0200081000090213C389163840111C1FEFF17DB +:10F0300081000090BFF80171210438918300009095 +:10F04000F5FFFF17830000B062F43A91F4FFFF1759 +:10F050008300009062183891F1FFFF178300009041 +:10F0600062303891EEFFFF178300009062F837910D +:10F07000EBFFFF17FD7BBDA9FD030091F35301A931 +:10F08000F30301AAF40302AAF55B02A9F60300AA9E +:10F09000640B0094F50300AAE00316AA960B0094F3 +:10F0A0001F50017181010054A00A40F91F0013EBA9 +:10F0B000690100547302148B1F0013EB20048012AB +:10F0C000E023801AF35341A9F55B42A9FD7BC3A855 +:10F0D000C0035FD6A0048012FBFFFF17C0008012A0 +:10F0E000F9FFFF17FD7BBCA9FD030091F35301A9B4 +:10F0F000F30300AAF55B02A9F50301AAF60302AA2D +:10F10000F71B00F9F70303AADBFFFF9700020035A6 +:10F11000E00313AA740B0094F40300AAE00313AAFB +:10F12000400B0094010440F9E30317AAE20316AA76 +:10F13000E00314AAA102018BF35341A9F55B42A994 +:10F14000F71B40F9FD7BC4A8B3030014007C409377 +:10F15000F35341A9F55B42A9F71B40F9FD7BC4A815 +:10F16000C0035FD6FD7BBDA9FD030091F35301A948 +:10F17000F30300AAF55B02A9F50301AAF60302AAAC +:10F18000BDFFFF97C0010035E00313AA560B0094A2 +:10F19000F40300AAE00313AA220B0094010440F92F +:10F1A000E20316AAE00314AAA102018BF35341A9BA +:10F1B000F55B42A9FD7BC3A809040014007C4093C1 +:10F1C000F35341A9F55B42A9FD7BC3A8C0035FD6F9 +:10F1D000FD7BBCA9FD030091F35301A9F30300AA31 +:10F1E000F55B02A9F50301AAF60302AAF71B00F9D1 +:10F1F000F70303AAA0FFFF9700020035E00313AA5C +:10F20000390B0094F40300AAE00313AA050B009441 +:10F21000010440F9E30317AAE20316AAE00314AAC3 +:10F22000A102018BF35341A9F55B42A9F71B40F9F9 +:10F23000FD7BC4A8B1030014007C4093F35341A9A3 +:10F24000F55B42A9F71B40F9FD7BC4A8C0035FD65C +:10F25000FD7BBEA9FD030091F35301A9F30300AAAE +:10F2600000F847391F540171A104005460FE47396A +:10F270001FA802714104005460FA069114008052E4 +:10F2800001008052020040395F1840F22101005411 +:10F290000210403994060011004000915F00007197 +:10F2A0002104811A9F120071E1FEFF54C102003552 +:10F2B000810000D060DA009121681991620080D24B +:10F2C000C6F8FF97A000003520008052F35341A9F3 +:10F2D000FD7BC2A8C0035FD6810000D0604A0191C7 +:10F2E00021781991A20080D2BCF8FF97E0FEFF348C +:10F2F0009F120071E0039F5AF5FFFF170000801274 +:10F30000F3FFFF1700008052F1FFFF17FD7BBEA93E +:10F31000220080D2FD030091F30B00F9011040F9A7 +:10F3200021FC009121E47A9221000191FF6321CB1D +:10F33000010080D2F3FF009173E67A92E30313AAEF +:10F34000C00300941F0400F121010054E00313AA3C +:10F35000C0FFFF971F000071E0039F5ABF03009199 +:10F36000F30B40F9FD7BC2A8C0035FD600008012FA +:10F37000FBFFFF17FD7BB4A9FD030091F35301A927 +:10F38000F55B02A9F76303A9F96B04A9FA0302AAC2 +:10F39000FB2B00F9BF7F06A9021040F9BF7F07A928 +:10F3A00042FC0091BF7F08A942E47A924200019199 +:10F3B000BF7F09A9FF6322CBBF7F0AA9BF7F0BA92B +:10F3C0007F000471CD0000548000009000C835918A +:10F3D00002FEFF971500801253000014F7FF009102 +:10F3E000F803032AF7E67A92F60300AAF90301AAC2 +:10F3F000FB03042AF30305AAE30317AA220080D221 +:10F40000900300941F0400F1E0000054C10640B9CD +:10F41000E20319AA8000009000883691EFFDFF9763 +:10F42000EDFFFF17E1FA4739E2FE47393F5401711A +:10F43000610000545FA80271A00000548000009099 +:10F4400000383791E5FDFF97E3FFFF17A183019196 +:10F45000E00316AACAFEFF97F503002A400600350E +:10F46000E0FA0691E2FA0791F40300AA810240391A +:10F470003F1840F2A1060054811240396106003461 +:10F480007F03186B21060054B90000B42318001242 +:10F490007F14007124184F7AA0050054A03B40F956 +:10F4A000014080D2626200911F0008F10020819A21 +:10F4B000600A00F98112407980164079204000AA44 +:10F4C0000000198B600200F9811A4079801E407992 +:10F4D000204000AA600600F9E103182AE00316AAFA +:10F4E000BDFEFF9760E20091810000B0212C3C91AD +:10F4F0002BF8FF9780124039810240391FBC0371FD +:10F50000E0179F1A00781F533F000271410000541A +:10F5100000000032605A00B9150080528012403954 +:10F5200060720139BF030091E003152AF35341A92A +:10F53000F55B42A9F76343A9F96B44A9FB2B40F99A +:10F54000FD7BCCA8C0035FD6F90000B4811240391E +:10F55000C1000034231800127F14007124184F7A60 +:10F560004000005418070011944200915F0014EB12 +:10F57000E1F7FF5401104039221800125F140071A6 +:10F5800024184F7AC0020054004000919F0200EB03 +:10F5900021FFFF54E00317AA2EFFFF971F040071FD +:10F5A000A1F1FF547F0200F9014080D2C00E40F962 +:10F5B000600600F9A03B40F97F5A00B91F0008F12E +:10F5C0000020819A600A00F9810000B060E2009199 +:10F5D000212C3C91F2F7FF97D3FFFF1702104079DF +:10F5E0003F0300F101144079E50313AAE4031B2A49 +:10F5F000E303182AE00316AA414001AA21001A8B4E +:10F600004213819A5CFFFF97F503002AC6FFFF179C +:10F61000E50302AAE403012A23008052020080D2FB +:10F62000010080D254FFFF17E40300AA650000F038 +:10F630008107A0B0A5C02D9120000891020080D2C2 +:10F64000060D8012C705805281C4228B21E040390B +:10F65000A1000034A3C861386300060A631C00726D +:10F660002110871A41682038420400915F9000F110 +:10F67000C1FEFF541F900039C0035FD6FD7BBEA9B9 +:10F68000E23F80D2FD030091F30B00F9011040F935 +:10F690004208C19A4104019B220080D221FC0091C2 +:10F6A00021E47A9221000191FF6321CB010080D2F5 +:10F6B000F3FF009173E67A92E30313AAE102009448 +:10F6C0001F0400F16102005461FE4379A04A955283 +:10F6D0003F00006BE101005460FA069173FA079154 +:10F6E000820080D2416860383FB80371C100005485 +:10F6F0000310407901144079614001AA3F04007170 +:10F7000020010054004000911F0013EBC1FEFF5484 +:10F7100000008012BF030091F30B40F9FD7BC2A8EB +:10F72000C0035FD600008052FBFFFF17FD7BBBA923 +:10F73000FD030091F35301A9F30300AAF55B02A9AD +:10F74000F60301AAF71B00F9FF4F00B90100403989 +:10F7500000044039202000AA610A4039014001AA72 +:10F76000600E4039206000AA61124039018001AA70 +:10F770006016403920A000AA611A403901C001AAD0 +:10F78000601E403920E000AAA1C888D22109A4F255 +:10F79000012AC8F2418AEAF21F0001EBE00000549E +:10F7A00000008012F35341A9F55B42A9F71B40F911 +:10F7B000FD7BC5A8C0035FD674420091F50302AA81 +:10F7C000E10314AA820080D2E0330191EAF7FF97A7 +:10F7D000820080D201008052E00314AACAF7FF978A +:10F7E0006032403961364039623E4039012001AA19 +:10F7F000603A4039204000AAE10313AA0260022ABD +:10F8000000008052FAF6FF97F703002AE1330191D6 +:10F81000E00314AA820080D2D7F7FF97E04F40B9E7 +:10F820001F00176BE1FBFF5461624039606640398D +:10F83000202000AA616A4039014001AA606E403967 +:10F84000206000AA61724039018001AA60764039C7 +:10F8500020A000AA617A403901C001AA607E403927 +:10F8600020E000AA1F0016EBC1F9FF5461A2403945 +:10F8700060A64039202000AA61AA4039014001AAAF +:10F8800060AE4039206000AA61B24039018001AA0F +:10F8900060B6403920A000AA61BA403901C001AA6F +:10F8A00060BE403920E000AA1F0015EBA8F7FF5406 +:10F8B00061C2403960C64039202000AA61CA40397F +:10F8C000014001AA60CE4039206000AA61D24039CF +:10F8D000018001AA60D6403920A000AA61DA40392F +:10F8E00001C001AA60DE403920E000AA1F0015EB2C +:10F8F000E0939F5AACFFFF17FD7BBAA91F0000F1F0 +:10F90000441840FAFD030091F35301A9F55B02A9E5 +:10F91000F76303A9F92300F941010054170080524D +:10F92000BF030091E003172AF35341A9F55B42A9F5 +:10F93000F76343A9F92340F9FD7BC6A8C0035FD64E +:10F94000F30302AAF70301AA021040F9E13F80D2B3 +:10F95000F50300AAF60303AA2108C29A2208029B13 +:10F96000010080D242FC009142E47A92420001916F +:10F97000FF6322CB220080D2F8FF009118E77A9231 +:10F98000E30318AA2F020094E20300AA1F0400F167 +:10F9900061FCFF54E30313AAE10317AAE00315AACD +:10F9A00028020094F40300AA1F0400F181FBFF5415 +:10F9B0006102403960064039202000AA610A4039BE +:10F9C000014001AA600E4039206000AA611240394E +:10F9D000018001AA6016403920A000AA611A4039AE +:10F9E00001C001AA601E403920E000AA21E988D2A6 +:10F9F000C1E9A9F241AAC8F2A1A9E8F21F0001EBEE +:10FA0000A00D0054A20E40F9E10317AAE00313AAC7 +:10FA100047FFFF97F703002A20F8FF35A07640B98B +:10FA2000C001003579E20091A1430191E00319AAD8 +:10FA3000020280D2BF7F05A982F7FF9760070034DA +:10FA400040008052A07600B9E10319AAA0E201911A +:10FA5000020280D248F7FF9760424139614641393E +:10FA6000744E4139012001AA604A4139204000AA60 +:10FA700061524139146014AA60564139202000AA0D +:10FA8000615A4139014001AA605E4139206000AAF3 +:10FA9000947E001B740400B4A11240F9940600D1B6 +:10FAA000800AC19A0104019B000880D240DAFF97C6 +:10FAB000F80300AA600300B4E30300AA61264139F9 +:10FAC000A01240F9940AC09A60224139012001AA8B +:10FAD000602A413994060091E20314AA204000AA4A +:10FAE000612E4139016001AA60324139208000AAAB +:10FAF0006136413901A001AA603A413920C000AA0B +:10FB0000613E413901E001AAE00315AACD0100944C +:10FB10009F0200EB20010054E00318AADAD7FF97F8 +:10FB2000DF0200F97FFFFF1700BB41B960F9FF3426 +:10FB3000B4820E29C9FFFF17D80200F9604241398B +:10FB400061464139624E4139012001AA604A41397A +:10FB5000204000AA61524139026002AA6056413930 +:10FB6000202000AA615A4139014001AA605E413952 +:10FB7000206000AAE10318AA427C001B000080520A +:10FB80001BF6FF976262413961664139412001AA43 +:10FB9000626A4139224002AA616E4139416001AA7C +:10FBA0001F00016BC0000054C00240F9B6D7FF9798 +:10FBB0005CFFFF17570080525AFFFF173700805233 +:10FBC00058FFFF17FD7BBDA9020280D201008052C1 +:10FBD000FD030091F30B00F9F30300AAE083009109 +:10FBE000C9F6FF97E1830091E00313AA020280D2D5 +:10FBF00014F7FF971F000071E0079F1AF30B40F9FD +:10FC0000FD7BC3A8C0035FD6FD7BBDA9E30302AAA9 +:10FC1000FD030091F35301A9F40301AAF30300AA21 +:10FC2000F51300F9F50302AAE20301AA210080D22C +:10FC300032FFFF971F04007120010054610E40F94C +:10FC4000E30315AAE20314AAE00313AA210400D1D6 +:10FC50002AFFFF971F040071E0179F1AF35341A971 +:10FC6000F51340F9FD7BC3A8C0035FD6FD7BBBA99C +:10FC7000FD030091F35301A9F303012A610B80D224 +:10FC8000F55B02A9F71B00F9BF2700F9031040F943 +:10FC90002108C39A230C039B63FC009163E47A92CE +:10FCA00063000191FF6323CB7F0200710C010054BC +:10FCB000A0028012BF030091F35341A9F55B42A952 +:10FCC000F71B40F9FD7BC5A8C0035FD6F6FF009186 +:10FCD000F40302AAD6E67A92F50300AAA2230191C0 +:10FCE000E10316AAC9FFFF971F04007121FEFF540C +:10FCF000C05240B9B72740F91F00136BA20000544F +:10FD0000E00317AA60D7FF9700008012EAFFFF17F1 +:10FD100000108052735E209B730202F120FFFF549B +:10FD2000E00313AAA8FFFF97C0FEFF3461824039A9 +:10FD300060864039202000AA618A4039014001AA2A +:10FD4000608E4039206000AA61924039018001AA8A +:10FD50006096403920A000AA619A403901C001AAEA +:10FD6000609E403920E000AA800200F962A240397A +:10FD700061A64039412001AA62AA4039224002AA64 +:10FD800061AE4039416001AA62B24039228002AAC4 +:10FD900061B6403941A001AA62BA403922C002AA24 +:10FDA00061BE403941E001AA21040091210000CB4D +:10FDB000810600F9A01240F9800A00F9E00313AAB5 +:10FDC0001AFEFF97E30300AA82000090421C3B91B9 +:10FDD000010480D2806200912FFBFF9780E20091A6 +:10FDE000810000B0212C3C91EDF5FF97E00313AAB0 +:10FDF000020280D2610000F021201F9191F6FF974E +:10FE00001F00007161C24039E0179F1A00781F532C +:10FE10004100103600000032805A00B9E00317AAF2 +:10FE200019D7FF9700008052A3FFFF17E10300AA34 +:10FE300000805FF8020040F9423440F9421040F976 +:10FE4000620000B4F00302AA00021FD62000805214 +:10FE5000C0035FD6FD7BB3A9FD030091F35301A955 +:10FE6000F40300AAF55B02A9F71B00F9ED07009463 +:10FE7000F30300AA02FCFF976022403960050034BA +:10FE8000E00314AAE7070094F50300AAE00314AA0C +:10FE9000190800941F58007181040054760000F086 +:10FEA000970000D0D6963391F746089133008052E0 +:10FEB000E2C30191E103132AE00315AA2DFCFF9789 +:10FEC000E0020035830640F9E20316AAE403132A90 +:10FED000010480D2E0430191EFFAFF97E0430191E2 +:10FEE000F6F5FF97E3230191E20300AAE10317AAC5 +:10FEF000E00314AAD608009480010035E02740F9F9 +:10FF0000C8070094138400B8E1C30191020C80D2A9 +:10FF100019F6FF97E02740F9820700947306001155 +:10FF20007F06027161FCFF5400008052F35341A927 +:10FF3000F55B42A9F71B40F9FD7BCDA8C0035FD656 +:10FF4000020040F9423440F9A20000B4420C40F9EA +:10FF5000A20000B4F00302AA00021FD6A00480127F +:10FF6000C0035FD600008052FEFFFF17004440F937 +:10FF7000F4FFFF17FD7BBBA9FD030091F35301A91B +:10FF8000F55B02A9F503002AF603012AC00280529C +:10FF9000E1230191F71B00F9F70302AAE609009497 +:10FFA000F403002A80020035E02740F9130840F9E5 +:10FFB000736201D1E02740F9616201910040009134 +:10FFC0003F0000EB61000054540280120A0000144C +:10FFD000E00313AA93070094010040B93F00156B9A +:10FFE00061010054000440B91F00166B0101005468 +:10FFF000F30200F9E003142AF35341A9F55B42A987 +:02000004FFE11A +:10000000F71B40F9FD7BC5A8C0035FD6732E40F9EE +:10001000E8FFFF17FD7BB9A9FD030091F35301A988 +:10002000F30300AAF40302AAF55B02A9F50301AAEF +:10003000F60303AAF71B00F97A070094610240F95E +:10004000373440F9E40240F9440500B40140403936 +:10005000C1030034F37F04A9E5FFFFF0E10316AA12 +:10006000FF7F05A9A5B0389143008052FF7F06A904 +:10007000041040F9E0230191827C149BC6D5FF97C0 +:10008000E0000034007C4093F35341A9F55B42A9A2 +:10009000F71B40F9FD7BC7A8C0035FD6E40240F917 +:1000A000E20314AAE32B40F9E10315AAE00313AA23 +:1000B00080003FD6F30300AAE0230191DFD5FF972C +:1000C000E00313AAF1FFFF17E30316AAE20314AA41 +:1000D000E10315AAE00313AAF35341A9F00304AA0C +:1000E000F55B42A9F71B40F9FD7BC7A800021FD6AC +:1000F000A0048092E5FFFF17FD7BB9A9FD030091E5 +:10010000F35301A9F30300AAF40302AAF55B02A9C1 +:10011000F50301AAF60303AAF71B00F941070094AF +:10012000610240F9373440F9E40640F9440500B46F +:1001300001404039C1030034F37F04A9E5FFFFF01B +:10014000E10316AAFF7F05A9A5B0389123008052CC +:10015000FF7F06A9041040F9E0230191827C149BE3 +:100160008DD5FF9700010034137C4093E00313AA60 +:10017000F35341A9F55B42A9F71B40F9FD7BC7A8E2 +:10018000C0035FD6E40640F9E20314AAE32B40F96A +:10019000E10315AAE00313AA80003FD6F30300AAE7 +:1001A000E0230191A5D5FF97F1FFFF17E30316AAFE +:1001B000E20314AAE10315AAE00313AAF35341A929 +:1001C000F00304AAF55B42A9F71B40F9FD7BC7A821 +:1001D00000021FD6B3048092E5FFFF17FD7BBDA987 +:1001E000FD030091F35301A9F30300AAF40301AA4C +:1001F000F51300F9F50302AA0A070094600240F91A +:10020000003440F9030840F9230100B4E20315AAC1 +:10021000E10314AAE00313AAF00303AAF35341A9CC +:10022000F51340F9FD7BC3A800021FD6A0048092FD +:10023000F35341A9F51340F9FD7BC3A8C0035FD672 +:10024000004440F974FFFF17FD7BBCA9FD0300913A +:10025000E1E30091F35301A9F51300F9F503002A36 +:10026000C00280523409009440030035E01F40F979 +:1002700053028012140840F9946201D1E11F40F941 +:1002800080620191214000911F0001EBC1000054E8 +:10029000E003132AF35341A9F51340F9FD7BC4A8E9 +:1002A000C0035FD6E00314AADE060094010040B943 +:1002B0003F00156B81000054000440B97F02006BC1 +:1002C00073A2801A942E40F9946201D1ECFFFF17BB +:1002D000F303002AEFFFFF17FD7BBFA9FD03009189 +:1002E000DAFFFF971F4C0031A0000054E103202AE1 +:1002F000007C410BFD7BC1A8C0035FD6000080528B +:10030000FDFFFF17FD7BB8A9FD030091F35301A981 +:10031000F55B02A9F503052AF76303A9F703032A8E +:10032000F80307AAF96B04A9FA0300AAF90306AABD +:10033000FB7305A9FB0301AAFC0302AA9F04003179 +:1003400061050054E003032AE4FFFF97F403002A49 +:10035000B40AF837E3E30191E2031CAAE1031BAA04 +:10036000E0031AAABA070094F303002A40080035F4 +:10037000E03F40F9AB060094170000B9A57E40931A +:10038000E1E70232BF0001EAE1F30132E2079F1A1E +:10039000BF0001EAE1079F1A1F2000392204020B67 +:1003A000E1CF0432BF0001EA199401A9E1079F1AC5 +:1003B0004108010BA25C789242DC68F2E2079F1AC6 +:1003C000BF3C70F2220C020BE1079F1A4110010B97 +:1003D000012800B9E13F40F9140400B9014400F9D3 +:1003E000E03F40F9000300F923000014F403042A5D +:1003F000E1E30191C0028052CF080094F303002A88 +:1004000040030035E03F40F9160840F9D66201D1BB +:10041000E03F40F9C1620191004000913F0000EBD4 +:10042000610000543300801210000014E00316AA8B +:100430007C060094E10300AA000040B9FF02006BB3 +:10044000A1020054200440B99F02006B41020054F5 +:10045000E003172AE13700F9A0FFFF970002F83701 +:10046000E13740F9200400B97F02007164BA423AD2 +:1004700000F7FF54E003132AF35341A9F55B42A9A7 +:10048000F76343A9F96B44A9FB7345A9FD7BC8A891 +:10049000C0035FD6D62E40F9DDFFFF17F303002A15 +:1004A000F2FFFF17F303142AF3FFFF17FD7BB9A92F +:1004B000FD030091F35301A9F30300AAF55B02A920 +:1004C000F60301AAC10380D2F76303A9F703032A45 +:1004D000F803042AF96B04A9E40302AA620000D01D +:1004E000030440F9427C3391F903052AFA0306AA72 +:1004F000F50307AAE043019167F9FF97E0430191F3 +:100500006EF4FF97200300B4E20300AAF40300AAEC +:10051000E70315AAE00313AAE6031AAAE503192ABA +:10052000E403182AE303172AE10316AA76FFFF97CC +:10053000F303002A40010034E00314AA52D5FF97C8 +:10054000E003132AF35341A9F55B42A9F76343A9DA +:10055000F96B44A9FD7BC7A8C0035FD6A00240F990 +:1005600069060094F7FFFF1773018012F5FFFF176C +:10057000FD7BBBA9FD030091F35301A9F51300F91D +:10058000F50300AAFF2300F9FF4B00B9AD06009464 +:10059000F40300AA000041B900781F12800201B9DB +:1005A000930641B9BF3F03D5A04A40F9610000F06E +:1005B000E2F3009121EC2A91B90A0094C0000035C1 +:1005C000E13F40B960020432737A03123F000071C8 +:1005D0007302801AA04A40F9610000F0E2F3009132 +:1005E00021242B91AE0A0094C0000035E13F40B9B0 +:1005F00060020332737A02123F0000717302801AA4 +:10060000A04A40F9610000F021602B91250B009475 +:100610001F1C00724000005473020A32BF3F03D512 +:10062000930601B9930A41B9BF3F03D5A04A40F9E7 +:10063000610000F0E203019121B02B91630080D2B0 +:10064000C80A009440010035E00748292104005100 +:1006500000040051215C18532010002AE14B40B9DE +:10066000210400513300132A1300132ABF3F03D57E +:10067000930A01B9930E41B9BF3F03D5A04A40F98F +:10068000610000F0E203019121F02B91630080D220 +:10069000B40A009440010035E007482921040051C4 +:1006A00000040051215C18532010002AE14B40B98E +:1006B000210400513300132A1300132ABF3F03D52E +:1006C000930E01B9800241B900000032800201B9E5 +:1006D00000008052F35341A9F51340F9FD7BC5A8F2 +:1006E000C0035FD6FD7BB9A9FD030091F35301A9B7 +:1006F000F55B02A9F76303A9F96B04A9FB7305A9CC +:10070000460600941F0400B1200B00541BF04391D7 +:10071000F30300AA75FB7FB9BF3F03D5B55650D38D +:1007200074FF7FB9BF3F03D5945A52D3F503152AFE +:10073000940600111A0080D2403F10537902429172 +:10074000E06F00B9200080D21720DA9A3943009177 +:10075000F703372A160080D2DF0215EB230300547B +:100760005A0700915F0314EB83FEFF5464FB7FB9CB +:10077000BF3F03D58418001265FB7FB9BF3F03D587 +:100780000A0880D2A55450D366F23F9100008052EF +:10079000290080D20A01A0F29F00006B610300547F +:1007A00000008052F35341A9F55B42A9F76343A9C6 +:1007B000F96B44A9FB7345A9FD7BC7A8C0035FD6AD +:1007C000BF3F03D5E06F40B93CD30191207300B91E +:1007D000000080D233F4FF97F80300AA800340B9E9 +:1007E000BF3F03D500050036E00318AA2DF4FF979C +:1007F0001FA00FF108040054200080D262F4FF977C +:10080000D6D7FF97F6FFFF17C10040B9BF3F03D50A +:10081000E1007837217C10533F081F72E00100543B +:1008200000040011C6044091DCFFFF1763020A8B2D +:100830002B21C09A07008052BF00076BC0FEFF54F7 +:10084000680040B9E704001108010B2A680000B9EC +:1008500063044091F9FFFF17614370B92321C09AE7 +:100860002100032A614330B9EEFFFF17A002801276 +:10087000CDFFFF17600000F0008434910ED4FF9785 +:100880000DF3FF97200340B9D60600910000170A28 +:10089000200300B939074091B0FFFF17C00200B430 +:1008A000FD7BBEA9FD030091F35301A9F40300AA47 +:1008B000000040F99F0600F9133440F973E201D1BA +:1008C000800240F961E2019100A001913F0000EB3C +:1008D00081000054F35341A9FD7BC2A8C0035FD639 +:1008E000E00313AA55050094EDFFFF97733E40F90E +:1008F000F3FFFF17C0035FD6E20300AAE00301AADB +:10090000010100B4410040F9213440F9020000F92E +:10091000210440F9610000B4F00301AA00021FD6CF +:1009200000008052C0035FD6FD7BBDA9FD0300918E +:10093000F35301A9F30301AAF40300AA010040F94B +:10094000E2A30091C003805214090094C001003555 +:10095000E01740F9600200F9000040F9003440F966 +:10096000020040F9620100B4E10314AAE00313AAF3 +:1009700040003FD680000035E01740F9E10313AA9C +:10098000DEFFFF97F35341A9FD7BC3A8C0035FD6E9 +:10099000800A40B91F040071EC000054800000344C +:1009A000800E40B960FE01A9F4FFFF17000080D25D +:1009B000FDFFFF17A0028012F3FFFF17FD7BB9A90F +:1009C000E403022A620000F0FD030091F30B00F93A +:1009D000E58300917F0000F9F30303AA42340491F8 +:1009E00003008052004840F9F3090094A00000354C +:1009F0007F0200F9E10313AAE0830091CBFFFF9788 +:100A0000F30B40F9FD7BC7A8C0035FD6FD7BB9A9F6 +:100A1000E403012A03008052FD030091F30B00F967 +:100A2000F30302AAE5830091610000F0620000F088 +:100A300021E8049142340491DF0900947F0200F917 +:100A400080000035E10313AAE0830091B7FFFF9710 +:100A5000F30B40F9FD7BC7A8C0035FD6004840F9FF +:100A6000EBFFFF17200100B4010040F9E10000B4E2 +:100A7000210040F9213440F9210C40F9A10000B4D3 +:100A8000F00301AA00021FD6000080D2C0035FD687 +:100A9000A0048092FEFFFF17C00200B4FD7BBDA939 +:100AA000FD030091F35301A9F40301AAF30300AA83 +:100AB000F51300F9010040F9010200B4210040F9EA +:100AC000353440F9A11240F9210200B474FFFF97B8 +:100AD000E10314AAE00313AAF35341A9A21240F9B7 +:100AE000F51340F9F00302AAFD7BC3A800021FD64C +:100AF000000080D2C0035FD6000080D2F35341A92A +:100B0000F51340F9FD7BC3A8C0035FD6A004809213 +:100B1000FBFFFF17200100B4020040F9E20000B41F +:100B2000420040F9423440F9421440F9A20000B4B6 +:100B3000F00302AA00021FD600008052C0035FD655 +:100B4000A0048012FEFFFF17FD7BB6A9FD030091F4 +:100B5000F35301A9F40300AAF55B02A9F76303A903 +:100B6000F96B04A9004840F9A010F8B7770000F02D +:100B7000F76A0491F503012A03008052E10317AAE2 +:100B8000620000F042340491A7090094F603002AA1 +:100B9000400BF836804A40F9760000F0D606059101 +:100BA000E10316AA65090094200EF837007C4093F3 +:100BB000810080D213FC42D3E00313AAC5D5FF976E +:100BC000F70300AA800D00B4E20300AAE30313AA0E +:100BD000804A40F9E10316AA62090094400C0035EE +:100BE0007A0000F0F9E301915AC70491F603132A41 +:100BF000180080D213008052DF02186BED0A0054F7 +:100C0000E07A78B8E0080034E30319AAE203182A6E +:100C1000E1031AAAE00314AA69FFFF97F303002A6D +:100C20001F14083180000054400700341F080031B1 +:100C300041080054130080523A000014E30319AA3B +:100C4000E203132AE10317AAE00314AA5CFFFF974B +:100C50001F080031A100005473060011DF02136B5E +:100C6000E1FEFF54CCFFFF17C00300353F0740B142 +:100C700089000054E003192A40030035C6FFFF171E +:100C8000E3031AAAE203132AE10318AAE00314AA51 +:100C90004BFFFF971F14083100FEFF542002003560 +:100CA000E02B40F99F0200EBD500003560FDFF54BA +:100CB0005F0740B1A9000054E0031A2AEFFFFF17B5 +:100CC000C1FCFF54FBFFFF17E10319AAE0031AAAB6 +:100CD00091FFFF971F98003100FCFF54E0FBFF36A7 +:100CE000F35341A9F55B42A9F76343A9F96B44A902 +:100CF000FD7BCAA8C0035FD6780000F0F9E301913C +:100D0000FA43019118C7049113008052D4FFFF17D2 +:100D1000E03F40F91F0014EB9500003581000054BE +:100D200018070091B5FFFF17C1FFFF543F0740B1FF +:100D3000A9000054F303192A7F02007160D29F1AA0 +:100D4000E8FFFF17E17A78B8E00319AA53FFFF978D +:100D5000F303002A60FEFF36E00317AA4AD3FF9789 +:100D6000F6FFFF17F303002AFCFFFF171300805262 +:100D7000F2FFFF1773018012F0FFFF17000080528F +:100D8000D8FFFF17FD7BBFA921008052FD03009112 +:100D90006EFFFF9700008052FD7BC1A8C0035FD6A5 +:100DA000200100B4010040F9E10000B4210040F945 +:100DB000213440F9211840F9A10000B4F00301AA40 +:100DC00000021FD600008052C0035FD6A00480122C +:100DD000FEFFFF17200100B4010040F9E10000B45C +:100DE000210040F9213440F9211C40F9A10000B450 +:100DF000F00301AA00021FD600008052C0035FD694 +:100E0000A0048012FEFFFF1700008052C0035FD6CF +:100E1000001440F9C0035FD6FD7BBFA9FD0300911C +:100E2000000040F9F9030094FD7BC1A8001440F9CB +:100E3000C0035FD6FD7BBEA902008052FD03009176 +:100E4000F35301A9F40300AAF30301AA004840F9EF +:100E5000610000F021F4039194080094007C409319 +:100E6000601600F9E10313AAE00314AA2A0400940F +:100E7000740200F97F1600B9F35341A9FD7BC2A8A3 +:100E8000C0035FD6FD7BBEA9FD030091F30B00F903 +:100E9000F30300AADD030094E10300AAE00313AA10 +:100EA000E5FFFF9700008052F30B40F9FD7BC2A8DD +:100EB000C0035FD6FD7BBEA9FD030091F30B00F9D3 +:100EC000000040F9D1030094F30300AAE6FEFF9767 +:100ED0001F0440B1A8000054612A40B90008C19A1B +:100EE000612E40B9007C019BF30B40F9FD7BC2A849 +:100EF000C0035FD6FD7BBDA9FD030091F35301A99B +:100F0000F40300AAF51300F9C00300940100805215 +:100F1000E20300AAF30300AAE00314AAD0FEFF979D +:100F2000F503002AA0010035804A40F922008052D2 +:100F3000610000F021A003915C080094602A00B9D0 +:100F400022008052610000F0804A40F921C80391DC +:100F500056080094602E00B9E003152AF35341A906 +:100F6000F51340F9FD7BC3A8C0035FD624344CD3EE +:100F70000224001200244092213448D30320C49A52 +:100F8000800C80D20008C39A1F00007100149F1AC1 +:100F9000427C001B4220C49A4208C19A4210005170 +:100FA000422400124040002AC0035FD60000805255 +:100FB000C0035FD6FD7BBDA9E103012AFD030091BB +:100FC000F35301A9F303022AF51300F9F50300AA6C +:100FD000000040F9016861B8BF3F03D5F403012A5E +:100FE000214450D33F0400F1200200543F0800F197 +:100FF00020020054410200B53FC1FF97E103002ADF +:10100000A00240F9006873B8BF3F03D5822E48D3D1 +:1010100000244092F35341A92108C29AF51340F9E4 +:10102000FD7BC3A8007C019BC0035FD642C1FF9734 +:10103000F3FFFF1743C1FF97F1FFFF17610080D255 +:10104000F0FFFF17FD7BBEA9FD030091F35301A93B +:10105000F40300AA6D030094F30300AAE00314AAAA +:10106000EE0300941F0400B1C0000054600200F9B8 +:1010700000008052F35341A9FD7BC2A8C0035FD694 +:10108000A0028012FCFFFF17020040F9E1000035CA +:10109000425040B9BF3F03D5037D8052A200C03704 +:1010A00000008052C0035FD642A440B9FAFFFF1788 +:1010B000020040F9E1000035425040B9BF3F03D57E +:1010C00063040071C1FEFF54A00D8012F6FFFF17EC +:1010D00042A440B9FAFFFF1765000090080088524B +:1010E00009008852E40300AAA5300991FD7BBFA93D +:1010F000060080520820A0720960A072FD030091D2 +:10110000A7004079E000082AA1030035BF3F03D5BE +:10111000820040F9405000B9E00304AADBFFFF97CA +:10112000A0030035800040F921030035005440B988 +:10113000BF3F03D5A20840B90200220AA00440B96B +:101140004200002AE240022A4200092A81020035B8 +:10115000BF3F03D5800040F9025000B9E00304AA64 +:10116000C6040011C9FFFF97A5300091DF1400717C +:1011700081FCFF54FD7BC1A8C0035FD6BF3F03D5F0 +:10118000820040F940A400B9E4FFFF1700A840B96D +:10119000E8FFFF1700008052E7FFFF17BF3F03D5AE +:1011A000800040F902A400B9EDFFFF17FD7BBEA946 +:1011B000FD030091F35301A9F30300AAB4C0FF9704 +:1011C000F40300AAE00313AA10030094941A00B4D5 +:1011D000F30300AA000040F9000040B9BF3F03D567 +:1011E00000000032BF3F03D5610240F9200000B982 +:1011F0003FBCFF97BF3F03D5600240F9E10080523A +:10120000013000B93ABCFF97BF3F03D5600240F9F7 +:10121000E10F8052018800B935BCFF97610240F9A7 +:10122000204840B900741E12204800B9610240F9FC +:10123000209C40B900741E12209C00B9802640B941 +:10124000850E40B9E103052AA5781E1248FFFF97D5 +:10125000BF3F03D5610240F9254800B9821240B969 +:10126000BF3F03D5610240F9224C00B9BF3F03D50F +:10127000610240F9206000B9811640B9BF3F03D533 +:10128000600240F9015800B9811A40B9BF3F03D547 +:10129000600240F9015C00B9811E40B9BF3F03D52F +:1012A000600240F9016400B9812240B9BF3F03D513 +:1012B000600240F9016800B9812640B9BF3F03D5FB +:1012C000600240F9016C00B9810240B9BF3F03D50B +:1012D000600240F9013C00B9810640B9BF3F03D527 +:1012E000600240F9014000B9810A40B9BF3F03D50F +:1012F000600240F9014400B9804A40B9853240B9E2 +:10130000E103052AA5781E1219FFFF97BF3F03D5F9 +:10131000610240F9259C00B9823640B9BF3F03D530 +:10132000610240F922A000B9BF3F03D5610240F934 +:1013300020B400B9813A40B9BF3F03D5600240F9FB +:1013400001AC00B9813E40B9BF3F03D5600240F90E +:1013500001B000B9814240B9BF3F03D5600240F9F6 +:1013600001B800B9814640B9BF3F03D5600240F9DA +:1013700001BC00B9814A40B9BF3F03D5600240F9C2 +:1013800001C000B9812A40B9BF3F03D5600240F9CE +:10139000019400B9812E40B9BF3F03D5600240F9E6 +:1013A000019800B9610240F9204840B900040032B8 +:1013B000204800B9610240F9209C40B90004003285 +:1013C000209C00B9E00313AA0100805243FFFF975D +:1013D00021008052E00313AA40FFFF9700208052B3 +:1013E0002000A072B2BBFF97814E40B9BF3F03D52A +:1013F000600240F901D400B9815240B9BF3F03D522 +:10140000600240F901D800B9815640B9BF3F03D509 +:10141000600240F901DC00B9815A40B9BF3F03D5F1 +:10142000600240F901E000B9815E40B9BF3F03D5D9 +:10143000600240F901E400B9816240B9BF3F03D5C1 +:10144000600240F901E800B9816640B9BF3F03D5A9 +:10145000600240F901EC00B9816A40B9BF3F03D591 +:10146000600240F901F000B9BF3F03D5610240F9C5 +:1014700020008052207800B9BF3F03D5610240F9B7 +:1014800020CC00B9600240F9004840B9BF3F03D505 +:1014900000000332BF3F03D5610240F9204800B984 +:1014A000600240F9009C40B9BF3F03D50000033201 +:1014B000BF3F03D5610240F9209C00B9BF3F03D56F +:1014C000600240F91F3000B989BBFF97BF3F03D5C9 +:1014D000600240F91F8800B985BBFF97610240F99F +:1014E000201440B900741C12201400B9610240F9A4 +:1014F00020F440B9005C181220F400B9600240F9F1 +:10150000000040B9BF3F03D500781F12BF3F03D58D +:10151000610240F9200000B975BBFF9700008052BE +:10152000F35341A9FD7BC2A8C0035FD6FD7BBDA9D3 +:10153000E103012AFD030091F35301A9F30300AA7B +:10154000F51300F9000040F9006861B8BF3F03D50A +:10155000004850D31F1000718804005461000090AF +:101560002150069121486038600000100188218BCD +:1015700020001FD6F503022A01098052E00313AAB6 +:10158000820D80528CFEFF97610240F9216875B888 +:10159000BF3F03D5212840920008C19AF35341A9C7 +:1015A000F51340F9FD7BC3A8C0035FD6F403032AFB +:1015B00081138052E00313AA021880527EFEFF9727 +:1015C000610240F9216874B8F2FFFF17CABFFF97A4 +:1015D000E003002AF2FFFF17D7BFFF97FDFFFF17B9 +:1015E000D8BFFF97FBFFFF17000080D2ECFFFF176B +:1015F000FD7BBFA903168052820B8052FD03009130 +:1016000001088052CAFFFF97FD7BC1A8C0035FD6C7 +:10161000FD7BBEA9FD030091F30B00F9F30300AAC3 +:10162000F4FFFF97E003002A610240F9214440B92A +:10163000BF3F03D5212448D3F30B40F90024C19ABE +:10164000FD7BC2A8C0035FD6FD7BBDA9FD03009151 +:10165000F35301A9F30300AAF51300F9000040F9C0 +:10166000EA010094F40300AA610E40F93F0C00F176 +:1016700080040054227800D15F5400F1C810005457 +:101680005F540071881000546000009000B00B910E +:10169000005862786200001040A8208B00001FD61E +:1016A000E00314AA83158052020B805281078052F6 +:1016B0009FFFFF97810240F9213C40B9BF3F03D50E +:1016C00021284092210400910008C19AF35341A9B6 +:1016D000F51340F9FD7BC3A8C0035FD6E00314AA4D +:1016E000C4FFFF97810240F9E003002A214440B97A +:1016F000BF3F03D5210400120024C19AF4FFFF1755 +:10170000010040F9210440B9BF3F03D58100C03634 +:10171000B8FFFF97007C0153EDFFFF17B5FFFF9760 +:10172000007C0253EAFFFF17E00314AAB1FFFF9702 +:10173000810240F9E003002A214440B9BF3F03D5AC +:10174000214450D3EDFFFF17E00314AA8317805202 +:10175000020D8052811C805275FFFF97810240F973 +:1017600021E440B9BF3F03D52128409221040091D4 +:101770000008C19A008442D3D5FFFF17800240F9C8 +:10178000009440B9BF3F03D53FA000F1E003002A19 +:101790008102005400681A531F000071811A80D220 +:1017A000001B80D20010819A810240F9F5179F1A20 +:1017B000336860B8BF3F03D5604A50D3732A001224 +:1017C0001F100071E80200546100009021600C912C +:1017D00021486038600000100188218B20001FD64E +:1017E000026C1B533FA400F100701C530010821ABE +:1017F000EAFFFF1701098052E00314AA820D80520C +:10180000EDFDFF97E003002A810240F91501003445 +:10181000216440B9BF3F03D5212840920008C19AF6 +:10182000730600110008D31AA9FFFF17216840B9F9 +:10183000F9FFFF1781138052E00314AA02188052A7 +:10184000DDFDFF97E003002A810240F975000034B6 +:1018500021B840B9F0FFFF1721BC40B9EEFFFF17D8 +:1018600025BFFF97EFFFFF1733BFFF97EDFFFF1770 +:1018700034BFFF97EBFFFF17E00314AA65FFFF9744 +:10188000E003002A92FFFF17E00314AA61FFFF970D +:10189000A4FFFF17A00080928DFFFF17C10228361A +:1018A000FD7BBEA9FD030091F35301A913FC0011B8 +:1018B00073661A12000880D2737E4093E10313AA64 +:1018C000BBD2FF97F40300AAE00000B4E20313AA1E +:1018D000010080528CEFFF978102138BE00314AA62 +:1018E00086C1FF97E00314AAF35341A9FD7BC2A868 +:1018F000C0035FD6017C4093200080D275D2FF17D1 +:10190000FD7BB9A9FD030091F35301A9F40301AADA +:10191000F55B02A9F60300AAF76303A9F80303AA7B +:10192000F70306AAF96B04A9F90302AAFA0304AAA9 +:10193000FB2B00F9FB0305AA460000B4DF0000F909 +:10194000591100B4800A40B9E1A301917A030094CF +:10195000F503002A400C0035011380D2200080D20C +:101960005CD2FF97F30300AA401000B415E0019188 +:1019700000A0019101008012B55600A9000000A945 +:1019800060620191000000A9746600A9E03740F987 +:10199000780A00F97ADA02A9602200F9618E00B9AA +:1019A0007B4A00F9000440F9017440B90101003795 +:1019B000E03740F9010440F9217440B9810108374A +:1019C00016040094608E00B909000014010040F96B +:1019D00001FFFFB4FBFEFFB7406A40F9633202919A +:1019E000E2031B2AA3EBFF9740FEFF35805E40B960 +:1019F00040010034380100B5608A40B900001F3250 +:101A0000608A00B9200080D2815E80B931D2FF9710 +:101A1000400A00B4600A00F9E03740F9000440F9D8 +:101A2000016840B921010034608A40B9217C4093AB +:101A300000001C32608A00B9200080D225D2FF97B6 +:101A4000C00800B4601200F9D60200B4C00240F928 +:101A5000016440B9A1000035C02240F9000440F9FA +:101A6000017040B921010034608A40B9217C409363 +:101A700000001D32608A00B9200080D215D2FF9785 +:101A8000C00600B4600E00F9C13A40F9D53A00F939 +:101A9000C0A20191603E00F9A10600F9350000F9ED +:101AA000E00313AAE8040094F503002AA00500351A +:101AB000810E40F9410200B5360300B5E03740F928 +:101AC000000440F9010840F9A10300B5370400B54E +:101AD000608A40B900001A32608A00B9E003152A12 +:101AE000F35341A9F55B42A9F76343A9F96B44A9F4 +:101AF000FB2B40F9FD7BC7A8C0035FD6E00313AA08 +:101B000020003FD6F403002A80FDFF34E00313AA2F +:101B1000F503142ADCCFFF97F1FFFF17C00240F94D +:101B2000012040F9C1FCFFB4E00313AA20003FD616 +:101B3000F403002A40FCFF34F5FFFF17E00313AA6B +:101B400020003FD6F403002A20FCFF34F0FFFF17EB +:101B5000F30200F9DFFFFF1774018012ECFFFF179B +:101B6000F403002AEAFFFF17B5028012DCFFFF171B +:101B700075018012DAFFFF17E60305AAE50304AA40 +:101B8000E40303AA030080D25EFFFF17FD7BBDA91B +:101B9000FD030091F35301A9F40300AAF30302AA81 +:101BA000F55B02A9361C0012F50303AA400040F9B8 +:101BB00028010094C00100B4E10300AA76000034BB +:101BC000007040B9E0011036E60315AAE00314AA3C +:101BD000620E40A905008092F35341A9040080D20F +:101BE000F55B42A9FD7BC3A846FFFF1720008012CA +:101BF000F35341A9F55B42A9FD7BC3A8C0035FD69F +:101C000000008012FBFFFF17800800B4FD7BBEA917 +:101C1000FD030091F35301A9F30300AA008840B922 +:101C2000600060360000805231000014601A40F9F4 +:101C3000800400B5740240F9805A40B9C0040035F0 +:101C4000602240F9010440F9206440B9E00000340A +:101C5000622640F9A20000B5217440B910FFFF9739 +:101C6000400400B4602600F9611A40F9C10100B4D3 +:101C7000200040F9006040B9A0000035202040F964 +:101C8000000440F9006C40B9E0000034612A40F9DA +:101C9000A10000B5817240B901FFFF97600200B456 +:101CA000602A00F9600240F9011C40F9A10200B568 +:101CB000608A40B900001432608A00B9DAFFFF1769 +:101CC000D2FFFF9740010035608A40B940FB67367C +:101CD000D5FFFF17611E40F941FBFFB5817240B986 +:101CE000EFFEFF97A00000B560018012F35341A9F9 +:101CF000FD7BC2A8C0035FD6601E00F9D1FFFF17AD +:101D0000604A40F960FDFFB7E00313AA20003FD608 +:101D100000FDFF34F6FFFF17A0028012C0035FD65C +:101D2000000700B4FD7BBEA9FD030091F35301A998 +:101D3000F30300AA018840B9A100003600008052D8 +:101D4000F35341A9FD7BC2A8C0035FD6140040F93C +:101D5000AEFFFF9720010035601A40F9600100B521 +:101D6000608A40B900000032608A00B9E00313AA1B +:101D70005104009440010034618A40B921781F1257 +:101D8000618A00B9EFFFFF17E6FFFF9760FFFF359D +:101D9000608A40B960FE0736E9FFFF17601A40F914 +:101DA000A00100B5604A40F9A000F8B7E00313AA0B +:101DB0000100805265FBFF9700FEFF35811240F95C +:101DC000810100B5E00313AA5504009480FBFF34A1 +:101DD000EAFFFF17000040F9012440F941FEFFB47B +:101DE000E00313AA20003FD6E0FDFF34E3FFFF1716 +:101DF000E00313AA20003FD660FEFF34DFFFFF1789 +:101E0000A0028012C0035FD6400000B4000840F971 +:101E1000C0035FD6400000B4000C40F9C0035FD699 +:101E2000400000B4001040F9C0035FD6400000B489 +:101E3000001C40F9C0035FD6400000B4002440F904 +:101E4000C0035FD6400000B4002840F9C0035FD64D +:101E5000023440F903A001915F0003EB40E001D19F +:101E600000109F9A200000F900008052C0035FD646 +:101E7000010040F9221840F9233C40F942A00191A9 +:101E800061E001D17F0002EB21109F9A010000F96F +:101E900000008052C0035FD65F0000F9038C46F853 +:101EA00063E001D1E40303AA858C47F89F0000EBAF +:101EB000610000544002801208000014642040F9C0 +:101EC000840440F9840840B93F00046B8100005449 +:101ED00000008052430000F9C0035FD6A3E001D1A7 +:101EE000F1FFFF17001840F9C0035FD6001440F956 +:101EF000C0035FD6002040F9000440F9000840B953 +:101F0000C0035FD6018840B921001932018800B9A9 +:101F1000C0035FD6012400F9C0035FD6FD7BBDA9D5 +:101F2000FD030091F35301A9F40300AAF303012A6E +:101F3000F51300F9154840F9406A40F9E103152A04 +:101F400071E7FF97E103002A406A40F9E403132A8E +:101F5000E203152A06008052050080D2630000F0DB +:101F600063A40B9178EBFF97F30300AA1F0400B161 +:101F700060010054801A40F9DFFFFF971FB801711C +:101F8000E1000054E10313AAF51340F9801A40F967 +:101F9000F35341A9FD7BC3A812040014E00313AA64 +:101FA000F35341A9F51340F9FD7BC3A8C0035FD6E5 +:101FB000FD7BBEA9E303012AE40302AAFD0300910D +:101FC000F35301A9F30300AAF403012A019040B9D5 +:101FD00005008052406A40F9620000F042A40B9173 +:101FE00083EBFF97E103142AE00313AAF35341A9FB +:101FF000FD7BC2A8CAFFFF17FD7BBFA9FD030091AF +:10200000ECFFFF971F0400B141000054000080D294 +:10201000FD7BC1A8C0035FD601008052C0FFFF173F +:10202000FD7BBFA9FD030091BDFFFF971F0400B119 +:1020300041000054000080D2FD7BC1A8C0035FD6E0 +:1020400001008052F7FFFF17F6FFFF17FDFFFF1794 +:10205000FD7BBDA9810000B021E02691FD03009128 +:10206000F35301A99400009094C23B91330014CB28 +:10207000F51300F9F50300AAE0EB03B273FE4393F6 +:10208000E0DD9DF2737E009B000F80527352209B17 +:102090007F0214EBE1000054140080D2E00314AA84 +:1020A000F35341A9F51340F9FD7BC3A8C0035FD6E4 +:1020B000810240F9E00315AA3FEDFF9700FFFF34CE +:1020C00094E20191F3FFFF17810000B0E203002AC0 +:1020D00020802A91810000D021200E91E3EB03B2F1 +:1020E000210000CBE3DD9DF221FC4393217C039B87 +:1020F000030F80522100239B3F0000EB610000543E +:10210000000080D2C0035FD6030840B97F00026B95 +:10211000A0FFFF5400E00191F8FFFF17FD7BB9A974 +:10212000FD030091F35301A9940000B094E22691BD +:10213000F96B04A93A1C0012810000B021202791FC +:10214000F90300AA210014CBF55B02A91500805207 +:1021500033FC4493F76303A958018052FB2B00F929 +:10216000FB03132A170080D2160080527F03176BDF +:102170000C020054BF020071A41A4B3AB512961A11 +:10218000DF2E00316100005418070071A1FEFF54DA +:10219000E003152AF35341A9F55B42A9F76343A96C +:1021A000F96B44A9FB2B40F9FD7BC7A8C0035FD6A0 +:1021B000E1031A2AE3A301918212178BE00319AA03 +:1021C00073FEFF97010400113F0400718900005461 +:1021D000DF0200710018423AD602801AF706009119 +:1021E000E3FFFF17FD7BBDA9FD030091F35301A998 +:1021F000F30300AAF40302AAE00301AAF55B02A913 +:10220000F50303AAF60304AA92FFFF97600100B446 +:10221000E10300AAE50316AAE40315AAE20314AA3F +:10222000E00313AA030080D2F35341A9F55B42A94E +:10223000FD7BC3A851FEFF1720008012F35341A974 +:10224000F55B42A9FD7BC3A8C0035FD6E40303AAE4 +:1022500003008092E4FFFF17FD7BB7A9FD03009107 +:10226000F35301A993000090F40301AAF55B02A9BE +:1022700073C23B91960000B0F76303A9D6E22691A2 +:10228000F50302AAF96B04A9F80303AAFB7305A9D5 +:102290009C1C0012E03F00F9420000B45F0000F90E +:1022A000E00314AABD030094E2130291610000B0A0 +:1022B000217C1591E03B00F9E00314AAEC030094A3 +:1022C000F70300AAE00200B4D60213CBE0EB03B29E +:1022D000E0DD9DF2D6FE4393D67E009B000F805238 +:1022E000C04E209B16008052E03700F9E08740B9CD +:1022F0001F00166BCD010054FBC2368BFA0313AAE4 +:10230000E03740F91F001AEB21020054E0031BAA3A +:10231000C9ECFF9700040091D602000BF4FFFF17F1 +:10232000E08740B91F040031410000540000805292 +:10233000F35341A9F55B42A9F76343A9F96B44A99B +:10234000FB7345A9FD7BC9A8C0035FD6F80000B4A4 +:102350005F0318EB600000545AE30191E9FFFF1797 +:10236000590B40F9390400B4590B40F979FFFFB417 +:10237000200340F920FFFFB4E1031BAA8EECFF9776 +:102380006000003439430091FAFFFF17BC020034AB +:10239000E00314AAF50300941F1C007261000054AE +:1023A000407340B940FC1736D90100B5030080D214 +:1023B000E20347A9E5230291E40314AAE1031AAA60 +:1023C000EEFDFF971F4C003120FAFF5420FBFF3534 +:1023D000F5FAFFB4E14740F9A10200F9D5FFFF1774 +:1023E000230740F9F3FFFF173CFEFF34E9FFFF1717 +:1023F000FD7BBCA9FD030091F35301A9F55B02A984 +:10240000F76303A92105F8B7F50300AA561C0012CB +:10241000406A40F9170080121400805210E4FF97C0 +:102420001F00007113A0971A737E40937F0600B1BE +:10243000E1000054E003142AF35341A9F55B42A9DB +:10244000F76343A9FD7BC4A8C0035FD6E00313AACA +:1024500052030094406A40F9F803132AE103132A57 +:10246000F4E8FF9740010034E403162AE10313AABD +:10247000E00315AA030080D2020080D277FFFF9705 +:102480001F000071801A407A9412801A406A40F945 +:10249000E103182AFFE3FF971F00007113A0971AAA +:1024A000737E4093E2FFFF1714008052E2FFFF1794 +:1024B000FD7BBDA9FD030091F35301A9F30300AA1D +:1024C000F51300F9351C0072004840F94101005431 +:1024D000608A40B980017836E00313AA11FEFF97A5 +:1024E00020010034F35341A9F51340F9FD7BC3A843 +:1024F000C0035FD66001F8B6600240F9007040B9D1 +:1025000080FE1737748E46F894E201D180E2019183 +:102510001F0013EBE100005400008052F2FFFF1790 +:10252000920300941F1C007241FDFF54F3FFFF173C +:10253000E00314AAE103152ADEFFFF97943E40F959 +:10254000F2FFFF17405640F9C00200B5FD7BBFA95E +:1025500040E2029182000090FD030091406600F984 +:1025600042200A91000000A943A20291010080527A +:10257000000080D286FDFF9700010035415640F9EA +:102580003F4800F9405640F9E6FDFF9760000035EE +:1025900041820691210400A9FD7BC1A8C0035FD63A +:1025A000A0028012C0035FD6FD7BBFA9E103002A11 +:1025B000FD030091405640F9D9FEFF971F080031F6 +:1025C0004100005400008052FD7BC1A8C0035FD6CB +:1025D000420640F9014840F9E20322AA42000012F3 +:1025E00084FFFF17435640F9E203002A010080D21E +:1025F000E00303AA7FFFFF17FD7BBBA9FD0300914A +:10260000F35301A9141C0012600000D000C0149103 +:10261000E01F00F9600000B000D40B91E02300F946 +:10262000600000B000F40B91F51300F9E02700F909 +:10263000E003142AECFFFF97A0010035F5E30091B9 +:10264000130080D2A07A73F8FF020094E10300AA7D +:10265000405640F9E203142A66FFFF9780000035D8 +:10266000730600917F0E00F1E1FEFF54F35341A980 +:10267000F51340F9FD7BC5A8C0035FD6000080526A +:10268000C0035FD6FD7BBEA9FD030091F30B00F9EB +:10269000131C001200008052ABFFFF97E0010035D1 +:1026A000E003132AC1FFFF9780010035E003132ADE +:1026B000D2FFFF9720010035E003132AF0FFFF97B8 +:1026C000C0000035E103132AF30B40F9FD7BC2A8DB +:1026D000405640F977FFFF17F30B40F9FD7BC2A886 +:1026E000C0035FD6E303002AE20312AA405640F972 +:1026F000400100B4406640F9010040F9208000D15B +:10270000E10300AA446440F9250C42F89F0001EB64 +:1027100061000054000080D2C0035FD6010440F97C +:10272000210840B93F00036B80FFFF54A08000D117 +:10273000F4FFFF17FD7BBCA9FD030091F35301A932 +:10274000F55B02A9F71B00F9F70301AA416640F9FE +:10275000010800B4FF0200F9E603002AE2FFFF9738 +:10276000400700B5E003062A58FEFF97F60300AACB +:10277000400700B4010680D2200080D2D5CEFF975A +:10278000F30300AAE00600B4C16240B9C1000034FE +:10279000217C4093200080D2CECEFF97200500B44C +:1027A000600200F97582009160420091760600F99E +:1027B000B55600A9000000A9406640F9010040F9A3 +:1027C000350400F9611200F9A00600F9150000F9BE +:1027D000C12A40F9010300B4E00313AA20003FD648 +:1027E000F403002A80020034C06240B98000003443 +:1027F000600240F9A4CCFF977F0200F9611240F912 +:10280000A00640F9200400F9010000F97F1200F948 +:10281000BF0600F9E00313AA9BCCFF97E003142A3C +:10282000F35341A9F55B42A9F71B40F9FD7BC4A80E +:10283000C0035FD6F30200F914008052F8FFFF17BF +:1028400074018012F4FFFF17E00200F9FBFFFF178D +:1028500054048012F2FFFF17F40B8012F0FFFF17F1 +:1028600074018012EEFFFF17FD7BBDA9FD030091EF +:10287000F35301A9F303012AF40302AA5F0000F94C +:10288000E1A30091ACFFFF9700020035E11740F98A +:1028900024400091230840F99F0003EBE00000541E +:1028A000636001D1E103132AE20303AA458C45F8D2 +:1028B0009F0002EB610000544002801203000014EC +:1028C000A1000035830200F9F35341A9FD7BC3A8A1 +:1028D000C0035FD6A36001D121040051F3FFFF17AD +:1028E000FD7BBDA9FD030091F30B00F9F30301AAE1 +:1028F0003F0000F9E1A300918FFFFF970001003531 +:10290000E11740F922400091210840F93F0002EB15 +:1029100060000054216001D1610200F9F30B40F91D +:10292000FD7BC3A8C0035FD6FD7BBBA9FD0300915F +:102930007F0000F9F35301A9F55B02A9F76303A92E +:10294000610400B4F60301AA557C4093F70303AA7F +:10295000E123019178FFFF97F303002A80020035FD +:10296000F82740F9140F41F8946201D18062019177 +:102970001F0018EB61000054530280120C00001479 +:10298000800640F9E20315AAE10316AA13EBFF97AC +:10299000F303002A80010035800640F926EBFF97FB +:1029A000BF0200EB01010054F40200F9E003132A16 +:1029B000F35341A9F55B42A9F76343A9FD7BC5A881 +:1029C000C0035FD6942E40F9E8FFFF17B3028012D0 +:1029D000F7FFFF17FD7BBDA9FD030091F35301A98C +:1029E000F403002AF30301AAE00301AAF51300F996 +:1029F000F50302AA10EBFF97E30315AAE203002AEE +:102A0000E10313AAE003142AF35341A9F51340F993 +:102A1000FD7BC3A8C5FFFF17FD7BBEA9FD03009189 +:102A2000F30B00F9F30300AA000440F9017440B964 +:102A300021020036426A40F9010040F9C20100B4A7 +:102A4000406A40F9D5E7FF97E10313AA220C41F849 +:102A5000426001D1E30302AA648C45F87F0001EBD8 +:102A6000E100005400040011F30B40F9FD7BC2A803 +:102A7000C0035FD600008012F4FFFF17428C40B9FC +:102A80001F00026B00A0821A826001D1F2FFFF17C3 +:102A90005F0000F93F0400316100005440028012E1 +:102AA000C0035FD6FD7BBDA9FD030091F35301A9CF +:102AB000F303012AF40302AAE1A300911EFFFF978A +:102AC00020010035E11740F9230C41F8636001D182 +:102AD000E20303AA448C45F85F0001EBA100005417 +:102AE00040028012F35341A9FD7BC3A8C0035FD607 +:102AF000628C40B95F00136B61000054830200F9DF +:102B0000F9FFFF17836001D1F2FFFF175F0000F9A3 +:102B10006100F83640028012C0035FD6FD7BBDA97C +:102B2000FD030091F35301A9F303012AF40302AA60 +:102B3000E1A3009100FFFF9720010035E11740F964 +:102B4000230C41F8636001D1E20303AA448C45F8E9 +:102B50005F0001EBA100005440028012F35341A931 +:102B6000FD7BC3A8C0035FD6624840F97F02026BB9 +:102B700061000054830200F9F9FFFF17836001D15F +:102B8000F2FFFF175F0000F96100F8B64002801203 +:102B9000C0035FD6FD7BBDA9FD030091F35301A9DE +:102BA000F30301AAF40302AAE1A30091E2FEFF9756 +:102BB00020010035E11740F9230C41F8636001D191 +:102BC000E20303AA448C45F85F0001EBA100005426 +:102BD00040028012F35341A9FD7BC3A8C0035FD616 +:102BE000624840F95F0013EB61000054830200F972 +:102BF000F9FFFF17836001D1F2FFFF17FD7BBCA92E +:102C0000FD030091F35301A9F40301AAE1E300914C +:102C1000F51300F9F50302AAC7FEFF97200200355D +:102C2000E01F40F9130C41F8736201D1E30313AACA +:102C3000618C45F87F0000EB610000544002801277 +:102C400008000014620240F95F0014EB21010054F7 +:102C5000E00313AA33FCFF9740000035B30200F9EC +:102C6000F35341A9F51340F9FD7BC4A8C0035FD617 +:102C7000336001D1EEFFFF17C1010035FD7BBEA916 +:102C8000FD030091F35301A9F40300AAF30302AA80 +:102C900024FCFF97E103002A40000035740200F98C +:102CA000E003012AF35341A9FD7BC2A8C0035FD60C +:102CB000E003012AC0035FD6FD7BBDA9FD0300919F +:102CC000F30B00F9F30302AAE2A300917F0200F9DB +:102CD000E6FEFF97E103002AE01740F9E20313AA9A +:102CE000E6FFFF97F30B40F9FD7BC3A8C0035FD657 +:102CF000FD7BBDA9FD030091F30B00F9F30302AACC +:102D0000E2A300917F0200F933FFFF97E103002A5D +:102D1000E01740F9E20313AAD8FFFF97F30B40F93D +:102D2000FD7BC3A8C0035FD6FD7BBDA9FD03009159 +:102D3000F30B00F9F30302AAE2A300917F0200F96A +:102D400054FFFF97E103002AE01740F9E20313AABA +:102D5000CAFFFF97F30B40F9FD7BC3A8C0035FD602 +:102D6000FD7BBDA9FD030091F30B00F9F30302AA5B +:102D7000E2A300917F0200F965FFFF97E103002ABB +:102D8000E01740F9E20313AABCFFFF97F30B40F9E9 +:102D9000FD7BC3A8C0035FD6FD7BBDA9FD030091E9 +:102DA000F30B00F9F30302AAE2A300917F0200F9FA +:102DB00075FFFF97E103002AE01740F9E20313AA29 +:102DC000AEFFFF97F30B40F9FD7BC3A8C0035FD6AE +:102DD000FD7BBEA9FD030091F30B00F9F30301AAEB +:102DE0003F0000F9BFFEFF97E0000035610240F9A7 +:102DF000A10000B4F30B40F9E00301AAFD7BC2A8D7 +:102E0000C8FBFF17F30B40F9FD7BC2A8C0035FD6D8 +:102E1000FD7BBEA9FD030091F30B00F9F30301AAAA +:102E2000ECFFFF97A0000035600240F91F0000F1A1 +:102E300040028012E013801AF30B40F9FD7BC2A818 +:102E4000C0035FD6FD7BBEA9FD030091F35301A92A +:102E500014600191012040F921400091220440F9C1 +:102E6000340400F9018805A9540000F9011840F95B +:102E7000E10100B4212040F9210440F9211C40F96E +:102E8000610100B4F30300AA20003FD6A000003483 +:102E9000628645A9410400F9220000F97FFE05A9D8 +:102EA000F35341A9FD7BC2A8C0035FD60000805246 +:102EB000FCFFFF17FD7BBEA9FD030091F30B00F99A +:102EC000F30300AA012040F9210440F9211040F940 +:102ED000A10000B5601A40F9000100B50000805261 +:102EE0000300001420003FD660FFFF34F30B40F9CD +:102EF000FD7BC2A8C0035FD6002040F9000440F962 +:102F0000012040F9C1FEFFB4E00313AAF00301AAB7 +:102F1000F30B40F9FD7BC2A800021FD6FD7BBEA9C2 +:102F2000FD030091F30B00F9F30300AA011840F927 +:102F3000210100B5602240F9000440F9011440F974 +:102F4000810100B500008052F30B40F9FD7BC2A85F +:102F5000C0035FD6212040F9210440F9212440F923 +:102F6000A1FEFFB420003FD660FEFF34F7FFFF173D +:102F7000E00313AAF00301AAF30B40F9FD7BC2A8FA +:102F800000021FD6FD7BBDA9FD030091F35301A9EB +:102F9000F40300AAA3FBFF97F30300AA610000B0AB +:102FA000804A40F9E283009121F81691630080D2B3 +:102FB0006C000094E0000035E02340B9600200F9A5 +:102FC000E02740B9600A00F9E02B40B9600600F93B +:102FD000E00314AAF35341A9FD7BC3A87DFDFF17AD +:102FE000FD7BBEA9FD030091F30B00F9F30301AAD9 +:102FF0008CFBFF97010040F93F0013EB08010054E0 +:10300000020440F92200028B5F0013EB8900005498 +:10301000000840F97302008B730201CBE00313AA8E +:10302000F30B40F9FD7BC2A8C0035FD6FD7BBDA9B1 +:10303000FD030091F35301A9F303022AE20301AA5D +:10304000E103002AF40303AA406A40F9E3B30091C4 +:1030500069E2FF97C00100B462060011E12F80B958 +:10306000427C7E933F0002EB630100540000028B20 +:1030700000C05FB80008C05A800200B9000080524A +:10308000F35341A9FD7BC3A8C0035FD6A002801201 +:10309000FCFFFF1740098012FAFFFF17E30302AAA3 +:1030A00002008052E2FFFF17FD7BBEA9FD030091E5 +:1030B000E3730091E21F00B902008052DCFFFF972A +:1030C000E01F40B9FD7BC2A8C0035FD6FD7BBEA94F +:1030D000FD030091E21F00B9E2730091F0FFFF973A +:1030E000E01F40B9FD7BC2A8C0035FD6FD7BBDA930 +:1030F000FD030091F30B00F9F30302AAE20301AA16 +:10310000E103002A406A40F9E3B300913AE2FF97F5 +:10311000E00000B5730000B401008012610200B944 +:10312000F30B40F9FD7BC3A8C0035FD6B3FFFFB428 +:10313000E12F40B9FAFFFF17FD7BBEA9FD03009107 +:10314000E2730091EAFFFF97E11F40B91F0000F111 +:10315000A0028012FD7BC2A82010801AC0035FD697 +:10316000E403032AE30302AAE20301AAE103002A1B +:10317000406A40F94FE6FF17FD7BBFA9E10300AAB3 +:10318000FD030091406A40F9DFE2FF97007C409325 +:10319000FD7BC1A8C0035FD6E10300AA8000F8B799 +:1031A000406A40F9020080D240E1FF17000080D25F +:1031B000C0035FD6FD7BB9A9FD030091F35301A9BC +:1031C000F30305AAE503042AE403032AE30302AA9E +:1031D000E20301AAE103002A406A40F9E6A3009154 +:1031E00054E6FF97F403002A60010035E103452906 +:1031F000600A00B9020880D2603200913F0000717D +:1032000021A09F5A217C4093610200F9E1C3009103 +:1032100059E9FF97E003142AF35341A9FD7BC7A89E +:10322000C0035FD6E403032AE30302AAE20301AA70 +:10323000E103002A406A40F9060080D205008012AE +:103240003CE6FF17FD7BBFA9E10300AAFD03009147 +:10325000406A40F96EE2FF971F00007100A09F5A7C +:10326000FD7BC1A8007C4093C0035FD6E30302AAA4 +:10327000E20301AAE103002A406A40F9DEE1FF17F8 +:10328000FD7BBFA9020080D2FD030091F8FFFF97EC +:103290001F0000F1E0079F1AFD7BC1A8C0035FD6A5 +:1032A000F8FFFF17E10300AA406A40F90AE5FF179B +:1032B000E10300AA406A40F914E5FF17FD7BBCA9B1 +:1032C000FD030091F35301A9F30300AAF40302AA3A +:1032D000F55B02A9F503012AF71B00F9771C001220 +:1032E000620000B4E07F40B2400000F9E00313AA9E +:1032F000A2FFFF97ECFFFF97F603002AE00313AA53 +:103300009EFFFF97EBFFFF97E503002AE703172ACD +:10331000E60314AAE403162AE303152AE103132A99 +:10332000620000B0F35341A942A40B91F55B42A99E +:10333000F71B40F9FD7BC4A8406A40F95DE6FF1722 +:1033400023008052DEFFFF17FD7BBEA9FD03009125 +:10335000E2630091FBFFFF97FD7BC2A8C0035FD62D +:1033600001008052F9FFFF1720008052C0035FD692 +:10337000FD7BBDA9E303012AE103002AFD030091BF +:10338000F30B00F9E4830091F30302AA620000B09A +:10339000406A40F942A40B91B4E6FF97A001F837C8 +:1033A000E00313AA020780D201008052D6E8FF97FB +:1033B000E01340F9600200F9E01740F9600600F9F7 +:1033C00000008052F30B40F9FD7BC3A8C0035FD619 +:1033D000A0028012FCFFFF17FD7BBFA9E403032AB4 +:1033E000E30302AAFD030091E20301AAE103002A1C +:1033F000406A40F955E2FF97007C4093FD7BC1A8ED +:10340000C0035FD6FD7BBEA9FD030091F35301A964 +:10341000F40300AAF303012A6000009000A835918C +:1034200089FFFF97C000F8B7E203132AE10314AA4B +:10343000F35341A9FD7BC2A81CFFFF17E003132A29 +:10344000F35341A9FD7BC2A8C0035FD6014840F9F0 +:103450006100F8B600008052C0035FD6FD7BBBA9B7 +:10346000FD030091F35301A9740000B094A60B91E1 +:10347000F55B02A9750000B0B5CA0A91F76303A90C +:10348000406A40F9F6DFFF971F00007100A09F5AC5 +:10349000137C40937F0600B1E1000054000080528D +:1034A000F35341A9F55B42A9F76343A9FD7BC5A886 +:1034B000C0035FD6E00313AA38FFFF97600000B592 +:1034C000A0028012F7FFFF17E3330191E10314AA72 +:1034D000E00313AA22008052D5FEFF97F703002ACB +:1034E00000FFFF35E00313AA9EFFFF97F80300AA31 +:1034F0001F0400B160FEFF54E2230191E10315AA0D +:10350000E00313AAFAFEFF97C0FDFFB4E14B80B9B8 +:10351000820180D2E57F40B22108C29AE14B00B916 +:10352000E14B40B9FF02016B0B010054406A40F9C6 +:10353000E103132AD7DFFF971F00007100A09F5AF5 +:10354000137C4093D4FFFF17020C402900300091F8 +:10355000E84F40B94108C05A4208C05A04C05FB899 +:10356000471000918608C05A8408C05A1F0107EB13 +:1035700062010054410000F0600000B021542A9123 +:1035800000200B9195EDFF97E14F40B9600000B02E +:1035900000B40B9191EDFF97CAFFFF17040100B42F +:1035A0003600180B6208C05A2100180B9F0005EB6B +:1035B00001010054BF3F03D5220000B9E103162AE0 +:1035C000210040B9BF3F03D5F7060011D5FFFF1713 +:1035D000230040B96200024A4200060A4200034A40 +:1035E000F6FFFF17014840F96100F8B6000080526D +:1035F000C0035FD6FD7BBBA9FD030091F35301A976 +:10360000740000B094A60B91F55B02A9750000B0A0 +:10361000B5CA0A91F76303A9406A40F990DFFF97A2 +:103620001F00007100A09F5A137C40937F0600B1D9 +:10363000E100005400008052F35341A9F55B42A918 +:10364000F76343A9FD7BC5A8C0035FD6E00313AAB7 +:10365000D2FEFF97600000B5A0028012F7FFFF17AF +:10366000E3330191E10314AAE00313AA220080527C +:103670006FFEFF97F703002A00FFFF35E00313AA50 +:1036800038FFFF97F80300AA1F0400B160FEFF5443 +:10369000E2230191E10315AAE00313AA94FEFF9728 +:1036A000C0FDFFB4E14B80B9820180D2E57F40B21A +:1036B0002108C29AE14B00B9E14B40B9FF02016B0E +:1036C0000B010054406A40F9E103132A71DFFF97B0 +:1036D0001F00007100A09F5A137C4093D4FFFF1776 +:1036E000020C402900300091E84F40B94108C05A0F +:1036F0004208C05A04C05FB8471000918608C05AFB +:103700008408C05A1F0107EB62010054410000F019 +:10371000600000B021A82A9100200B912FEDFF97A7 +:10372000E14F40B9600000B000B40B912BEDFF9762 +:10373000CAFFFF17040100B43600180B6208C05A14 +:103740002100180B9F0005EB01010054BF3F03D57A +:10375000220000B9E103162A210040B9BF3F03D57A +:10376000F7060011D5FFFF17230040B96200024A97 +:103770004200060A4200034AF6FFFF17600000B04D +:1037800000480C91FD7BBFA9FD0300914AC8FF973B +:103790006BB5FF97400E8012FD7BC1A8C0035FD6BA +:1037A000FD7BBDA9FD030091F35301A9F40300AA19 +:1037B000F303032AF55B02A9F50301AAF60302AAA3 +:1037C000E20316AAE10315AAE00314AA7F060094F7 +:1037D00080000034730600517F06003121FFFF5442 +:1037E000F35341A9F55B42A9FD7BC3A8C0035FD693 +:1037F000FD7BBCA9FD030091F30B00F9F30300AAC4 +:1038000020008052E043007920008052E02700B978 +:10381000FF2B00B941010034610240F9603E40B91C +:10382000210C40B90100010A00040312213C1912C5 +:103830002100002A21000232E12B00B9E18300912E +:10384000E00313AA020080D26006009460000035F5 +:10385000E12F40B9613E00B9F30B40F9FD7BC4A8EC +:10386000C0035FD6FD7BBCA9FD030091F30B00F9FB +:10387000F30300AA007D80D243E8FF97E00313AA78 +:10388000E1830091020080D2FF430079FFFF042909 +:103890004E060094F303002A6000003500FA80D23F +:1038A00039E8FF97E003132AF30B40F9FD7BC4A826 +:1038B000C0035FD63F1C0071A8030054FD7BBEA966 +:1038C000420000D042C00A91FD030091F35301A9C8 +:1038D00042486138630000106288228B40001FD686 +:1038E000134840F9134400F9148040B98406009449 +:1038F000F403142A730AD49A130C00F900008052BE +:10390000F35341A9FD7BC2A8C0035FD6134C40F915 +:10391000F5FFFF17135040F9F3FFFF172110005177 +:1039200001CC218B335440F9EFFFFF1700008012C8 +:10393000C0035FD6FD7BA3A9210080520100A272C3 +:10394000FD030091F35301A9020080D2F30300AA02 +:10395000F55B02A9B6028052F76303A9F96B04A9CB +:10396000FB2B00F9013400B9E1068052E123017913 +:1039700001E04079F69700B9213C1053E19B00B972 +:10398000E143029111060094F403002AC0040035BB +:1039900060068052F53F0491E0230179E00300B214 +:1039A000B5E67A92F50306A900018052E2830191FF +:1039B000E143029163008052E07300B9E00313AA6F +:1039C000F6FF122977FFFF97F403002AC0020035A3 +:1039D000A00240B90008C05A604A00B9A10640B927 +:1039E0002108C05A614E00B9016C58D33F040071E0 +:1039F000A00200543F080071C00200542100B052E0 +:103A0000610A00B980009036603640B90000033288 +:103A1000603600B9610A40B92000B0523F00006B27 +:103A200021020054E003142AF35341A9F55B42A993 +:103A3000F76343A9F96B44A9FB2B40F9FD7BDDA893 +:103A4000C0035FD6014081522100B072EDFFFF1725 +:103A50001F0071F24100B0526200B0522100821A80 +:103A6000E8FFFF17F53F069139FE9F52B5E67A92BF +:103A7000B6008052D7008052B8028052F91FA0725F +:103A8000FA0300B21B088052D6060071A001005450 +:103A9000E2E30191E1C30291E00313AAF5EB07A968 +:103AA000FB8B00B9F7630179F8E71629C705009485 +:103AB00060010035A01E40B90008C05A60FE8F3773 +:103AC000A00E40B90008C05AE0FA8F36603640B9FF +:103AD00000001E32603600B9D3FFFF17F403002A3E +:103AE000D1FFFF17FD7BBCA983008052020080D26A +:103AF000FD030091F30B00F9F30301AAA101805229 +:103B0000E1430079A1028052E12700B901E0407948 +:103B1000213C1053E12B00B9E183009121FFFF9775 +:103B200060000035E12F40B9610200B9F30B40F9A4 +:103B3000FD7BC4A8C0035FD6FD7BBAA9211C00127F +:103B40003F040071FD030091F35301A9F40300AA9F +:103B5000421C0012F51300F9E5179F1A5FCC0271A1 +:103B6000631C001201D8413940018052E4179F1AAA +:103B70003F000071337C001B813E80527312811A1A +:103B8000BF00046A8000005481DE413941000034E6 +:103B9000337C001B635C1853C00080526240022AD1 +:103BA000E083007942040832A0038052E1030191CE +:103BB00063008052E08B0829E00314AA020080D23F +:103BC000F8FEFF97E0030035000080D235E7FF974D +:103BD000027D805221008052F50300AAE00314AA5E +:103BE000627E021B270500941F000071A104801251 +:103BF0000410417A61020054B57E4092737E409376 +:103C0000E1F30091E00314AAB7FFFF97C00000356D +:103C1000E13F40B9E1013837211018123F0024710B +:103C200000010054800C80D257E7FF97E00315AAEB +:103C30001CE7FF971F0013EB43FEFF54A00D8012FB +:103C4000F35341A9F51340F9FD7BC6A8C0035FD625 +:103C500080008012FBFFFF1703CC40B963020035E0 +:103C6000FD7BBDA903028052FD030091E32300798F +:103C7000A3028052E387022901F040B9E10008362F +:103C8000E143009183008052020080D2C5FEFF977D +:103C9000FD7BC3A8C0035FD6E1430091020080D240 +:103CA0004A050094FBFFFF1700008052C0035FD657 +:103CB000FD7BBDA982018052FD030091E2230079C2 +:103CC000020840B9FF1B00B98201F837211C00121D +:103CD000A20280523F000071A10380522110821A7B +:103CE000020080D2E11700B9E1430091370500944A +:103CF000FD7BC3A8C0035FD6A1038052F9FFFF1765 +:103D0000FD7BB6A9FD030091F35301A9F40302AAB8 +:103D1000F55B02A9F60301AAF76303A9F70303AA57 +:103D2000F96B04A9FB7305A93EF8FF97F50300AAF8 +:103D3000000440B9540100B5140080D2E00314AA75 +:103D4000F35341A9F55B42A9F76343A9F96B44A971 +:103D5000FB7345A9FD7BCAA8C0035FD65305009439 +:103D6000F30300AAA0FEFFB4A12E4039E00315AA78 +:103D70007FF0FF9720FEFF37A20E40F98102168BDD +:103D80003F0002EBA90000546000009000C02E919B +:103D900092EBFF97E9FFFF17618240B9E00313AA96 +:103DA000AEFFFF97A0FCFF35E20314AAE10317AAB8 +:103DB000E00313AA7A000090E9040094F80314AA1F +:103DC000F903002A5A732F913C0080523F0318EBED +:103DD000618240B93593989A621E40B9BF0600F1DE +:103DE000F73700F9E0979F1A5F0000710044001157 +:103DF000E0030179207C161BE2A30191FC570E29F8 +:103E0000C012801AE08B00B9A0028052E17B00B999 +:103E1000E1030291E08700B9E00313AAEB040094E8 +:103E2000FB03002A60020035BF0600F1E9010054DF +:103E3000E00313AA010080529EFFFF976001003447 +:103E4000E0031AAA65EBFF97BFC23BEB61F7FF5493 +:103E5000608240B9D602158B180315EB175C159BD1 +:103E600061FBFF54B6FFFF17FB03152AF7FFFF178F +:103E70001B008052F5FFFF17FD7BBBA9020180529A +:103E8000FD030091E10F00F9E10300B2E11300F935 +:103E900001408052E2630079A2028052E12B00B916 +:103EA000E1C30091E2FF0629E2630091C704009498 +:103EB000FD7BC5A8C0035FD6FF8309D181FFB71280 +:103EC000FD7B00A9FD030091F35301A9020840B94D +:103ED000146C40F95F00016B09040054F37F0191F9 +:103EE00073E67A92E10313AAE4FFFF97C00000355E +:103EF00081824239608242393F00006BC000005429 +:103F000020098012FD7B40A9F35341A9FF83099149 +:103F1000C0035FD681764339607643393F00006B3A +:103F200001FFFF5481024339600243393F00006BB7 +:103F300081FEFF5481824339608243393F00006B28 +:103F400001FEFF546152039180520391820080D29E +:103F50003CE6FF9760FDFF3500008052EAFFFF1747 +:103F6000FF8309D1FD7B00A9FD030091F35301A953 +:103F7000F40300AAF303012A3F040071A0000054D7 +:103F800069030054200C00511F04007148030054C1 +:103F900023008052E00314AAC2088012210080523C +:103FA000E6FEFF97C0010035737A1E127F0600718E +:103FB00061010054F37F0191E00314AA73E67A9241 +:103FC000E10313AAADFFFF97A000003560E6423978 +:103FD0001F00007160418012E013801AFD7B40A930 +:103FE000F35341A9FF830991C0035FD603008052B8 +:103FF000E9FFFF17A0028012F9FFFF17CFFEFF179E +:10400000FFC309D182FFB752FD7B00A9FD030091D8 +:10401000F35301A9F55B02A9010840B92100020B85 +:104020008200B8123F00026B88100054F3BF019168 +:10403000F40300AA73E67A92E10313AA8FFFFF97B5 +:10404000F503002A000F0035806E40F9800000B5AE +:10405000004080D213C7FF97806E00F9806E40F950 +:10406000000F00B4E10313AA024080D2C2E5FF971B +:10407000610243393F200071880E0054400000B0B7 +:1040800000E00A9101D861B8E03F8052810A00B98E +:104090008000A8723F00006BA901005460D680B96F +:1040A00002D877D300D84BD31F0020F14900005429 +:1040B000824A00F9E09F80528000A8723F00006BA6 +:1040C0006900005460E2433980DA0139601E4339E7 +:1040D000766E423901040051211C0012D6020012F2 +:1040E0003F700071C10380520080811A80DE013967 +:1040F0006182423981CA0139608A433941000037FF +:104100006000003461CE423981D60139B6000034F6 +:1041100061824239610008366172423981CE0139CB +:10412000001C6FD3804E00F983A202916576029144 +:1041300060A242390200805226008052001C6FD3D8 +:10414000805200F9604602910400403901F05F3866 +:10415000843C10538120010B04E05F382100042BC4 +:104160004200861AF600003464824339847C219B25 +:1041700061764339217C049B21B06DD3610000F945 +:10418000000C009163200091BF0000EBE1FDFF54A3 +:1041900060824239DF02007142049F1A80000036BB +:1041A000607242391F1040F2410000540202003494 +:1041B00023008052E00314AAE103032A020A8012BA +:1041C0008FFFFF97E00200352000805260BE023969 +:1041D000801E40B900010034F600003460D680B97A +:1041E00000D877D3804A00F90300001460BE42393A +:1041F00000FF0737609E423980D20139609E433903 +:10420000001044D380120239E003152AFD7B40A937 +:10421000F35341A9F55B42A9FFC30991C0035FD6DF +:10422000F503002A806E40F900FFFFB416C6FF9721 +:104230009F6E00F9F5FFFF1715008052F3FFFF177F +:1042400075018012F1FFFF17B5028012EFFFFF1713 +:10425000FD7BBCA9FD030091F35301A9F403012ADE +:10426000F55B02A9F50300AA96008052F76303A943 +:10427000371C001238080012A3D64139E00315AAF2 +:10428000820980122100805263701D126300182A77 +:104290005BFFFF97F303002AC0000034D6060071CD +:1042A000C1FEFF549F0200710008533A01010054FF +:1042B000E103142AE00315AA7FFDFF97F303002A08 +:1042C000E00315AA0E040094172C0039E003132A0A +:1042D000F35341A9F55B42A9F76343A9FD7BC4A849 +:1042E000C0035FD6421C007201010054030040F974 +:1042F000641440B9631040B99F00016B8190811A2A +:104300003F00036B2120831A02800039012800B985 +:1043100053030014FD7BB8A9FD030091F35301A9D9 +:10432000F55B02A9361C0012F76303A9F96B04A917 +:10433000FB2B00F9011840B921110035E100805232 +:104340001F2800B901F000B9210080520180003916 +:10435000F30300AA42030094E00313AA5B03009452 +:10436000200A003500FA80D287E5FF97E00313AA00 +:1043700068030094400B0035607E40B9607A00B954 +:1043800020008052602600B97FCE00B9E00313AA56 +:104390007FEA00B93203009402008052010080528B +:1043A000E00313AAD0FFFF97E00313AA2EFDFF97A7 +:1043B000F403002A40090035E00313AAD003009457 +:1043C0001F2C003900018052E0C300794115805252 +:1043D000600240F9020080D2000C40B91F20117227 +:1043E000403580520010811AE06B00B9A002805263 +:1043F000E1830191E06700B9E00313AA730300941D +:10440000C0000035E0B341391FA8027161000054BB +:104410004000B052600A00B9357D8052F7068052E4 +:10442000B8028052390580523A0080525B00B05287 +:10443000E1830191E00313AA020080D2F7C300795F +:10444000F8FF0C296103009480050035600240F9F3 +:10445000F9C30079FA6700B9620A40B9000C40B9A3 +:104460005F001B6B020080D200201112010002329B +:104470002000801AE1830191E06B00B9E00313AAE8 +:1044800052030094A0030035E16F40B94101F837B1 +:10449000B506007160030054007D80D23AE5FF97B5 +:1044A000E4FFFF17603A40B900681612603A00B99D +:1044B000AFFFFF17630A40B94200B0527F00026BA2 +:1044C000600000542200B052620A00B9613E00B997 +:1044D00021785ED3611E00B97FE20079F35341A9D0 +:1044E000F55B42A9F76343A9F96B44A9FB2B40F99B +:1044F000FD7BC8A8C0035FD61FB8013101FFFF5480 +:10450000E00313AAD8FCFF97000080D2E5E4FF97F0 +:10451000F503002A9F020071E00313AAE1079F1A26 +:10452000B4FCFF9720020035613E40B92101F83705 +:10453000E00315AADBE4FF971FA00FF14801005428 +:10454000800C80D2940600110FE5FF97F2FFFF1751 +:104550002100805261220339E1FFFF1700008052E1 +:10456000DFFFFF17A00D8012B6000035E103002A1F +:10457000400000F000DC2F9198E9FF97C00B8012FB +:10458000D7FFFF17FD7BBEA9220080520200A27256 +:10459000FD030091F30B00F9F30300AA010040F9B9 +:1045A000210840B92100022A013800B9D002009444 +:1045B000E00313AABC020094200100357F1A00B961 +:1045C000400000F000EC339184E9FF97400F801227 +:1045D000F30B40F9FD7BC2A8C0035FD6E00313AA2A +:1045E000010080524CFFFF9740FFFF3521008052B1 +:1045F00061260339F7FFFF17FD7BABA9FD0300918F +:10460000F35301A9F55B02A9F76303A9F96B04A9A8 +:10461000FB7305A9FC0300AA006840F907F6FF97A1 +:104620001C0000F9961B40B9B6490035000080D245 +:104630009CE4FF97802743394008003480234339A6 +:104640009F2703396009003540008052E02301793B +:10465000E0008052E0FF122980F340B9400C0036A0 +:10466000E1430291E0031CAA83008052020080D241 +:104670004CFCFF9740320035E1730291020280D278 +:10468000808301913CE4FF9760008052E023017930 +:1046900080E34079E1430291020080D2003C105354 +:1046A000E09B00B9A0028052E09700B9E0031CAA89 +:1046B000C602009440300035800B40B96000F836E7 +:1046C000E03F417980E3007920018052E0230179C5 +:1046D000E0008052E09700B980E34079E143029125 +:1046E000020080D2003C1053E09B00B9E0031CAAFA +:1046F000B6020094402E0035E18F5429810F0B291A +:10470000E283532982030A29840B40B90300A8528B +:104710009F00036B8107005443745AD36304005114 +:104720007F0C0071A8060054440000B084200A9158 +:10473000845863786300001064A8248B80001FD61F +:10474000E0031CAA90FFFF97F303002A80F7FF34D1 +:10475000E003132AF35341A9F55B42A9F76343A988 +:10476000F96B44A9FB7345A9FD7BD5A8C0035FD6AF +:10477000803F40B99F2303396002F837E0031CAA49 +:1047800039FCFF97000080D246E4FF97F30300AAAC +:10479000E0031CAA2100805216FCFF970029003577 +:1047A000803F40B90001F837E00313AA3DE4FF97CA +:1047B0001FA00FF1883D0054800C80D272E4FF9757 +:1047C000F4FFFF170000A852800B00B9803F40B9EA +:1047D00000785ED3801F00B92000805280E300790A +:1047E0009AFFFF17E1430291E0031CAA020080D266 +:1047F00076020094A0FFFF17034080522300A872A6 +:10480000830B00B9441843D3430000F06344349150 +:10481000420840929FCF00B99FEB00B963686438AB +:10482000440000B084600791827862B8044C50D391 +:10483000627C021B03304CD3820B0F292200805272 +:10484000834700B94220C41A841F40B9840B003446 +:10485000001410530040412A010180D221080011A8 +:10486000000400915F0008719F7F0AA90020C19A8F +:10487000417C40939F7F0BA99F6300F9007C019BC3 +:10488000807F09A90040805242D0801A828300B9FB +:1048900083010034804340B91F04003120010054DB +:1048A000003C105381008052020080D2E123017944 +:1048B000E1430291FF831229E0031CAA4302009402 +:1048C000E0008052E0230179A0028052E09700B915 +:1048D00080E34079E1430291020080D2003C105312 +:1048E000E09B00B9E0031CAA38020094801E00354A +:1048F0000000801280D70139E0031CAAC1FDFF9798 +:10490000E01D0035E0031CAA7D020094012C403913 +:10491000E0031CAAE8FBFF97F303002A001D003503 +:10492000830B40B9231DF836E0031CAA02FCFF9755 +:10493000601C00350000A4D2953740B90000E2F2B7 +:10494000E03B00F9803B40B9F83F0491540000B0CF +:1049500018E77A92B502000A94720B91B56A1612A2 +:10496000400080D2E03700F9810240B92000805237 +:104970000020C11A1F00156AA1020054E03740F957 +:10498000942200911F0400F120190054200080D2CD +:10499000E03700F9F5FFFF170380805298FFFF17FB +:1049A000034080524300A87296FFFF176300A8528D +:1049B00094FFFF178300A85292FFFF1700241E5395 +:1049C0000078412A21444FD3A5FFFF17170080D25A +:1049D0001A00A852E0C30191196877B8800640B95F +:1049E000A002000A1F00196AA01500543F031A6BA9 +:1049F000C01200540000A4523F03006BA0120054E8 +:104A00000000A2523F03006BFB179F1A400280D2A6 +:104A10000024DB9A60130036E0068052E0A301799F +:104A200080E34079A5028052E1430391020080D2E5 +:104A3000003C1053E5831A29E0031CAAE30100940B +:104A4000001200357F130071C0008052E0A301798D +:104A5000E0179F1AA5028052E143039100781F538B +:104A6000020080D2E5831A29E0031CAAD701009432 +:104A7000FB03002A601000353F031A6BE00E005460 +:104A80000000A4523F03006BC00E00540000A2526D +:104A90003F03006BE0179F1A802700B9E0031CAAB0 +:104AA0006F010094820B40B92100B052800240B9DE +:104AB0005F00016B80030054800000341F08007108 +:104AC000010E00543B008052C0008052E063017927 +:104AD000A0028052E0B700B900FE9F52E2E30191CC +:104AE000E01FB0726003002AE0BB00B9E00300B22F +:104AF000E04300F900088052E1C30291F83F00F959 +:104B0000E08B00B9E0031CAAB0010094A00B0035B3 +:104B1000001340B90008C05A006C58D31F001B6B2B +:104B2000010B0054800240B980EB00B9E009003568 +:104B3000967F40B91F100071967B00B9E0179F1A4D +:104B400080CF00B9E103162AE0031CAA02008052BC +:104B5000E5FDFF9780EB40B980EF00B980CF40B909 +:104B60006000003400408052808300B9E0031CAA3A +:104B7000E30100941F140079F40300AA1F300039E8 +:104B8000808340B9E103002A1FE40272811200F918 +:104B9000E1079F1A1FF00172E2079F1A1FCC0472EF +:104BA0004104010BE2079F1A1F9C08722208020BA6 +:104BB000E1079F1A1F3C1072E0079F1A410C010B7E +:104BC0002010000B802A00B9818340B9804740F94A +:104BD0000008C19A410000F021843291800E00F952 +:104BE00080B2009184DF407983D34079828F41394C +:104BF000D0E7FF9787AF41398056019182834139D1 +:104C0000410000F0836740B921DC3291661C00123C +:104C1000653C48D3645C50D3637C1853C5E7FF9769 +:104C2000826B40B980AA0191410000F021103391BC +:104C3000434C50D3425C54D3BEE7FF9720008052D0 +:104C4000801B00B9C3FEFF171B01805270FFFF17C6 +:104C50009B0080526EFFFF17000180528FFFFF17ED +:104C6000800080528DFFFF171F30007148F6FF54FF +:104C7000410000B021600891365860B8AEFFFF17C0 +:104C8000817F40B9E0031CAA817B00B902008052F9 +:104C90009FCF00B99FEB00B993FDFF97F7120091EA +:104CA000FF2200F1C0E6FF544BFFFF17400000F069 +:104CB00000943091C9E7FF9760418012F303002A06 +:104CC0009F1B00B9A3FEFF17200080520000A272B4 +:104CD000803700B980FFB712826F40F97F00006B08 +:104CE000A9020054820000B5400000F000F83091A5 +:104CF000F1FFFF17200080520000AE72803700B92C +:104D00004110433981E300B9E10008363F041E72C7 +:104D1000240280520400AE720000841A00001D328A +:104D2000803700B9803740B96100003600041F3277 +:104D3000803700B99783462981FFB7127F00016B46 +:104D4000A9F0FF54A2FBFFB4817F40B9F702000A2B +:104D5000560000B0590000B05A0000F0E0031CAA51 +:104D6000D6420A91396308915AA7319102008052C4 +:104D700014008052980080D25BFDFF97C10240B9B9 +:104D8000200080520020C11A1F00176A000800543A +:104D9000550000B0B5720691FB0315AAC00240B9D8 +:104DA000A11240391F100071E0179F1A3F00006BDD +:104DB00061060054C00640B9A10240B9E002000AF1 +:104DC0001F00016AC0050054A30A40B9E0031CAAF1 +:104DD000020980122100805263781D1288FCFF971F +:104DE000F403002AC0020035A00240B90100A85215 +:104DF0001F00016BC00500540100A4521F00016B8D +:104E0000A00500540100A2521F00016BE0179F1A79 +:104E1000802700B9E0031CAA91000094C10240B9A8 +:104E20003F2C0071C1040054400000F00044319157 +:104E3000614180127441801268E7FF97030080523D +:104E40000209801221008052E0031CAA6CFCFF972B +:104E50009FCF00B9817F40B9E0031CAA817B00B9D4 +:104E6000020080529FEB00B91FFDFF972000805287 +:104E7000802700B9E0031CAA79000094B5320091A4 +:104E800060F30091BF0200EBA1F8FF54D62200911D +:104E9000180700F141F7FF54E103142A400000F025 +:104EA000000C32914DE7FF9784FFFF1700018052FD +:104EB000D8FFFF1780008052D6FFFF173F300071E8 +:104EC00081000054E0031AAA61418012DAFFFF1743 +:104ED000E0031CAA23FCFF97F403002A00FBFF3524 +:104EE000A30A40B923021037C00240B980EB00B9D1 +:104EF000A0020035817F40B91F100071817B00B98D +:104F0000E0179F1A80CF00B902008052E0031CAA6C +:104F1000F5FCFF97E0031CAAE8FBFF97F403002AC7 +:104F2000E0F8FF350CFFFF17E0031CAA020980120E +:104F30002100805232FCFF97F403002A60FDFF3409 +:104F4000BFFFFF171F30007168000054215B60B87D +:104F5000EAFFFF1701008052E8FFFF17130080529D +:104F6000FCFDFF17C00B801255FFFF170000805299 +:104F7000C0035FD6FD7BBDA9E103002AFD030091BC +:104F8000E2A30091F30B00F9F303002A20098052F9 +:104F900066F7FF97C0000035E01740F966000094FF +:104FA000600100B50000805206000014E2A30091E9 +:104FB000E103132A2009805240F7FF97E0FEFF34F7 +:104FC000F30B40F9FD7BC3A8C0035FD6012843392A +:104FD000A201805202F800B961FEFF346AFDFF971A +:104FE000F1FFFF17FD7BBFA9FD030091BEF3FF9703 +:104FF00092F3FF97FD7BC1A8000040F9DCFFFF178B +:10500000FD7BBDA9FD030091F35301A9F40300AAA0 +:10501000F51300F9B4F3FF9788F3FF97150040F9F3 +:10502000E00315AA75FDFF97F303002AE0000035A1 +:10503000E00314AA3BF3FF97F303002A6000003457 +:10504000E00315AACAFFFF97E003132AF35341A90F +:10505000F51340F9FD7BC3A8C0035FD6006840F993 +:10506000010040F9213440F9210C40F9610000B4FD +:10507000F00301AA00021FD6A0048012C0035FD66D +:10508000006840F9030040F9633440F9631840F9BF +:10509000630000B4F00303AA00021FD6A00480122C +:1050A000C0035FD6006840F9010040F9213440F99F +:1050B000211040F9610000B4F00301AA00021FD6DC +:1050C000A0048012C0035FD6006840F9010040F9D7 +:1050D000213440F9211C40F9610000B4F00301AA19 +:1050E00000021FD600008052C0035FD6006840F95E +:1050F000010040F9213440F9210040F9610000B479 +:10510000F00301AA00021FD600008052C0035FD640 +:10511000006840F9010040F9213440F9210440F9C8 +:10512000610000B4F00301AA00021FD60000805203 +:10513000C0035FD6018840B9E1000036FD7BBFA9FE +:10514000FD0300913DF3FF97FD7BC1A8000040F9EE +:10515000C0035FD6000080D2C0035FD6FD7BBDA92F +:10516000FD030091F35301A9F40301AAF55B02A921 +:10517000F50302AA136840F9600240F9163440F9B9 +:10518000E00313AAECFFFF97C32240F9230100B408 +:10519000E20315AAE10314AAE00313AAF00303AA89 +:1051A000F35341A9F55B42A9FD7BC3A800021FD6BA +:1051B000000040F9F35341A9001840B9F55B42A93A +:1051C000FD7BC3A8C0035FD6FD7BBDA9FD03009195 +:1051D000F35301A9F40301AAF51300F9F50302AA98 +:1051E000136840F9E00313AAD3FFFF97600240F968 +:1051F000003440F9030840F9230100B4E20315AA82 +:10520000E10314AAE00313AAF00303AAF35341A98C +:10521000F51340F9FD7BC3A800021FD6A00480123D +:10522000F35341A9F51340F9FD7BC3A8C0035FD632 +:10523000FD7BBDA9FD030091F35301A9F403012AED +:10524000F51300F9F50300AA27F3FF97BAFFFF97BC +:10525000F30300AAE00315AAF2F2FF97002C4039ED +:105260001F00146B4001005460D641391FFC0371CC +:1052700080010054E103142AE00313AAF35341A967 +:10528000F51340F9FD7BC3A8F2FBFF170000805225 +:10529000F35341A9F51340F9FD7BC3A8C0035FD6C2 +:1052A000600F8012FBFFFF17FD7BBDA9E103002A01 +:1052B000FD030091E2A30091F30B00F9F303002A30 +:1052C000200980522CEBFF9720010034E103132AC0 +:1052D000400000D00074189140E6FF97000080D293 +:1052E000F30B40F9FD7BC3A8C0035FD6E01740F97C +:1052F000FDF2FF9790FFFF97FAFFFF17FD7BBEA916 +:10530000C1028052FD030091006840F9E263009100 +:10531000E2F2FF97E00F40F9400000B4C1F2FF97BE +:10532000FD7BC2A8C0035FD6FD7BBCA9FD03009135 +:10533000F35301A9F30301AAF55B02A9010040F9A7 +:10534000213440F9210400B4048C40B9F40300AACC +:10535000F60302AAE7E30091060080D205408052DE +:1053600023098052420000D0410000D042B02E916B +:1053700021A02E914EECFF97F503002AC0010035C5 +:10538000E01F40F9A7F2FF97760200F9E17F40B2F3 +:10539000740A00F9612200F92100805201340039B9 +:1053A000C172403901200039A0018052746A00F9AD +:1053B00060FA00B9E003152AF35341A9F55B42A94D +:1053C000FD7BC4A8C0035FD6B5048012FAFFFF17A7 +:1053D000BF3F03D5020440F9410000B9217D80D2CE +:1053E000210400F16100005400008052C0035FD628 +:1053F000020440F9420040B9BF3F03D55F0840F2C4 +:1054000001FFFF5420008052F9FFFF17FD7BBDA96B +:10541000FD030091F35301A9F30300AAF403012A49 +:10542000F55B02A9F60302AA000440F9004840B95E +:10543000BF3F03D515C48952C00200B9B50600713B +:10544000C00100549F02006AC10000540000805255 +:10545000F35341A9F55B42A9FD7BC3A8C0035FD606 +:10546000001980D248E1FF97600640F9004840B932 +:10547000BF3F03D5F1FFFF17A00D8012F5FFFF1707 +:10548000FD7BB6A9FD030091F35301A9F40302AA21 +:10549000F55B02A9F60301AAF76303A9F96B04A956 +:1054A000FB7305A924FFFF97130840F9141400B4F7 +:1054B000800E40B9001C0011007C03530004001151 +:1054C00000747AD3000400D1003C009100EC7C927F +:1054D000FF6320CB000080D2F7030091F1E0FF973B +:1054E000F50300AA600640F9004840B9BF3F03D564 +:1054F000A0004836E00315AAEAE0FF971FD007F1A5 +:1055000029FFFF54BF3F03D5600640F90100801218 +:10551000014400B9141100B5C10A40B9BF3F03D519 +:10552000600640F9012800B9141D00B4800A40B992 +:1055300001C080D21F007FF2004080D20000819A1B +:10554000C20640B9410180524100010A3F28007162 +:10555000202A0054C10240790300123200001332A5 +:105560003F3000710010831AA200003603001A3287 +:105570005F007FF200041A320010831A42001036D6 +:10558000000018322100002A0000B4522100002A35 +:10559000BF3F03D5600640F9012C00B901D49052F9 +:1055A0002100A072600640F9004440B9BF3F03D516 +:1055B00000191036940000B5BF3F03D5610640F9CD +:1055C000204400B9A0184037A0260837C10640B9CA +:1055D000410010364026303741020036600640F95F +:1055E00001190836003C40B9BF3F03D5C00E00B9D1 +:1055F000600640F9003840B9BF3F03D5C01200B97A +:10560000600640F9003440B9BF3F03D5C01600B969 +:10561000600640F9003040B9BF3F03D5C01A00B959 +:10562000742300B4000080D2BF7700B9761E40F921 +:105630009CE0FF97F90300AA010A805280D6412915 +:105640001BD09752776E40791C028052980240F925 +:10565000B57E001BC02A40B9F72E1F53F70A001170 +:105660001A058052A17E011BB57E02532108C01A83 +:10567000C02640B92108C01AC0CE40B91F00007131 +:10568000E0079F1A000400112108C01A007D805213 +:10569000217C001B3F00006B2020801AA06F00B906 +:1056A000600640F9164440B9BF3F03D5DF021B6ACC +:1056B000011C005460824139801700347517003492 +:1056C000800A40B9BF7700B91F040071E11200548D +:1056D000C1021A6AA0160054BF3F03D5600640F904 +:1056E000014400B9A2D30191E00313AA81008052C2 +:1056F00047FFFF97A015F837A07740B90100805207 +:10570000007451D31F00156B0090951AA07700B953 +:10571000A07740B93F00006BC30F00541F00156B0A +:1057200042180054B502004BEFFFFF17E00780D28C +:1057300066FFFF1760824139821240B9A001003430 +:10574000BF3F03D5600640F9021C00B981824129A0 +:10575000007C011BBF3F03D5610640F9202000B942 +:10576000E00313AA410080521AFFFF976BFFFF1757 +:10577000800E40B9810240F9427C001B800A40B98A +:105780001F040071A105005443008052A0E3019161 +:1057900026C0FF97F503002A200A0035E4FE009199 +:1057A000850E40B984E47A92E00313AA4100805246 +:1057B000E30304AAA64340F906FFFF97BF3F03D5C2 +:1057C000600640F901008012018C00B9BF3F03D58B +:1057D000600640F90702805288028052020080521F +:1057E0000700B0720800B072048800B95F00007151 +:1057F000811240B9E0179F1A00701D53BF2000713D +:1058000008020054A17C011B0000082A6004002942 +:10581000C030020B600800B960000111600C00B9D3 +:1058200063000191BF20007129010054A52000519F +:1058300042040011EEFFFF1723008052D4FFFF1730 +:105840000000072A21701D53F1FFFF1761FC009132 +:10585000E00304AA21E47A92A8B1FF97600640F918 +:10586000000040B9BF3F03D5010480520140A0723F +:105870000000012ABF3F03D5610640F9200000B9AE +:10588000600640F9008040B9BF3F03D54110805207 +:105890000000012ABF3F03D5610640F9208000B90E +:1058A000811240B9BF3F03D5600640F9011C00B921 +:1058B00081824129007C011BBF3F03D5610640F96D +:1058C000202000B915FFFF17000080521DFFFF17B1 +:1058D0002104007181E6FF54B50D8012BF030091D1 +:1058E000E003152AF35341A9F55B42A9F76343A9E5 +:1058F000F96B44A9FB7345A9FD7BCAA8C0035FD619 +:10590000003040B9BF3F03D5C00E00B945FFFF17B7 +:10591000600640F9000042B9BF3F03D521040011E1 +:10592000004700B87BFFFF171F080071E103005418 +:10593000D6032036A2D30191E00313AA01018052BD +:10594000B3FEFF97C002F837A07740B9010080523C +:10595000007451D3E002004B1F00156B0090951AA4 +:10596000A07700B9A07740B93F00006BA3000054B6 +:105970001F00156B22010054B502004BEEFFFF170C +:10598000024740B8BF3F03D5600640F9210400112B +:10599000020002B9F4FFFF1715008052BF3F03D584 +:1059A000600640F91C4400B996041837E00319AAB0 +:1059B000BCDFFF97A16F40B91F4021EB29E7FF54DF +:1059C000B50D8012BF3F03D5600640F9164400B9FB +:1059D0006082413920050035800A40B9760640F9D9 +:1059E0001F040071F4179F1A000080D29406001162 +:1059F000ACDFFF97F50300AAC08E40B9BF3F03D5C7 +:105A00009F02206AE0010054E00315AAA5DFFF977A +:105A10001FA00FF188030054200080D2DADFFF9727 +:105A20004EC3FF97F5FFFF1715008052DFFFFF17EA +:105A3000B5028012E4FFFF1715008052E2FFFF1746 +:105A400015008052BF3F03D5600640F961008052C7 +:105A5000018C00B9600640F9000040B9BF3F03D592 +:105A600000781A12BF3F03D5610640F9200000B943 +:105A7000A0E3019171BFFF97800C80D2C2DFFF9736 +:105A800097FFFF17B50D8012EFFFFF17150080522B +:105A9000FAFFFF17F501801291FFFF1795008012A2 +:105AA0008FFFFF17021C40B95F00016BE007005435 +:105AB000FD7BBEA9FD030091F35301A9F403012A64 +:105AC000A1060034022C40F9F30300AA020600B438 +:105AD00040003FD6E003002A1F4034EB200600546C +:105AE000827A1F53410400D12000008B0008C29A23 +:105AF000BF3F03D5610640F93F1000B9BF3F03D552 +:105B0000610640F93F0C00B9BF3F03D5610640F97B +:105B1000200800B9BF3F03D5600640F90100845258 +:105B20000104B072012C00B940E28452610640F9D0 +:105B3000212C40B9BF3F03D500040071C0020054BE +:105B400061FFFF37BF3F03D5600640F9E1830032B4 +:105B5000011000B9BF3F03D5600640F9010084522F +:105B60000104B072012C00B940E28452610640F990 +:105B7000212C40B9BF3F03D500040071C000005480 +:105B800061FFFF37741E00B903000014002040B904 +:105B900020FAFF35F35341A9FD7BC2A8C0035FD6AD +:105BA00000008052D3FFFF17C0035FD6FD7BBEA964 +:105BB000FD030091F35301A95FFDFF97012840B950 +:105BC000130840F9F40300AAE00313AAB6FFFF97F5 +:105BD000802640B91F100071200300541F2000715F +:105BE000E0179F1A003C1053BF3F03D5610640F9F0 +:105BF000201800B9600640F9017440B9BF3F03D5D1 +:105C000082CE40B92000103221780F125F0000715F +:105C10002100801ABF3F03D5600640F9017400B926 +:105C2000612640F9010100B4E00313AAF00301AAC0 +:105C3000F35341A9FD7BC2A800021FD62000805269 +:105C4000EAFFFF1700008052F35341A9FD7BC2A871 +:105C5000C0035FD6FD7BBDA9FD030091F35301A9ED +:105C6000F51300F934FDFF97130840F9F40300AA77 +:105C7000612A40F9610000B4E00313AA20003FD676 +:105C8000BF3F03D5600640F935008052E1008052E5 +:105C9000150400B9E00313AACEFDFF976006003497 +:105CA000800240F9011040B9E00313AA7EFFFF977C +:105CB000BF3F03D5610640F900008012204400B9BF +:105CC000BF3F03D5610640F93F2400B9BF3F03D56C +:105CD000610640F9201400B9BF3F03D5600640F9C2 +:105CE0001F9000B9BF3F03D5600640F9158000B989 +:105CF000603640B960010035600640F9004C40B99B +:105D0000BF3F03D5006C50D30000150B007C01533E +:105D1000010400510040012A00000332603600B93E +:105D2000613640B9BF3F03D5600640F9014C00B968 +:105D3000BF3F03D5600640F91F1000B9BF3F03D530 +:105D4000600640F91F0C00B960824139A00000359F +:105D5000BF3F03D5600640F961008052019000B951 +:105D6000000080520200001480008012F35341A909 +:105D7000F51340F9FD7BC3A8C0035FD6240040F9AA +:105D80000308022902108052040000F90206A072E2 +:105D9000020C00B9221440B9020800B9233040B9FE +:105DA0004178021242780112210002327F200071F4 +:105DB000420003324210811A0120805242081F32F1 +:105DC000020800B9011800B9C0035FD657FDFF17DC +:105DD000FD7BBEA9FD030091F35301A9002040F90A +:105DE000136C40B9006840B900080012730A1C53D4 +:105DF0007302002ABDA9FF97147C40B9BBA9FF9785 +:105E0000947A1A12147C00B9BF3F03D5B4A9FF9746 +:105E1000132800B9B5A9FF97137C40B9B3A9FF9720 +:105E200073021B32137C00B900008052F35341A966 +:105E3000FD7BC2A8C0035FD6FD7BBDA9FD03009119 +:105E4000F35301A9F40300AAF51300F9F8EFFF9743 +:105E5000819240B9F30300AA406A40F9420000B0C1 +:105E60000300805242743F9132DAFF972001F836E6 +:105E7000400000F0002C079158E3FF97A002801229 +:105E8000F35341A9F51340F9FD7BC3A8C0035FD6C6 +:105E9000157C0113800640F9600200F9E00314AAA2 +:105EA00068F0FF97600600F983008052420000F01E +:105EB000819240B942981491406A40F91DDAFF97E7 +:105EC000603200B90000009000403791602600F970 +:105ED000A00600517F2A00B963008052A042002A28 +:105EE000420000F000000332603600B942A0079182 +:105EF000819240B9406A40F91EDAFF97606A00B9A2 +:105F000003008052420000F0819240B942BC0791E8 +:105F1000406A40F917DAFF97732200F9606E00B902 +:105F2000410000F021DC0791804A40F9DDF4FF9741 +:105F30006082013900008052D2FFFF17FD7BB9A9B2 +:105F4000FD030091F35301A9F30300AAF55B02A935 +:105F5000F71B00F9ADEFFF97F50300AAE00313AAC2 +:105F6000B6EFFF97F60300AAE00313AAB0EFFF977E +:105F7000F40300AAE00313AAADEFFF97F70300AA0A +:105F8000E2230191E00313AA21008052B4EAFF97B3 +:105F900020040035E0230191B3EAFF97E02200B925 +:105FA00020030034E1230191E00313AAEB130094D2 +:105FB00060000035E02301918B130094822240B9E8 +:105FC000E00315AAB582009103508352E10314AA9D +:105FD000C300A0726AFFFF97951E00F9B40A00F98A +:105FE000801E40F9C00200F9136800F9E00313AA0B +:105FF000F35341A9F55B42A9F71B40F9FD7BC7A804 +:1060000015FFFF17400000D000040891F3E2FF974E +:10601000A0028012F35341A9F55B42A9F71B40F996 +:10602000FD7BC7A8C0035FD6FD7BBEA9FD03009121 +:10603000F30B00F9F30300AA74EFFF97E20300AA41 +:1060400001800091E00313AAF30B40F9FD7BC2A885 +:106050005FFFFF17217C7C93026861B882000034E7 +:106060001F6821B82100805201001039C0035FD69B +:10607000227C7C9301D0218B006862B860000034E0 +:10608000200440F9C0035FD6000080D2FEFFFF1756 +:10609000E20300AA030080D264EC7CD3E003032A6D +:1060A000446864B804010035637C7C9345D0208B40 +:1060B00024008052446823B8A10400F94400103938 +:1060C000C0035FD6630400917F0001F161FEFF54BD +:1060D00060038012FBFFFF17FD7BBEA9FD0300914B +:1060E000F30B00F9F30300AA83000094E303002AF2 +:1060F00020020035654240B94407A0D084A0089131 +:10610000E00304AAE103052ADAFFFF971F0013EB5F +:1061100021020054035841B963010034021C40F9C4 +:10612000E103052A400000B000300A91ABE2FF977E +:10613000E3018012E003032AF30B40F9FD7BC2A8C0 +:10614000C0035FD6E103052AE00304AAC2FFFF975C +:10615000F9FFFF1743028012F7FFFF17067440F99B +:10616000660100B48101F8B7050440F9BF0001EBF6 +:1061700023010054A50001CBBF0002EBC300005473 +:10618000E20000B4F00306AA00021FD6C00B801282 +:10619000C0035FD6A0028012FEFFFF1700008052EE +:1061A000FCFFFF17FD7BBEA9FD030091F30B00F977 +:1061B000F30300AA001440B98001003543000090A9 +:1061C0004100009063C82B9121042D91223680520A +:1061D00040000090005C2D9180E2FF97400000900D +:1061E00000AC2D9136DEFF974007A0D0E10313AA43 +:1061F00000A00891040080520300805202008052E7 +:10620000A4FFFF974007F837604200B9600206918B +:106210007F5A01B9000000A9603640B9600000351E +:10622000605E40B9603600B9601240B9E103002AEF +:10623000C0030034220400D10000C05A0010C05A2C +:106240005F0001EA00009F1A611640B9602600B99C +:10625000E203012AE1020034430400D12100C05AC4 +:106260002110C05A7F0002EA21009F1A22008052AA +:106270004020C01A000400514220C11A61020529C1 +:10628000610240F942040051623200B90080C4D278 +:106290001F0021EA2001005400008052F30B40F956 +:1062A000FD7BC2A8C0035FD600008052E7FFFF1746 +:1062B00001008052EEFFFF17620640F9010080D214 +:1062C000E00313AAA6FFFF971F000071C10B801205 +:1062D0000410417A20FEFF54611E40F940000090F6 +:1062E00000C031913DE2FF97ECFFFF172000805284 +:1062F000EBFFFF17FD7BBBA9FD030091F35301A941 +:10630000F55B02A916000691F76303A918008052F5 +:10631000F92300F9590000B039F30A9113C040F98C +:1063200073C205D177BA40F9F7C205D175C205919C +:10633000BF0216EB01010054E003182AF35341A9F0 +:10634000F55B42A9F76343A9F92340F9FD7BC5A892 +:10635000C0035FD661C240F9600206913F0000EBC6 +:1063600060000054E00313AAE3FFFF97E00313AAC1 +:106370005AFFFF97F403002A4001F836611E40F9E6 +:10638000E203002AE00319AA14E2FF97E0BA40F9F9 +:10639000F30317AAF803142A17C005D1E4FFFF1767 +:1063A000A10240A9200400F9F403182A010000F911 +:1063B000BF7E00A9601E40F9B3BDFF97E00313AA9A +:1063C000B1BDFF97F2FFFF1700008052C0035FD6F8 +:1063D000040040F9843440F9840040F9F00304AA31 +:1063E00000021FD6FD7BBAA9E403012AFD03009138 +:1063F000F55B02A9F503022AF603032A420000D046 +:10640000E303002A42680D91F35301A9F403012A22 +:10641000C10380D2F303002AE00301919EE1FF97BC +:10642000E0030191A5DCFF97440000D0E50300AA3A +:10643000E7C30091E6E3009184A80D91E303162AD7 +:10644000E203152AE103142AE003132A110500943C +:1064500000010035E01B40F9000040F977EEFF979E +:10646000F35341A9F55B42A9FD7BC6A8C0035FD6E3 +:10647000000080D2FBFFFF17FD7BBCA9FD0300914C +:10648000F35301A9F303012AF40302AAF51300F957 +:10649000F50303AA69EEFF97054440F9E40315AA42 +:1064A000E3E30091E20314AAE103132AA0003FD61C +:1064B000F35341A9F51340F9FD7BC4A8C0035FD68F +:1064C000FD7BBCA9FD030091F35301A9F303012A4D +:1064D000F40302AAF51300F9F50303AA57EEFF9798 +:1064E000054040F9E40315AAE3E30091E20314AA8E +:1064F000E103132AA0003FD6F35341A9F51340F955 +:10650000FD7BC4A8C0035FD6FD7BBDA9FD03009140 +:10651000F35301A9F30300AAF51300F94AEEFF971C +:10652000F40300AAE00313AA44EEFF97135019A93D +:10653000540100B553028012400000D000E00D91DC +:10654000A6E1FF97E003132AF35341A9F51340F99D +:10655000FD7BC3A8C0035FD6F50300AAE00314AA1D +:1065600088040094F303002AE0FEFF35E00315AA37 +:10657000F1000094F303002A80000035E00315AA1F +:1065800038020094F303002AE00314AA7F04009465 +:10659000EDFFFF17FD7BBFA9FD03009127EEFF97DD +:1065A000FD7BC1A82D020014FD7BB7A9FD0300915E +:1065B000F35301A9F303012AF51300F9F50302AA25 +:1065C0001EEEFF97011040B9C1020034F40300AA87 +:1065D000600AC11A00CC011B40020035E103012A08 +:1065E000A00AC19A00D4019BC00100B5020B80D261 +:1065F00001008052E0E3009143DCFF97823A40F9CA +:10660000F35704A9E1E30091E00314AA40003FD648 +:10661000F35341A9F51340F9FD7BC9A8C0035FD628 +:10662000A0028012FBFFFF17FD7BBFA9FD030091B5 +:1066300002EEFF970C02009400008052FD7BC1A87F +:10664000C0035FD660418012C0035FD660418012F4 +:10665000C0035FD6FD7BB6A9FD030091F35301A9EA +:10666000F30302AAF47F40B2F55B02A93500805221 +:1066700036008052F76303A9F80301AAF96B04A955 +:10668000F90304AAFB2B00F9FB0303AA179C40F9AA +:10669000330100B500008052F35341A9F55B42A9D4 +:1066A000F76343A9F96B44A9FB2B40F9FD7BCAA80A +:1066B000C0035FD6E2BE41B9FA0313AAE0DA463955 +:1066C000FFFF06A9417C1053E0DB0079E0D2463998 +:1066D000E0C30139E0DE4639E1A70139413C48D346 +:1066E000F8FF07A9007C011BFF4700F9F5A301395A +:1066F000E1C70139007C0313E0030239E1070239E5 +:10670000E2230239F68F00B9FF6709A95F0314EB92 +:106710004093949AE09300B9E0CE40F9E1A301914F +:10672000160C0094A0010034057C4093E003052A78 +:10673000BF000071050300340BFBFF54610340F9F7 +:1067400039C3258B18C3258B73C225CB21C0258B5C +:10675000610300F9CFFFFF17E0CE40F9E1A30191FB +:106760009C0B009420FEFF35E13F40F9E09340B9D7 +:106770002100008BE13F00F9E14F40F95A0300EBA3 +:106780002100008BE14F00F921FCFF54E50313AA1F +:10679000E7FFFF1780008012C0FFFF17FD7BBBA93A +:1067A000211C001224208052FD03009100CC40F9EE +:1067B000FFFF01A9E13B007921008052FFFF03A9FF +:1067C000E1E3003921008052E4330079FFFF02A9A0 +:1067D000E13F00B9E1630091E34300B9E22700F92A +:1067E0007C0B0094FD7BC5A8C0035FD6FD7BBEA9D2 +:1067F00023008052A1008052FD030091E27F0091AE +:10680000E7FFFF974000F837E07F4039FD7BC2A8E3 +:10681000C0035FD6FD7BBCA9FD030091F35301A922 +:10682000F30300AA000080D2F55B02A91DDCFF97EC +:10683000F40300AAF58793D2E00314AA19DCFF97AA +:106840001F0015EBA901005461CA40F9400000D0B7 +:1068500000381191E10300B4230840A9610040F918 +:10686000DEE0FF97A00D8012F35341A9F55B42A92A +:10687000FD7BC4A8C0035FD6E00313AADCFFFF972B +:1068800040FFFF37F603202A60CE41B9E001003611 +:10689000E2FF0091E00313AA23008052010E805210 +:1068A000BFFFFF9720FEFF37E1FF4039210019129B +:1068B0003F000071E0079F1ADF02006AE0FBFF540F +:1068C00000008052E9FFFF1721008052F9FFFF17F7 +:1068D000420000D0410000D042C0119121EC119142 +:1068E000E0FFFF17FD7BBBA9211C00122420805272 +:1068F000FD03009100CC40F9FFFF01A9E13B0079C5 +:1069000021008052FFFF03A9E1E3003941008052DA +:10691000E4330079FFFF02A9E13F00B9E163009190 +:10692000E34300B9E22700F92A0B0094FD7BC5A8D8 +:10693000C0035FD6FD7BAEA9222080522200A07248 +:10694000FD030091F35301A9C3008052F30300AA91 +:10695000F51300F902BC01B9222080D22200A0F276 +:1069600001CC40F92220C0F22200E0F202E000F95E +:1069700062008052210C40B93F0073F261108052D6 +:106980003510821AE2030191010C801284FFFF97F7 +:106990004016F836147C40939F0640B148140054CA +:1069A00020008052E05300B960008052E05B013962 +:1069B00020208052FFAB00792000A072E05B00B97C +:1069C000811640B94102183762008052E25300B983 +:1069D00002008152E2BB007962018052E27B013900 +:1069E000E06300B9800240391FD0007101010054FA +:1069F0008006403900A80051001C00121F040071DD +:106A00006800005400018052E073013961013036A2 +:106A1000E05340B900001932E05300B90000815240 +:106A2000E01B0179600D8052E03B023980208052EA +:106A30002000A072E09300B9400000D000900F91B8 +:106A4000601E00F960CA40F960A600F9600080523B +:106A50006002003920008052601600B90080815227 +:106A6000600600B9739E00F9801A4079810A40B926 +:106A7000017C011B610600F9618A02B901000090E6 +:106A800021101991613A00F90100009021501991EB +:106A9000614200F90100009021301991614600F92E +:106AA000801640B98000383660CE41B9000000320F +:106AB00060CE01B9801640B98000703660CE41B911 +:106AC00000001B3260CE01B9801640B98000183634 +:106AD000E05340B900781E12E05300B9E05340B9CA +:106AE000E2130191E3170191A102000A200441D3AE +:106AF0003F0079F2E10080520000811AE11B019110 +:106B0000007C40930008009100F07DD3216860383C +:106B100061DA0639E123019142686038216860B882 +:106B20006068603861BE01B9211C00124000000B92 +:106B300060DE06393F100071E105005480024039E3 +:106B40001F74027140090054E80800541F8000714E +:106B5000200500541FB00071E0040054E2E30091EE +:106B6000E00313AA23008052A10680520CFFFF9776 +:106B7000000CF837E0E34039E003083700001F322B +:106B8000E0E70039E00313AA19FFFF97200BF8375D +:106B900003008052020080D2C1008052E0E300393D +:106BA000E00313AA50FFFF97E2E30091E00313AA6A +:106BB00043008052210080524BFFFF97A009F83715 +:106BC000E00313AA14FFFF97F503002AE002003543 +:106BD000E2DF0091E00313AA23008052A106805255 +:106BE000EFFEFF976008F837E0DF403920080034F7 +:106BF0000008083660D24639200B003580224079E3 +:106C00006008003460D2063955000014821A4039F9 +:106C10006201003594620091800A40B980FFFF351F +:106C2000740F8092F503142AE003152AF35341A947 +:106C3000F51340F9FD7BD2A8C0035FD6421C4092F9 +:106C4000E1030191E00314AAFEDAFF9740FEFF354D +:106C5000B4FEFFB451FFFF17340000F094A20C9172 +:106C6000EEFFFF171F080371A1F7FF54E00313AAFB +:106C7000DFFEFF97F503002A80FDFF37D5FB37378E +:106C800003008052020080D2C1008052E00313AAA8 +:106C900015FFFF97B5021A32230080526242079116 +:106CA000E103032A75420739E00313AA0EFFFF9799 +:106CB000E00313AAD8FEFF97F503002A60FBFF3517 +:106CC000E00313AACAFEFF971F0000714D00005495 +:106CD00020F9373761CA40F9400000D000B80F9161 +:106CE000C10000B4230840A9610040F9BBDFFF9751 +:106CF000B5028012CDFFFF17420000D0410000D046 +:106D000042C0119121EC1191F9FFFF17610640F982 +:106D10000020A0D23F0000EBA90300548000805265 +:106D200060D20639800240391F04007160000054AF +:106D3000801640B94001583661DA4639400000D02B +:106D400000600F91020080D2030040397F00016B88 +:106D5000410100540104403961DA063960D24639F4 +:106D60001F10007168FCFF5474D200F940010054F8 +:106D700015008052ADFFFF174204009100080091FA +:106D80005F1800F121FEFF54F4FFFF1760008052EE +:106D90009DFFFF17800240391F040071A0FEFF54C1 +:106DA000801640B960FE5F3760CE41B98000303652 +:106DB000400000D00040109188DFFF9760D240F97A +:106DC000000040391FB000714002005428010054F7 +:106DD0001F800071E0010054E00F801262420791B1 +:106DE00023008052E10280526042073918000014EB +:106DF0001F080371A00000541FBC03716000005401 +:106E00001F740271A1FEFF54140080520700001489 +:106E100034008052E00313AA03008052020080D2A3 +:106E2000C1008052B0FEFF97E00313AA0300805216 +:106E3000020080D201098012ABFEFF97B4F9FF3443 +:106E400003008052020080D281008052E00313AA26 +:106E5000A5FEFF97C7FFFF1760418012C0035FD6F2 +:106E6000D1FCFF179DFCFF17FD7BBDA9FD03009121 +:106E7000F35301A9341C0012F30300AAF51300F91F +:106E8000010040F9353440F99F2A00716100005437 +:106E9000A1018052F5FFFF97A20A40F9E103142AED +:106EA000E00313AA40003FD61F2C003160FFFF54BF +:106EB000F35341A9F51340F9FD7BC3A8C0035FD686 +:106EC000010040F9213440F9220040F9820000B469 +:106ED000411240B9F00302AA00021FD600008052FE +:106EE000C0035FD600008052C0035FD6011C0012B1 +:106EF000409E40F9600000B4409E40F9DBFFFF1760 +:106F0000C0035FD6419E40F9E10100B4FD7BBEA9FC +:106F1000FD030091F35301A9F30300AA549E40F925 +:106F20006102403981000035F35341A9FD7BC2A8BD +:106F3000C0035FD673060091E00314AACBFFFF974E +:106F4000F8FFFF17C0035FD6409E40F9400100B430 +:106F5000409E40F9000040F9003440F9020040F939 +:106F6000A20000B4409E40F9F00302AA411240B9C9 +:106F700000021FD6C0035FD6FD7BBDA9FD030091B3 +:106F8000F35301A9546A40F9940700B4E00314AA2A +:106F9000410000D021800491B5D6FF97F30300AAE9 +:106FA000A00200B5E00314AA410000D021B0049172 +:106FB00017D3FF97F303002AE2A30091E103132AFA +:106FC000A00D805267EFFF9720030035E11740F9CD +:106FD000419E00F9400640F9000078B2400600F9F1 +:106FE000DAFFFF9700008052F35341A9FD7BC3A84D +:106FF000C0035FD64107805285D9FF97000100B4D6 +:107000000200134BE10313AAE00314AAC4D2FF97B2 +:10701000F303002A20FDFF36E3FFFF17E00313AA66 +:1070200085D9FF97E203002AF7FFFF177F0200715F +:10703000ED010054405640F9E2A30091617E409377 +:1070400004008052030080D284ECFF9700010035D9 +:10705000E01740F9A8EBFF971FB4017181000054BD +:10706000E01740F92FEBFF9720FBFF34400000B002 +:1070700000D004918CDAFF97E2A3009101008052C6 +:10708000A00D805229EFFF9720FAFF34E2A3009170 +:1070900001008052A00D805208EFFF9780F9FF3465 +:1070A000E1A30091A00D80525AEFFF97EFFFFF1769 +:1070B000FD7BBFA9FD0300915DEBFF97A00480124B +:1070C000FD7BC1A8C0035FD6FD7BBAA9FD0300917B +:1070D000F35301A9F40300AAF55B02A94BEBFF9758 +:1070E000F30300AAE00314AA81EBFF97F60300AABA +:1070F000E00314AAC9EBFF971F0400B1C0070054B6 +:10710000607E00A90200805241000090804A40F950 +:1071100021203591E5EFFF97601A00B902008052F7 +:1071200041000090804A40F9214C3591DFEFFF97F4 +:10713000601600B92200805241000090804A40F958 +:1071400021743591D9EFFF97601200B9E2E3009105 +:10715000E00314AA0100805241E6FF97C002003507 +:10716000E0E3009140E6FF971F04403148000054DF +:10717000601E00B9601E40B960010035804A40F9C8 +:1071800015209C52B5BEA07241000090E203152A62 +:1071900021F40391C5EFFF971F000071B502801A1B +:1071A000751E00B9DF060071E0010054E000805256 +:1071B0000E000014029800115F900071C800005486 +:1071C00021008092E1FEBFF2E1FDDFF22128C29AA8 +:1071D00021FD0736F35341A9F55B42A9FD7BC6A803 +:1071E000C0035FD6E0028052602200B900008052E6 +:1071F000F9FFFF17A0028012F7FFFF17021880B9EE +:10720000030040F9001440B94200038B2120C01A4A +:10721000217C4093406861B8BF3F03D5C0035FD66F +:10722000FD7BBFA9FD03009101EBFF97E40300AADA +:10723000000C40F9A1008052F1FFFF97A00000363A +:10724000FD7BC1A801008052800C40F9ECFFFF17C4 +:1072500040018012FD7BC1A8C0035FD6FD7BBEA9A3 +:10726000FD030091F30B00F9331C0012F0EAFF97C5 +:10727000A1008052000C40F9D3000034E0FFFF97DA +:1072800000000012F30B40F9FD7BC2A8C0035FD6DB +:10729000DBFFFF971F007BF2E0179F1AFAFFFF1733 +:1072A000031880B9040040F9001440B96300048B4E +:1072B0002120C01A217C4093BF3F03D5626821B8CA +:1072C000C0035FD6FD7BBEA9FD030091F30B00F95F +:1072D000331C0012D6EAFF97E40300AA000C40F921 +:1072E000A1008052C6FFFF9740012836800C40F96C +:1072F000E203132A01008052EAFFFF977F2A007100 +:107300004100005415BDFF97000080520200001498 +:1073100040018012F30B40F9FD7BC2A8C0035FD689 +:10732000FD7BBEA9FD030091F30B00F9F303012AD5 +:10733000BFEAFF97620E42D3610600125F0C007134 +:10734000731644D3600A417AA10100543F0C0071C6 +:1073500060010054220000F042D82891000C40F94E +:107360004268E13861008052CEFFFF9700008052F2 +:10737000F30B40F9FD7BC2A8C0035FD660418012C9 +:10738000FCFFFF17FD7BBFA9E50300AAE603012A66 +:10739000FD030091000C40F96100805298FFFF97B7 +:1073A000077818120200193261008052A00C40F9CF +:1073B000BCFFFF97C21C0012A00C40F901008052D4 +:1073C000B8FFFF97C23C48D3A00C40F9210080527F +:1073D000B4FFFF97E203072AFD7BC1A8610080523A +:1073E000A00C40F9AFFFFF17FD7BBEA9FD03009184 +:1073F000F30B00F9F303012A8DEAFF97020C40F921 +:10740000616E1C53736E1D53421C40B97302020B14 +:10741000610AC11ADCFFFF9700008052F30B40F9AC +:10742000FD7BC2A8C0035FD6E50300AAE603012ADC +:10743000FD7BBFA9FD030091A00C40F9A100805283 +:107440006FFFFF97A0FF3736A00C40F90200805273 +:107450002100805293FFFF9762008052A00C40F9F8 +:10746000810080528FFFFF97A00C40F941008052AD +:10747000022040B98BFFFF9762008052A00C40F9B8 +:10748000E103022A87FFFF97DF040031A0000054C8 +:10749000FD7BC1A8E103062AE00305AABAFFFF1796 +:1074A000FD7BC1A8C0035FD6FD7BBDA9FD03009194 +:1074B000F35301A9F30300AA54EAFF97E00313AAC8 +:1074C0005BEAFF97E1830091F40300AAE00313AAAB +:1074D000A20E009460000035E0830091420E0094FB +:1074E000E00313AA49EAFF97800E00F90100801219 +:1074F000E00314AACDFFFF9700008052F35341A987 +:10750000FD7BC3A8C0035FD6FD7BBDA9FD03009131 +:10751000F35301A9F40300AAF55B02A9F503022ABB +:10752000020040F9563440F9C21640F9020200B494 +:1075300040003FD6F303002AE0010034400000B0D1 +:10754000004C1291140300B4810A40A9E303132AEA +:10755000210040F9A1DDFF97E003132AF35341A96D +:10756000F55B42A9FD7BC3A8C0035FD6B3028012BE +:10757000F3FFFF17C21A40F9220100B4E103152AF4 +:10758000E00314AA40003FD6F303002A60FEFF3454 +:10759000400000B000D41291EBFFFF17B30280123D +:1075A000FCFFFF17420000B0410000B0E303132AC4 +:1075B00042C0119121EC1191E7FFFF17FD7BBEA99D +:1075C000FD030091F35301A9F40300AA12EAFF9707 +:1075D000F30300AAE00314AA1BEAFF97140000F9C2 +:1075E000610640B9010800B9610A40B9010C00B94F +:1075F00001018052011000B900008052F35341A9EB +:10760000FD7BC2A8C0035FD6FD7BBEA9FD03009130 +:10761000F35301A9F40300AA08EAFF97F30300AAB1 +:1076200002008052804A40F9410000B021041291CA +:107630009EEEFF97600200B900008052F35341A90B +:10764000FD7BC2A8C0035FD6FD7BBCA9FD030091F2 +:10765000F35301A9F55B02A9F50300AAF76303A997 +:10766000181840F9000340F9163440F9E00318AA4D +:10767000F2E9FF97F40300AAE00315AAF2E9FF97E5 +:10768000135C4129800240B920030034B303003465 +:107690007F02006B7392801A800640B91F00136B43 +:1076A00081000054800A40B91F00176BE0000054AD +:1076B000E203172AE103132AE00318AA93FFFF97B6 +:1076C0006002003593DE0029C10240F9E10100B4F7 +:1076D000E00315AAF00301AAF35341A9F55B42A9FF +:1076E000F76343A9FD7BC4A800021FD67F02007187 +:1076F00000D490522000A0727312801AE7FFFF1787 +:10770000F303002AE5FFFF1700008052F35341A95D +:10771000F55B42A9F76343A9FD7BC4A8C0035FD60C +:10772000011840F9210040F9213440F9210440F9C1 +:10773000610000B4F00301AA00021FD6C0035FD6A7 +:10774000051840F9A60040F9A52040F9C63440F9D3 +:10775000A50440F9A50840B9BFC80171A1000054B3 +:10776000C50C40F9A50000B4F00305AA00021FD61D +:10777000C00B8012C0035FD6A0048012FEFFFF176B +:10778000000040F9B1FFFF17000040F9E5FFFF17C7 +:10779000000040F9EBFFFF17FD7BBFA9FD0300913F +:1077A0009DE9FF97800000B4000040B9FD7BC1A8AF +:1077B000C0035FD620008012FDFFFF17FD7BBCA930 +:1077C000FD030091F35301A9F40300AAF55B02A99C +:1077D000F60302AAF503012A020040F9423440F9F7 +:1077E000431C40F9230300B4E2C3009160003FD67C +:1077F000F303002AA0020034400000B000EC0C911A +:10780000740100B4810A40A9E403132AE303152A92 +:10781000210040F9F1DCFF97E003132AF35341A95B +:10782000F55B42A9FD7BC4A8C0035FD6420000B04F +:10783000410000B0E403132AE303152A42C011916A +:1078400021EC1191F4FFFF17E1E30091E00314AA8A +:1078500080E9FF97E01F40F9600000B553028012F5 +:10786000EEFFFF176CE9FF97000040B91F00156B92 +:10787000A1000054E01F40F913008052C00200F93B +:10788000E6FFFF17E0E300917AE9FF97F2FFFF17A9 +:10789000FD7BB9A9FD030091F35301A9F55B02A992 +:1078A000F503022AF60307AAE2830191F76303A90D +:1078B000F803032AF70306AAF96B04A9F903012ABE +:1078C000FA0304AAE103002AFB7305A9FC03002ABA +:1078D000FB0305AA400E805214EDFF97E00100342F +:1078E000F303002AE203002AE1031C2A400000B04F +:1078F00000500E91B9DCFF97E003132AF35341A91E +:10790000F55B42A9F76343A9F96B44A9FB7345A949 +:10791000FD7BC7A8C0035FD6E03340F9E2A3019125 +:10792000E103192AA6FFFF97F303002A5F0300F182 +:107930000018533AA1050054E03340F9E3A3019144 +:10794000E2031BAAE1031AAA41EAFF97F303002A04 +:1079500040FDFF35E03740F92FE9FF97F40300AA17 +:10796000BF02007100D490522000A072A012801AB1 +:1079700099020029980A00B9E03740F9018840B916 +:1079800001010037E7E8FF97F303002A60FBFF35AA +:10799000E03740F92CE9FF97E13740F9010000F9A1 +:1079A000E03740F928E9FF97F90300AAE03340F9EE +:1079B00022E9FF97FA0300AA000440B980040034CA +:1079C00015050035940000B4800A40B91F00186BFB +:1079D00001050054E03340F9E00200F91300805241 +:1079E000D90200F9C5FFFF1780020034E13340F9E6 +:1079F000400000B000B40E91010100B4260840A977 +:107A0000E503132AE403192AE3031C2AC10040F901 +:107A100072DCFF97B9FFFF17420000B0410000B0D1 +:107A2000E503132AE403192AE3031C2A42C0119137 +:107A300021EC1191F7FFFF17E03740F9E0F9FFB4AF +:107A4000F5E8FF97F40300AACCFFFF17E00319AA9B +:107A50004CFFFF97F303002A40FBFF34A7FFFF17FB +:107A6000400740B900FBFF341F00156BC0FAFF54FC +:107A7000E03340F9E203182AE103152AA3FEFF9739 +:107A8000F303002A80FAFF34E00319AA3FFFFF97AF +:107A90009AFFFF17FD7BBDA902008012FD03009134 +:107AA000F35301A9F40300AAF51300F9F50301AAA1 +:107AB000410000B021A40B91004840F97BEDFF97F5 +:107AC000A00200B902D49052410000B0804A40F9AF +:107AD000210412912200A07274EDFF97A00600B954 +:107AE000410000B021581391804A40F9EDEDFF9715 +:107AF000131C1F53804A40F9410000B0217C1391B0 +:107B0000E8EDFF971F1C0072400000547302003222 +:107B1000804A40F9410000B021A01391E1EDFF97A8 +:107B20001F1C00724000005473021E32804A40F94C +:107B3000410000B021D01391DAEDFF971F1C0072B5 +:107B40004000005473021C32804A40F9410000B0EA +:107B500021F81391D3EDFF971F1C007240000054D1 +:107B600073021932804A40F9410000B0220080526D +:107B7000213814914DEDFF971F1000710003005440 +:107B80001F200071000300541F08007141000054C1 +:107B900073021732804A40F9410000B0220080523F +:107BA000217C149141EDFF971F10007100020054D9 +:107BB0001F200071000200541F0800714100005492 +:107BC00073021432B30A00B900008052F35341A982 +:107BD000F51340F9FD7BC3A8C0035FD673021632CC +:107BE000EDFFFF1773021232EBFFFF177302133220 +:107BF000F5FFFF1773021132F3FFFF17FD7BBEA9DC +:107C0000FD030091F30B00F9F30300AA82E8FF974C +:107C1000E10300AA604A40F9A000F8B7E00313AA04 +:107C2000F30B40F9FD7BC2A89BFFFF1700008052B9 +:107C3000F30B40F9FD7BC2A8C0035FD6FD7BBEA954 +:107C4000FD030091F35301A9F403012A78E8FF979B +:107C5000F30300AA000440F992020094600640F980 +:107C6000E103142ABE0200946086423960000034A9 +:107C7000600640F991020094600640F98302009486 +:107C800000008052F35341A9FD7BC2A8C0035FD618 +:107C900024084039E30300AAE20301AAE401003604 +:107CA000202040396000003420284039200100366F +:107CB000406040396000003440684039A000003620 +:107CC000402840B9800100344084403940010037E9 +:107CD00000008052C0035FD623284039A3FF073736 +:107CE0002368403963FF07372284403922FF073772 +:107CF0001B060014E10302AAE00303AAFB0500141B +:107D0000FD7BBFA9FD03009149E8FF97003C40F9C6 +:107D1000A00000B4FD7BC1A8010840B9000040F9F3 +:107D2000430C001400008052FD7BC1A8C0035FD645 +:107D3000FD7BBAA9222080D2E213C0F2FD0300919C +:107D4000E2FF02A9E20300B2E22700F962008052DA +:107D5000FF0705A9E1A30091F30B00F9F30300AAC3 +:107D6000FFFF03A9E25300B90D0300948000003522 +:107D7000E1A30091E00313AA1F030094F30B40F961 +:107D8000FD7BC6A8C0035FD6FD7BBEA9FD030091A5 +:107D9000F35301A9F403012A25E8FF97F30300AA8E +:107DA000010040B9000440F9E203142A580200948B +:107DB000610240B9E203142A63125129651A52295B +:107DC000600640F9F35341A9FD7BC2A88A02001462 +:107DD000FD7BB9A9FD030091F35301A9F403012A26 +:107DE000F55B02A9F60300AAF76303A9F96B04A9DE +:107DF000FB2B00F90EE8FF97F30300AA000440B93B +:107E0000740000341F00146B42000054F403002A75 +:107E1000600640F923020094607640B98001F8378B +:107E2000E103142AE00316AAD8FFFF97627640B94F +:107E300021008052600640F926020094600640F955 +:107E400015008052110200941B000014606E40B9AE +:107E50001F00146B00040054E00316AAF4E7FF9718 +:107E6000F80300AA01488852E00316AAE101A072B3 +:107E7000FF7F0D29190740F9C4FFFF9702008052C8 +:107E800021008052E00319AA12020094E00319AA0B +:107E9000FE010094E1A30191E00318AAA5FFFF975A +:107EA000F503002AA00200344000009000940291E3 +:107EB00081B6FF97E003152AF35341A9F55B42A968 +:107EC000F76343A9F96B44A9FB2B40F9FD7BC7A8D5 +:107ED000C0035FD6606640B91F00146BE1FBFF541E +:107EE000756A40B9E00316AA2CFEFF97BF02006B2B +:107EF00041FBFF54D2FFFF171B008012FA031B2A1D +:107F000017008052E103142AE00316AA9FFFFF978F +:107F1000E00319AAE3010094E203172A210080522A +:107F2000E00319AAEB010094E00319AAD701009419 +:107F3000E1B30191E00318AA7EFFFF97F503002A41 +:107F400040FBFF35E0074D295F070031C1010054B8 +:107F50003F00006B7B03971AFA029A1AF70600118A +:107F6000FF42007161FDFF545F07003121010054A1 +:107F700040000090001003914FB6FF97746E00B957 +:107F8000AFFFFF173F00006BE0010054FB060051FC +:107F9000E00319AA5A031B0BC2010094420080524D +:107FA000E00319AA21008052420FC21AC9010094AD +:107FB000146700B9E00316AAF8FDFF97006B00B93B +:107FC000EFFFFF17FB03172AE5FFFF1700008052A2 +:107FD000C0035FD6FD7BBDA9FD030091F35301A94A +:107FE000F30301AAF55B02A9F50300AA000040F91A +:107FF000001840F98EE7FF97F40300AA160440F931 +:10800000A00240F9E5FDFF97E103002A8282423990 +:10801000E00316AAE3010094602640B91F04007132 +:108020006022403921020054611A40F9E10100B494 +:1080300000040034602A40B91F2000716800005419 +:10804000809A40B960030036E10313AAE00314AA42 +:10805000FE02009460050034F35341A9F55B42A988 +:10806000FD7BC3A8C0035FD680030034601A40F9CB +:10807000400300B4602A40B91F200071680000541A +:10808000809A40B9A0020036E10313AAE00314AAC3 +:10809000CD03009420FEFF35E10313AAE00314AAE8 +:1080A000F35341A9F55B42A9FD7BC3A80504001465 +:1080B000E10313AAE00314AA39020094E0FCFF359F +:1080C000E10313AAE00314AAF35341A9F55B42A903 +:1080D000FD7BC3A848020014E10313AAE00314AA1D +:1080E00095020094A0FBFF35E10313AAE00314AA54 +:1080F000F35341A9F55B42A9FD7BC3A88F0200148D +:10810000808A4239E10313AAC0000034E00314AAB4 +:10811000F35341A9F55B42A9FD7BC3A8ACFFFF1750 +:10812000E00314AAF35341A9F55B42A9FD7BC3A860 +:108130000003001400008052C0035FD6FD7BBAA983 +:10814000FD030091F35301A9F51300F9F50300AA0B +:108150002EE7FF97F40300AAE00315AA34E7FF9780 +:10816000F30300AA800640F9600600F9800A40F98E +:10817000600A00F980524139608A023980624039D0 +:1081800060820239801E40B9601A00B9802240B96D +:10819000601E00B9802640B9602200B9803640B91F +:1081A000607600B9801640F9601600F9800240B987 +:1081B000600600B9803A40B9608200B9803E40B99B +:1081C000608600B9804240B9608A00B9804640B9F3 +:1081D000608E00B9804A40B9609200B9804E40B9C3 +:1081E000609600B9805240B9609A00B9600240B907 +:1081F00000010035E2E30091E00315AA010080527E +:1082000017E2FF97800300346EA0FF97600200B969 +:10821000E00315AA6F0B0094603E00F9400000B423 +:10822000F10A0094606240B9A0000035E00313AA8F +:108230009A01009420008052606200B9600240B947 +:10824000E13F99D24173A7F20100018B2108C09A46 +:1082500040068052217C001BE00315AA617200B920 +:10826000B5FFFF97F35341A9F51340F9FD7BC6A86D +:10827000C0035FD6E0E30091FBE1FF97E4FFFF1747 +:10828000FD7BBFA9FD030091019040B9406A40F910 +:1082900073CCFF971F00007100A09F5AFD7BC1A8FF +:1082A000007C4093C0035FD6FD7BBDA9FD03009118 +:1082B000F35301A9F40300AAF51300F9D3E6FF97DD +:1082C000F30300AAE00314AAD9E6FF97F50300AA76 +:1082D00001008052E00314AA5CE7FF97600600F9F2 +:1082E00062A2009121008052E00314AA43E7FF97A5 +:1082F000600A00F9210000D021143F91804A40F922 +:10830000E8EBFF976062003902108052210000D034 +:10831000804A40F921603F9164EBFF97601E00B9ED +:1083200082008052210000D0804A40F921A03F9174 +:108330005EEBFF97602200B902008052210000D05E +:10834000804A40F921E03F9158EBFF97602600B941 +:10835000611640F9E05B40B23F0000EB6900005459 +:1083600020008052A0860239804A40F9210000F0A6 +:1083700021340091CBEBFF9760520139E00314AA3E +:10838000C0FFFF97F50300AA2001F8B6200000F017 +:108390000064009111DAFF9740028012F35341A963 +:1083A000F51340F9FD7BC3A8C0035FD602249452A5 +:1083B00041000090E200A072210412913BEBFF9774 +:1083C000600200B902208052E00315AA210000F0EB +:1083D0002120019135EBFF97603A00B902028052EB +:1083E000E00315AA210000F0214801912FEBFF972F +:1083F000603E00B902198052E00315AA210000F086 +:108400002174019129EBFF97604200B9E21F80526D +:10841000E00315AA210000F021AC019123EBFF97A6 +:10842000604600B982028052E00315AA210000F0E4 +:1084300021E401911DEBFF97604A00B9820280524E +:10844000E00315AA210000F0211C029117EBFF9711 +:10845000604E00B9210000F0215402910200801208 +:10846000E00315AA1AEBFF97603600B9E00314AADF +:108470009FE6FF97000440B9605200B900008052A7 +:10848000C7FFFF1702604039211C0012220100348F +:1084900003644039E3000034000180520008C31A2D +:1084A000007C021B41000034007C0153C0035FD6F6 +:1084B00000008052FEFFFF17040440F9631C001205 +:1084C000840040B9BF3F03D5E30200340320A85223 +:1084D0008400032A230040397F080071A102005460 +:1084E000030440F92110403965E040B9BF3F03D58E +:1084F000E31F80522120C21A6320C21AA300230A5C +:108500002100032ABF3F03D5020440F941E000B92E +:10851000BF3F03D5000440F9040000B900008052B9 +:10852000C0035FD60120A8128400010AF9FFFF17DB +:10853000A0028012FBFFFF17FD7BBDA9FD03009188 +:10854000F35301A913008052F55B02A9F50300AAB9 +:10855000000080D2D3D4FF97F403002AF67082D2B1 +:10856000E00314AACFD4FF971F0016EB4901005473 +:1085700001718252200000D000543E9197D9FF979C +:1085800000008052F35341A9F55B42A9FD7BC3A8CB +:10859000C0035FD671B8FF97A00240B9BF3F03D5B3 +:1085A000C000F836730600117F0E0071A1FDFF5464 +:1085B00020008052F4FFFF1713008052E9FFFF17DD +:1085C000421C1053211C14532100022A001C185372 +:1085D0002000002AC0035FD6E20300AA2008403929 +:1085E000E001003620204039600000342028403966 +:1085F00060010036202840B96001003420844039F1 +:108600000000001240980239200440391F200071F8 +:10861000E900005460418012C0035FD60000805220 +:10862000F9FFFF1720008052F7FFFF17001C409250 +:10863000230000D0631020916078E078E0FEFF37DF +:10864000408C0239202440391F20007148FEFF541D +:10865000001C40926078E07800FEFF3740900239BD +:10866000208040391F20007168FDFF54001C40929B +:108670006078E07820FDFF37409402390000805296 +:10868000E6FFFF17C0035FD6010040B9BF3F03D527 +:1086900021000032BF3F03D5010000B9C0035FD6FF +:1086A000010040B9BF3F03D521781F12BF3F03D55A +:1086B000010000B9C0035FD6010040B9BF3F03D538 +:1086C00021001932BF3F03D5010000B9C0035FD6B6 +:1086D000FD7BBFA9E503012AFD030091F1FFFF9790 +:1086E000031040B9BF3F03D561000032BF000071E5 +:1086F00063781F126300811A430C1F33BF3F03D5F9 +:10870000FD7BC1A8031000B9E0FFFF17FD7BBFA9E7 +:10871000E303012AFD030091E2FFFF97050040B942 +:10872000BF3F03D56304005146781F536104020B19 +:10873000E2018052A56C09122108C61A21040051D9 +:108740003F3C00712190821AA14C012ABF3F03D502 +:10875000FD7BC1A8010000B9CCFFFF17FD7BBFA9BD +:10876000E403012AE30300AAFD030091CDFFFF9774 +:10877000020040B9BF3F03D542741D1244000836C1 +:1087800042001F324400003642001E32BF3F03D574 +:10879000FD7BC1A8620000B9E00303AABBFFFF177D +:1087A000FD7BBFA9E503012AE40300AAFD030091B4 +:1087B000BCFFFF97030040B9BF3F03D5020100345F +:1087C00062001732A20C1633BF3F03D5FD7BC1A850 +:1087D000820000B9E00304AAACFFFF17200080521A +:1087E000627816120020C51AE003202A050C001238 +:1087F000F5FFFF17FD7BBFA9E903012AE73F995267 +:10880000FD0300914773A772E80300AAA5FFFF9735 +:108810002001070B4700070B0008C91AE208C21A1B +:108820004200000B5F00036B480000546300024BE2 +:108830004204000B5F00056B48000054A500024B8A +:1088400001040051C6040051A500010B6300010B97 +:1088500081040051C600000B2100000BA508C01ABE +:108860002108C01AC608C01AA51C18536308C01AEC +:10887000211C1053C61C00122100062AA360032AE3 +:108880002100032ABF3F03D5FD7BC1A8010D00B91C +:10889000E00308AA7DFFFF17FD7BBFA9E20300AA42 +:1088A000FD030091000440F97EFFFF97400440F96A +:1088B000011440B9BF3F03D5400C502921340A129E +:1088C000633C10536010002A0000012ABF3F03D50B +:1088D000410440F9201400B9BF3F03D5400440F9DA +:1088E0001F2400B9401840B9007C0153BF3F03D595 +:1088F000410440F9201800B9BF3F03D5400440F9B6 +:108900001F4400B9FD7BC1A8400440F95FFFFF1779 +:10891000FD7BBEA9FD030091F35301A9F30300AA57 +:10892000BF3F03D5019000B921000032BF3F03D5FE +:1089300014E28452019000B9940600519F06003160 +:1089400041010054E00313AAFCFEFF9740020034EB +:10895000BF3F03D5000080527F9200B9F35341A975 +:10896000FD7BC2A8C0035FD6609240B9BF3F03D56C +:10897000A0000836200080D203D4FF9777B7FF9776 +:10898000EEFFFF1714FEFF35200000D000B43A912F +:1089900092D8FF9780008012F1FFFF17FD7BBFA9DF +:1089A000E60300AAFD0300910CFFFF97E303002AF2 +:1089B000C0010035C3984239E00306AA0200805284 +:1089C000BEFEFF97E303002A00010035C29442393E +:1089D000C1904239C08C4239FAFEFF97BF3F03D5A0 +:1089E000C10440F9200400B9E003032AFD7BC1A8BB +:1089F000C0035FD6FD7BBBA9E50301AAE60300AA7D +:108A0000FD030091F35301A9F55B02A9F76303A9E4 +:108A100022084079352840B9341840F90198423984 +:108A2000130440F9A1070034427C0853441C085346 +:108A3000E00305AAE44F00B993FEFF971F7C007185 +:108A40006807005460000034811C002AE14F00B91F +:108A5000A1060051E04F40B921080C532100002A23 +:108A6000A020403921000932E14F00B980010034D3 +:108A7000A10840F9BF3F03D5C00440F9019400B9F3 +:108A8000E14F40B9A02040390004005100041053C8 +:108A90000000012A00000D32E04F00B9E14F40B95B +:108AA000E00313AA9BFFFF97F603002AA0020035FC +:108AB00060A240B9BF3F03D597008052BF02176B39 +:108AC000B892971AB792971AE20317AAE133019165 +:108AD000E04F00B9E00314AA27D3FF97BF1200713B +:108AE0000901005460A640B9BF3F03D5A202184B4C +:108AF000E1330191E04F00B98002178B1ED3FF973D +:108B0000E003162AF35341A9F55B42A9F76343A991 +:108B1000FD7BC5A8C0035FD6421C001280018052B5 +:108B20005FF001714210801AC1FFFF177641801279 +:108B3000F4FFFF179AFFFF17FD7BBBA9E20300AA12 +:108B4000E00301AAFD030091F35301A9F55B02A91B +:108B5000F76303A94398423933104039342840B9A8 +:108B60007F000071361840F921144039550440F94E +:108B70007302811A01204039731E085341010034E9 +:108B8000030840F9BF3F03D5410440F9239400B9DD +:108B90000120403921040051210410533300132ACD +:108BA00073020D324198423937FEFF971F7C0071E6 +:108BB0008804005440000034731E002A340300343B +:108BC00097008052800600519F02176BE10316AA9E +:108BD0009892971A000814539792971A1300132A21 +:108BE000E20317AAE0330191E3D2FF977302113237 +:108BF000E04F40B9BF3F03D5A0AA00B99F12007152 +:108C0000090100548202184BC102178BE033019115 +:108C1000D9D2FF97E04F40B9BF3F03D5A0AE00B90E +:108C2000E103132AE00315AA3AFFFF97F35341A982 +:108C3000F55B42A9F76343A9FD7BC5A8C0035FD6D6 +:108C4000C00B8012FAFFFF17FD7BBFA9E60300AA45 +:108C5000FD0300912860403960FEFF97E403002A7D +:108C6000A0050035C3984239E70301AAE00306AA2C +:108C70000203805211FEFF97E403002AC00400356E +:108C8000C12040B9BF3F03D5C00440F9011C00B961 +:108C9000C098423960040034E5144039C19042392B +:108CA000C2944239C08C423946FEFF97A500002A83 +:108CB000E10840F9BF3F03D5C00440F9016800B99D +:108CC00008010034C1984239E00307AAEEFDFF977E +:108CD0001F7C0071A802005440000034A560002AE7 +:108CE000BF3F03D5C00440F9050400B9C00440F9F2 +:108CF000011440B9BF3F03D5E0204039216C1C125C +:108D0000000400510000012ABF3F03D5C10440F90F +:108D1000201400B9E003042AFD7BC1A8C0035FD67C +:108D2000E5104039DEFFFF1764418012FAFFFF179C +:108D3000FD7BBCA9FD030091F35301A9F30300AA35 +:108D400020008052F55B02A9F76303A9362840B9D9 +:108D5000380840F9351840F94BFEFF9760864239D4 +:108D6000C0050034611640F90043368BF703162A1C +:108D70001F0001EB22050054740A40F99402188B7D +:108D8000770000B49F0A40F2E1010054D2A4FF979B +:108D900080030035000080D2FF0200EB6103005425 +:108DA000600640F9E5FDFF97C00D00358000801298 +:108DB000F35341A9F55B42A9F76343A9FD7BC4A81E +:108DC000C0035FD680164038F70600D1A0160038E1 +:108DD000ECFFFF17816A60F8A16A20F8002000917B +:108DE000E10200CB3F1C00F168FFFF54E0F27D92EE +:108DF0009402008BB502008BF70200CBE6FFFF1751 +:108E0000000080D2F7FFFF17816A6038A16A20381E +:108E100000040091E1FFFF17BF3F03D5600640F952 +:108E2000166C00B9BF3F03D5600640F9210080529F +:108E3000016000B996040035000080D2750640F943 +:108E400098D2FF97F40300AAA06240B9BF3F03D5B0 +:108E500040092837E00314AA92D2FF971F2800F197 +:108E600048080054200080D2C7D2FF973BB6FF9736 +:108E7000F6FFFF17600640F9142C40B9BF3F03D539 +:108E8000943E007241020054200080D2BED2FF976F +:108E900032B6FF97F7060071E1FEFF54200000D0C4 +:108EA00000503B91A10D80124CD7FF97BF3F03D5D7 +:108EB000600640F941008052016000B9A00D8012A7 +:108EC000BCFFFF1737E28452F3FFFF17601E40B963 +:108ED000620A40F9807E001B1F00166B0090961AF4 +:108EE000A10640F2610000541F0440F24002005409 +:108EF000E303002A010080D27F0001EB410100540E +:108F0000B542208BD602004B600640F9142C40B9C4 +:108F1000BF3F03D5943E001210B6FF9794FDFF3576 +:108F2000C5FFFF1744004039A46A2138210400918D +:108F3000F2FFFF17037C02537F0001EB20FEFF547A +:108F4000440040B9A47A21B821040091FBFFFF1727 +:108F5000200000D0A10D801200CC3B91D3FFFF1761 +:108F60000000805293FFFF17200000D0A10D801257 +:108F700000783C91CDFFFF17BF3F03D5600640F955 +:108F800001048052016000B9000080D2750640F9EA +:108F900044D2FF97F40300AAA06240B9BF3F03D5B3 +:108FA00000F02F36E00314AA3ED2FF971F2800F1ED +:108FB00008FDFF54200080D273D2FF97E7B5FF97DA +:108FC000F6FFFF17FD7BBFA9E60300AAFD03009192 +:108FD00082FDFF97E303002AA0060035C3984239BB +:108FE000E70301AAE00306AA0202805233FDFF97BD +:108FF000E303002AC0050035C12040B9BF3F03D5B7 +:10900000C00440F9011C00B9C09842396005003421 +:10901000E2144039C1904239C0944239214C145372 +:109020002040002A0000022ABF3F03D5C10440F9B6 +:10903000200800B9C2944239C1904239C08C4239EB +:1090400060FDFF97BF3F03D5C10440F9200400B97C +:10905000E10840F9BF3F03D5C00440F9017800B9E9 +:10906000C098423900010034C00440F9003840B9CA +:10907000BF3F03D500001232BF3F03D5C10440F902 +:10908000203800B9C00440F9011440B9BF3F03D5EE +:10909000E0204039216C1C12000400510000012A1C +:1090A000BF3F03D5C10440F9201400B9E003032AEF +:1090B000FD7BC1A8C0035FD6E2104039D6FFFF1781 +:1090C000FD7BBBA9FD030091F35301A9F30300AAA3 +:1090D00020008052F55B02A9F76303A9F96B04A98C +:1090E000372840B9360840F9F503172A341840F9F3 +:1090F00065FDFF97609A4239200600356086423947 +:10910000E0050034611640F9C07E4092B642368BCD +:10911000DF0201EB42050054760A40F9D602008BCB +:10912000750000B4DF0A40F201020054EAA3FF9781 +:10913000A0030035000080D2BF0200EB8103005481 +:10914000600640F9FDFCFF97C00D0034000080521E +:10915000F35341A9F55B42A9F76343A9F96B44A90D +:10916000FD7BC5A8C0035FD680164038B50600D188 +:10917000C0160038EBFFFF17816A60F8C16A20F85B +:1091800000200091A10200CB3F1C00F168FFFF54BA +:10919000A0F27D92D602008B9402008BB50200CB28 +:1091A000E5FFFF17000080D2F7FFFF17816A6038E4 +:1091B000C16A203800040091E0FFFF17798240B9AE +:1091C0009F0640F2A0040054E00315AAB5B2FF9731 +:1091D000F60300AAA00900B4E10314AAF40316AA36 +:1091E000E20315AA64D1FF97BF3F03D5600640F99B +:1091F000177C00B9BF3F03D5600640F921008052BB +:10920000017000B9017D80D2607240B9009C0F915D +:109210000008C19ADCD1FF9757020035000080D2C8 +:10922000750640F99FD1FF97F40300AAA07240B9D8 +:10923000BF3F03D5000A2837E00314AA99D1FF974E +:109240001F2800F1E80B0054200080D2CED1FF97F8 +:1092500042B5FF97F6FFFF17160080D2E3FFFF1716 +:109260003F03176B000080D23593971A620A40F9CA +:10927000A17E02531F0001EB61020054A10600729F +:10928000A1020054000080D27A0640F985D1FF97F0 +:10929000F80300AA402F40B9BF3F03D51F3C10720E +:1092A00020050054E00318AA7ED1FF971F2800F183 +:1092B00008030054200080D2B3D1FF9727B5FF9751 +:1092C000F5FFFF17837A60B800040091430000B9EE +:1092D000E9FFFF17A2767E92217C4093630A40F952 +:1092E0008202028B000080D23F0000EBC0FCFF54E2 +:1092F000446860380004009164000039FBFFFF17E8 +:109300008000801293FFFF176001801291FFFF170A +:10931000200000B000503B91A10D80122FD6FF9786 +:10932000BF3F03D5600640F941008052017000B98B +:10933000760000B4E00316AAD3B1FF97A00D801207 +:1093400084FFFF179442358BF702154B03B5FF9747 +:10935000B2FFFF17200000B0A10D8012000C3D915C +:10936000EFFFFF17F6EEFFB4E00316AAC6B1FF97B2 +:1093700074FFFF17BF3F03D5600640F90104805218 +:10938000017000B9000080D2750640F945D1FF9701 +:10939000F40300AAA07240B9BF3F03D540FE2F36A8 +:1093A000E00314AA3FD1FF971F2800F148FDFF54A6 +:1093B000200080D274D1FF97E8B4FF97F6FFFF1723 +:1093C000200000B0A10D801200BC3D91D4FFFF171A +:1093D000211C0012421C0012210400513F1C00718C +:1093E000E80000542300009063800C9163486138CA +:1093F000610000102388238B60001FD6604180121B +:10940000C0035FD6A20000341F04177260418012AF +:1094100000009F1AFBFFFF171F041472FCFFFF17C9 +:10942000620000341F0076F2F9FFFF171F0073F28D +:10943000F7FFFF17620000341F0072F2F4FFFF17FE +:109440001F0071F2F2FFFF1700008052EDFFFF17BF +:10945000FD7BBFA9E40301AA22008052FD03009115 +:1094600021044039050C40B9E003052AD9FFFF97D4 +:109470004003003580204039C00000348124403949 +:10948000E003052A22008052D2FFFF9760020035D8 +:1094900080604039C000003481644039E003052A0F +:1094A00022008052CBFFFF9780010035802440B915 +:1094B00080010034818040391F080071E2179F1A33 +:1094C000E003052AC3FFFF971F000071E0179F1AF2 +:1094D000FD7BC1A8C0035FD600008052FDFFFF17CF +:1094E00020008052FBFFFF17220040F923E09FD2AB +:1094F0004200038A5F0420F1E00200542220403938 +:10950000A2000034220440F94200038A5F0420F1E3 +:109510002002005422604039C2000034220C40F97D +:1095200023E09FD24200038A5F0420F140010054EF +:10953000222440B95F040071C900005422804039E0 +:109540005F20007161000054222840B942000037BA +:10955000C0FFFF1700008052C0035FD623084039C8 +:10956000630100372328403923010037236840393D +:10957000E300003723844039A3000037220040393C +:109580005F04007141000054B2FFFF1700008052D9 +:10959000C0035FD6040040F9E20300AAE30301AA76 +:1095A000841840F9840040F9843440F9841040F96B +:1095B000A40000B4840440F9640000B4F00304AAD9 +:1095C00000021FD6E10303AAE00302AAE4FFFF178B +:1095D000FD7BBBA9FD030091F35301A9F40301AA8C +:1095E000F55B02A9F50300AAF76303A9F92300F9C3 +:1095F000020040F9421840F9420040F9563440F95F +:10960000E5FFFF971F1C0072400B0054E00315AAF2 +:109610005CF8FF97F303002AA001F837C01240F965 +:10962000600200B4020840F9220200B4E10314AA67 +:10963000E00315AA40003FD6F303002A1F3008318B +:1096400060010054E00315AA50F8FF97BF03009192 +:10965000E003132AF35341A9F55B42A9F76343A939 +:10966000F92340F9FD7BC5A8C0035FD6802A40B925 +:1096700040070034802640B9961A40F91F04007153 +:1096800001070054F70316AA160080D28022403941 +:1096900093024039826240397302000B7302020B5D +:1096A000617E4093213C009121187C92FF6321CB85 +:1096B000810A4079F9030091E10300396005003423 +:1096C00001040051E3070091850A40F921701D5300 +:1096D000A424C19A21200051641400383F20003195 +:1096E00081FFFF5400040011A2000034421C40928C +:1096F0002003008BE11F805203D0FF97D80217AAE6 +:10970000640080521F0300F161721D5384049F1A8C +:10971000E20319AA84044092E00315AA030080D250 +:109720001CF8FF97F303002A20F9FF35D8F8FFB49F +:10973000812A40B9E30317AAE20316AAE00315AA97 +:10974000440080D221701D5312F8FF97C0F7FF34F8 +:10975000F303002ABEFFFF17170080D2CBFFFF17CD +:10976000170080D2CAFFFF17200080D2DFFFFF174B +:1097700073418012B6FFFF17030040F9E40300AA0B +:10978000E20301AA631840F9630040F9633440F929 +:10979000631040F9E30000B4650040F9650000B4CF +:1097A000F00305AA00021FD6600840F9C00200B508 +:1097B0004020403943004039811840B96300000B14 +:1097C000406040396300000BA10000343F00036B90 +:1097D00062000054A0028012C0035FD64094442966 +:1097E0001F04007141010054801440B9800000340E +:1097F0001F00056B0090851A402800B9402840B929 +:10980000A0FEFF3400008052F4FFFF1781FFFF34F9 +:109810002100034B3F00056B2190851A412800B9B8 +:10982000F7FFFF17202C40F9020080121F0800B933 +:10983000202C40F9020000B9202C40F9000040B96A +:109840001F0C40F2000100540000009000B02E9167 +:1098500002028052202800F900008052229400B9B0 +:10986000C0035FD6000000900204805200E02D91FA +:10987000F9FFFF17E2038052229000B9EAFFFF17B9 +:1098800000048052209400B90000009000102D9137 +:10989000202800F900008052C0035FD6010C47A9C0 +:1098A000049840B9064040F9847C0313029040B903 +:1098B000630001CB012C40F9847C4093252040B902 +:1098C000014440F9210006CB210003CB630CC49A6C +:1098D000210CC49A4100014B4200054B5F00036B11 +:1098E0004230831A030080123F00026B2190821ADB +:1098F000210400513F04003141000054C0035FD6F1 +:10990000043C40F9029C80B99F0002EBC000005467 +:10991000039840B9023840F97F200071410100549A +:1099200043004039022C40F9436000B9029840B925 +:10993000043840F9427C031382C0228B023800F9BC +:10994000ECFFFF1743004079F7FFFF17030848A912 +:10995000012C40F9420003CB039840B9212440B9BF +:10996000637C0313637C4093420CC39A3F00026BF9 +:109970002130821A210400513F040031410000547B +:10998000C0035FD6022C40F9044440F9436040B95B +:10999000029C80B99F0002EBC0000054049840B9BB +:1099A000024040F99F20007101010054430000393A +:1099B000029840B9034040F9427C031362C0228BF5 +:1099C000024000F9ECFFFF1743000079F9FFFF1791 +:1099D000202840B92200A0521F4040710090821AF6 +:1099E000202800B900008052C0035FD6FD7BBEA9CD +:1099F000FD030091F30B00F9F303012A0CE1FF973B +:109A0000136C00B900008052F30B40F9FD7BC2A833 +:109A1000C0035FD6FD7BBDA9FD030091F35301A9EF +:109A2000F303012AF51300F9F50300AAF7E0FF9705 +:109A3000F40300AAE00315AAFDE0FF97012C40F90A +:109A4000820240B93F0800B95F00136B4390931A3C +:109A50004290931A013040F92108C29A022C40F931 +:109A60002104001121381F12411400B92200805234 +:109A7000012C40F9220800B9036800B900008052A7 +:109A8000F35341A9F51340F9FD7BC3A8C0035FD68A +:109A9000FD7BBEA9FD030091F35301A9F30300AAC6 +:109AA000DAE0FF97F40300AAE00313AA65E1FF9749 +:109AB000800600F9000200B4604A40F90224945282 +:109AC000E200A072210000F02104129177E5FF97D7 +:109AD000800200B9210000D0218C0C91604A40F92D +:109AE000F0E5FF97E103002A000080523F1C00725E +:109AF00040000054A0028012F35341A9FD7BC2A88C +:109B0000C0035FD6FD7BBEA9FD030091F30B00F9F6 +:109B1000C7E0FF97013040B9F30300AA001440F9F1 +:109B2000C3040094A0000035E00313AAF30B40F92E +:109B3000FD7BC2A8A8DCFF17F30B40F9FD7BC2A890 +:109B4000C0035FD602844239019840B92104005114 +:109B5000420476D3211000122100022A02884239E1 +:109B6000006C40B942047AD3000478D34000002A44 +:109B70002000002AC0035FD6019840B90284423910 +:109B800021040051420478D3211070D32100022A0D +:109B900002884239006C40B942047CD300047AD375 +:109BA0004000002A2000002AC0035FD60284423908 +:109BB000019840B921040051420478D3210C0012CD +:109BC0002100022A02884239006C40B942047CD349 +:109BD00000047AD34000002A2000002AC0035FD688 +:109BE000FD7BBDA9FD030091F35301A9F30300AA76 +:109BF000F51300F9F50301AA8DE0FF97E20300AA2F +:109C0000F40300AA01008052E00313AA94DBFF973B +:109C1000F303002A00020035E00314AA61DCFF9779 +:109C20001F000071A10480120410417A60000054EA +:109C30001F300831A1010054E00314AA8ADBFF970A +:109C4000A00200F9800000B5B3028012E00314AA5C +:109C500061DCFF97E003132AF35341A9F51340F9A0 +:109C6000FD7BC3A8C0035FD6F303002AFAFFFF17EA +:109C7000FD7BBBA9FD030091F35301A9F55B02A98C +:109C8000F50300AAF76303A999E0FF97F60300AA7A +:109C9000E00315AA5DE0FF97F30300AAE00315AA0D +:109CA00063E0FF97F40300AA00018052E04F00B97F +:109CB000600640F9802E00F981820191600240B96E +:109CC000806A00B9E00315AAC6FFFF97F303002AD4 +:109CD000A0010035E00315AA55E0FF9718A00091F8 +:109CE000F70300AAE10318AAE00315AA9B04009455 +:109CF000F303002A400100341F3008310418423AAF +:109D000080030054E003132AF35341A9F55B42A9F1 +:109D1000F76343A9FD7BC5A8C0035FD6E00318AA7B +:109D200031040094F303002A40020034010B40B9CF +:109D3000E01640F93E040094200000D000B40C91DD +:109D4000D50000B4A10A40A9E303132A210040F979 +:109D5000A2D3FF97ECFFFF17220000F0210000F0D4 +:109D6000E303132A42C0119121EC1191F9FFFF176F +:109D7000960600B4E10314AAE00315AAC0023FD678 +:109D8000F303002A00FCFF35802E40F9210000D0AB +:109D9000E233019121880D91005C40B9A04A40F95D +:109DA000BFE4FF9780010035E14F40B93F0C0071DF +:109DB00089000054809640B93F00006BC9000054F0 +:109DC000200000D000C00D9184D3FF970001805285 +:109DD000E04F00B9E04F40B9809A00B9802E40F9B9 +:109DE0009F8602391F0800B9802E40F91F2C00B948 +:109DF00020008052812E40F9200800B9819240B99C +:109E000021F8FF35812E40F9201800B9812E40F944 +:109E1000221840B95F00006BE100005400040011FB +:109E20001F00047101FFFF54809200B93F1800B970 +:109E3000B5FFFF171F04007100109F1AFBFFFF17EB +:109E4000B3028012B0FFFF17C0035FD6FD7BBBA932 +:109E5000FD030091F35301A9F40301AAF55B02A9E4 +:109E6000F60300AAF76303A9F92300F9000040F9FB +:109E7000382440B9191840F9E00319AAECDFFF971C +:109E8000812240391F07007195024039F30300AA6F +:109E9000B502010B81624039B502010BB51E40923B +:109EA000A13E009121107C92FF6321CB6100805282 +:109EB00021049F1A01840239012840F9F703009117 +:109EC00020003FD6612E40F93F0800B9612E40F9CD +:109ED000200000B91F070071A1000054612E40F955 +:109EE000802A40B900040051200400B9612E40F9D5 +:109EF00020008052200800B9810A4079E10200392F +:109F000081224039E100003420701D53E3060091A6 +:109F1000002000511F200031610400542004001172 +:109F200082624039A2000034421C4092E0C2208B81 +:109F3000E11F8052F4CDFF97C00240F9010080522A +:109F4000C2FFFF97773A00F9F702158B773E00F9C9 +:109F50007F7E08A9610247A93F0000EBC1020054BF +:109F6000951A40F91F07007181060054754200F9E7 +:109F7000802A40B9A002008B604600F9C00240F977 +:109F800006F6FF971823C01A602E40F9181000B982 +:109F9000610248A93F0000EB4101005414008052C7 +:109FA00049000014820A40F94224C09A6214003821 +:109FB000D8FFFF17E00313AA39FEFF97E6FFFF174C +:109FC000E00313AA62FEFF97604240F91F0015EB01 +:109FD00001030054602E40F9003440B9A0FD1F3643 +:109FE000200000D0001C0C91B90100B4210B40A945 +:109FF000210040F994008012F8D2FF97BF0300912E +:10A00000E003142AF35341A9F55B42A9F76343A97E +:10A01000F92340F9FD7BC5A8C0035FD6220000D01C +:10A02000210000D042C0119121EC1191F2FFFF17E5 +:10A03000F50300AAD7FFFF17753A00F9802A40B947 +:10A04000B502008B753E00F9E00313AA14FEFF97DA +:10A05000C00240F9D1F5FF97210080522120C01A9B +:10A06000602E40F9011000B9610247A93F0000EBE2 +:10A07000610300541ACEFF9714D0439194020991C2 +:10A08000B5008052602E40F9002840B9BF3F03D58B +:10A090000000150A1F10007120F8FF5410CEFF9722 +:10A0A0009F0200EB05FFFF54602E40F9002840B9E5 +:10A0B000BF3F03D50000150AB40D80121F100071B8 +:10A0C000E0F6FF54602E40F9210080521F1000B9C5 +:10A0D000C00240F95DFFFF97C9FFFF17E00313AA15 +:10A0E000EFFDFF97E1FFFF17FD7BBCA9FD0300918A +:10A0F000F35301A9F403012AF55B02A9F50300AAB1 +:10A10000F60303AAF76303A9F70302AAF80304AA54 +:10A11000001840F946DFFF979F0A40F260020054A2 +:10A12000200000B0004C0E91750100B4A10A40A9B6 +:10A13000210040F913008012A8D2FF97E003132AF0 +:10A14000F35341A9F55B42A9F76343A9FD7BC4A87A +:10A15000C0035FD6220000D0210000D042C0119180 +:10A1600021EC1191F4FFFF17F30300AA98000036C9 +:10A17000E00315AA0100805234FFFF97DF0200F1CF +:10A18000E41A40FAA1060054DF0200F1E0079F1A2A +:10A1900000781F53612A40F960860239E00313AA50 +:10A1A000947E035320003FD6773A00F9612E40F9A0 +:10A1B000F702148B773E00F9764200F9D602148B31 +:10A1C000764600F9749E00B93F0800B9612E40F947 +:10A1D000220040B91F00026B40000054200000B96B +:10A1E000E00315AA6DF5FF97622E40F92100805219 +:10A1F0002020C01A401000B9602E40F9010800B9B3 +:10A20000E00313AAA6FDFF97D1FDFF97600648A9BA +:10A210003F0000EB68FFFF54B1CDFF9714D043918E +:10A2200094020991B6008052602E40F9002840B98E +:10A23000BF3F03D50000160A1F1000712101005412 +:10A2400013008052D8F70F36E00315AA2100805280 +:10A25000FEFEFF97BAFFFF1700008052CEFFFF17E8 +:10A260009FCDFF979F0200EB05FEFF54602E40F943 +:10A27000002840B9BF3F03D50000160A1F10007127 +:10A2800000FEFF54B30D8012EFFFFF17050040F9E9 +:10A29000A53440F9A50040F9650000B4F00305AA13 +:10A2A00000021FD6A0048012C0035FD6E00301AAFB +:10A2B000E103022AE20303AAE30304AAE2B3FF17BD +:10A2C000FD7BBEA9FD030091F30B00F9F30301AA86 +:10A2D000D7DEFF97010040F9610200F9000440F960 +:10A2E000600600F900008052F30B40F9FD7BC2A824 +:10A2F000C0035FD6FD7BBEA9FD030091F35301A906 +:10A30000F40300AAC1DEFF9701008052F30300AA04 +:10A31000E00314AA02DFFF971F0400B1A10000545C +:10A32000A0028012F35341A9FD7BC2A8C0035FD6EF +:10A33000600600F921008052E00314AAF8DEFF97BE +:10A340001F0400B1E0FEFF54600A00F94100805292 +:10A35000E00314AAF2DEFF971F0400B120FEFF54B1 +:10A36000600200F900008052EFFFFF17FD7BBDA9DE +:10A37000FD030091F35301A9F30300AAF51300F9BB +:10A38000ABDEFF9715400091F40300AAE10315AA84 +:10A39000E00313AAF102009440020034E303002A10 +:10A3A0002000009000BC3291330100B4610A40A942 +:10A3B000210040F909D2FF9740028012F35341A9CE +:10A3C000F51340F9FD7BC3A8C0035FD6220000D07F +:10A3D000210000D042C0119121EC1191F6FFFF172E +:10A3E000E00315AA80020094E00313AA710100940F +:10A3F00060FEFF3420000090002C33912EADFF97BB +:10A40000A10A40B9800A40F989020094EBFFFF17C6 +:10A41000000840F9E103012A006861B8BF3F03D595 +:10A42000C0035FD6E30300AAE003012ABF3F03D5C0 +:10A43000610040F9E203022A206822B8C0035FD617 +:10A44000FD7BBEA9FD030091F35301A9BF3F03D5D6 +:10A45000010040F93F1402B9140040F9000080D215 +:10A4600010CDFF97F30300AA801A42B9BF3F03D56E +:10A470001F0C40F220010054E00313AA09CDFF97FE +:10A480001FA00FF128010054200080D23ECDFF977D +:10A49000B2B0FF97F5FFFF1700008052F35341A9B8 +:10A4A000FD7BC2A8C0035FD6A00D8012FCFFFF1782 +:10A4B000FD7BBDA9FD030091F35301A9F30300AA9D +:10A4C000F51300F9010040F9211442B9BF3F03D54B +:10A4D000010040F9211842B9BF3F03D53F0C40F2BB +:10A4E00080010054D7FFFF97400100341300801211 +:10A4F000200000B000E80E91B8D1FF97E003132AC6 +:10A50000F35341A9F51340F9FD7BC3A8C0035FD6FF +:10A51000BF3F03D5600240F9E1018052011402B946 +:10A52000000080D2750240F9DECCFF97F40300AA48 +:10A53000A01A42B9BF3F03D5C0011836E00314AAE0 +:10A54000D8CCFF971FA00FF1A8000054200080D2A4 +:10A550000DCDFF9781B0FF97F6FFFF17200000B0E9 +:10A56000B30D801200500F919CD1FF97E4FFFF17AD +:10A57000E00313AAB3FFFF97F303002A00FCFF34A4 +:10A58000200000B000E80E9194D1FF97DCFFFF1788 +:10A59000FD7BBEA9FD030091F35301A9D097FF975E +:10A5A00013D00291000080D2BECCFF97F40300AA22 +:10A5B000600240B9BF3F03D520010037E00314AA71 +:10A5C000B8CCFF971FA00FF128010054200080D2C3 +:10A5D000EDCCFF9761B0FF97F6FFFF1700008052A8 +:10A5E000F35341A9FD7BC2A8C0035FD6A00D801222 +:10A5F000FCFFFF17FD7BBFA9FD0300911F1440F274 +:10A60000C0000054E10300AA200000B000E43C9127 +:10A6100072D1FF97A8CBFF97E20301AA231440F25F +:10A62000C0000054200000B000B43D91F9FFFF17B6 +:10A6300021740BD5630001916100008B7F0002EB58 +:10A6400083FFFF54FD7BC1A8C0035FD6FD7BBBA980 +:10A65000FD030091F55B02A9F50300AA000080D27A +:10A66000F35301A9F76303A918008052F92300F9F5 +:10A670008CCCFF97F60300AAA99EFF97B4CE47A9FA +:10A68000849DFF9701008052021040911900A8D2CA +:10A69000E00314AA1CCCFF97F70312AA941240916E +:10A6A00054B200F9731240D17A9DFF97E0B600F9D9 +:10A6B000789DFF979402008B769DFF97730200CBE5 +:10A6C0000F9EFF97B30000B5B801003538008052E7 +:10A6D000B4CE48A9FCFFFF177F0219EBE00314AAD0 +:10A6E0007792999AE10317AA730217CB9402178BFA +:10A6F000C1FFFF9719B0FF97F3FFFF172E9EFF973B +:10A700005B9EFF97E003162A66CCFF97F35341A99F +:10A71000E103002AF55B42A9200000B0F76343A9DA +:10A7200000843E91F92340F9FD7BC5A82BD1FF178A +:10A73000FD7BBCA9FD030091F35301A91300029115 +:10A7400014800291F55B02A9160080D2F76303A979 +:10A750001700A8D2150080D278827FA9610240F943 +:10A760003F0015EB6801005473420091D602158B2F +:10A770009F0213EB01FFFF54403E40F91F0016EB10 +:10A78000E0020054200000D00004049112000014E4 +:10A790001F0017EB0190979A400100B4200400D1EC +:10A7A0001F0001EAE1000054A002188BD5B0FF970A +:10A7B000B502008B600240F9000015CBE8FFFF17DF +:10A7C000200000D0002403913BACFF97200000D074 +:10A7D00000BC039138ACFF9737CBFF97F35341A9E7 +:10A7E000F55B42A9F76343A9FD7BC4A8C0035FD60C +:10A7F000010840F921A840B9BF3F03D5020840F93C +:10A80000424040B9BF3F03D563789852443C0012A0 +:10A810007F20226BA0020054224850D3A3B494524C +:10A820009F00036B42149F1A000040F9000840B9D2 +:10A83000BF3F03D500040012430080D224344AD322 +:10A840006320C09A203C4ED30000040B242445D33F +:10A85000211000128100010B0000010B0000020B0F +:10A860006020C09AC0035FD602008052EFFFFF173E +:10A87000014040F9E10400B4013C40F92100449159 +:10A88000BF3F03D5024280D24200BFF2410000B96F +:10A89000229C60D3BF3F03D5834280D24300BFF2E6 +:10A8A000620000B9BF3F03D563F00191610000B9B8 +:10A8B000BF3F03D5815280D24100BFF2220000B9D0 +:10A8C000018847A92100028B210400D1BF3F03D595 +:10A8D000024380D24200BFF2410000B9229C60D303 +:10A8E000BF3F03D563D001D1620000B9BF3F03D59C +:10A8F000617C00B9BF3F03D5815380D24100BFF2D4 +:10A90000220000B9BF3F03D522208052228016B812 +:10A91000014840F9C10400B4014440F9BF3F03D5E8 +:10A92000024480D24200BFF2410000B9229C60D3B1 +:10A93000BF3F03D5834480D24300BFF2620000B919 +:10A94000BF3F03D5617C00B9BF3F03D5815480D29E +:10A950004100BFF2220000B9018048A92000008B0D +:10A96000000400D1BF3F03D5014580D24100BFF2B2 +:10A97000200000B9019C60D3BF3F03D5824580D23F +:10A980004200BFF2410000B9BF3F03D5407C00B98F +:10A99000BF3F03D5805580D24000BFF2010000B90F +:10A9A000BF3F03D541408052018015B8C0035FD638 +:10A9B000FD7BB2A9FD030091F35301A9F40300AAA2 +:10A9C000F55B02A9F71B00F910DDFF97F30300AA5E +:10A9D000E00314AA16DDFF97F60300AA021380D243 +:10A9E00001008052E023019147CBFF97E9FEFF97DA +:10A9F000800C003574008052000080D2770240F94C +:10AA0000A8CBFF97F50300AAE00E40B9BF3F03D5DE +:10AA1000C00B0037E00315AAA2CBFF971FA00FF1D0 +:10AA2000280A0054200080D2D7CBFF974BAFFF9766 +:10AA3000F6FFFF17413E40F93F0014EB4001005480 +:10AA4000413E40F9200000B000BC3F9121FC54D3AE +:10AA500062D0FF97200000D081FE54D30090009177 +:10AA60005ED0FF97413E40F93F0014EB09010054CE +:10AA7000200000D00024019158D0FF97200000D082 +:10AA800000F0019155D0FF978BCAFF97413E40F9E6 +:10AA9000200000D00048029121FC54D34FD0FF97F2 +:10AAA00081058052E00313AA5AFEFF97610240F924 +:10AAB00040043836200041B9222080522200A07282 +:10AAC0000000022A200001B9E2DF9F52610240F932 +:10AAD000C2FFBF72200041B90000020A200001B984 +:10AAE00022208052610240F9200441B90000022A6C +:10AAF000200401B9610240F9201041B900001F3261 +:10AB0000201001B9AB98FF9760000035E023019158 +:10AB1000CFFEFF97E023019106FFFF97E02301910D +:10AB200054FFFF97E06340F9C00200F9403E40F94E +:10AB3000C00600F93D000014200041B9C2DF9F5259 +:10AB4000C2FFBF720000020A200001B92220801259 +:10AB5000610240F9200441B90000020A200401B951 +:10AB6000EDFFFF17E00313AA52FEFF979406007152 +:10AB700041F4FF54200000D0008402914EABFF97B7 +:10AB8000150080122900001401228052E00313AA4C +:10AB900020FEFF97147C05535196FF97012042B980 +:10ABA000BF3F03D5217C125394060012020180524C +:10ABB000E00313AA21001E532100142A1AFEFF9756 +:10ABC00001158052E00313AA12FEFF97E103002A49 +:10ABD000021C8052E00313AA13FEFF97E00313AA9E +:10ABE00004FFFF971F0000F1F40300AA0000A8D2A1 +:10ABF0009412809A406A40F9E523019144E2019160 +:10AC0000030080D202008052010080D234C9FF9735 +:10AC1000F503002A00F1FF34B5008012200000B0D7 +:10AC200000303F9124ABFF97E003152AF35341A96D +:10AC3000F55B42A9F71B40F9FD7BCEA8C0035FD6A8 +:10AC4000FD7BBCA9FD030091F35301A9F40301AA04 +:10AC5000E2E30091F55B02A9F50300AA010040F9C7 +:10AC6000C00C80524DE0FF97F303002A80010035AD +:10AC7000E01F40F9010040F9363440F9800200F944 +:10AC8000C20240F9620100B4E10315AAE00314AA6C +:10AC900040003FD680010034F303002AE003132A6A +:10ACA000F35341A9F55B42A9FD7BC4A8C0035FD65D +:10ACB000A00A40B91F04007101010054A00E40B960 +:10ACC000800600F9C10640F9A1FEFFB4E00314AA12 +:10ACD00020003FD6F1FFFF17B3028012F0FFFF17ED +:10ACE000FD7BB9A9E403012A03008052FD03009112 +:10ACF000F30B00F9F30302AAE5830091210000B0F1 +:10AD0000220000B021F03A9142BC3A912AE1FF972B +:10AD10007F0200F980000035E10313AAE08300916F +:10AD2000C8FFFF97F30B40F9FD7BC7A8C0035FD6B0 +:10AD3000010040F9210040F9213440F9210840F98F +:10AD4000610000B4F00301AA00021FD60000805287 +:10AD5000C0035FD6010040F9210040F9213440F9D9 +:10AD6000210C40F9610000B4F00301AA00021FD6D3 +:10AD700000008052C0035FD6FD7BBEA9FD03009199 +:10AD8000F35301A9F40300AA130080D2800A40B94A +:10AD90001F00136B6800005400008052060000146E +:10ADA000800240F90014138B73060091EAFFFF97AD +:10ADB000E0FEFF36F35341A9FD7BC2A8C0035FD676 +:10ADC000010040F9210040F9213440F9211040F9F7 +:10ADD000610000B4F00301AA00021FD600008052F7 +:10ADE000C0035FD6FD7BBEA9FD030091F35301A90B +:10ADF000F40300AA130080D2800A40B91F00136B2D +:10AE0000680000540000805206000014800240F9DF +:10AE10000014138B73060091EAFFFF97E0FEFF36E4 +:10AE2000F35341A9FD7BC2A8C0035FD6FD7BBDA93A +:10AE3000FD030091F35301A9F403012AF30300AACF +:10AE4000F51300F915008052BF02146B6B0000541B +:10AE5000000080520C000014600240F9800000B530 +:10AE6000B506001173820091F8FFFF17E00313AAE3 +:10AE7000B9FFFF9780000035E00313AAADFFFF97ED +:10AE800000FFFF34F35341A9F51340F9FD7BC3A83C +:10AE9000C0035FD6FD7BBCA903008052220000B036 +:10AEA000FD030091F35301A942BC3A91F40301AAB6 +:10AEB000F55B02A9F71B00F9F70300AA3F0800B9E8 +:10AEC000210000B021F03A91D7E0FF97F303002A68 +:10AED0001F0000712D020054007C7B9301009052F2 +:10AEE0007BC9FF97800200F9400300B4150080D2AF +:10AEF000820240F9E103152AE00317AA4214158BD8 +:10AF000078FFFF976001F836F303002A810A40B901 +:10AF1000800240F9C6FFFF97E003132AF35341A9CB +:10AF2000F55B42A9F71B40F9FD7BC4A8C0035FD6BF +:10AF3000800A40B9B506009100040011800A00B9EA +:10AF40007F02156B6CFDFF5413008052F3FFFF1757 +:10AF500073018012F1FFFF17004840F9CEFFFF1781 +:10AF6000FD7BBEA9000280D2FD030091F35301A92D +:10AF7000F40301AA0100905255C9FF97600100B483 +:10AF8000F30300AAE10300AAE00314AAC2FFFF979B +:10AF900040000034137C4093E00313AAF35341A90B +:10AFA000FD7BC2A8C0035FD673018092FBFFFF1731 +:10AFB000FD7BBFA9FD030091EAFFFF971F0440B18D +:10AFC00049000054000080D2FD7BC1A8C0035FD6B9 +:10AFD000014840F9F7FFFF17FD7BBEA9FD03009173 +:10AFE000F30B00F9F30300AA000040F990DBFF9790 +:10AFF000630640F901048052020040F9200080D22B +:10B00000610CC11A0020C31A21741E53217C409385 +:10B01000446861B80000042A406821B800008052EA +:10B02000F30B40F9FD7BC2A8C0035FD6FD7BBFA92F +:10B03000FD0300917EDBFF9700008052FD7BC1A8DD +:10B04000C0035FD6FD7BBDA9FD030091F35301A9A9 +:10B05000F30300AAF51300F9000040F974DBFF9731 +:10B06000620640F901048052040040F943100012C6 +:10B07000410CC11A220080D24220C39AF503022A51 +:10B0800021741E53217C4093856861B8A200220A76 +:10B09000826821B8130040F9000080D27302018B4E +:10B0A00000CAFF97F40300AA600240B9BF3F03D56E +:10B0B0001F00156A20010054E00314AAF9C9FF9784 +:10B0C0001FD007F148010054200080D22ECAFF97FC +:10B0D000A2ADFF97F5FFFF1700008052F35341A97F +:10B0E000F51340F9FD7BC3A8C0035FD6A00D801205 +:10B0F000FBFFFF17FD7BBDA9FD030091F35301A9E1 +:10B10000F30300AAF51300F949DBFF97F40300AA43 +:10B11000E00313AACBDBFF97F50300AA604A40F9CE +:10B1200002028052210000B0217C0A91DFDFFF97EC +:10B13000A042208B800200F900008052F35341A905 +:10B14000F51340F9FD7BC3A8C0035FD6FD7BBEA904 +:10B15000220000D0210000D0FD030091034840F9F7 +:10B16000E463009142C80D9121A80D911EDCFF9768 +:10B1700000008052FD7BC2A8C0035FD6FD7BBFA943 +:10B18000FD0300912ADBFF97000040F9010040B960 +:10B19000BF3F03D581000036BF3F03D5C10E8052AB +:10B1A000010C00B900008052FD7BC1A8C0035FD62E +:10B1B000FD7BBDA9FD030091F35301A9F40300AA8F +:10B1C0001BDBFF97F30300AAE00314AAECFFFF9731 +:10B1D000BF3F03D5600240F921000090E2B3009127 +:10B1E00021F03A911F0000B9804A40F9C0DFFF9773 +:10B1F000600100B473420091E00313AADFFEFF97E1 +:10B20000E02F00B960000035E00313AAF6FEFF97B7 +:10B21000F35341A9FD7BC3A8C0035FD60000805251 +:10B22000FCFFFF17FD7BBBA9FD030091F35301A9B0 +:10B23000F40300AAFEDAFF97F30300AAE00314AABE +:10B2400083DBFF97600200F9A00000B5A002801226 +:10B25000F35341A9FD7BC5A8C0035FD6E2A30091CB +:10B26000E00314AA01008052FDD5FF97E02700B942 +:10B2700000FFFF35E0A30091CAD6FF97E02700B991 +:10B2800080FEFF35E0A30091F7D5FF97017D80D2C6 +:10B290000008C19A600A00B9A0FDFF34804A40F955 +:10B2A00021000090E293009121F03A9190DFFF9706 +:10B2B000800000B5E00314AABEFFFF97E5FFFF176B +:10B2C00073420091E00314AAE10313AA23FFFF973E +:10B2D000E02700B9E0FBFF35E00313AAC2FEFF97A9 +:10B2E000E02700B980FEFF34DAFFFF17FD7BBDA920 +:10B2F000FD030091F35301A9F40300AAF51300F92B +:10B30000F50301AACADAFF97F30300AAE00314AA1F +:10B31000A8FFFF9701048052620A40B9600240F919 +:10B32000427C151B420400714310C05AE201805256 +:10B330002100034B21109F1A2140007121509F1AB8 +:10B340003F3C007121D0821A2110012ABF3F03D552 +:10B35000010400B9600240F9BF3F03D521008052CB +:10B36000010000B9E00314AAF35341A9F51340F911 +:10B37000FD7BC3A882FFFF17FD7BBDA94201805260 +:10B38000210000D0FD030091F35301A9F30300AAAB +:10B3900021B81991F55B02A9004840F943DFFF97F6 +:10B3A000F503002A604A40F902F48152210000D0DE +:10B3B00021E819913DDFFF9781008052140CC11ADA +:10B3C000210000D0604A40F9211C1A91947E4093DC +:10B3D000B4DFFF971F1C007281020054604A40F9DD +:10B3E000210000D03600805221681A91ADDFFF970E +:10B3F000E00313AA91DAFF97F30300AA1664003959 +:10B40000000080D2750200B9740600F925C9FF97C3 +:10B41000600A00F900008052F35341A9F55B42A98C +:10B42000FD7BC3A8C0035FD616008052F1FFFF1753 +:10B43000FD7BBBA9FD030091F35301A9F55B02A9B4 +:10B44000F71B00F9030040F9633440F9630040F949 +:10B45000630600B4F30300AAF60301AA60003FD616 +:10B46000F403002A20030035E00313AA73DAFF97E0 +:10B47000F50300AA20008052020280D2010080520F +:10B48000177D80D2A0620039E00301919EC8FF972A +:10B49000A10640F9E30313AA620640F900000090F8 +:10B4A000217C179B001018914EACFF97A01200F959 +:10B4B000800100B5610640F9200000D054028012DE +:10B4C00000AC1A91C5CDFF97E003142AF35341A9AC +:10B4D000F55B42A9F71B40F9FD7BC5A8C0035FD609 +:10B4E000A30640F9E0030191010280D2220000D0BE +:10B4F00042281B9168CDFF97C40AD79AE3030191B4 +:10B50000610640F9020000F0200000D042A82D9111 +:10B5100000581B91B1CDFF97ECFFFF17B4048012C8 +:10B52000EAFFFF17FD7BBCA920118052FD030091AB +:10B53000E1E30091F35301A9F55B02A97EDCFF97DB +:10B54000C0010035E01F40F9340000903500009044 +:10B5500094822A91B5222A91167D8052130840F9CF +:10B56000736201D1E11F40F96262019121400091B3 +:10B570005F0001EBC100005400008052F35341A969 +:10B58000F55B42A9FD7BC4A8C0035FD6E00313AA04 +:10B59000E4D9FF9700010035E00313AA27DAFF97EB +:10B5A00001644039E1000035610640F9E00315AA65 +:10B5B0008ACDFF97732E40F9736201D1EAFFFF171E +:10B5C000010040B9020080D2E00313AA217C161BBF +:10B5D00098FFFF9700FFFF34E00314AA610640F9CB +:10B5E000F4FFFF17010040F9213440F9210840F928 +:10B5F000610000B4F00301AA00021FD6A00480126B +:10B60000C0035FD6018840B9E1010036FD7BBEA9C9 +:10B61000FD030091F30B00F9F30300AA07DAFF978B +:10B6200000604039A0000034E00313AAF30B40F996 +:10B63000FD7BC2A8ECFFFF17F30B40F9FD7BC2A80E +:10B64000C0035FD6C0035FD6040000F084C02D9114 +:10B65000030080D202686338620000343F0003EBCD +:10B6600041000054C0035FD685C8623865000036CB +:10B6700042800011421C00120268233863040091CA +:10B68000F5FFFF17E403002A2007A0B0001843F9D4 +:10B69000E00000B500008012C0035FD600008012F9 +:10B6A000F35341A9FD7BC2A8C0035FD6FD7BBEA9B1 +:10B6B000E30302AAFD030091F35301A9F403012A55 +:10B6C000F303012A2107A0B0E20314AA211C43F9C5 +:10B6D0002140248BDBD2FF979F0200EB01FEFF5439 +:10B6E000E003132AEFFFFF17FD7BBDA9FD030091C7 +:10B6F000F35301A9F51300F93F0400712901005427 +:10B70000F40300AA000840B91F80007160030054D0 +:10B710001F400071800800543FBC3F71C9000054B5 +:10B720002000009000CC28912CCDFF970000805283 +:10B730000B0000141F300071A1FFFF5480324079CC +:10B7400015741E533508D51A007C151B3308004BA1 +:10B7500013000014800240F9005873B8F35341A954 +:10B76000F51340F9FD7BC3A8C0035FD6800240F902 +:10B7700000587378FAFFFF17E05F1C323F00006B40 +:10B7800002FDFF5480324079C2008052007C021BCF +:10B79000007C02133508C01AB386001B802240B912 +:10B7A0001F00156BC0010054C1008052820E40B9C9 +:10B7B000A07E011B0300010B4400004B7F00026BC5 +:10B7C00083224079820240F98180811A6000000B57 +:10B7D000ADFFFF97C0FAFF37952200B9800A40B944 +:10B7E0001F40007140FCFF541F80007140FBFF545C +:10B7F0001F300071C1F9FF546106130B820240F93A +:10B80000217C015320040011416861384068603890 +:10B810002020000B53000036007C0453002C001243 +:10B82000CFFFFF17E0FD9F523F00006BA8F7FF54CA +:10B83000803240791504000B3508D51A007C151BA1 +:10B840000004000B3300004BD5FFFF17FD7BBBA9A5 +:10B85000FD030091F35301A9F40303AAF55B02A9C8 +:10B86000F50300AAF60302AAF76303A9F92300F976 +:10B870004105003417344079001C40B9F702011B20 +:10B88000A4324079DF1640F2E007005484FC0091B6 +:10B89000F803009184E47A928438019184347C9294 +:10B8A000FF6324CBF3FF009173E67A92A0324079D4 +:10B8B0001F0014EB690300541F030091B40200B48D +:10B8C000A0324079F80300912100805200FC0091E1 +:10B8D00000E47A920038019100347C92FF6320CB1F +:10B8E000E003172AF3FF009173E67A92E20313AAAA +:10B8F00065FFFF971F04007121020054E20314AAA0 +:10B90000E10313AAE00316AA9BC7FF971F03009148 +:10B91000000080520C000014171440B9D9FFFF1723 +:10B92000F9060011E20313AAE003172A210080524E +:10B9300055FFFF971F040071400100541F03009141 +:10B9400000008012BF030091F35341A9F55B42A9A7 +:10B95000F76343A9F92340F9FD7BC5A8C0035FD66F +:10B96000A2324079E00316AAE10313AAF703192AC9 +:10B9700081C7FF97A0324079D602008B940200CB9A +:10B98000CBFFFF179F0014EBA8F9FF54930AC49A4A +:10B99000E20316AAE003172AE103132A3AFFFF97EE +:10B9A0001F00136BE1FCFF54A1324079F702000B3A +:10B9B000207C001BD602008B940200CBC0FFFF1737 +:10B9C000FD7BBCA9FD030091F35301A9F30300AA79 +:10B9D0002007A0B0F55B02A9001843F9F71B00F996 +:10B9E000000100B514008012E003142AF35341A9AA +:10B9F000F55B42A9F71B40F9FD7BC4A8C0035FD6E5 +:10BA0000F50301AAF60302AA011040F9000880D24A +:10BA100021FC009121E47A9265AAFF97F70300AA1E +:10BA200020FEFFB4E20300AA2100805200008052F1 +:10BA300015FFFF97A000F83614008012E00317AA44 +:10BA400011A8FF97E9FFFF17E10317AAE00313AA64 +:10BA5000020880D248C7FF97651E4079602E4039A2 +:10BA600074324039642E40791420142A65FEFF3464 +:10BA70006042403920FEFF3461564039021E805238 +:10BA80003FDC03712490427A81FDFF54810208510A +:10BA9000823E4092213C00123F003871E8FCFF5486 +:10BAA000410400D13F0002EA81FCFF546136403975 +:10BAB0006636403921FCFFB4230400D17F0001EA3F +:10BAC000C1FBFF5464000035612640B961FBFF34BF +:10BAD00061464039947E0553634A403994060051CB +:10BAE0002320032A9402036A81FAFF54440100359B +:10BAF000612640B901010034E10201910004805245 +:10BB0000C00200B9420380D2E00315AA1AC7FF970A +:10BB1000CBFFFF17633C7BD30014041B61920091A1 +:10BB20006308C29A624E40390000030B63524039E9 +:10BB30004320032A43000035632240B96300004BD1 +:10BB400082018052000280526308C61A7FD03F7182 +:10BB50000080821AEBFFFF17FD7BB7A9222000911E +:10BB6000FD030091F35301A9F40300AAF30301AA12 +:10BB7000E0430191E1C30091F51300F991FFFF97B4 +:10BB800020050035650A40B92207A0B0F503002A58 +:10BB900042E01891BF80007121010054E07740B964 +:10BBA000600E00B9E07340B9602E00B94001003565 +:10BBB000400440F9602E00B907000014E0CF40793E +:10BBC000600E00B9E03340F9009C58D3602E00B9F4 +:10BBD000A0FEFF34E1BF4079E0834139630E40B9F4 +:10BBE000603200B961220079420840F90004031B69 +:10BBF000E377413963360079E12F40F9601600B9E7 +:10BC0000249C58D364320079E10304AA873C409213 +:10BC10005F2024EB400100542000009000E40F91CD +:10BC2000EECBFF97B5008012E003152AF35341A92C +:10BC3000F51340F9FD7BC9A8C0035FD6A30000350A +:10BC40002000009000901091E4CBFF97F6FFFF17C3 +:10BC5000647C041B9F404071E9000054E103042A06 +:10BC60002200A0522000009000F81091DBCBFF973B +:10BC7000EDFFFF1763781F53BF800071210300544D +:10BC80000000034B601E00B9E07F40B9602A00B994 +:10BC900000008012602200B9C00080527F4A003943 +:10BCA000217C001B000880D221FC001121347A92F3 +:10BCB000BFA9FF97600200F960FBFFB4930200F98F +:10BCC000602A40B980020129602A40B9807E022999 +:10BCD000200080D2800E00F99F1200F9D3FFFF17D9 +:10BCE000E23340F9425C48D342E87BD34208C79A2A +:10BCF000622600B94200034B4200000B0000805254 +:10BD0000621E00B9E2FFFF17FD7BBDA9FD03009194 +:10BD1000F35301A9F51300F93507A0B0021040F95B +:10BD2000A01A03F92007A0B000E0189142FC00918E +:10BD300042E47A9242000191FF6322CB020C80D24E +:10BD4000F3FF00918CC6FF9773E67A922100805230 +:10BD5000E20313AA000080524BFEFF971F040071FC +:10BD600020010054BF1A03F914008012BF03009190 +:10BD7000E003142AF35341A9F51340F9FD7BC3A84E +:10BD8000C0035FD660FA0791420080D22100009084 +:10BD900021D41291ABC6FF97F403002A40FEFF3571 +:10BDA000210000D060DA009121681991620080D2F0 +:10BDB000A4C6FF97C0FDFF34210000D0604A019166 +:10BDC00021781991A20080D29EC6FF9700FDFF3412 +:10BDD000E5FFFF17FD7BB8A92207A0B0FD03009186 +:10BDE0005F1803F9E2830091F35301A9F30300AA5A +:10BDF000F403012A5FCCFF97400200345401003461 +:10BE0000620640B9E103142A200000900048129114 +:10BE100072CBFF9700008012F35341A9FD7BC8A8A5 +:10BE2000C0035FD6600E40F9FF0302A9601240F91B +:10BE3000E01B00F9FFE30039FF630139FF7B00B924 +:10BE4000E1830091E00313AAB0FFFF97F3FFFF1710 +:10BE5000FD7BBDA9FD030091F35301A9F30300AAE3 +:10BE6000F55B02A9001440B9E0000034150080D24F +:10BE7000E00315AAF35341A9F55B42A9FD7BC3A8D2 +:10BE8000C0035FD6630240F9F60301AA621240B90B +:10BE9000601A40B974344079827E021BA0040034D9 +:10BEA000600840B91F80007140040054601440B91C +:10BEB000632440B94000000B6200024B9F02026BFA +:10BEC0009492821A75020691E103142AE20315AADC +:10BED000EDFDFF97C0FCFF37600240F9003040796C +:10BEE000007C141BC00200B9601A40B9611240B94D +:10BEF000610E00B940020034620240F9400840B9C6 +:10BF00001F800071C001005421040011611200B9AA +:10BF100040344079007C011B412440B91F00016B73 +:10BF200083FAFF5420008052601600B9D1FFFF173A +:10BF3000601C40B94000000BE3FFFF17600240F9AE +:10BF4000EAFDFF97601200B91F040071C9FEFF549B +:10BF5000610240F9210840B93F800071C0000054DF +:10BF60003F40007102FE9F5201FE81522110821A51 +:10BF7000EBFFFF17E15F1C32E9FFFF17FD7BBDA957 +:10BF8000FD030091F30B00F9F30300AA011C40B973 +:10BF900041020035E1B30091AEFFFF97A00000B56C +:10BFA0007F1200F9F30B40F9FD7BC3A8C0035FD6F5 +:10BFB000E12F40B9217C055321040051611E00B9D5 +:10BFC000601200F9601240F9010040393F00007131 +:10BFD00000109F9AF4FFFF17001040F92104005150 +:10BFE000611E00B900800091F6FFFF17FD7BBAA922 +:10BFF000FD030091F35301A9F30300AAF55B02A925 +:10C00000F643019115E00091F76303A91FA400F91D +:10C01000F92300F9E00313AAD9FFFF97F40300AA5C +:10C02000200100B5000080527F1A00F9F35341A9A6 +:10C03000F55B42A9F76343A9F92340F9FD7BC6A844 +:10C04000C0035FD6601E40B9610E40B96006052985 +:10C05000601240F9601A00F9820240395F9403715E +:10C06000A0FDFF54812E403941041836210C0012E6 +:10C070003F3C007101FDFF54E2FC373617004039A8 +:10C08000F40300AA19344039020080D2F77A191259 +:10C09000F7060051FF060031C10800548002403904 +:10C0A0001F9403710418457A60FBFF5462C2228B0F +:10C0B000010080D2000080525FE000390260195315 +:10C0C0004004402A826A6138210400914000200B1C +:10C0D000001C00123F2C00F121FFFF543F03006BB6 +:10C0E000A1F9FF5494F9FFB460E2009160A600F951 +:10C0F00076E20491E10314AAF50316AAE00316AA56 +:10C10000020180D29CC5FF977F020539A102403908 +:10C11000E01B80523F00006A010B0054803240391E +:10C1200080001836A102164BE00316AA47FDFF97C0 +:10C1300081224039E01B80523F00006A60020054B7 +:10C14000F70315AAC005805281220091620080D2B7 +:10C15000E0160038E00317AA87C5FF978032403900 +:10C1600080002036E00317AA610080D237FDFF97D8 +:10C17000BF120039F50317AAA1024039E01B805213 +:10C180003F00006AE1070054BF02003960E2443911 +:10C190001F940371A10700547FE2043960A640F99F +:10C1A000400000B576A600F920008052A0FFFF17DE +:10C1B00084060091030080D261F87FD3E003032A54 +:10C1C00081686138616836382103003461040011E8 +:10C1D000630400917F1400F101FFFF54217C409320 +:10C1E000833A0091856A009160004039E403012A96 +:10C1F000C06A2138E0030034630800912004001174 +:10C2000021040091BF0003EB01FFFF54817240390C +:10C21000C1CA2038C100003480080011817A403939 +:10C22000C1CA203841000034800C00115800000BB6 +:10C230001FFF03710CEFFF54147C4093E10315AA18 +:10C24000A0C2208B67C5FF97E20314AAE10316AAD8 +:10C25000E00315AA48C5FF97E00313AA48FFFF971C +:10C26000F40300AA80EDFFB4027F409389FFFF171B +:10C27000E003012AEEFFFF17B5060091A4FFFF17A8 +:10C28000B5060091BDFFFF171F14007181F8FF5420 +:10C290004003801260E20439C1FFFF17FD7BBBA998 +:10C2A000FD030091F35301A9F30300AAF55B02A972 +:10C2B000F50301AAF76303A9F703022AF96B04A99E +:10C2C0001AE00491990B8052F40315AA80024039B8 +:10C2D000800000341FBC00710410597A80010054A2 +:10C2E000E00314AAD4C4FF97C00400B5570C083665 +:10C2F00000008052F35341A9F55B42A9F76343A9BB +:10C30000F96B44A9FD7BC5A8C0035FD694060091D4 +:10C31000EFFFFF17B5060091A002403980000034FE +:10C320001FBC00710410597A61FFFF54601A40B9B4 +:10C33000A0090034A20214CB5F0400F16102005492 +:10C34000010000F021DC0F91E00314AAA3C4FF97C1 +:10C35000A0080035600240F9012840B96186012932 +:10C36000002840B9600A00B97F1600B97F1E00B9E5 +:10C370007F1200F9A002403980FAFF35DCFFFF1779 +:10C38000F50314AAE5FFFF175F0800F1C10600548A +:10C39000010000F021D80F91ECFFFF1760A640F9D3 +:10C3A000A5C4FF971F0300EB61A640F90023809A04 +:10C3B000167C4092E00314AAE20316AA59C4FF9720 +:10C3C0002001003460A640F91F001AEBE00400547D +:10C3D000E20316AAE1031AAAE00314AA51C4FF97C4 +:10C3E00040040035611240F9202C403920032036EA +:10C3F000620240F920344079430840B97F800071DF +:10C400008101005421284079213C10530000010B88 +:10C41000600A00B9200100346082012900008052C6 +:10C420007F8202297F1E00B97F1200F9A7FFFF1744 +:10C4300001008052F6FFFF17402840B960820129B1 +:10C44000402840B9600A00B920008052F5FFFF176C +:10C45000A002403900010035D7F40737600280128E +:10C46000A5FFFF17B80214CBE00313AAE0FEFF9765 +:10C4700060F9FF35200080129FFFFF17FD7BB5A9F3 +:10C48000FD030091F76303A9F80301AA013080D2EC +:10C49000F70302AA2100A0F2F35301A9F30300AAB3 +:10C4A000000880D2F55B02A9F96B04A9FA0303AA7C +:10C4B000F90304AAFB7305A9BDA7FF97801800B470 +:10C4C000FB0300AAE1E30191A4FDFF97F403002A16 +:10C4D000A00F0035E10313AAE0031BAA220080523B +:10C4E0006FFFFF97F403002AA00E0035611340F997 +:10C4F000E28340B9F6274179202840795F800071B6 +:10C50000351C40B933344079003C10533F0300F9E7 +:10C51000E123417900009F1AFF0215EB0A0D005438 +:10C520005F0300F18D000054FA021A8BBF021AEB70 +:10C53000B5D29A9AD67E011B7302000B1CFE815263 +:10C54000D67E4093FA0316AAFF021AEB4A03005460 +:10C550005A0316CBB5021ACBF7021AEB00090054A6 +:10C56000DF0215EB000880D2DAD2959A41FF0091E4 +:10C5700021E47A928EA7FF97FC0300AA800100B401 +:10C58000E20300AAE3031AAAE103132AE0E30191FC +:10C59000AFFCFF97C0030034000000F000EC1191E5 +:10C5A0008EC9FF97E0031CAA37A5FF9714008012DD +:10C5B00043000014E103132AE0E301914BFCFF97D1 +:10C5C000F303002A1F04007102FE9F52A8000054CA +:10C5D000000000F000A0119180C9FF97F4FFFF1741 +:10C5E000E08340B91F800071E00000541F400071DB +:10C5F0008013821A7F02006BC2FEFF545A03168B0F +:10C60000D2FFFF17E05F1C32FBFFFF17B5021ACB0A +:10C610005A0317CBE2031AAA8103178BE00318AA67 +:10C6200055C4FF97E0031CAA17A5FF97200340F904 +:10C6300000001A8B200300F9350400B4E103132A2B +:10C64000E0E3019118031A8B28FCFF97F303002AFB +:10C650001F040071E9FBFF54E08340B91F800071A3 +:10C66000600400541F40007101FE9F5200FE815281 +:10C670000010811A7F02006BC2FAFF54FA0316AA57 +:10C68000FC03132A14FE815217FE9F525F0315EB21 +:10C690002B030054A37E4093E20318AAE103132A5C +:10C6A000E0E301916AFCFF97F403002A00040035DF +:10C6B000200340F90000158B200300F9E03F40F90A +:10C6C000F1A4FF97E0031BAAEFA4FF97E003142A4D +:10C6D000F35341A9F55B42A9F76343A9F96B44A958 +:10C6E000FB7345A9FD7BCBA8C0035FD6E05F1C327E +:10C6F000E1FFFF17E1031C2AE0E30191FBFBFF9739 +:10C70000010400519F03016B80010054437F40935B +:10C71000E20318AAE103132AE0E30191E33700F9E9 +:10C720004BFCFF97E33740F940020034000000F073 +:10C7300000EC1191A9FFFF171F040071A9F4FF5429 +:10C74000E18340B93F800071000100543F40007117 +:10C750008112971A1F00016BC2F3FF545A03168B04 +:10C76000FC03002ACAFFFF17E15F1C32FAFFFF1724 +:10C77000200340F9E1031C2AB5021ACB18031A8BD7 +:10C780000000038B200300F9E0E30191D7FBFF9742 +:10C79000F303002A1F040071C9F1FF54E08340B97C +:10C7A0001F800071000100541F4000718012971A11 +:10C7B0007F02006BE2F0FF54FA0316AAE003132A8B +:10C7C000E8FFFF17E05F1C32FAFFFF1774018012C9 +:10C7D000BFFFFF1700000000BC15E2FF00000000D3 +:10C7E0000000000000000000CD15E2FF0000000086 +:10C7F0000000000000000000E215E2FF0000000061 +:10C800000000000000000000F415E2FF000000003E +:10C8100000000000000000000A16E2FF0000000017 +:10C820000000000000000000000000000000000008 +:10C830000000000000000000E4F0E0FF0000000045 +:10C84000D0F1E0FF0000000064F1E0FF0000000014 +:10C8500000000000000000000000000000000000D8 +:10C860003714E2FF000000008CD1E1FF000000005F +:10C870004514E2FF0000000000000000000000007E +:10C8800000000000000000000000000000000000A8 +:10C890000000000000000000907CE1FF00000000AC +:10C8A000D47FE1FF00000000000000000000000055 +:10C8B0000000000000000000000000000000000078 +:10C8C0000000000000000000000000000000000068 +:10C8D0000000000000000000000000000000000058 +:10C8E000000000000000000090C8E1FF0000000010 +:10C8F000D07DE1FF000000003C7CE1FF0000000073 +:10C900000000000000000000000000000000000027 +:10C91000E812E2FF0000000000000000000000003C +:10C920000000000000000000000000000000000007 +:10C9300000000000000000000000000000000000F7 +:10C940000000000000000000B40EE1FF0000000045 +:10C9500000000000000000000000000000000000D7 +:10C9600000000000000000000000000000000000C7 +:10C97000C912E2FF000000000000000000000000FB +:10C9800000000000000000000000000000000000A7 +:10C990000000000000000000000000000000000097 +:10C9A0000000000000000000180EE1FF0000000081 +:10C9B0000000000000000000000000000000000077 +:10C9C000080EE1FF00000000080EE1FF000000007B +:10C9D0000000000000000000000000000000000057 +:10C9E0000000000000000000100EE1FF0000000049 +:10C9F0000000000000000000000000000000000037 +:10CA00000000000000000000000000000000000026 +:10CA10003E16E2FF000000000000000000000000E1 +:10CA20000000000000000000000000000000000006 +:10CA3000ECB2E1FF00000000B0B1E1FF0000000037 +:10CA40007CB1E1FF000000000000000000000000D9 +:10CA50005020D1FF00000000010000001400000081 +:10CA600008000000000000005420D1FF000000007A +:10CA70000200000014000000080000000000000098 +:10CA80005820D1FF00000000030000001400000047 +:10CA900008000000000000005C20D1FF0000000042 +:10CAA0000400000000000000100000000000000072 +:10CAB0002C20D1FF00000000050000001000000045 +:10CAC00010000000000000003820D1FF000000002E +:10CAD0000600000010000000100000000000000030 +:10CAE0003C20D1FF00000000070000001000000003 +:10CAF00010000000000000007420D1FF00000000C2 +:10CB0000080000000000000010000000000000000D +:10CB10007820D1FF000000000900000000000000A4 +:10CB200010000000000000000000000000000000F5 +:10CB300000000000000000008054E1FF0000000041 +:10CB4000AC5BE1FF000000000000000000000000FE +:10CB500000000000000000000000000000000000D5 +:10CB600000000000000000000000000000000000C5 +:10CB700000000000000000005A14E2FF0000000066 +:10CB80002498E1FF000000006A14E2FF00000000AA +:10CB90002498E1FF000000008014E2FF0000000084 +:10CBA0002498E1FF000000009614E2FF000000005E +:10CBB0002498E1FF00000000AC14E2FF0000000038 +:10CBC0002498E1FF00000000C214E2FF0000000012 +:10CBD0002498E1FF00000000D714E2FF00000000ED +:10CBE0008098E1FF00000000EA14E2FF000000006E +:10CBF0002498E1FF00000000FB14E2FF00000000A9 +:10CC00002498E1FF000000001415E2FF000000007E +:10CC10007498E1FF000000002415E2FF000000000E +:10CC20008098E1FF000000003415E2FF00000000E2 +:10CC30002498E1FF000000004815E2FF000000001A +:10CC40002498E1FF000000005915E2FF00000000F9 +:10CC50002498E1FF000000006915E2FF00000000D9 +:10CC60002498E1FF000000007A15E2FF00000000B8 +:10CC70002498E1FF000000008A15E2FF0000000098 +:10CC80002498E1FF00000000000000000000000008 +:10CC90000000000000000000D099E1FF000000004B +:10CCA00000000000000000004C9EE1FF00000000BA +:10CCB0000000000000000000000000000000000074 +:10CCC0000000000000000000000000000000000064 +:10CCD0000000000000000000000000000000000054 +:10CCE0000000000000000000E8A0E1FF00000000DC +:10CCF00098CCE1FF00000000149AE1FF0000000062 +:10CD0000EC99E1FF000000000000000000000000BE +:10CD10000000000000000000C4FAE1FF0000000075 +:10CD20007FF8E1FF0000000071F8E1FF0000000063 +:10CD300065F8E1FF000000000000000000000000B6 +:10CD4000D310E2FF00000000E410E2FF000000004A +:10CD5000F310E2FF000000000311E2FF00000000FA +:10CD60001511E2FF000000002511E2FF00000000A5 +:10CD70003811E2FF000000004911E2FF000000004E +:10CD80005B11E2FF000000006C11E2FF00000000F8 +:10CD90007F11E2FF000000009411E2FF000000009C +:10CDA000A611E2FF00000000B711E2FF0000000042 +:10CDB000C911E2FF00000000DA11E2FF00000000EC +:10CDC000ED11E2FF000000000012E2FF0000000091 +:10CDD0002613E2FF00000000000000000000000039 +:10CDE0003113E2FF0000000000000000000000001E +:10CDF0000000000000000000000000000000000033 +:10CE00007812E2FF000000000000000000000000B7 +:10CE10000000000000000000000000000000000012 +:10CE2000003DE1FF000000000000000000000000E5 +:10CE300000000000000000003052E1FF0000000090 +:10CE40000000000000000000ACA2E1FF00000000B4 +:10CE50009212E2FF0000000000000000000000004D +:10CE600000000000000000000000000000000000C2 +:10CE7000C513E2FF000000000000000000000000F9 +:10CE8000CD13E2FF000000000000000000000000E1 +:10CE9000D613E2FF000000000100000000000000C7 +:10CEA000EA13E2FF000000000000000000000000A4 +:10CEB000FE13E2FF00000000000000000000000080 +:10CEC0000000000000000000000000000000000062 +:10CED000E873E1FF000000002072E1FF00000000A5 +:10CEE000C472E1FF0000000000000000000000002C +:10CEF0005C72E1FF00000000000000000000000084 +:10CF000000000000000000002073E1FF00000000AE +:10CF1000B070E1FF000000008B02E2FF00000000A3 +:10CF20000000000000000000000000000000000001 +:10CF300000000000000000005613E2FF00000000A7 +:10CF400000000000000000000000000000000000E1 +:10CF500000000000000000008913E2FF0000000054 +:10CF600000000000000000000000000000000000C1 +:10CF700000000000000000007102E2FF000000005D +:10CF800000000000000000000000000000000000A1 +:10CF90000000000000000000000000000000000091 +:10CFA0000000000000000000000000000000000081 +:10CFB000D8AFE1FF0000000044B0E1FF0000000036 +:10CFC00000000000000000004113E2FF000000002C +:10CFD0000000000000000000000000000000000051 +:10CFE0000000000000000000A813E2FF00000000A5 +:10CFF0000000000000000000000000000000000031 +:10D000000000000000000000C064E1FF000000001C +:10D010007864E1FF00000000A865E1FF0000000067 +:10D020009465E1FF00000000000000000000000027 +:10D030004A0AE2FF00000000780EE2FF0000000054 +:10D040001900000000000000830EE2FF0000000055 +:10D05000980EE2FF00000000050000000000000044 +:10D06000AD0EE2FF00000000B30EE2FF0000000082 +:10D070000200000000000000B90EE2FF0000000006 +:10D08000C00EE2FF000000001600000000000000DB +:10D09000C70EE2FF00000000CB0EE2FF0000000020 +:10D0A0001700000000000000D40EE2FF00000000A6 +:10D0B000DA0EE2FF00000000120000000000000095 +:10D0C000E10EE2FF00000000E70EE2FF00000000BA +:10D0D0001A00000000000000DD0CE2FF000000006C +:10D0E000ED0EE2FF00000000110000000000000053 +:10D0F0009108E2FF000000000B0FE2FF00000000BB +:10D100000E00000000000000120FE2FF000000000F +:10D110001A0FE2FF000000001000000000000000F5 +:10D12000220FE2FF00000000260FE2FF00000000D7 +:10D130001B000000000000002A0FE2FF00000000BA +:10D14000320FE2FF000000001C00000000000000A1 +:10D15000410FE2FF00000000450FE2FF0000000069 +:10D16000FFFFFFFF000000006AEBE1FF000000008E +:10D170006AEBE1FF00000000EFBEADDEEFBEADDE0A +:10D18000EFBEADDEEFBEADDEEFBEADDE00000000F7 +:10D1900001000000000E16191B00000000000040F6 +:10D1A0000100000006000000000000200100000057 +:10D1B0000500000000000040000000000200000028 +:10D1C000000000200000000001000000000000102E +:10D1D000000000000000000010270000A0860100F1 +:10D1E00040420F0080969800000000000000000000 +:10D1F000000000000000000025005B00020022008B +:10D200004C004C004C004C00A900000000080E0827 +:10D21000171717170800000040787D0180BA8C01AD +:10D2200080F0FA02007519030075190340787D013A +:10D2300080F0FA0200E1F50580F0FA0200D4650CF6 +:10D2400000C2EB0B00C2EB0B00C2EB0B270000008F +:10D250008000000080000000B3000000010000001A +:10D2600001000000E60000000100000001000000D5 +:10D27000030000004A0000007F00000007000000DB +:10D280004A0000007F000000960098009B009D006F +:10D2900004000000000000600300000000000070B7 +:10D2A000010000000000007000000000000000709D +:10D2B000000B0B0D0F0F0F0F000004400001044086 +:10D2C0000002044000030440000404400104044040 +:10D2D0000005044000000540000105400200000078 +:10D2E00000000030000000000000003000007D0061 +:10D2F0000F00760022007D007D007D007D007D0016 +:10D300003700370037007D007D007A007D007D000A +:10D310002A007D00760076000515202224000000FA +:10D32000130200090000000EC840150000000300B1 +:10D330000000010020000001000000006103000067 +:10D34000C84016000000030000000100400000017A +:10D350000000000061030000C86016000000030028 +:10D360000000010040000001000000006103000017 +:10D37000C840170000000300000001008000000109 +:10D380000000000061030000C860170000000300F7 +:10D3900000000100800000010000000061030000A7 +:10D3A000C840180000000300000001000001000157 +:10D3B0000000000061030000C840190000000300E5 +:10D3C00000000100000200010000000061090000EF +:10D3D000C8471A000000030000000100000400011B +:10D3E0000000000041090000C8471B0000000300C6 +:10D3F00000000100000800010000000041090000D9 +:10D40000C8471C00000003000000010000100001DC +:10D410000000000041090000C8431700000003009D +:10D420000000010080000001000000006101000018 +:10D43000C8431800000003000000010000010001C3 +:10D440000000000061010000C84319000000030053 +:10D45000000001000002000100000000610900005E +:10D46000C8431A000000030000000100000400018E +:10D470000000000061090000C8461A000000030017 +:10D48000000001000004000100000000410900004C +:10D49000C8461B0000000300000001000008000156 +:10D4A0000000000041090000C8461C000000030005 +:10D4B0000000010000100001000000004109000010 +:10D4C000C8481A0000000300000001000004000129 +:10D4D0000000000001080100C8481B000000030014 +:10D4E0000000010000080001000000000108010028 +:10D4F000C8481C00000003000000010000100001EB +:10D500000000000001080100C860180000000300CE +:10D5100000000100000100010000000061030000A4 +:10D52000C8601900000003000000010000020001B3 +:10D530000000000061030000C8671900000003003C +:10D54000000001000002000100000000410900008D +:10D55000C8671A0000000300000001000004000179 +:10D560000000000041090000C8671B000000030024 +:10D570000000010000080001000000004109000057 +:10D58000C8671C000000030000000100001000013B +:10D590000000000041090000C863140000000300FF +:10D5A0000000010010000001000000006101000007 +:10D5B000C863150000000300000001002000000106 +:10D5C0000000000061010000C863160000000300B5 +:10D5D00000000100400000010000000061010000A7 +:10D5E000C863170000000300000001008000000174 +:10D5F0000000000061010000C86318000000030083 +:10D6000000000100000100010000000061010000B5 +:10D61000C8631900000003000000010000020001BF +:10D620000000000061090000C8631A000000030048 +:10D63000000001000004000100000000610900007A +:10D64000C86619000000030000000100000200018C +:10D650000000000041090000C8661A000000030035 +:10D66000000001000004000100000000410900006A +:10D67000C8661B0000000300000001000008000154 +:10D680000000000041090000C8661C000000030003 +:10D69000000001000010000100000000410900002E +:10D6A000C86819000000030000000100000200012A +:10D6B0000000000001080100C8681A000000030013 +:10D6C000000001000004000100000000010801004A +:10D6D000C8681B00000003000000010000080001F2 +:10D6E0000000000001080100C8681C0000000300E1 +:10D6F000000001000010000100000000010801000E +:10D70000C8671C00000003000000010000100001B9 +:10D7100000000000410300009D40130000000300D2 +:10D72000000001000800000100000000610000008E +:10D730009D601400000003000000010010000001C3 +:10D7400000000000400000009D6015000000030084 +:10D750000000010020000001000000004000000067 +:10D760009D60160000000300000001004000000161 +:10D7700000000000000000009D6017000000030092 +:10D780000000010080000001000000000000000017 +:10D790009D6018000000030000000100000100016E +:10D7A00000000000210000009D601900000003003F +:10D7B0000000010000020001000000002100000044 +:10D7C0009D601A0000000300000001000004000139 +:10D7D00000000000610000009D601B0000000300CD +:10D7E00000000100000800010000000061000000CE +:10D7F0009D701400000003000000010010000001F3 +:10D8000000000000400000009D70150000000300B3 +:10D8100000000100200000010000000040000000A6 +:10D820009D70160000000300000001004000000190 +:10D8300000000000610000009D7017000000030060 +:10D8400000000100800000010000000061000000F5 +:10D850009D7018000000030000000100000100019D +:10D8600000000000610000009D701900000003002E +:10D87000000001000002000100000000610800003B +:10D880009D701A0000000300000001000004000168 +:10D8900000000000610000009D701B0000000300FC +:10D8A000000001000008000100000000610000000D +:10D8B0009D7021000000030000000100000800012D +:10D8C00000000000610000009D5B190000000300E3 +:10D8D00000000200000100010000000081080100BA +:10D8E0009D5A1A000000030000000100000400011E +:10D8F00000000000810A0000C220120000000300A6 +:10D900000000010004000001000000000100000010 +:10D91000C220130000000300000001000800000105 +:10D920000000000001000000C220140000000300FD +:10D9300000000100100000010000000000000000D5 +:10D94000C2201500000003000000010020000001BB +:10D950000000000001000000C220160000000300CB +:10D960000000010040000001000000000100000074 +:10D97000C220170000000300000001008000000129 +:10D980000000000001000000C2253200000003007A +:10D990000000010004000001000000000100000080 +:10D9A000C225350000000300000001002000000136 +:10D9B0000000000001000000C22536000000030046 +:10D9C0000010000000040001000000000100000041 +:10D9D000C2253700000003000000010080000001A4 +:10D9E0000000000001000000C22018000000030039 +:10D9F0000000010000010001000000000100000023 +:10DA0000C2253800000003000000010000010001F1 +:10DA10000000000001000000C225390000000300E2 +:10DA200000000100000200010000000001000000F1 +:10DA3000C2253A00000003000000010000040001BC +:10DA40000000000061080000C2261800000003006A +:10DA500000000100000100010000000000000000C3 +:10DA6000C2201900000003000000010000020001B4 +:10DA70000000000060000000C22539000000030023 +:10DA80000000010000020001000000000108000089 +:10DA9000C223140000000300000001001000000178 +:10DAA0000000000061000000C22815000000030013 +:10DAB00000000100200000010000000061000000E3 +:10DAC000C22619000000030000000100000200014E +:10DAD0000000000000000000C2201A000000030047 +:10DAE00000000100000400010000000060080000C8 +:10DAF000C2253A00000003000000010000040001FC +:10DB00000000000061080000C2953A000000030018 +:10DB10000000010000040001000000006008000097 +:10DB2000C2253B00000003000000010000080001C6 +:10DB30000000000061080000C2253C000000030056 +:10DB4000000001000010000100000000610800005A +:10DB5000C2201B00000003000000010000080001BB +:10DB60000000000061000000C2201C000000030053 +:10DB7000000001000010000100000000610800002A +:10DB8000C224150000000300000001002000000175 +:10DB90000000000041080000C22817000000030038 +:10DBA00000000100800000010000000001000000F2 +:10DBB000C2943C00000003000000010000100001BE +:10DBC0000000000001080200C2853B0000000300C5 +:10DBD0000000010000080001000000000108020030 +:10DBE000C2853A00000003000000010000040001AB +:10DBF0000000000001080200C2863A000000030095 +:10DC00000000010000040001000000000108020003 +:10DC1000C28539000000030000000100000200017D +:10DC20000000000001080200C2843C000000030064 +:10DC300000000100001000010000000001080200C7 +:10DC4000C2803B000000030000000100000800014A +:10DC50000000000001080200C2813B000000030038 +:10DC6000000001000008000100000000010802009F +:10DC7000C2813A000000030000000100000400011E +:10DC80000000000001080200C2843A000000030006 +:10DC90000000010000040001000000000108020073 +:10DCA000C2803900000003000000010000020001F2 +:10DCB0000000000001080200C281390000000300DA +:10DCC0000000010000020001000000000108020045 +:10DCD000C2833900000003000000010000020001BF +:10DCE0000000000001080200C284390000000300A7 +:10DCF0000000010000020001000000000108020015 +:10DD0000C281380000000300000001000001000192 +:10DD10000000000001080200C28438000000030077 +:10DD200000000100000100010000000001080200E5 +:10DD3000C2813700000003000000010080000001E4 +:10DD40000000000001080200C28437000000030048 +:10DD50000000010080000001000000000108020036 +:10DD600020BB15000000030000000100200000019E +:10DD7000000000004100000020BA1600000003006F +:10DD80000000010040000001000000004000000011 +:10DD900020BB16000000030000000100400000014D +:10DDA000000000004000000020BA1700000003003F +:10DDB00000000100800000010000000041000000A0 +:10DDC00020BB1700000003000000010080000001DC +:10DDD000000000004100000020BB1800000003000C +:10DDE00000000100000100010000000041000000EF +:10DDF00020BA18000000030000000100000100012B +:10DE0000000000004100000020BA19104400060084 +:10DE1000000001000002000100000000E108000015 +:10DE200020BA1900000003000000010000020001F8 +:10DE300000000000E100000020BB191044000600B3 +:10DE4000000001000002000100000000C108000005 +:10DE500020BB1900000003000000010000020001C7 +:10DE600000000000C100000020BB180000000300FB +:10DE7000000001000001000100000000C1000000DE +:10DE800020BB201044000600000001000004000137 +:10DE900000000000E108000020BB2000000003009B +:10DEA000000001000004000100000000C1000000AB +:10DEB00020BA201044000600000001000004000108 +:10DEC00000000000C108000020BA2000000003008C +:10DED000000001000004000100000000C10000007B +:10DEE00020BA21000000030000000100000800012A +:10DEF00000000000C110000020BB21000000030052 +:10DF0000000001000008000100000000C110000036 +:10DF100021BA2000000003000000010000080001F9 +:10DF200000000000C110000020BB211044000600CA +:10DF3000000001000008000100000000C1180000FE +:10DF400020BB2200000003000000010000100001BF +:10DF500000000000C110000020BA220000000300F1 +:10DF6000000001000010000100000000C1180000C6 +:10DF70002C5B1B10410006000000020000040001A1 +:10DF800000000000800801002C5B1C000000030062 +:10DF900000000200000800010000000080080100ED +:10DFA0000102154D000005000000010040000001C5 +:10DFB00000000000600000000102164D0000050096 +:10DFC000000001008000000100000000600000006F +:10DFD0000102194D0000050000000400800000014E +:10DFE00000000000604000000102194D0100050022 +:10DFF000000001000002000100000000604000007D +:10E000000102204D00800600000004000001000114 +:10E0100000000000604000000102204D0081060069 +:10E02000000004000001000100000000604000004A +:10E030000102204D00000500000004000001000165 +:10E0400000000000604000000102204D01000500BA +:10E05000000001000004000100000000604000001A +:10E060000102204F00000500000004000001000133 +:10E0700000000000604000000102214D000005008A +:10E080000000040000020001000000006000000029 +:10E0900001201803000005000000040040000001FA +:10E0A000000000000000000001201803010005002E +:10E0B000000001000001000100000000000000005D +:10E0C0000120184D01800600000001000001000140 +:10E0D00000000000604000000120184D0000050015 +:10E0E000000004004000000100000000604000004B +:10E0F0000120184D01000500000001000001000191 +:10E100000000000060400000010213000000030056 +:10E1100000000100100000010000000000000000ED +:10E1200001021400000003000000010020000001B3 +:10E1300000000000000000000102150000000300C4 +:10E14000000001004000000100000000000000008D +:10E150000102160000000300000001008000000121 +:10E160000000000000000000014015000000030056 +:10E17000000001002000000100000000610000001C +:10E1800001401700000003000000010080000001B2 +:10E190000000000001000000014014000000030026 +:10E1A000000001001000000100000000210000003C +:10E1B0000160170000000300000001008000000162 +:10E1C000000000006108000001601800000003006A +:10E1D00000000100000100010000000061080000D3 +:10E1E00001601900000003000000010000020001AE +:10E1F0000000000061080000342A1A0F0390060096 +:10E200000000040000010001000000006048000060 +:10E21000342A1B0F039006000000040000020001D6 +:10E220000000000060480000342A1C0F0090060027 +:10E23000000004000004000100000000600800006D +:10E24000342B1A0F039006000000040000010001A7 +:10E250000000000060480000342B1B0F03900600F4 +:10E2600000000400000200010000000060480000FF +:10E27000342B1C0F00900600000004000004000175 +:10E280000000000060080000342B190F0890060001 +:10E290000000020000010001000000004008000032 +:10E2A0002020110000000300008000000400000195 +:10E2B0000000000000000000202012000000030009 +:10E2C0000000010004000001000000000000000048 +:10E2D00020201300000003000000010008000001DE +:10E2E00000000000000000002020140000000300D7 +:10E2F000000001001000000100000000000000000C +:10E300002020150000000300000001002000000193 +:10E3100000000000000000002020160000000300A4 +:10E3200000000100400000010000000000000000AB +:10E330002020170000000300000001008000000101 +:10E340000000000000000000202018000000030072 +:10E350000000040040000001000000000000000078 +:10E3600020801500000003000000010020000001D3 +:10E3700000000000010000002071150000000300F3 +:10E38000000001002000000100000000610000000A +:10E390002071170000000300000001008000000150 +:10E3A0000000000000000000EF2014000000030047 +:10E3B000000001001000000100000000000000004B +:10E3C000EF20150000000300000001002000000104 +:10E3D0000000000000000000EF2016000000030015 +:10E3E00000000100400000010000000000000000EB +:10E3F000EF301000000003000000010001000001E8 +:10E400000000000001000000EF30130000000300D6 +:10E4100000000100080000010000000001000000F1 +:10E42000EF30150000000300000001002000000193 +:10E430000000000001000000EF6015000000030074 +:10E440000000010020000001000000006103000046 +:10E45000EF30160000000300000001004000000142 +:10E460000000000001000000EF4012000000030067 +:10E470000000010004000001000000000100000095 +:10E48000EF50120000000300000001000400000132 +:10E490000000000001000000EF6012000000030017 +:10E4A0000000010004000001000000000100000065 +:10E4B000EF401600000003000000010040000001D2 +:10E4C0000000000061000000EF6015000000030084 +:10E4D00000000100200000010000000061000000B9 +:10E4E000EF60160000000300000001004000000182 +:10E4F0000000000061030000EF7015000000030041 +:10E500000000010020000001000000006100000088 +:10E51000EF70160000000300000001004000000141 +:10E520000000000061030000EF80160000000300FF +:10E530000000010040000001000000006103000035 +:10E54000EF8019000000030000000100000200013C +:10E550000000000061030000EF301700000003001E +:10E560000000010080000001000000000100000028 +:10E57000EF601700000003000000010080000001B0 +:10E580000000000061030000EF70170000000300AE +:10E590000000010080000001000000006103000095 +:10E5A000EF601800000003000000010000010001FE +:10E5B0000000000061030000EF701800000003007D +:10E5C00000000100000100010000000061030000E4 +:10E5D000EF801800000003000000010000010001AE +:10E5E0000000000061030000EF601900000003005C +:10E5F00000000100000200010000000061030000B3 +:10E60000EF7019000000030000000100000200018B +:10E610000000000061030000EF711900000003001A +:10E620000000010000020001000000006103000082 +:10E63000EF60200000000300000001000004000162 +:10E640000000000061030000EF80200000000300D4 +:10E650000000010000040001000000006103000050 +:10E66000EF40200000000300000001000004000152 +:10E670000000000061030000EF40210000000300E3 +:10E68000000001000008000100000000610300001C +:10E69000EF702100000003000000010000080001ED +:10E6A0000000000061030000EF7022000000030082 +:10E6B00000000100001000010000000061030000E4 +:10E6C000EF501400000003000000010010000001E2 +:10E6D0000000000001000000EF40140000000300F3 +:10E6E00000000100100000010000000061000000B7 +:10E6F000EF401500000003000000010020000001B1 +:10E700000000000061000000EF4016000000030060 +:10E710000000010040000001000000006100000056 +:10E72000EF4017000000030000000100800000011E +:10E730000000000061000000EF401800000003002E +:10E740000000010000010001000000006103000062 +:10E75000EF4019000000030000000100000200016A +:10E760000000000061000000EF61190000000300DC +:10E770000000010000040001000000006100000032 +:10E78000EF71190000000300000001000004000107 +:10E790000000000061000000EF9022000000030074 +:10E7A00000000100001000010000000061000000F6 +:10E7B0000000000000000000000000000000000059 +:10E7C000000000000000000028732AC11FF8D211C9 +:10E7D000BA4B00A0C93EC93B14004201D0FFD0FF94 +:10E7E000D0FFD0FF4701D0FFD0FFD0FFD0FF1601F0 +:10E7F00000006700D0FFD0FF4E00D0FF4801D0FFDF +:10E80000D0FF3F01000000000100F4FD0200F4FD14 +:10E81000F4FDF4FD03000000211042206330844029 +:10E82000A550C660E770088129914AA16BB18CC1DF +:10E83000ADD1CEE1EFF13112100273325222B55256 +:10E840009442F772D662399318837BB35AA3BDD32F +:10E850009CC3FFF3DEE36224433420040114E66426 +:10E86000C774A44485546AA54BB528850995EEE57F +:10E87000CFF5ACC58DD55336722611163006D77636 +:10E88000F6669556B4465BB77AA719973887DFF7CF +:10E89000FEE79DD7BCC7C448E5588668A7784008FE +:10E8A000611802282338CCC9EDD98EE9AFF948891F +:10E8B00069990AA92BB9F55AD44AB77A966A711A96 +:10E8C000500A333A122AFDDBDCCBBFFB9EEB799B6F +:10E8D000588B3BBB1AABA66C877CE44CC55C222CE6 +:10E8E000033C600C411CAEED8FFDECCDCDDD2AADBF +:10E8F0000BBD688D499D977EB66ED55EF44E133E76 +:10E90000322E511E700E9FFFBEEFDDDFFCCF1BBF0E +:10E910003AAF599F788F8891A981CAB1EBA10CD1E8 +:10E920002DC14EF16FE18010A100C230E3200450F0 +:10E93000254046706760B9839893FBA3DAB33DC363 +:10E940001CD37FE35EF3B1029012F322D232354240 +:10E95000145277625672EAB5CBA5A89589856EF5F3 +:10E960004FE52CD50DC5E234C324A0148104667490 +:10E97000476424540544DBA7FAB79987B8975FE743 +:10E980007EF71DC73CD7D326F2369106B0165766E0 +:10E990007676154634564CD96DC90EF92FE9C899CB +:10E9A000E9898AB9ABA94458654806782768C01830 +:10E9B000E1088238A3287DCB5CDB3FEB1EFBF98BA3 +:10E9C000D89BBBAB9ABB754A545A376A167AF10A80 +:10E9D000D01AB32A923A2EFD0FED6CDD4DCDAABDB3 +:10E9E0008BADE89DC98D267C076C645C454CA23CD0 +:10E9F000832CE01CC10C1FEF3EFF5DCF7CDF9BAF83 +:10EA0000BABFD98FF89F176E367E554E745E932E1F +:10EA1000B23ED10EF01E00010203040506070809EC +:10EA20000A0B0C0D0E0F030201000504070608096E +:10EA30000A0B0C0D0E0F030B1B6664745F6669787E +:10EA400075705F6D656D6F72795F62616E6B73007B +:10EA500073706C5F6E6F64655F746F5F626F6F740D +:10EA60005F6465766963650073706C5F7265676982 +:10EA7000737465725F6661745F646576696365006F +:10EA80006669745F66696E645F636F6E6669675F0F +:10EA90006E6F646500736F63667067615F73656353 +:10EAA0007265675F70726F626500736F636670672F +:10EAB000615F64747265675F70726F626500626F38 +:10EAC0006172645F626F6F745F6F72646572006C15 +:10EAD0006F61645F73696D706C655F666974007304 +:10EAE000706C5F6C6F61645F696D6167655F6661C3 +:10EAF00074006164645F6D74645F64657669636506 +:10EB00000073706C5F6C6F61645F73696D706C65CE +:10EB10005F666974006664745F7265636F72645FD8 +:10EB20006C6F616461626C65006664745F66696ED7 +:10EB3000645F6F725F6164645F7375626E6F64655A +:10EB400000647269766572732F6D74642F6D7464DE +:10EB5000636F72652E6300425547206174202573F0 +:10EB60003A25642F25732829210A004255472100A0 +:10EB70000808080808080808082828282828080875 +:10EB80000808080808080808080808080808080805 +:10EB9000A0101010101010101010101010101010E5 +:10EBA00004040404040404040404101010101010DD +:10EBB00010414141414141010101010101010101B6 +:10EBC00001010101010101010101011010101010EA +:10EBD0001042424242424202020202020202020287 +:10EBE00002020202020202020202021010101008C7 +:10EBF0000000000000000000000000000000000015 +:10EC00000000000000000000000000000000000004 +:10EC1000A010101010101010101010101010101064 +:10EC200010101010101010101010101010101010E4 +:10EC300001010101010101010101010101010101C4 +:10EC400001010101010101100101010101010102A4 +:10EC50000202020202020202020202020202020294 +:10EC60000202020202020210020202020202020276 +:10EC700025733A20756E6C6F636B206661696C65F5 +:10EC8000642C20777269746573206D6179206E6FD2 +:10EC90007420776F726B0A00616C6C6F6320737005 +:10ECA000616365206578686175737465640A002521 +:10ECB000732025733A2043616E27742067657420A2 +:10ECC00072657365743A2025640A00534452414DBD +:10ECD00020696E6974206661696C65642E0A00257E +:10ECE000732E25730025733A25640025733A202F6F +:10ECF00063686F73656E206E6F7420666F756E64E7 +:10ED00002C207573696E672064656661756C740A82 +:10ED10000025733A206C696D697420256420746F36 +:10ED20002073706C5F626F6F745F6C6973742065C1 +:10ED3000786365656465640A006465766963655F28 +:10ED4000747970650025733A20756E6B6E6F776EFF +:10ED5000206465766963655F747970652025730A40 +:10ED600000752D626F6F742C73706C2D626F6F74F1 +:10ED70002D6F726465720025733A2073706C2D627A +:10ED80006F6F742D6F7264657220696E76616C6945 +:10ED9000642C207573696E672064656661756C7498 +:10EDA0000A0025733A206E6F2076616C69642065D5 +:10EDB0006C656D656E742073706C2D626F6F742D51 +:10EDC0006F72646572206C6973740A00626F61729D +:10EDD000645F2575004669726577616C6C2026203A +:10EDE0007365637572652073657474696E677320EB +:10EDF000696E6974206661696C65643A2025640AED +:10EE000000547279696E6720746F20626F6F74208E +:10EE100066726F6D2025730A0053504C3A20556E70 +:10EE2000737570706F7274656420426F6F742044E4 +:10EE30006576696365210A0053504C3A2066616922 +:10EE40006C656420746F20626F6F742066726F6DE2 +:10EE500020616C6C20626F6F7420646576696365F5 +:10EE6000730A00436F756C64206E6F74206765745D +:10EE70002046495420627566666572206F662025BB +:10EE80006C752062797465730A0009636865636B49 +:10EE900020434F4E4649475F53504C5F5359535F91 +:10EEA0004D414C4C4F435F53495A450A0051535012 +:10EEB000493A20666C61736820636F6D6D616E64A2 +:10EEC00020657865637574696F6E2074696D656F10 +:10EED00075740A00496E646972656374207772699B +:10EEE00074652074696D6564206F757420282569C8 +:10EEF000290A00496E6469726563742072656164F1 +:10EF000020636C65617220636F6D706C6574696FEE +:10EF10006E206572726F7220282569290A00496E79 +:10EF2000646972656374207265616420636F6D70DB +:10EF30006C6574696F6E206572726F722028256926 +:10EF4000290A00496E646972656374207772697476 +:10EF50006520636C65617220636F6D706C657469A8 +:10EF60006F6E206572726F7220282569290A004928 +:10EF70006E64697265637420777269746520636F6B +:10EF80006D706C6574696F6E206572726F72202887 +:10EF90002569290A00515350493A205153504920BC +:10EFA0006973207374696C6C206275737920616673 +:10EFB00074657220706F6C6C20666F7220256420FF +:10EFC0006D732E0A0063646E732C69732D64656320 +:10EFD0006F6465642D63730063646E732C66696689 +:10EFE0006F2D64657074680063646E732C66696667 +:10EFF0006F2D77696474680063646E732C74726932 +:10F00000676765722D616464726573730063646E13 +:10F01000732C69732D646D61004572726F723A20B2 +:10F020007375626E6F646520776974682053504908 +:10F0300020666C61736820636F6E666967206D6916 +:10F040007373696E67210A00706167652D73697A51 +:10F050006500626C6F636B2D73697A650063646E23 +:10F06000732C747368736C2D6E730063646E732CF1 +:10F0700074736432642D6E730063646E732C7463F6 +:10F080006873682D6E730063646E732C74736C63A5 +:10F09000682D6E730063646E732C726561642D64F9 +:10F0A000656C61790053463A2043616C6962726114 +:10F0B00074696F6E206661696C6564202872656191 +:10F0C00064290A0053463A2043616C696272617494 +:10F0D000696F6E206661696C656420286C6F7720AB +:10F0E00072616E6765290A00636C6F636B2D6469DA +:10F0F0007600636C6F636B2D6D756C7400636C6F61 +:10F10000636B2D6672657175656E63790023636C40 +:10F110006F636B2D63656C6C730061737369676EED +:10F1200065642D636C6F636B2D706172656E7473B3 +:10F130000061737369676E65642D636C6F636B73D5 +:10F140000061737369676E65642D636C6F636B2D0B +:10F150007261746573004D505520202020202020BE +:10F1600025313064206B487A0A004C34204D6169A7 +:10F170006E0920202020253864206B487A0A004C34 +:10F180003420737973206672656520253864206B9E +:10F19000487A0A004C34204D502020202020202086 +:10F1A000253864206B487A0A004C342053502020C4 +:10F1B0002020202020253864206B487A0A00534400 +:10F1C0004D4D4320202020202020253864206B48EE +:10F1D0007A0A00515350493A205265666572656E4D +:10F1E000636520636C6F636B206174202564206B02 +:10F1F000487A0A00496E73756666696369656E745C +:10F200002052414D20666F722070616765207461E5 +:10F21000626C653A203078256C78203E2030782565 +:10F220006C782E20506C6561736520696E63726521 +:10F23000617365207468652073697A6520696E2042 +:10F240006765745F706167655F7461626C655F7349 +:10F25000697A652829006379636C69632066756E35 +:10F260006374696F6E20257320746F6F6B20746FE9 +:10F270006F206C6F6E673A20256C6C647573207616 +:10F28000732025647573206D61780A0052656D6F77 +:10F2900076696E67204D5444206465766963652005 +:10F2A00023256420282573292077697468207573C5 +:10F2B0006520636F756E742025640A004572726F55 +:10F2C00072207768656E2064656C6574696E67206E +:10F2D000706172746974696F6E2022257322202810 +:10F2E0002564290A00303132333435363738394114 +:10F2F00042434445462F636C6F636B73002F66690E +:10F30000726D776172650025732025733A20464936 +:10F31000464F206F766572666C6F77206F6E205255 +:10F32000780A007370692D736C617665002573200F +:10F3300025733A204661696C656420746F206465AA +:10F340002D61737365727420726573657420666FC6 +:10F35000722053504920286572726F7220256429EB +:10F360000A00626974732D7065722D776F72640084 +:10F3700069676E6F72696E6720696E76616C696429 +:10F3800020626974732D7065722D776F7264202509 +:10F39000640A0025732025733A204E6F6E2062792F +:10F3A000746520616C69676E6564205350492074F0 +:10F3B00072616E736665722E0A004444523A20658B +:10F3C0006D69665F636C6561722829206661696C8E +:10F3D00065640A004444523A206661696C656420A1 +:10F3E000746F206765742061636B2066726F6D2097 +:10F3F000454D49460A002E2E004641542073656350 +:10F40000746F722073697A65206D69736D617463BE +:10F4100068202866733D25752C206465763D256C33 +:10F4200075290A0046415420636C75737465722017 +:10F4300073697A65206E6F74207365740A004641A3 +:10F440005420636C75737465722073697A652074D7 +:10F450006F6F20626967202863733D25752C206DCE +:10F4600061783D2575290A00496E76616C696420D2 +:10F4700046415420656E7472790A004572726F724B +:10F480002072656164696E6720636C757374657260 +:10F490000A00506172746974696F6E202564206976 +:10F4A0006E76616C6964206F6E2064657669636551 +:10F4B0002025640A0055AA00236164647265737391 +:10F4C0002D63656C6C730025733A2025733A2025F3 +:10F4D000730A0025733A206E756D2062616E6B733E +:10F4E00020256420657863656564732068617264B3 +:10F4F000636F646564206C696D69742025642E20D7 +:10F500005265636F6D70696C6520776974682068F7 +:10F510006967686572204D454D4F52595F42414EB3 +:10F520004B535F4D41583F0A005741524E494E4799 +:10F530003A20636F756C64206E6F7420736574205D +:10F5400025732025732E0A002F616C696173657322 +:10F55000006C696E75782C7068616E646C65006310 +:10F560006F6D70617469626C6500656E74727900AC +:10F570002373697A652D63656C6C73003C76616CEE +:10F580006964206F66667365742F6C656E67746856 +:10F590003E003C6E6F206572726F723E003C756E6D +:10F5A0006B6E6F776E206572726F723E002F7265A0 +:10F5B0007365727665642D6D656D6F727900726129 +:10F5C0006E6765730025734025782C2578002573B8 +:10F5D000402578006E6F2D6D6170006D61746368F9 +:10F5E0002D6D61736B006D617463682D76616C7550 +:10F5F00065006175746F2D73697A65007374617449 +:10F600007573006F6B6179004D697373696E672064 +:10F610004454420A002F6D656D6F7279004D4D4361 +:10F6200020446576696365202564206E6F742066CA +:10F630006F756E640A006861736865642D6E6F642F +:10F6400065730043616E2774206765742068617379 +:10F650006865642D6E6F6465732070726F7065727B +:10F660007479006861736865642D6E6F64657320DA +:10F6700070726F7065727479206D75737420626535 +:10F68000206E756C6C2D7465726D696E6174656445 +:10F69000004E756D626572206F66206861736865E3 +:10F6A00064206E6F6465732065786365656473209C +:10F6B0006D6178696D756D002F636F6E6669677532 +:10F6C000726174696F6E730053656C656374656411 +:10F6D00020636F6E666967206E6F7420696E2068A4 +:10F6E0006173686564206E6F646573004661696C60 +:10F6F000656420746F206861736820636F6E66694B +:10F700006775726174696F6E004E6F206461746119 +:10F7100020746F206861736800546F6F206D616E94 +:10F7200079206861736820726567696F6E7300681D +:10F7300061736865642D737472696E6773005665D2 +:10F7400072696669636174696F6E206661696C6570 +:10F750006400436F6E66696775726174696F6E20CD +:10F760006E6F6465202725732720636F6E7461694F +:10F770006E73202740270A0072657175697265648F +:10F780002D6D6F646500636F6E66004E6F2027738A +:10F7900069676E617475726527207375626E6F6438 +:10F7A0006520666F756E6400206572726F72210A43 +:10F7B000257320666F722027257327206861736880 +:10F7C000206E6F646520696E202725732720636F84 +:10F7D0006E666967206E6F64650A004661696C65D4 +:10F7E0006420746F207665726966792027616E796E +:10F7F00027206F662074686520726571756972656F +:10F8000064207369676E61747572652873290A00D4 +:10F8100064656661756C74006465736372697074A5 +:10F82000696F6E0025733A204D697373696E6720A6 +:10F83000464454206465736372697074696F6E2006 +:10F84000696E204454420A00556E737570706F7271 +:10F85000746564202573206164647265737320731A +:10F86000697A650A00646174612D6F6666736574F8 +:10F8700000646174612D706F736974696F6E0064E8 +:10F880006174612D73697A6500616C676F00706BDC +:10F8900063732D312E3500546F74616C2073697A57 +:10F8A0006520746F6F206C617267650070616464BD +:10F8B000696E67006B65792D6E616D652D68696E87 +:10F8C000740025733A257300556E6B6E6F776E204A +:10F8D0007369676E617475726520616C676F7269B8 +:10F8E00074686D004E6F6465206E616D6520636F96 +:10F8F0006E7461696E73204000726571756972651E +:10F9000064004661696C656420746F207665726975 +:10F910006679207265717569726564207369676EB6 +:10F92000617475726520272573270A00556E616220 +:10F930006C6520746F2076657269667920726571D6 +:10F940007569726564207369676E617475726500AC +:10F9500043616E2774206765742068617368206155 +:10F960006C676F2070726F70657274790075626F6A +:10F970006F742D69676E6F7265002D736B6970709F +:10F980006564200043616E27742067657420686198 +:10F9900073682076616C75652070726F7065727423 +:10F9A0007900556E737570706F727465642068614C +:10F9B000736820616C676F726974686D004261647E +:10F9C00020686173682076616C7565206C656E00D7 +:10F9D00042616420686173682076616C7565002BF4 +:10F9E00020002D2000436F72727570746564206F63 +:10F9F00072207472756E63617465642074726565DB +:10FA000000206572726F72210A257320666F722062 +:10FA1000272573272068617368206E6F64652069ED +:10FA20006E202725732720696D616765206E6F64DE +:10FA3000650A00496E76616C696420464154206510 +:10FA40006E7472793A2025233038780A00232323F4 +:10FA5000204552524F522023232320506C6561735E +:10FA6000652052455345542074686520626F617269 +:10FA700064202323230A00303132333435363738BB +:10FA800039616263646566005744543A2020204E11 +:10FA90006F74207374617274696E672025730A0035 +:10FAA0005744543A2020204661696C656420746F85 +:10FAB0002073746172742025730A00707265666524 +:10FAC0007463682D64617461007072656665746347 +:10FAD000682D696E7374720061726D2C7368617247 +:10FAE00065642D6F766572726964650061726D2C54 +:10FAF0007461672D6C6174656E63790061726D2C41 +:10FB0000646174612D6C6174656E63790043616E2C +:10FB10002774206C6F61642025733A204E6F206C2F +:10FB20006F6164206164647265737320616E642028 +:10FB30006E6F206275666665720A0025733A2053FF +:10FB40006B6970206C6F616420272573273A2069E8 +:10FB50006D6167652073697A652069732030210AB9 +:10FB60000043616E6E6F742067657420696D616714 +:10FB70006520646174612F73697A650A002323200C +:10FB8000436865636B696E67206861736828657395 +:10FB90002920666F7220496D616765202573202ECC +:10FBA0002E2E20004F4B0A006D6D635F626C6B0060 +:10FBB0004D4D433A20626C6F636B206E756D6265CC +:10FBC00072203078256C78206578636565647320D1 +:10FBD0006D6178283078256C78290A006D6D632076 +:10FBE0006661696C20746F2073656E642073746F36 +:10FBF0007020636D640A004361726420646964204C +:10FC00006E6F7420726573706F6E6420746F2076EF +:10FC10006F6C746167652073656C65637421203A4D +:10FC20002025640A00756E61626C6520746F207314 +:10FC3000656C6563742061206D6F64650A004E6FAA +:10FC4000206578745F63736420666F756E64210A43 +:10FC50000053656C6563742048533430302066610E +:10FC6000696C65642025640A0053656C65637420C3 +:10FC700048533430304553206661696C65642025F3 +:10FC8000640A00756E61626C6520746F2073656C28 +:10FC90006563742061206D6F6465203A2025640AD5 +:10FCA000004D616E202530367820536E722025304D +:10FCB0003478253034780025632563256325632552 +:10FCC0006325630025642E2564006D6D635F6C6F92 +:10FCD00061645F696D6167655F7261775F736563BA +:10FCE000746F723A206D6D6320626C6F636B20726B +:10FCF000656164206572726F720A004D4D433A204F +:10FD00006E6F20636172642070726573656E740A31 +:10FD100000000A0C0D0F14191E23282D32373C4603 +:10FD2000504343553A204469726563746F72792079 +:10FD3000696E697469616C697A6174696F6E206655 +:10FD400061696C6564210A007265672D6F66667370 +:10FD50006574007265672D73686966740072656703 +:10FD60002D696F2D7769647468002F636F6E666903 +:10FD700067002A2A204E657374656420444F53201F +:10FD8000706172746974696F6E7320646574656301 +:10FD90007465642C2073746F7070696E67202A2AF2 +:10FDA0000A002A2A2043616E27742072656164204C +:10FDB000706172746974696F6E207461626C652021 +:10FDC0006F6E2025643A256C75202A2A0A0062612C +:10FDD00064204D425220736563746F7220736967AB +:10FDE0006E61747572652030782530327825303236 +:10FDF000780A0057686F6C65204469736B0068640B +:10FE00000075736264006D6D63736400787800251B +:10FE10007325632564000A552D426F6F742053507B +:10FE20004C20323032342E30372D33363737332DA5 +:10FE30006730646164306130613437382D646972D1 +:10FE400074792028446563203034203230323520E4 +:10FE50002D2031373A31323A3439202B303130309D +:10FE6000290A005761726D20005B66726F6D205326 +:10FE7000444D5D2000436F6C640057617463686497 +:10FE80006F67004D5055005265736574207374613F +:10FE900074653A2025732573002854726967676575 +:10FEA000726564206279202573202564290A002365 +:10FEB00072657365742D63656C6C73007265736530 +:10FEC0007473006B65792D2573007273612C6E75E8 +:10FED0006D2D62697473007273612C6E302D696EC2 +:10FEE0007665727365007273612C6578706F6E65EC +:10FEF0006E74007273612C6D6F64756C7573007233 +:10FF000073612C722D737175617265640052534177 +:10FF10003A2043616E27742066696E64204D6F64D9 +:10FF2000756C61722045787020696D706C656D65C7 +:10FF30006E746174696F6E0A004444523A206164C1 +:10FF40006472657373203078256C6C782069732037 +:10FF50006E6F742063616368656C696E6520736998 +:10FF60007A6520616C69676E65642E0A00444452AC +:10FF70003A2073697A65203078256C6C7820697333 +:10FF8000206E6F74206D756C7469706C65206F667F +:10FF90002063616368656C696E652073697A650AC0 +:10FFA00000534452414D2D4543433A20496E6974F4 +:10FFB00069616C697A656420737563636573732026 +:10FFC00077697468202564206D730A004444523AAE +:10FFD000204661696C656420746F206465636F649A +:10FFE00065206D656D6F7279206E6F64650A0044DF +:10FFF00044523A205761726E696E673A204452410A +:02000004FFE219 +:100000004D2073697A652066726F6D20646576692C +:10001000636520747265652028256C6C64204D69C9 +:1000200042290A00206D69736D61746368207769E5 +:1000300074682068617264776172652028256C6C31 +:1000400064204D6942292E0A004444523A204572E8 +:10005000726F723A204452414D2073697A6520666E +:10006000726F6D20646576696365207472656520C2 +:10007000697320677265617465720A002074686133 +:100080006E2068617264776172652073697A652E8B +:100090000A004444523A20256C6C64204D69420A9F +:1000A000004444523A204572726F722061732053AB +:1000B0004452414D2063616C6962726174696F6E74 +:1000C000206661696C65640A004444523A204D65BB +:1000D0006D6F7279207465737420726571756972C1 +:1000E000657320534452414D2073697A652000693D +:1000F0006E20706F776572206F662074776F210AAB +:10010000004444523A20534452414D2073697A6569 +:1001100020636865636B206661696C6564210A0011 +:100120007374646F75742D7061746800636F6E739F +:100130006F6C65004E6F2073657269616C2064722C +:100140006976657220666F756E6400506167652020 +:100150007461626C6520706F696E746572206E6F79 +:10016000742073657475702E003021300906052BDC +:100170000E03021A050004148000000000000000B5 +:10018000000000000000000000000000000000006F +:10019000000000000000000000000000000000005F +:1001A000000000000000000000000000000000004F +:1001B00000000000000000003031300D06096086AC +:1001C000480165030402010500042044574D4D43D6 +:1001D0003A2043616E277420676574204649464F74 +:1001E0002064657074680A0064727673656C0073CD +:1001F0006D706C73656C006669666F2D6D6F6465FC +:100200000044574D4D433A204D4D4320636C6F637E +:100210006B206973207A65726F21004661696C20DA +:10022000746F2072656164204A544147205573659C +:1002300072636F64652E2044656661756C7420423C +:100240006F61726420494420746F20300A00426F4D +:10025000617264204944206973206E6F7420696E56 +:100260002072616E6765203020746F203235350A48 +:1002700000616C74722C7273742D6D677200616C06 +:1002800074722C7379732D6D677200696E74656C6E +:100290002C6167696C65782D636C6B6D67720061AA +:1002A0006C74722C6D6F647273742D6F66667365F7 +:1002B0007400696E74656C2C6F66667365742D735B +:1002C000657474696E67730025733A204F766572A2 +:1002D000666C6F77206173206F666673657420307B +:1002E00078256C6C78206F722072656700207772B9 +:1002F000697465206973206D6F7265207468616E22 +:1003000020626C6F636B2073697A65203078257882 +:100310000A004D61696C626F783A204973737569A0 +:100320006E67206D61696C626F7820636D64205226 +:1003300045424F4F545F4850530A002573202573A0 +:100340003A20496E76616C696420637320256420CD +:10035000286572723D2564290A007370695F666CB6 +:100360006173684025643A2564006A656465635F6B +:100370007370695F6E6F720053463A204661696C14 +:10038000656420746F2073657420757020736C61D0 +:1003900076650A00496E76616C6964206275732027 +:1003A000256420286572723D2564290A0025732082 +:1003B00025733A20496E76616C69642063686970C0 +:1003C0002073656C6563742025643A256420286574 +:1003D00072723D2564290A0003130B0C3B3CBBBC25 +:1003E0006B6CEBEC7370692D666C61736800257340 +:1003F0002025733A204D6163726F6E6978205175C4 +:10040000616420626974206E6F74207365740A00E1 +:10041000656E61626C696E672072657365742068D1 +:1004200061636B3B206D6179206E6F742072656330 +:100430006F7665722066726F6D20756E6578706577 +:1004400063746564207265626F6F74730A0025734C +:100450002025733A20666C617368206F7065726145 +:1004600074696F6E2074696D6564206F75740A001D +:1004700075646576696365202A2900284E554C4CC1 +:10048000007370692D6D61782D6672657175656E8A +:1004900063790025732025733A2043616E6E6F7473 +:1004A0002073657420737065656420286572723DE1 +:1004B0002564290A0025732025733A2043616E6E56 +:1004C0006F7420736574206D6F6465202865727287 +:1004D0003D2564290A007370692D63706F6C007389 +:1004E00070692D63706861007370692D63732D6886 +:1004F000696768007370692D33776972650073707E +:10050000692D68616C662D6475706C657800737018 +:10051000692D74782D6275732D7769647468007322 +:1005200070692D72782D6275732D77696474680017 +:100530002F63686F73656E00752D626F6F742C6228 +:100540006F6F7430006664740063616E6E6F742048 +:1005500066696E6420696D616765206E6F646520F1 +:10056000272573273A2025640A002F6669742D69B0 +:100570006D61676573006664745F726F6F743A20B3 +:1005800025730A0053504C3A206664745F73687296 +:10059000696E6B5F746F5F6D696E696D756D2065F7 +:1005A0007272202D2025640A0053504C3A2061724B +:1005B00063685F66697875705F66647420657272DF +:1005C000202D2025640A0025733A2066617420726C +:1005D0006567697374657220657272202D202564C9 +:1005E0000A0025733A206572726F72207265616429 +:1005F000696E6720696D6167652025732C206572BF +:1006000072202D2025640A00232320436865636B34 +:10061000696E6720686173682865732920666F7248 +:1006200020636F6E666967202573202E2E2E2000B2 +:100630002F696D61676573006C6F616461626C65E1 +:10064000730025733A2063616E2774206C6F6164B8 +:1006500020696D616765206C6F616461626C6573B0 +:1006600020696E6465782025642028726574203DB9 +:10067000202564290A006F7300617263680073703B +:100680006C3A20756E737570706F72746564206D4E +:100690006D6320626F6F74206465766963652E0AEE +:1006A0000073706C3A20636F756C64206E6F7420F9 +:1006B000696E697469616C697A65206D6D632E205D +:1006C0006572726F723A2025640A0073706C3A206A +:1006D000636F756C64206E6F742066696E64206D44 +:1006E0006D63206465766963652025642E206572DC +:1006F000726F723A2025640A0073706C3A206D6D37 +:100700006320696E6974206661696C65642077692D +:100710007468206572726F723A2025640A007370E3 +:100720006C3A206D6D6320706172746974696F6ECC +:1007300020737769746368206661696C65640A0078 +:1007400073706C3A20706172746974696F6E2065A1 +:1007500072726F720A0073706C3A206D6D633A208A +:1007600077726F6E6720626F6F74206D6F64650AB9 +:1007700000752D626F6F742E6974620053504920AA +:1007800070726F6265206661696C65642E0A00751F +:100790002D626F6F742C73706C2D7061796C6F614A +:1007A000642D6F6666736574005054452025702073 +:1007B00028256C6C7829206973206E6F7420612065 +:1007C000626C6F636B2E20536F6D65206472697667 +:1007D000657220636F64652077616E747320746F37 +:1007E000206D6F6469667920646361636865207356 +:1007F000657474696E677320666F7220616E207213 +:10080000616E6765206E6F7420636F7665726564D4 +:1008100020696E206D656D5F6D61702E004D4D43DA +:10082000325F32004D4D4332004D4D433100535045 +:10083000490052414D006172636869746563747563 +:10084000726500636F6D7072657373696F6E006FB0 +:100850007065726174696E672073797374656D0079 +:10086000696D616765207479706500627A697032BC +:1008700000677A6970006C7A6D61006C7A6F006C49 +:100880007A34007A737464006E6F6E6500616E79FD +:1008900000752D626F6F7400552D426F6F7420705C +:1008A000686173650053504C205068617365007532 +:1008B0006E636F6D7072657373656400627A6970E0 +:1008C0003220636F6D7072657373656400677A6957 +:1008D0007020636F6D70726573736564006C7A6D00 +:1008E0006120636F6D70726573736564006C7A6FFD +:1008F00020636F6D70726573736564006C7A342069 +:10090000636F6D70726573736564007A73746420CD +:10091000636F6D7072657373656400616973696D8F +:1009200061676500446176696E63692041495320BF +:10093000696D6167650066696C6573797374656D6F +:100940000046696C6573797374656D20496D6167E4 +:100950006500666C61745F647400466C6174204469 +:1009600065766963652054726565006770696D61BD +:100970006765005449204B657973746F6E65205329 +:10098000504C20496D616765006B65726E656C0047 +:100990004B65726E656C20496D616765006B6572B1 +:1009A0006E656C5F6E6F6C6F6164004B65726E6537 +:1009B0006C20496D61676520286E6F206C6F6164E3 +:1009C000696E6720646F6E6529006B7762696D617F +:1009D0006765004B69726B776F6F6420426F6F744D +:1009E00020496D61676500696D78696D61676500B3 +:1009F000467265657363616C6520692E4D582042AF +:100A00006F6F7420496D61676500696D7838696D35 +:100A1000616765004E585020692E4D583820426F4E +:100A20006F7420496D61676500696D78386D696D17 +:100A3000616765004E585020692E4D58384D204250 +:100A40006F6F7420496D61676500696E76616C69CE +:100A50006400496E76616C696420496D6167650068 +:100A60006D756C7469004D756C74692D46696C65A3 +:100A700020496D616765006F6D6170696D616765C3 +:100A8000005449204F4D41502053504C2057697419 +:100A9000682047502043480070626C696D6167654B +:100AA00000467265657363616C652050424C20425C +:100AB0006F6F7420496D6167650072616D64697361 +:100AC0006B0052414D4469736B20496D616765004D +:100AD0007363726970740053637269707400736F2A +:100AE0006366706761696D61676500416C7465720A +:100AF0006120536F43465047412043562F415620B3 +:100B00007072656C6F6164657200736F63667067A5 +:100B100061696D6167655F763100416C7465726112 +:100B200020536F4346504741204131302070726559 +:100B30006C6F61646572007374616E64616C6F6E7A +:100B400065005374616E64616C6F6E652050726FE6 +:100B50006772616D0075626C696D61676500446103 +:100B600076696E63692055424C20696D6167650046 +:100B70006D7873696D616765004672656573636161 +:100B80006C65204D585320426F6F7420496D61672A +:100B9000650061746D656C696D6167650041544DF8 +:100BA000454C20524F4D2D426F6F7420496D616747 +:100BB00065007838365F7365747570007838362054 +:100BC00073657475702E62696E006C706333327871 +:100BD00078696D616765004C504333325858204244 +:100BE0006F6F7420496D61676500726B696D616735 +:100BF0006500526F636B6368697020426F6F742089 +:100C0000496D61676500726B736400526F636B635B +:100C100068697020534420426F6F7420496D61678A +:100C20006500726B73706900526F636B6368697003 +:100C30002053504920426F6F7420496D61676500F1 +:100C4000767962726964696D61676500567962726E +:100C5000696420426F6F7420496D616765007A791D +:100C60006E71696D6167650058696C696E78205AAC +:100C7000796E7120426F6F7420496D616765007AEB +:100C8000796E716D70696D6167650058696C696E28 +:100C900078205A796E714D5020426F6F7420496DE3 +:100CA000616765007A796E716D7062696600586976 +:100CB0006C696E78205A796E714D5020426F6F7456 +:100CC00020496D6167652028626966290066706742 +:100CD00061004650474120496D6167650074656554 +:100CE0000054727573746564204578656375746922 +:100CF0006F6E20456E7669726F6E6D656E742049F9 +:100D00006D616765006669726D776172655F6976AE +:100D100074004669726D7761726520776974682026 +:100D200048414276342049565400706D6D6300543A +:100D30004920506F776572204D616E6167656D6502 +:100D40006E74204D6963726F2D436F6E74726F6C99 +:100D50006C6572204669726D776172650073746D9F +:100D60003332696D6167650053544D6963726F6515 +:100D70006C656374726F6E6963732053544D3332C4 +:100D800020496D616765006D746B5F696D616765B2 +:100D9000004D6564696154656B20426F6F74524FFA +:100DA0004D206C6F616461626C6520496D6167659F +:100DB00000636F70726F00436F70726F636573735F +:100DC0006F7220496D6167650073756E78695F6544 +:100DD000676F6E00416C6C77696E6E657220654757 +:100DE0004F4E20426F6F7420496D616765007375C7 +:100DF0006E78695F746F633000416C6C77696E6EFA +:100E0000657220544F433020426F6F7420496D61EA +:100E10006765006664745F6C6567616379006C6523 +:100E20006761637920496D6167652077697468201F +:100E3000466C61742044657669636520547265650B +:100E4000200073706B67696D6167650052656E6540 +:100E50007361732053504B4720496D616765007380 +:100E60006673706C005374617246697665205350E6 +:100E70004C20496D61676500496E76616C6964203C +:100E80004F530061726D2D747275737465642D66B5 +:100E900069726D776172650041524D2054727573AD +:100EA000746564204669726D77617265006C696E65 +:100EB0007578004C696E7578006E657462736400B5 +:100EC0004E6574425344006F736500456E65612042 +:100ED0004F534500706C616E3900506C616E203963 +:100EE000007274656D73005254454D530054727511 +:100EF0007374656420457865637574696F6E204509 +:100F00006E7669726F6E6D656E7400552D426F6FEF +:100F100074007678776F726B73005678576F726BC8 +:100F20007300716E7800514E58006F70656E736279 +:100F30006900524953432D56204F70656E53424904 +:100F40000065666900454649204669726D776172A1 +:100F50006500496E76616C696420415243480061C6 +:100F60006C70686100416C7068610061726D004175 +:100F7000524D00496E74656C2078383600696136D0 +:100F8000340049413634006D36386B004D36384BED +:100F9000006D6963726F626C617A65004D6963729E +:100FA0006F426C617A65006D697073004D495053F2 +:100FB000006D6970733634004D495053203634202B +:100FC000426974006E696F7332004E494F53204975 +:100FD0004900706F776572706300506F776572506B +:100FE000430070706300733339300049424D205321 +:100FF00033393000537570657248007370617263E5 +:101000000053504152430073706172633634005391 +:10101000504152432036342042697400626C61634F +:101020006B66696E00426C61636B66696E00617627 +:10103000723332004156523332006E6473333200E1 +:101040004E44533332006F72316B004F70656E52F5 +:1010500049534320313030300073616E64626F78E1 +:101060000053616E64626F780061726D36340041C6 +:1010700041726368363400414D44207838365F361B +:1010800034007874656E7361005874656E73610026 +:10109000726973637600524953432D560073686139 +:1010A00031007368613235360063726331362D6307 +:1010B0006369747400637263333200727361343035 +:1010C00039360072736133303732007273613230F7 +:1010D0003438004644545F4552525F4E4F54464F99 +:1010E000554E44004644545F4552525F455849535B +:1010F0005453004644545F4552525F4E4F53504143 +:101100004345004644545F4552525F4241444F4676 +:1011100046534554004644545F4552525F42414451 +:1011200050415448004644545F4552525F42414446 +:101130005048414E444C45004644545F4552525F2E +:101140004241445354415445004644545F45525231 +:101150005F5452554E4341544544004644545F4504 +:1011600052525F4241444D41474943004644545F17 +:101170004552525F42414456455253494F4E0046F4 +:1011800044545F4552525F42414453545255435474 +:10119000555245004644545F4552525F4241444CCB +:1011A00041594F5554004644545F4552525F494E91 +:1011B0005445524E414C004644545F4552525F42A2 +:1011C00041444E43454C4C53004644545F455252B3 +:1011D0005F42414456414C5545004644545F455298 +:1011E000525F4241444F5645524C41590046445487 +:1011F0005F4552525F4E4F5048414E444C4553005C +:101200004644545F4552525F424144464C41475325 +:1012100000626C6B5F706172746974696F6E004418 +:101220004F5300454649007363736900757362004C +:101230007361746100686F7374006E766D65006E23 +:10124000766D786970006566696C6F6164657200BF +:1012500076697274696F007076626C6F636B00629E +:101260006C6B6D617000726B6D746400706C333107 +:10127000305F63616368650061726D2C706C33313F +:10128000302D6361636865006E636F72655F6363D1 +:101290007500617274657269732C6E636F72652D6F +:1012A00063637500636C6B0066697865645F726187 +:1012B00074655F7261775F636C6F636B00666978FA +:1012C00065645F636C6F636B0066697865642D634A +:1012D0006C6F636B0066697865645F666163746FE9 +:1012E000725F636C6F636B0066697865642D66611D +:1012F00063746F722D636C6F636B00636C6B2D6135 +:1013000067696C657800726F6F7400726F6F745FDD +:10131000647269766572006E6F700073696D706CCF +:10132000655F6275730073696D706C652D627573AE +:101330000073696D706C652D6D6664006D69736313 +:1013400000696E74656C2C736F63667067612D73D2 +:10135000656372656700696E74656C2C736F636694 +:101360007067612D647472656700736F6366706780 +:10137000615F737973726573657400736F63667010 +:1013800067615F64776D6D6300616C74722C736F5D +:1013900063667067612D64772D6D73686300737089 +:1013A000695F666C617368006A656465632C73705D +:1013B000692D6E6F72006E7331363535305F73652F +:1013C0007269616C006E733136353530006E733181 +:1013D000363535306100696E67656E69632C6A7AEF +:1013E000343738302D75617274006E7669646961C6 +:1013F0002C746567726132302D7561727400736E82 +:1014000070732C64772D6170622D75617274007336 +:1014100070695F67656E657269635F647276007399 +:1014200070695F67656E6572696300636164656EAC +:1014300063655F7370690063646E732C71737069A8 +:101440002D6E6F720074692C616D3635342D6F739B +:1014500070690064775F73706900736E70732C64D9 +:10146000772D6170622D73736900736E70732C64D5 +:10147000772D6170622D7373692D332E32306100C8 +:10148000736E70732C64772D6170622D7373692D88 +:10149000332E32326100736E70732C64772D61705D +:1014A000622D7373692D332E32336100736E707346 +:1014B0002C64772D6170622D7373692D342E30305A +:1014C0006100736E70732C64772D6170622D73737D +:1014D000692D342E303100736E70732C6477632D58 +:1014E0007373692D312E30316100616C74722C730D +:1014F0006F63667067612D73706900616C74722C24 +:10150000736F63667067612D617272696131302D2E +:101510007370690063616E61616E2C6B3231302DC6 +:101520007370690063616E61616E2C6B3231302DB6 +:1015300073736900696E74656C2C7374726174697D +:101540007831302D73706900696E74656C2C616739 +:10155000696C65782D737069006D7363632C6F63BC +:10156000656C6F742D737069006D7363632C6A61B1 +:1015700067756172322D73706900736E70732C61C0 +:1015800078733130782D73706900736E70732C68C6 +:1015900073646B2D737069007273615F6D6F645F4C +:1015A000657870006D6F645F6578705F7377006158 +:1015B0006C74725F7364725F63746C00616C7472DC +:1015C0002C7364722D63746C2D73313000696E74EA +:1015D000656C2C7364722D63746C2D6167696C6526 +:1015E0007800696E74656C2C7364722D63746C2D55 +:1015F0006E357800696E74656C2C7364722D63743B +:101600006C2D6167696C65783500696E74656C2C4A +:101610007364722D63746C2D6167696C6578376DC6 +:1016200000736F63667067612D7265736574006423 +:10163000657369676E776172655F77647400736E56 +:1016400070732C64772D77647400776174636864B9 +:101650006F67003C4E554C4C3E004641540046419D +:101660005433320025303258002530327800746906 +:101670006D656F75742D7365630068775F6D61725A +:1016800067696E5F6D7300752D626F6F742C6E6F7E +:101690006175746F737461727400752D626F6F740D +:1016A0002C6175746F7374617274006379636C6913 +:1016B000635F726567697374657220666F72202557 +:1016C00073206661696C65640A00657665727920CD +:1016D000256C646D73005744543A20202053746184 +:1016E000727465642025732077697468257320738C +:1016F0006572766963696E67202573202825647397 +:101700002074696D656F7574290A0000000000007F +:1017100000000000000000000000000000000000C9 +:1017200000000000000000003017E2FF0000000091 +:1017300000000000000000000000000000000000A9 +:101740000000008000000000100300000000000006 +:101750000000008000000000000000800000000089 +:1017600000000060000000000000000000006000B9 +:10177000000000F700000000000000F7000000007B +:101780000000E00800000000000000000000600011 +:101790000000E0FF000000000000E0FF000000008B +:1017A0000000100000000000100300000000000016 +:1017B0000000FCFF000000000000FCFF0000000033 +:1017C0000080000000000000000000000000600039 +:1017D0000000000001000000000000000100000007 +:1017E000000000001F0000001003000000000000C7 +:1017F00000000000200000000000000020000000A9 +:101800000000000001000000000000000000600077 +:1018100000000000000000000000000000000000C8 +:1018200000000000000000000000000000000000B8 +:1018300000000000000000000000000000000000A8 +:101840000000000000000000000000000000000098 +:101850000000000000000000000000000000000088 +:101860000000000000000000000000000000000078 +:101870000000000000000000000000000000000068 +:101880000000000000000000000000000000000058 +:101890000000000000000000000000000000000048 +:1018A0000000000000000000000000000000000038 +:1018B0000000000000000000000000000000000028 +:1018C00000000000000000009D10E2FF000000008A +:1018D000140000000F0000006901E2FF000000009A +:1018E000FC74E0FF00000000A210E2FF0000000016 +:1018F0002000000013000000B801E2FF000000001B +:10190000FC74E0FF00000000000000000000000088 +:1019100000000000000000000819E2FF00000000C5 +:101920000819E2FF000000001819E2FF00000000A3 +:101930001819E2FF000000002819E2FF0000000073 +:101940002819E2FF000000003819E2FF0000000043 +:101950003819E2FF000000004819E2FF0000000013 +:101960004819E2FF000000005819E2FF00000000E3 +:101970005819E2FF000000006819E2FF00000000B3 +:101980006819E2FF000000007819E2FF0000000083 +:101990007819E2FF000000008819E2FF0000000053 +:1019A0008819E2FF000000009819E2FF0000000023 +:1019B0009819E2FF00000000A819E2FF00000000F3 +:1019C000A819E2FF00000000B819E2FF00000000C3 +:1019D000B819E2FF00000000C819E2FF0000000093 +:1019E000C819E2FF00000000D819E2FF0000000063 +:1019F000D819E2FF00000000E819E2FF0000000033 +:101A0000E819E2FF00000000F819E2FF0000000002 +:101A1000F819E2FF00000000081AE2FF00000000D1 +:101A2000081AE2FF00000000181AE2FF00000000A0 +:101A3000181AE2FF00000000281AE2FF0000000070 +:101A4000281AE2FF00000000381AE2FF0000000040 +:101A5000381AE2FF00000000481AE2FF0000000010 +:101A6000481AE2FF00000000581AE2FF00000000E0 +:101A7000581AE2FF00000000681AE2FF00000000B0 +:101A8000681AE2FF00000000781AE2FF0000000080 +:101A9000781AE2FF00000000881AE2FF0000000050 +:101AA000881AE2FF00000000981AE2FF0000000020 +:101AB000981AE2FF00000000A81AE2FF00000000F0 +:101AC000A81AE2FF00000000B81AE2FF00000000C0 +:101AD000B81AE2FF00000000C81AE2FF0000000090 +:101AE000C81AE2FF00000000D81AE2FF0000000060 +:101AF000D81AE2FF00000000E81AE2FF0000000030 +:101B0000E81AE2FF00000000F81AE2FF00000000FF +:101B1000F81AE2FF00000000081BE2FF00000000CE +:101B2000081BE2FF00000000181BE2FF000000009D +:101B3000181BE2FF00000000281BE2FF000000006D +:101B4000281BE2FF00000000381BE2FF000000003D +:101B5000381BE2FF00000000481BE2FF000000000D +:101B6000481BE2FF00000000581BE2FF00000000DD +:101B7000581BE2FF00000000681BE2FF00000000AD +:101B8000681BE2FF00000000781BE2FF000000007D +:101B9000781BE2FF00000000881BE2FF000000004D +:101BA000881BE2FF00000000981BE2FF000000001D +:101BB000981BE2FF00000000A81BE2FF00000000ED +:101BC000A81BE2FF00000000B81BE2FF00000000BD +:101BD000B81BE2FF00000000C81BE2FF000000008D +:101BE000C81BE2FF00000000D81BE2FF000000005D +:101BF000D81BE2FF00000000E81BE2FF000000002D +:101C0000E81BE2FF00000000F81BE2FF00000000FC +:101C1000F81BE2FF00000000081CE2FF00000000CB +:101C2000081CE2FF00000000181CE2FF000000009A +:101C3000181CE2FF00000000281CE2FF000000006A +:101C4000281CE2FF00000000381CE2FF000000003A +:101C5000381CE2FF00000000481CE2FF000000000A +:101C6000481CE2FF00000000581CE2FF00000000DA +:101C7000581CE2FF00000000681CE2FF00000000AA +:101C8000681CE2FF00000000781CE2FF000000007A +:101C9000781CE2FF00000000881CE2FF000000004A +:101CA000881CE2FF00000000981CE2FF000000001A +:101CB000981CE2FF00000000A81CE2FF00000000EA +:101CC000A81CE2FF00000000B81CE2FF00000000BA +:101CD000B81CE2FF00000000C81CE2FF000000008A +:101CE000C81CE2FF00000000D81CE2FF000000005A +:101CF000D81CE2FF00000000E81CE2FF000000002A +:101D0000E81CE2FF00000000F81CE2FF00000000F9 +:101D1000F81CE2FF00000000081DE2FF00000000C8 +:101D2000081DE2FF00000000181DE2FF0000000097 +:101D3000181DE2FF00000000281DE2FF0000000067 +:101D4000281DE2FF00000000381DE2FF0000000037 +:101D5000381DE2FF00000000481DE2FF0000000007 +:101D6000481DE2FF00000000581DE2FF00000000D7 +:101D7000581DE2FF00000000681DE2FF00000000A7 +:101D8000681DE2FF00000000781DE2FF0000000077 +:101D9000781DE2FF00000000881DE2FF0000000047 +:101DA000881DE2FF00000000981DE2FF0000000017 +:101DB000981DE2FF00000000A81DE2FF00000000E7 +:101DC000A81DE2FF00000000B81DE2FF00000000B7 +:101DD000B81DE2FF00000000C81DE2FF0000000087 +:101DE000C81DE2FF00000000D81DE2FF0000000057 +:101DF000D81DE2FF00000000E81DE2FF0000000027 +:101E0000E81DE2FF00000000F81DE2FF00000000F6 +:101E1000F81DE2FF00000000081EE2FF00000000C5 +:101E2000081EE2FF00000000181EE2FF0000000094 +:101E3000181EE2FF00000000281EE2FF0000000064 +:101E4000281EE2FF00000000381EE2FF0000000034 +:101E5000381EE2FF00000000481EE2FF0000000004 +:101E6000481EE2FF00000000581EE2FF00000000D4 +:101E7000581EE2FF00000000681EE2FF00000000A4 +:101E8000681EE2FF00000000781EE2FF0000000074 +:101E9000781EE2FF00000000881EE2FF0000000044 +:101EA000881EE2FF00000000981EE2FF0000000014 +:101EB000981EE2FF00000000A81EE2FF00000000E4 +:101EC000A81EE2FF00000000B81EE2FF00000000B4 +:101ED000B81EE2FF00000000C81EE2FF0000000084 +:101EE000C81EE2FF00000000D81EE2FF0000000054 +:101EF000D81EE2FF00000000E81EE2FF0000000024 +:101F0000E81EE2FF00000000F81EE2FF00000000F3 +:101F1000F81EE2FF00000000081FE2FF00000000C2 +:101F2000081FE2FF00000000181FE2FF0000000091 +:101F3000181FE2FF00000000281FE2FF0000000061 +:101F4000281FE2FF00000000381FE2FF0000000031 +:101F5000381FE2FF00000000481FE2FF0000000001 +:101F6000481FE2FF00000000581FE2FF00000000D1 +:101F7000581FE2FF00000000681FE2FF00000000A1 +:101F8000681FE2FF00000000781FE2FF0000000071 +:101F9000781FE2FF00000000881FE2FF0000000041 +:101FA000881FE2FF00000000981FE2FF0000000011 +:101FB000981FE2FF00000000A81FE2FF00000000E1 +:101FC000A81FE2FF00000000B81FE2FF00000000B1 +:101FD000B81FE2FF00000000C81FE2FF0000000081 +:101FE000C81FE2FF00000000D81FE2FF0000000051 +:101FF000D81FE2FF00000000E81FE2FF0000000021 +:10200000E81FE2FF00000000F81FE2FF00000000F0 +:10201000F81FE2FF000000000820E2FF00000000BF +:102020000820E2FF000000001820E2FF000000008E +:102030001820E2FF000000002820E2FF000000005E +:102040002820E2FF000000003820E2FF000000002E +:102050003820E2FF000000004820E2FF00000000FE +:102060004820E2FF000000005820E2FF00000000CE +:102070005820E2FF000000006820E2FF000000009E +:102080006820E2FF000000007820E2FF000000006E +:102090007820E2FF000000008820E2FF000000003E +:1020A0008820E2FF000000009820E2FF000000000E +:1020B0009820E2FF00000000A820E2FF00000000DE +:1020C000A820E2FF00000000B820E2FF00000000AE +:1020D000B820E2FF00000000C820E2FF000000007E +:1020E000C820E2FF00000000D820E2FF000000004E +:1020F000D820E2FF00000000E820E2FF000000001E +:10210000E820E2FF00000000F820E2FF00000000ED +:10211000F820E2FF00000000FFFFFFFFFFFFFFFFCE +:1021200000000200000000009D10E2FF000000001F +:102130001400000000000000588EE0FF00000000C6 +:102140000000010000000000A869E0FF000000009E +:102150008469E0FF000000003C69E0FF000000002F +:10216000A210E2FF000000002000000000000000BC +:102170009CB1E0FF00000000000001000000000032 +:102180000869E0FF00000000E468E0FF00000000D4 +:102190009C68E0FF00000000A910E2FF00000000C2 +:1021A00002000000000000008CD3E0FF00000000EF +:1021B00000000100000000003868E0FF000000009F +:1021C0006868E0FF000000009C67E0FF000000007E +:1021D000B510E2FF00000000040000000000000055 +:1021E00070D4E0FF000000000000010000000000CB +:1021F0000868E0FF00000000D467E0FF0000000076 +:102200006467E0FF000000008000000000000000A4 +:1022100000000000000000000000000000000000BE +:1022200000000000000000000000000000000000AE +:10223000000000000000000000000000000000009E +:10224000000000000000000000000000000000008E +:10225000000000000000000000000000000000007E +:102260004816E1FF00000000000000000000000030 +:102270000000000000000000AC0FE1FF00000000C3 +:1022800000000000000000000B13E2FF000000004F +:1022900000000000000000007C37E1FF00000000AB +:1022A000000000000000000000000000000000002E +:1022B000C0A2E1FF000000000000000000000000DC +:1022C000000000000000000000000000000000000E +:1022D00000000000000000000000000000000000FE +:1022E00000000000000000000000000000000000EE +:1022F00000000000000000000000000000000000DE +:1023000000000000000000000000000000000000CD +:1023100000000000000000000000000000000000BD +:1023200000000000000000000000000000000000AD +:10233000000000000000000000000000000000009D +:10234000000000000000000000000000000000008D +:10235000000000000000000000000000000000007D +:10236000000000000000000000000000000000006D +:10237000000000000000000000000000000000005D +:10238000000000000000000000000000000000004D +:10239000000000000000000000000000000000003D +:1023A000000000000000000000000000000000002D +:1023B000000000000000000000000000000000001D +:1023C000000000000000000000000000000000000D +:1023D00000000000000000000000000000000000FD +:1023E00000000000000000000000000000000000ED +:1023F00000000000000000000000000000000000DD +:1024000000000000000000000000000000000000CC +:1024100000000000000000000000000000000000BC +:1024200000000000000000000000000000000000AC +:10243000000000000000000000000000000000009C +:10244000000000000000000000000000000000008C +:10245000000000000000000000000000000000007C +:10246000000000000000000000000000000000006C +:10247000000000000000000000000000000000005C +:10248000000000000000000000000000000000004C +:10249000000000000000000000000000000000003C +:1024A000000000000000000000000000000000002C +:1024B000000000000000000000000000000000001C +:1024C000000000000000000000000000000000000C +:1024D00000000000000000000000000000000000FC +:1024E00000000000000000000000000000000000EC +:1024F00000000000000000000000000000000000DC +:1025000000000000000000000000000000000000CB +:1025100000000000000000000000000000000000BB +:1025200000000000000000000000000000000000AB +:10253000000000000000000000000000000000009B +:10254000000000000000000000000000000000008B +:10255000000000000000000000000000000000007B +:10256000000000000000000000000000000000006B +:10257000000000000000000000000000000000005B +:10258000000000000000000000000000000000004B +:10259000000000000000000000000000000000003B +:1025A000000000000000000000000000000000002B +:1025B000000000000000000000000000000000001B +:1025C000000000000000000000000000000000000B +:1025D00000000000000000000000000000000000FB +:1025E00000000000000000000000000000000000EB +:1025F00000000000000000000000000000000000DB +:1026000000000000000000000000000000000000CA +:1026100000000000000000000000000000000000BA +:1026200000000000000000000000000000000000AA +:10263000000000000000000000000000000000009A +:10264000000000000000000000000000000000008A +:10265000000000000000000000000000000000007A +:10266000000000000000000000000000000000006A +:10267000000000000000000000000000000000005A +:10268000000000000000000000000000000000004A +:10269000000000000000000000000000000000003A +:1026A000000000000000000000000000000000002A +:1026B000000000000000000000000000000000001A +:1026C000000000000000000000000000000000000A +:1026D00000000000000000000000000000000000FA +:1026E00000000000000000000000000000000000EA +:1026F00000000000000000000000000000000000DA +:1027000000000000000000000000000000000000C9 +:1027100000000000000000000000000000000000B9 +:1027200000000000000000000000000000000000A9 +:102730000000000000000000000000000000000099 +:102740000000000000000000000000000000000089 +:102750000000000000000000000000000000000079 +:102760000000000000000000000000000000000069 +:102770000000000000000000000000000000000059 +:102780000000000000000000000000000000000049 +:102790000000000000000000000000000000000039 +:1027A0000000000000000000000000000000000029 +:1027B0000000000000000000000000000000000019 +:1027C0000000000000000000000000000000000009 +:1027D00000000000000000000000000000000000F9 +:1027E00000000000000000000000000000000000E9 +:1027F00000000000000000000000000000000000D9 +:1028000000000000000000000000000000000000C8 +:1028100000000000000000000000000000000000B8 +:1028200000000000000000000000000000000000A8 +:102830000000000000000000000000000000000098 +:102840000000000000000000000000000000000088 +:102850000000000000000000000000000000000078 +:102860000000000000000000000000000000000068 +:102870000000000000000000000000000000000058 +:102880000000000000000000000000000000000048 +:102890000000000000000000000000000000000038 +:1028A0000000000000000000000000000000000028 +:1028B0000000000000000000000000000000000018 +:1028C0000000000000000000000000000000000008 +:1028D00000000000000000000000000000000000F8 +:1028E00000000000000000000000000000000000E8 +:1028F00000000000000000000000000000000000D8 +:1029000000000000000000000000000000000000C7 +:1029100000000000000000000000000000000000B7 +:1029200000000000000000000000000000000000A7 +:102930000000000000000000000000000000000097 +:102940000000000000000000000000000000000087 +:102950000000000000000000000000000000000077 +:102960000000000000000000000000000000000067 +:102970000000000000000000000000000000000057 +:102980000000000000000000000000000000000047 +:102990000000000000000000000000000000000037 +:1029A0000000000000000000000000000000000027 +:1029B0000000000000000000000000000000000017 +:1029C0000000000000000000000000000000000007 +:1029D00000000000000000000000000000000000F7 +:1029E00000000000000000000000000000000000E7 +:1029F00000000000000000000000000000000000D7 +:102A000000000000000000000000000000000000C6 +:102A100000000000000000000000000000000000B6 +:102A200000000000000000000000000000000000A6 +:102A30000000000000000000000000000000000096 +:102A40000000000000000000000000000000000086 +:102A50000000000000000000000000000000000076 +:102A60000000000000000000000000000000000066 +:102A70000000000000000000000000000000000056 +:102A80000000000000000000000000000000000046 +:102A90000000000000000000000000000000000036 +:102AA0000000000000000000000000000000000026 +:102AB0000000000000000000000000000000000016 +:102AC0000000000000000000000000000000000006 +:102AD00000000000000000000000000000000000F6 +:102AE00000000000000000000000000000000000E6 +:102AF00000000000000000000000000000000000D6 +:102B000000000000000000000000000000000000C5 +:102B100000000000000000000000000000000000B5 +:102B200000000000000000000000000000000000A5 +:102B30000000000000000000000000000000000095 +:102B40000000000000000000000000000000000085 +:102B50000000000000000000000000000000000075 +:102B60000000000000000000000000000000000065 +:102B70000000000000000000000000000000000055 +:102B80000000000000000000000000000000000045 +:102B90000000000000000000000000000000000035 +:102BA0000000000000000000000000000000000025 +:102BB0000000000000000000000000000000000015 +:102BC0000000000000000000000000000000000005 +:102BD00000000000000000000000000000000000F5 +:102BE00000000000000000000000000000000000E5 +:102BF00000000000000000000000000000000000D5 +:102C000000000000000000000000000000000000C4 +:102C100000000000000000000000000000000000B4 +:102C200000000000000000000000000000000000A4 +:102C30000000000000000000000000000000000094 +:102C40000000000000000000000000000000000084 +:102C50000000000000000000000000000000000074 +:102C60000000000000000000000000000000000064 +:102C70000000000000000000000000000000000054 +:102C80000000000000000000000000000000000044 +:102C90000000000000000000000000000000000034 +:102CA0000000000000000000000000000000000024 +:102CB0000000000000000000000000000000000014 +:102CC0000000000000000000000000000000000004 +:102CD00000000000000000000000000000000000F4 +:102CE00000000000000000000000000000000000E4 +:102CF00000000000000000000000000000000000D4 +:102D000000000000000000000000000000000000C3 +:102D100000000000000000000000000000000000B3 +:102D200000000000000000000000000000000000A3 +:102D30000000000000000000000000000000000093 +:102D40000000000000000000000000000000000083 +:102D50000000000000000000000000000000000073 +:102D60000000000000000000000000000000000063 +:102D70000000000000000000000000000000000053 +:102D80000000000000000000000000000000000043 +:102D90000000000000000000000000000000000033 +:102DA0000000000000000000000000000000000023 +:102DB0000000000000000000000000000000000013 +:102DC0000000000000000000000000000000000003 +:102DD00000000000000000000000000000000000F3 +:102DE00000000000000000000000000000000000E3 +:102DF00000000000000000000000000000000000D3 +:102E000000000000000000000000000000000000C2 +:102E100000000000000000000000000000000000B2 +:102E200000000000000000000000000000000000A2 +:102E30000000000000000000000000000000000092 +:102E40000000000000000000000000000000000082 +:102E50000000000000000000000000000000000072 +:102E60000000000000000000000000000000000062 +:102E70000000000000000000CB10E2FF0000000096 +:102E80000001000000000000000000000000000041 +:102E900000000000000000007470E0FF000000006F +:102EA000C310E2FF000000008001000000000000ED +:102EB0000000000000000000000000000000000012 +:102EC0007470E0FF00000000BB10E2FF0000000093 +:102ED00000020000000000000000000000000000F0 +:102EE00000000000000000007470E0FF000000001F +:102EF000AF15E2FF000000006200000000000000CB +:102F0000D8C7E1FF00000000000000000000000042 +:102F10006CA3E1FF000000000000000000000000C2 +:102F20000000000000000000F4A2E1FF000000002B +:102F30000000000000000000000000000000000091 +:102F40000000000000000000200000001800000049 +:102F50000000000000000000B022E2FF00000000BE +:102F600000000000000000001112E2FF000000005D +:102F700054000000000000000000000000000000FD +:102F80000000000000000000000000000000000041 +:102F90000000000000000000000000000000000031 +:102FA0000000000000000000000000000000000021 +:102FB0000000000000000000000000000000000011 +:102FC0000000000000000000000000000000000001 +:102FD00038C8E1FF00000000000000000000000011 +:102FE0002B14E2FF0000000072000000000000004F +:102FF00060C8E1FF000000000000000000000000C9 +:103000003C81E1FF00000000007DE1FF00000000C6 +:103010000000000000000000A882E1FF00000000A6 +:1030200000000000000000000000000000000000A0 +:103030000000000000000000A80000005800000090 +:103040000000000000000000C8C8E1FF0000000010 +:103050000004000000000000D512E2FF00000000A4 +:103060001E0000000000000010C9E1FF0000000089 +:103070000000000000000000000000000000000050 +:103080000000000000000000000000000000000040 +:10309000F40EE1FF0000000000000000000000004E +:1030A0000000000000000000000000000000000020 +:1030B00000000000300000000000000000000000E0 +:1030C00030C9E1FF00000000000000000000000027 +:1030D000A812E2FF000000001E0000000000000037 +:1030E00000000000000000000000000000000000E0 +:1030F00000000000000000000000000000000000D0 +:1031000000000000000000000000000000000000BF +:1031100000000000000000000000000000000000AF +:10312000000000000000000000000000000000009F +:103130000000000000000000D0C9E1FF0000000016 +:1031400004000000000000002F16E2FF0000000055 +:10315000890000000000000010CAE1FF000000002C +:10316000000000000000000024B2E1FF00000000A9 +:10317000000000000000000000000000000000004F +:10318000000000000000000000000000000000003F +:10319000000000000000000000000000000000002F +:1031A00020000000000000000000000000000000FF +:1031B00030CAE1FF00000000040000000000000031 +:1031C0005314E2FF00000000720000000000000045 +:1031D00078CBE1FF000000000000000000000000CC +:1031E000709CE1FF00000000049BE1FF0000000074 +:1031F0000000000000000000909AE1FF00000000C5 +:1032000000000000000000000000000000000000BE +:103210000000000000000000A800000010000000F6 +:103220000000000000000000D0CCE1FF0000000022 +:103230000000000000000000BD12E2FF00000000DE +:103240001E0000000000000070C9E1FF0000000047 +:10325000000000000000000000000000000000006E +:10326000000000000000000000000000000000005E +:10327000840EE1FF000000000000000000000000DC +:10328000000000000000000000000000000000003E +:1032900000000000300000000000000000000000FE +:1032A00090C9E1FF000000000400000000000000E1 +:1032B0006A03E2FF0000000073000000000000004D +:1032C000E8CFE1FF00000000000000000000000067 +:1032D0000865E1FF000000002866E1FF0000000033 +:1032E00000000000000000000000000000000000DE +:1032F00000000000000000000000000000000000CE +:103300000000000000000000980200000000000023 +:10331000000000000000000008D0E1FF00000000F5 +:103320000004000000000000A8FBE1FF0000000016 +:103330001600000000000000000000000000000077 +:1033400000000000000000000050E1FF000000004D +:10335000E44FE1FF0000000000000000000000005A +:10336000000000000000000000000000000000005D +:10337000000000000000000000000000000000004D +:10338000000000000000000000000000000000003D +:1033900020CEE1FF0000000000040000000000005B +:1033A000A415E2FF000000004A0000000000000039 +:1033B000000000000000000000000000000000000D +:1033C00000000000000000000000000000000000FD +:1033D00000000000000000000000000000000000ED +:1033E00000000000000000000000000000000000DD +:1033F00000000000000000000000000000000000CD +:10340000000000000000000048CEE1FF00000000C6 +:1034100004000000000000008812E2FF000000002D +:103420001D0000000000000050CEE1FF0000000081 +:103430000000000000000000E406E1FF00000000C2 +:10344000000000000000000000000000000000007C +:10345000000000000000000000000000000000006C +:10346000000000000000000000000000000000005C +:10347000000000000000000000000000000000004C +:103480000000000000000000040000000000000038 +:10349000B613E2FF000000006D0000000000000015 +:1034A00070CEE1FF000000000000000000000000FE +:1034B000A874E1FF00000000000000000000000010 +:1034C0000000000000000000C870E1FF00000000E4 +:1034D00000000000000000000000000000000000EC +:1034E0000000000000000000200000002800000094 +:1034F0000000000000000000D0CEE1FF000000004E +:1035000000000000000000006C12E2FF000000005C +:103510001D0000000000000000CEE1FF00000000E0 +:1035200000000000000000007005E1FF0000000046 +:10353000000000000000000000000000000000008B +:10354000000000000000000000000000000000007B +:10355000000000000000000000000000000000006B +:10356000000000000000000000000000000000005B +:103570000000000000000000040000000000000047 +:103580000B13E2FF0000000000000000000000003C +:10359000000000000000000000000000000000002B +:1035A000000000000000000000000000000000001B +:1035B000000000000000000000000000000000000B +:1035C00000000000000000000000000000000000FB +:1035D00000000000000000000000000000000000EB +:1035E00000000000000000000000000000000000DB +:1035F00000000000000000001B13E2FF00000000BC +:103600006E00000000000000D0CDE1FF00000000CF +:1036100000000000000000000000000000000000AA +:10362000000000000000000000000000000000009A +:10363000000000000000000000000000000000008A +:10364000000000000000000000000000000000007A +:10365000000000000000000000000000000000006A +:103660000000000000000000040000000000000056 +:10367000FB12E2FF000000001E000000000000003E +:1036800018CFE1FF00000000000000000000000073 +:10369000AC11E1FF0000000000000000000000008D +:1036A00000000000000000004410E1FF00000000E6 +:1036B000000000000000000000000000000000000A +:1036C00000000000000000000000000008000000F2 +:1036D00000000000000000004822E2FF000000009F +:1036E00000000000000000005C13E2FF000000008A +:1036F0004D0000000000000038CFE1FF0000000096 +:103700000000000000000000E435E1FF00000000C0 +:1037100000000000000000000000000000000000A9 +:103720000000000000000000000000000000000099 +:103730000000000000000000000000000000000089 +:103740000000000000000000000000000000000079 +:103750000000000000000000000000000000000069 +:103760007B13E2FF000000004900000000000000A1 +:1037700058CFE1FF000000002860E1FF00000000DA +:103780003C5FE1FF000000000000000000000000BE +:103790000000000000000000385EE1FF00000000B3 +:1037A0000000000000000000000000000000000019 +:1037B0000000000000000000700000002001000078 +:1037C000000000000000000028CBE1FF0000000026 +:1037D00000000000000000002116E2FF00000000D1 +:1037E000660000000000000078CFE1FF000000004C +:1037F0004CB1E1FF00000000F4B0E1FF0000000068 +:103800002CB0E1FF000000000000000000000000FC +:1038100000000000000000000000000000000000A8 +:103820000000000000000000000000000000000098 +:103830000800000000000000000000000000000080 +:1038400098CFE1FF0000000000040000000000002D +:103850004713E2FF000000004D00000000000000E0 +:10386000C8CFE1FF000000000000000000000000E1 +:103870004C34E1FF000000000000000000000000E8 +:103880000000000000000000000000000000000038 +:103890000000000000000000000000000000000028 +:1038A0000000000000000000000000000000000018 +:1038B0000000000000000000000000000000000008 +:1038C00000000000000000000F14E2FF00000000F4 +:1038D0007400000000000000000000000000000074 +:1038E00000000000000000000000000000000000D8 +:1038F00000000000000000000000000000000000C8 +:1039000000000000000000000000000000000000B7 +:1039100000000000000000000000000000000000A7 +:103920000000000000000000000000000000000097 +:103930000000000000000000000000000000000087 +:103940006A13E2FF000000007800000000000000A1 +:103950000000000000000000000000000000000067 +:103960000000000000000000000000000000000057 +:103970000000000000000000000000000000000047 +:103980000000000000000000000000000000000037 +:103990000000000000000000000000000000000027 +:1039A00000000000000000009822E2FF000000007C +:1039B0000000000000000000A415E2FF000000006D +:1039C00000000000000000008EF8E1FF0000000091 +:1039D0004C6CE0FF000000002312E2FF000000003A +:1039E00005000000800000006CFCE0FF000000000B +:1039F00000000000000000007CF6E0FF0000000076 +:103A00001F12E2FF0000000002000000080000009A +:103A100010F6E0FF000000000000000000000000C1 +:103A20000CF3E0FF000000002908E2FF00000000A6 +:103A300001000000000000000436E0FF000000006C +:103A40002408E2FF00000000020000000000000067 +:103A50000436E0FF000000001D08E2FF0000000047 +:103A600003000000000000000436E0FF000000003A +:103A70003208E2FF0000000000000000000000002B +:103A8000E43AE0FF000000002E08E2FF0000000022 +:103A900008000000000000000C3AE0FF00000000F9 +:103AA000ACFBE1FF00000000160000000000000079 +:103AB0000000000000000000000000000000000006 +:103AC000000000000000000054FEE0FF00000000C5 +:103AD00000000000000000000000000000000000E6 +:103AE00000000000000000000000000000000000D6 +:103AF00000000000000000000000000000000000C6 +:103B00000000000000000000900000000000000025 +:103B100000000000000000008212E2FF0000000030 +:103B20001D00000000000000D025E1FF00000000A3 +:103B30000000000000000000000000000000000085 +:103B40000000000000000000000000000000000075 +:103B50000000000000000000000000000000000065 +:103B60000000000000000000000000000000000055 +:103B70000000000000000000000000000000000045 +:103B80000000000000000000000000000000000035 +:103B9000A412E2FF000000001E0000000000000070 +:103BA0000000000000000000000000000000000015 +:103BB0000000000000000000840DE1FF0000000094 +:103BC00000000000000000000000000000000000F5 +:103BD00000000000000000000000000000000000E5 +:103BE00000000000000000000000000000000000D5 +:103BF00000000000000000000000000000000000C5 +:103C000000000000000000003C13E2FF0000000084 +:103C10004800000000000000D025E1FF0000000087 +:103C20000000000000000000000000000000000094 +:103C30000000000000000000000000000000000084 +:103C40000000000000000000000000000000000074 +:103C50000000000000000000000000000000000064 +:103C60000000000000000000000000000000000054 +:103C70000000000000000000000000000000000044 +:103C80002B0DE2FF000000004900000000000000D2 +:103C90000000000000000000000000000000000024 +:103CA0000000000000000000000000000000000014 +:103CB0000000000000000000000000000000000004 +:103CC00000000000000000000000000000000000F4 +:103CD00000000000000000000000000000000000E4 +:103CE00000000000080000000000000000000000CC +:103CF00000000000010000009815E2FF0000000035 +:103D00004A00000000000000000000000000000069 +:103D100000000000000000000000000000000000A3 +:103D20000000000000000000000000000000000093 +:103D30000000000000000000000000000000000083 +:103D40000000000000000000000000000000000073 +:103D50000000000000000000000000000000000063 +:103D60000000000000000000000000000000000053 +:103D70006812E2FF000000004B000000000000009D +:103D80000000000000000000000000000000000033 +:103D90000000000000000000000000000000000023 +:103DA0000000000000000000000000000000000013 +:103DB0000000000000000000000000000000000003 +:103DC00000000000000000000000000000000000F3 +:103DD0000000000090010000000000000000000052 +:103DE00000000000000000001713E2FF00000000C8 +:103DF0004D00000000000000000000000000000076 +:103E000000000000000000000000000000000000B2 +:103E100000000000000000000000000000000000A2 +:103E20000000000000000000000000000000000092 +:103E30000000000000000000000000000000000082 +:103E40000000000000000000000000000000000072 +:103E50000000000000000000000000000000000062 +:103E60001512E2FF000000005400000000000000F6 +:103E70000000000000000000000000000000000042 +:103E80000000000000000000000000000000000032 +:103E90000000000000000000000000000000000022 +:103EA0000000000000000000000000000000000012 +:103EB0000000000000000000000000000000000002 +:103EC000000000000000000078000000000000007A +:103ED0000000000000000000510BE2FF00000000A5 +:103EE0006200000000000000000000000000000070 +:103EF00000000000000000000000000000000000C2 +:103F000000000000000000000000000000000000B1 +:103F100000000000000000000000000000000000A1 +:103F20000000000000000000000000000000000091 +:103F30000000000000000000000000000000000081 +:103F40000000000000000000000000000000000071 +:103F50002916E2FF000000006600000000000000DB +:103F60000000000000000000000000000000000051 +:103F70000000000000000000000000000000000041 +:103F80000000000000000000000000000000000031 +:103F90000000000000000000000000000000000021 +:103FA0000000000000000000000000000000000011 +:103FB0000000000000000000000000000000000001 +:103FC00000000000000000000613E2FF00000000F7 +:103FD00000000000000000000000000000000000E1 +:103FE00000000000000000000000000000000000D1 +:103FF00000000000000000000000000000000000C1 +:1040000000000000000000000000000000000000B0 +:1040100000000000000000000000000000000000A0 +:104020000000000000000000000000000000000090 +:104030000000000000000000000000000000000080 +:10404000BE13E2FF000000006D0000000000000051 +:104050000000000000000000000000000000000060 +:104060000000000000000000C06EE1FF0000000042 +:10407000E46EE1FF0000000000000000000000000E +:104080000000000000000000000000000000000030 +:104090000000000000000000000000000000000020 +:1040A00000000000180000000000000000000000F8 +:1040B00000000000010000001B13E2FF00000000F0 +:1040C0006E00000000000000842FE1FF00000000EF +:1040D00000000000000000000000000000000000E0 +:1040E00000000000000000000000000000000000D0 +:1040F00000000000000000000000000000000000C0 +:1041000000000000000000000000000000000000AF +:10411000000000000000000000000000000000009F +:104120001800000000000000000000000000000077 +:104130002015E2FF000000007200000000000000F7 +:10414000D025E1FF0000000000000000000000009A +:1041500000000000000000000876E1FF0000000001 +:104160000000000000000000FC7BE1FF00000000F8 +:10417000BC75E1FF0000000000000000000000002E +:10418000000000000000000000000000000000002F +:10419000000000000C0000000000000030000000E3 +:1041A0000C000000010000001F14E2FF00000000EE +:1041B000740000000000000000000000000000008B +:1041C00000000000000000000000000000000000EF +:1041D00000000000000000000000000000000000DF +:1041E00000000000000000000000000000000000CF +:1041F00000000000000000000000000000000000BF +:1042000000000000000000000000000000000000AE +:10421000000000000000000000000000000000009E +:104220009E13E2FF00000000730000000000000089 +:10423000C863E1FF00000000000000000000000073 +:10424000000000000000000000000000000000006E +:10425000000000000000000000000000000000005E +:10426000000000000000000000000000000000004E +:10427000000000000000000000000000000000003E +:104280000000000098020000000000000000000094 +:1042900000000000000000007213E2FF00000000B8 +:1042A0007800000000000000000000000000000096 +:1042B00000000000000000000000000000000000FE +:1042C00000000000000000000000000000000000EE +:1042D00000000000000000000000000000000000DE +:1042E00000000000000000000000000000000000CE +:1042F00000000000000000000000000000000000BE +:1043000000000000000000000000000000000000AD +:104310004A16E2FF000000008900000000000000D3 +:10432000000000000000000000000000000000008D +:1043300078B3E1FF00000000000000000000000072 +:10434000000000000000000000000000000000006D +:10435000000000000000000000000000000000005D +:10436000000000000000000000000000000000004D +:104370000000000028000000000000000000000015 +:104380000000000001000000D00DFEED000014153B +:1043900000000038000011CC0000002800000011CF +:1043A000000000020000000000000249000011941B +:1043B00000000000000000000000000000000000FD +:1043C00000000001000000000000000300000015D4 +:1043D00000000000696E74656C2C736F6366706713 +:1043E000612D6167696C65780000000000000003C2 +:1043F000000000040000000B0000000200000003A9 +:10440000000000040000001A000000020000000389 +:104410000000001500000026536F4346504741201E +:104420004167696C657820536F43444B000000007E +:1044300000000001736F630000000003000000042F +:104440000000000B00000001000000030000000459 +:104450000000001A00000001000000030000000B33 +:104460000000000073696D706C652D62757300004B +:1044700000000003000000040000002C736F6300C4 +:1044800000000003000000100000003800000000E1 +:104490000000000000000000FFFFFFFF000000011F +:1044A000636C6F636B2D636F6E74726F6C6C65728F +:1044B0004066666431303030300000000000000398 +:1044C0000000001400000000696E74656C2C6167C8 +:1044D000696C65782D636C6B6D677200000000037A +:1044E000000000080000003FFFD1000000001000A5 +:1044F0000000000300000004000000430000000171 +:104500000000000300000004000000500000000A4A +:10451000000000020000000164776D6D63304066AA +:1045200066383038303030000000000300000004EE +:104530000000000B00000001000000030000000468 +:104540000000001A00000000000000030000001539 +:1045500000000000616C74722C736F636670676199 +:104560002D64772D6D736863000000000000000368 +:10457000000000080000003FFF80800000001000E5 +:1045800000000003000000040000005800000400C8 +:1045900000000003000000040000006300000001B0 +:1045A00000000003000000100000006D0000000784 +:1045B00000000027000000070000002F000000039B +:1045C000000000060000007472657365740000004E +:1045D0000000000300000010000000800000000A3E +:1045E000000000210000000A00000030000000036D +:1045F00000000008000000876269750063697500AB +:104600000000000300000008000000930000000804 +:104610000000000500000003000000050000009AF3 +:104620006F6B6179000000000000000300000000D3 +:10463000000000A10000000300000000000000B224 +:104640000000000300000004000000BC00000004A3 +:104650000000000300000004000000C6000000038A +:104660000000000300000004000000CD0000000076 +:1046700000000003000000040000005000000011D2 +:1046800000000002000000016E616E644066666218 +:10469000393030303000000000000003000000041A +:1046A0000000000B000000010000000300000004F7 +:1046B0000000001A000000000000000300000019C4 +:1046C00000000000616C74722C736F636670676128 +:1046D0002D64656E616C692D6E616E640000000072 +:1046E00000000003000000100000003FFFB90000C0 +:1046F00000010000FFB800000000100000000003EF +:1047000000000015000000D56E616E645F64617486 +:10471000610064656E616C695F726567000000002E +:104720000000000300000010000000800000000AEC +:104730000000002D0000000A00000033000000030C +:104740000000000C000000876E616E64006E616EF8 +:10475000645F780000000003000000100000006D9E +:104760000000000700000025000000070000002DE9 +:1047700000000003000000090000009A64697361F2 +:10478000626C65640000000000000003000000048B +:10479000000000DF00000010000000020000000127 +:1047A0007273746D67724066666431313030300008 +:1047B0000000000300000004000000EE0000000103 +:1047C000000000030000000D00000000616C747226 +:1047D0002C7273742D6D67720000000000000003DE +:1047E000000000080000003FFFD1100000000100A1 +:1047F0000000000300000004000000FB0000002097 +:10480000000000030000000400000050000000074A +:1048100000000002000000017379736D677240664A +:1048200066643132303030000000000300000014B4 +:1048300000000000616C74722C7379732D6D6772C7 +:1048400000737973636F6E000000000300000008BE +:104850000000003FFFD12000000005000000000321 +:1048600000000004000000500000000900000002E9 +:104870000000000173657269616C304066666330E8 +:104880003230303000000000000000030000001152 +:1048900000000000736E70732C64772D6170622DC0 +:1048A0007561727400000000000000030000000841 +:1048B0000000003FFFC020000000010000000003D6 +:1048C000000000040000010E0000000200000003D0 +:1048D00000000004000001180000000400000003B4 +:1048E000000000080000006D0000000700000050FC +:1048F00000000003000000050000009A6F6B617962 +:10490000000000000000000300000008000000801C +:104910000000000A00000022000000030000000464 +:104920000000012505F5E100000000020000000183 +:104930007761746368646F674066666430303230F4 +:1049400030000000000000030000000C0000000028 +:10495000736E70732C64772D77647400000000030D +:10496000000000080000003FFFD00200000001002E +:1049700000000003000000080000006D00000007B8 +:10498000000000400000000300000008000000805C +:104990000000000A00000003000000030000000502 +:1049A0000000009A6F6B61790000000000000002B7 +:1049B00000000001736472406638303131313030AC +:1049C00000000000000000030000001500000000CF +:1049D000696E74656C2C7364722D63746C2D6167E1 +:1049E000696C6578000000000000000300000018FA +:1049F0000000003FF800040000000080F801000003 +:104A000000000190F8011000000005000000000304 +:104A1000000000080000006D0000000700000066B4 +:104A20000000000300000004000000500000000D22 +:104A3000000000020000000173706940666638647F +:104A40003230303000000000000000030000000E93 +:104A50000000000063646E732C717370692D6E6FBB +:104A60007200000000000003000000040000000BC2 +:104A70000000000100000003000000040000001A14 +:104A80000000000000000003000000100000003FD4 +:104A9000FF8D200000000100FF90000000100000CA +:104AA0000000000300000004000001350000008049 +:104AB00000000003000000040000014500000004A5 +:104AC0000000000300000004000001550000000089 +:104AD000000000030000000400000080000000123D +:104AE00000000003000000050000009A6F6B617970 +:104AF0000000000000000001666C61736840300037 +:104B000000000003000000040000000B0000000192 +:104B100000000003000000040000001A0000000173 +:104B2000000000030000000E000000006A656465DC +:104B3000632C7370692D6E6F72000000000000031B +:104B4000000000040000003F00000000000000031F +:104B5000000000040000016A05F5E1000000000308 +:104B6000000000000000017C0000000300000004C1 +:104B70000000018B000001000000000300000004A1 +:104B80000000019A00000010000000030000000473 +:104B9000000001AA00000032000000030000000431 +:104BA000000001B800000032000000030000000413 +:104BB000000001C600000004000000030000000423 +:104BC000000001D400000004000000030000000405 +:104BD000000001E2000000040000000300000004E7 +:104BE000000001F3000000040000000200000002C9 +:104BF00000000001736F63667067612D73656372F7 +:104C000065670000000000030000001500000000C0 +:104C1000696E74656C2C736F63667067612D736564 +:104C200063726567000000000000000300000004DC +:104C30000000000B00000001000000030000000461 +:104C40000000001A0000000100000001695F737994 +:104C5000735F6D67725F636F726540666664313261 +:104C60003030300000000003000000080000003F6A +:104C7000FFD12000000002300000000300000018F7 +:104C80000000020400000020FF010000FF010011ED +:104C900000000024FFFFFFFFFFFFFFFF00000002F6 +:104CA000000000016E6F635F66775F6C345F706554 +:104CB000725F6C345F7065725F73637240666664C6 +:104CC00032313030300000000000000300000008E6 +:104CD0000000003FFFD2100000000074000000033D +:104CE00000000114000002040000000001010001A6 +:104CF00001010001000000040101000101010001A7 +:104D00000000000C01010001010100010000001081 +:104D100001010001010100010000001C010100016E +:104D20000101010100000020010100010101010158 +:104D30000000002401010001010101010000002820 +:104D400001010001010101010000002C010100012D +:104D5000010100010000003001010001010100011A +:104D600000000034010100010101000100000040C9 +:104D700001010001010100010000004401010001E6 +:104D800001010101000000480101000101010101D0 +:104D90000000005001010001010101010000005468 +:104DA00001010001010101010000005801010001A1 +:104DB000010101010000005C01010001010101018C +:104DC0000000006001010001010101010000006418 +:104DD0000101000101010101000000680101000161 +:104DE000010101010000006C01010001010101014C +:104DF000000000700101000101010101000000023A +:104E0000000000016E6F635F66775F6C345F7379DB +:104E1000735F6C345F7379735F736372406666644B +:104E20003231313030000000000000030000000883 +:104E30000000003FFFD211000000009800000003B6 +:104E4000000001440000020400000008010100010C +:104E5000010100010000000C01010001010100013D +:104E60000000001001010001010100010000001418 +:104E70000101000101010001000000180101000111 +:104E8000010100010000001C0101000101010001FD +:104E90000000002001010001010100010000002CC0 +:104EA00001010001010100010000003001010001C9 +:104EB00001010001000000340101000101010001B5 +:104EC0000000003801010001010100010000004064 +:104ED0000101000101010001000000440101000185 +:104EE0000101000100000048010100010101000171 +:104EF0000000004C0101000101010001000000540C +:104F00000101000101010001000000580101000140 +:104F1000010100010000005C01010001010100012C +:104F200000000060010100010101010100000064B6 +:104F300001010001010101010000006801010001FF +:104F4000010101010000006C0101000101010101EA +:104F50000000007001010001010101010000007466 +:104F600001010001010101010000007801010001BF +:104F70000301000100000090010100010101000196 +:104F80000000009401010001010100010000000285 +:104F9000000000016E6F635F66775F736F63326658 +:104FA0007067615F736F6332667067615F736372AE +:104FB0004066666432313230300000000000000389 +:104FC000000000080000003FFFD2120000000004B3 +:104FD000000000030000000C0000020400000000BC +:104FE0000FFE01010FFE01010000000200000001A0 +:104FF0006E6F635F66775F6C77736F63326670673F +:10500000615F6C77736F6332667067615F73637241 +:105010004066666432313330300000000000000327 +:10502000000000080000003FFFD213000000000451 +:10503000000000030000000C00000204000000005B +:105040000FFE01010FFE010100000002000000013F +:105050006E6F635F66775F7463755F7463755F73AC +:105060006372406666643231343030000000000301 +:10507000000000080000003FFFD214000000000400 +:10508000000000030000000C00000204000000000B +:105090000101000101010001000000020000000107 +:1050A0006E6F635F66775F707269765F4D656D6F77 +:1050B00072794D61705F70726976406666643234F1 +:1050C0003830300000000003000000080000003FFE +:1050D000FFD248000000000C000000030000000C9C +:1050E0000000020400000000FFF73FFBFFF73FFB5A +:1050F00000000002000000014343555F636F685FDA +:10510000637075305F6279706173735F4F435F46A0 +:1051100069726577616C6C5F6D61696E5F4669721B +:105120006577616C6C40663731303032303000006A +:1051300000000003000000080000003FF71002001C +:105140000000001400000003000000300000020412 +:10515000000000048000FFFFE003FFFF00000008E4 +:105160008000FFFFE003FFFF0000000C8000FFFF56 +:10517000E003FFFF000000108000FFFFE003FFFFDF +:105180000000000200000001736F635F6E6F635FD9 +:1051900066775F6D7066655F6373725F696E737467 +:1051A0005F305F6D7066655F736372406638303282 +:1051B0003030303000000000000000030000000824 +:1051C0000000003FF80200000000001C0000000387 +:1051D00000000018000002040000000000010101AE +:1051E00000010101000000040000000100010101B4 +:1051F0000000000200000001736F635F6E6F635F69 +:1052000066775F6464725F6670676132736472614F +:105210006D5F696E73745F305F6464725F73637235 +:10522000406638303230313030000000000000037A +:10523000000000080000003FF802010000000050DC +:1052400000000003000000E4000002040000000071 +:10525000000000000000000F00000004000000003B +:105260000000000F00000008000000000000000F18 +:105270000000001000000000FFFF0000000000140C +:1052800000000000000000FF000000180000000007 +:10529000FFFF00000000001C00000000000000FFF5 +:1052A0000000002000000000FFFF000000000024BC +:1052B00000000000000000FF0000002800000000C7 +:1052C000FFFF00000000002C00000000000000FFB5 +:1052D0000000003000000000FFFF0000000000346C +:1052E00000000000000000FF000000380000000087 +:1052F000FFFF00000000003C00000000000000FF75 +:105300000000004000000000FFFF0000000000441B +:1053100000000000000000FF000000480000000046 +:10532000FFFF00000000004C00000000000000FF34 +:105330000000000200000001736F635F6D7066651E +:105340005F6E6F635F696E73745F305F6363755F19 +:105350006D656D305F495F6D61696E5F516F734759 +:10536000656E657261746F72406638303232303803 +:105370003000000000000003000000080000003FB3 +:10538000F80220800000001C000000030000003C28 +:1053900000000204000000080000020000000303F7 +:1053A0000000000C000000030000000300000010DB +:1053B00000000BFE00007FFF00000014000000084A +:1053C000000003FF00000018000000000000000FB4 +:1053D0000000000200000002000000016361636839 +:1053E000652D636F6E74726F6C6C657240663730DA +:1053F00030303030300000000000000300000012A8 +:1054000000000000617274657269732C6E636F72C4 +:10541000652D6363750000000000000300000008B4 +:105420000000003FF700000000100900000000022B +:105430000000000200000001616C69617365730087 +:1054400000000003000000160000021A2F736F63B3 +:105450002F73657269616C3040666663303230303C +:1054600030000000000000030000001200000222D3 +:105470002F736F632F737069406666386432303003 +:105480003000000000000002000000016D656D6F3B +:105490007279000000000003000000070000002CEB +:1054A0006D656D6F72790000000000030000002040 +:1054B0000000003F000000000000000000000000AD +:1054C00080000000000000028000000000000001D9 +:1054D0008000000000000003000000040000000B3A +:1054E0000000000200000003000000040000001A99 +:1054F00000000002000000020000000163686F73FA +:10550000656E00000000000300000011000002278B +:1055100073657269616C303A3131353230306E38D2 +:10552000000000000000000300000015000002332E +:105530002F736F632F64776D6D633040666638300C +:10554000383030300000000000000002000000028F +:1055500000000009636F6D70617469626C650023FF +:10556000616464726573732D63656C6C730023737F +:10557000697A652D63656C6C73006D6F64656C0092 +:105580006465766963655F747970650072616E67E2 +:105590006573007265670023636C6F636B2D6365D1 +:1055A0006C6C73007068616E646C65006669666F30 +:1055B0002D6465707468006669666F2D6D6F646533 +:1055C000007265736574730072657365742D6E6126 +:1055D0006D657300636C6F636B7300636C6F636BFB +:1055E0002D6E616D657300696F6D6D7573007374F9 +:1055F00061747573006361702D73642D68696768E9 +:1056000073706565640062726F6B656E2D63640014 +:105610006275732D77696474680064727673656C63 +:1056200000736D706C73656C007265672D6E616DD3 +:105630006573006E616E642D6275732D7769647495 +:1056400068002372657365742D63656C6C7300610B +:105650006C74722C6D6F647273742D6F66667365F3 +:1056600074007265672D7368696674007265672DD2 +:10567000696F2D776964746800636C6F636B2D6666 +:1056800072657175656E63790063646E732C66690B +:10569000666F2D64657074680063646E732C666950 +:1056A000666F2D77696474680063646E732C74721E +:1056B00069676765722D61646472657373007370E6 +:1056C000692D6D61782D6672657175656E637900FF +:1056D0006D3235702C666173742D72656164006380 +:1056E000646E732C706167652D73697A65006364FD +:1056F0006E732C626C6F636B2D73697A65006364E3 +:105700006E732C747368736C2D6E730063646E73A8 +:105710002C74736432642D6E730063646E732C7426 +:10572000636873682D6E730063646E732C74736C9E +:1057300063682D6E73007370692D74782D627573B4 +:105740002D7769647468007370692D72782D6275A5 +:10575000732D776964746800696E74656C2C6F666C +:10576000667365742D73657474696E677300736511 +:105770007269616C300073706930007374646F75A6 +:10578000742D7061746800752D626F6F742C737066 +:0D5790006C2D626F6F742D6F726465720076 +:04000005FFE0000018 +:00000001FF diff --git a/corev_apu/bootrom/ariane.dts b/corev_apu/bootrom/ariane.dts index 9b5b84f145a..3f79380f34d 100644 --- a/corev_apu/bootrom/ariane.dts +++ b/corev_apu/bootrom/ariane.dts @@ -41,7 +41,7 @@ reg = <0x0 0x2000000 0x0 0xc0000>; reg-names = "control"; }; - // PLIC needs to be disabeld for tandem verification + // PLIC needs to be disabled for tandem verification // PLIC0: interrupt-controller@c000000 { // #address-cells = <0>; // #interrupt-cells = <1>; @@ -54,7 +54,7 @@ // }; // Specifying the interrupt controller in the devicetree is not necessary. // Furthermore, the IRQ 65535 will cause a `hwirq 0xffff is too large` during - // Linux boot (occured with mainline linux 5.14.0). + // Linux boot (occurred with mainline linux 5.14.0). // debug-controller@0 { // compatible = "riscv,debug-013"; // interrupts-extended = <&CPU0_intc 65535>; diff --git a/corev_apu/clint/README.md b/corev_apu/clint/README.md index a62fc203b63..9401a5f57d0 100644 --- a/corev_apu/clint/README.md +++ b/corev_apu/clint/README.md @@ -2,7 +2,7 @@ This repository contains a RISC-V privilege spec 1.11 (WIP) compatible CLINT for the Ariane Core. -The CLINT plugs into an existing AXI Bus with an AXI 4 Lite interface. The IP mirrors transaction IDs and is fully pin-compatible with the full AXI 4 interface. It does not support burst transfers (as specified in the AMBA 4 Bus specifcation) +The CLINT plugs into an existing AXI Bus with an AXI 4 Lite interface. The IP mirrors transaction IDs and is fully pin-compatible with the full AXI 4 interface. It does not support burst transfers (as specified in the AXI 4 Bus specification) | Address | Description | Note | |-------------------|-------------|------------------------------------------------| diff --git a/corev_apu/clint/clint.sv b/corev_apu/clint/clint.sv index 2d4dc0536c5..e01ca523864 100644 --- a/corev_apu/clint/clint.sv +++ b/corev_apu/clint/clint.sv @@ -102,7 +102,7 @@ module clint #( end [MTIMECMP_BASE:MTIMECMP_BASE+8*NR_CORES]: begin - if (CVA6Cfg.XLEN == 32) begin + if (CVA6Cfg.IS_XLEN32) begin if (be[3:0] == 4'hf) mtimecmp_n[$unsigned(address[AddrSelWidth-1+3:3])][31:0] = wdata[31:0]; else @@ -114,7 +114,7 @@ module clint #( end [MTIME_BASE:MTIME_BASE+4]: begin - if (CVA6Cfg.XLEN == 32) begin + if (CVA6Cfg.IS_XLEN32) begin if (address[2:0] == 3'h0) mtime_n[31:0] = wdata[31:0]; else begin @@ -137,14 +137,14 @@ module clint #( if (en && !we) begin case (register_address) inside [MSIP_BASE:MSIP_BASE+4*NR_CORES]: begin - if (CVA6Cfg.XLEN == 32) + if (CVA6Cfg.IS_XLEN32) rdata[31:0] = msip_q[$unsigned(address[AddrSelWidth-1+2:2])]; else rdata = msip_q[$unsigned(address[AddrSelWidth-1+2:2])]; end [MTIMECMP_BASE:MTIMECMP_BASE+8*NR_CORES]: begin - if (CVA6Cfg.XLEN == 32) begin + if (CVA6Cfg.IS_XLEN32) begin if (address[2:0] == 3'h0) rdata[31:0] = mtimecmp_q[$unsigned(address[AddrSelWidth-1+3:3])][31:0]; else begin @@ -158,7 +158,7 @@ module clint #( end [MTIME_BASE:MTIME_BASE+4]: begin - if (CVA6Cfg.XLEN == 32) begin + if (CVA6Cfg.IS_XLEN32) begin if (address[2:0] == 3'h0) rdata[31:0] = mtime_q[31:0]; else begin diff --git a/corev_apu/fpga/Makefile b/corev_apu/fpga/Makefile index 678e2244382..370b981a9d6 100644 --- a/corev_apu/fpga/Makefile +++ b/corev_apu/fpga/Makefile @@ -12,6 +12,7 @@ ips := xlnx_axi_clock_converter.xci \ xlnx_axi_quad_spi.xci \ xlnx_axi_gpio.xci \ xlnx_clk_gen.xci \ + xlnx_dpti_clk.xci \ xlnx_mig_7_ddr3.xci ips := $(addprefix $(work-dir)/, $(ips)) diff --git a/corev_apu/fpga/ariane-multi-hart.cfg b/corev_apu/fpga/ariane-multi-hart.cfg index 3f21b8646c7..5f579d4b3d0 100644 --- a/corev_apu/fpga/ariane-multi-hart.cfg +++ b/corev_apu/fpga/ariane-multi-hart.cfg @@ -1,10 +1,10 @@ -adapter_khz 1000 +adapter speed 1000 -interface ftdi -ftdi_vid_pid 0x0403 0x6010 +adapter driver ftdi +ftdi vid_pid 0x0403 0x6010 # Channel 1 is taken by Xilinx JTAG -ftdi_channel 0 +ftdi channel 0 # links: # http://openocd.org/doc-release/html/Debug-Adapter-Configuration.html @@ -16,9 +16,9 @@ ftdi_channel 0 # Bit3 TMS ADBUS3 TMS Out Select Signal Out # Bit4 GPIOL0 ADBUS4 nTRST In/Out General Purpose I/O # this corresponds to the following in/out layout, with TMS initially set to 1 -ftdi_layout_init 0x0018 0x001b +ftdi layout_init 0x0018 0x001b # we only have to specify nTRST, the others are assigned correctly by default -ftdi_layout_signal nTRST -ndata 0x0010 +ftdi layout_signal nTRST -ndata 0x0010 set _CHIPNAME riscv jtag newtap $_CHIPNAME cpu -irlen 5 @@ -26,8 +26,8 @@ jtag newtap $_CHIPNAME cpu -irlen 5 set _TARGETNAME $_CHIPNAME.cpu target create $_TARGETNAME riscv -chain-position $_TARGETNAME -rtos riscv -gdb_report_data_abort enable -gdb_report_register_access_error enable +gdb report_data_abort enable +gdb report_register_access_error enable riscv set_reset_timeout_sec 120 riscv set_command_timeout_sec 120 diff --git a/corev_apu/fpga/ariane.cfg b/corev_apu/fpga/ariane.cfg index 82d3f5abe4e..a9f87f3fe37 100644 --- a/corev_apu/fpga/ariane.cfg +++ b/corev_apu/fpga/ariane.cfg @@ -1,10 +1,10 @@ -adapter_khz 1000 +adapter speed 1000 -interface ftdi -ftdi_vid_pid 0x0403 0x6010 +adapter driver ftdi +ftdi vid_pid 0x0403 0x6010 # Channel 1 is taken by Xilinx JTAG -ftdi_channel 0 +ftdi channel 0 # links: # http://openocd.org/doc-release/html/Debug-Adapter-Configuration.html @@ -16,9 +16,9 @@ ftdi_channel 0 # Bit3 TMS ADBUS3 TMS Out Select Signal Out # Bit4 GPIOL0 ADBUS4 nTRST In/Out General Purpose I/O # this corresponds to the following in/out layout, with TMS initially set to 1 -ftdi_layout_init 0x0018 0x001b +ftdi layout_init 0x0018 0x001b # we only have to specify nTRST, the others are assigned correctly by default -ftdi_layout_signal nTRST -ndata 0x0010 +ftdi layout_signal nTRST -ndata 0x0010 set _CHIPNAME riscv jtag newtap $_CHIPNAME cpu -irlen 5 @@ -26,8 +26,8 @@ jtag newtap $_CHIPNAME cpu -irlen 5 set _TARGETNAME $_CHIPNAME.cpu target create $_TARGETNAME riscv -chain-position $_TARGETNAME -coreid 0 -gdb_report_data_abort enable -gdb_report_register_access_error enable +gdb report_data_abort enable +gdb report_register_access_error enable riscv set_reset_timeout_sec 120 riscv set_command_timeout_sec 120 diff --git a/corev_apu/fpga/ariane_pmod.cfg b/corev_apu/fpga/ariane_pmod.cfg index 21da859932c..9ed8cdfb647 100644 --- a/corev_apu/fpga/ariane_pmod.cfg +++ b/corev_apu/fpga/ariane_pmod.cfg @@ -1,13 +1,13 @@ -adapter_khz 1000 +adapter speed 1000 -interface ftdi +adapter driver ftdi # ftdi_device_desc "Olimex Ltd. ARM-USB-OCD-H JTAG+RS232" -ftdi_vid_pid 0x15ba 0x002b +ftdi vid_pid 0x15ba 0x002b -ftdi_layout_init 0x0808 0x0a1b -ftdi_layout_signal nSRST -oe 0x0200 -ftdi_layout_signal nTRST -data 0x0100 -oe 0x0100 -ftdi_layout_signal LED -data 0x0800 +ftdi layout_init 0x0808 0x0a1b +ftdi layout_signal nSRST -oe 0x0200 +ftdi layout_signal nTRST -data 0x0100 -oe 0x0100 +ftdi layout_signal LED -data 0x0800 set _CHIPNAME riscv jtag newtap $_CHIPNAME cpu -irlen 5 @@ -16,8 +16,8 @@ set _TARGETNAME $_CHIPNAME.cpu # select the HART to debug with the coreid switch target create $_TARGETNAME riscv -chain-position $_TARGETNAME -coreid 0 -gdb_report_data_abort enable -gdb_report_register_access_error enable +gdb report_data_abort enable +gdb report_register_access_error enable riscv set_reset_timeout_sec 120 riscv set_command_timeout_sec 120 diff --git a/corev_apu/fpga/ariane_pmod_tiny.cfg b/corev_apu/fpga/ariane_pmod_tiny.cfg index bc8a500c833..989f4e45977 100644 --- a/corev_apu/fpga/ariane_pmod_tiny.cfg +++ b/corev_apu/fpga/ariane_pmod_tiny.cfg @@ -1,13 +1,13 @@ -adapter_khz 1000 +adapter speed 1000 -interface ftdi -ftdi_device_desc "Olimex OpenOCD JTAG ARM-USB-TINY-H" -ftdi_vid_pid 0x15ba 0x002a +adapter driver ftdi +ftdi device_desc "Olimex OpenOCD JTAG ARM-USB-TINY-H" +ftdi vid_pid 0x15ba 0x002a -ftdi_layout_init 0x0808 0x0a1b -ftdi_layout_signal nSRST -oe 0x0200 -ftdi_layout_signal nTRST -data 0x0100 -oe 0x0100 -ftdi_layout_signal LED -data 0x0800 +ftdi layout_init 0x0808 0x0a1b +ftdi layout_signal nSRST -oe 0x0200 +ftdi layout_signal nTRST -data 0x0100 -oe 0x0100 +ftdi layout_signal LED -data 0x0800 set _CHIPNAME riscv jtag newtap $_CHIPNAME cpu -irlen 5 @@ -16,8 +16,8 @@ set _TARGETNAME $_CHIPNAME.cpu # select the HART to debug with the coreid switch target create $_TARGETNAME riscv -chain-position $_TARGETNAME -coreid 0 -gdb_report_data_abort enable -gdb_report_register_access_error enable +gdb report_data_abort enable +gdb report_register_access_error enable riscv set_reset_timeout_sec 120 riscv set_command_timeout_sec 120 diff --git a/corev_apu/fpga/constraints/ariane.xdc b/corev_apu/fpga/constraints/ariane.xdc index 714bc451cb5..c2b6a138961 100644 --- a/corev_apu/fpga/constraints/ariane.xdc +++ b/corev_apu/fpga/constraints/ariane.xdc @@ -7,7 +7,7 @@ set_input_jitter tck 1.000 set_input_delay -clock tck -clock_fall 5 [get_ports tdi ] set_input_delay -clock tck -clock_fall 5 [get_ports tms ] set_output_delay -clock tck 5 [get_ports tdo ] -set_false_path -from [get_ports trst_n ] +set_false_path -from [get_ports trst_n ] set_max_delay -datapath_only -from [get_pins i_dmi_jtag/i_dmi_cdc/i_cdc_resp/i_src/data_src_q_reg*/C] -to [get_pins i_dmi_jtag/i_dmi_cdc/i_cdc_resp/i_dst/data_dst_q_reg*/D] 20.000 @@ -15,5 +15,30 @@ set_max_delay -datapath_only -from [get_pins i_dmi_jtag/i_dmi_cdc/i_cdc_resp/i_s set_max_delay -datapath_only -from [get_pins i_dmi_jtag/i_dmi_cdc/i_cdc_req/i_dst/ack_dst_q_reg/C] -to [get_pins i_dmi_jtag/i_dmi_cdc/i_cdc_req/i_src/ack_src_q_reg/D] 20.000 # set multicycle path on reset, on the FPGA we do not care about the reset anyway -set_multicycle_path -from [get_pins i_rstgen_main/i_rstgen_bypass/synch_regs_q_reg[3]/C] 4 -set_multicycle_path -from [get_pins i_rstgen_main/i_rstgen_bypass/synch_regs_q_reg[3]/C] 3 -hold +set_multicycle_path -from [get_pins {i_rstgen_main/i_rstgen_bypass/synch_regs_q_reg[3]/C}] 4 +set_multicycle_path -hold -from [get_pins {i_rstgen_main/i_rstgen_bypass/synch_regs_q_reg[3]/C}] 3 + +create_clock -period 16.667 -name prog_clko_pin -waveform {0.000 8.333} [get_ports prog_clko] + +set_input_delay -clock [get_clocks prog_clko_pin] -min -add_delay 1.000 [get_ports {prog_d[*]}] +set_input_delay -clock [get_clocks prog_clko_pin] -max -add_delay 7.150 [get_ports {prog_d[*]}] +set_input_delay -clock [get_clocks prog_clko_pin] -min -add_delay 1.000 [get_ports prog_rxen] +set_input_delay -clock [get_clocks prog_clko_pin] -max -add_delay 7.150 [get_ports prog_rxen] +set_input_delay -clock [get_clocks prog_clko_pin] -min -add_delay 1.000 [get_ports prog_txen] +set_input_delay -clock [get_clocks prog_clko_pin] -max -add_delay 7.150 [get_ports prog_txen] +set_output_delay -clock [get_clocks prog_clko_pin] -min -add_delay 0.400 [get_ports {prog_d[*]}] +set_output_delay -clock [get_clocks prog_clko_pin] -max -add_delay 8.600 [get_ports {prog_d[*]}] +set_output_delay -clock [get_clocks prog_clko_pin] -min -add_delay 0.400 [get_ports prog_oen] +set_output_delay -clock [get_clocks prog_clko_pin] -max -add_delay 8.600 [get_ports prog_oen] +set_output_delay -clock [get_clocks prog_clko_pin] -min -add_delay 0.400 [get_ports prog_rdn] +set_output_delay -clock [get_clocks prog_clko_pin] -max -add_delay 8.600 [get_ports prog_rdn] +set_output_delay -clock [get_clocks prog_clko_pin] -min -add_delay 0.400 [get_ports prog_wrn] +set_output_delay -clock [get_clocks prog_clko_pin] -max -add_delay 8.600 [get_ports prog_wrn] + +set_property IOB TRUE [get_ports {prog_d[*]}] +set_property IOB TRUE [get_ports prog_rxen] +set_property IOB TRUE [get_ports prog_txen] + +set_property DONT_TOUCH true [get_cells i_cva6_rvfi] +set_property DONT_TOUCH true [get_cells i_iti] +set_property DONT_TOUCH true [get_cells i_encapsulator] \ No newline at end of file diff --git a/corev_apu/fpga/constraints/genesys-2.xdc b/corev_apu/fpga/constraints/genesys-2.xdc index 52fd7144526..2a99992571f 100644 --- a/corev_apu/fpga/constraints/genesys-2.xdc +++ b/corev_apu/fpga/constraints/genesys-2.xdc @@ -8,6 +8,47 @@ set_property -dict { PACKAGE_PIN W27 IOSTANDARD LVCMOS33 } [get_ports { tdi set_property -dict { PACKAGE_PIN W28 IOSTANDARD LVCMOS33 } [get_ports { tdo }]; set_property -dict { PACKAGE_PIN W29 IOSTANDARD LVCMOS33 } [get_ports { tms }]; +#PMOD Header JA +set_property -dict {PACKAGE_PIN U27 IOSTANDARD LVCMOS33} [get_ports prog_clko]; #IO_L13P_T2_MRCC_14 +set_property -dict {PACKAGE_PIN U28 IOSTANDARD LVCMOS33} [get_ports prog_oen] +set_property -dict {PACKAGE_PIN T26 IOSTANDARD LVCMOS33} [get_ports prog_rdn] +set_property -dict {PACKAGE_PIN T27 IOSTANDARD LVCMOS33} [get_ports prog_rxen] +set_property -dict {PACKAGE_PIN T22 IOSTANDARD LVCMOS33} [get_ports prog_siwun] +set_property -dict {PACKAGE_PIN T23 IOSTANDARD LVCMOS33} [get_ports prog_spien] +set_property -dict {PACKAGE_PIN T20 IOSTANDARD LVCMOS33} [get_ports prog_txen] +set_property -dict {PACKAGE_PIN T21 IOSTANDARD LVCMOS33} [get_ports prog_wrn] + +#PMOD Header JB +set_property -dict {PACKAGE_PIN V29 IOSTANDARD LVCMOS33} [get_ports {prog_d[0]}] +set_property -dict {PACKAGE_PIN V30 IOSTANDARD LVCMOS33} [get_ports {prog_d[1]}] +set_property -dict {PACKAGE_PIN V25 IOSTANDARD LVCMOS33} [get_ports {prog_d[2]}] +set_property -dict {PACKAGE_PIN W26 IOSTANDARD LVCMOS33} [get_ports {prog_d[3]}] +set_property -dict {PACKAGE_PIN T25 IOSTANDARD LVCMOS33} [get_ports {prog_d[4]}] +set_property -dict {PACKAGE_PIN U25 IOSTANDARD LVCMOS33} [get_ports {prog_d[5]}] +set_property -dict {PACKAGE_PIN U22 IOSTANDARD LVCMOS33} [get_ports {prog_d[6]}] +set_property -dict {PACKAGE_PIN U23 IOSTANDARD LVCMOS33} [get_ports {prog_d[7]}] + + +#PMOD Header JC +# set_property -dict {PACKAGE_PIN AC26 IOSTANDARD LVCMOS33} [get_ports prog_clko] +# set_property -dict {PACKAGE_PIN AJ27 IOSTANDARD LVCMOS33} [get_ports prog_oen] +# set_property -dict {PACKAGE_PIN AH30 IOSTANDARD LVCMOS33} [get_ports prog_rdn] +# set_property -dict {PACKAGE_PIN AK29 IOSTANDARD LVCMOS33} [get_ports prog_rxen] +# set_property -dict {PACKAGE_PIN AD26 IOSTANDARD LVCMOS33} [get_ports prog_siwun] +# set_property -dict {PACKAGE_PIN AG30 IOSTANDARD LVCMOS33} [get_ports prog_spien] +# set_property -dict {PACKAGE_PIN AK30 IOSTANDARD LVCMOS33} [get_ports prog_txen] +# set_property -dict {PACKAGE_PIN AK28 IOSTANDARD LVCMOS33} [get_ports prog_wrn] + +#PMOD Header JD +# set_property -dict {PACKAGE_PIN V27 IOSTANDARD LVCMOS33} [get_ports {prog_d[0]}] +# set_property -dict {PACKAGE_PIN Y30 IOSTANDARD LVCMOS33} [get_ports {prog_d[1]}] +# set_property -dict {PACKAGE_PIN V24 IOSTANDARD LVCMOS33} [get_ports {prog_d[2]}] +# set_property -dict {PACKAGE_PIN W22 IOSTANDARD LVCMOS33} [get_ports {prog_d[3]}] +# set_property -dict {PACKAGE_PIN U24 IOSTANDARD LVCMOS33} [get_ports {prog_d[4]}] +# set_property -dict {PACKAGE_PIN Y26 IOSTANDARD LVCMOS33} [get_ports {prog_d[5]}] +# set_property -dict {PACKAGE_PIN V22 IOSTANDARD LVCMOS33} [get_ports {prog_d[6]}] +# set_property -dict {PACKAGE_PIN W21 IOSTANDARD LVCMOS33} [get_ports {prog_d[7]}] + ## UART set_property -dict {PACKAGE_PIN Y23 IOSTANDARD LVCMOS33} [get_ports tx] set_property -dict {PACKAGE_PIN Y20 IOSTANDARD LVCMOS33} [get_ports rx] diff --git a/corev_apu/fpga/scripts/run.tcl b/corev_apu/fpga/scripts/run.tcl index 9ba9d4e1878..3777b2803bf 100644 --- a/corev_apu/fpga/scripts/run.tcl +++ b/corev_apu/fpga/scripts/run.tcl @@ -37,6 +37,7 @@ read_ip { \ "xilinx/xlnx_axi_gpio/xlnx_axi_gpio.srcs/sources_1/ip/xlnx_axi_gpio/xlnx_axi_gpio.xci" \ "xilinx/xlnx_axi_quad_spi/xlnx_axi_quad_spi.srcs/sources_1/ip/xlnx_axi_quad_spi/xlnx_axi_quad_spi.xci" \ "xilinx/xlnx_clk_gen/xlnx_clk_gen.srcs/sources_1/ip/xlnx_clk_gen/xlnx_clk_gen.xci" \ + "xilinx/xlnx_dpti_clk/xlnx_dpti_clk.srcs/sources_1/ip/xlnx_dpti_clk/xlnx_dpti_clk.xci" \ } # read_ip xilinx/xlnx_protocol_checker/ip/xlnx_protocol_checker.xci @@ -45,7 +46,9 @@ set_property include_dirs { \ "../../vendor/pulp-platform/common_cells/include" \ "../../vendor/pulp-platform/axi/include" \ "../../core/cache_subsystem/hpdcache/rtl/include" \ + "../../core/cache_subsystem/hpdcache/rtl/src/utils/ecc" \ "../register_interface/include" \ + "../instr_tracing/ITI/include" \ "../../core/include" \ } [current_fileset] diff --git a/corev_apu/fpga/src/agilex7.svh b/corev_apu/fpga/src/agilex7.svh index 467ddaf3fee..391bc087397 100644 --- a/corev_apu/fpga/src/agilex7.svh +++ b/corev_apu/fpga/src/agilex7.svh @@ -8,7 +8,7 @@ // CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. -// Description: Set global FPGA degines +// Description: Set global FPGA defines // Author: Florian Zaruba `define AGILEX7 @@ -17,5 +17,5 @@ `define ARIANE_DATA_WIDTH 64 -// Instantiate protocl checker +// Instantiate protocol checker // `define PROTOCOL_CHECKER diff --git a/corev_apu/fpga/src/ariane_xilinx.sv b/corev_apu/fpga/src/ariane_xilinx.sv index 20e77f77c2c..d1ec621e319 100644 --- a/corev_apu/fpga/src/ariane_xilinx.sv +++ b/corev_apu/fpga/src/ariane_xilinx.sv @@ -10,6 +10,9 @@ // Description: Xilinx FPGA top-level // Author: Florian Zaruba +`include "axi/assign.svh" +`include "rvfi_types.svh" +`include "iti_types.svh" module ariane_xilinx ( // WARNING: Do not define input parameters. This causes the FPGA build to fail. @@ -177,11 +180,20 @@ module ariane_xilinx ( output logic spi_ss , output logic spi_clk_o , // common part - // input logic trst_n , + // input logic trst_n , input logic tck , input logic tms , input logic tdi , - output wire tdo , + output wire tdo , + input logic prog_clko , + input logic prog_rxen , + input logic prog_txen , + input logic prog_spien , + output logic prog_rdn , + output logic prog_wrn , + output logic prog_oen , + output logic prog_siwun , + inout logic [7:0] prog_d , input logic rx , output logic tx ); @@ -199,11 +211,17 @@ endfunction // CVA6 Xilinx configuration localparam config_pkg::cva6_cfg_t CVA6Cfg = build_fpga_config(cva6_config_pkg::cva6_cfg); +localparam type rvfi_instr_t = `RVFI_INSTR_T(CVA6Cfg); +//localparam type rvfi_csr_elmt_t = `RVFI_CSR_ELMT_T(CVA6Cfg); +//localparam type rvfi_csr_t = `RVFI_CSR_T(CVA6Cfg, rvfi_csr_elmt_t); +localparam type rvfi_to_iti_t = `RVFI_TO_ITI_T(CVA6Cfg); +localparam type iti_to_encoder_t = `ITI_TO_ENCODER_T(CVA6Cfg); + localparam type rvfi_probes_instr_t = `RVFI_PROBES_INSTR_T(CVA6Cfg); localparam type rvfi_probes_csr_t = `RVFI_PROBES_CSR_T(CVA6Cfg); localparam type rvfi_probes_t = struct packed { logic csr; - logic instr; + rvfi_probes_instr_t instr; }; // 24 MByte in 8 byte words @@ -462,7 +480,7 @@ axi2mem #( .data_i ( dm_slave_rdata ) ); -if (CVA6Cfg.XLEN==32 ) begin +if (CVA6Cfg.IS_XLEN32) begin assign master_to_dm[0].aw_user = '0; assign master_to_dm[0].w_user = '0; @@ -616,7 +634,7 @@ end logic [1:0] axi_adapter_size; -assign axi_adapter_size = (CVA6Cfg.XLEN == 64) ? 2'b11 : 2'b10; +assign axi_adapter_size = CVA6Cfg.IS_XLEN64 ? 2'b11 : 2'b10; axi_adapter #( .CVA6Cfg ( CVA6Cfg ), @@ -645,7 +663,7 @@ axi_adapter #( .axi_resp_i ( dm_axi_m_resp ) ); -if (CVA6Cfg.XLEN==32 ) begin +if (CVA6Cfg.IS_XLEN32) begin logic [31 : 0] dm_master_m_awaddr; logic [31 : 0] dm_master_m_araddr; @@ -753,6 +771,11 @@ end // --------------- ariane_axi::req_t axi_ariane_req; ariane_axi::resp_t axi_ariane_resp; +rvfi_probes_t rvfi_probes; + +rvfi_instr_t [CVA6Cfg.NrCommitPorts-1:0] rvfi_instr; +rvfi_to_iti_t rvfi_to_iti; +iti_to_encoder_t iti_to_encoder; ariane #( .CVA6Cfg ( CVA6Cfg ), @@ -767,7 +790,7 @@ ariane #( .irq_i ( irq ), .ipi_i ( ipi ), .time_irq_i ( timer_irq ), - .rvfi_probes_o( /* open */ ), + .rvfi_probes_o( rvfi_probes ), .debug_req_i ( debug_req_irq ), .noc_req_o ( axi_ariane_req ), .noc_resp_i ( axi_ariane_resp ) @@ -776,6 +799,136 @@ ariane #( `AXI_ASSIGN_FROM_REQ(slave[0], axi_ariane_req) `AXI_ASSIGN_TO_RESP(axi_ariane_resp, slave[0]) + cva6_rvfi #( + .CVA6Cfg (CVA6Cfg), + .rvfi_instr_t(rvfi_instr_t), + .rvfi_csr_t(), + .rvfi_probes_instr_t(rvfi_probes_instr_t), + .rvfi_probes_csr_t(rvfi_probes_csr_t), + .rvfi_probes_t(rvfi_probes_t), + .rvfi_to_iti_t(rvfi_to_iti_t) + ) i_cva6_rvfi ( + .clk_i (clk), + .rst_ni (ndmreset_n), + .rvfi_probes_i(rvfi_probes), + .rvfi_instr_o (rvfi_instr), + .rvfi_to_iti_o (rvfi_to_iti), + .rvfi_csr_o () + ); + + + cva6_iti #( + .CVA6Cfg (CVA6Cfg), + .CAUSE_LEN (iti_pkg::CAUSE_LEN), + .ITYPE_LEN (iti_pkg::ITYPE_LEN), + .IRETIRE_LEN (iti_pkg::IRETIRE_LEN), + .block_mode(0), + .rvfi_to_iti_t(rvfi_to_iti_t), + .iti_to_encoder_t(iti_to_encoder_t) + ) i_iti ( + .clk_i (clk), + .rst_ni (ndmreset_n), + // inputs from rvfi + .valid_i(rvfi_to_iti.valid), + .rvfi_to_iti_i(rvfi_to_iti), + // outputs for the encoder module TODO + .valid_o(), + .iti_to_encoder_o(iti_to_encoder) + ); + + logic packet_valid; + te_pkg::it_packet_type_e [0:0] packet_type; + logic [te_pkg::P_LEN-1:0] packet_length; + logic [te_pkg::PAYLOAD_LEN-1:0] packet_payload; + + rv_tracer #( + .N(1), + .ONLY_BRANCHES(1) + )i_encoder( + .clk_i (clk), + .rst_ni (ndmreset_n), + .valid_i (iti_to_encoder.valid), + .itype_i (iti_to_encoder.itype), + .cause_i (iti_to_encoder.cause), + .tval_i (iti_to_encoder.tval), + .priv_i (iti_to_encoder.priv), + .iaddr_i (iti_to_encoder.iaddr), + .iretire_i (iti_to_encoder.iretire), + .ilastsize_i (iti_to_encoder.ilastsize), + .time_i (iti_to_encoder.cycles), + .tvec_i ('0), + .epc_i ('0), + .encapsulator_ready_i('1), + .paddr_i ('0), + .pwrite_i ('0), + .psel_i ('0), + .penable_i ('0), + .pwdata_i ('0), + .packet_valid_o (packet_valid), + .packet_type_o (packet_type), + .packet_length_o (packet_length), + .packet_payload_o (packet_payload), + .stall_o (), + .pready_o (), + .prdata_o () + ); + + logic encap_valid; + encap_pkg::encap_fifo_entry_s encap_fifo_entry_i; + encap_pkg::encap_fifo_entry_s encap_fifo_entry_o; + logic encap_fifo_full; + logic encap_fifo_empty; + logic encap_fifo_pop; + + encapsulator i_encapsulator ( + .clk_i (clk), + .valid_i (packet_valid), + .packet_length_i (packet_length), + .flow_i ('0), + .timestamp_present_i('1), + //.srcid_i(), + .timestamp_i (rvfi_to_iti.cycles), + //.type_i(), + .trace_payload_i (packet_payload), + .valid_o (encap_valid), + .encap_fifo_entry_o (encap_fifo_entry_i) + ); + + fifo_v3 # ( + .DEPTH(16), + .dtype(encap_pkg::encap_fifo_entry_s) + ) i_fifo_encap ( + .clk_i (clk), + .rst_ni (ndmreset_n), + .flush_i ('0), + .testmode_i('0), + .full_o (encap_fifo_full), + .empty_o (encap_fifo_empty), + .usage_o (), + .data_i (encap_fifo_entry_i), + .push_i (encap_valid), + .data_o (encap_fifo_entry_o), + .pop_i (encap_fifo_pop) + ); + + localparam DATA_LEN = 8; + logic valid_slice; + logic [DATA_LEN-1:0] slice; + logic [$clog2(DATA_LEN)-4:0] valid_bytes; + + slicer_DPTI #( + .SLICE_LEN(DATA_LEN), + .NO_TIME ('0) + ) i_slicer ( + .clk_i (clk), + .rst_ni (ndmreset_n), + .valid_i (!encap_fifo_empty), + .encap_fifo_entry_i(encap_fifo_entry_o), + .fifo_full_i (usrFull), // usrFull DPTI + .valid_o (valid_slice), + .slice_o (slice), + .done_o (encap_fifo_pop) + ); // --------------- // CLINT // --------------- @@ -833,7 +986,7 @@ axi2mem #( .data_i ( rom_rdata ) ); -if (CVA6Cfg.XLEN==32 ) begin +if (CVA6Cfg.IS_XLEN32) begin bootrom_32 i_bootrom ( .clk_i ( clk ), .req_i ( rom_req ), @@ -848,7 +1001,67 @@ end else begin .rdata_o ( rom_rdata ) ); end +// --------------- +// DPTI +// --------------- +logic FifoEn ; +logic usrFull ; +logic usrEmpty ; +logic [7:0] w_data; +logic [7:0] r_data; + +logic [11:0] w_count; +logic [11:0] r_count; + +logic prog_rxen_debug; +logic prog_txen_debug; +logic prog_spien_debug; +logic prog_rdn_debug; +logic prog_wrn_debug; +logic prog_oen_debug; +logic prog_siwun_debug; + +assign prog_rxen_debug = prog_rxen; +assign prog_txen_debug = prog_txen; +assign prog_spien_debug = prog_spien; +assign prog_rdn_debug = prog_rdn; +assign prog_wrn_debug = prog_wrn; +assign prog_oen_debug = prog_oen; +assign prog_siwun_debug = prog_siwun; + +//assign w_data = {iti_to_encoder.itype[0],iti_to_encoder.itype[1],iti_to_encoder.valid} ; + +assign FifoEn = !usrFull && !usrEmpty; + dpti_ctrl i_dpti_ctrl ( + .wr_clk (clk), + .wr_en (valid_slice), + .wr_full(usrFull), + .wr_afull(), + .wr_err(), + .wr_count(w_count), + .wr_di(slice), + + .rd_clk(clk), + .rd_en(FifoEn), + .rd_empty(usrEmpty), + .rd_aempty(), + .rd_err (), + .rd_count(r_count), + .rd_do(r_data), + + .rst(rst), + + .prog_clko(prog_clko), + .prog_rxen(prog_rxen), + .prog_txen(prog_txen), + .prog_spien('0), + .prog_rdn(prog_rdn), + .prog_wrn(prog_wrn), + .prog_oen(prog_oen), + .prog_siwun(prog_siwun), + .prog_d(prog_d) +); // --------------- // Peripherals // --------------- diff --git a/corev_apu/fpga/src/axi_dw_adapter/axi_dw_adapter_rd.v b/corev_apu/fpga/src/axi_dw_adapter/axi_dw_adapter_rd.v index 55afcfc5842..dac48d9c209 100644 --- a/corev_apu/fpga/src/axi_dw_adapter/axi_dw_adapter_rd.v +++ b/corev_apu/fpga/src/axi_dw_adapter/axi_dw_adapter_rd.v @@ -135,12 +135,12 @@ parameter SEGMENT_STRB_WIDTH = STRB_WIDTH / SEGMENT_COUNT; // bus width assertions initial begin if (S_WORD_SIZE * S_STRB_WIDTH != S_DATA_WIDTH) begin - $error("Error: AXI slave interface data width not evenly divisble (instance %m)"); + $error("Error: AXI slave interface data width not evenly divisible (instance %m)"); $finish; end if (M_WORD_SIZE * M_STRB_WIDTH != M_DATA_WIDTH) begin - $error("Error: AXI master interface data width not evenly divisble (instance %m)"); + $error("Error: AXI master interface data width not evenly divisible (instance %m)"); $finish; end diff --git a/corev_apu/fpga/src/axi_dw_adapter/axi_dw_adapter_wr.v b/corev_apu/fpga/src/axi_dw_adapter/axi_dw_adapter_wr.v index 881495c706a..98bc95aa8a3 100644 --- a/corev_apu/fpga/src/axi_dw_adapter/axi_dw_adapter_wr.v +++ b/corev_apu/fpga/src/axi_dw_adapter/axi_dw_adapter_wr.v @@ -147,12 +147,12 @@ parameter SEGMENT_STRB_WIDTH = STRB_WIDTH / SEGMENT_COUNT; // bus width assertions initial begin if (S_WORD_SIZE * S_STRB_WIDTH != S_DATA_WIDTH) begin - $error("Error: AXI slave interface data width not evenly divisble (instance %m)"); + $error("Error: AXI slave interface data width not evenly divisible (instance %m)"); $finish; end if (M_WORD_SIZE * M_STRB_WIDTH != M_DATA_WIDTH) begin - $error("Error: AXI master interface data width not evenly divisble (instance %m)"); + $error("Error: AXI master interface data width not evenly divisible (instance %m)"); $finish; end diff --git a/corev_apu/fpga/src/bootrom/Makefile b/corev_apu/fpga/src/bootrom/Makefile index 81679948f26..e1fa839ae24 100644 --- a/corev_apu/fpga/src/bootrom/Makefile +++ b/corev_apu/fpga/src/bootrom/Makefile @@ -8,6 +8,13 @@ CLOCK_FREQUENCY ?= 25000000 #25MHz HALF_CLOCK_FREQUENCY ?= 12500000 #12.5MHz UART_BITRATE ?= 57600 HAS_ETHERNET ?= 0 +else ifeq ($(PLATFORM), PLAT_AGILEX) +DRAM_SIZE_64 ?= 0x40000000 #1GB +DRAM_SIZE_32 ?= 0x08000000 #128MB +CLOCK_FREQUENCY ?= 100000000 #100MHz +HALF_CLOCK_FREQUENCY ?= 50000000 #50MHz +UART_BITRATE ?= 115200 +HAS_ETHERNET ?= 1 else DRAM_SIZE_64 ?= 0x40000000 #1GB DRAM_SIZE_32 ?= 0x08000000 #128MB @@ -17,10 +24,12 @@ UART_BITRATE ?= 115200 HAS_ETHERNET ?= 1 endif -CC = $(RISCV)/bin/${CROSSCOMPILE}gcc -OBJCOPY = $(RISCV)/bin/$(CROSSCOMPILE)objcopy +ifeq ($(CC),cc) + CC = $(RISCV)/bin/${CROSSCOMPILE}gcc + OBJCOPY = $(RISCV)/bin/$(CROSSCOMPILE)objcopy +endif SED = sed -PLATFORM_DEFINES = -DCLOCK_FREQUENCY=$(CLOCK_FREQUENCY) -DUART_BITRATE=$(UART_BITRATE) -D$(PLATFORM) +PLATFORM_DEFINES = -DCLOCK_FREQUENCY=$(CLOCK_FREQUENCY) -DUART_BITRATE=$(UART_BITRATE) -D$(PLATFORM) -DXLEN=$(XLEN) ifeq ($(XLEN), 64) CFLAGS = $(PLATFORM_DEFINES) -Os -ggdb -march=rv64im_zicsr -mabi=lp64 -Wall -mcmodel=medany -mexplicit-relocs -ffreestanding @@ -33,7 +42,7 @@ LDFLAGS = -nostdlib -nodefaultlibs -nostartfiles INCLUDES = -I./ -I./src -SRCS_C = src/main.c src/uart.c src/spi.c src/sd.c src/gpt.c +SRCS_C = src/main.c src/uart.c src/spi.c src/sd.c src/gpt.c src/dw_mmc.c src/bouncebuf.c SRCS_ASM = startup.S OBJS_C = $(SRCS_C:.c=.o) OBJS_S = $(SRCS_ASM:.S=.o) @@ -43,7 +52,11 @@ MAIN_BIN = $(MAIN:.elf=.bin) MAIN_IMG = $(MAIN:.elf=.img) MAIN_SV = $(MAIN:.elf=.sv) +ifeq ($(PLATFORM), PLAT_AGILEX) +DTB = cv$(XLEN)a6_agilex.dtb +else DTB = cv$(XLEN)a6.dtb +endif ifeq ($(HAS_ETHERNET), 1) SED_DELETE_OPT = -e "/DELETE_ETH/d" @@ -65,12 +78,12 @@ $(MAIN): $(DTB) $(OBJS_C) $(OBJS_S) linker.lds $(OBJCOPY) -O binary $< $@ %.o: %.c - @$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ @echo "CC <= $<" + @$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ %.o: %.S - @$(CC) $(CFLAGS) $(CCASFLAGS) $(INCLUDES) -c $< -o $@ @echo "CC <= $<" + @$(CC) $(CFLAGS) $(CCASFLAGS) $(INCLUDES) -c $< -o $@ %.dts: %.dts.in $(SED) -e "s/DRAM_SIZE_64/$(DRAM_SIZE_64)/g" \ @@ -82,11 +95,11 @@ $(MAIN): $(DTB) $(OBJS_C) $(OBJS_S) linker.lds cat $@ %.dtb: %.dts - dtc -I dts $< -O dtb -o $@ + dtc -I dts $< -O dtb -o cv$(XLEN)a6.dtb %.sv: %.img - ./gen_rom.py $< @echo "PYTHON >= $(MAIN_SV)" + ./gen_rom.py $< clean: $(RM) $(OBJS_C) $(OBJS_S) $(MAIN) $(MAIN_BIN) $(MAIN_IMG) *.dtb *.dts *.sv diff --git a/corev_apu/fpga/src/bootrom/cv32a6.dts.in b/corev_apu/fpga/src/bootrom/cv32a6.dts.in index 314a7b069e5..c607836128f 100644 --- a/corev_apu/fpga/src/bootrom/cv32a6.dts.in +++ b/corev_apu/fpga/src/bootrom/cv32a6.dts.in @@ -64,7 +64,7 @@ }; // Specifying the interrupt controller in the devicetree is not necessary. // Furthermore, the IRQ 65535 will cause a `hwirq 0xffff is too large` during - // Linux boot (occured with mainline linux 5.14.0). + // Linux boot (occurred with mainline linux 5.14.0). // debug-controller@0 { // compatible = "riscv,debug-013"; // interrupts-extended = <&CPU0_intc 65535>; diff --git a/corev_apu/fpga/src/bootrom/cv32a6_agilex.dts.in b/corev_apu/fpga/src/bootrom/cv32a6_agilex.dts.in new file mode 100644 index 00000000000..d905323ff62 --- /dev/null +++ b/corev_apu/fpga/src/bootrom/cv32a6_agilex.dts.in @@ -0,0 +1,101 @@ +// Copyright (c) 2025 PlanV Technologies +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + compatible = "eth,ariane-bare-dev"; + model = "eth,ariane-bare"; + chosen { + stdout-path = "/soc/uart@10000000:UART_BITRATE"; + }; + cpus { + #address-cells = <1>; + #size-cells = <0>; + timebase-frequency = ; + CPU0: cpu@0 { + clock-frequency = ; + device_type = "cpu"; + reg = <0>; + status = "okay"; + compatible = "eth, ariane", "riscv"; + riscv,isa = "rv32ima"; + mmu-type = "riscv,sv32"; + tlb-split; + // HLIC - hart local interrupt controller + CPU0_intc: interrupt-controller { + #interrupt-cells = <1>; + interrupt-controller; + compatible = "riscv,cpu-intc"; + }; + }; + }; + memory@80000000 { + device_type = "memory"; + reg = <0x80000000 DRAM_SIZE_32>; + }; + L26: soc { + #address-cells = <1>; + #size-cells = <1>; + compatible = "eth,ariane-bare-soc", "simple-bus"; + ranges; + clint@2000000 { + compatible = "riscv,clint0"; + interrupts-extended = <&CPU0_intc 3 &CPU0_intc 7>; + reg = <0x2000000 0xc0000>; + reg-names = "control"; + }; + PLIC0: interrupt-controller@c000000 { + #address-cells = <0>; + #interrupt-cells = <1>; + compatible = "riscv,plic0"; + interrupt-controller; + interrupts-extended = <&CPU0_intc 11 &CPU0_intc 9>; + reg = <0xc000000 0x4000000>; + riscv,max-priority = <7>; + riscv,ndev = <30>; + }; + // Specifying the interrupt controller in the devicetree is not necessary. + // Furthermore, the IRQ 65535 will cause a `hwirq 0xffff is too large` during + // Linux boot (occured with mainline linux 5.14.0). + // debug-controller@0 { + // compatible = "riscv,debug-013"; + // interrupts-extended = <&CPU0_intc 65535>; + // reg = <0x0 0x1000>; + // reg-names = "control"; + // }; + uart@10000000 { + compatible = "ns16550a"; + reg = < 0x10000000 0x1000>; + clock-frequency = ; + current-speed = ; + interrupt-parent = <&PLIC0>; + interrupts = <1>; + reg-shift = <0>; // regs are spaced on 32 bit boundary + reg-io-width = <1>; // only 32-bit access are supported + }; + timer@18000000 { + compatible = "pulp,apb_timer"; + interrupts = <0x00000004 0x00000005 0x00000006 0x00000007>; + reg = <0x18000000 0x00001000>; + interrupt-parent = <&PLIC0>; + reg-names = "control"; + }; + sysmgr: sysmgr@ffd12000 { + compatible = "altr,sys-mgr-s10","altr,sys-mgr"; + reg = <0xffd12000 0x500>; + }; + mmc: mmc@ff808000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "altr,socfpga-dw-mshc"; + reg = <0xff808000 0x1000>; + fifo-depth = <0x400>; + altr,sysmgr-syscon = <&sysmgr 0x28 4>; + status = "disabled"; + }; + }; +}; +// delete ethernet device if disabled +/delete-node/ ð // DELETE_ETH diff --git a/corev_apu/fpga/src/bootrom/cv64a6.dts.in b/corev_apu/fpga/src/bootrom/cv64a6.dts.in index eb8134d78d3..6f0095ae27d 100644 --- a/corev_apu/fpga/src/bootrom/cv64a6.dts.in +++ b/corev_apu/fpga/src/bootrom/cv64a6.dts.in @@ -64,7 +64,7 @@ }; // Specifying the interrupt controller in the devicetree is not necessary. // Furthermore, the IRQ 65535 will cause a `hwirq 0xffff is too large` during - // Linux boot (occured with mainline linux 5.14.0). + // Linux boot (occurred with mainline linux 5.14.0). // debug-controller@0 { // compatible = "riscv,debug-013"; // interrupts-extended = <&CPU0_intc 65535>; diff --git a/corev_apu/fpga/src/bootrom/cv64a6_agilex.dts.in b/corev_apu/fpga/src/bootrom/cv64a6_agilex.dts.in new file mode 100644 index 00000000000..4968db46e55 --- /dev/null +++ b/corev_apu/fpga/src/bootrom/cv64a6_agilex.dts.in @@ -0,0 +1,103 @@ +// Copyright (c) 2025 PlanV Technologies +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +/dts-v1/; + +/ { + #address-cells = <2>; + #size-cells = <2>; + compatible = "eth,ariane-bare-dev"; + model = "eth,ariane-bare"; + chosen { + stdout-path = "/soc/uart@10000000:UART_BITRATE"; + }; + cpus { + #address-cells = <1>; + #size-cells = <0>; + timebase-frequency = ; + CPU0: cpu@0 { + clock-frequency = ; + device_type = "cpu"; + reg = <0>; + status = "okay"; + compatible = "eth, ariane", "riscv"; + riscv,isa = "rv64imafdc"; + mmu-type = "riscv,sv39"; + tlb-split; + // HLIC - hart local interrupt controller + CPU0_intc: interrupt-controller { + #interrupt-cells = <1>; + interrupt-controller; + compatible = "riscv,cpu-intc"; + }; + }; + }; + memory@80000000 { + device_type = "memory"; + reg = <0x0 0x80000000 0x0 DRAM_SIZE_64>; + }; + L26: soc { + #address-cells = <2>; + #size-cells = <2>; + compatible = "eth,ariane-bare-soc", "simple-bus"; + ranges; + clint@2000000 { + compatible = "riscv,clint0"; + interrupts-extended = <&CPU0_intc 3 &CPU0_intc 7>; + reg = <0x0 0x2000000 0x0 0xc0000>; + reg-names = "control"; + }; + PLIC0: interrupt-controller@c000000 { + #address-cells = <0>; + #interrupt-cells = <1>; + compatible = "riscv,plic0"; + interrupt-controller; + interrupts-extended = <&CPU0_intc 11 &CPU0_intc 9>; + reg = <0x0 0xc000000 0x0 0x4000000>; + riscv,max-priority = <7>; + riscv,ndev = <30>; + }; + // Specifying the interrupt controller in the devicetree is not necessary. + // Furthermore, the IRQ 65535 will cause a `hwirq 0xffff is too large` during + // Linux boot (occured with mainline linux 5.14.0). + // debug-controller@0 { + // compatible = "riscv,debug-013"; + // interrupts-extended = <&CPU0_intc 65535>; + // reg = <0x0 0x0 0x0 0x1000>; + // reg-names = "control"; + // }; + uart@10000000 { + compatible = "ns16550a"; + reg = <0x0 0x10000000 0x0 0x1000>; + clock-frequency = ; + current-speed = ; + interrupt-parent = <&PLIC0>; + interrupts = <1>; + reg-shift = <0>; // regs are spaced on 32 bit boundary + reg-io-width = <1>; // only 32-bit access are supported + }; + timer@18000000 { + compatible = "pulp,apb_timer"; + interrupts = <0x00000004 0x00000005 0x00000006 0x00000007>; + reg = <0x00000000 0x18000000 0x00000000 0x00001000>; + interrupt-parent = <&PLIC0>; + reg-names = "control"; + }; + sysmgr: sysmgr@ffd12000 { + compatible = "altr,sys-mgr-s10","altr,sys-mgr"; + reg = <0xffd12000 0x500>; + }; + mmc: mmc@ff808000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "altr,socfpga-dw-mshc"; + reg = <0xff808000 0x1000>; + fifo-depth = <0x400>; + altr,sysmgr-syscon = <&sysmgr 0x28 4>; + status = "disabled"; + }; + + + }; +}; +// delete ethernet device if disabled +/delete-node/ ð // DELETE_ETH diff --git a/corev_apu/fpga/src/bootrom/src/bootrom_errno.h b/corev_apu/fpga/src/bootrom/src/bootrom_errno.h new file mode 100644 index 00000000000..4c04274a693 --- /dev/null +++ b/corev_apu/fpga/src/bootrom/src/bootrom_errno.h @@ -0,0 +1,25 @@ +// Copyright (c) 2025 Thales Research and Technology +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +/** + * \file bootrom_errno.h + * \brief Contains error numbers useful for our bootrom. + * \author Julien Mallet +*/ + +#ifndef BOOTROM_ERRNO_H +#define BOOTROM_ERRNO_H + + +#define EIO 5 /* I/O error */ +#define EBUSY 16 /* Device or resource busy */ +#define EINVAL 22 /* Invalid argument */ +#define ECOMM 70 /* Communication error on send */ +#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ +#define ETIMEDOUT 110 /* Connection timed out */ + +#define ENOTSUPP 255 /* Operation is not supported */ + +#ifndef ENOMEM +#define ENOMEM 12 +#endif +#endif \ No newline at end of file diff --git a/corev_apu/fpga/src/bootrom/src/bootrom_io.h b/corev_apu/fpga/src/bootrom/src/bootrom_io.h new file mode 100644 index 00000000000..5c4a0798201 --- /dev/null +++ b/corev_apu/fpga/src/bootrom/src/bootrom_io.h @@ -0,0 +1,50 @@ +// Copyright (c) 2025 Thales Research and Technology +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +/** + * \file bootrom_io.h + * \brief Contains the functions for reading and writing registers. + * \author Julien Mallet +*/ + +#ifndef BOOTROM_IO_H +#define BOOTROM_IO_H + +// Generic I/O + +#include "bootrom_types.h" +#include + + +static inline u8_t readb(volatile u32_t addr) +{ + return *(volatile u8_t *)(addr); +} + +static inline u16_t readw(volatile u32_t addr) +{ + return *(volatile u16_t *)(addr); +} + +static inline u32_t readl(volatile u32_t addr) +{ + return *(volatile u32_t *)(addr); +} + + +static inline void writeb(u8_t val, volatile u32_t addr) +{ + *(volatile u8_t *)(addr) = val; +} + +static inline void writew(u16_t val, volatile u32_t addr) +{ + *(volatile u16_t *)(addr) = val; +} + +static inline void writel(u32_t val, volatile u32_t addr) +{ + *(volatile u32_t *)(addr) = val; +} + + +#endif \ No newline at end of file diff --git a/corev_apu/fpga/src/bootrom/src/bootrom_time.h b/corev_apu/fpga/src/bootrom/src/bootrom_time.h new file mode 100644 index 00000000000..94f1b2d43d4 --- /dev/null +++ b/corev_apu/fpga/src/bootrom/src/bootrom_time.h @@ -0,0 +1,24 @@ +// Copyright (c) 2025 Thales Research and Technology +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +/** + * \file bootrom_time.h + * \brief Contains a custom udelay function. It is a software wait with a loop that does not uses any hardware timer or any pre-existing timer. As such, the duration is not accurate at all. udelay(5) will not be a 5 microsecond wait. This solution is however good enough for our bootrom as it keeps the code small and still does a decent wait. + * \author Julien Mallet +*/ + +#ifndef BOOTROM_TIME_H +#define BOOTROM_TIME_H + +#include "bootrom_types.h" + +// #define UDELAY(nr_us) for(volatile unsigned int count=0 ; count<50*nr_us ; count++){} + +void udelay(u32_t nr_us) +{ + volatile u32_t count = 0; + for(count = 0 ; count < 1*nr_us; ++count) + {} +} + + +#endif \ No newline at end of file diff --git a/corev_apu/fpga/src/bootrom/src/bootrom_types.h b/corev_apu/fpga/src/bootrom/src/bootrom_types.h new file mode 100644 index 00000000000..cf62caaedcb --- /dev/null +++ b/corev_apu/fpga/src/bootrom/src/bootrom_types.h @@ -0,0 +1,29 @@ +// Copyright (c) 2025 Thales Research and Technology +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +/** + * \file bootrom_types.h + * \brief Contains custom types which show their size. + * \author Julien Mallet + * +*/ + +#ifndef BOOTROM_TYPES_H +#define BOOTROM_TYPES_H + + +typedef __signed__ char s8_t; +typedef unsigned char u8_t; + +typedef __signed__ short s16_t; +typedef unsigned short u16_t; + +typedef __signed__ int s32_t; +typedef unsigned int u32_t; + +typedef __signed__ long long s64_t; +typedef unsigned long long u64_t; + +typedef unsigned long int uptr_t; + + +#endif \ No newline at end of file diff --git a/corev_apu/fpga/src/bootrom/src/bouncebuf.c b/corev_apu/fpga/src/bootrom/src/bouncebuf.c new file mode 100644 index 00000000000..1eda2edc089 --- /dev/null +++ b/corev_apu/fpga/src/bootrom/src/bouncebuf.c @@ -0,0 +1,131 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Generic bounce buffer implementation + * + * Copyright (C) 2012 Marek Vasut + */ + +// #include +// #include +// #include +// #include +// #include +#include "bouncebuf.h" +#include "cache.h" +#include "dma-mapping.h" +#include "uart.h" +#include "bootrom_errno.h" +#include + +// void flush_dcache_range(unsigned long start, unsigned long end) +// { +// if (start >= end) +// return; + +// /* +// * ARCv1 -> call __dc_line_op +// * ARCv2 && L1 D$ disabled -> nothing +// * ARCv2 && L1 D$ enabled && IOC enabled -> nothing +// * ARCv2 && L1 D$ enabled && no IOC -> call __dc_line_op; call __slc_rgn_op +// */ +// // if (!_config_enabled(CONFIG_ISA_ARCV2,0)|| !ioc_enabled()) +// __dc_line_op(start, end - start, OP_FLUSH); + +// // if (_config_enabled(CONFIG_ISA_ARCV2,0) && !ioc_enabled() && !slc_data_bypass()) +// // __slc_rgn_op(start, end - start, OP_FLUSH); +// } + +static int addr_aligned(struct bounce_buffer *state) +{ + const unsigned long align_mask = ARCH_DMA_MINALIGN - 1; + + /* Check if start is aligned */ + if ((unsigned long)state->user_buffer & align_mask) { + print_uart("Unaligned buffer address "); + print_uart_int(state->user_buffer); + print_uart("align mask"); + print_uart_int(align_mask); + print_uart("(unsigned long)state->user_buffer & align_mask"); + print_uart_int((unsigned long)state->user_buffer & align_mask); + print_uart("\n"); + return 0; + } + + /* Check if length is aligned */ + if (state->len != state->len_aligned) { + print_uart("Unaligned buffer length"); + print_uart_int(state->len); + print_uart("\n"); + return 0; + } + + /* Aligned */ + return 1; +} + +int bounce_buffer_start_extalign(struct bounce_buffer *state, void *data, + u32_t len, unsigned int flags, + u32_t alignment, + int (*addr_is_aligned)(struct bounce_buffer *state)) +{ + state->user_buffer = data; + state->bounce_buffer = data; + state->len = len; + state->len_aligned = roundup(len, alignment); + state->flags = flags; + + // if (!addr_is_aligned(state)) { + // print_uart("call mem align \n"); + // state->bounce_buffer = memalign(alignment, + // state->len_aligned); + // if (!state->bounce_buffer){ + // print_uart("return enomem \n"); + // return -ENOMEM; + // } + + // if (state->flags & GEN_BB_READ){ + // print_uart("memcpy \n"); + // memcpy(state->bounce_buffer, state->user_buffer, + // state->len); + // } + // } + + /* + * Flush data to RAM so DMA reads can pick it up, + * and any CPU writebacks don't race with DMA writes + */ + print_uart("dma map single\n"); + dma_map_single(state->bounce_buffer, + state->len_aligned, + DMA_BIDIRECTIONAL); + print_uart("return 0\n"); + return 0; +} + +int bounce_buffer_start(struct bounce_buffer *state, void *data, + u32_t len, unsigned int flags) +{ + return bounce_buffer_start_extalign(state, data, len, flags, + ARCH_DMA_MINALIGN, + addr_aligned); +} + +int bounce_buffer_stop(struct bounce_buffer *state) +{ + if (state->flags & GEN_BB_WRITE) { + /* Invalidate cache so that CPU can see any newly DMA'd data */ + dma_unmap_single((dma_addr_t)(uintptr_t)state->bounce_buffer, + state->len_aligned, + DMA_BIDIRECTIONAL); + } + + if (state->bounce_buffer == state->user_buffer) + return 0; + + // if (state->flags & GEN_BB_WRITE) + // memcpy(state->user_buffer, state->bounce_buffer, state->len); + + // free(state->bounce_buffer); + + return 0; +} diff --git a/corev_apu/fpga/src/bootrom/src/bouncebuf.h b/corev_apu/fpga/src/bootrom/src/bouncebuf.h new file mode 100644 index 00000000000..6ff99e68091 --- /dev/null +++ b/corev_apu/fpga/src/bootrom/src/bouncebuf.h @@ -0,0 +1,87 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Generic bounce buffer implementation + * + * Copyright (C) 2012 Marek Vasut + */ + +#ifndef __INCLUDE_BOUNCEBUF_H__ +#define __INCLUDE_BOUNCEBUF_H__ + +#include "bootrom_types.h" + +/* + * GEN_BB_READ -- Data are read from the buffer eg. by DMA hardware. + * The source buffer is copied into the bounce buffer (if unaligned, otherwise + * the source buffer is used directly) upon start() call, then the operation + * requiring the aligned transfer happens, then the bounce buffer is lost upon + * stop() call. + */ +#define GEN_BB_READ (1 << 0) +/* + * GEN_BB_WRITE -- Data are written into the buffer eg. by DMA hardware. + * The source buffer starts in an undefined state upon start() call, then the + * operation requiring the aligned transfer happens, then the bounce buffer is + * copied into the destination buffer (if unaligned, otherwise destination + * buffer is used directly) upon stop() call. + */ +#define GEN_BB_WRITE (1 << 1) +/* + * GEN_BB_RW -- Data are read and written into the buffer eg. by DMA hardware. + * The source buffer is copied into the bounce buffer (if unaligned, otherwise + * the source buffer is used directly) upon start() call, then the operation + * requiring the aligned transfer happens, then the bounce buffer is copied + * into the destination buffer (if unaligned, otherwise destination buffer is + * used directly) upon stop() call. + */ +#define GEN_BB_RW (GEN_BB_READ | GEN_BB_WRITE) +// #define u32_t u32_t + +struct bounce_buffer { + /* Copy of data parameter passed to start() */ + void *user_buffer; + /* + * DMA-aligned buffer. This field is always set to the value that + * should be used for DMA; either equal to .user_buffer, or to a + * freshly allocated aligned buffer. + */ + void *bounce_buffer; + /* Copy of len parameter passed to start() */ + u32_t len; + /* DMA-aligned buffer length */ + u32_t len_aligned; + /* Copy of flags parameter passed to start() */ + unsigned int flags; +}; + +/** + * bounce_buffer_start() -- Start the bounce buffer session + * state: stores state passed between bounce_buffer_{start,stop} + * data: pointer to buffer to be aligned + * len: length of the buffer + * flags: flags describing the transaction, see above. + */ +int bounce_buffer_start(struct bounce_buffer *state, void *data, + u32_t len, unsigned int flags); + +/** + * bounce_buffer_start() -- Start the bounce buffer session with external align check function + * state: stores state passed between bounce_buffer_{start,stop} + * data: pointer to buffer to be aligned + * len: length of the buffer + * flags: flags describing the transaction, see above. + * alignment: alignment of the newly allocated bounce buffer + * addr_is_aligned: function for checking the alignment instead of the default one + */ +int bounce_buffer_start_extalign(struct bounce_buffer *state, void *data, + u32_t len, unsigned int flags, + u32_t alignment, + int (*addr_is_aligned)(struct bounce_buffer *state)); + +/** + * bounce_buffer_stop() -- Finish the bounce buffer session + * state: stores state passed between bounce_buffer_{start,stop} + */ +int bounce_buffer_stop(struct bounce_buffer *state); + +#endif diff --git a/corev_apu/fpga/src/bootrom/src/cache.h b/corev_apu/fpga/src/bootrom/src/cache.h new file mode 100644 index 00000000000..c174fdef347 --- /dev/null +++ b/corev_apu/fpga/src/bootrom/src/cache.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2017 Andes Technology Corporation + * Rick Chen, Andes Technology Corporation + */ + +#ifndef _ASM_RISCV_CACHE_H +#define _ASM_RISCV_CACHE_H + +/* cache */ +void cache_flush(void); + +/* + * The current upper bound for RISCV L1 data cache line sizes is 32 bytes. + * We use that value for aligning DMA buffers unless the board config has + * specified an alternate cache line size. + */ +#ifdef CONFIG_SYS_CACHELINE_SIZE +#define ARCH_DMA_MINALIGN CONFIG_SYS_CACHELINE_SIZE +#else +#define ARCH_DMA_MINALIGN 64 +#endif + +#endif /* _ASM_RISCV_CACHE_H */ diff --git a/corev_apu/fpga/src/bootrom/src/dma-mapping.h b/corev_apu/fpga/src/bootrom/src/dma-mapping.h new file mode 100644 index 00000000000..6c6d9ba17e4 --- /dev/null +++ b/corev_apu/fpga/src/bootrom/src/dma-mapping.h @@ -0,0 +1,89 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_DMA_MAPPING_H +#define _LINUX_DMA_MAPPING_H + +// #include +// #include +#include "bootrom_types.h" +#include "memalign.h" +#include "cache.h" +// #include +// #include +#ifndef _LINUX_DMA_DIRECTION_H +#define _LINUX_DMA_DIRECTION_H +/* + * These definitions mirror those in pci.h, so they can be used + * interchangeably with their PCI_ counterparts. + */ +enum dma_data_direction { + DMA_BIDIRECTIONAL = 0, + DMA_TO_DEVICE = 1, + DMA_FROM_DEVICE = 2, + DMA_NONE = 3, +}; +#endif + +#define dma_mapping_error(x, y) 0 + +/** + * Map a buffer to make it available to the DMA device + * + * Linux-like DMA API that is intended to be used from drivers. This hides the + * underlying cache operation from drivers. Call this before starting the DMA + * transfer. In most of architectures in U-Boot, the virtual address matches to + * the physical address (but we have exceptions like sandbox). U-Boot does not + * support iommu at the driver level, so it also matches to the DMA address. + * Hence, this helper currently just performs the cache operation, then returns + * straight-mapped dma_address, which is intended to be set to the register of + * the DMA device. + * + * @vaddr: address of the buffer + * @len: length of the buffer + * @dir: the direction of DMA + */ +typedef u64_t dma_addr_t; + +void enable_caches(void); +void flush_cache(unsigned long addr, unsigned long size); +void flush_dcache_all(void); +void flush_dcache_range(unsigned long start, unsigned long stop); +void invalidate_dcache_range(unsigned long start, unsigned long stop); +void invalidate_dcache_all(void); +void invalidate_icache_all(void); + +static inline dma_addr_t dma_map_single(void *vaddr, size_t len, + enum dma_data_direction dir) +{ + unsigned long addr = (unsigned long)vaddr; + + len = ALIGN(len, ARCH_DMA_MINALIGN); + + // if (dir == DMA_FROM_DEVICE) + // invalidate_dcache_range(addr, addr + len); + // else + // flush_dcache_range(addr, addr + len); + + return addr; +} + +/** + * Unmap a buffer to make it available to CPU + * + * Linux-like DMA API that is intended to be used from drivers. This hides the + * underlying cache operation from drivers. Call this after finishin the DMA + * transfer. + * + * @addr: DMA address + * @len: length of the buffer + * @dir: the direction of DMA + */ +static inline void dma_unmap_single(dma_addr_t addr, size_t len, + enum dma_data_direction dir) +{ + len = ALIGN(len, ARCH_DMA_MINALIGN); + + // if (dir != DMA_TO_DEVICE) + // invalidate_dcache_range(addr, addr + len); +} + +#endif diff --git a/corev_apu/fpga/src/bootrom/src/dw_mmc.c b/corev_apu/fpga/src/bootrom/src/dw_mmc.c new file mode 100644 index 00000000000..baf157575a8 --- /dev/null +++ b/corev_apu/fpga/src/bootrom/src/dw_mmc.c @@ -0,0 +1,527 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2012 SAMSUNG Electronics + * Jaehoon Chung + * Rajeshawari Shinde + */ + + + +#include "bootrom_time.h" +#include "uart.h" +#include "dwmmc.h" +#include "cache.h" +#include "bouncebuf.h" +#include "memalign.h" +// #include "wait_bit.h" + +#define PAGE_SIZE 4096 +#define FIFO_MODE 1 + +void write_print(u32_t print,u32_t address, u32_t val){ + writel(val,MMC_BASE_ADDR+address); + if (print){ + print_uart("WRITE L ADDR: "); + print_uart_int(MMC_BASE_ADDR+address); + print_uart(" DATA: "); + print_uart_int(val); + print_uart( "\n"); + } + + if(MMC_BASE_ADDR+address == 0x80000000UL){ + + print_uart("WRITING TO FIRST ADDRESS: "); + print_uart("WRITE L ADDR: "); + print_uart_int(MMC_BASE_ADDR+address); + print_uart(" DATA: "); + print_uart_int(val); + print_uart( "\n"); + } + +} + +u32_t read_print(u32_t print, u32_t address){ + u32_t val = readl(MMC_BASE_ADDR+address); + if (print){ + print_uart("READ L ADDR: "); + print_uart_int(MMC_BASE_ADDR+address); + print_uart("DATA: "); + print_uart_int(val); + print_uart( "\n"); + } + return val; +} +static int dwmci_wait_reset(u32_t value) +{ + unsigned long timeout = 1000; + u32_t ctrl; + + write_print(0, DWMCI_CTRL, value); + + while (timeout--) { + ctrl = read_print(0, DWMCI_CTRL); + if (!(ctrl & DWMCI_RESET_ALL)) + return 1; + } + return 0; +} + +static void dwmci_set_idma_desc(struct dwmci_idmac *idmac, + u32_t desc0, u32_t desc1, u32_t desc2) +{ + struct dwmci_idmac *desc = idmac; + + desc->flags = desc0; + desc->cnt = desc1; + desc->addr = desc2; + desc->next_addr = (unsigned long)desc + sizeof(struct dwmci_idmac); + print_uart("descriptor pointer address: "); + print_uart_int(desc); + print_uart("set descriptor: flags "); + print_uart_int(desc->flags); + print_uart(" cnt "); + print_uart_int(desc->cnt); + print_uart(" addr "); + print_uart_int(desc->addr); + print_uart(" next_addr "); + print_uart_int(desc->next_addr); + print_uart("\n"); +} + +static void dwmci_prepare_data(struct mmc_data *data, + struct dwmci_idmac *cur_idmac, + void *bounce_buffer) +{ + unsigned long ctrl; + unsigned int i = 0, flags, cnt, blk_cnt; + unsigned long data_start, data_end; + + + blk_cnt = data->blocks; + + dwmci_wait_reset(DWMCI_CTRL_FIFO_RESET); + + /* Clear IDMAC interrupt */ + write_print(0, DWMCI_IDSTS, 0xFFFFFFFF); + + data_start = (unsigned long)cur_idmac; + write_print(0, DWMCI_DBADDR, (unsigned long)cur_idmac); + + do { + flags = DWMCI_IDMAC_OWN | DWMCI_IDMAC_CH ; + flags |= (i == 0) ? DWMCI_IDMAC_FS : 0; + if (blk_cnt <= 8) { + flags |= DWMCI_IDMAC_LD; + cnt = data->blocksize * blk_cnt; + } else + cnt = data->blocksize * 8; + + dwmci_set_idma_desc(cur_idmac, flags, cnt, + (unsigned long)bounce_buffer + (i * PAGE_SIZE)); + + cur_idmac++; + if (blk_cnt <= 8) + break; + blk_cnt -= 8; + i++; + } while(1); + + print_uart("prepare data, skipping flush! \n"); + // data_end = (unsigned long)cur_idmac; + // flush_dcache_range(data_start, roundup(data_end, ARCH_DMA_MINALIGN)); + + ctrl = read_print(1, DWMCI_CTRL); + ctrl |= DWMCI_IDMAC_EN | DWMCI_DMA_EN; + write_print(0, DWMCI_CTRL, ctrl); + + ctrl = read_print(1, DWMCI_BMOD); + ctrl |= DWMCI_BMOD_IDMAC_FB | DWMCI_BMOD_IDMAC_EN; + write_print(0, DWMCI_BMOD, ctrl); + + write_print(0, DWMCI_BLKSIZ, data->blocksize); + write_print(0, DWMCI_BYTCNT, data->blocksize * data->blocks); +} + +static int dwmci_fifo_ready(u32_t bit, u32_t *len) +{ + u32_t timeout = 20000; + // print_uart(" fifo ready get len: "); + *len = read_print(0, DWMCI_STATUS); + while (--timeout && (*len & bit)) { + udelay(200); + print_uart(" fifo ready get len inside while : "); + *len = read_print(1, DWMCI_STATUS); + } + + if (!timeout) { + print_uart("FIFO underflow timeout\n"); + return -ETIMEDOUT; + } + + return 0; +} + + +static int dwmci_data_transfer(struct mmc_data *data) +{ + int ret = 0; + u32_t timeout, mask, size, i, len = 0; + u32_t *buf = NULL; + // unsigned long start = get_timer(0); + // u32_t fifo_depth = (((host->fifoth_val & RX_WMARK_MASK) >> + // RX_WMARK_SHIFT) + 1) * 2; + + size = data->blocksize * data->blocks; + // if (data->flags == MMC_DATA_READ) + buf = (unsigned int *)data->dest; + // else + // buf = (unsigned int *)data->src; + + timeout = 1000000; + + size /= 4; + read_print(0,DWMCI_STATUS); + for (;;) { + mask = read_print(0, DWMCI_RINTSTS); + int val = read_print(0,DWMCI_STATUS); + // if(val & 0x4) + // print_uart("FIFO empty \n"); + /* Error during data transfer. */ + if (mask & (DWMCI_DATA_ERR | DWMCI_DATA_TOUT)) { + print_uart("DATA ERROR!\n"); + ret = -EINVAL; + return ret; + } + + + + if (FIFO_MODE && size!=0) { + // print_uart("FIFO_MODE && size \n"); + len = 0; + if (data->flags == MMC_DATA_READ && + (mask & (DWMCI_INTMSK_RXDR | DWMCI_INTMSK_DTO))) { + write_print(0, DWMCI_RINTSTS, + mask & (DWMCI_INTMSK_RXDR | + DWMCI_INTMSK_DTO)); + while (size) { + ret = dwmci_fifo_ready( DWMCI_FIFO_EMPTY, + &len); + if (ret < 0) + break; + + len = (len >> DWMCI_FIFO_SHIFT) & + DWMCI_FIFO_MASK; + len = min(size, len); + // print_uart("actually reading! to "); + // print_uart_int(buf); + // print_uart("\n"); + + // print_uart("size "); + // print_uart_int(size); + // print_uart("\n"); + + // print_uart("len "); + // print_uart_int(len); + // print_uart("\n"); + + for (i = 0; i < len; i++) + *buf++ = + read_print(0, DWMCI_DATA); + size = size > len ? (size - len) : 0; + } + } // else if (data->flags == MMC_DATA_WRITE && + // (mask & DWMCI_INTMSK_TXDR)) { + // while (size) { + // ret = dwmci_fifo_ready(host, + // DWMCI_FIFO_FULL, + // &len); + // if (ret < 0) + // break; + + // len = fifo_depth - ((len >> + // DWMCI_FIFO_SHIFT) & + // DWMCI_FIFO_MASK); + // len = min(size, len); + // for (i = 0; i < len; i++) + // write_print(0, DWMCI_DATA, + // *buf++); + // size = size > len ? (size - len) : 0; + // } + // write_print(0, DWMCI_RINTSTS, + // DWMCI_INTMSK_TXDR); + // } + } + + /* Data arrived correctly. */ + if (mask & DWMCI_INTMSK_DTO) { + ret = 0; + break; + } + + /* Check for timeout. */ + if (timeout-- > 0) { + udelay(10); + } + else { + read_print(1,DWMCI_STATUS); + print_uart("Timeout waiting for data!\n"); + ret = -ETIMEDOUT; + break; + } + } + + write_print(0, DWMCI_RINTSTS, mask); + + return ret; +} + +static int dwmci_set_transfer_mode() +{ + unsigned long mode; + + mode = DWMCI_CMD_DATA_EXP; + // if (data->flags & MMC_DATA_WRITE) + // mode |= DWMCI_CMD_RW; + + return mode; +} + + +static int dwmci_send_cmd(struct mmc_cmd *cmd, + struct mmc_data *data) +{ + + struct dwmci_idmac *cur_idmac = (struct dwmci_idmac *) (0xFFE30000); + + // ALLOC_CACHE_ALIGN_BUFFER(struct dwmci_idmac, cur_idmac, + // data ? DIV_ROUND_UP(data->blocks, 8) : 0); + int ret = 0, flags = 0, i; + unsigned int timeout = 500; + u32_t retry = 100000; + u32_t mask, ctrl,reg; + // unsigned long start = get_timer(0); + struct bounce_buffer bbstate; + + while (read_print(0, DWMCI_STATUS) & DWMCI_BUSY) { + if (timeout-- > 0) + { + udelay(10); + } + else { + read_print(1, DWMCI_STATUS); + print_uart("Timeout on data busy, continue anyway\n"); + break; + } + } + + write_print(0, DWMCI_RINTSTS, DWMCI_INTMSK_ALL); + + if (data) { + if (FIFO_MODE) { + write_print(0, DWMCI_BLKSIZ, data->blocksize); + write_print(0, DWMCI_BYTCNT, + data->blocksize * data->blocks); + dwmci_wait_reset(DWMCI_CTRL_FIFO_RESET); + } else { + // if (data->flags == MMC_DATA_READ) { + ret = bounce_buffer_start(&bbstate, + (void*)data->dest, + data->blocksize * + data->blocks, GEN_BB_WRITE); + // } else { + // ret = bounce_buffer_start(&bbstate, + // (void*)data->src, + // data->blocksize * + // data->blocks, GEN_BB_READ); + // } + + if (ret) + return ret; + + dwmci_prepare_data(data, cur_idmac, + bbstate.bounce_buffer); + } + } + + write_print(0, DWMCI_CMDARG, cmd->cmdarg); + + if (data) + flags = dwmci_set_transfer_mode(); + + if ((cmd->resp_type & MMC_RSP_136) && (cmd->resp_type & MMC_RSP_BUSY)) + return -EBUSY; + + if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION) + flags |= DWMCI_CMD_ABORT_STOP; + else + flags |= DWMCI_CMD_PRV_DAT_WAIT; + + if (cmd->resp_type & MMC_RSP_PRESENT) { + flags |= DWMCI_CMD_RESP_EXP; + if (cmd->resp_type & MMC_RSP_136) + flags |= DWMCI_CMD_RESP_LENGTH; + } + + if (cmd->resp_type & MMC_RSP_CRC) + flags |= DWMCI_CMD_CHECK_CRC; + + flags |= (cmd->cmdidx | DWMCI_CMD_START | DWMCI_CMD_USE_HOLD_REG); + + // print_uart("Sending CMD\n"); + + write_print(0, DWMCI_CMD, flags); + + for (i = 0; i < retry; i++) { + mask = read_print(0, DWMCI_RINTSTS); + if (mask & DWMCI_INTMSK_CDONE) { + if (!data) + write_print(0, DWMCI_RINTSTS, mask); + break; + } + } + + if (i == retry) { + print_uart("Timeout. RINTSTS: "); + print_uart_int(mask); + print_uart("\n"); + + return -ETIMEDOUT; + } + + if (mask & DWMCI_INTMSK_RTO) { + /* + * Timeout here is not necessarily fatal. (e)MMC cards + * will splat here when they receive CMD55 as they do + * not support this command and that is exactly the way + * to tell them apart from SD cards. Thus, this output + * below shall be debug(). eMMC cards also do not favor + * CMD8, please keep that in mind. + */ + print_uart("Response Timeout.\n"); + return -ETIMEDOUT; + } else if (mask & DWMCI_INTMSK_RE) { + print_uart("Response Error.\n"); + return -EIO; + } else if ((cmd->resp_type & MMC_RSP_CRC) && + (mask & DWMCI_INTMSK_RCRC)) { + print_uart("Response CRC Error.\n"); + return -EIO; + } + + + if (cmd->resp_type & MMC_RSP_PRESENT) { + if (cmd->resp_type & MMC_RSP_136) { + cmd->response[0] = read_print(0, DWMCI_RESP3); + cmd->response[1] = read_print(0, DWMCI_RESP2); + cmd->response[2] = read_print(0, DWMCI_RESP1); + cmd->response[3] = read_print(0, DWMCI_RESP0); + } else { + cmd->response[0] = read_print(0, DWMCI_RESP0); + } + } + + if (data) { + ret = dwmci_data_transfer(data); + + /* only dma mode need it */ + if (!FIFO_MODE) { + // if (data->flags == MMC_DATA_READ) + mask = DWMCI_IDINTEN_RI; + // else + // mask = DWMCI_IDINTEN_TI; + + timeout = 1000; + ret = 1; + + while(timeout-- > 0){ + reg = read_print(0,DWMCI_IDSTS); + if ((reg & mask) == mask){ + ret = 0; + break; + } + + udelay(10); + } + // ret = wait_for_bit_le32(MMC_BASE_ADDR + DWMCI_IDSTS, + // mask, true, 1000, false); + if (ret){ + print_uart_int(reg); + print_uart(" DWMCI_IDINTEN mask timeout.\n"); + return ret; + } + /* clear interrupts */ + write_print(0, DWMCI_IDSTS, DWMCI_IDINTEN_MASK); + + ctrl = read_print(1, DWMCI_CTRL); + ctrl &= ~(DWMCI_DMA_EN); + write_print(0, DWMCI_CTRL, ctrl); + bounce_buffer_stop(&bbstate); + } + } + + udelay(100); + + return ret; +} + + +// Set the number of block to read from the SD card. +static u8_t set_block_count(u32_t blkcnt) +{ + u8_t err = 0; + struct mmc_cmd cmd23; + + cmd23.cmdidx = MMC_CMD_SET_BLOCK_COUNT; + cmd23.cmdarg = blkcnt; + cmd23.resp_type = MMC_RSP_R1; + + // mmc_trace_before_send(&cmd23); + err = dwmci_send_cmd(&cmd23, NULL); + // mmc_trace_after_send(&cmd23, err); + + return err; +} + + +// Copies the data blocks from the SD card to dst by sending the read command. The blkcnt argument type is u64_t because lbas are 64 bits integer in the gpt format. But the block size argument of the read command is a u32_t. Since blkcnt is the result of the subtraction between two lbas and given the size of the linux image, we assume blkcnt will NEVER be above the maximum value of a u32_t. We can then safely cast blkcnt from u64_t to u32_t. +u8_t sd_copy_mmc(void *dst, u64_t src_lba, u64_t blkcnt) +{ + u8_t err = 0; + + struct mmc_cmd cmd18; + struct mmc_data data; + + if (blkcnt > 1) + { + err = set_block_count(blkcnt); + if (err) + return err; + cmd18.cmdidx = MMC_CMD_READ_MULTIPLE_BLOCK; + } + else + cmd18.cmdidx = MMC_CMD_READ_SINGLE_BLOCK; + + /* + We assume the card is high capacity as all SD Card today are. + The check of the SD card high capacity property is done during "Send Operating Condition Command (ACMD41)" in the OCR register. + */ + // if (g_dwc_mshc->high_capacity) + cmd18.cmdarg = src_lba; + // else + // cmd18.cmdarg = src_lba * g_dwc_mshc->read_bl_len; + + cmd18.resp_type = MMC_RSP_R1; + + data.dest = dst; + // The blkcnt argument type is u64_t because lbas are 64 bits integer in the gpt format. But the block size argument of the read command is a u32_t. Since blkcnt is the result of the subtraction between two lbas and given the size of the linux image, we assume blkcnt will NEVER be above the maximum value of a u32_t. We can then safely cast blkcnt from u64_t to u32_t. + data.blocks = (u32_t) blkcnt; + data.blocksize = 0x200; // blocksize is 512 by default + data.flags = MMC_DATA_READ; + + // mmc_trace_before_send(&cmd18); + err = dwmci_send_cmd(&cmd18, &data); + // mmc_trace_after_send(&cmd18, err); + + return err; +} + diff --git a/corev_apu/fpga/src/bootrom/src/dwmmc.h b/corev_apu/fpga/src/bootrom/src/dwmmc.h new file mode 100644 index 00000000000..3d6acab5073 --- /dev/null +++ b/corev_apu/fpga/src/bootrom/src/dwmmc.h @@ -0,0 +1,320 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2012 SAMSUNG Electronics + * Jaehoon Chung + */ + +#ifndef __DWMMC_HW_H +#define __DWMMC_HW_H + +// #include +// #include +#include "mmc.h" +#include "bootrom_errno.h" +#include "bootrom_io.h" +#include "cache.h" +// #include +#ifndef min +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif +#define BIT(nr) (1UL << (nr)) +#define MMC_BASE_ADDR 0xFF808000 +#define MMC_MEM_SIZE 0x1000 + +#define DWMCI_CTRL 0x000 +#define DWMCI_PWREN 0x004 +#define DWMCI_CLKDIV 0x008 +#define DWMCI_CLKSRC 0x00C +#define DWMCI_CLKENA 0x010 +#define DWMCI_TMOUT 0x014 +#define DWMCI_CTYPE 0x018 +#define DWMCI_BLKSIZ 0x01C +#define DWMCI_BYTCNT 0x020 +#define DWMCI_INTMASK 0x024 +#define DWMCI_CMDARG 0x028 +#define DWMCI_CMD 0x02C +#define DWMCI_RESP0 0x030 +#define DWMCI_RESP1 0x034 +#define DWMCI_RESP2 0x038 +#define DWMCI_RESP3 0x03C +#define DWMCI_MINTSTS 0x040 +#define DWMCI_RINTSTS 0x044 +#define DWMCI_STATUS 0x048 +#define DWMCI_FIFOTH 0x04C +#define DWMCI_CDETECT 0x050 +#define DWMCI_WRTPRT 0x054 +#define DWMCI_GPIO 0x058 +#define DWMCI_TCMCNT 0x05C +#define DWMCI_TBBCNT 0x060 +#define DWMCI_DEBNCE 0x064 +#define DWMCI_USRID 0x068 +#define DWMCI_VERID 0x06C +#define DWMCI_HCON 0x070 +#define DWMCI_UHS_REG 0x074 +#define DWMCI_BMOD 0x080 +#define DWMCI_PLDMND 0x084 +#define DWMCI_DBADDR 0x088 +#define DWMCI_IDSTS 0x08C +#define DWMCI_IDINTEN 0x090 +#define DWMCI_DSCADDR 0x094 +#define DWMCI_BUFADDR 0x098 +#define DWMCI_DATA 0x200 + +/* Interrupt Mask register */ +#define DWMCI_INTMSK_ALL 0xffffffff +#define DWMCI_INTMSK_RE (1 << 1) +#define DWMCI_INTMSK_CDONE (1 << 2) +#define DWMCI_INTMSK_DTO (1 << 3) +#define DWMCI_INTMSK_TXDR (1 << 4) +#define DWMCI_INTMSK_RXDR (1 << 5) +#define DWMCI_INTMSK_RCRC (1 << 6) +#define DWMCI_INTMSK_DCRC (1 << 7) +#define DWMCI_INTMSK_RTO (1 << 8) +#define DWMCI_INTMSK_DRTO (1 << 9) +#define DWMCI_INTMSK_HTO (1 << 10) +#define DWMCI_INTMSK_FRUN (1 << 11) +#define DWMCI_INTMSK_HLE (1 << 12) +#define DWMCI_INTMSK_SBE (1 << 13) +#define DWMCI_INTMSK_ACD (1 << 14) +#define DWMCI_INTMSK_EBE (1 << 15) + +/* Raw interrupt Regsiter */ +#define DWMCI_DATA_ERR (DWMCI_INTMSK_EBE | DWMCI_INTMSK_SBE | DWMCI_INTMSK_HLE |\ + DWMCI_INTMSK_FRUN | DWMCI_INTMSK_EBE | DWMCI_INTMSK_DCRC) +#define DWMCI_DATA_TOUT (DWMCI_INTMSK_HTO | DWMCI_INTMSK_DRTO) +/* CTRL register */ +#define DWMCI_CTRL_RESET (1 << 0) +#define DWMCI_CTRL_FIFO_RESET (1 << 1) +#define DWMCI_CTRL_DMA_RESET (1 << 2) +#define DWMCI_DMA_EN (1 << 5) +#define DWMCI_CTRL_SEND_AS_CCSD (1 << 10) +#define DWMCI_IDMAC_EN (1 << 25) +#define DWMCI_RESET_ALL (DWMCI_CTRL_RESET | DWMCI_CTRL_FIFO_RESET |\ + DWMCI_CTRL_DMA_RESET) + +/* CMD register */ +#define DWMCI_CMD_RESP_EXP (1 << 6) +#define DWMCI_CMD_RESP_LENGTH (1 << 7) +#define DWMCI_CMD_CHECK_CRC (1 << 8) +#define DWMCI_CMD_DATA_EXP (1 << 9) +#define DWMCI_CMD_RW (1 << 10) +#define DWMCI_CMD_SEND_STOP (1 << 12) +#define DWMCI_CMD_ABORT_STOP (1 << 14) +#define DWMCI_CMD_PRV_DAT_WAIT (1 << 13) +#define DWMCI_CMD_UPD_CLK (1 << 21) +#define DWMCI_CMD_USE_HOLD_REG (1 << 29) +#define DWMCI_CMD_START (1 << 31) + +/* CLKENA register */ +#define DWMCI_CLKEN_ENABLE (1 << 0) +#define DWMCI_CLKEN_LOW_PWR (1 << 16) + +/* Card-type registe */ +#define DWMCI_CTYPE_1BIT 0 +#define DWMCI_CTYPE_4BIT (1 << 0) +#define DWMCI_CTYPE_8BIT (1 << 16) + +/* Status Register */ +#define DWMCI_FIFO_EMPTY (1 << 2) +#define DWMCI_FIFO_FULL (1 << 3) +#define DWMCI_BUSY (1 << 9) +#define DWMCI_FIFO_MASK 0x1fff +#define DWMCI_FIFO_SHIFT 17 + +/* FIFOTH Register */ +#define MSIZE(x) ((x) << 28) +#define RX_WMARK(x) ((x) << 16) +#define TX_WMARK(x) (x) +#define RX_WMARK_SHIFT 16 +#define RX_WMARK_MASK (0xfff << RX_WMARK_SHIFT) + +#define DWMCI_IDMAC_OWN (1 << 31) +#define DWMCI_IDMAC_CH (1 << 4) +#define DWMCI_IDMAC_FS (1 << 3) +#define DWMCI_IDMAC_LD (1 << 2) + +/* Bus Mode Register */ +#define DWMCI_BMOD_IDMAC_RESET (1 << 0) +#define DWMCI_BMOD_IDMAC_FB (1 << 1) +#define DWMCI_BMOD_IDMAC_EN (1 << 7) + +/* UHS register */ +#define DWMCI_DDR_MODE (1 << 16) + +/* Internal IDMAC interrupt defines */ +#define DWMCI_IDINTEN_RI BIT(1) +#define DWMCI_IDINTEN_TI BIT(0) + +#define DWMCI_IDINTEN_MASK (DWMCI_IDINTEN_TI | \ + DWMCI_IDINTEN_RI) + +/* quirks */ +#define DWMCI_QUIRK_DISABLE_SMU (1 << 0) + +/** + * struct dwmci_host - Information about a designware MMC host + * + * @name: Device name + * @ioaddr: Base I/O address of controller + * @quirks: Quick flags - see DWMCI_QUIRK_... + * @caps: Capabilities - see MMC_MODE_... + * @bus_hz: Bus speed in Hz, if @get_mmc_clk() is NULL + * @div: Arbitrary clock divider value for use by controller + * @dev_index: Arbitrary device index for use by controller + * @dev_id: Arbitrary device ID for use by controller + * @buswidth: Bus width in bits (8 or 4) + * @fifoth_val: Value for FIFOTH register (or 0 to leave unset) + * @mmc: Pointer to generic MMC structure for this device + * @priv: Private pointer for use by controller + */ +// struct dwmci_host { +// const char *name; +// void *ioaddr; +// unsigned int quirks; +// unsigned int caps; +// unsigned int version; +// unsigned int clock; +// unsigned int bus_hz; +// unsigned int div; +// int dev_index; +// int dev_id; +// int buswidth; +// u32_t fifoth_val; +// struct mmc *mmc; +// void *priv; + +// int (*clksel)(struct dwmci_host *host); +// void (*board_init)(struct dwmci_host *host); + +// /** +// * Get / set a particular MMC clock frequency +// * +// * This is used to request the current clock frequency of the clock +// * that drives the DWMMC peripheral. The caller will then use this +// * information to work out the divider it needs to achieve the +// * required MMC bus clock frequency. If you want to handle the +// * clock external to DWMMC, use @freq to select the frequency and +// * return that value too. Then DWMMC will put itself in bypass mode. +// * +// * @host: DWMMC host +// * @freq: Frequency the host is trying to achieve +// */ +// unsigned int (*get_mmc_clk)(struct dwmci_host *host, int freq); +// #ifndef CONFIG_BLK +// struct mmc_config cfg; +// #endif + +// /* use fifo mode to read and write data */ +// bool fifo_mode; +// }; + +struct dwmci_idmac { + u32_t flags; + u32_t cnt; + u32_t addr; + u32_t next_addr; +} __aligned(ARCH_DMA_MINALIGN); + +// static inline void dwmci_writel(struct dwmci_host *host, int reg, u32_t val) +// { +// writel(val, host->ioaddr + reg); +// } + +// static inline void dwmci_writew(struct dwmci_host *host, int reg, u16_t val) +// { +// writew(val, host->ioaddr + reg); +// } + +// static inline void dwmci_writeb(struct dwmci_host *host, int reg, u8_t val) +// { +// writeb(val, host->ioaddr + reg); +// } +// static inline u32_t dwmci_readl(struct dwmci_host *host, int reg) +// { +// return readl(host->ioaddr + reg); +// } + +// static inline u16_t dwmci_readw(struct dwmci_host *host, int reg) +// { +// return readw(host->ioaddr + reg); +// } + +// static inline u8_t dwmci_readb(struct dwmci_host *host, int reg) +// { +// return readb(host->ioaddr + reg); +// } + +// #ifdef CONFIG_BLK +// /** +// * dwmci_setup_cfg() - Set up the configuration for DWMMC +// * +// * This is used to set up a DWMMC device when you are using CONFIG_BLK. +// * +// * This should be called from your MMC driver's probe() method once you have +// * the information required. +// * +// * Generally your driver will have a platform data structure which holds both +// * the configuration (struct mmc_config) and the MMC device info (struct mmc). +// * For example: +// * +// * struct rockchip_mmc_plat { +// * struct mmc_config cfg; +// * struct mmc mmc; +// * }; +// * +// * ... +// * +// * Inside U_BOOT_DRIVER(): +// * .plat_auto = sizeof(struct rockchip_mmc_plat), +// * +// * To access platform data: +// * struct rockchip_mmc_plat *plat = dev_get_plat(dev); +// * +// * See rockchip_dw_mmc.c for an example. +// * +// * @cfg: Configuration structure to fill in (generally &plat->mmc) +// * @host: DWMMC host +// * @max_clk: Maximum supported clock speed in HZ (e.g. 150000000) +// * @min_clk: Minimum supported clock speed in HZ (e.g. 400000) +// */ +// void dwmci_setup_cfg(struct mmc_config *cfg, struct dwmci_host *host, +// u32_t max_clk, u32_t min_clk); + +// /** +// * dwmci_bind() - Set up a new MMC block device +// * +// * This is used to set up a DWMMC block device when you are using CONFIG_BLK. +// * It should be called from your driver's bind() method. +// * +// * See rockchip_dw_mmc.c for an example. +// * +// * @dev: Device to set up +// * @mmc: Pointer to mmc structure (normally &plat->mmc) +// * @cfg: Empty configuration structure (generally &plat->cfg). This is +// * normally all zeroes at this point. The only purpose of passing +// * this in is to set mmc->cfg to it. +// * Return: 0 if OK, -ve if the block device could not be created +// */ +// int dwmci_bind(struct udevice *dev, struct mmc *mmc, struct mmc_config *cfg); + +// #else +// /** +// * add_dwmci() - Add a new DWMMC interface +// * +// * This is used when you are not using CONFIG_BLK. Convert your driver over! +// * +// * @host: DWMMC host structure +// * @max_clk: Maximum supported clock speed in HZ (e.g. 150000000) +// * @min_clk: Minimum supported clock speed in HZ (e.g. 400000) +// * Return: 0 if OK, -ve on error +// */ +// int add_dwmci(struct dwmci_host *host, u32_t max_clk, u32_t min_clk); +// #endif /* !CONFIG_BLK */ + +// #ifdef CONFIG_DM_MMC +// /* Export the operations to drivers */ +// int dwmci_probe(struct udevice *dev); +// extern const struct dm_mmc_ops dm_dwmci_ops; +// #endif + +#endif /* __DWMMC_HW_H */ diff --git a/corev_apu/fpga/src/bootrom/src/main.c b/corev_apu/fpga/src/bootrom/src/main.c index fe2f744ec86..fa11e446550 100644 --- a/corev_apu/fpga/src/bootrom/src/main.c +++ b/corev_apu/fpga/src/bootrom/src/main.c @@ -7,9 +7,8 @@ #include "sd.h" #include "gpt.h" -// 1 second at 50MHz -#define SECOND_CYCLES (50 * 1000 * 1000) -#define WAIT_SECONDS (5) +#define SECOND_CYCLES CLOCK_FREQUENCY +#define WAIT_SECONDS (10) static inline uintptr_t get_cycle_count() { uintptr_t cycle; @@ -48,6 +47,7 @@ int main() uint8_t uart_res = 0; uintptr_t start; + #ifndef PLAT_AGILEX init_uart(CLOCK_FREQUENCY, UART_BITRATE); //not needed in intel setup as UART IP is already configured via HW #endif @@ -73,11 +73,24 @@ int main() } else { print_uart(" booting!\r\n"); #ifndef PLAT_AGILEX - res = gpt_find_boot_partition((uint8_t *)0x80000000UL, 2 * 16384); // linux boot not yet supported for altera + res = gpt_find_boot_partition((uint8_t *)0x80000000UL, 2 * 16384); + #else + int start_block_fw_payload = 0x32800; //payload at 100MB + print_uart("I am Agilex 7! \r\n"); + + print_uart("Loading fw_payload into memory address 0x80000000 \n"); + for (uint64_t i = 0; i < 15000; i++){ + res = sd_copy_mmc((uint8_t *)0x80000000UL + (i * 0x200), start_block_fw_payload + i, 1); // for now hardcoded, need to develop the code to find the file in the SD card + + if (res) + { + print_uart("TRANSFER ERROR\n"); + return res; + } + } #endif } - #ifndef PLAT_AGILEX // linux boot not yet supported for altera if (res == 0) { // jump to the address @@ -86,7 +99,6 @@ int main() "la a1, _dtb;" "jr s0"); } - #endif while (1) { diff --git a/corev_apu/fpga/src/bootrom/src/memalign.h b/corev_apu/fpga/src/bootrom/src/memalign.h new file mode 100644 index 00000000000..7c4efef6f96 --- /dev/null +++ b/corev_apu/fpga/src/bootrom/src/memalign.h @@ -0,0 +1,157 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (c) 2015 Google, Inc + */ + +#ifndef __ALIGNMEM_H +#define __ALIGNMEM_H + +/* + * ARCH_DMA_MINALIGN is defined in asm/cache.h for each architecture. It + * is used to align DMA buffers. + */ +#ifndef __ASSEMBLY__ +// #include +#include "cache.h" +#include + +/* + * The ALLOC_CACHE_ALIGN_BUFFER macro is used to allocate a buffer on the + * stack that meets the minimum architecture alignment requirements for DMA. + * Such a buffer is useful for DMA operations where flushing and invalidating + * the cache before and after a read and/or write operation is required for + * correct operations. + * + * When called the macro creates an array on the stack that is sized such + * that: + * + * 1) The beginning of the array can be advanced enough to be aligned. + * + * 2) The size of the aligned portion of the array is a multiple of the minimum + * architecture alignment required for DMA. + * + * 3) The aligned portion contains enough space for the original number of + * elements requested. + * + * The macro then creates a pointer to the aligned portion of this array and + * assigns to the pointer the address of the first element in the aligned + * portion of the array. + * + * Calling the macro as: + * + * ALLOC_CACHE_ALIGN_BUFFER(uint32_t, buffer, 1024); + * + * Will result in something similar to saying: + * + * uint32_t buffer[1024]; + * + * The following differences exist: + * + * 1) The resulting buffer is guaranteed to be aligned to the value of + * ARCH_DMA_MINALIGN. + * + * 2) The buffer variable created by the macro is a pointer to the specified + * type, and NOT an array of the specified type. This can be very important + * if you want the address of the buffer, which you probably do, to pass it + * to the DMA hardware. The value of &buffer is different in the two cases. + * In the macro case it will be the address of the pointer, not the address + * of the space reserved for the buffer. However, in the second case it + * would be the address of the buffer. So if you are replacing hard coded + * stack buffers with this macro you need to make sure you remove the & from + * the locations where you are taking the address of the buffer. + * + * Note that the size parameter is the number of array elements to allocate, + * not the number of bytes. + * + * This macro can not be used outside of function scope, or for the creation + * of a function scoped static buffer. It can not be used to create a cache + * line aligned global buffer. + */ +#define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1) +#define ALIGN_DOWN(x, a) ALIGN((x) - ((a) - 1), (a)) +#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) +#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) +#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) + +#define __round_mask(x, y) ((__typeof__(x))((y)-1)) +#define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1) +#define round_down(x, y) ((x) & ~__round_mask(x, y)) + +#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) +#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) + +#define DIV_ROUND_DOWN_ULL(ll, d) \ + ({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; }) + +#define DIV_ROUND_UP_ULL(ll, d) DIV_ROUND_DOWN_ULL((ll) + (d) - 1, (d)) + +#define ROUND(a, b) (((a) + (b) - 1) & ~((b) - 1)) + +#if BITS_PER_LONG == 32 +# define DIV_ROUND_UP_SECTOR_T(ll,d) DIV_ROUND_UP_ULL(ll, d) +#else +# define DIV_ROUND_UP_SECTOR_T(ll,d) DIV_ROUND_UP(ll,d) +#endif + +/* The `const' in roundup() prevents gcc-3.3 from calling __divdi3 */ +#define roundup(x, y) ( \ +{ \ + const typeof(y) __y = y; \ + (((x) + (__y - 1)) / __y) * __y; \ +} \ +) +#define rounddown(x, y) ( \ +{ \ + typeof(x) __x = (x); \ + __x - (__x % (y)); \ +} \ +) + +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#define PAD_COUNT(s, pad) (((s) - 1) / (pad) + 1) +#define PAD_SIZE(s, pad) (PAD_COUNT(s, pad) * pad) +#define ALLOC_ALIGN_BUFFER_PAD(type, name, size, align, pad) \ + char __##name[ROUND(PAD_SIZE((size) * sizeof(type), pad), align) \ + + (align - 1)]; \ + \ + type *name = (type *)ALIGN((uintptr_t)__##name, align) +#define ALLOC_ALIGN_BUFFER(type, name, size, align) \ + ALLOC_ALIGN_BUFFER_PAD(type, name, size, align, 1) +#define ALLOC_CACHE_ALIGN_BUFFER_PAD(type, name, size, pad) \ + ALLOC_ALIGN_BUFFER_PAD(type, name, size, ARCH_DMA_MINALIGN, pad) +#define ALLOC_CACHE_ALIGN_BUFFER(type, name, size) \ + ALLOC_ALIGN_BUFFER(type, name, size, ARCH_DMA_MINALIGN) + +/* + * DEFINE_CACHE_ALIGN_BUFFER() is similar to ALLOC_CACHE_ALIGN_BUFFER, but it's + * purpose is to allow allocating aligned buffers outside of function scope. + * Usage of this macro shall be avoided or used with extreme care! + */ +#define DEFINE_ALIGN_BUFFER(type, name, size, align) \ + static char __##name[ALIGN(size * sizeof(type), align)] \ + __aligned(align); \ + \ + static type *name = (type *)__##name +#define DEFINE_CACHE_ALIGN_BUFFER(type, name, size) \ + DEFINE_ALIGN_BUFFER(type, name, size, ARCH_DMA_MINALIGN) + +/** + * malloc_cache_aligned() - allocate a memory region aligned to cache line size + * + * This allocates memory at a cache-line boundary. The amount allocated may + * be larger than requested as it is rounded up to the nearest multiple of the + * cache-line size. This ensured that subsequent cache operations on this + * memory (flush, invalidate) will not affect subsequently allocated regions. + * + * @size: Minimum number of bytes to allocate + * + * Return: pointer to new memory region, or NULL if there is no more memory + * available. + */ +static inline void *malloc_cache_aligned(size_t size) +{ + return memalign(ARCH_DMA_MINALIGN, ALIGN(size, ARCH_DMA_MINALIGN)); +} +#endif + +#endif /* __ALIGNMEM_H */ diff --git a/corev_apu/fpga/src/bootrom/src/mmc.h b/corev_apu/fpga/src/bootrom/src/mmc.h new file mode 100644 index 00000000000..6ab17a2306f --- /dev/null +++ b/corev_apu/fpga/src/bootrom/src/mmc.h @@ -0,0 +1,127 @@ +// Copyright (c) 2025 Thales Research and Technology +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +/** + * \file mmc.h + * \brief Contains all the symbols for the mmc commands. + * \author Julien Mallet + * +*/ + +#ifndef MMC_H +#define MMC_H + + +#include "bootrom_types.h" + +/* *************** DATA *************** */ +#define MMC_DATA_READ 1 + + +/* *************** VOLTAGE *************** */ +#define MMC_VDD_32_33 0x00100000 /* VDD voltage 3.2 ~ 3.3 */ +#define MMC_VDD_33_34 0x00200000 /* VDD voltage 3.3 ~ 3.4 */ + + +/* *************** OCR *************** */ +#define OCR_HCS 0x40000000 +#define OCR_BUSY 0x80000000 + + +/* *************** MMC STATUS *************** */ +// #define MMC_STATUS_CURR_STATE (0xf << 9) + + +/* *************** MMC CMD *************** */ +#define MMC_CMD_GO_IDLE_STATE 0 +#define MMC_CMD_ALL_SEND_CID 2 +#define MMC_CMD_SELECT_CARD 7 +#define MMC_CMD_SEND_CSD 9 +#define MMC_CMD_STOP_TRANSMISSION 12 +// #define MMC_CMD_SEND_STATUS 13 +#define MMC_CMD_SET_BLOCKLEN 16 +#define MMC_CMD_READ_SINGLE_BLOCK 17 +#define MMC_CMD_READ_MULTIPLE_BLOCK 18 +#define MMC_CMD_SET_BLOCK_COUNT 23 + + +#define MMC_CMD_APP_CMD 55 + +// SD SPECIFIC +#define SD_CMD_SEND_RELATIVE_ADDR 3 +// #define SD_CMD_APP_SET_BUS_WIDTH 6 +#define SD_CMD_SEND_IF_COND 8 +#define SD_CMD_APP_SEND_OP_COND 41 +#define SD_CMD_APP_SEND_SCR 51 + + +/* *************** MMC RESPONSE *************** */ +#define MMC_RSP_PRESENT (1 << 0) +#define MMC_RSP_136 (1 << 1) /* 136 bit response */ +#define MMC_RSP_CRC (1 << 2) /* expect valid crc */ +#define MMC_RSP_BUSY (1 << 3) /* card may send busy */ +#define MMC_RSP_OPCODE (1 << 4) /* response contains opcode */ + +#define MMC_RSP_NONE (0) +#define MMC_RSP_R1 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) +#define MMC_RSP_R1b (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE| MMC_RSP_BUSY) +#define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) +#define MMC_RSP_R3 (MMC_RSP_PRESENT) +#define MMC_RSP_R4 (MMC_RSP_PRESENT) +#define MMC_RSP_R5 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) +#define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) +#define MMC_RSP_R7 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) + + +/* *************** MMC STORAGE *************** */ + +/* Maximum block size for MMC */ +#define MMC_MAX_BLOCK_LEN 512 + + +/* *************** MMC STRUCTURES *************** */ + +struct mmc_cmd +{ + u8_t cmdidx; // Command index + u32_t resp_type; // Response type + u32_t cmdarg; // Command argument + u32_t response[4]; // Response array +}; + + +struct mmc_data +{ + u8_t *dest; + + u32_t flags; + u32_t blocks; + u32_t blocksize; +}; + + +struct sdhci_host_t +{ + u32_t dma_buf_addr; // addr of the buffer used by the dma + u16_t rca; // relative card address + u8_t bus_width; +}; + + +/* *************** FUNCTIONS SIGNATURES *************** */ + + +// MMC CMD +u8_t mmc_go_idle(volatile struct sdhci_host_t *g_dwc_mshc); +u8_t mmc_send_if_cond(volatile struct sdhci_host_t *g_dwc_mshc); +u8_t sd_send_op_cond(volatile struct sdhci_host_t *g_dwc_mshc); +u8_t mmc_send_cid(volatile struct sdhci_host_t *g_dwc_mshc); +u8_t sd_send_rca(volatile struct sdhci_host_t *g_dwc_mshc); +u8_t sd_send_csd(volatile struct sdhci_host_t *g_dwc_mshc); +u8_t sd_select_card(volatile struct sdhci_host_t *g_dwc_mshc); +u8_t sd_send_scr(volatile struct sdhci_host_t *g_dwc_mshc); +// u32_t mmc_send_status(volatile struct sdhci_host_t *g_dwc_mshc); +u8_t mmc_set_blocklen(volatile struct sdhci_host_t *g_dwc_mshc, u32_t len); +u8_t sd_copy(volatile struct sdhci_host_t *g_dwc_mshc, void *dst, u64_t src_lba, u64_t blkcnt); + + +#endif \ No newline at end of file diff --git a/corev_apu/fpga/src/bootrom/src/spi.c b/corev_apu/fpga/src/bootrom/src/spi.c index b79ae6680af..cd4784acf30 100644 --- a/corev_apu/fpga/src/bootrom/src/spi.c +++ b/corev_apu/fpga/src/bootrom/src/spi.c @@ -119,7 +119,7 @@ int spi_write_bytes(uint8_t *bytes, uint32_t len, uint8_t *ret) for (int i = 0; i < len;) { status = read_reg(SPI_STATUS_REG); - if ((status & 0x1) != 0x1) // recieve fifo not empty + if ((status & 0x1) != 0x1) // receive fifo not empty { ret[i++] = read_reg(SPI_RECEIVE_REG); } diff --git a/corev_apu/fpga/src/bootrom/src/uart.c b/corev_apu/fpga/src/bootrom/src/uart.c index 79a4ee8b786..7a22b32f103 100644 --- a/corev_apu/fpga/src/bootrom/src/uart.c +++ b/corev_apu/fpga/src/bootrom/src/uart.c @@ -15,6 +15,11 @@ uint8_t read_reg_u8(uintptr_t addr) return *(volatile uint8_t *)addr; } +uint32_t read_reg_u32(uintptr_t addr) +{ + return *(volatile uint32_t *)addr; +} + int is_transmit_empty() { return read_reg_u8(UART_LINE_STATUS) & 0x20; @@ -22,7 +27,7 @@ int is_transmit_empty() char is_transmit_empty_altera() { - return read_reg_u8(UART_THR+6); + return ((read_reg_u8(UART_THR+7) << 8 ) + read_reg_u8(UART_THR+6)); } int is_receive_empty() @@ -30,7 +35,7 @@ int is_receive_empty() #ifndef PLAT_AGILEX return !(read_reg_u8(UART_LINE_STATUS) & 0x1); #else - return !(read_reg_u8(UART_THR+1) & 0x8); + return (read_reg_u8(UART_THR) == 0); #endif } diff --git a/corev_apu/fpga/src/bootrom/src/uart.h b/corev_apu/fpga/src/bootrom/src/uart.h index 38c7e44a44c..b7cbc47e5ef 100644 --- a/corev_apu/fpga/src/bootrom/src/uart.h +++ b/corev_apu/fpga/src/bootrom/src/uart.h @@ -20,7 +20,7 @@ #define UART_DLAB_LSB UART_BASE + 0 #define UART_DLAB_MSB UART_BASE + 4 -void init_uart(); +void init_uart(uint32_t freq, uint32_t baud); int read_serial(uint8_t *res); diff --git a/corev_apu/fpga/src/genesysii.svh b/corev_apu/fpga/src/genesysii.svh index 0456b92ef0a..650f597b842 100644 --- a/corev_apu/fpga/src/genesysii.svh +++ b/corev_apu/fpga/src/genesysii.svh @@ -8,7 +8,7 @@ // CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. -// Description: Set global FPGA degines +// Description: Set global FPGA defines // Author: Florian Zaruba `define GENESYSII @@ -17,5 +17,5 @@ `define ARIANE_DATA_WIDTH 64 -// Instantiate protocl checker +// Instantiate protocol checker // `define PROTOCOL_CHECKER diff --git a/corev_apu/fpga/src/kc705.svh b/corev_apu/fpga/src/kc705.svh index bd17d0aebdf..6d3749c20de 100644 --- a/corev_apu/fpga/src/kc705.svh +++ b/corev_apu/fpga/src/kc705.svh @@ -8,7 +8,7 @@ // CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. -// Description: Set global FPGA degines +// Description: Set global FPGA defines // Author: Florian Zaruba `define KC705 @@ -17,5 +17,5 @@ `define ARIANE_DATA_WIDTH 64 -// Instantiate protocl checker +// Instantiate protocol checker // `define PROTOCOL_CHECKER diff --git a/corev_apu/fpga/src/nexys_video.svh b/corev_apu/fpga/src/nexys_video.svh index 62231990122..912ef31e4bb 100644 --- a/corev_apu/fpga/src/nexys_video.svh +++ b/corev_apu/fpga/src/nexys_video.svh @@ -2,7 +2,7 @@ `define ARIANE_DATA_WIDTH 64 -// Instantiate protocl checker +// Instantiate protocol checker // `define PROTOCOL_CHECKER // write-back cache diff --git a/corev_apu/fpga/src/vc707.svh b/corev_apu/fpga/src/vc707.svh index ac7b20a9d52..e60568f7db3 100644 --- a/corev_apu/fpga/src/vc707.svh +++ b/corev_apu/fpga/src/vc707.svh @@ -8,12 +8,12 @@ // CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. -// Description: Set global FPGA degines +// Description: Set global FPGA defines // Author: Florian Zaruba `define VC707 `define ARIANE_DATA_WIDTH 64 -// Instantiate protocl checker +// Instantiate protocol checker // `define PROTOCOL_CHECKER diff --git a/corev_apu/fpga/src/vcu118.svh b/corev_apu/fpga/src/vcu118.svh index 47440a844bd..0713c214fcb 100644 --- a/corev_apu/fpga/src/vcu118.svh +++ b/corev_apu/fpga/src/vcu118.svh @@ -8,7 +8,7 @@ // CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. -// Description: Set global FPGA degines +// Description: Set global FPGA defines // Author: Florian Zaruba `define VCU118 diff --git a/corev_apu/fpga/xilinx/ariane_xlnx_ip.yml b/corev_apu/fpga/xilinx/ariane_xlnx_ip.yml index 2b3c0c1e518..a4ec93211b0 100644 --- a/corev_apu/fpga/xilinx/ariane_xlnx_ip.yml +++ b/corev_apu/fpga/xilinx/ariane_xlnx_ip.yml @@ -50,6 +50,17 @@ xlnx_clk_gen: clkout4_requested_out_freq: 50 clkin1_jitter_ps: 50 +xlnx_dpti_clk: + ip: clk_wiz + vendor: xilinx.com + config: + prim_in_freq: 60 + num_out_clks: 2 + clkout2_used: true + clkout1_requested_out_freq: 60 + clkout1_requested_phase: 230 + clkout2_requested_out_freq: 60 + xlnx_ila: ip: ila vendor: xilinx.com diff --git a/corev_apu/fpga/xilinx/xlnx_dpti_clk/Makefile b/corev_apu/fpga/xilinx/xlnx_dpti_clk/Makefile new file mode 100644 index 00000000000..d1acb462e20 --- /dev/null +++ b/corev_apu/fpga/xilinx/xlnx_dpti_clk/Makefile @@ -0,0 +1,2 @@ +PROJECT:=xlnx_dpti_clk +include ../common.mk \ No newline at end of file diff --git a/corev_apu/fpga/xilinx/xlnx_dpti_clk/tcl/run.tcl b/corev_apu/fpga/xilinx/xlnx_dpti_clk/tcl/run.tcl new file mode 100644 index 00000000000..d836651eabf --- /dev/null +++ b/corev_apu/fpga/xilinx/xlnx_dpti_clk/tcl/run.tcl @@ -0,0 +1,26 @@ +set partNumber $::env(XILINX_PART) +set boardName $::env(XILINX_BOARD) + +set ipName xlnx_dpti_clk + +create_project $ipName . -force -part $partNumber +set_property board_part $boardName [current_project] + +create_ip -name clk_wiz -vendor xilinx.com -library ip -module_name $ipName + +set_property -dict [list CONFIG.PRIM_IN_FREQ {60.000} \ + CONFIG.NUM_OUT_CLKS {2} \ + CONFIG.CLKOUT2_USED {true} \ + CONFIG.CLKOUT1_REQUESTED_OUT_FREQ {60} \ + CONFIG.CLKOUT1_REQUESTED_PHASE {230.000} \ + CONFIG.CLKOUT2_REQUESTED_OUT_FREQ {60} \ + CONFIG.USE_RESET {false} \ + ] [get_ips $ipName] + + +generate_target {instantiation_template} [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci] +generate_target all [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci] +create_ip_run [get_files -of_objects [get_fileset sources_1] ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci] +launch_run -jobs 8 ${ipName}_synth_1 +wait_on_run ${ipName}_synth_1 + diff --git a/corev_apu/instr_tracing/DPTI/Digilent.licence b/corev_apu/instr_tracing/DPTI/Digilent.licence new file mode 100644 index 00000000000..124159423de --- /dev/null +++ b/corev_apu/instr_tracing/DPTI/Digilent.licence @@ -0,0 +1,40 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software including rights to use, copy, redistribute, and/or sublicense the +Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The Software is only to be used with Digilent Inc. hardware directly or with +Digilent Inc. hardware included in an OEM device. + +The Software may be used for the development of custom programs by the +licensee, for use ONLY with Digilent Inc. hardware. This includes, but is not +limited to, all Dynamic Link Libraries (DLLs), Shared Libraries, documentation, +header files, and Applications Programming Interfaces (APIs). + +You agree that you will not modify, adapt, decompile, reverse engineer, +translate, or otherwise attempt to discover the source code for the Software. + +Digilent Inc. maintains all its rights under all applicable laws, including but +not limited to pertinent intellectual property laws. + +The above copyright notice and this permission notice shall be included in all +copies of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +Copyright (c) 2022 Digilent Inc. + +Contact: +1300 NE Henley Ct. Suite 3 +Pullman, WA 99163 +United States of America + +digilent.com/support + \ No newline at end of file diff --git a/corev_apu/instr_tracing/DPTI/dpti_ctrl.vhd b/corev_apu/instr_tracing/DPTI/dpti_ctrl.vhd new file mode 100755 index 00000000000..7395fdab8f0 --- /dev/null +++ b/corev_apu/instr_tracing/DPTI/dpti_ctrl.vhd @@ -0,0 +1,399 @@ +---------------------------------------------------------------------------------- +-- Company: Digilent Inc. +-- Engineer: +-- +-- Create Date: 16:16:24 10/26/2011 +-- Design Name: +-- Module Name: dpti_ctrl - Behavioral +-- Project Name: +-- Target Devices: +-- Tool versions: +-- Description: This module implements a synchronous DPTI interface. It includes +-- two local FIFOs that allow the data to be moved from the DPTI clock domain +-- to another clock domain in the FPGA. +-- +-- Dependencies: +-- +-- Revision: +-- Revision 0.01 - File Created +-- Additional Comments: +-- 5/30/2016(sjb) -- Prepared for public release +---------------------------------------------------------------------------------- +library IEEE; +use IEEE.STD_LOGIC_1164.ALL; + +-- Uncomment the following library declaration if using +-- arithmetic functions with Signed or Unsigned values +--use IEEE.NUMERIC_STD.ALL; + +-- Uncomment the following library declaration if instantiating +-- any Xilinx primitives in this code. +library UNISIM; +use UNISIM.VComponents.all; + +Library UNIMACRO; +use UNIMACRO.vcomponents.all; + +entity dpti_ctrl is + Port ( + --User Write FIFO signals + wr_clk : in std_logic; + wr_en : in std_logic; + wr_full : out std_logic; + wr_afull : out std_logic; + wr_err : out std_logic; + wr_count : out std_logic_vector(11 downto 0); + wr_di : in std_logic_vector(7 downto 0); + + --User Read FIFO signals + rd_clk : in std_logic; + rd_en : in std_logic; + rd_empty : out std_logic; + rd_aempty : out std_logic; + rd_err : out std_logic; + rd_count : out std_logic_vector(11 downto 0); + rd_do : out std_logic_vector(7 downto 0); + + --misc. signals + rst : in std_logic; --Asynchronously resets the entire component. Must be held high for at least 100ns, or 6 clock cycles of the slowest fifo clock if that is longer + + --DPTI Port signals + prog_clko : in STD_LOGIC; + prog_rxen : in STD_LOGIC; + prog_txen : in STD_LOGIC; + prog_spien : in STD_LOGIC; --called jtagen on some platforms + prog_rdn : out STD_LOGIC; + prog_wrn : out STD_LOGIC; + prog_oen : out STD_LOGIC; + prog_siwun : out STD_LOGIC; + prog_d : inout STD_LOGIC_VECTOR (7 downto 0)); +end dpti_ctrl; + +architecture Behavioral of dpti_ctrl is + + + + + +------------------------------------------------------------------------------- +-- Component Declarations +------------------------------------------------------------------------------- + +component xlnx_dpti_clk is +port + ( + CLK_IN1 : in std_logic; + CLK_OUT1 : out std_logic; + CLK_OUT2 : out std_logic; + LOCKED : out std_logic + ); +end component; + +------------------------------------------------------------------------------- +-- Local Type Declarations +------------------------------------------------------------------------------- + +------------------------------------------------------------------------------- +-- Constant Declarations +------------------------------------------------------------------------------- + +-- The following constants define state codes for the Synchronous PTI port +-- state machine. The high order bits of the state number provide a unique +-- state identifier for each state. The low order bits are the state machine +-- outputs for that state. This type of state machine implementation uses no +-- combinational logic to generate the outputs, which should result in glitch +-- free outputs. + + +constant stPtiRdy : std_logic_vector(6 downto 0):= "0" & "00" & "1111"; +constant stPtiInOut0 : std_logic_vector(6 downto 0):= "1" & "00" & "1111"; +constant stPtiInOut1 : std_logic_vector(6 downto 0):= "1" & "00" & "1011"; +constant stPtiInOut2 : std_logic_vector(6 downto 0):= "1" & "01" & "1010"; +constant stPtiInOut3 : std_logic_vector(6 downto 0):= "1" & "10" & "0101"; + +------------------------------------------------------------------------------- +-- Signal Declarations +------------------------------------------------------------------------------- + +signal stPtiCur : std_logic_vector(6 downto 0) := stPtiRdy; +signal stPtiNext : std_logic_vector(6 downto 0); + +signal clkPti : std_logic; +signal clkIOB : std_logic; +signal locked : std_logic; + +--user fifo signals +signal usrWrClk : std_logic; +signal usrWrEn : std_logic; +signal usrFull : std_logic; +signal usrAFull : std_logic; +signal usrWrErr : std_logic; +signal usrRdClk : std_logic; +signal usrRdEn : std_logic; +signal usrEmpty : std_logic; +signal usrAEmpty : std_logic; +signal usrRdErr : std_logic; +signal usrRdCnt : std_logic_vector(11 downto 0); +signal usrDO : std_logic_vector(7 downto 0); +signal usrWrCnt : std_logic_vector(11 downto 0); +signal usrDI : std_logic_vector(7 downto 0); + +-- Internal control signals +signal ctlRd : std_logic; +signal ctlWr : std_logic; +signal ctlOe : std_logic; +signal ctlDir : std_logic; + +signal ctlRxf : std_logic; +signal ctlTxe : std_logic; +signal ctlRst : std_logic; + +signal ctlFull : std_logic; +signal ctlAFull : std_logic; +signal ctlEmpty : std_logic; +signal ctlFwr : std_logic; +signal ctlFrd : std_logic; + +signal dummyWrCnt : std_logic_vector(11 downto 0); +signal dummyRdCnt : std_logic_vector(11 downto 0); + +signal busPtiTris : std_logic; +signal busPtiOut : std_logic_vector(7 downto 0); + +signal busPtiIn : std_logic_vector(7 downto 0); +signal busPtiInReg : std_logic_vector(7 downto 0); +signal busFifoOut : std_logic_vector(7 downto 0); + +------------------------------------------------------------------------------- +-- Module Implementation +------------------------------------------------------------------------------- + +begin + +--This clocking wizard is used to sychronize the clock used throughout this design +--with the prog_clko input. It reduces delays introduced by the global clocking +--network (~4ns in post-route simulation on Artix 200t). It is also used to generate +--a phase shifted clock for latching input data/flags +clkwiz_inst : xlnx_dpti_clk + port map + ( + CLK_IN1 => prog_clko, + CLK_OUT1 => clkIOB, + CLK_OUT2 => clkPti, + LOCKED => locked); + +--This process latches the inputs from the FTDI part at IOB flip-flops. They are latched +--using a phaseshifted clock about ~11ns after the rising edge of the input clock. This +--makes meeting the input delay timing constraints possible. Additional contstraints for +--traveling from the clkIOB domain to clkPti are automatically inferred by the tools +--because they have a known phase relationship (signals will need to settle in <~5ns). +--If the design fails interclock timing analysis with clkIOB, first ensure that IOB flip +--flops are being instantiated for the registers in this process. Then you can try reducing +--the phase shift by a few degrees (too much will cause the inputdelay constraints to fail). Last +--resort is to modify the design so that these flags are all immediately latched to the clkPti +--domain. +--@sjb: I recently came across this code and began questioning if it is necessary. At first thought, it seems +-- that latching the input signals would add to needed setup times vs. just letting them thru +-- asynchronously. It took me awhile, but I believe I understand why this is needed, so I have decided +-- to document my reasoning further for the next time someone comes across this. +-- I believe I inserted these because the FTDI part only holds the data on the bus valid for 1 ns +-- after a prog_clk edge, and I was concerned that the databus/ctrl signals might +-- beat the clock due to delays introduced by the clocking infrastructure. The IOBs treat this situation +-- by ensuring the data/ctrl gets latched internally the moment it is guarenteed to be valid. This seems like +-- the most architecture independent way to treat the problem, because it only requires three things, all of which +-- are very likely to be present in future FPGA architectures/devices: +-- 1) Ability to generate a clock with minimum input delay (~<3ns) +-- 2) IOB flip-flops with minimum setup requirement (~<3ns) +-- 3) Ability to generate a clock with a 230 degree phase shift relative to the generated clock with minimum input delay. +-- Last note, I think the input_delay constraints with the -min option in timing.xdc describe this requirement +-- to the tools. I'm pretty sure removing these flip-flops will cause the design to fail meeting those constraints. + +process(ctlRst, clkIOB) +begin + if (ctlRst = '1') then + busPtiInReg <= (others =>'0'); + ctlRxf <= '0'; + ctlTxe <= '0'; + elsif (rising_edge(clkIOB)) then + busPtiInReg <= busPtiIn; + ctlRxf <= prog_rxen; + ctlTxe <= prog_txen; + end if; +end process; + +------------------------------------------------------------------------------- +-- Map basic status and control signals +------------------------------------------------------------------------------- + +--Asynchronous reset signal +ctlRst <= (prog_spien or rst) or not(locked); + + +--Top level output mapping +prog_siwun <= '1'; +prog_wrn <= ctlWr; +prog_rdn <= ctlRd; +prog_oen <= ctlOe; + +-- Data bus direction and control. +IOBUF_gen : for index in 0 to 7 generate + IOBUF_inst : IOBUF + generic map ( + DRIVE => 16, + SLEW => "FAST") + port map ( + O => busPtiIn(index), -- Buffer output + IO => prog_d(index), -- Buffer inout port (connect directly to top-level port) + I => busPtiOut(index), -- Buffer input + T => busPtiTris -- 3-state enable input, high=input, low=output + ); +end generate; + +busPtiTris <= ctlDir or ctlRst; + +------------------------------------------------------------------------------- +-- PTI State Machine +------------------------------------------------------------------------------- + +-- Map glitch-less control signals from the current state +ctlRd <= stPtiCur(0); --keep in mind: active low +ctlWr <= stPtiCur(1) or ctlEmpty; --keep in mind: active low +ctlOe <= stPtiCur(2); +ctlDir <= stPtiCur(3); + +--Map additional control signals from the current state +ctlFwr <= stPtiCur(4) and not ctlRxf; +ctlFrd <= stPtiCur(5) and ((not ctlTxe) and (not ctlEmpty)); + +-- This process moves the state machine to the next state on each clock. +process (clkPti, ctlRst) +begin + if ctlRst = '1' then + stPtiCur <= stPtiRdy; + elsif clkPti = '1' and clkPti'Event then + stPtiCur <= stPtiNext; + end if; +end process; + +-- This process determines the next state based on the current state and the +-- state machine inputs. +-- TODO: It appears the bandwidth is very limited when the FTDI->FPGA FPGA side FIFO +-- gets almost filled (4080 out of 4096). Almost full seems to take a very long time +-- to deassert, regardless of how fast the user is reading data. This causes the state machine +-- to continuosly receive a single byte at a time (1/3 bandwidth) until the FIFO is full, or until +-- the FIFO has been read by the user past the almost fill point and no data has been available on +-- the DPTI bus for a long time (~50 us). Need to fix this because it will lower bandwidth of designs that involve +-- continuously sending large amounts of data to the FPGA. +process (stPtiCur, stPtiNext, ctlRxf, ctlTxe, ctlFull, ctlAFull, ctlEmpty) +begin + case stPtiCur is + when stPtiRdy => + stPtiNext <= stPtiInOut0; + + when stPtiInOut0 => --Start any pending transactions + if ctlRxf = '0' and ctlFull = '0' then --Receive data from FTDI (gets priority) + stPtiNext <= stPtiInOut1; + elsif ctlTxe = '0' and ctlEmpty = '0' then --send data to FTDI + stPtiNext <= stPtiInOut3; + else --no transaction yet + stPtiNext <= stPtiInOut0; + end if; + + when stPtiInOut1 => --Initiate read transaction (FTDI->FPGA) + stPtiNext <= stPtiInOut2; + + when stPtiInOut2 => --Continue Read transaction + if ctlRxf = '0' and ctlAFull = '0' then + stPtiNext <= stPtiInOut2; + else --if no data available, or FPGA-side FIFO is almost full, stop transaction + stPtiNext <= stPtiInOut0; + end if; + + when stPtiInOut3 => --Start/Continue write transaction (FPGA->FTDI) + if ctlTxe = '0' and ctlEmpty = '0' then --note almost empty is used because the FIFO is first-word fall thru + stPtiNext <= stPtiInOut3; + else --if FTDI FIFO is full, or we are on the last byte being sent, stop transaction + stPtiNext <= stPtiInOut0; + end if; + + when others => + stPtiNext <= stPtiRdy; + end case; +end process; + +------------------------------------------------------------------------------- +-- Input/Output Fifos for data +------------------------------------------------------------------------------- + +--Output Fifo +usr2dpti_fifo : FIFO_DUALCLOCK_MACRO +generic map ( + DEVICE => "7SERIES", -- Target Device: "VIRTEX5", "VIRTEX6", "7SERIES" + ALMOST_FULL_OFFSET => X"0FF0", -- Sets almost full threshold + ALMOST_EMPTY_OFFSET => X"000F", -- Sets the almost empty threshold + DATA_WIDTH => 8, -- Valid values are 1-72 (37-72 only valid when FIFO_SIZE="36Kb") + FIFO_SIZE => "36Kb", -- Target BRAM, "18Kb" or "36Kb" + FIRST_WORD_FALL_THROUGH => TRUE) -- Sets the FIFO FWFT to TRUE or FALSE +port map ( + ALMOSTEMPTY => open, -- 1-bit output almost empty + ALMOSTFULL => usrAFull, -- 1-bit output almost full + DO => busPtiOut, -- Output data, width defined by DATA_WIDTH parameter + EMPTY => ctlEmpty, -- 1-bit output empty + FULL => usrFull, -- 1-bit output full + RDCOUNT => dummyRdCnt, -- Output read count, width determined by FIFO depth + RDERR => open, -- 1-bit output read error + WRCOUNT => usrWrCnt, -- Output write count, width determined by FIFO depth + WRERR => usrWrErr, -- 1-bit output write error + DI => usrDI, -- Input data, width defined by DATA_WIDTH parameter + RDCLK => clkPti, -- 1-bit input read clock + RDEN => ctlFrd, -- 1-bit input read enable + RST => ctlRst, -- 1-bit input reset + WRCLK => usrWrClk, -- 1-bit input write clock + WREN => usrWrEn -- 1-bit input write enable +); + +usrWrClk <= wr_clk; +usrWrEn <= wr_en; +wr_full <= usrFull; +wr_afull <= usrAFull; +wr_err <= usrWrErr; +wr_count <= usrWrCnt; +usrDI <= wr_di; + +--Input Fifo +dpti2usr_fifo : FIFO_DUALCLOCK_MACRO +generic map ( + DEVICE => "7SERIES", -- Target Device: "VIRTEX5", "VIRTEX6", "7SERIES" + ALMOST_FULL_OFFSET => X"0FF0", -- Sets almost full threshold + ALMOST_EMPTY_OFFSET => X"000F", -- Sets the almost empty threshold + DATA_WIDTH => 8, -- Valid values are 1-72 (37-72 only valid when FIFO_SIZE="36Kb") + FIFO_SIZE => "36Kb", -- Target BRAM, "18Kb" or "36Kb" + FIRST_WORD_FALL_THROUGH => TRUE) -- Sets the FIFO FWFT to TRUE or FALSE +port map ( + ALMOSTEMPTY => usrAEmpty, -- 1-bit output almost empty + ALMOSTFULL => ctlAFull, -- 1-bit output almost full + DO => usrDO, -- Output data, width defined by DATA_WIDTH parameter + EMPTY => usrEmpty, -- 1-bit output empty + FULL => ctlFull, -- 1-bit output full + RDCOUNT => usrRdCnt, -- Output read count, width determined by FIFO depth + RDERR => usrRdErr, -- 1-bit output read error + WRCOUNT => dummyWrCnt, -- Output write count, width determined by FIFO depth + WRERR => open, -- 1-bit output write error + DI => busPtiInReg, -- Input data, width defined by DATA_WIDTH parameter + RDCLK => usrRdClk, -- 1-bit input read clock + RDEN => usrRdEn, -- 1-bit input read enable + RST => ctlRst, -- 1-bit input reset + WRCLK => clkPti, -- 1-bit input write clock + WREN => ctlFwr -- 1-bit input write enable +); + +usrRdClk <= rd_clk; +usrRdEn <= rd_en; +rd_empty <= usrEmpty; +rd_aempty <= usrAEmpty; +rd_err <= usrRdErr; +rd_count <= usrRdCnt; +rd_do <= usrDO; + +end Behavioral; + diff --git a/corev_apu/instr_tracing/DPTI/slicer_DPTI.sv b/corev_apu/instr_tracing/DPTI/slicer_DPTI.sv new file mode 100644 index 00000000000..7a80687cc3c --- /dev/null +++ b/corev_apu/instr_tracing/DPTI/slicer_DPTI.sv @@ -0,0 +1,66 @@ +// Copyright (c) 2025 Thales DIS design services SAS +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +// Author: Maxime Colson - Thales +// Date: 21/05/2025 +module slicer_DPTI #( + parameter SLICE_LEN = 32, + parameter NO_TIME = 0 // 0 : include time ; 1 : exclude time +) ( + input logic clk_i, + input logic rst_ni, + + input logic valid_i, + input encap_pkg::encap_fifo_entry_s encap_fifo_entry_i, + input logic fifo_full_i, + + output logic valid_o, + output logic [SLICE_LEN-1:0] slice_o, + output logic done_o +); + localparam DATA_LEN = encap_pkg::H_LEN + (NO_TIME ? 0 : encap_pkg::T_LEN) + encap_pkg::PAYLOAD_LEN; + localparam NUM_SLICES = DATA_LEN / SLICE_LEN; + localparam COUNT_LEN = $clog2(NUM_SLICES); + + logic [DATA_LEN-1 : 0] data_to_slice_q, data_to_slice_d; + logic [COUNT_LEN-1:0] slice_index_d, slice_index_q; + logic running_q, running_d; + + assign slice_o = data_to_slice_q[DATA_LEN-1:DATA_LEN-SLICE_LEN]; + assign valid_o = running_q && !fifo_full_i; + assign done_o = running_q && (slice_index_q == NUM_SLICES - 1) && !fifo_full_i; + + always_comb begin + data_to_slice_d = data_to_slice_q; + slice_index_d = slice_index_q; + running_d = running_q; + + if (valid_i && !running_q) begin + //new data to slice + data_to_slice_d = NO_TIME ? {encap_fifo_entry_i.header,encap_fifo_entry_i.payload} : + {encap_fifo_entry_i.header,encap_fifo_entry_i.timestamp,encap_fifo_entry_i.payload}; + slice_index_d = 0; + running_d = 1; + end else if (running_q && !fifo_full_i) begin // Stall if fifo is full + //Slicing + data_to_slice_d = data_to_slice_q << SLICE_LEN; + slice_index_d = slice_index_q + 1; + if (slice_index_q == NUM_SLICES - 1) begin + running_d = 0; + end + end + end + + always_ff @(posedge clk_i or negedge rst_ni) begin + if (!rst_ni) begin + data_to_slice_q <= '0; + slice_index_q <= '0; + running_q <= '0; + end else begin + data_to_slice_q <= data_to_slice_d; + slice_index_q <= slice_index_d; + running_q <= running_d; + end + end + + +endmodule diff --git a/corev_apu/instr_tracing/Decapsuler/Decapsuler.cpp b/corev_apu/instr_tracing/Decapsuler/Decapsuler.cpp new file mode 100644 index 00000000000..fea1d5aba7a --- /dev/null +++ b/corev_apu/instr_tracing/Decapsuler/Decapsuler.cpp @@ -0,0 +1,311 @@ +// Copyright (c) 2025 Thales DIS design services SAS +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +// Author: Maxime Colson - Thales +// Date: 17/06/2025 +// Contributors: +// Côme Allart - Thales + +// This code is designed to decapsulate a RAW format into a csv Trace. It is used to convert them in a human readable format for CI diff. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +const size_t NR_PKT = 20; +const size_t PACKET_SIZE = 40; +const size_t BLOCK_SIZE = NR_PKT * PACKET_SIZE; +typedef unsigned char BYTE; +using packet_t = std::array; +typedef std::array sample_t; + +uint64_t extract_bits(const packet_t &packet, std::size_t bit_offset, + std::size_t bit_length) { // FIXME add assertion to prevent desynchro segfault + uint64_t result = 0xdead; // We use 'dead' as an indicator to quickly detect if a desynchro happened during the aquisition (without stoping decapsulation) + if (bit_length <= 64) { + result = 0; + for (std::size_t i = 0; i < bit_length; ++i) { + std::size_t global_bit = bit_offset + i; + std::size_t byte_index = global_bit / 8; + std::size_t bit_index = 7 - (global_bit % 8); + uint64_t bit = (packet[byte_index] >> bit_index) & 0x1; + result = (result << 1) | bit; + } + } + return result; +} + +template struct PrintableOption : public std::optional { + PrintableOption(std::optional &o) : std::optional(o) {} + PrintableOption(T &v) : std::optional(v) {} + PrintableOption(uint64_t v) : std::optional(v) {} + PrintableOption() : std::optional() {} + + friend std::ostream &operator<<(std::ostream &s, const PrintableOption &o) { + if (o.has_value()) + s << unsigned(*o); + else + s << "_"; + + return s; + } +}; + +struct BitExtractor { + const packet_t &packet; + bool is_backward; + size_t i; + + BitExtractor(const packet_t &packet, bool backward) + : packet(packet), is_backward(backward), + i(backward ? PACKET_SIZE * 8 : 0) {} + + uint64_t operator()(size_t bits) { return extract(bits); } + uint64_t to(size_t bit) { return extract_to(bit); } + + uint64_t extract_to(size_t bit) { return extract(i - bit); } + uint64_t extract(size_t bits) { + if (is_backward) + i -= bits; + + uint64_t result = extract_bits(packet, i, bits); + + if (!is_backward) + i += bits; + + return result; + } +}; + +struct Trace { + bool P_Time; // MSB + uint8_t P_ID; // 2 bits after MSB + uint8_t P_Size; // 5bits after P_ID + uint64_t P_Timestamp; // 64 bits after P_Size + PrintableOption format; // 2bits LSB + PrintableOption subformat; // 2bits before LSB if format=3 + PrintableOption address; // start of payload + PrintableOption branch; // F3SF0 (5) F3SF1 (5) else NDF + PrintableOption branches; // F1 (3) + PrintableOption branch_map; // F1 (4 : branches) + PrintableOption branch_count; // NDF + PrintableOption branch_fmt; // NDF + PrintableOption context; // NDF + PrintableOption ecause; //F3SF1 (8) F3SF1T (70) + PrintableOption ienable; //F3SF3 (5) + PrintableOption encoder_mode;//F3SF3 (6) + PrintableOption interrupt; // F3SF1(9) F3SF1T(71) + PrintableOption irreport; // F2 (5) F1(5) + PrintableOption irdepth; //if call/ret F2(6:2^cal) F1(6:2^cal) else NDF + PrintableOption notify; // F2(3) F1(3) + PrintableOption ioptions; //F3SF3 (8:15) + PrintableOption privilege; // F3SF0 (6) F3SF1 (6) F3SF2 (5) + PrintableOption qual_status;// F3SF3(7) + PrintableOption time; //if time F3SF0(8:72) F3SF1(8:72) F3SF2(7:71) //FIXME encoder could have time in last position + PrintableOption thaddr; // F3SF1(40) F3SF1_t(104) + PrintableOption tval; //F3SF1 (41:73) F3SF1_t(105:137) + PrintableOption updiscon;// F2(4) + PrintableOption denable;// NDF here + PrintableOption dloss;// NDF here + PrintableOption doptions;// NDF here + uint8_t size_branch_map; + + Trace(const packet_t &packet, bool time_flag, bool call_flag) { + size_branch_map = 0; + + BitExtractor header_extractor(packet, false); + BitExtractor payload_extractor(packet, true); + + // Header of encapsulated packet : + P_Time = header_extractor(1); + P_ID = header_extractor(2); + P_Size = header_extractor(5); + size_t P_Start = (PACKET_SIZE - P_Size) * 8; + P_Timestamp = header_extractor(64); + + // Extraction of fields contained in the payload : + format = payload_extractor(2); + if (format == 3) { + subformat = payload_extractor(2); + } + + if (format == 3 && subformat.has_value()) { + switch (subformat.value()) { + case 0: { // F3SF0 + branch = payload_extractor(1); + privilege = payload_extractor(2); + if (time_flag) { + time = payload_extractor(64); + } + address = payload_extractor.to(P_Start); + break; + } + case 1: { // F3SF1 + branch = payload_extractor(1); + privilege = payload_extractor(2); + if (time_flag) { + time = payload_extractor(64); + } + ecause = payload_extractor(32); + interrupt = payload_extractor(1); + thaddr = payload_extractor(1); + tval = payload_extractor(32); + address = payload_extractor.to(P_Start); + break; + } + case 2: { // F3SF2 + privilege = payload_extractor(2); + if (time_flag) { + time = payload_extractor(64); + } + break; + } + case 3: { // F3SF3 + ienable = payload_extractor(1); + encoder_mode = payload_extractor(1); + qual_status = payload_extractor(2); + ioptions = payload_extractor(7); + break; + } + } + } + + // F2 + if (format == 2) { + notify = payload_extractor(1); + updiscon = payload_extractor(1); + irreport = payload_extractor(1); + if (call_flag) { // FIXME addapt to call_counter_size + irdepth = payload_extractor(1); // if = 0 else 2^call_counter_size + } + address = payload_extractor.to(P_Start); + } + + // F1 + if (format == 1) { + branches = payload_extractor(5); + if (branches == 0) { + size_branch_map = 31; + } else if (branches == 1) { + size_branch_map = 1; + } else if (branches <= 3) { + size_branch_map = 3; + } else if (branches <= 7) { + size_branch_map = 7; + } else if (branches <= 15) { + size_branch_map = 15; + } else { + size_branch_map = 31; + } + branch_map = payload_extractor(size_branch_map); + + if (branches != 0) { + notify = payload_extractor(1); + updiscon = payload_extractor(1); + irreport = payload_extractor(1); + if (call_flag) { // FIXME addapt to call_counter_size + irdepth = payload_extractor(1); // if = 0 else 2^call_counter_size + } + address = payload_extractor.to(P_Start); + } + } + } + + static std::string csvHeader() { + return std::string( + "format,subformat,address,branch,branches,branch_map,branch_count," + "branch_fmt,context,ecause,ienable,encoder_mode,interrupt,irreport," + "irdepth,notify,ioptions,privilege,qual_status,time,thaddr,tval," + "updiscon,denable,dloss,doptions"); + } + + friend std::ostream &operator<<(std::ostream &s, Trace const &trace) { + trace.put_str(s); + return s; + } + + std::ostream &put_str(std::ostream &s) const { + s << format << "," << subformat << ","; + + s << std::hex << std::nouppercase << address << std::dec << ","; + + s << branch << "," << branches << "," << branch_map << "," << branch_count + << "," << branch_fmt << ","; + + s << context << "," << ecause << "," << ienable << "," << encoder_mode + << "," << interrupt << ","; + + s << irreport << "," << irdepth << "," << notify << "," << ioptions << "," + << privilege << "," << qual_status << ","; + + s << std::hex << std::nouppercase << time << std::dec << ","; + + s << thaddr << "," << tval << "," << updiscon << "," << denable << "," + << dloss << "," << doptions; + + return s; + } + + std::string toCSVLine() { + std::ostringstream oss; + oss << *this; + return oss.str(); + } +}; + + packet_t hexstr_to_packet(const std::string &hexstr){ + unsigned int byte; + packet_t packet; + for (int i=0; i< 40; i++){ + std::sscanf(hexstr.c_str() + 2*i, "%2x",&byte); + packet[i] = (BYTE) byte; + } + return packet; + } + + std::filesystem::path ext_csv(const std::filesystem::path &pi) { + auto po = pi ; + po.replace_extension(".csv"); + return po; + } + +int main(int argc, char* argv[]) { + if (argc <2){ + std::cerr << "Usage: "<< argv[0] <<" Filepath \n"; + return 1; + } + + const bool TIME_FLAG = 1; + const bool CALL_FLAG = 0; + std::filesystem::path nameFile_i = argv[1]; + std::filesystem::path nameFile_o = ext_csv(nameFile_i); + + std::vector all_packets; + std::ifstream file_to_extract(nameFile_i); + std::ofstream csvFile(nameFile_o); + std::string line; + + while(std::getline(file_to_extract,line)){ + packet_t packet; + packet=hexstr_to_packet(line); + all_packets.push_back(packet); + } + + std::cout << "Number packet read :" << all_packets.size() << std::endl; + csvFile << Trace::csvHeader() << "\n"; + for (packet_t &packet : all_packets){ + Trace trace(packet, TIME_FLAG, CALL_FLAG); + csvFile << trace.toCSVLine() << "\n"; + } + + return 0; +} \ No newline at end of file diff --git a/corev_apu/instr_tracing/Decapsuler/Makefile b/corev_apu/instr_tracing/Decapsuler/Makefile new file mode 100644 index 00000000000..5de6887a2a7 --- /dev/null +++ b/corev_apu/instr_tracing/Decapsuler/Makefile @@ -0,0 +1,29 @@ +# Copyright 2025 Thales DIS design services SAS +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Author: Maxime Colson - Thales + +# Makefile to build the Decapsuler executable + +CC = $(GCC_11_5_PATH)/g++ +TARGETS = Decapsuler +CFLAGS = -Wall -Wextra -g + +all: $(TARGETS) + +Decapsuler: Decapsuler.cpp + $(CC) --version + $(CC) -o Decapsuler Decapsuler.cpp $(CFLAGS) + +.PHONY: clean + +clean: + rm -f $(TARGETS) + +clean_all: + rm -f $(TARGETS) + rm -rf receiver_data diff --git a/corev_apu/instr_tracing/Decapsuler/affiche_csv.py b/corev_apu/instr_tracing/Decapsuler/affiche_csv.py new file mode 100644 index 00000000000..5d29ce00f26 --- /dev/null +++ b/corev_apu/instr_tracing/Decapsuler/affiche_csv.py @@ -0,0 +1,34 @@ +# Copyright 2025 Thales DIS design services SAS +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Author: Maxime Colson - Thales +# Script used to print a csv file in a more readable way +import pandas as pd +import argparse +import os + +pd.set_option('display.max_columns',None) +pd.set_option('display.max_rows',None) +pd.set_option("display.width",220) + +parser = argparse.ArgumentParser(description="Print the CSV file in a more readable format") +parser.add_argument("--file","-f",required=True, help="CSV file path") +args = parser.parse_args() + +csv_path = args.file + +if not os.path.isfile(csv_path): + print(f"Error '{csv_path}' does not exist") + exit(1) + +df = pd.read_csv(csv_path) + +#print(df) + +output_filename = os.path.splitext(os.path.basename(csv_path))[0] + "_output.txt" +with open(output_filename, "w",encoding="utf-8") as f: + f.write(df.to_string(index=False)) \ No newline at end of file diff --git a/corev_apu/instr_tracing/Decapsuler/compare_encoder.sh b/corev_apu/instr_tracing/Decapsuler/compare_encoder.sh new file mode 100755 index 00000000000..823ba3408dc --- /dev/null +++ b/corev_apu/instr_tracing/Decapsuler/compare_encoder.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +# Copyright 2025 Thales DIS design services SAS +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Author: Maxime Colson - Thales + +set -euo pipefail + +if [ "$#" -ne 2 ]; then + echo "Usage: $0 " + exit 2 +fi + +dir_work="encoder_log" +rm -rf "$dir_work" +mkdir -p "$dir_work" + +trace_raw_path="$1" +trace_ref_path="$2" + + +base_raw=$(basename "$trace_raw_path") +base_ref=$(basename "$trace_ref_path") + + +for trace in "$trace_raw_path" "$trace_ref_path"; do + if [ ! -f "$trace" ]; then + echo "ERROR file '$trace' does not exist" + exit 1 + fi + base=$(basename "$trace") + cp "$trace" "$dir_work/$base" +done + +trace_raw="$dir_work/$base_raw" +trace_ref="$dir_work/$base_ref" + +./Decapsuler "$trace_raw" + +python3 affiche_csv.py -f "$dir_work/${base_raw%.txt}.csv" +mv "${base_raw%.txt}_output.txt" "$dir_work" +python3 affiche_csv.py -f "$trace_ref" +mv "${base_ref%.te_inst}_output.txt" "$dir_work" + + +python3 diff_color.py "$dir_work/${base_raw%.txt}.csv" "$trace_ref" + + \ No newline at end of file diff --git a/corev_apu/instr_tracing/Decapsuler/debug_encoder_diff.sh b/corev_apu/instr_tracing/Decapsuler/debug_encoder_diff.sh new file mode 100644 index 00000000000..85afb5745bf --- /dev/null +++ b/corev_apu/instr_tracing/Decapsuler/debug_encoder_diff.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# Copyright 2025 Thales DIS design services SAS +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Author: Maxime Colson - Thales + +exit_error() { + echo "$1" >&2 + exit ${2:-1} +} + +if [ "$#" -ne 1 ]; then + exit_error "Usage: $0 " 2 +fi + +exe="$1" +base=$(basename "$exe" .o) + +#TODO \ No newline at end of file diff --git a/corev_apu/instr_tracing/Decapsuler/diff_color.py b/corev_apu/instr_tracing/Decapsuler/diff_color.py new file mode 100644 index 00000000000..be107c9974f --- /dev/null +++ b/corev_apu/instr_tracing/Decapsuler/diff_color.py @@ -0,0 +1,104 @@ +# Copyright 2025 Thales DIS design services SAS +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Author: Maxime Colson - Thales + + +import csv +import sys +import re + +def gray(s): return f"\033[90m{s}\033[0m" +def red(s): return f"\033[91m{s}\033[0m" +def green(s): return f"\033[92m{s}\033[0m" +def white(s): return f"\033[97m{s}\033[0m" + +ANSI_ESCAPE= re.compile + +def strip(text): + return re.sub(r'\x1b\[[0-9;]*m','',text) + +def read_csv_to_matrix(filepath): + with open(filepath,newline='') as csvfile: + reader = csv.reader(csvfile,delimiter=',') + rows = list(reader) + header = rows[0] + data = rows[1:] + return header,data + + + +def format_value(val_gen, val_ref): + if val_gen is None: + return f"{red('NDF')}{white(' -> ')}{green(val_ref)}" + elif val_gen == val_ref: + return gray(val_gen) + else: + return f"{red(val_gen)}{white(' -> ')}{green(val_ref)}" + +def compare_matrices(header,gen_data,ref_data): + max_rows = max(len(gen_data),len(ref_data)) + num_cols = len(header) + result_matrix = [[None for _ in range (num_cols)] for _ in range(max_rows)] + + for row_idx in range(max_rows): + for col_idx in range(num_cols): + try: + val_ref = ref_data[row_idx][col_idx] + except IndexError: + val_ref="" + try: + val_gen = gen_data[row_idx][col_idx] + except IndexError: + val_gen=None + result_matrix[row_idx][col_idx] = format_value(val_gen,val_ref) + + return result_matrix + +def print_column_by_column(header,matrix,cols_per_block=8): + num_cols = len(header) + num_rows = len(matrix) + + for block_start in range(0,num_cols, cols_per_block): + block_end = min(block_start + cols_per_block,num_cols) + block_indices = range(block_start,block_end) + + col_widths =[] + for i in block_indices: + max_len = max(len(strip(matrix[r][i])) for r in range(num_rows)) + max_len = max(max_len, len(header[i])) + col_widths.append(max_len + 2) + header_line ="" + for i,w in zip(block_indices,col_widths): + header_line += header[i].center(w) + " " + print(header_line) + + for r in range(num_rows): + row_line = "" + for i,w in zip(block_indices,col_widths): + content = matrix[r][i] + pad_len = w - len(strip(content)) + left_pad = pad_len // 2 + right_pad = pad_len - left_pad + row_line += " "*left_pad + content + " "*right_pad + " " + print(row_line) + + print("\n") + +if __name__ == "__main__": + if len(sys.argv) != 3: + print("usage : diff.py ") + sys.exit(1) + + gen_path = sys.argv[1] + ref_path = sys.argv[2] + + gen_header, gen_data = read_csv_to_matrix(gen_path) + ref_header , ref_data = read_csv_to_matrix(ref_path) + + matrix = compare_matrices(ref_header,gen_data,ref_data) + print_column_by_column(ref_header,matrix,cols_per_block=14) diff --git a/corev_apu/instr_tracing/ITI/cva6_iti/block_retirement.sv b/corev_apu/instr_tracing/ITI/cva6_iti/block_retirement.sv new file mode 100644 index 00000000000..aaa2e0d115f --- /dev/null +++ b/corev_apu/instr_tracing/ITI/cva6_iti/block_retirement.sv @@ -0,0 +1,96 @@ +// Copyright (c) 2025 Thales DIS design services SAS +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +// Author: Maxime Colson - Thales +// Date: 20/03/2025 +// Contributors: +// Darshak Sheladiya, SYSGO GmbH +// Umberto Laghi, UNIBO + +//Systolic module used to determines the iaddr, ilastsize, iretire for Encoder Module + + +module block_retirement #( + parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty, + parameter type uop_entry_t = logic, + parameter type itt_out_t = logic, + parameter CAUSE_LEN = 5, //Size is ecause_width_p in the E-Trace SPEC + parameter ITYPE_LEN = 3, //Size is itype_width_p in the E-Trace SPEC (3 or 4) + parameter IRETIRE_LEN = 32 //Size is iretire_width_p in the E-Trace SPEC +) ( + input uop_entry_t uop_entry_i, + input logic [ CAUSE_LEN-1:0] cause_i, + input logic [CVA6Cfg.XLEN-1:0] tval_i, + input logic [ IRETIRE_LEN-1:0] counter_i, + input logic [CVA6Cfg.XLEN-1:0] iaddr_i, + input logic was_special_i, + + output itt_out_t itt_out_o, + output logic [ IRETIRE_LEN-1:0] counter_o, + output logic [CVA6Cfg.XLEN-1:0] iaddr_o, + output logic is_special_o +); + + logic special_inst; + logic exception; + logic interrupt; + assign special_inst = !(uop_entry_i.itype inside {iti_pkg::INT, iti_pkg::EXC, iti_pkg::STANDARD}) && uop_entry_i.valid ; + assign exception = (uop_entry_i.itype == iti_pkg::EXC) ? 1'b1 : 1'b0; + assign interrupt = (uop_entry_i.itype == iti_pkg::INT) ? 1'b1 : 1'b0; + + always_comb begin + counter_o = counter_i; + is_special_o = was_special_i; + iaddr_o = iaddr_i; + itt_out_o = '0; + + if (uop_entry_i.valid) begin + + if (was_special_i) begin + counter_o = 0; + iaddr_o = uop_entry_i.pc; + is_special_o = 1'b0; + end + + counter_o = uop_entry_i.compressed ? counter_o + 1 : counter_o + 2; + + if (special_inst) begin + itt_out_o.valid = 1'b1; + itt_out_o.iretire = counter_o; + itt_out_o.itype = uop_entry_i.itype; + itt_out_o.ilastsize = ~uop_entry_i.compressed; + itt_out_o.iaddr = iaddr_o; + itt_out_o.priv = uop_entry_i.priv; + itt_out_o.cycles = uop_entry_i.cycles; + itt_out_o.cause = '0; + itt_out_o.tval = '0; + is_special_o = 1'b1; + end + + if (interrupt) begin + itt_out_o.valid = 1'b1; + itt_out_o.iretire = uop_entry_i.compressed ? 1 : 2; + itt_out_o.itype = uop_entry_i.itype; + itt_out_o.ilastsize = ~uop_entry_i.compressed; + itt_out_o.iaddr = uop_entry_i.pc; + itt_out_o.priv = uop_entry_i.priv; + itt_out_o.cycles = uop_entry_i.cycles; + itt_out_o.cause = cause_i; + itt_out_o.tval = '0; + is_special_o = 1'b1; + end + + if (exception) begin + itt_out_o.valid = 1'b1; + itt_out_o.iretire = uop_entry_i.compressed ? 1 : 2; + itt_out_o.itype = uop_entry_i.itype; + itt_out_o.ilastsize = ~uop_entry_i.compressed; + itt_out_o.iaddr = uop_entry_i.pc; + itt_out_o.priv = uop_entry_i.priv; + itt_out_o.cycles = uop_entry_i.cycles; + itt_out_o.cause = cause_i; + itt_out_o.tval = tval_i; + is_special_o = 1'b1; + end + end + end +endmodule diff --git a/corev_apu/instr_tracing/ITI/cva6_iti/iti.sv b/corev_apu/instr_tracing/ITI/cva6_iti/iti.sv new file mode 100644 index 00000000000..c8f69536ca3 --- /dev/null +++ b/corev_apu/instr_tracing/ITI/cva6_iti/iti.sv @@ -0,0 +1,214 @@ +// Copyright (c) 2025 Thales DIS design services SAS +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +// Author: Maxime Colson - Thales +// Date: 20/03/2025 +// Contributors: +// Darshak Sheladiya, SYSGO GmbH +// Umberto Laghi, UNIBO + +// For reference : See Section 4.2 Instruction Trace Interface from Efficient Trace for RISC-V v2.0 (may 5 2022) +// iti stand for Instruction Trace Interface, changing because tip (Trace Ingress Port) and "type" are too similar creating confusion + +module cva6_iti #( + parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty, + parameter CAUSE_LEN = 5, //Size is ecause_width_p in the E-Trace SPEC + parameter ITYPE_LEN = 3, //Size is itype_width_p in the E-Trace SPEC (3 or 4) + parameter IRETIRE_LEN = 32, //Size is iretire_width_p in the E-Trace SPEC + parameter block_mode = 0, + parameter type rvfi_to_iti_t = logic, + parameter type iti_to_encoder_t = logic +) ( + input logic clk_i, + input logic rst_ni, + + input logic [CVA6Cfg.NrCommitPorts-1:0] valid_i, + input rvfi_to_iti_t rvfi_to_iti_i, + + output logic [CVA6Cfg.NrCommitPorts-1:0] valid_o, + output iti_to_encoder_t iti_to_encoder_o +); + + // pragma translate_off + int f; + initial begin + f = $fopen("iti.traces", "w"); + $fwrite(f, "itype_0,cause,tval,priv,iaddr_0,context,ctype,iretire_0,ilastsize_0\n"); + end + final $fclose(f); + // pragma translate_on + + /* Structure used for each instr*/ + localparam type uop_entry_t = struct packed { + logic valid; + logic [CVA6Cfg.XLEN-1:0] pc; + iti_pkg::itype_t itype; + logic compressed; + riscv::priv_lvl_t priv; + logic [63:0] cycles; + }; + + /* Structure used to output trace_signals if special instr */ + localparam type itt_out_t = struct packed { + logic valid; + logic [IRETIRE_LEN-1:0] iretire; + iti_pkg::itype_t itype; + logic ilastsize; + logic [CVA6Cfg.XLEN-1:0] iaddr; + riscv::priv_lvl_t priv; + logic [CAUSE_LEN-1:0] cause; + logic [CVA6Cfg.XLEN-1:0] tval; + logic [63:0] cycles; + }; + + logic interrupt; + iti_pkg::itype_t [CVA6Cfg.NrCommitPorts-1:0] itype; + + logic [IRETIRE_LEN-1:0] counter_d, counter_q; + logic [CVA6Cfg.XLEN-1:0] addr_d, addr_q; + logic special_d, special_q; + + uop_entry_t [CVA6Cfg.NrCommitPorts-1:0] uop_entry; + itt_out_t [CVA6Cfg.NrCommitPorts-1:0] itt_out; + + logic [CVA6Cfg.NrCommitPorts-1:0][IRETIRE_LEN-1:0] counter_itt; + logic [CVA6Cfg.NrCommitPorts-1:0][CVA6Cfg.XLEN-1:0] addr_itt; + logic [CVA6Cfg.NrCommitPorts-1:0] special_itt; + logic [CVA6Cfg.NrCommitPorts-1:0][CAUSE_LEN-1:0] cause_itt; + logic [CVA6Cfg.NrCommitPorts-1:0][CVA6Cfg.XLEN-1:0] tval_itt; + + logic [CVA6Cfg.NrCommitPorts-1:0][IRETIRE_LEN-1:0] counter; + logic [CVA6Cfg.NrCommitPorts-1:0][CVA6Cfg.XLEN-1:0] addr; + logic [CVA6Cfg.NrCommitPorts-1:0] special; + + + assign interrupt = rvfi_to_iti_i.cause[CVA6Cfg.XLEN-1]; // determined based on the MSB of cause + + for (genvar i = 0; i < CVA6Cfg.NrCommitPorts; i++) begin + itype_detector #( + .ITYPE_LEN(ITYPE_LEN) + ) i_itype_detector ( + .valid_i (valid_i[i]), + .exception_i (rvfi_to_iti_i.ex_valid), + .interrupt_i (interrupt), + .op_i (rvfi_to_iti_i.op[i]), + .branch_taken_i(rvfi_to_iti_i.is_taken[i]), + .itype_o (itype[i]) + ); + + // Adding this to ensure that interrupt/exception happen only in commit port 0 of cva6 + assign cause_itt[i] = i == 0 ? rvfi_to_iti_i.cause[CAUSE_LEN-1:0] : '0; + assign tval_itt[i] = i == 0 ? rvfi_to_iti_i.tval : '0; + + if (block_mode) begin + // Systolic logic (First block_retirement is connected to D Flip-Flop to continue computation if needed) + assign counter_itt[i] = i == 0 ? counter_q : counter[i-1]; + assign addr_itt[i] = i == 0 ? addr_q : addr[i-1]; + assign special_itt[i] = i == 0 ? special_q : special[i-1]; + + block_retirement #( + .CVA6Cfg(CVA6Cfg), + .uop_entry_t(uop_entry_t), + .itt_out_t(itt_out_t), + .CAUSE_LEN(CAUSE_LEN), + .ITYPE_LEN(ITYPE_LEN), + .IRETIRE_LEN(IRETIRE_LEN) + ) i_block_retirement ( + .uop_entry_i(uop_entry[i]), + .cause_i(cause_itt[i]), + .tval_i(tval_itt[i]), + .counter_i(counter_itt[i]), + .iaddr_i(addr_itt[i]), + .was_special_i(special_itt[i]), + .itt_out_o(itt_out[i]), + .counter_o(counter[i]), + .iaddr_o(addr[i]), + .is_special_o(special[i]) + ); + + end else begin + single_retirement #( + .CVA6Cfg(CVA6Cfg), + .uop_entry_t(uop_entry_t), + .itt_out_t(itt_out_t), + .CAUSE_LEN(CAUSE_LEN), + .ITYPE_LEN(ITYPE_LEN), + .IRETIRE_LEN(IRETIRE_LEN) + ) i_single_retirement ( + .uop_entry_i(uop_entry[i]), + .cause_i(cause_itt[i]), + .tval_i(tval_itt[i]), + .itt_out_o(itt_out[i]) + ); + + end + end + + + always_comb begin + iti_to_encoder_o.cause = '0; + iti_to_encoder_o.tval = '0; + iti_to_encoder_o.priv = riscv::PRIV_LVL_U; + iti_to_encoder_o.cycles = '0; + for (int i = 0; i < CVA6Cfg.NrCommitPorts; i++) begin + uop_entry[i].valid = valid_i[i]; + uop_entry[i].pc = rvfi_to_iti_i.pc[i]; + uop_entry[i].itype = itype[i]; + uop_entry[i].compressed = rvfi_to_iti_i.is_compressed[i]; + uop_entry[i].priv = rvfi_to_iti_i.priv_lvl; + uop_entry[i].cycles = rvfi_to_iti_i.cycles; + + iti_to_encoder_o.valid[i] = 1'b0; + iti_to_encoder_o.iretire[i] = '0; + iti_to_encoder_o.ilastsize[i] = '0; + iti_to_encoder_o.itype[i] = iti_pkg::STANDARD; + iti_to_encoder_o.iaddr[i] = '0; + + valid_o[i] = 1'b0; + + if (itt_out[i].valid) begin + valid_o[i] = itt_out[i].valid; + iti_to_encoder_o.valid[i] = itt_out[i].valid; + iti_to_encoder_o.iretire[i] = itt_out[i].iretire; + iti_to_encoder_o.ilastsize[i] = itt_out[i].ilastsize; + iti_to_encoder_o.itype[i] = itt_out[i].itype; + iti_to_encoder_o.iaddr[i] = itt_out[i].iaddr; + iti_to_encoder_o.priv = itt_out[i].priv; // privilege don't change between 2 instr committed in the same cycle + iti_to_encoder_o.cycles = itt_out[i].cycles; // Same here (same time at same cycle) + end + end + if (itt_out[0].valid) begin // interrupt & exception only in port 0 + iti_to_encoder_o.cause = itt_out[0].cause; + iti_to_encoder_o.tval = itt_out[0].tval; + end + end + if (block_mode) begin + assign counter_d = counter[CVA6Cfg.NrCommitPorts-1]; + assign addr_d = addr[CVA6Cfg.NrCommitPorts-1]; + assign special_d = special[CVA6Cfg.NrCommitPorts-1]; + end + + always_ff @(posedge clk_i, negedge rst_ni) begin + if (block_mode) begin + if (!rst_ni) begin + counter_q <= '0; + addr_q <= '0; + special_q <= 1'b1; + end else begin + counter_q <= counter_d; + addr_q <= addr_d; + special_q <= special_d; + end + end + //pragma translate_off + for (int i = 0; i < CVA6Cfg.NrCommitPorts; i++) begin + if (itt_out[i].valid) begin + $fwrite(f, "%d,%0d,%0d,%d,%h,0,0,%0d,%0d\n", itt_out[i].itype, itt_out[i].cause, + itt_out[i].tval, itt_out[i].priv, itt_out[i].iaddr, itt_out[i].iretire, + itt_out[i].ilastsize); + end + end + //pragma translate_on + end + + +endmodule diff --git a/corev_apu/instr_tracing/ITI/cva6_iti/itype_detector.sv b/corev_apu/instr_tracing/ITI/cva6_iti/itype_detector.sv new file mode 100755 index 00000000000..5c503ab2d5d --- /dev/null +++ b/corev_apu/instr_tracing/ITI/cva6_iti/itype_detector.sv @@ -0,0 +1,92 @@ +// 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. + +// Author: Umberto Laghi +// Contact: umberto.laghi@studio.unibo.it +// Github: @ubolakes +// Contributors: +// Darshak Sheladiya, SYSGO GmbH +// Maxime COLSON, Thales CDI France + +/* ITYPE DETECTOR */ +/* +it produces the type of the instruction +*/ + +module itype_detector #( + parameter ITYPE_LEN = 3 //Size is itype_width_p in the E-Trace SPEC (3 or 4) +) ( + input logic valid_i, + input logic exception_i, + input logic interrupt_i, + input ariane_pkg::fu_op op_i, + input logic branch_taken_i, + output iti_pkg::itype_t itype_o +); + + // internal signals + logic exception; + logic interrupt; + logic eret; + logic nontaken_branch; + logic taken_branch; + logic updiscon; + + // assignments + assign exception = exception_i; + assign interrupt = interrupt_i; // no need to have an inst committed + + + + + assign eret = op_i inside {ariane_pkg::MRET, ariane_pkg::SRET, ariane_pkg::DRET}; + + assign nontaken_branch = ( op_i == ariane_pkg::EQ || + op_i == ariane_pkg::NE || + op_i == ariane_pkg::LTS || + op_i == ariane_pkg::GES || + op_i == ariane_pkg::LTU || + op_i == ariane_pkg::GEU) && + ~branch_taken_i; + + assign taken_branch = ( op_i == ariane_pkg::EQ || + op_i == ariane_pkg::NE || + op_i == ariane_pkg::LTS || + op_i == ariane_pkg::GES || + op_i == ariane_pkg::LTU || + op_i == ariane_pkg::GEU) && + branch_taken_i; + + assign updiscon = op_i == ariane_pkg::JALR; + + // assigning the itype + always_comb begin + // initialization + itype_o = iti_pkg::STANDARD; + + if (exception) begin // exception + itype_o = iti_pkg::EXC; + end else if (interrupt) begin // interrupt + itype_o = iti_pkg::INT; + end else if (valid_i) begin + if (eret) begin // exception or interrupt return + itype_o = iti_pkg::ERET; + end else if (nontaken_branch) begin // nontaken branch + itype_o = iti_pkg::NON_TAKEN_BR; + end else if (taken_branch) begin // taken branch + itype_o = iti_pkg::TAKEN_BR; + end else if (ITYPE_LEN == 3 && updiscon) begin // uninferable discontinuity + itype_o = iti_pkg::UNINF_JMP; + end + end + end + +endmodule diff --git a/corev_apu/instr_tracing/ITI/cva6_iti/single_retirement.sv b/corev_apu/instr_tracing/ITI/cva6_iti/single_retirement.sv new file mode 100644 index 00000000000..a9d4a668be9 --- /dev/null +++ b/corev_apu/instr_tracing/ITI/cva6_iti/single_retirement.sv @@ -0,0 +1,56 @@ +// Copyright (c) 2025 Thales DIS design services SAS +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +// Author: Maxime Colson - Thales +// Date: 20/03/2025 + +//Module used to determines the iaddr, ilastsize, iretire in single retirement for Encoder Module + + +module single_retirement #( + parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty, + parameter type uop_entry_t = logic, + parameter type itt_out_t = logic, + parameter CAUSE_LEN = 5, //Size is ecause_width_p in the E-Trace SPEC + parameter ITYPE_LEN = 3, //Size is itype_width_p in the E-Trace SPEC (3 or 4) + parameter IRETIRE_LEN = 32 //Size is iretire_width_p in the E-Trace SPEC +) ( + input uop_entry_t uop_entry_i, + input logic [ CAUSE_LEN-1:0] cause_i, + input logic [CVA6Cfg.XLEN-1:0] tval_i, + output itt_out_t itt_out_o +); + + + logic exception; + logic interrupt; + assign exception = (uop_entry_i.itype == iti_pkg::EXC) ? 1'b1 : 1'b0; + assign interrupt = (uop_entry_i.itype == iti_pkg::INT) ? 1'b1 : 1'b0; + + always_comb begin + itt_out_o = '0; + + if (uop_entry_i.valid) begin + + itt_out_o.valid = 1'b1; + itt_out_o.iretire = 1; + itt_out_o.itype = uop_entry_i.itype; + itt_out_o.ilastsize = ~uop_entry_i.compressed; + itt_out_o.iaddr = uop_entry_i.pc; + itt_out_o.priv = uop_entry_i.priv; + itt_out_o.cycles = uop_entry_i.cycles; + itt_out_o.cause = '0; + itt_out_o.tval = '0; + + if (interrupt) begin + itt_out_o.cause = cause_i; + itt_out_o.tval = '0; + end + + if (exception) begin + itt_out_o.cause = cause_i; + itt_out_o.tval = tval_i; + end + + end + end +endmodule diff --git a/corev_apu/instr_tracing/ITI/include/iti_pkg.sv b/corev_apu/instr_tracing/ITI/include/iti_pkg.sv new file mode 100644 index 00000000000..0099f9e5e10 --- /dev/null +++ b/corev_apu/instr_tracing/ITI/include/iti_pkg.sv @@ -0,0 +1,36 @@ +// Copyright (c) 2025 Thales DIS design services SAS +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +// Author: Maxime Colson - Thales +// Date: 20/03/2025 +// Contributors: +// Darshak Sheladiya, SYSGO GmbH +// Umberto Laghi, UNIBO + +// This package is temporary, the idea is to have it directly in the encoder later + +package iti_pkg; + + localparam CAUSE_LEN = 5; //Size is ecause_width_p in the E-Trace SPEC + localparam ITYPE_LEN = 3; //Size is itype_width_p in the E-Trace SPEC (3 or 4) + localparam IRETIRE_LEN = 32; //Size is iretire_width_p in the E-Trace SPEC + + typedef enum logic [ITYPE_LEN-1:0] { + STANDARD = 0, // none of the other named itype codes + EXC = 1, // exception + INT = 2, // interrupt + ERET = 3, // exception or interrupt return + NON_TAKEN_BR = 4, // nontaken branch + TAKEN_BR = 5, // taken branch + UNINF_JMP = 6, // uninferable jump if ITYPE_LEN == 3, otherwise reserved + RES = 7 /*, // reserved + UC = 8, // uninferable call + IC = 9, // inferable call + UIJ = 10, // uninferable jump + IJ = 11, // inferable jump + CRS = 12, // co-routine swap + RET = 13, // return + OUIJ = 14, // other uninferable jump + OIJ = 15*/ // other inferable jump + } itype_t; + +endpackage diff --git a/corev_apu/instr_tracing/ITI/include/iti_types.svh b/corev_apu/instr_tracing/ITI/include/iti_types.svh new file mode 100644 index 00000000000..d8519ee9966 --- /dev/null +++ b/corev_apu/instr_tracing/ITI/include/iti_types.svh @@ -0,0 +1,24 @@ +// Copyright (c) 2025 Thales DIS design services SAS +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +// Author: Maxime Colson - Thales +// Date: 20/03/2025 +// Contributors: +// Darshak Sheladiya, SYSGO GmbH +// Umberto Laghi, UNIBO + +`ifndef ITI_TYPES_SVH +`define ITI_TYPES_SVH + +`define ITI_TO_ENCODER_T(Cfg) struct packed { \ + logic [Cfg.NrCommitPorts-1:0] valid; \ + logic [Cfg.NrCommitPorts-1:0][iti_pkg::IRETIRE_LEN-1:0] iretire; \ + logic [Cfg.NrCommitPorts-1:0] ilastsize; \ + iti_pkg::itype_t [Cfg.NrCommitPorts-1:0] itype; \ + logic [iti_pkg::CAUSE_LEN-1:0] cause; \ + logic [Cfg.XLEN-1:0] tval; \ + riscv::priv_lvl_t priv; \ + logic [Cfg.NrCommitPorts-1:0][Cfg.XLEN-1:0] iaddr; \ + logic [63:0] cycles; \ + } + +`endif // ITI_TYPES_SVH diff --git a/corev_apu/instr_tracing/Pictures/Branch_example_dark.svg b/corev_apu/instr_tracing/Pictures/Branch_example_dark.svg new file mode 100644 index 00000000000..eb3a61cea77 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/Branch_example_dark.svg @@ -0,0 +1,3 @@ + + +
0000000080001100 <Proc_6>  :
.... ... 
  80001112: c080 {sw s0,0(s1)}
  80001114: 4785 {li a5,1}
  80001116: 02f40463 {beq s0,a5,8000113e }
8000111a:      c81d {beqz s0,80001150 }
> Not Taken ; branches = 1(10)  branche_map = 1(2)
>  Not Taken ; branches = 2(10)  branche_map = 11(2)
 8000111c: 4709 {li a4,2}
 8000111e: 04e40063 {beq s0,a4,8000115e }
> Taken ; branches = 3(10)  branche_map = 011(2)
8000115e: 60e2 {ld ra,24(sp)}
80001160: 6442 {ld s0,16(sp)}
80001162: c09c {sw a5,0(s1)}
80001164: 64a2 {ld s1,8(sp)}
80001166: 6105 {addi sp,sp,32}
80001168: 8082 {ret}
> Uninferable ; packet is sent with : branches = 3(10)  branche_map = 011(2)
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/Branch_example_light.svg b/corev_apu/instr_tracing/Pictures/Branch_example_light.svg new file mode 100644 index 00000000000..329d0d46c01 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/Branch_example_light.svg @@ -0,0 +1,3 @@ + + +
0000000080001100 <Proc_6>  :
.... ... 
  80001112: c080 {sw s0,0(s1)}
  80001114: 4785 {li a5,1}
  80001116: 02f40463 {beq s0,a5,8000113e }
8000111a:      c81d {beqz s0,80001150 }
> Not Taken ; branches = 1(10)  branche_map = 1(2)
>  Not Taken ; branches = 2(10)  branche_map = 11(2)
 8000111c: 4709 {li a4,2}
 8000111e: 04e40063 {beq s0,a4,8000115e }
> Taken ; branches = 3(10)  branche_map = 011(2)
8000115e: 60e2 {ld ra,24(sp)}
80001160: 6442 {ld s0,16(sp)}
80001162: c09c {sw a5,0(s1)}
80001164: 64a2 {ld s1,8(sp)}
80001166: 6105 {addi sp,sp,32}
80001168: 8082 {ret}
> Uninferable ; packet is sent with : branches = 3(10)  branche_map = 011(2)
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/Branch_map_dark.svg b/corev_apu/instr_tracing/Pictures/Branch_map_dark.svg new file mode 100644 index 00000000000..167a10467e0 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/Branch_map_dark.svg @@ -0,0 +1,3 @@ + + +
clk
rst
valid
empty
Branch
Map
flush
branch_taken
branch_map
branches
full
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/Branch_map_light.svg b/corev_apu/instr_tracing/Pictures/Branch_map_light.svg new file mode 100644 index 00000000000..8b440e73cad --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/Branch_map_light.svg @@ -0,0 +1,3 @@ + + +
clk
rst
valid
empty
Branch
Map
flush
branch_taken
branch_map
branches
full
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/EEPROM.PNG b/corev_apu/instr_tracing/Pictures/EEPROM.PNG new file mode 100644 index 00000000000..5aa90914885 Binary files /dev/null and b/corev_apu/instr_tracing/Pictures/EEPROM.PNG differ diff --git a/corev_apu/instr_tracing/Pictures/Emmiter_dark.svg b/corev_apu/instr_tracing/Pictures/Emmiter_dark.svg new file mode 100644 index 00000000000..06c13f0817d --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/Emmiter_dark.svg @@ -0,0 +1,3 @@ + + +
clk
rst
valid
packet_valid_o
packet_length_o
Packet
Emmiter
lc_cause
lc_tval
lc_interrupt
tc_cause
tc_tval
tc_interrupt
tc_priv
tc_time
tc_address
branches
branch_map
nc_exc_only
nc_ppccd
tc_ienable
lc_updiscon
packet_payload_o
branch_map_flush
nocontext
notime
qual_status
ioptions
packet_format
packet_subformat
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/Emmiter_light.svg b/corev_apu/instr_tracing/Pictures/Emmiter_light.svg new file mode 100644 index 00000000000..987de872161 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/Emmiter_light.svg @@ -0,0 +1,3 @@ + + +
clk
rst
valid
packet_valid_o
packet_length_o
Packet
Emmiter
lc_cause
lc_tval
lc_interrupt
tc_cause
tc_tval
tc_interrupt
tc_priv
tc_time
tc_address
branches
branch_map
nc_exc_only
nc_ppccd
tc_ienable
lc_updiscon
packet_payload_o
branch_map_flush
nocontext
notime
qual_status
ioptions
packet_format
packet_subformat
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/Encapsulated_Packet_dark.svg b/corev_apu/instr_tracing/Pictures/Encapsulated_Packet_dark.svg new file mode 100644 index 00000000000..0822cb05b02 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/Encapsulated_Packet_dark.svg @@ -0,0 +1,3 @@ + + +
Header
Time
Payload
1 Byte
8 Bytes
1    31 Bytes
P_Length
flow
T?
1 bit
2 bits
5 bits
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/Encapsulated_Packet_light.svg b/corev_apu/instr_tracing/Pictures/Encapsulated_Packet_light.svg new file mode 100644 index 00000000000..fa085eceb7d --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/Encapsulated_Packet_light.svg @@ -0,0 +1,3 @@ + + +
Header
Time
Payload
1 Byte
8 Bytes
1    31 Bytes
P_Length
flow
T?
1 bit
2 bits
5 bits
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/Encoder_dark.svg b/corev_apu/instr_tracing/Pictures/Encoder_dark.svg new file mode 100644 index 00000000000..489d9ddc87c --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/Encoder_dark.svg @@ -0,0 +1,3 @@ + + +
Control
Register
Filter
Priority
Resync
Packet
Emmiter
APB
Branch
map
iti_to_encoder 
iretire [N:0][IRET_LEN-1:0];
ilastsize[N:0];
itype [N:0][2:0];
cause [XLEN-1:0];
tval [XLEN-1:0];
priv [1:0];
iaddr [N:0][XLEN-1:0];
cycles [63:0];
valid_i
packet_valid_o
packet_length_o
packet_payload_o
ENCODER
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/Encoder_light.svg b/corev_apu/instr_tracing/Pictures/Encoder_light.svg new file mode 100644 index 00000000000..edb997026f9 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/Encoder_light.svg @@ -0,0 +1,3 @@ + + +
Control
Register
Filter
Priority
Resync
Packet
Emmiter
APB
Branch
map
iti_to_encoder 
iretire [N:0][IRET_LEN-1:0];
ilastsize[N:0];
itype [N:0][2:0];
cause [XLEN-1:0];
tval [XLEN-1:0];
priv [1:0];
iaddr [N:0][XLEN-1:0];
cycles [63:0];
valid_i
packet_valid_o
packet_length_o
packet_payload_o
ENCODER
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/Filter_dark.svg b/corev_apu/instr_tracing/Pictures/Filter_dark.svg new file mode 100644 index 00000000000..db6c3f763e7 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/Filter_dark.svg @@ -0,0 +1,3 @@ + + +
clk
rst
valid
nc_qualified
Filter
Other 
Events
priv_filter
upper_priv
lower_priv
match_priv
priv_mode
priv_lvl_i
iaddr_filter
upper_iaddr
match_iaddr
iaddr_mode
iaddr_i
lower_iaddr
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/Filter_light.svg b/corev_apu/instr_tracing/Pictures/Filter_light.svg new file mode 100644 index 00000000000..2e04cf1a260 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/Filter_light.svg @@ -0,0 +1,3 @@ + + +
clk
rst
valid
nc_qualified
Filter
Other 
Events
priv_filter
upper_priv
lower_priv
match_priv
priv_mode
priv_lvl_i
iaddr_filter
upper_iaddr
match_iaddr
iaddr_mode
iaddr_i
lower_iaddr
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/Gen2_wired.png b/corev_apu/instr_tracing/Pictures/Gen2_wired.png new file mode 100644 index 00000000000..fead93f9fb8 Binary files /dev/null and b/corev_apu/instr_tracing/Pictures/Gen2_wired.png differ diff --git a/corev_apu/instr_tracing/Pictures/ITI_diagram_dark.svg b/corev_apu/instr_tracing/Pictures/ITI_diagram_dark.svg new file mode 100644 index 00000000000..c0d441c0779 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/ITI_diagram_dark.svg @@ -0,0 +1,3 @@ + + +
clk
rst
valid_i [N:0]
rvfi_to_iti [N:0] * 
valid_o [N:0]
iti_to_encoder [N:0] * 
ITI
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/ITI_diagram_detailed_dark.svg b/corev_apu/instr_tracing/Pictures/ITI_diagram_detailed_dark.svg new file mode 100644 index 00000000000..3c3b1b6e951 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/ITI_diagram_detailed_dark.svg @@ -0,0 +1,3 @@ + + +
clk
rst
valid_i [N:0]
rvfi_to_iti 
valid_o [N:0]
iti_to_encoder 
pc [N:0][XLEN-1:0];
op [N:0][7:0];
is_compressed [N:0];
branch_valid [N:0];
is_taken [N:0];
ex_valid ;
tval [XLEN-1:0];
cause [XLEN-1:0];
priv_Ivl [1:0];
cycles [63:0];
iretire[N:0][IRET_LEN-1:0];
ilastsize[N:0];
itype [N:0][2:0];
cause [XLEN-1:0];
tval [XLEN-1:0];
priv [1:0];
iaddr [N:0][XLEN-1:0];
cycles [63:0];
ITI
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/ITI_diagram_detailed_light.svg b/corev_apu/instr_tracing/Pictures/ITI_diagram_detailed_light.svg new file mode 100644 index 00000000000..677f5ee1697 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/ITI_diagram_detailed_light.svg @@ -0,0 +1,3 @@ + + +
clk
rst
valid_i [N:0]
rvfi_to_iti 
valid_o [N:0]
iti_to_encoder 
pc [N:0][XLEN-1:0];
op [N:0][7:0];
is_compressed [N:0];
branch_valid [N:0];
is_taken [N:0];
ex_valid ;
tval [XLEN-1:0];
cause [XLEN-1:0];
priv_Ivl [1:0];
cycles [63:0];
iretire[N:0][IRET_LEN-1:0];
ilastsize[N:0];
itype [N:0][2:0];
cause [XLEN-1:0];
tval [XLEN-1:0];
priv [1:0];
iaddr [N:0][XLEN-1:0];
cycles [63:0];
ITI
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/ITI_diagram_inside_block_mode_dark.svg b/corev_apu/instr_tracing/Pictures/ITI_diagram_inside_block_mode_dark.svg new file mode 100644 index 00000000000..5e7c938e20e --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/ITI_diagram_inside_block_mode_dark.svg @@ -0,0 +1,3 @@ + + +
itype_detector
itype_detector
itype_detector
itype
clk
rst
valid_i [N:0]
rvfi_to_iti [0]
rvfi_to_iti [1]
rvfi_to_iti [N]
valid_o [N:0]
iti_to_encoder [0]
iti_to_encoder [1]
iti_to_encoder [N]
ITI multiple retirement mode (block) 
Block
Retirement
Block
Retirement
Block
Retirement
special
iret
addr
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/ITI_diagram_inside_block_mode_light.svg b/corev_apu/instr_tracing/Pictures/ITI_diagram_inside_block_mode_light.svg new file mode 100644 index 00000000000..a543bf353ff --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/ITI_diagram_inside_block_mode_light.svg @@ -0,0 +1,3 @@ + + +
itype_detector
itype_detector
itype_detector
itype
clk
rst
valid_i [N:0]
rvfi_to_iti [0]
rvfi_to_iti [1]
rvfi_to_iti [N]
valid_o [N:0]
iti_to_encoder [0]
iti_to_encoder [1]
iti_to_encoder [N]
ITI multiple retirement mode (block) 
Block
Retirement
Block
Retirement
Block
Retirement
special
iret
addr
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/ITI_diagram_inside_single_mode_dark.svg b/corev_apu/instr_tracing/Pictures/ITI_diagram_inside_single_mode_dark.svg new file mode 100644 index 00000000000..0aca033e7c6 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/ITI_diagram_inside_single_mode_dark.svg @@ -0,0 +1,3 @@ + + +
Single 
Retirement
Single 
Retirement
Single 
Retirement
itype_detector
itype_detector
itype_detector
itype
clk
rst
valid_i [N:0]
rvfi_to_iti [0]
rvfi_to_iti [1]
rvfi_to_iti [N]
valid_o [N:0]
iti_to_encoder [0]
iti_to_encoder [1]
iti_to_encoder [N]
ITI single retirement mode 
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/ITI_diagram_inside_single_mode_light.svg b/corev_apu/instr_tracing/Pictures/ITI_diagram_inside_single_mode_light.svg new file mode 100644 index 00000000000..ed16f45d695 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/ITI_diagram_inside_single_mode_light.svg @@ -0,0 +1,3 @@ + + +
Single 
Retirement
Single 
Retirement
Single 
Retirement
itype_detector
itype_detector
itype_detector
itype
clk
rst
valid_i [N:0]
rvfi_to_iti [0]
rvfi_to_iti [1]
rvfi_to_iti [N]
valid_o [N:0]
iti_to_encoder [0]
iti_to_encoder [1]
iti_to_encoder [N]
ITI single retirement mode 
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/ITI_diagram_light.svg b/corev_apu/instr_tracing/Pictures/ITI_diagram_light.svg new file mode 100644 index 00000000000..00f0773da34 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/ITI_diagram_light.svg @@ -0,0 +1,3 @@ + + +
clk
rst
valid_i [N:0]
rvfi_to_iti [N:0] * 
valid_o [N:0]
iti_to_encoder [N:0] * 
ITI
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/JA_dark.svg b/corev_apu/instr_tracing/Pictures/JA_dark.svg new file mode 100644 index 00000000000..407ef39bf9c --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/JA_dark.svg @@ -0,0 +1,3 @@ + + +
VDD
GND
VDD
GND
rxen
rdn
wrn
txen
oen
clko
spien
siwun
PMOD JA
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/JA_light.svg b/corev_apu/instr_tracing/Pictures/JA_light.svg new file mode 100644 index 00000000000..2242b11d9ab --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/JA_light.svg @@ -0,0 +1,3 @@ + + +
VDD
GND
VDD
GND
rxen
rdn
wrn
txen
oen
clko
spien
siwun
PMOD JA
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/JB_dark.svg b/corev_apu/instr_tracing/Pictures/JB_dark.svg new file mode 100644 index 00000000000..dd322aa9a30 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/JB_dark.svg @@ -0,0 +1,3 @@ + + +
VDD
GND
VDD
GND
d[3]
d[2]
d[7]
d[6]
d[1]
d[0]
d[5]
d[4]
PMOD JB
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/JB_light.svg b/corev_apu/instr_tracing/Pictures/JB_light.svg new file mode 100644 index 00000000000..a58e8ebb938 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/JB_light.svg @@ -0,0 +1,3 @@ + + +
VDD
GND
VDD
GND
d[3]
d[2]
d[7]
d[6]
d[1]
d[0]
d[5]
d[4]
PMOD JB
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/Main_tracer_dark.svg b/corev_apu/instr_tracing/Pictures/Main_tracer_dark.svg new file mode 100644 index 00000000000..c5dd8751039 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/Main_tracer_dark.svg @@ -0,0 +1,3 @@ + + +
CVA6
RVFI
ITI

TRACER

rvfi_to_iti
iti_to_encoder
ENCODER
TC
0100
1101
DECODER
Encapsulated 
Packets
[Protocol] 
Packets
HARDWARE
SOFTWARE
program binary
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/Main_tracer_light.svg b/corev_apu/instr_tracing/Pictures/Main_tracer_light.svg new file mode 100644 index 00000000000..1a4691ae320 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/Main_tracer_light.svg @@ -0,0 +1,3 @@ + + +
CVA6
RVFI
ITI

TRACER

rvfi_to_iti
iti_to_encoder
ENCODER
TC
0100
1101
DECODER
Encapsulated 
Packets
[Protocol] 
Packets
HARDWARE
SOFTWARE
program binary
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/Priority_dark.svg b/corev_apu/instr_tracing/Pictures/Priority_dark.svg new file mode 100644 index 00000000000..c1d8b7b5879 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/Priority_dark.svg @@ -0,0 +1,3 @@ + + +
clk
rst
valid_i
valid_o 
packet_format
Priority
lc_exception
lc_updiscon
lc_final_qualified
tc_exception
tc_updiscon
tc_retired
tc_privchange
tc_enc_enabled
tc_enc_disabled
tc_branchmap_empty
tc_branchmap_full
nc_exception
nc_updiscon
nc_retired
nc_privchange
max_resync
tc_first_qualified
tc_qualified
nc_qualified
nc_branchmap_empty
packet_subformat
qual_status
resync_rst
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/Priority_light.svg b/corev_apu/instr_tracing/Pictures/Priority_light.svg new file mode 100644 index 00000000000..d4eae6ec3d8 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/Priority_light.svg @@ -0,0 +1,3 @@ + + +
clk
rst
valid_i
valid_o 
packet_format
Priority
lc_exception
lc_updiscon
lc_final_qualified
tc_exception
tc_updiscon
tc_retired
tc_privchange
tc_enc_enabled
tc_enc_disabled
tc_branchmap_empty
tc_branchmap_full
nc_exception
nc_updiscon
nc_retired
nc_privchange
max_resync
tc_first_qualified
tc_qualified
nc_qualified
nc_branchmap_empty
packet_subformat
qual_status
resync_rst
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/TC_dark.svg b/corev_apu/instr_tracing/Pictures/TC_dark.svg new file mode 100644 index 00000000000..a4e86c2dce6 --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/TC_dark.svg @@ -0,0 +1,3 @@ + + +
SLICER

Transmission Channel

0100
1101
DECODER
Encapsulated 
Packets
DPTI
Frames
HARDWARE
SOFTWARE
RECEIVER
F2232H
USB
Bridge
DPTI
CTRL
ENCAPS
Packet
Slices
Packets
Decapsulated 
Packets
RAW
Packets
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/TC_light.svg b/corev_apu/instr_tracing/Pictures/TC_light.svg new file mode 100644 index 00000000000..6d2bbcaf9bc --- /dev/null +++ b/corev_apu/instr_tracing/Pictures/TC_light.svg @@ -0,0 +1,3 @@ + + +
SLICER

Transmission Channel

0100
1101
DECODER
Encapsulated 
Packets
DPTI
Frames
HARDWARE
SOFTWARE
RECEIVER
F2232H
USB
Bridge
DPTI
CTRL
ENCAPS
Packet
Slices
Packets
Decapsulated 
Packets
RAW
Packets
\ No newline at end of file diff --git a/corev_apu/instr_tracing/Pictures/decoded_trace.png b/corev_apu/instr_tracing/Pictures/decoded_trace.png new file mode 100644 index 00000000000..3d400c69868 Binary files /dev/null and b/corev_apu/instr_tracing/Pictures/decoded_trace.png differ diff --git a/corev_apu/instr_tracing/Pictures/genesys-2.png b/corev_apu/instr_tracing/Pictures/genesys-2.png new file mode 100644 index 00000000000..8c0db43dba6 Binary files /dev/null and b/corev_apu/instr_tracing/Pictures/genesys-2.png differ diff --git a/corev_apu/instr_tracing/Pictures/genesys2_DPTI.png b/corev_apu/instr_tracing/Pictures/genesys2_DPTI.png new file mode 100644 index 00000000000..81ea39c2c36 Binary files /dev/null and b/corev_apu/instr_tracing/Pictures/genesys2_DPTI.png differ diff --git a/corev_apu/instr_tracing/Pictures/receiver.png b/corev_apu/instr_tracing/Pictures/receiver.png new file mode 100644 index 00000000000..05bfd12d562 Binary files /dev/null and b/corev_apu/instr_tracing/Pictures/receiver.png differ diff --git a/corev_apu/instr_tracing/README.md b/corev_apu/instr_tracing/README.md new file mode 100644 index 00000000000..4e89698f031 --- /dev/null +++ b/corev_apu/instr_tracing/README.md @@ -0,0 +1,721 @@ + + + +# Instruction Tracing + +## Introduction + +Instruction tracing is a crucial feature in modern processor design, particularly when it comes to **certification**, **debugging**, and **formal verification**. It allows engineers to **track the exact sequence of executed instructions**, providing a ground truth that can be compared against expected behavior. + +### Why Instruction Tracing? + +There are several scenarios where instruction tracing is essential: + +* **Certification and Compliance**: In safety-critical systems (e.g., avionics, automotive), it may be necessary to prove that instructions executed **exactly** as specified. +* **Debugging**: When an execution does not behave as expected, a trace can help **reconstruct** the execution flow and understand where and why things went wrong. + +### How Does It Work? + +In this project, we implemented an instruction tracer that uses the **E-TRACE encoding format** (as specified in the [E-Trace specification](https://github.com/riscv-non-isa/riscv-trace-spec)). + + E‑Trace implements a branch‑trace algorithm: it only emits control‑flow "deltas" (branches taken/not‑taken, indirect jumps/calls/returns, interrupts/exceptions) along with PC deltas, assumes sequential instructions implicitly, and can pack multiple retirements into compact packet, achieving a high compression rates while minimizing off‑chip bandwidth and interface complexity. + +There exist other encoding formats such as [N‑Trace](https://github.com/riscv-non-isa/tg-nexus-trace), which is built on the IEEE‑5001 Nexus standard. + +### System Overview + +The tracing system we built is composed of four main elements, illustrated in the block diagram below: + + + + + + + + + +## 1. Instruction Trace Interface (ITI) + +The **Instruction Trace Interface (ITI)** module is implemented in accordance with the [E-Trace specification](https://github.com/riscv-non-isa/riscv-trace-spec) (2025), specifically section 4.2 concerning the Instruction Trace Interface. It sits between the **cva6\_rvfi** (RISC-V Formal Interface) and the **encoder**, and plays a role in collecting and formatting instruction trace data. + +The ITI currently supports **two operating modes**: + +* **Multiple-retirement mode**(`block_mode = 1`): the trace data for several instructions is grouped together and sent to the encoder as a block. +* **Single-retirement mode**(`block_mode = 0`): the trace data are sent to the encoder instructions by instructions. + +At the moment, the ITI only supports the 3-bit itype format (`itype_len = 3`) for classifying instruction types. This is sufficient to distinguish key instruction categories such as branches, uninferable jumps, exceptions, and interrupts. While the E-Trace specification also defines a 4-bit format (`itype_len = 4`) for finer-grained classification, this is not yet implemented in the current design. Support for the 4-bit version could be added later if needed and if compatible with the encoder. + +> For more details about the `itype` field, refer to Table 7 of the [E-Trace specification](https://github.com/riscv-non-isa/riscv-trace-spec), as well as the field description provided just below. + +### Input Interface + + + + + + + +

+The module receives a structured input named **`rvfi_to_iti`**, which encapsulates all the necessary signals to: + +* determine the **instruction type (`itype`)** using fields such as `opcode`, `branch_valid`, etc., +* supply relevant metadata to the encoder like `cycle`, `privilege level`, `pc`, etc. + +Changes were also made to the `cva6_rvfi` module to collect the signals required by the ITI and to properly resynchronize them, since they may originate from different stages of the processor pipeline. This justifies the use of a structured interface to ensure reliable and consistent data transfer to the ITI. + +--- + +### Multiple-Retirement Mode + +In **multiple-retirement mode**, the ITI groups instructions into **blocks**, based on the occurrence of *special* instructions , typically those altering the control flow (e.g., jumps, exceptions, interrupts). + +The ITI outputs the following signals to the encoder in this mode: + +* `iret`: number of half-words for the retired instructions in the current block, +* `iaddr`: address of the first instruction in the block, +* `ilastsize`: size of the last instruction in the block. + +To support this, the ITI adopts a **systolic-like architecture** made up of `block_retirement` submodules. There are `Nr_commit_ports` such submodules, each able to: + +* detect special instructions independently, +* initiate a new block if necessary, +* propagate control and data signals (like `special`, `iaddr`, and incremented `iret`) along a chain. + +This design enables the generation of **multiple blocks in a single cycle** when several special instructions retire simultaneously. + + + + + + + + +--- +### Single-Retirement Mode + +In **single-retirement mode**, the ITI module forwards the trace information **instruction by instruction**, without grouping them into blocks. + +In this configuration: + +* There is no need to track special instructions or segment blocks. +* The encoder receives a simple feed of retired instructions, making this mode well-suited for simpler architectures. + + + + + + + + +--- +### Full System Overview + +The overall role of the ITI module in the trace infrastructure is summarized in the following diagram: + + + + + + +--- +### Continuous Integration for ITI + +The CI (Continuous Integration) test for the ITI is contained in Instr_tracing_test.sh and consist of running a simulation on ariane_testharness with the previous test iti_test.sh and extracting the iti.trace. Then it run the regressionFlow from the [E-Trace specification](https://github.com/riscv-non-isa/riscv-trace-spec) and compare both files. +We cleaned both file to compare what is comparable ,we exclude the start and the end because it's not matching based spike version + + +## 2. Encoder + Encapsulator + +### Collaboration and Reference Design + +For this module, we collaborate with the University of Bologna by integrating their version of the encoder, available +[here](https://github.com/pulp-platform/rv_tracer) + +Their repository is well-documented and serves as a solid foundation. The encoder design is aligned with the **E-Trace specification** and leverages an ITI running in **multiple-retirement mode** to emit **trace packets**. These packets are structured according to the **instruction delta trace algorithm** described in the [E-Trace specification](https://github.com/riscv-non-isa/riscv-trace-spec) (Figure 1), which provides a model for encoding deltas (non-linearities) in the control flow. + +Each data trace outputed by the ITI, whether block-based or instruction-based, is interpreted to identify these deltas and transmit them in the form of trace packets. These packets vary in format and size depending on the instruction type and control flow transitions. + +--- + +### Custom Implementation and Simplification + +While their encoder provides a baseline, it remains under active development. In its current state, its behavior (in terms of number of packets emitted, their contents, or supported options) differs from the Reference Flow. + +As a result, we opted to build a simplified version derived from the original architecture. This internal encoder: + +* Expects **instruction-by-instruction traces** as input, +* Supports only **Nr\_commit\_ports = 1** (single commit port), +* Implements only a **basic subset** of the E-Trace functionality. + +This choice facilitates initial validation and integration, though we remain open to switching back to a mature multiple-retirement encoder once available. + +Below is a high-level architectural diagram of the current encoder setup (here `N=1`): + + + + + + +--- + +### Submodules Description + +The encoder is composed of several key submodules: + +### Submodules Description + +The encoder is composed of several key submodules: + +* **Priority**: + This submodule constitutes the core of the *Instruction Delta Trace Algorithm*. It is responsible for analyzing control flow transitions across instructions and determining the format and/or subformat of trace packets to be emitted. + + + + + + + + The logic is driven by three categories of input signals that represent the state of the instruction stream at different points in time: + - **lc**: *Last Cycle* - information from the previous retired instruction, + - **tc**: *This Cycle* - information from the currently retiring instruction, + - **nc**: *Next Cycle* - information from the next instruction. + + > Some signals are intentionally absent for the sake of understanding + + Using these signals, the `Priority` module identifies the relevant **deltas** (e.g., taken branches, jumps, exceptions) and selects the appropriate **packet format and/or subformat**, which will subsequently guide the `Packet_Emitter`. + +
+ + | Format | Subformat | Description | + | :------: | :-------: | :------------------ | + | 3 | 3 | Support | + | | 2 | Context | + | | 1 | Trap | + | | 0 | Synchronisation | + | 2 | | Address Only | + | 1 | | Branch | + | 0 | | Optional extensions | +
+ + > For more details, refer to [Chapter 7 (Instruction Trace Encoder Output Packet)](https://github.com/riscv-non-isa/riscv-trace-spec) (2025), or consult the corresponding encoder section in the [University of Bologna's implementation](https://github.com/pulp-platform/rv_tracer). + + +* **Packet_Emitter**: + This submodule is responsible for **constructing and filling the trace packet** to be emitted. It plays a central role in materializing the output of the delta trace algorithm into a well-structured packet format compliant with the E-Trace specification. + + + + + + + + Similar to the `Priority` module, it receives multiple input signals that span across different time domains (*lc*,*tc*,*nc*). + + However, the most important **inputs** for this submodule is the **packet format and/or subformat**, which is deteminated by the `Priority` module. This format/subformat dictates the structure and contents of the packet's payload. Also **ppccd** means privilege change, precise context change or context change with discontinuity. + + Based on this, the `Packet_Emitter` output: + - The **payload** which contains all the fields expected for this packet, + - The **packet length** (in bytes), depending on the format/subformat and data, + - A **branch_map_flush** signal that is used to flush the `branch_map` field. This ensures the `branch_map` is ready to accurately track future branches for the next packet. + + > For a complete description of each packet type and its associated payload content, refer to [Chapter 7 (Instruction Trace Encoder Output Packet)](https://github.com/riscv-non-isa/riscv-trace-spec) of the E-Trace specification (2025). + +* **Filter**: + The `Filter` submodule is responsible for **selectively enabling or disabling instruction tracing** (with the qualified signal) based on configurable events defined through **Control Registers**. By filtering out irrelevant or redundant instructions, it can significantly improves trace analysis efficiency and bandwidth usage. + + + + + + + + The filtering mechanism supports a variety of events, including: + + - **Range Address**: Enables tracing **only when the instruction address (`iaddr`) falls within a specified address window**, defined by a `lower_addr` and a `higher_addr` boundary. + - **Stop Event**: Immediately halts instruction tracing when triggered. + - **Selected Privilege Level**: Enables or disables tracing depending on the **current privilege level** (e.g., user, supervisor, machine mode). + - **Other Events**: Filtering can also be triggered by **exceptions**, **interrupts**, or other **context-specific conditions**. + + +* **Branch\_Map**: + The `Branch_Map` submodule acts as a **history buffer** for recently executed branch instructions. It plays a crucial role in the generation of compressed trace packets by allowing the encoder to **reconstruct control-flow paths** through a compact representation. + + + + + + + This module maintains two key outputs: + + - **`branch_map`**: a **bitfield** representing the history of up to 31 conditional branches. For each branch, a **bit is added to the right**: + - `0` if the branch was **taken**, + - `1` if the branch was **not taken**. + + - **`branches`**: an **integer count** of how many branches are currently stored in the map (max: **31**). This counter helps determine the valid width of the `branch_map` field and guides packet formatting/decoding. + + The branch_map is updated as instructions retire. Once the maximum depth is reached or a flush is triggered (e.g., via `branch_map_flush` from the `Packet_Emitter`), the map is cleared to allow tracking of the next sequence. + + Here is an illustrative example, taken from [E-Trace Specification – Chapter 12, Example 4](https://github.com/riscv-non-isa/riscv-trace-spec). + + + + + + + + +--- + +### Encapsulation Module + +This module was developed by the **University of Bologna**, and we reused the `encapsulator.sv` module **as-is**, without any modifications. We chose **not to integrate the other submodules** provided in the original repository, as they are designed for the **ATB (Advanced Trace Bus)** protocol. In our case, we rely on a different trace output interface, named **DPTI (Digilent Parallel Transfer Interface)**, making the use of those ATB-specific modules unnecessary. [Here](https://github.com/pulp-platform/rv_encapsulator) is the repository of the encapsulator from the **University of Bologna**. + +The **encapsulator** is placed directly after the encoder and is responsible for wrapping each trace packet into a **standardized encapsulation format** as defined by the [encapsulation specification](https://github.com/riscv-non-isa/e-trace-encap). + +This format ensures **interoperability**, provides **framing rules**, and facilitates **packet-level synchronization** in the *transmission channel* interface. Each encapsulated packet in this implementation is **fixed at 320 bits (40 bytes)** and includes this field groups: + +- **Header (8 bits)**: + Includes a `length` field (5 bits) specifying the payload size in bytes, a `flow` field (2 bits) which is currently set to `00` (no multi-sink used yet), and an `extend` bit (1 bit) which is set to `1`, indicating the presence of a timestamp (T ? in the figure bellow). + +- **Timestamp (`T * 8` bits)**: + The timestamp is included in our packets and is **fixed at 8 bytes (64 bits)**. Its presence is governed by the `extend` bit in the header. + +- **Payload (1–248 bits)**: + Contains the actual trace packet, emmited by the encoder with `packet_payload_o`. + +An illustration of the encapsulation structure is shown below: + + + + + + +

+ +Once encapsulated, the packets are written into a **FIFO buffer**, where they await transmission through the trace communication channel. + +This design enables modular evolution: improvements or full spec-compliance in the encoder can be adopted later without altering the overall encapsulation and transmission stages. +

+ +> While the [encapsulation specification](https://github.com/riscv-non-isa/e-trace-encap) also defines support for **source IDs** , **null packets** (e.g., `null.idle`, `null.alignment`), and **synchronization sequences**, these features are **not yet implemented** in the current prototype. + +### Continuous Integration for Encoder + Encapsulator + +The CI (Continuous Integration) test for the Encoder and Encapsulator is also contained in Instr_tracing_test.sh and consists in running a simulation on ariane_testharness with the previous test iti_test.sh and extracting the `encoded.trace`, it will convert them in decaspulated csv format with the Decapsuler. Then it runs the regressionFlow from the [E-Trace specification](https://github.com/riscv-non-isa/riscv-trace-spec) and compare both files. +We cleaned both file to compare what is comparable, again we exclude the start and the end because it's not matching based spike version. + + +--- + + +## 3. Transmission Channel (TC) via DPTI + +
+ +

Figure: Digilent Genesys2 development board

+
+ +Picture from [Digilent Reference Manual](digilent.com/reference/programmable-logic/genesys-2/reference-manual) +

+Since most onboard peripherals (UART, SPI, etc.) are already used by the `ariane_xilinx` platform, we use the **FTDI FT2232H**'s DPTI interface exposed on the **USB-JTAG bridge (J17)**: + +
+ +

Figure: USB-JTAG bridge

+
+ +Picture from [Digilent Reference Manual](digilent.com/reference/programmable-logic/genesys-2/reference-manual) + +- **DPTI/DSPI header** on J17 provides: + - A **Digilent Parallel Transfer Interface (DPTI)** channel + - A generic SPI channel (not used here due to limited bandwidth) + +We selected **DPTI** because it is a **mature, out‑of‑the‑box solution** full driver support from Digilent Adept ([Adept Drivers & Utilities](https://digilent.com/reference/software/adept/)). + +--- + +### FT2232H Ports in Genesys 2 + +The FT2232H chip offers two independent channels but in the Top platform `ariane_xilinx` both of them are used : + +| Port | Default Use in `ariane_xilinx`| +|-------|-------------------------------| +| Port A| Bitstream injection | +| Port B| Debug Module interface | + +Because both channels are occupied, we have two deployment options: + +1. **Re-purpose Port B** + - **Disconnect the Debug Module** in `ariane_xilinx.sv`. + - Update `genesys.xdc` to add DPTI pin constraints (e.g., check the [default constraint file](https://github.com/Digilent/digilent-xdc/blob/master/Genesys-2-Master.xdc) section DPTI). + - Inject your program via the on‑chip **bootrom**, modify the Makefile in `corev_apu/fpga/src/bootrom` accordingly. + +2. **Add an FT2232H MiniModule** + - Use a standard [FT2232H Mini Module](https://ftdichip.com/products/ft2232h-mini-module/) connected to two PMOD headers. + - This gives you two **additional** FT2232H channels without touching the existing Port A/B setup. + +
+ +

Figure: FT2232H MiniModule wired to Genesys2 PMODs

+
+

+
+ + + + + + + + + + + +
+

+ +> For more details on the wiring, check these resources: +> - [FT2232H Datasheet](https://ftdichip.com/wp-content/uploads/2024/09/DS_FT2232H.pdf), Table 3.1 +> - [FT2232H Mini Module Datasheet](https://ftdichip.com/wp-content/uploads/2020/07/DS_FT2232H_Mini_Module.pdf), Table 3.1 and Table 3.2 and USB Bus-powered section. + +--- + +### Platform Modifications + + + + + + + + +1. **DPTI Controller** + - Add `dpti_ctrl.vhd` to handle **frame send/receive** over DPTI. This module is provided by Digilent and can be found in the [**Digilent Adept SDK**](https://lp.digilent.com/complete-adept-runtime-download), under `samples/dpti/DptiDemo/logic/dpti_ctrl.vhd`. + - Protocol: **8-bit parallel**, synchronous/asynchronous, running at **60 MHz**, allowing for up to **480 Mbps** throughput. + - The controller requires a clock. It is instantiated in the platform using `xlnx_dpti_clk` located in `cva6/corev_apu/fpga/xilinx/xlnx_dpti_clk`. Alternatively, it can be added to the Vivado project using a Clock Wizard. An example configuration is available in `samples/dpti/DptiDemo/logic/clk_wiz_0.v`. + +2. **Packet Slicer** + - Our trace packets are **320 bits** (40 bytes). + - Insert `slicer_DPTI.sv` to segment each packet into **40 eight‑bit frames** for DPTI transport. + +3. **PMOD Pin Mapping & Constraints** + - PMOD pins used must support external clock (C‑capable). Follow [UG472](https://docs.amd.com/v/u/en-US/ug472_7Series_Clocking) (Vivado) guidelines. + - Example excerpt from `genesys2.xdc`: + ```xdc + ## PMOD Header JA + #set_property -dict { PACKAGE_PIN U27 IOSTANDARD LVCMOS33 } [get_ports prog_clko]; #IO_L13P_T2_MRCC_14 Sch=ja_p[1] + #set_property -dict { PACKAGE_PIN U28 IOSTANDARD LVCMOS33 } [get_ports prog_oen]; #IO_L13N_T2_MRCC_14 Sch=ja_n[1] + #set_property -dict { PACKAGE_PIN T26 IOSTANDARD LVCMOS33 } [get_ports prog_rdn]; #IO_L12P_T1_MRCC_14 Sch=ja_p[2] + #set_property -dict { PACKAGE_PIN T27 IOSTANDARD LVCMOS33 } [get_ports prog_rxen]; #IO_L12N_T1_MRCC_14 Sch=ja_n[2] + #set_property -dict { PACKAGE_PIN T22 IOSTANDARD LVCMOS33 } [get_ports prog_siwun]; #IO_L5P_T0_D06_14 Sch=ja_p[3] + #set_property -dict { PACKAGE_PIN T23 IOSTANDARD LVCMOS33 } [get_ports prog_spien]; #IO_L5N_T0_D07_14 Sch=ja_n[3] // Not needed here + #set_property -dict { PACKAGE_PIN T20 IOSTANDARD LVCMOS33 } [get_ports prog_txen]; #IO_L4P_T0_D04_14 Sch=ja_p[4] + #set_property -dict { PACKAGE_PIN T21 IOSTANDARD LVCMOS33 } [get_ports prog_wrn]; #IO_L4N_T0_D05_14 Sch=ja_n[4] + + ## PMOD Header JB + #set_property -dict { PACKAGE_PIN V29 IOSTANDARD LVCMOS33 } [get_ports { prog_d[0] }]; #IO_L17P_T2_A14_D30_14 Sch=jb_p[1] + #set_property -dict { PACKAGE_PIN V30 IOSTANDARD LVCMOS33 } [get_ports { prog_d[1] }]; #IO_L17N_T2_A13_D29_14 Sch=jb_n[1] + #set_property -dict { PACKAGE_PIN V25 IOSTANDARD LVCMOS33 } [get_ports { prog_d[2] }]; #IO_L18P_T2_A12_D28_14 Sch=jb_p[2] + #set_property -dict { PACKAGE_PIN W26 IOSTANDARD LVCMOS33 } [get_ports { prog_d[3] }]; #IO_L18N_T2_A11_D27_14 Sch=jb_n[2] + #set_property -dict { PACKAGE_PIN T25 IOSTANDARD LVCMOS33 } [get_ports { prog_d[4] }]; #IO_L14P_T2_SRCC_14 Sch=jb_p[3] + #set_property -dict { PACKAGE_PIN U25 IOSTANDARD LVCMOS33 } [get_ports { prog_d[5] }]; #IO_L14N_T2_SRCC_14 Sch=jb_n[3] + #set_property -dict { PACKAGE_PIN U22 IOSTANDARD LVCMOS33 } [get_ports { prog_d[6] }]; #IO_L21P_T3_DQS_14 Sch=jb_p[4] + #set_property -dict { PACKAGE_PIN U23 IOSTANDARD LVCMOS33 } [get_ports { prog_d[7] }]; #IO_L21N_T3_DQS_A06_D22_14 Sch=jb_n[4] + ``` + - Ensure **V3V3** pins are tied to **VIO** in the MiniModule. + +4. **FT2232H Configuration** + - Use **FT_Prog** (or equivalent) to set the MiniModule into **USB FIFO mode**. + - ⚠️ Digilent Adept drivers validate a protected EEPROM region not writable via FT_Prog. + - Either use Digilent reprogramming executable + - Or adapt the C++ receiver to be compatible with the FTDI drivers. + +
+ +

Figure: Valid EEPROM for DPTI

+
+ +--- + +### Bitstream Build & Deployment + +Once hardware wiring and constraints are in place with ITI, Encoder, Encapsulator, etc. : +> We used Vivado version: 2018.2 +```bash +make clean +make fpga TARGET=cv32a6_imac_sv32 +``` + +Then upload the generated ariane_xilinx.bit via Vivado Lab or your preferred hardware manager. + +--- +## 4. Software-Side Reception + +The trace reception is handled on a **Linux-based host PC**, which is connected either to the **FTDI MiniModule** or directly to the **Genesys2 board via port J17**. + +To enable communication via **DPTI (Digilent Parallel Trace Interface)**, you must first install the [**Digilent Adept SDK**](https://lp.digilent.com/complete-adept-runtime-download), specifically version `2.4.2`. This provides the required runtime libraries and development headers. The receiver code needs a C++17 version for `std::optional`. + +--- + +### Setup Instructions + +1. **Install Adept SDK** + + * Ensure the Digilent API is installed and correctly configured. + * The official Digilent SDK and documentation provide a guide. + +2. **Configure and Compile the Receiver** + + * The receiver code is located in `Receiver_DPTI.cpp`. + * You must **edit the `Makefile`** to match the paths to the Adept libraries and headers. + + * Refer to the README files in `digilent.adept.sdk_2.4.2/samples` for more informations . + * Then compile the program with: + + ```bash + make clean + make + ``` + +3. **Device Detection and Debugging** + + * The receiver includes debug function, such as `Scan_Device`, which: + + * Lists connected FTDI devices + * Displays their names + +4. **Configure BOARD\_NAME** + + * You must update the `BOARD_NAME` field in `Receiver_DPTI.cpp` to match the actual serial string of your connected device. + * Example: + + ```cpp + char* BOARD_NAME = (char*) "#tpt_0001#ptc_0002#210300075227"; + ``` + * After editing the file, recompile: + + ```bash + make clean + make + ``` + +5. **Running the Receiver** + + * Launch the receiver with: + + ```bash + ./Receiver_DPTI + ``` + * The program proceeds in **two phases**: + + * **Acquisition Phase**: Data is streamed and stored in raw format. Stop the acquisition with `SIGINT` (Ctrl+C). + * **Decapsulation Phase**: The raw binary packets are parsed and converted into human-readable CSV format. + + +
+ +

Figure: Valid execution ./Receiver_DPTI

+
+ +--- + +### Output Files + +Two output files are generated in the `receiver_data/` directory: + +* `YYYYMMDD_hhmm_raw_file.txt` - the raw encapsulated packets +* `YYYYMMDD_hhmm_data.csv` - the decoded content in CSV format + +These CSV files can be supplied to a decoder for further analysis. + +>Currently, no custom decoder is implemented. We use the reference decoder provided in the Reference Flow repository to interpret the trace contents. The University of Bologna released a version of their decoder on 3rd July 2025, but we have not evaluated it yet. + +--- + +## 5. Decoder + +At this stage, we have **not yet implemented** our own decoder. Instead, we rely on the **Reference Flow decoder** provided by the E‑Trace specification. + +#### Running the Reference Flow + +To perform decoding, you first need to run the full reference flow regression so that it can generate the files from the program binary required by its version of Spike(in the `referenceFlow`). In addition, your compiled program must be renamed with a `.riscv` extension so that the flow recognizes it as RISC‑V input and it need to be place in `referenceFlow/tests/test_files`. + +1. **Prepare your binary** + ```bash + cp path/to/your_program.elf referenceFlow/tests/test_files/your_program.riscv + ``` +2. **Execute the full reference flow** +```bash +cd referenceFlow +./scripts/run_regression.sh \ + -t itype3_debug \ + --annotate \ + --debug\ + tests/test_files/your_program.riscv +``` + + * `-t`: Specify the test suite used, here we choose `itype3_debug` to match our encoder and `_debug` to add more information in packets like `full_address mode` + * `--annotate`: This flag is optionnal and using it create annotated version of output files , usefull for understanding/debugging + * `--debug`: This flag is optionnal and using it will print in the terminal more informations about each stage + +### Decoding the Trace +Once the reference flow regression has run successfully (and generated the files needed), you can invoke the decoder step: + +```bash +cd referenceFlow +./scripts/decoder_model.py \ + -u regression_YYYYMMDD_hhmmss/itype3_debug/your_program.decoder.ucf \ + -c regression_YYYYMMDD_hhmmss/itype3_debug/hardware.scf \ + -i TRACE_OUTPUT + +``` + * `-u`: user_config, this file is generated with the first regression, inside there are information about debug flags, object-files, encoder configuration, etc + * `-c`: static_config, this file is also generated but correspond to test suite you choose, inside there are informations about default values (size of fields, encoder options, etc) + * `-i`: This file is the output of the encoder by default :`regression_YYYYMMDD_hhmmss/itype3_debug/your_program.te_inst_raw` but you can use the trace from the receiver, it support CSV format and raw format (needs to be a real binary in this case) + + If everything matches, meaning there are no difference between the captured trace and the reference Trace, you will obtain an output file like this: + +
+ +

Figure: Excerpt from decoded trace

+
+ +

+⚠️ Mismatches can occur if, for example: + +* The platform's address map (CrossBar) doesn't align with your binary's load addresses + +* The encoder fails to emit a packet (e.g., due to a bug in the encoder) + +* There is receiver desynchronization or signal glitches during trace capture + +### Current Limitations & Future Work +When we load the program via the onboard Debug Module, you will notice "trace pollution" : extra instructions corresponding to debug and JTAG activity appear in the trace. One way to mitigate this is to use the Filter submodule in the encoder to suppress unwanted instructions. However: + +**Problem:** We have not yet exposed the APB path needed to drive the Filter's control registers at runtime. + +**Next Steps:** Extend the encoder to include an APB interface for the Filter module, allowing dynamic trace filtering before encapsulation. + + +## 6. Debug Automation & VSCode Setup + +This section presents a set of **automation tools and configurations** developed to streamline the debug process using **Visual Studio Code (VSCode)**. The goal is to make it easy to: + +* **Compile user programs** into a binary format compatible with the **CV32A6** core +* **Launch OpenOCD** using the expected configuration (`ariane.cfg`) +* **Start GDB** in **remote debug mode**, attached to the target via OpenOCD + +--- + +### VSCode Integration + +To integrate these operations directly within the VSCode interface, we make use of two special configuration files: + +* `.vscode/launch.json` - defines how to start a debugging session +* `.vscode/tasks.json` - defines custom build and terminal commands + +With this setup, you can use the built-in **debug pane** of VSCode to: + +* Upload and connect to the board +* Step through code using breakpoints and GDB integration + +These files must be placed inside a `.vscode/` directory at the root of the project. + +--- + +### File Overview + +**launch.json** + +```json +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug FPGA via OpenOCD", + "type": "cppdbg", + "targetArchitecture": "x86_64", + "request": "launch", + "program": "${workspaceFolder}/Prog_compiled", + "miDebuggerServerAddress": "localhost:3333", + "useExtendedRemote": true, + "miDebuggerPath": "toolchain/bin/riscv-none-elf-gdb", + "stopAtEntry": true, + "stopAtConnect": true, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "preLaunchTask": "build-and-start-openocd", + "postRemoteConnectCommands": [ + { + "text": "source ${workspaceFolder}/gdb_init.txt" + } + ] + } + ] + } +``` + +**tasks.json** + +```json +{ + "version": "2.0.0", + "tasks": [ + + { + "label": "build-exec", + "type": "shell", + "command": "riscv-none-elf-gcc", + "args": [ + "-g", "-T", "custom_linker.ld", + "-march=rv32imac_zicsr", + "-lgcc", "-fvisibility=hidden", + "-mcmodel=medany", "-mabi=ilp32", + "-nostartfiles", "crt.S", "syscalls.c", "test.c", + "-o", "Prog_compiled" + ], + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "start openocd", + "type": "shell", + "command": "bash", + "args": [ + "-c", + "nohup gnome-terminal -- bash -c \"openocd -f ariane.cfg; exec bash\"" + ], + "problemMatcher": [] + }, + { + "label": "build-and-start-openocd", + "dependsOn": ["build-exec", "start openocd"] + } + ] + } + + +``` + +These configurations are adaptable to your own build system or directory structure. + +--- + +### Additional Resources + +* [VSCode Debugging Documentation](https://code.visualstudio.com/docs/debugtest/debugging) +* [VSCode Task Configuration](https://code.visualstudio.com/docs/debugtest/tasks) diff --git a/corev_apu/instr_tracing/SW/Receiver_DPTI/Makefile b/corev_apu/instr_tracing/SW/Receiver_DPTI/Makefile new file mode 100644 index 00000000000..50517ba22eb --- /dev/null +++ b/corev_apu/instr_tracing/SW/Receiver_DPTI/Makefile @@ -0,0 +1,30 @@ +# Copyright 2025 Thales DIS design services SAS +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Author: Maxime Colson - Thales + +# Makefile to build the receiver executable +# You need to properly install Digilent Adept and correctly link adept sdk lib +CC = g++ +INC ?= $(HOME)/runtime_adept/digilent.adept.sdk_2.4.2 +LIBDIR = /usr/lib64/digilent/adept +TARGETS = Receiver_DPTI +CFLAGS = -I $(INC) -L $(LIBDIR) -ldpti -ldmgr -Wall -Wextra -g + +all: $(TARGETS) + +Receiver_DPTI: Receiver_DPTI.cpp + $(CC) -o Receiver_DPTI Receiver_DPTI.cpp $(CFLAGS) + +.PHONY: clean + +clean: + rm -f $(TARGETS) + +clean_all: + rm -f $(TARGETS) + rm -rf receiver_data diff --git a/corev_apu/instr_tracing/SW/Receiver_DPTI/Receiver_DPTI.cpp b/corev_apu/instr_tracing/SW/Receiver_DPTI/Receiver_DPTI.cpp new file mode 100644 index 00000000000..51290d38d6c --- /dev/null +++ b/corev_apu/instr_tracing/SW/Receiver_DPTI/Receiver_DPTI.cpp @@ -0,0 +1,455 @@ +// Copyright (c) 2025 Thales DIS design services SAS +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +// Author: Maxime Colson - Thales +// Date: 17/06/2025 +// Contributors: +// Côme Allart - Thales + +// This code is designed to receive encapsulated packets emitted by an instruction encoder (See e-trace-encap). +// It captures them in two formats: raw and decapsulated (.csv). +// These files can then be passed to a decoder (e.g., riscv-trace-spec/referenceFlow/scripts/decoder_model.py). + +// To properly use this receiver, you need a Digilent FPGA board using the DPTI module from the Adept SDK. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dpcdecl.h" +#include "dmgr.h" +#include "dpti.h" + +volatile sig_atomic_t stop = 0; + +void handle_sigint(int) { stop = 1; } + +const size_t NR_PKT = 20; +const size_t PACKET_SIZE = 40; +const size_t BLOCK_SIZE = NR_PKT * PACKET_SIZE; + +typedef BYTE packet_t[PACKET_SIZE]; +typedef std::array sample_t; + +uint64_t extract_bits(const packet_t &packet, std::size_t bit_offset, + std::size_t bit_length) { // FIXME add assertion to prevent desynchro segfault + uint64_t result = 0xdead; // We use 'dead' as an indicator to quickly detect if a desynchro happened during the aquisition (without stoping decapsulation) + if (bit_length <= 64) { + result = 0; + for (std::size_t i = 0; i < bit_length; ++i) { + std::size_t global_bit = bit_offset + i; + std::size_t byte_index = global_bit / 8; + std::size_t bit_index = 7 - (global_bit % 8); + uint64_t bit = (packet[byte_index] >> bit_index) & 0x1; + result = (result << 1) | bit; + } + } + return result; +} + +template struct PrintableOption : public std::optional { + PrintableOption(std::optional &o) : std::optional(o) {} + PrintableOption(T &v) : std::optional(v) {} + PrintableOption(uint64_t v) : std::optional(v) {} + PrintableOption() : std::optional() {} + + friend std::ostream &operator<<(std::ostream &s, const PrintableOption &o) { + if (o.has_value()) + s << unsigned(*o); + else + s << "_"; + + return s; + } +}; + +struct BitExtractor { + const packet_t &packet; + bool is_backward; + size_t i; + + BitExtractor(const packet_t &packet, bool backward) + : packet(packet), is_backward(backward), + i(backward ? PACKET_SIZE * 8 : 0) {} + + uint64_t operator()(size_t bits) { return extract(bits); } + uint64_t to(size_t bit) { return extract_to(bit); } + + uint64_t extract_to(size_t bit) { return extract(i - bit); } + uint64_t extract(size_t bits) { + if (is_backward) + i -= bits; + + uint64_t result = extract_bits(packet, i, bits); + + if (!is_backward) + i += bits; + + return result; + } +}; + +struct Trace { + bool P_Time; // MSB + uint8_t P_ID; // 2 bits after MSB + uint8_t P_Size; // 5bits after P_ID + uint64_t P_Timestamp; // 64 bits after P_Size + PrintableOption format; // 2bits LSB + PrintableOption subformat; // 2bits before LSB if format=3 + PrintableOption address; // start of payload + PrintableOption branch; // F3SF0 (5) F3SF1 (5) else NDF + PrintableOption branches; // F1 (3) + PrintableOption branch_map; // F1 (4 : branches) + PrintableOption branch_count; // NDF + PrintableOption branch_fmt; // NDF + PrintableOption context; // NDF + PrintableOption ecause; //F3SF1 (8) F3SF1T (70) + PrintableOption ienable; //F3SF3 (5) + PrintableOption encoder_mode;//F3SF3 (6) + PrintableOption interrupt; // F3SF1(9) F3SF1T(71) + PrintableOption irreport; // F2 (5) F1(5) + PrintableOption irdepth; //if call/ret F2(6:2^cal) F1(6:2^cal) else NDF + PrintableOption notify; // F2(3) F1(3) + PrintableOption ioptions; //F3SF3 (8:15) + PrintableOption privilege; // F3SF0 (6) F3SF1 (6) F3SF2 (5) + PrintableOption qual_status;// F3SF3(7) + PrintableOption time; //if time F3SF0(8:72) F3SF1(8:72) F3SF2(7:71) //FIXME encoder could have time in last position + PrintableOption thaddr; // F3SF1(40) F3SF1_t(104) + PrintableOption tval; //F3SF1 (41:73) F3SF1_t(105:137) + PrintableOption updiscon;// F2(4) + PrintableOption denable;// NDF here + PrintableOption dloss;// NDF here + PrintableOption doptions;// NDF here + uint8_t size_branch_map; + + Trace(const packet_t &packet, bool time_flag, bool call_flag) { + size_branch_map = 0; + + BitExtractor header_extractor(packet, false); + BitExtractor payload_extractor(packet, true); + + // Header of encapsulated packet : + P_Time = header_extractor(1); + P_ID = header_extractor(2); + P_Size = header_extractor(5); + size_t P_Start = (PACKET_SIZE - P_Size) * 8; + P_Timestamp = header_extractor(64); + + // Extraction of fields contained in the payload : + format = payload_extractor(2); + if (format == 3) { + subformat = payload_extractor(2); + } + + if (format == 3 && subformat.has_value()) { + switch (subformat.value()) { + case 0: { // F3SF0 + branch = payload_extractor(1); + privilege = payload_extractor(2); + if (time_flag) { + time = payload_extractor(64); + } + address = payload_extractor.to(P_Start); + break; + } + case 1: { // F3SF1 + branch = payload_extractor(1); + privilege = payload_extractor(2); + if (time_flag) { + time = payload_extractor(64); + } + ecause = payload_extractor(32); + interrupt = payload_extractor(1); + thaddr = payload_extractor(1); + tval = payload_extractor(32); + address = payload_extractor.to(P_Start); + break; + } + case 2: { // F3SF2 + privilege = payload_extractor(2); + if (time_flag) { + time = payload_extractor(64); + } + break; + } + case 3: { // F3SF3 + ienable = payload_extractor(1); + encoder_mode = payload_extractor(1); + qual_status = payload_extractor(2); + ioptions = payload_extractor(7); + break; + } + } + } + + // F2 + if (format == 2) { + notify = payload_extractor(1); + updiscon = payload_extractor(1); + irreport = payload_extractor(1); + if (call_flag) { // FIXME addapt to call_counter_size + irdepth = payload_extractor(1); // if = 0 else 2^call_counter_size + } + address = payload_extractor.to(P_Start); + } + + // F1 + if (format == 1) { + branches = payload_extractor(5); + if(branches==0) { + size_branch_map = 31; + } else if (branches == 1) { + size_branch_map = 1; + } else if (branches <= 3) { + size_branch_map = 3; + } else if (branches <= 7) { + size_branch_map = 7; + } else if (branches <= 15) { + size_branch_map = 15; + } else { + size_branch_map = 31; + } + + branch_map = payload_extractor(size_branch_map); + + if (branches != 0) { + notify = payload_extractor(1); + updiscon = payload_extractor(1); + irreport = payload_extractor(1); + if (call_flag) { // FIXME addapt to call_counter_size + irdepth = payload_extractor(1); // if = 0 else 2^call_counter_size + } + address = payload_extractor.to(P_Start); + } + } + } + + static std::string csvHeader() { + return std::string( + "format,subformat,address,branch,branches,branch_map,branch_count," + "branch_fmt,context,ecause,ienable,encoder_mode,interrupt,irreport," + "irdepth,notify,ioptions,privilege,qual_status,time,thaddr,tval," + "updiscon,denable,dloss,doptions"); + } + + friend std::ostream &operator<<(std::ostream &s, Trace const &trace) { + trace.put_str(s); + return s; + } + + std::ostream &put_str(std::ostream &s) const { + s << format << "," << subformat << ","; + + s << std::hex << std::nouppercase << address << std::dec << ","; + + s << branch << "," << branches << "," << branch_map << "," << branch_count + << "," << branch_fmt << ","; + + s << context << "," << ecause << "," << ienable << "," << encoder_mode + << "," << interrupt << ","; + + s << irreport << "," << irdepth << "," << notify << "," << ioptions << "," + << privilege << "," << qual_status << ","; + + s << std::hex << std::nouppercase << time << std::dec << ","; + + s << thaddr << "," << tval << "," << updiscon << "," << denable << "," + << dloss << "," << doptions ; + + return s; + } + + std::string toCSVLine() { + std::ostringstream oss; + oss << *this; + return oss.str(); + } +}; + +std::string getTime () { + auto now = std::chrono::system_clock::now(); + std::time_t t = std::chrono::system_clock::to_time_t(now); + std::tm tm = *std::localtime(&t); + std::ostringstream ts; + ts << std::put_time(&tm, "%Y%m%d_%H%M"); + std::string timestamp = ts.str(); + + return timestamp; +} + +void Scan_Device (){ + int indexmax; + DmgrEnumDevices(&indexmax); + std::cout << indexmax < transaction_DPTI(uint32_t peripheral_handle) { + bool Transaction; + int error; + auto sample_ptr = std::make_unique(); + Transaction = DptiIO(peripheral_handle, NULL, 0, (BYTE *) sample_ptr.get(), BLOCK_SIZE, false); + + if (!Transaction) { + error = DmgrGetLastError(); + if (error == ercTransferCancelled) { + throw std::runtime_error("data transfer timed out"); + } else { + throw std::runtime_error("data transfer failed code : " + std::to_string(error)); + } + } + return sample_ptr; +} + +int main() { + // Change this field according to your board / encoder + char *BOARD_NAME = (char*)"#tpt_0001#ptc_0002#210300075227"; + const int32_t PORT = 1; // 0 or 1 + const bool TIME_FLAG = 1; + const bool CALL_FLAG = 0; + + uint32_t peripheral_handle; + peripheral_handle = hifInvalid; + size_t counter = 0; + std::vector> all_data; + //Scan_Device(); + const std::string out_dir = "receiver_data"; + + if (!std::filesystem::exists(out_dir)) { + std::filesystem::create_directory(out_dir); + } + + std::string timestamp= getTime(); + + // File paths + std::string raw_path = out_dir + "/" + timestamp + "_raw_file.txt"; + std::string csv_path = out_dir + "/" + timestamp + "_data.csv"; + + std::ofstream raw_file(raw_path); + std::ofstream csvFile(csv_path); + + + + // Initialisation of the DPTI Channel + try { + peripheral_handle = init_DPTI(BOARD_NAME, PORT); + } catch (const std::exception &e) { + if (peripheral_handle != hifInvalid) { + DptiDisable(peripheral_handle); + DmgrClose(peripheral_handle); + } + std::cerr << "ERROR Init : " << e.what() << std::endl; + return 1; + } + + + // Capture loop + signal(SIGINT, handle_sigint); + std::cout << "\nLoop (Ctrl+C to exit)\n\n"; + auto capture_start = std::chrono::high_resolution_clock::now(); + while (!stop) { + try { + auto sample_ptr = transaction_DPTI(peripheral_handle); + all_data.push_back(std::move(sample_ptr)); + + std::cout << "\rIteration : " << counter << " " << std::flush; + counter += NR_PKT; + } catch (const std::exception &e) { + std::cerr << "ERROR Transaction : " << e.what() << std::endl; + break; + } + } + auto capture_end = std::chrono::high_resolution_clock::now(); + + std::chrono::duration capture_delta_time = + capture_end - capture_start; + double capture_delta_time_sec = capture_delta_time.count(); + double throughput = (counter * PACKET_SIZE * 8) / capture_delta_time_sec; + if (throughput < 1e6) { + std::cout << "\n\nThroughput : " << std::fixed << std::setprecision(2) + << throughput / 1e3 << " Kb/s"; + } else { + std::cout << "\n\nThroughput : " << std::fixed << std::setprecision(2) + << throughput / 1e6 << " Mb/s"; + } + std::cout << "\t\tCapturing took :" << capture_delta_time_sec << "s\n"; + + // Writing output : Raw / Decapsulated csv + auto write_start = std::chrono::high_resolution_clock::now(); + if (csvFile.is_open() && raw_file.is_open()) { + csvFile << Trace::csvHeader() << "\n"; + for (const auto &sample_ptr : all_data) { + for (const packet_t &packet : *sample_ptr) { + Trace trace(packet, TIME_FLAG, CALL_FLAG); + csvFile << trace.toCSVLine() << "\n"; + for (size_t k = 0; k < PACKET_SIZE; ++k) { + raw_file << std::uppercase << std::hex << std::setw(2) + << std::setfill('0') << (unsigned)packet[k]; + } + raw_file << "\n"; + } + } + std::cout + << "\n========================SUCCESS_WRITE========================\n"; + } + auto write_end = std::chrono::high_resolution_clock::now(); + std::chrono::duration write_delta_time = write_end - write_start; + double write_delta_time_sec = write_delta_time.count(); + std::cout << "\nWriting Took : " << write_delta_time_sec << "s\n"; + + auto raw_size = std::filesystem::file_size(raw_path); + auto csv_size = std::filesystem::file_size(csv_path); + std::cout << "\nRaw file size: " << raw_size / 1e6 << " Mbytes\t"; + std::cout << "CSV file size: " << csv_size / 1e6 << " Mbytes\n"; + + DptiDisable(peripheral_handle); + DmgrClose(peripheral_handle); + + std::cout + << "\n========================SUCCESS_CLOSE========================\n\n"; + + return 0; +} \ No newline at end of file diff --git a/corev_apu/instr_tracing/SW/Receiver_DPTI/clean_csv.sh b/corev_apu/instr_tracing/SW/Receiver_DPTI/clean_csv.sh new file mode 100644 index 00000000000..0bbd3ed3163 --- /dev/null +++ b/corev_apu/instr_tracing/SW/Receiver_DPTI/clean_csv.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +# Copyright 2025 Thales DIS design services SAS +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Author: Maxime Colson - Thales +# THis script remove lines above the start packet 3.3 + +if [ $# -ne 1 ]; then + echo "Usage!: $0 file/to/clean.csv" + exit 1 +fi +# This script will clean the csv trace by starting the trace at the first packet after reset +input_file="$1" +output_file="${input_file%.csv}_cleaned.csv" +temp_file=$(mktemp) + +awk 'found || /^3,3,_,_,/ {found=1; print}' "$input_file" > "$temp_file" + +{ + printf "format,subformat,address,branch,branches,branch_map,branch_count," + printf "branch_fmt,context,ecause,ienable,encoder_mode,interrupt,irreport," + printf "irdepth,notify,ioptions,privilege,qual_status,time,thaddr,tval," + printf "updiscon,denable,dloss,doptions\n" + + cat "$temp_file" +} > "$output_file" + +rm "$temp_file" + +echo "File Cleaned : $output_file" \ No newline at end of file diff --git a/corev_apu/instr_tracing/SW/Receiver_DPTI/run_timeout.sh b/corev_apu/instr_tracing/SW/Receiver_DPTI/run_timeout.sh new file mode 100644 index 00000000000..68355bf8834 --- /dev/null +++ b/corev_apu/instr_tracing/SW/Receiver_DPTI/run_timeout.sh @@ -0,0 +1,39 @@ +# Copyright 2025 Thales DIS design services SAS +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Author: Maxime Colson - Thales + +#Script to automate the aquisition process for the receiver + +NR_PKTS=(1 2 10 20 50 100 200) +DURATION=5 + +LOG_FILE="log_$(date +'%Y%m%d_%H%M%S').txt" +echo "Fichier de log : $LOG_FILE" + +echo -e "NR_PKT\tThroughput (Mb/s)" > "$LOG_FILE" + +capture_fct() { + ./Receiver_DPTI & + PID=$! + sleep "$DURATION" + kill -SIGINT "$PID" + sleep 2 +} + +for i in "${NR_PKTS[@]}"; do + echo "=== NR_PKT = $i ===" + sed -i "s/const int NR_PKT = [0-9]\+;/const int NR_PKT = $i;/" Receiver_DPTI.cpp + make > /dev/null || { echo "Compilation échouée à $i"; exit 1; } + + OUTPUT=$(capture_fct | grep -oP 'Throughput\s*:\s*\K[0-9.]+' ) + echo "$i : $OUTPUT" | tee -a "$LOG_FILE" + +done + +python3 script.py "$LOG_FILE" + diff --git a/corev_apu/instr_tracing/SW/Receiver_DPTI/script.py b/corev_apu/instr_tracing/SW/Receiver_DPTI/script.py new file mode 100644 index 00000000000..2b3f1ef61e0 --- /dev/null +++ b/corev_apu/instr_tracing/SW/Receiver_DPTI/script.py @@ -0,0 +1,59 @@ +# Copyright 2025 Thales DIS design services SAS +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Author: Maxime Colson - Thales + +#Script to plot data from run_timeout.sh aquisition with receiver + +import sys +import matplotlib.pyplot as plt + +def parse_log(file_path): + nr_pkts = [] + throughputs = [] + with open(file_path) as f: + for line in f: + line = line.strip() + if not line or ':' not in line or line.startswith('NR_PKT'): + continue + try: + pkt_str, tp_str = line.split(':') + pkt = int(pkt_str.strip()) + tp = float(tp_str.strip()) + nr_pkts.append(pkt) + throughputs.append(tp) + except ValueError: + continue + return nr_pkts, throughputs + +def main(): + if len(sys.argv) != 2: + print(f"Usage: {sys.argv[0]} ") + sys.exit(1) + + log_file = sys.argv[1] + nr_pkts, throughputs = parse_log(log_file) + + if not nr_pkts: + print("Aucune donnée valide trouvée dans le fichier.") + sys.exit(1) + + print("\nNR_PKT\tThroughput (Mb/s)") + for pkt, tp in zip(nr_pkts, throughputs): + print(f"{pkt}\t{tp}") + + plt.figure() + plt.plot(nr_pkts, throughputs, marker='o') + plt.xlabel("Nombre de paquets (NR_PKT)") + plt.ylabel("Throughput (Mb/s)") + plt.title("NR_PKT vs Throughput") + plt.grid(True) + plt.tight_layout() + plt.show() + +if __name__ == "__main__": + main() diff --git a/corev_apu/instr_tracing/SW/Receiver_DPTI/to_script.sh b/corev_apu/instr_tracing/SW/Receiver_DPTI/to_script.sh new file mode 100644 index 00000000000..3dcaa82005e --- /dev/null +++ b/corev_apu/instr_tracing/SW/Receiver_DPTI/to_script.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +# Copyright 2025 Thales DIS design services SAS +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Author: Maxime Colson - Thales +capture_fct() { + ./Receiver_DPTI & + PID=$! + sleep 5 + kill -SIGINT "$PID" + sleep 2 +} + +NR_PKTS=(10 20 50 100 200) + +for i in "${NR_PKTS[@]}"; do + echo "=== $i ===" + + sed -i "s/const int NR_PKT = [0-9]\+;/const int NR_PKT = $i;/" Receiver_DPTI.cpp + make -s + capture_fct >> log2.txt + +done diff --git a/corev_apu/instr_tracing/rv_encapsulator-main/LICENSE b/corev_apu/instr_tracing/rv_encapsulator-main/LICENSE new file mode 100644 index 00000000000..3931d9e54f8 --- /dev/null +++ b/corev_apu/instr_tracing/rv_encapsulator-main/LICENSE @@ -0,0 +1,176 @@ +SOLDERPAD HARDWARE LICENSE version 0.51 + +This license is based closely on the Apache License Version 2.0, but is not +approved or endorsed by the Apache Foundation. A copy of the non-modified +Apache License 2.0 can be found at http://www.apache.org/licenses/LICENSE-2.0. + +As this license is not currently OSI or FSF approved, the Licensor permits any +Work licensed under this License, at the option of the Licensee, to be treated +as licensed under the Apache License Version 2.0 (which is so approved). + +This License is licensed under the terms of this License and in particular +clause 7 below (Disclaimer of Warranties) applies in relation to its use. + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the Rights owner or entity authorized by the Rights owner +that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Rights" means copyright and any similar right including design right (whether +registered or unregistered), semiconductor topography (mask) rights and +database rights (but excluding Patents and Trademarks). + +"Source" form shall mean the preferred form for making modifications, including +but not limited to source code, net lists, board layouts, CAD files, +documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object +code, generated documentation, the instantiation of a hardware design and +conversions to other media types, including intermediate forms such as +bytecodes, FPGA bitstreams, artwork and semiconductor topographies (mask +works). + +"Work" shall mean the work of authorship, whether in Source form or other +Object form, made available under the License, as indicated by a Rights notice +that is included in or attached to the work (an example is provided in the +Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) or physically connect to or interoperate with the interfaces of, the Work +and Derivative Works thereof. + +"Contribution" shall mean any design or work of authorship, including the +original version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor for +inclusion in the Work by the Rights owner or by an individual or Legal Entity +authorized to submit on behalf of the Rights owner. For the purposes of this +definition, "submitted" means any form of electronic, verbal, or written +communication sent to the Licensor or its representatives, including but not +limited to communication on electronic mailing lists, source code control +systems, and issue tracking systems that are managed by, or on behalf of, the +Licensor for the purpose of discussing and improving the Work, but excluding +communication that is conspicuously marked or otherwise designated in writing +by the Rights owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of License. Subject to the terms and conditions of this License, each +Contributor hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable license under the Rights to reproduce, +prepare Derivative Works of, publicly display, publicly perform, sublicense, +and distribute the Work and such Derivative Works in Source or Object form and +do anything in relation to the Work as if the Rights did not exist. + +3. Grant of Patent License. Subject to the terms and conditions of this +License, each Contributor hereby grants to You a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this +section) patent license to make, have made, use, offer to sell, sell, import, +and otherwise transfer the Work, where such license applies only to those +patent claims licensable by such Contributor that are necessarily infringed by +their Contribution(s) alone or by combination of their Contribution(s) with the +Work to which such Contribution(s) was submitted. If You institute patent +litigation against any entity (including a cross-claim or counterclaim in a +lawsuit) alleging that the Work or a Contribution incorporated within the Work +constitutes direct or contributory patent infringement, then any patent +licenses granted to You under this License for that Work shall terminate as of +the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or +Derivative Works thereof in any medium, with or without modifications, and in +Source or Object form, provided that You meet the following conditions: + + You must give any other recipients of the Work or Derivative Works a copy + of this License; and + + You must cause any modified files to carry prominent notices stating that + You changed the files; and + + You must retain, in the Source form of any Derivative Works that You + distribute, all copyright, patent, trademark, and attribution notices from + the Source form of the Work, excluding those notices that do not pertain to + any part of the Derivative Works; and + + If the Work includes a "NOTICE" text file as part of its distribution, then + any Derivative Works that You distribute must include a readable copy of + the attribution notices contained within such NOTICE file, excluding those + notices that do not pertain to any part of the Derivative Works, in at + least one of the following places: within a NOTICE text file distributed as + part of the Derivative Works; within the Source form or documentation, if + provided along with the Derivative Works; or, within a display generated by + the Derivative Works, if and wherever such third-party notices normally + appear. The contents of the NOTICE file are for informational purposes only + and do not modify the License. You may add Your own attribution notices + within Derivative Works that You distribute, alongside or as an addendum to + the NOTICE text from the Work, provided that such additional attribution + notices cannot be construed as modifying the License. You may add Your own + copyright statement to Your modifications and may provide additional or + different license terms and conditions for use, reproduction, or + distribution of Your modifications, or for any such Derivative Works as a + whole, provided Your use, reproduction, and distribution of the Work + otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any +Contribution intentionally submitted for inclusion in the Work by You to the +Licensor shall be under the terms and conditions of this License, without any +additional terms or conditions. Notwithstanding the above, nothing herein shall +supersede or modify the terms of any separate license agreement you may have +executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, +trademarks, service marks, or product names of the Licensor, except as required +for reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in +writing, Licensor provides the Work (and each Contributor provides its +Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied, including, without limitation, any warranties +or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. You are solely responsible for determining the +appropriateness of using or redistributing the Work and assume any risks +associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in +tort (including negligence), contract, or otherwise, unless required by +applicable law (such as deliberate and grossly negligent acts) or agreed to in +writing, shall any Contributor be liable to You for damages, including any +direct, indirect, special, incidental, or consequential damages of any +character arising as a result of this License or out of the use or inability to +use the Work (including but not limited to damages for loss of goodwill, work +stoppage, computer failure or malfunction, or any and all other commercial +damages or losses), even if such Contributor has been advised of the +possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or +Derivative Works thereof, You may choose to offer, and charge a fee for, +acceptance of support, warranty, indemnity, or other liability obligations +and/or rights consistent with this License. However, in accepting such +obligations, You may act only on Your own behalf and on Your sole +responsibility, not on behalf of any other Contributor, and only if You agree +to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/corev_apu/instr_tracing/rv_encapsulator-main/README.md b/corev_apu/instr_tracing/rv_encapsulator-main/README.md new file mode 100644 index 00000000000..66687223759 --- /dev/null +++ b/corev_apu/instr_tracing/rv_encapsulator-main/README.md @@ -0,0 +1,2 @@ +The encapsulator is a modified version of https://github.com/pulp-platform/rv_encapsulator +This directory (`rv_encapsulator-main`) is temporary and will soon be replaced by a submodule. \ No newline at end of file diff --git a/corev_apu/instr_tracing/rv_encapsulator-main/src/include/encap_pkg.sv b/corev_apu/instr_tracing/rv_encapsulator-main/src/include/encap_pkg.sv new file mode 100644 index 00000000000..32af59527f2 --- /dev/null +++ b/corev_apu/instr_tracing/rv_encapsulator-main/src/include/encap_pkg.sv @@ -0,0 +1,50 @@ +// Copyright 2025 ETH Zurich and University of Bologna. +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. +// SPDX-License-Identifier: SHL-0.51 + +// Author: Umberto Laghi +// Contact: umberto.laghi2@unibo.it +// Github: @ubolakes + +/* +all the type associated params are commented because the type is not required for trace encoders +supporting only instruction tracing +*/ + +package encap_pkg; + + localparam H_LEN = 8; // header length + //localparam SRCID_LEN = 7; // not used because only one source in system + //localparam TYPE_LEN = 8; + localparam PAYLOAD_LEN = 248 /*- TYPE_LEN - (SRCID_LEN % 8)*/; // trace_payload_len + localparam T_LEN = 64; // timestamp length: mcycle length is always 64 + localparam FLOW_LEN = 2; + localparam P_LEN = 5; + localparam MAX_LEN = 264; // max length for payload to slice + + typedef struct packed { + logic extend; + logic [FLOW_LEN-1:0] flow; + logic [P_LEN-1:0] length; + } header_s; + + typedef struct packed { + //logic [TYPE_LEN-1:0] type; // omitted because only instruction trace available + logic [PAYLOAD_LEN-1:0] trace_payload; + } payload_s; + + typedef struct packed { + header_s header; + //logic [SRCID_LEN-1:0] srcid; + logic [T_LEN-1:0] timestamp; + payload_s payload; + } encap_fifo_entry_s; + +endpackage \ No newline at end of file diff --git a/corev_apu/instr_tracing/rv_encapsulator-main/src/rtl/encapsulator.sv b/corev_apu/instr_tracing/rv_encapsulator-main/src/rtl/encapsulator.sv new file mode 100644 index 00000000000..e93c8ba864f --- /dev/null +++ b/corev_apu/instr_tracing/rv_encapsulator-main/src/rtl/encapsulator.sv @@ -0,0 +1,75 @@ +// Copyright 2025 ETH Zurich and University of Bologna. +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. +// SPDX-License-Identifier: SHL-0.51 + +// Author: Umberto Laghi +// Contact: umberto.laghi2@unibo.it +// Github: @ubolakes + +/* ENCAPSULATOR */ +/* +this module generates the header and payload necessary based on the protocol used +*/ + +module encapsulator ( + // inputs + input logic clk_i, + input logic valid_i, + input logic [encap_pkg::P_LEN-1:0] packet_length_i, + input logic [encap_pkg::FLOW_LEN-1:0] flow_i, + input logic timestamp_present_i, + //input logic srcid_i, + input logic [encap_pkg::T_LEN-1:0] timestamp_i, + //input logic [encap_pkg::TYPE_LEN-1:0] type_i, + input logic [encap_pkg::PAYLOAD_LEN-1:0] trace_payload_i, + + // outputs + output logic valid_o, + output encap_pkg::encap_fifo_entry_s encap_fifo_entry_o +); + // pragma translate_off + int f; + initial begin + f = $fopen("encaps.traces", "w"); + end + final $fclose(f); + // pragma translate_on + +always_comb begin + // initialization + valid_o = '0; + encap_fifo_entry_o = '0; + + // assignments + if (valid_i) begin + valid_o = '1; + // header + encap_fifo_entry_o.header.length = packet_length_i; + encap_fifo_entry_o.header.flow = flow_i; + encap_fifo_entry_o.header.extend = timestamp_present_i; + // srcID + //encap_fifo_entry_o.srcid = srcid_i; + // timestamp + encap_fifo_entry_o.timestamp = timestamp_i; + // payload + encap_fifo_entry_o.payload.trace_payload = trace_payload_i; + end +end +// pragma translate_off +always_ff @(posedge clk_i) begin + if (valid_o) begin + $fwrite( + f, + "%h\n",encap_fifo_entry_o); + end +end +// pragma translate_on + +endmodule \ No newline at end of file diff --git a/corev_apu/instr_tracing/rv_tracer-main/LICENSE b/corev_apu/instr_tracing/rv_tracer-main/LICENSE new file mode 100644 index 00000000000..3931d9e54f8 --- /dev/null +++ b/corev_apu/instr_tracing/rv_tracer-main/LICENSE @@ -0,0 +1,176 @@ +SOLDERPAD HARDWARE LICENSE version 0.51 + +This license is based closely on the Apache License Version 2.0, but is not +approved or endorsed by the Apache Foundation. A copy of the non-modified +Apache License 2.0 can be found at http://www.apache.org/licenses/LICENSE-2.0. + +As this license is not currently OSI or FSF approved, the Licensor permits any +Work licensed under this License, at the option of the Licensee, to be treated +as licensed under the Apache License Version 2.0 (which is so approved). + +This License is licensed under the terms of this License and in particular +clause 7 below (Disclaimer of Warranties) applies in relation to its use. + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the Rights owner or entity authorized by the Rights owner +that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Rights" means copyright and any similar right including design right (whether +registered or unregistered), semiconductor topography (mask) rights and +database rights (but excluding Patents and Trademarks). + +"Source" form shall mean the preferred form for making modifications, including +but not limited to source code, net lists, board layouts, CAD files, +documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object +code, generated documentation, the instantiation of a hardware design and +conversions to other media types, including intermediate forms such as +bytecodes, FPGA bitstreams, artwork and semiconductor topographies (mask +works). + +"Work" shall mean the work of authorship, whether in Source form or other +Object form, made available under the License, as indicated by a Rights notice +that is included in or attached to the work (an example is provided in the +Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) or physically connect to or interoperate with the interfaces of, the Work +and Derivative Works thereof. + +"Contribution" shall mean any design or work of authorship, including the +original version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor for +inclusion in the Work by the Rights owner or by an individual or Legal Entity +authorized to submit on behalf of the Rights owner. For the purposes of this +definition, "submitted" means any form of electronic, verbal, or written +communication sent to the Licensor or its representatives, including but not +limited to communication on electronic mailing lists, source code control +systems, and issue tracking systems that are managed by, or on behalf of, the +Licensor for the purpose of discussing and improving the Work, but excluding +communication that is conspicuously marked or otherwise designated in writing +by the Rights owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of License. Subject to the terms and conditions of this License, each +Contributor hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable license under the Rights to reproduce, +prepare Derivative Works of, publicly display, publicly perform, sublicense, +and distribute the Work and such Derivative Works in Source or Object form and +do anything in relation to the Work as if the Rights did not exist. + +3. Grant of Patent License. Subject to the terms and conditions of this +License, each Contributor hereby grants to You a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this +section) patent license to make, have made, use, offer to sell, sell, import, +and otherwise transfer the Work, where such license applies only to those +patent claims licensable by such Contributor that are necessarily infringed by +their Contribution(s) alone or by combination of their Contribution(s) with the +Work to which such Contribution(s) was submitted. If You institute patent +litigation against any entity (including a cross-claim or counterclaim in a +lawsuit) alleging that the Work or a Contribution incorporated within the Work +constitutes direct or contributory patent infringement, then any patent +licenses granted to You under this License for that Work shall terminate as of +the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or +Derivative Works thereof in any medium, with or without modifications, and in +Source or Object form, provided that You meet the following conditions: + + You must give any other recipients of the Work or Derivative Works a copy + of this License; and + + You must cause any modified files to carry prominent notices stating that + You changed the files; and + + You must retain, in the Source form of any Derivative Works that You + distribute, all copyright, patent, trademark, and attribution notices from + the Source form of the Work, excluding those notices that do not pertain to + any part of the Derivative Works; and + + If the Work includes a "NOTICE" text file as part of its distribution, then + any Derivative Works that You distribute must include a readable copy of + the attribution notices contained within such NOTICE file, excluding those + notices that do not pertain to any part of the Derivative Works, in at + least one of the following places: within a NOTICE text file distributed as + part of the Derivative Works; within the Source form or documentation, if + provided along with the Derivative Works; or, within a display generated by + the Derivative Works, if and wherever such third-party notices normally + appear. The contents of the NOTICE file are for informational purposes only + and do not modify the License. You may add Your own attribution notices + within Derivative Works that You distribute, alongside or as an addendum to + the NOTICE text from the Work, provided that such additional attribution + notices cannot be construed as modifying the License. You may add Your own + copyright statement to Your modifications and may provide additional or + different license terms and conditions for use, reproduction, or + distribution of Your modifications, or for any such Derivative Works as a + whole, provided Your use, reproduction, and distribution of the Work + otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any +Contribution intentionally submitted for inclusion in the Work by You to the +Licensor shall be under the terms and conditions of this License, without any +additional terms or conditions. Notwithstanding the above, nothing herein shall +supersede or modify the terms of any separate license agreement you may have +executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, +trademarks, service marks, or product names of the Licensor, except as required +for reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in +writing, Licensor provides the Work (and each Contributor provides its +Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied, including, without limitation, any warranties +or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. You are solely responsible for determining the +appropriateness of using or redistributing the Work and assume any risks +associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in +tort (including negligence), contract, or otherwise, unless required by +applicable law (such as deliberate and grossly negligent acts) or agreed to in +writing, shall any Contributor be liable to You for damages, including any +direct, indirect, special, incidental, or consequential damages of any +character arising as a result of this License or out of the use or inability to +use the Work (including but not limited to damages for loss of goodwill, work +stoppage, computer failure or malfunction, or any and all other commercial +damages or losses), even if such Contributor has been advised of the +possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or +Derivative Works thereof, You may choose to offer, and charge a fee for, +acceptance of support, warranty, indemnity, or other liability obligations +and/or rights consistent with this License. However, in accepting such +obligations, You may act only on Your own behalf and on Your sole +responsibility, not on behalf of any other Contributor, and only if You agree +to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/corev_apu/instr_tracing/rv_tracer-main/README.md b/corev_apu/instr_tracing/rv_tracer-main/README.md new file mode 100644 index 00000000000..b9a88a29eb2 --- /dev/null +++ b/corev_apu/instr_tracing/rv_tracer-main/README.md @@ -0,0 +1,2 @@ +The encoder is a modified version of https://github.com/pulp-platform/rv_tracer +This directory (`rv_tracer-main`) is temporary and will soon be replaced by a submodule. \ No newline at end of file diff --git a/corev_apu/instr_tracing/rv_tracer-main/include/te_pkg.sv b/corev_apu/instr_tracing/rv_tracer-main/include/te_pkg.sv new file mode 100644 index 00000000000..fefb0053a63 --- /dev/null +++ b/corev_apu/instr_tracing/rv_tracer-main/include/te_pkg.sv @@ -0,0 +1,187 @@ +// Copyright 2025 ETH Zurich and University of Bologna. +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. +// SPDX-License-Identifier: SHL-0.51 + +// Author: Umberto Laghi +// Contact: umberto.laghi2@unibo.it +// Github: @ubolakes + +// uncomment to enable 64bits arch support +// `define TE_ARCH64 + +package te_pkg; + localparam PRIV_LEN = 2; // depends on CPU implementation + localparam INST_LEN = 32; + localparam PTYPE_LEN = 4; // is it F + SF? spec not clear + localparam P_LEN = 5; + localparam PAYLOAD_LEN = 248; + localparam TRIGGER_LEN = 4; + localparam CTYPE_LEN = 2; +`ifdef TE_ARCH64 // 64bit arch specific parameters + localparam XLEN = 64; + // APB addresses to access registers + // the value is added to the peripheral address + /* FILTER */ + // cause + localparam CAUSE_UPPER = 8'h5; + localparam CAUSE_LOWER = 8'h6; + localparam CAUSE_MATCH = 8'h7; + // tvec + localparam TVEC_UPPER_L = 8'h8; // least significant bits + localparam TVEC_UPPER_M = 8'h9; // most significant bits + localparam TVEC_LOWER_L = 8'ha; // least significant bits + localparam TVEC_LOWER_M = 8'hb; // most significant bits + localparam TVEC_MATCH_L = 8'hc; // least significant bits + localparam TVEC_MATCH_M = 8'hd; // most significant bits + // tval + localparam TVAL_UPPER_L = 8'he; // least significant bits + localparam TVAL_UPPER_M = 8'hf; // most significant bits + localparam TVAL_LOWER_L = 8'h10; // least significant bits + localparam TVAL_LOWER_M = 8'h11; // most significant bits + localparam TVAL_MATCH_L = 8'h12; // least significant bits + localparam TVAL_MATCH_M = 8'h13; // most significant bits + // iaddr + localparam IADDR_UPPER_L = 8'h16; // least significant bits + localparam IADDR_UPPER_M = 8'h17; // most significant bits + localparam IADDR_LOWER_L = 8'h18; // least significant bits + localparam IADDR_LOWER_M = 8'h19; // most significant bits + localparam IADDR_MATCH_L = 8'h1a; // least significant bits + localparam IADDR_MATCH_M = 8'h1b; // most significant bits +`else // 32bit arch + localparam XLEN = 32; + // APB addresses to access registers + // APB addresses to access registers + // the value is added to the peripheral address + /* FILTER */ + // cause + localparam CAUSE_UPPER = 8'h5; + localparam CAUSE_LOWER = 8'h6; + localparam CAUSE_MATCH = 8'h7; + // tvec + localparam TVEC_UPPER = 8'h8; + localparam TVEC_LOWER = 8'ha; + localparam TVEC_MATCH = 8'hc; + // tval + localparam TVAL_UPPER = 8'he; + localparam TVAL_LOWER = 8'h10; + localparam TVAL_MATCH = 8'h12; + // iaddr + localparam IADDR_UPPER = 8'h16; + localparam IADDR_LOWER = 8'h18; + localparam IADDR_MATCH = 8'h1a; +`endif + /* both archs parameters */ + // localparams for resync counter + localparam CYCLE_MODE = 0; + localparam PACKET_MODE = 1; + // localparams for irreport and irdepth + localparam CALL_COUNTER_SIZE = '0; + localparam RETURN_STACK_SIZE = '0; + // localparams for branch map - defined by spec + localparam BRANCH_MAP_LEN = 31; + localparam BRANCH_COUNT_LEN = 5; + // localparams for filter mode + localparam RANGE_MODE = 1'b0; + localparam EQUAL_MODE = 1'b1; + // localparam for time signal + localparam TIME_LEN = 64; + // localparam for itype + localparam ITYPE_LEN = 3; + // localparam for iretire + localparam IRETIRE_LEN = 32; + + // common APB addresses to access registers + /* FILTER */ + // input and mode + localparam CAUSE_ENABLE_MODE = 8'h0; + localparam TVEC_ENABLE_MODE = 8'h1; + localparam TVAL_ENABLE_MODE = 8'h2; + localparam PRIV_ENABLE_MODE = 8'h3; + localparam IADDR_ENABLE_MODE = 8'h4; + // priv + localparam PRIV_RANGE = 8'h14; + localparam PRIV_MATCH = 8'h15; + /* TRACE MANAGEMENT */ + localparam TRACE_STATE = 8'h1c; + localparam LOSSLESS_TRACE = 8'h1d; + localparam SHALLOW_TRACE = 8'h1e; + /* PACKET EMITTER */ + localparam NO_TIME = 8'h1f; + localparam NO_CONTEXT = 8'h20; + localparam DELTA_ADDRESS = 8'h21; + localparam FULL_ADDRESS = 8'h22; + localparam IMPLICIT_EXCEPTION = 8'h23; + localparam SIJUMP = 8'h24; + localparam IMPLICIT_RETURN = 8'h25; + localparam BRANCH_PREDICTION = 8'h26; + localparam JUMP_TARGET_CACHE = 8'h27; + +// packet types +typedef enum logic[1:0] { + F_OPT_EXT = 2'h0, + F_DIFF_DELTA = 2'h1, + F_ADDR_ONLY = 2'h2, + F_SYNC = 2'h3 +} format_e; + +// subformats available for type 3 packets (F_SYNC) +typedef enum logic[1:0] { + SF_START = 2'h0, + SF_TRAP = 2'h1, + SF_CONTEXT = 2'h2, + SF_SUPPORT = 2'h3 +} f_sync_subformat_e; + +// subformats available for type 0 packets (F_OPT_EXT) +// used a struct for future extensions +typedef enum logic[0:0] { + SF_PBC = 1'h0, // correctly predicted branches + SF_JTC = 1'h1 // jump target cache in spec +} f_opt_ext_subformat_e; + +// qual_status values necessary for format 3 subformat 3 +// packet payload +typedef enum logic[1:0] { + NO_CHANGE = 2'h0, + ENDED_REP = 2'h1, + TRACE_LOST = 2'h2, + ENDED_NTR = 2'h3 +} qual_status_e; + +// struct to determine the ioptions enabled/disabled +// for format 3 subformat 3 packets +typedef struct packed { + logic delta_address_en; + logic full_address_en; + logic implicit_exception_en; + logic sijump_en; + logic implicit_return_en; + logic branch_prediction_en; + logic jump_target_cache_en; +} ioptions_s; + +// enum that expresses the packet format and +// subformat to better readability +typedef enum logic[3:0] { + F0SF0 = 4'h0, + F0SF1 = 4'h1, + F1 = 4'h4, + F2 = 4'h8, + F3SF0 = 4'hC, + F3SF1 = 4'hD, + F3SF2 = 4'hE, + F3SF3 = 4'hF +} it_packet_type_e; // "it" stands for "instruction trace" + +/*TODO: + doptions struct for data tracing + refer to page 36 of the spec */ + +endpackage \ No newline at end of file diff --git a/corev_apu/instr_tracing/rv_tracer-main/rtl/lzc.sv b/corev_apu/instr_tracing/rv_tracer-main/rtl/lzc.sv new file mode 100644 index 00000000000..f28730ac7fb --- /dev/null +++ b/corev_apu/instr_tracing/rv_tracer-main/rtl/lzc.sv @@ -0,0 +1,106 @@ +// Copyright 2018 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 + +// `include "common_cells/assertions.svh" + +/// A trailing zero counter / leading zero counter. +/// Set MODE to 0 for trailing zero counter => cnt_o is the number of trailing zeros (from the LSB) +/// Set MODE to 1 for leading zero counter => cnt_o is the number of leading zeros (from the MSB) +/// If the input does not contain a zero, `empty_o` is asserted. Additionally `cnt_o` contains +/// the maximum number of zeros - 1. For example: +/// in_i = 000_0000, empty_o = 1, cnt_o = 6 (mode = 0) +/// in_i = 000_0001, empty_o = 0, cnt_o = 0 (mode = 0) +/// in_i = 000_1000, empty_o = 0, cnt_o = 3 (mode = 0) +/// Furthermore, this unit contains a more efficient implementation for Verilator (simulation only). +/// This speeds up simulation significantly. +module lzc #( + /// The width of the input vector. + parameter int unsigned WIDTH = 2, + /// Mode selection: 0 -> trailing zero, 1 -> leading zero + parameter bit MODE = 1'b0, + /// Dependent parameter. Do **not** change! + /// + /// Width of the output signal with the zero count. + parameter int unsigned CNT_WIDTH = cf_math_pkg::idx_width(WIDTH) +) ( + /// Input vector to be counted. + input logic [WIDTH-1:0] in_i, + /// Count of the leading / trailing zeros. + output logic [CNT_WIDTH-1:0] cnt_o, + /// Counter is empty: Asserted if all bits in in_i are zero. + output logic empty_o +); + + if (WIDTH == 1) begin : gen_degenerate_lzc + + assign cnt_o[0] = !in_i[0]; + assign empty_o = !in_i[0]; + + end else begin : gen_lzc + + localparam int unsigned NumLevels = $clog2(WIDTH); + + // `ifndef COMMON_CELLS_ASSERTS_OFF + // `ASSERT_INIT(width_0, WIDTH > 0, "input must be at least one bit wide") + // `endif + + logic [WIDTH-1:0][NumLevels-1:0] index_lut; + logic [2**NumLevels-1:0] sel_nodes; + logic [2**NumLevels-1:0][NumLevels-1:0] index_nodes; + + logic [WIDTH-1:0] in_tmp; + + // reverse vector if required + always_comb begin : flip_vector + for (int unsigned i = 0; i < WIDTH; i++) begin + in_tmp[i] = (MODE) ? in_i[WIDTH-1-i] : in_i[i]; + end + end + + for (genvar j = 0; unsigned'(j) < WIDTH; j++) begin : g_index_lut + assign index_lut[j] = (NumLevels)'(unsigned'(j)); + end + + for (genvar level = 0; unsigned'(level) < NumLevels; level++) begin : g_levels + if (unsigned'(level) == NumLevels - 1) begin : g_last_level + for (genvar k = 0; k < 2 ** level; k++) begin : g_level + // if two successive indices are still in the vector... + if (unsigned'(k) * 2 < WIDTH - 1) begin : g_reduce + assign sel_nodes[2 ** level - 1 + k] = in_tmp[k * 2] | in_tmp[k * 2 + 1]; + assign index_nodes[2 ** level - 1 + k] = (in_tmp[k * 2] == 1'b1) + ? index_lut[k * 2] : + index_lut[k * 2 + 1]; + end + // if only the first index is still in the vector... + if (unsigned'(k) * 2 == WIDTH - 1) begin : g_base + assign sel_nodes[2 ** level - 1 + k] = in_tmp[k * 2]; + assign index_nodes[2 ** level - 1 + k] = index_lut[k * 2]; + end + // if index is out of range + if (unsigned'(k) * 2 > WIDTH - 1) begin : g_out_of_range + assign sel_nodes[2 ** level - 1 + k] = 1'b0; + assign index_nodes[2 ** level - 1 + k] = '0; + end + end + end else begin : g_not_last_level + for (genvar l = 0; l < 2 ** level; l++) begin : g_level + assign sel_nodes[2 ** level - 1 + l] = + sel_nodes[2 ** (level + 1) - 1 + l * 2] | sel_nodes[2 ** (level + 1) - 1 + l * 2 + 1]; + assign index_nodes[2 ** level - 1 + l] = (sel_nodes[2 ** (level + 1) - 1 + l * 2] == 1'b1) + ? index_nodes[2 ** (level + 1) - 1 + l * 2] : + index_nodes[2 ** (level + 1) - 1 + l * 2 + 1]; + end + end + end + + assign cnt_o = NumLevels > unsigned'(0) ? index_nodes[0] : {($clog2(WIDTH)) {1'b0}}; + assign empty_o = NumLevels > unsigned'(0) ? ~sel_nodes[0] : ~(|in_i); + + end : gen_lzc + +// `ifndef COMMON_CELLS_ASSERTS_OFF +// `ASSERT_INIT(width_0, WIDTH >= 1, "The WIDTH must at least be one bit wide!") +// `endif + +endmodule : lzc diff --git a/corev_apu/instr_tracing/rv_tracer-main/rtl/rv_tracer.sv b/corev_apu/instr_tracing/rv_tracer-main/rtl/rv_tracer.sv new file mode 100644 index 00000000000..c920c876a26 --- /dev/null +++ b/corev_apu/instr_tracing/rv_tracer-main/rtl/rv_tracer.sv @@ -0,0 +1,911 @@ +// Copyright 2025 ETH Zurich and University of Bologna. +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. +// SPDX-License-Identifier: SHL-0.51 + +// Author: Umberto Laghi +// Contact: umberto.laghi2@unibo.it +// Github: @ubolakes + +/* TOP LEVEL MODULE */ + +module rv_tracer #( + //parameter IRETIRE_LEN = 32, // set to 1 for single retirement + parameter N = 1, // max number of special inst retired in a cycle, the input port number depends on this value + parameter ONLY_BRANCHES = 0, // special inst are branches or not + parameter APB_ADDR_WIDTH = 32 // address width for APB interface +) +( + input logic clk_i, + input logic rst_ni, + + input logic [N-1:0] valid_i, // used for multiple retirement + + /* data from the CPU */ + // mandatory inputs + input logic [N-1:0][te_pkg::ITYPE_LEN-1:0] itype_i, // termination type of block + input logic [te_pkg::XLEN-1:0] cause_i, + input logic [te_pkg::XLEN-1:0] tval_i, + input logic [te_pkg::PRIV_LEN-1:0] priv_i, + input logic [N-1:0][te_pkg::XLEN-1:0] iaddr_i, // pc of 1st inst in block + input logic [N-1:0][te_pkg::IRETIRE_LEN-1:0] iretire_i, // length of block in halfwords + input logic [N-1:0] ilastsize_i, // length of last inst in 2^ilastsize halfword + // non mandatory inputs + input logic [te_pkg::TIME_LEN-1:0] time_i, + //input logic [:0] context_i, + //input logic [te_pkg::CTYPE_LEN-1:0] ctype_i, // spec says it's 1 or 2 bit wide + //input logic [te_pkg::TRIGGER_LEN-1:0] trigger_i, // must be supported CPU side + + // support inputs + input logic [te_pkg::XLEN-1:0] tvec_i, // tvec_q, contains trap handler address + input logic [te_pkg::XLEN-1:0] epc_i, // epc_q, required for format 3 subformat 1 + input logic encapsulator_ready_i, // non mandatory + + // APB interface inputs + input logic [APB_ADDR_WIDTH-1:0] paddr_i, + input logic pwrite_i, + input logic psel_i, + input logic penable_i, + input logic [31:0] pwdata_i, + + // outputs + // info needed for the encapsulator + output logic [N-1:0] packet_valid_o, + output te_pkg::it_packet_type_e [N-1:0] packet_type_o, + output logic [N-1:0][te_pkg::P_LEN-1:0] packet_length_o, // in bytes + output logic [N-1:0][te_pkg::PAYLOAD_LEN-1:0] packet_payload_o, + // sideband signals + output logic stall_o, + + // APB interface outputs + output logic pready_o, + output logic [31:0] prdata_o +); + + /* signals for management */ + // registers + logic trace_activated; + logic trace_enable; + logic nocontext; + logic notime; + logic encoder_mode; + // filter + logic trigger_trace_on; // hardwired to 0? + logic trigger_trace_off; // hardwired to 0? + //logic qualified; // is it needed or I can use qualified_d? + logic trace_req_deactivate; + // priority + te_pkg::format_e packet_format[N-1:0]; + te_pkg::f_sync_subformat_e packet_f_sync_subformat[N-1:0]; + te_pkg::f_opt_ext_subformat_e packet_f_opt_ext_subformat[N-1:0]; + logic thaddr[N-1:0]; + logic lc_tc_mux[N-1:0]; + te_pkg::qual_status_e qual_status[N-1:0]; + logic nc_branch_map_flush; + logic [te_pkg::BRANCH_MAP_LEN-1:0] branch_map; + logic [te_pkg::BRANCH_COUNT_LEN-1:0] branch_count; + logic resync_rst; + // packet emitter + logic packet_valid[N-1:0]; + // resync counter + logic [N-1:0] packet_emitted; + // not classified + logic nc_branch_map_empty; + logic clk_gated; + logic turn_on_tracer_d, turn_on_tracer_q; + logic lossless_trace; + logic shallow_trace; + + // we have three phases, called last cycle (lc), this cycle (tc) and next + // cycle (nc), based on which we make decision whether we need to emit a + // packet or not. + logic tc_branch_map_empty; + logic [N-1:0] tc_resync; + logic [N-1:0] nc_exc_only; + logic [N-1:0] nc_ppccd_br; + logic [$clog2(te_pkg::XLEN):0] keep_bits[N-1:0]; + logic [te_pkg::XLEN-1:0] addr_to_compress[N-1:0]; + + logic [1:0][N-1:0][te_pkg::IRETIRE_LEN-1:0] iretired_tab; + logic [2:0] exception_tab; + logic [2:0] interrupt_tab; + logic [2:0][te_pkg::XLEN-1:0] cause_tab; + logic [1:0][te_pkg::XLEN-1:0] tvec_tab; + logic [2:0][te_pkg::XLEN-1:0] tval_tab; + logic [1:0][N-1:0][te_pkg::ITYPE_LEN-1:0] itype_tab; + logic [1:0][te_pkg::PRIV_LEN-1:0] priv_tab; + logic [1:0][N-1:0][te_pkg::XLEN-1:0] address_tab; + logic [2:0][te_pkg::XLEN-1:0] epc_tab; + logic [1:0][te_pkg::TIME_LEN-1:0] time_tab; + logic [2:0][N-1:0] updiscon_tab; + logic [2:0][N-1:0] qualified_tab; + + logic [N-1:0][te_pkg::IRETIRE_LEN-1:0] tc_iretired, nc_iretired; + logic lc_exception, tc_exception, nc_exception; + logic lc_interrupt, tc_interrupt, nc_interrupt; + logic [te_pkg::XLEN-1:0] lc_cause, tc_cause, nc_cause; + logic [te_pkg::XLEN-1:0] tc_tvec, nc_tvec; + logic [te_pkg::XLEN-1:0] lc_tval, tc_tval, nc_tval; + logic [N-1:0][te_pkg::ITYPE_LEN-1:0] tc_itype, nc_itype; + logic [te_pkg::PRIV_LEN-1:0] tc_priv, nc_priv; + logic [N-1:0][te_pkg::XLEN-1:0] tc_address, nc_address; + logic [te_pkg::XLEN-1:0] lc_epc, tc_epc, nc_epc; + logic [te_pkg::TIME_LEN-1:0] tc_time, nc_time; + logic [N-1:0] lc_updiscon, tc_updiscon, nc_updiscon; + logic [N-1:0] lc_qualified, tc_qualified, nc_qualified; + + + logic tc_first_qualified; + logic tc_final_qualified; + logic [N-1:0] updiscon; + logic [N-1:0][te_pkg::XLEN-1:0] address; + logic [N-1:0] qualified; + + + logic [N-1:0] valid0_d, valid0_q; + logic privchange_d, privchange_q; + // logic context_change_d, context_change_q; // non mandatory + // logic precise_context_report_d, precise_context_report_q; // requires ctype signal CPU side + // logic context_report_as_disc_d, context_report_as_disc_q; // ibidem + // logic no_context_report_d, no_context_report_q; // ibidem + // logic imprecise_context_report_d, imprecise_context_report_q; // ibidem + logic gt_max_resync_d, gt_max_resync_q; + logic et_max_resync_d, et_max_resync_q; + logic branch_map_full_d, branch_map_full_q; + //logic branch_misprediction_d, branch_misprediction_q; // non mandatory + logic trace_activated_d, trace_activated_q; + logic enc_activated_d, enc_activated_q; + logic enc_deactivated_d, enc_deactivated_q; + //logic packets_lost_d, packets_lost_q; // non mandatory + te_pkg::ioptions_s enc_config_d, enc_config_q; + logic enc_config_change_d, enc_config_change_q; + logic branch_d, branch_q; + logic branch_taken_d, branch_taken_q; + + // branch_map inputs + logic [N-1:0] branch_valid; + logic [N-1:0] branch_taken; + + // te_reg output to filter input + logic cause_filter; + logic [te_pkg::XLEN-1:0] upper_cause; + logic [te_pkg::XLEN-1:0] lower_cause; + logic [te_pkg::XLEN-1:0] match_cause; + logic cause_mode; + logic tvec_filter; + logic [te_pkg::XLEN-1:0] upper_tvec; + logic [te_pkg::XLEN-1:0] lower_tvec; + logic [te_pkg::XLEN-1:0] match_tvec; + logic tvec_mode; + logic tval_filter; + logic [te_pkg::XLEN-1:0] upper_tval; + logic [te_pkg::XLEN-1:0] lower_tval; + logic [te_pkg::XLEN-1:0] match_tval; + logic tval_mode; + logic priv_lvl_filter; + logic [te_pkg::PRIV_LEN-1:0] upper_priv; + logic [te_pkg::PRIV_LEN-1:0] lower_priv; + logic [te_pkg::PRIV_LEN-1:0] match_priv; + logic priv_lvl_mode; + logic iaddr_filter; + logic [te_pkg::XLEN-1:0] upper_iaddr; + logic [te_pkg::XLEN-1:0] lower_iaddr; + logic [te_pkg::XLEN-1:0] match_iaddr; + logic iaddr_mode; + + /* the following commented section has non mandatory signals + for now it's commented + */ + /* combinatorial network to define the following + signals from ctype: + - tc_no_context_report_i -> ctype == 0 + - tc_precise_context_report_i -> ctype == 2 + - tc_context_report_as_disc_i -> ctype == 3 + - tc_imprecise_context_report_i -> ctype == 1 + - nc_precise_context_report_i -> ctype == 2 + - nc_context_report_as_disc_i -> ctype == 3*/ + /* + always_comb begin : ctype_manager + case(ctype_i) + 2'h0: // no report - add signal + tc_no_context_report = '1; + 2'h1: + tc_imprecise_context_report = '1; + 2'h2: + tc_precise_context_report = '1; + 2'h3: + tc_context_report_as_disc = '1; + endcase + end + */ + + /*TODO: create a trigger decoder that produces: + - trigger_trace_on -> 2 + - trigger_trace_off -> 3 + - trigger_notify -> 4 + */ + // maybe it's enough to define values and hardwire them to 0 + + /* ASSIGNMENT */ + /* hardwired assignments */ + assign trigger_trace_on = '0; + assign trigger_trace_off = '0; + + /* FFs inputs */ + assign valid0_d = valid_i; + assign trace_activated_d = trace_activated; + assign enc_activated_d = trace_activated_d && ~trace_activated_q; + assign enc_deactivated_d = ~trace_activated_d && trace_activated_q; + assign enc_config_change_d = enc_config_d != enc_config_q; + + /* next cycle */ + assign nc_branch_map_empty = nc_branch_map_flush || (tc_branch_map_empty /*&& ~branch_q*/); + + // output + assign packet_valid_o = packet_emitted; + // sideband + assign stall_o = ~encapsulator_ready_i && lossless_trace; + + // other + assign branch_taken_d = |branch_taken; + + // first and final qualified + assign tc_first_qualified = trace_activated && |tc_qualified && !lc_qualified && trace_enable; + assign tc_final_qualified = trace_activated && |lc_qualified && !tc_qualified && trace_enable; + + always_ff @( posedge clk_i, negedge rst_ni ) begin + if(~rst_ni) begin + iretired_tab <= '0; + exception_tab <= '0; + interrupt_tab <= '0; + cause_tab <= '0; + tvec_tab <= '0; + tval_tab <= '0; + itype_tab <= '0; + priv_tab <= '0; + address_tab <= '0; + epc_tab <= '0; + time_tab <= '0; + updiscon_tab <= '0; + qualified_tab <= '0; + end else begin + if (|valid_i) begin + iretired_tab <= {iretired_tab[0], iretire_i}; + exception_tab <= {exception_tab[1:0], itype_i[0] == 1}; + interrupt_tab <= {interrupt_tab[1:0], itype_i[0] == 2}; + cause_tab <= {cause_tab[1:0],cause_i}; + tvec_tab <= {tvec_tab[0], tvec_i}; + tval_tab <= {tval_tab [1:0], tval_i}; + itype_tab <= {itype_tab[0], itype_i}; + priv_tab <= {priv_tab[0], priv_i}; + address_tab <= {address_tab[0], address}; + epc_tab <= {epc_tab[1:0], epc_i}; + time_tab <= {time_tab[0], time_i}; + updiscon_tab <= {updiscon_tab[1:0], updiscon}; + qualified_tab <={qualified_tab[1:0], qualified}; + end + end + + end + //lc asignements + assign lc_exception = exception_tab[2]; + assign lc_interrupt = interrupt_tab[2]; + assign lc_cause = cause_tab[2]; + assign lc_tval = tval_tab[2]; + assign lc_epc = epc_tab[2]; + assign lc_updiscon = updiscon_tab[2]; + assign lc_qualified = qualified_tab[2]; + // tc assignements + assign tc_iretired = iretired_tab[1]; + assign tc_exception = exception_tab[1]; + assign tc_interrupt = interrupt_tab[1]; + assign tc_cause= cause_tab[1]; + assign tc_tvec = tvec_tab[1]; + assign tc_tval = tval_tab[1]; + assign tc_itype = itype_tab[1]; + assign tc_priv = priv_tab[1]; + assign tc_address = address_tab[1]; + assign tc_epc = epc_tab[1]; + assign tc_time = time_tab[1]; + assign tc_updiscon = updiscon_tab[1]; + assign tc_qualified = qualified_tab[1]; + + // nc assignements + assign nc_iretired = iretired_tab[0]; + assign nc_exception = exception_tab[0]; + assign nc_interrupt = interrupt_tab[0]; + assign nc_cause= cause_tab[0]; + assign nc_tvec = tvec_tab[0]; + assign nc_tval = tval_tab[0]; + assign nc_itype = itype_tab[0]; + assign nc_priv = priv_tab[0]; + assign nc_address = address_tab[0]; + assign nc_epc = epc_tab[0]; + assign nc_time = time_tab[0]; + assign nc_updiscon = updiscon_tab[0]; + assign nc_qualified = qualified_tab[0]; + + //FIXME need cleaning + // not static assignments + always_comb begin + // init + branch_valid = '0; + branch_taken = '0; + + privchange_d = privchange_q; + // context_change_d = context_change_q; + // precise_context_report_d = precise_context_report_q; // requires ctype signal CPU side + // context_report_as_disc_d = context_report_as_disc_q; //ibidem + // no_context_report_d = no_context_report_q; // ibidem + // imprecise_context_report_d = imprecise_context_report_q; // ibidem + branch_d = branch_q; + + // itype, iretired and address + // it works for all three cases + for (int i = 0; i < N; i++) begin + if (valid_i[i]) begin + address[i] = iaddr_i[i]; + //FIXME we remove block reconstruction address + //address[i] = iaddr_i[i]+2*(iretire_i[i] - 2**ilastsize_i[i]); + end + end + //FIXME weird timing here nc for erveryone ? + // assigning branch map inputs + for (int i = 0; i < N; i++) begin + if (nc_itype[i] == 4 || nc_itype[i] == 5) begin + branch_valid[i] = '1; + end + if (nc_itype[i] == 5) begin + branch_taken[i] = '1; + end + end + + // updiscon + if (N == 1 || (N > 1 && ONLY_BRANCHES)) begin + if (qualified[0]) begin + updiscon[0] = itype_i[0] == 6; + end + end + // wait for this case + if (N > 1 && !ONLY_BRANCHES) begin + for (int i = 0; i < N; i++) begin + if (qualified[i]) begin + updiscon[i] = itype_i[i] == 6; + end + end + end + + // updating registers values + if (|valid_i) begin + privchange_d = (nc_priv != tc_priv) && |valid_i; + // context_change_d; // TODO + //precise_context_report_d; // requires ctype signal CPU side + //context_report_as_disc_d; //ibidem + //no_context_report_d; // ibidem + //imprecise_context_report_d; // ibidem + branch_d = |branch_valid; + end + + if (!turn_on_tracer_q) begin + turn_on_tracer_d = |valid_i && nc_qualified; + end + end + + /* MODULES INSTANTIATION */ + // one instance for all 3 cases + + + /* MAPPED REGISTERS */ + te_reg #( + .APB_ADDR_WIDTH(APB_ADDR_WIDTH) + ) i_te_reg( + .clk_i (clk_i), + .rst_ni (rst_ni), + .trace_req_off_i ('0), + .trace_req_on_i (turn_on_tracer_q), // trigger_trace_on // from trigger unit + .encapsulator_ready_i(encapsulator_ready_i), + .cause_filter_o (cause_filter), + .upper_cause_o (upper_cause), + .lower_cause_o (lower_cause), + .match_cause_o (match_cause), + .cause_mode_o (cause_mode), + .tvec_filter_o (tvec_filter), + .upper_tvec_o (upper_tvec), + .lower_tvec_o (lower_tvec), + .match_tvec_o (match_tvec), + .tvec_mode_o (tvec_mode), + .tval_filter_o (tval_filter), + .upper_tval_o (upper_tval), + .lower_tval_o (lower_tval), + .match_tval_o (match_tval), + .tval_mode_o (tval_mode), + .priv_lvl_filter_o (priv_lvl_filter), + .upper_priv_o (upper_priv), + .lower_priv_o (lower_priv), + .match_priv_o (match_priv), + .priv_lvl_mode_o (priv_lvl_mode), + .iaddr_filter_o (iaddr_filter), + .upper_iaddr_o (upper_iaddr), + .lower_iaddr_o (lower_iaddr), + .match_iaddr_o (match_iaddr), + .iaddr_mode_o (iaddr_mode), + .trace_enable_o (trace_enable), + .trace_activated_o (trace_activated), + .nocontext_o (nocontext), + .notime_o (notime), + .encoder_mode_o (encoder_mode), + .configuration_o (enc_config_d), + .lossless_trace_o (lossless_trace), + .shallow_trace_o (shallow_trace), + .clk_gated_o (clk_gated), + .paddr_i (paddr_i), + .pwrite_i (pwrite_i), + .psel_i (psel_i), + .penable_i (penable_i), + .pwdata_i (pwdata_i), + .pready_o (pready_o), + .prdata_o (prdata_o) + ); + + /* BRANCH MAP */ + te_branch_map #( + .N(N) + ) i_te_branch_map( + .clk_i (clk_gated), + .rst_ni (rst_ni), + .valid_i (branch_valid & nc_qualified & valid0_q), + .branch_taken_i(branch_taken), + .flush_i (nc_branch_map_flush), + //.branch_taken_prediction_i(), // non mandatory + .map_o (branch_map), + .branches_o (branch_count), + //.pbc_o(), // non mandatory - branch prediction mode + //.misprediction_o(), // non mandatory - ibidem + .is_full_o (branch_map_full_d), + .is_empty_o (tc_branch_map_empty) + ); + + /* RESYNC COUNTER */ + te_resync_counter #( + .N(N), + .MODE(te_pkg::CYCLE_MODE), // count cycles + .MAX_VALUE(13'h1FFF) // 8192 + ) i_te_resync_counter( // for testing we keep the def settings + .clk_i (clk_gated), + .rst_ni (rst_ni), + .trace_enabled_i (trace_enable), + .packet_emitted_i(packet_emitted), + .resync_rst_i (resync_rst), + .gt_resync_max_o (gt_max_resync_d), + .et_resync_max_o (et_max_resync_d) + ); + + // N instances for all 3 cases + + /* FILTER */ + generate + if (ONLY_BRANCHES) begin + for (genvar i = 0; i < N; i++) begin + te_filter i_te_filter( + .trace_enable_i (trace_enable || trace_activated), // tracks 1st branch if 1st inst + .cause_filter_i (cause_filter), + .upper_cause_i (upper_cause), + .lower_cause_i (lower_cause), + .match_cause_i (match_cause), + .cause_mode_i (cause_mode), + .cause_i (cause_i), + .tvec_filter_i (tvec_filter), + .upper_tvec_i (upper_tvec), + .lower_tvec_i (lower_tvec), + .match_tvec_i (match_tvec), + .tvec_mode_i (tvec_mode), + .tvec_i (tvec_i), + .tval_filter_i (tval_filter), + .upper_tval_i (upper_tval), + .lower_tval_i (lower_tval), + .match_tval_i (match_tval), + .tval_mode_i (tval_mode), + .tval_i (tval_i), + .priv_lvl_filter_i(priv_lvl_filter), + .upper_priv_i (upper_priv), + .lower_priv_i (lower_priv), + .match_priv_i (match_priv), + .priv_lvl_mode_i (priv_lvl_mode), + .priv_i (priv_i), + .iaddr_filter_i (iaddr_filter), + .upper_iaddr_i (upper_iaddr), + .lower_iaddr_i (lower_iaddr), + .match_iaddr_i (match_iaddr), + .iaddr_mode_i (iaddr_mode), + .iaddr_i (iaddr_i[i]), + .nc_qualified_o (qualified[i]) + ); + end + end + endgenerate + + /* PRIORITY, PACKET EMITTER*/ + // case dependant + generate + // 1 instance for N == 1 || (N > 1 && ONLY_BRANCHES) + if (N == 1 || (N > 1 && ONLY_BRANCHES)) begin + /* PRIORITY */ + te_priority i_te_priority( + .clk_i (clk_gated), + .rst_ni (rst_ni), + .valid_i (valid0_q[0] || (enc_activated_q || enc_deactivated_q)), // necessary to generate F3SF3 packet + .lc_exception_i (lc_exception || lc_interrupt), + .lc_updiscon_i (lc_updiscon), + .tc_qualified_i (tc_qualified[0]), + .tc_exception_i (tc_exception|| tc_interrupt), + .tc_retired_i (tc_iretired[0]), + .tc_first_qualified_i (tc_first_qualified), + .tc_privchange_i (privchange_q), + //.tc_context_change_i(), // non mandatory + //.tc_precise_context_report_i(), // requires ctype signal CPU side + //.tc_context_report_as_disc_i(), // ibidem + //.tc_imprecise_context_report_i(), // ibidem + .tc_gt_max_resync_i (gt_max_resync_q), + .tc_et_max_resync_i (et_max_resync_q), + .tc_branch_map_empty_i (tc_branch_map_empty), + .tc_branch_map_full_i (branch_map_full_d), + //.tc_branch_misprediction_i(), // non mandatory + //.tc_pbc_i(), // non mandatory + .tc_enc_enabled_i (enc_activated_q), + .tc_enc_disabled_i (enc_deactivated_q), + .tc_opmode_change_i (enc_config_change_q), + .tc_final_qualified_i (tc_final_qualified), + .tc_packets_lost_i (~encapsulator_ready_i), // non mandatory + .nc_exception_i (nc_exception || nc_interrupt), + .nc_privchange_i (privchange_d), + //.nc_context_change_i(), + //.nc_precise_context_report_i(), // requires ctype signal CPU side + //.nc_context_report_as_disc_i(), // ibidem + .nc_branch_map_empty_i (nc_branch_map_empty), + .nc_qualified_i (nc_qualified[0]), + .nc_retired_i (nc_iretired[0]), + //.halted_i(), // non mandatory side band signal + //.reset_i(), // ibidem + //.implicit_return_i(), // non mandatory + //.tc_trigger_req_i(), // non mandatory + //.notify_o(), // non mandatory, depends on trigger request + .addr_to_compress_i (addr_to_compress[0]), + .valid_o (packet_valid[0]), + .packet_format_o (packet_format[0]), + .packet_f_sync_subformat_o(packet_f_sync_subformat[0]), + //.packet_f_opt_ext_subformat_o(packet_f_opt_ext_subformat), // non mandatory + .thaddr_o (thaddr[0]), + .lc_tc_mux_o (lc_tc_mux[0]), + .resync_timer_rst_o (resync_rst), + .qual_status_o (qual_status[0]), + .tc_resync_o (tc_resync[0]), + .nc_exc_only_o (nc_exc_only[0]), + .nc_ppccd_br_o (nc_ppccd_br[0]), + .keep_bits_o (keep_bits[0]) + ); + + /* PACKET EMITTER */ + te_packet_emitter i_te_packet_emitter( + .clk_i (clk_gated), + .rst_ni (rst_ni), + .valid_i (packet_valid[0]), + .packet_format_i (packet_format[0]), + .packet_f_sync_subformat_i(packet_f_sync_subformat[0]), + //.packet_f_opt_ext_subformat_i(packet_f_opt_ext_subformat), // non mandatory + .lc_cause_i (lc_cause), + .lc_tval_i (lc_tval), + .lc_interrupt_i (lc_interrupt), + .tc_cause_i (tc_cause), + .tc_tval_i (tc_tval), + .tc_interrupt_i (tc_interrupt), + .tc_resync_i (tc_resync[0]), + .nc_exc_only_i (nc_exc_only[0]), + .nc_ppccd_br_i (nc_ppccd_br[0]), + .nocontext_i (nocontext), + .notime_i (notime), + .tc_branch_i (branch_q), + .tc_branch_taken_i (branch_taken_q), + .tc_priv_i (tc_priv), + .tc_time_i (tc_time), // non mandatory + //.context_i(), // non mandatory + .tc_address_i (tc_address[0]), + .lc_tc_mux_i (lc_tc_mux[0]), + .thaddr_i (thaddr[0]), + .tc_tvec_i (tc_tvec), + .lc_epc_i (lc_epc), + .tc_ienable_i (trace_enable), + .encoder_mode_i (encoder_mode), + .qual_status_i (qual_status[0]), + .ioptions_i (enc_config_q), + //.denable_i(), // stand-by + //.dloss_i(), //stand-by + //.notify_i(), // non mandatory + .lc_updiscon_i (lc_updiscon[0]), + //.irreport_i(), // non mandatory + //.irdepth_i(), // non mandatory + .branches_i (branch_count), + .branch_map_i (branch_map), + .keep_bits_i (keep_bits[0]), + .shallow_trace_i (shallow_trace), + .packet_valid_o (packet_emitted[0]), + .packet_type_o (packet_type_o[0]), + .packet_payload_o (packet_payload_o[0]), + .payload_length_o (packet_length_o[0]), + .branch_map_flush_o (nc_branch_map_flush), + .addr_to_compress_o (addr_to_compress[0]) + ); + + end else if (N > 1 && !ONLY_BRANCHES) begin + // N instances for N > 1 && !ONLY_BRANCHES + for (genvar i = 0; i < N; i++) begin + if (i == 0) begin + /* PRIORITY */ + te_priority i_te_priority( + .clk_i (clk_gated), + .rst_ni (rst_ni), + .valid_i (|valid0_q || (enc_activated_q || enc_deactivated_q)), + .lc_exception_i (lc_exception || lc_interrupt), + .lc_updiscon_i (lc_updiscon[i]), + .tc_qualified_i (tc_qualified[i]), + .tc_exception_i (tc_exception|| tc_interrupt), + .tc_retired_i (tc_iretired[i]), + .tc_first_qualified_i (tc_first_qualified), + .tc_privchange_i (privchange_q), + //.tc_context_change_i(), // non mandatory + //.tc_precise_context_report_i(), // requires ctype signal CPU side + //.tc_context_report_as_disc_i(), // ibidem + //.tc_imprecise_context_report_i(), // ibidem + .tc_gt_max_resync_i (gt_max_resync_q), // connected only to the first port + .tc_et_max_resync_i (et_max_resync_q), // connected only to the first port + .tc_branch_map_empty_i (tc_branch_map_empty), + .tc_branch_map_full_i (branch_map_full_q), // connected only to the first port + //.tc_branch_misprediction_i(), // non mandatory + //.tc_pbc_i(), // non mandatory + .tc_enc_enabled_i (enc_activated_q), + .tc_enc_disabled_i (enc_deactivated_q), + .tc_opmode_change_i (enc_config_change_q), + .tc_final_qualified_i (tc_final_qualified), + .tc_packets_lost_i (~encapsulator_ready_i), // non mandatory + .nc_exception_i (nc_exception || nc_interrupt), + .nc_privchange_i (privchange_d), + //.nc_context_change_i(), + //.nc_precise_context_report_i(), // requires ctype signal CPU side + //.nc_context_report_as_disc_i(), // ibidem + .nc_branch_map_empty_i (nc_branch_map_empty), + .nc_qualified_i (nc_qualified[i]), + .nc_retired_i (nc_iretired[i]), + //.halted_i(), // non mandatory side band signal + //.reset_i(), // ibidem + //.implicit_return_i(), // non mandatory + //.tc_trigger_req_i(), // non mandatory + //.notify_o(), // non mandatory, depends on trigger request + .addr_to_compress_i (addr_to_compress[i]), + .valid_o (packet_valid[i]), + .packet_format_o (packet_format[i]), + .packet_f_sync_subformat_o(packet_f_sync_subformat[i]), + //.packet_f_opt_ext_subformat_o(packet_f_opt_ext_subformat), // non mandatory + .thaddr_o (thaddr[i]), + .lc_tc_mux_o (lc_tc_mux[i]), + .resync_timer_rst_o (resync_rst), + .qual_status_o (qual_status[i]), + .tc_resync_o (tc_resync[i]), + .nc_exc_only_o (nc_exc_only[i]), + .nc_ppccd_br_o (nc_ppccd_br[i]), + .keep_bits_o (keep_bits[i]) + ); + + /* PACKET EMITTER */ + te_packet_emitter i_te_packet_emitter( + .clk_i (clk_gated), + .rst_ni (rst_ni), + .valid_i (packet_valid[i]), + .packet_format_i (packet_format[i]), + .packet_f_sync_subformat_i(packet_f_sync_subformat[i]), + //.packet_f_opt_ext_subformat_i(packet_f_opt_ext_subformat), // non mandatory + .lc_cause_i (lc_cause), + .lc_tval_i (lc_tval), + .lc_interrupt_i (lc_interrupt), + .tc_cause_i (tc_cause), + .tc_tval_i (tc_tval), + .tc_interrupt_i (tc_interrupt), + .tc_resync_i (tc_resync[i]), + .nc_exc_only_i (nc_exc_only[i]), + .nc_ppccd_br_i (nc_ppccd_br[i]), + .nocontext_i (nocontext), + .notime_i (notime), + .tc_branch_i (branch_q), + .tc_branch_taken_i (branch_taken_q), + .tc_priv_i (tc_priv), + .tc_time_i (tc_time), // non mandatory + //.context_i(), // non mandatory + .tc_address_i (tc_address[i]), + .lc_tc_mux_i (lc_tc_mux[i]), + .thaddr_i (thaddr[i]), + .tc_tvec_i (tc_tvec), + .lc_epc_i (lc_epc), + .tc_ienable_i (trace_enable), + .encoder_mode_i (encoder_mode), + .qual_status_i (qual_status[i]), + .ioptions_i (enc_config_q), + //.denable_i(), // stand-by + //.dloss_i(), //stand-by + //.notify_i(), // non mandatory + .lc_updiscon_i (lc_updiscon[i]), + //.irreport_i(), // non mandatory + //.irdepth_i(), // non mandatory + .branches_i (branch_count), + .branch_map_i (branch_map), + .keep_bits_i (keep_bits[i]), + .shallow_trace_i (shallow_trace), + .packet_valid_o (packet_emitted[i]), + .packet_type_o (packet_type_o[i]), + .packet_payload_o (packet_payload_o[i]), + .payload_length_o (packet_length_o[i]), + .branch_map_flush_o (nc_branch_map_flush), + .addr_to_compress_o (addr_to_compress[i]) + ); + end else begin + /* PRIORITY */ + te_priority i_te_priority( + .clk_i (clk_gated), + .rst_ni (rst_ni), + .valid_i (|valid0_q || (enc_activated_q || enc_deactivated_q)), + .lc_exception_i (lc_exception || lc_interrupt), + .lc_updiscon_i (lc_updiscon[i]), + .tc_qualified_i (tc_qualified[i]), + .tc_exception_i (tc_exception || tc_interrupt), + .tc_retired_i (tc_iretired[i]), + .tc_first_qualified_i (tc_first_qualified), + .tc_privchange_i (privchange_q), + //.tc_context_change_i(), // non mandatory + //.tc_precise_context_report_i(), // requires ctype signal CPU side + //.tc_context_report_as_disc_i(), // ibidem + //.tc_imprecise_context_report_i(), // ibidem + .tc_gt_max_resync_i (), // connected only to the first port + .tc_et_max_resync_i (), // connected only to the first port + .tc_branch_map_empty_i (tc_branch_map_empty), + .tc_branch_map_full_i (), // connected only to the first port + //.tc_branch_misprediction_i(), // non mandatory + //.tc_pbc_i(), // non mandatory + .tc_enc_enabled_i (enc_activated_q), + .tc_enc_disabled_i (enc_deactivated_q), + .tc_opmode_change_i (enc_config_change_q), + .tc_final_qualified_i (tc_final_qualified), + .tc_packets_lost_i (~encapsulator_ready_i), // non mandatory + .nc_exception_i (nc_exception || nc_interrupt), + .nc_privchange_i (privchange_d), + //.nc_context_change_i(), + //.nc_precise_context_report_i(), // requires ctype signal CPU side + //.nc_context_report_as_disc_i(), // ibidem + .nc_branch_map_empty_i (nc_branch_map_empty), + .nc_qualified_i (nc_qualified[i]), + .nc_retired_i (nc_iretired[i]), + //.halted_i(), // non mandatory side band signal + //.reset_i(), // ibidem + //.implicit_return_i(), // non mandatory + //.tc_trigger_req_i(), // non mandatory + //.notify_o(), // non mandatory, depends on trigger request + .addr_to_compress_i (addr_to_compress[i]), + .valid_o (packet_valid[i]), + .packet_format_o (packet_format[i]), + .packet_f_sync_subformat_o(packet_f_sync_subformat[i]), + //.packet_f_opt_ext_subformat_o(packet_f_opt_ext_subformat), // non mandatory + .thaddr_o (thaddr[i]), + .lc_tc_mux_o (lc_tc_mux[i]), + .resync_timer_rst_o (), // connected only to the first port + .qual_status_o (qual_status[i]), + .tc_resync_o (tc_resync[i]), + .nc_exc_only_o (nc_exc_only[i]), + .nc_ppccd_br_o (nc_ppccd_br[i]), + .keep_bits_o (keep_bits[i]) + ); + + /* PACKET EMITTER */ + te_packet_emitter i_te_packet_emitter( + .clk_i (clk_gated), + .rst_ni (rst_ni), + .valid_i (packet_valid[i]), + .packet_format_i (packet_format[i]), + .packet_f_sync_subformat_i(packet_f_sync_subformat[i]), + //.packet_f_opt_ext_subformat_i(packet_f_opt_ext_subformat), // non mandatory + .lc_cause_i (lc_cause), + .lc_tval_i (lc_tval), + .lc_interrupt_i (lc_interrupt), + .tc_cause_i (tc_cause), + .tc_tval_i (tc_tval), + .tc_interrupt_i (tc_interrupt), + .tc_resync_i (tc_resync[i]), + .nc_exc_only_i (nc_exc_only[i]), + .nc_ppccd_br_i (nc_ppccd_br[i]), + .nocontext_i (nocontext), + .notime_i (notime), + .tc_branch_i (branch_q), + .tc_branch_taken_i (branch_taken_q), + .tc_priv_i (tc_priv), + .tc_time_i (tc_time), // non mandatory + //.context_i(), // non mandatory + .tc_address_i (tc_address[i]), + .lc_tc_mux_i (lc_tc_mux[i]), + .thaddr_i (thaddr[i]), + .tc_tvec_i (tc_tvec), + .lc_epc_i (lc_epc), + .tc_ienable_i (trace_enable), + .encoder_mode_i (encoder_mode), + .qual_status_i (qual_status[i]), + .ioptions_i (enc_config_q), + //.denable_i(), // stand-by + //.dloss_i(), //stand-by + //.notify_i(), // non mandatory + .lc_updiscon_i (lc_updiscon[i]), + //.irreport_i(), // non mandatory + //.irdepth_i(), // non mandatory + .branches_i (branch_count), + .branch_map_i (branch_map), + .keep_bits_i (keep_bits[i]), + .shallow_trace_i (shallow_trace), + .packet_valid_o (packet_emitted[i]), + .packet_type_o (packet_type_o[i]), + .packet_payload_o (packet_payload_o[i]), + .payload_length_o (packet_length_o[i]), + .branch_map_flush_o (), // connected only to the first port + .addr_to_compress_o (addr_to_compress[i]) + ); + end + end + end + endgenerate + + /* REGISTERS MANAGEMENT */ + always_ff @( posedge clk_i, negedge rst_ni ) begin : registers + if(~rst_ni) begin + valid0_q <= '0; + privchange_q <= '0; + // context_change_q <= '0; + //precise_context_report_q <= '0; // requires ctype signal CPU side + //context_report_as_disc_q <= '0; //ibidem + //no_context_report_q <= '0; // ibidem + //imprecise_context_report_q <= '0; // ibidem + gt_max_resync_q <= '0; + et_max_resync_q <= '0; + branch_map_full_q <= '0; + //branch_misprediction_q <= '0; // non mandatory + trace_activated_q <= '0; + enc_activated_q <= '0; + enc_deactivated_q <= '0; + //packets_lost_q <= '0; // non mandatory + enc_config_q <= te_pkg::DELTA_ADDRESS; // 3'b0 + enc_config_change_q <= '0; + branch_taken_q <= '0; + branch_q <= '0; + turn_on_tracer_q <= '0; + end else begin + privchange_q <= privchange_d; + // context_change_q <= context_change_d; + //precise_context_report_q <= precise_context_report_d; // requires ctype signal CPU side + //context_report_as_disc_q <= context_report_as_disc_d; //ibidem + //no_context_report_q <= no_context_report_d; // ibidem + //imprecise_context_report_q <= imprecise_context_report_d; // ibidem + branch_q <= branch_d; + valid0_q <= valid0_d; + gt_max_resync_q <= gt_max_resync_d; + et_max_resync_q <= et_max_resync_d; + branch_map_full_q <= branch_map_full_d; + //branch_misprediction_q <= branch_misprediction_d; // non mandatory + trace_activated_q <= trace_activated_d; + enc_activated_q <= enc_activated_d; + enc_deactivated_q <= enc_deactivated_d; + //packets_lost_q <= packets_lost_d; // non mandatory + enc_config_q <= enc_config_d; + enc_config_change_q <= enc_config_change_d; + branch_taken_q <= branch_taken_d; + turn_on_tracer_q <= turn_on_tracer_d; + end + end + +endmodule \ No newline at end of file diff --git a/corev_apu/instr_tracing/rv_tracer-main/rtl/te_branch_map.sv b/corev_apu/instr_tracing/rv_tracer-main/rtl/te_branch_map.sv new file mode 100644 index 00000000000..c1e2f0fc8b7 --- /dev/null +++ b/corev_apu/instr_tracing/rv_tracer-main/rtl/te_branch_map.sv @@ -0,0 +1,85 @@ +// Copyright 2025 ETH Zurich and University of Bologna. +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. +// SPDX-License-Identifier: SHL-0.51 + +// Author: Umberto Laghi +// Contact: umberto.laghi2@unibo.it +// Github: @ubolakes + +/* BRANCH MAP */ +/* +It keeps track of taken and non taken branches. + +Whenever a branch happens it updates the branch map +and the number of branches stored. + +When flush_i signal is asserted, the branch map is +cleaned. +*/ + +module te_branch_map #( + parameter N = 1 // max number of committed branches in one cycle +) +( + input logic clk_i, + input logic rst_ni, + + input logic [N-1:0] valid_i, + input logic [N-1:0] branch_taken_i, + input logic flush_i, + + output logic [te_pkg::BRANCH_MAP_LEN-1:0] map_o, + output logic [te_pkg::BRANCH_COUNT_LEN-1:0] branches_o, + output logic is_full_o, + output logic is_empty_o +); + + + logic [te_pkg::BRANCH_MAP_LEN-1:0] map_d, map_q; + logic [te_pkg::BRANCH_COUNT_LEN-1:0] branch_cnt_d, branch_cnt_q; + + always_comb begin + map_d = map_q; + branch_cnt_d = branch_cnt_q; + + if (flush_i) begin + map_d = '0; + branch_cnt_d = '0; + end + + if (valid_i) begin + if(flush_i) begin + map_d[0] = ~branch_taken_i; + branch_cnt_d = 5'b1; + end else begin + map_d[branch_cnt_q] = ~branch_taken_i ; + branch_cnt_d = branch_cnt_q +1; + end + end + end + + assign map_o = map_d; + assign branches_o = branch_cnt_d; + assign is_full_o = (branch_cnt_d == 31); + assign is_empty_o = (branch_cnt_d == 0); + + + always_ff @(posedge clk_i, negedge rst_ni) begin + if(~rst_ni) begin + map_q <= '0; + branch_cnt_q <= '0; + + end else begin + map_q <= map_d; + branch_cnt_q <= branch_cnt_d; + end + end + +endmodule \ No newline at end of file diff --git a/corev_apu/instr_tracing/rv_tracer-main/rtl/te_filter.sv b/corev_apu/instr_tracing/rv_tracer-main/rtl/te_filter.sv new file mode 100644 index 00000000000..6d33b7ebc57 --- /dev/null +++ b/corev_apu/instr_tracing/rv_tracer-main/rtl/te_filter.sv @@ -0,0 +1,142 @@ +// Copyright 2025 ETH Zurich and University of Bologna. +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. +// SPDX-License-Identifier: SHL-0.51 + +// Author: Umberto Laghi +// Contact: umberto.laghi2@unibo.it +// Github: @ubolakes + +/* FILTER MODULE */ +/* +it declares instructions qualified or not +*/ + +module te_filter +( + // if trace isn't enabled it doesn't make sense to filter + input logic trace_enable_i, + + /* + The idea is to have all inputs to be filtered in range or match. + To achieve this, the filter requires for each parameter: + - enable + - upper and lower values + - to be matched value + - select between in range or match + - qualified for each mode + + The trace to be qualified according to the filters set it requires + an AND between the qualified of the parameters to filter. + */ + + // parameters to filter + // cause + input logic cause_filter_i, + input logic [te_pkg::XLEN-1:0] upper_cause_i, + input logic [te_pkg::XLEN-1:0] lower_cause_i, + input logic [te_pkg::XLEN-1:0] match_cause_i, + input logic cause_mode_i, + input logic [te_pkg::XLEN-1:0] cause_i, + // tvec + input logic tvec_filter_i, + input logic [te_pkg::XLEN-1:0] upper_tvec_i, + input logic [te_pkg::XLEN-1:0] lower_tvec_i, + input logic [te_pkg::XLEN-1:0] match_tvec_i, + input logic tvec_mode_i, + input logic [te_pkg::XLEN-1:0] tvec_i, + // tval + input logic tval_filter_i, + input logic [te_pkg::XLEN-1:0] upper_tval_i, + input logic [te_pkg::XLEN-1:0] lower_tval_i, + input logic [te_pkg::XLEN-1:0] match_tval_i, + input logic tval_mode_i, + input logic [te_pkg::XLEN-1:0] tval_i, + // priv_lvl + input logic priv_lvl_filter_i, + input logic [te_pkg::PRIV_LEN-1:0] upper_priv_i, + input logic [te_pkg::PRIV_LEN-1:0] lower_priv_i, + input logic [te_pkg::PRIV_LEN-1:0] match_priv_i, + input logic priv_lvl_mode_i, + input logic [te_pkg::PRIV_LEN-1:0] priv_i, + // iaddr (pc) + input logic iaddr_filter_i, + input logic [te_pkg::XLEN-1:0] upper_iaddr_i, + input logic [te_pkg::XLEN-1:0] lower_iaddr_i, + input logic [te_pkg::XLEN-1:0] match_iaddr_i, + input logic iaddr_mode_i, + input logic [te_pkg::XLEN-1:0] iaddr_i, + + output logic nc_qualified_o +); + + // output signals for comparators + // cause + logic cause_in_range; + logic cause_equals; + // tvec + logic tvec_in_range; + logic tvec_equals; + // tval + logic tval_in_range; + logic tval_equals; + // priv_lvl + logic priv_lvl_in_range; + logic priv_lvl_equals; + // iaddr (pc) + logic iaddr_in_range; + logic iaddr_equals; + + // assignments + // cause + assign cause_in_range = cause_mode_i == te_pkg::RANGE_MODE && + cause_i <= upper_cause_i && + cause_i >= lower_cause_i; + assign cause_equals = cause_mode_i == te_pkg::EQUAL_MODE && + cause_i == match_cause_i; + // tvec + assign tvec_in_range = tvec_mode_i == te_pkg::RANGE_MODE && + tvec_i <= upper_tvec_i && + tvec_i >= lower_tvec_i; + assign tvec_equals = tvec_mode_i == te_pkg::EQUAL_MODE && + tvec_i == match_tvec_i; + // tval + assign tval_in_range = tval_mode_i == te_pkg::RANGE_MODE && + tval_i <= upper_tval_i && + tval_i >= lower_tval_i; + assign tval_equals = tval_mode_i == te_pkg::EQUAL_MODE && + tval_i == match_tval_i; + // priv_lvl + assign priv_lvl_in_range = priv_lvl_mode_i == te_pkg::RANGE_MODE && + priv_i <= upper_priv_i && + priv_i >= lower_priv_i; + assign priv_lvl_equals = priv_lvl_mode_i == te_pkg::EQUAL_MODE && + priv_i == match_priv_i; + // iaddr + assign iaddr_in_range = iaddr_mode_i == te_pkg::RANGE_MODE && + iaddr_i <= upper_iaddr_i && + iaddr_i >= lower_iaddr_i; + assign iaddr_equals = iaddr_mode_i == te_pkg::EQUAL_MODE && + iaddr_i == match_iaddr_i; + + // assigning output + // if no filter is enabled -> the instruction is qualified + assign nc_qualified_o = ((cause_filter_i && (cause_in_range || cause_equals)) || + ~cause_filter_i) && // cause + ((tvec_filter_i && (tvec_in_range || tvec_equals)) || + ~tvec_filter_i) && // tvec + ((tval_filter_i && (tval_in_range || tval_equals)) || + ~tval_filter_i) && // tval + ((priv_lvl_filter_i && (priv_lvl_in_range || priv_lvl_equals)) || + ~priv_lvl_filter_i) && // priv_lvl + ((iaddr_filter_i && (iaddr_in_range || iaddr_equals)) || + ~iaddr_filter_i) && // iaddr + trace_enable_i; + +endmodule \ No newline at end of file diff --git a/corev_apu/instr_tracing/rv_tracer-main/rtl/te_packet_emitter.sv b/corev_apu/instr_tracing/rv_tracer-main/rtl/te_packet_emitter.sv new file mode 100644 index 00000000000..5dd0d9e7893 --- /dev/null +++ b/corev_apu/instr_tracing/rv_tracer-main/rtl/te_packet_emitter.sv @@ -0,0 +1,1095 @@ +// Copyright 2025 ETH Zurich and University of Bologna. +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. +// SPDX-License-Identifier: SHL-0.51 + +// Author: Umberto Laghi +// Contact: umberto.laghi2@unibo.it +// Github: @ubolakes + +/* PACKET EMITTER */ +/* +it produces the packets for the output interface +*/ + +module te_packet_emitter +( + input logic clk_i, + input logic rst_ni, + input logic valid_i, + + // necessary info to assemble packet + input te_pkg::format_e packet_format_i, + input te_pkg::f_sync_subformat_e packet_f_sync_subformat_i, // SF for F3 + //input f_opt_ext_subformat_e packet_f_opt_ext_subformat_i, // non mandatory, SF for F0 + + // lc (last cycle) signals + input logic [te_pkg::XLEN-1:0] lc_cause_i, + input logic [te_pkg::XLEN-1:0] lc_tval_i, + input logic lc_interrupt_i, + + // tc (this cycle) signals + input logic [te_pkg::XLEN-1:0] tc_cause_i, + input logic [te_pkg::XLEN-1:0] tc_tval_i, + input logic tc_interrupt_i, + input logic tc_resync_i, + + input logic nc_exc_only_i, + input logic nc_ppccd_br_i, + + // nc (next cycle) signals + + /* the following signals used to determine + if the packet emitter has to put context + and/or time in the payload*/ + input logic nocontext_i, // both read from registers + input logic notime_i, + // in this implementation both hardwired to 0 + + // format 3 subformat 0 specific signals + input logic tc_branch_i, + input logic tc_branch_taken_i, + input logic [te_pkg::PRIV_LEN-1:0] tc_priv_i, + input logic [te_pkg::TIME_LEN-1:0] tc_time_i, // optional + //input logic [:0] context_i, // optional + input logic [te_pkg::XLEN-1:0] tc_address_i, + + // format 3 subformat 1 specific signals + input logic lc_tc_mux_i, + /* format 3 subformat 1 packets require sometimes lc_cause o tc_cause + To discriminate I use a mux to choose between lc or tc */ + + input logic thaddr_i, + input logic [te_pkg::XLEN-1:0] tc_tvec_i, // trap handler address + input logic [te_pkg::XLEN-1:0] lc_epc_i, + + // format 3 subformat 3 specific signals + input logic tc_ienable_i, // trace encoder enabled + input logic encoder_mode_i, // only branch trace supported (value==0) + input te_pkg::qual_status_e qual_status_i, + input te_pkg::ioptions_s ioptions_i, + // about DATA trace, in stand-by at the moment + //input logic denable_i, // DATA trace enabled, if supported + //input logic dloss_i, // one or more DATA trace packets lost, if supported + //input logic [:0] doptions_i, // it's like ioptions, but for DATA trace + + + // format 2 specific signals + /* notify -> means the packet was requested by the cpu trigger unit*/ + //input logic notify_i, // non mandatory + + // most of the time these 2 values can be compressed + input logic lc_updiscon_i, + + // necessary if implicit_return mode is enabled + //input logic irreport_i, + + //input logic [2**te_pkg::CALL_COUNTER_SIZE-1:0] irdepth_i, // non mandatory, traces nested calls + + // format 1 specific signals + /* this format exists in two modes: + - address, branch map + - NO address, branch maps + + Their generation depends on the value of branches: + - 0: no need for address + - >0: address required + */ + input logic [te_pkg::BRANCH_COUNT_LEN-1:0] branches_i, + input logic [te_pkg::BRANCH_MAP_LEN-1:0] branch_map_i, // can change size to improve efficiency + + // format 0 specific signals + /* This format can have two possible subformats: + - subformat 0: number of correctly predicted branches + - subformat 1: jump target cache index + + Non mandatory, required support by the encoder. + */ + input logic [$clog2(te_pkg::XLEN):0] keep_bits_i, // required for address compression + input logic shallow_trace_i, // used to flush branch map at each packet + + // outputs + output logic packet_valid_o, // asserted when a packet is generated + output te_pkg::it_packet_type_e packet_type_o, + output logic [te_pkg::PAYLOAD_LEN-1:0] packet_payload_o, + output logic [te_pkg::P_LEN-1:0] payload_length_o, // in bytes + output logic branch_map_flush_o, // flushing done after each request + // to send back to priority module in order to compress them + output logic [te_pkg::XLEN-1:0] addr_to_compress_o +); + + // internal signals + logic branch; + logic interrupt; + logic [te_pkg::XLEN-1:0] address; + logic [te_pkg::XLEN-1:0] ecause; + logic [te_pkg::XLEN-1:0] diff_addr; + logic [te_pkg::XLEN-1:0] latest_addr_d, latest_addr_q; // address of the latest packet emitted + logic [te_pkg::XLEN-1:0] tval; + logic [1:0] time_and_context; // if payload requires time/context + logic notify; + logic updiscon; + logic irreport; + logic [2**te_pkg::CALL_COUNTER_SIZE-1:0] irdepth; + logic [4:0] branch_map_off; + logic [3:0] address_off; + logic [8:0] used_bits; // counts the bits used inside each payload + logic flush_d, flush_q; + logic update_latest_addr; + logic resync_d, resync_q; + logic [te_pkg::XLEN-1:0] resync_addr_d, resync_addr_q; + + // assigning values + assign branch = ~(tc_branch_i && tc_branch_taken_i); + assign address = thaddr_i ? tc_tvec_i : lc_epc_i; + assign ecause = lc_tc_mux_i ? tc_cause_i : lc_cause_i; + assign tval = lc_tc_mux_i ? tc_tval_i : lc_tval_i; + assign interrupt = lc_tc_mux_i ? tc_interrupt_i : lc_interrupt_i; + assign time_and_context = {~notime_i, ~nocontext_i}; + assign branch_map_flush_o = flush_q; + assign payload_length_o = (used_bits + 7) >> 3; + + always_comb begin + // init + resync_d = resync_q; + resync_addr_d = resync_addr_q; + + // updates resync signal + if (tc_resync_i) begin + resync_d = '1; + resync_addr_d = tc_address_i; + end + + // synchronous reset of resync signal + if (packet_type_o == te_pkg::F3SF0 && resync_q) begin + resync_d = '0; + end + end + + + // register to store the last address emitted in a packet + always_ff @(posedge clk_i, negedge rst_ni) begin + if(~rst_ni) begin + latest_addr_q <= '0; + flush_q <= '0; + resync_q <= '0; + resync_addr_q <= '0; + end else begin + latest_addr_q <= latest_addr_d; + resync_q <= resync_d; + resync_addr_q <= resync_addr_d; + flush_q <= flush_d; + end + end + + // combinatorial network to compute the offset to compress the branch_map + always_comb begin : branch_map_offset + if(branches_i == 1) begin + branch_map_off = 1; + end else if(branches_i <= 3) begin + branch_map_off = 3; + end else if(branches_i <= 7) begin + branch_map_off = 7; + end else if(branches_i <= 15) begin + branch_map_off = 15; + end else if (branches_i < 31) begin + branch_map_off = 31; + end else begin + branch_map_off = '0; + end + + end + + /* + the address compression works in byte chunks: based on the value of + keep_bits_i, the number of least significant bytes to keep is determined. + + example: + keep_bits_i == 7 -> 1 lsB kept 0111 + keep_bits_i == 10 -> 2 lsB kept 1010 + keep_bits_i == 25 -> 4 lsB kept 11001 + */ + // 33 = 100001 + 7 = 101000 >>3 = 0101 = 5 + + // find the number of least significant bytes to keep in the compressed address + assign address_off = (keep_bits_i + 7)>>3; + + // combinatorial network to output packets + always_comb begin + // init values + packet_payload_o = '0; + packet_valid_o = '0; + flush_d = '0; + used_bits = '0; + packet_type_o = te_pkg::F0SF0; + update_latest_addr = '0; + + if(valid_i) begin + /* branch_map_flush_o + the signal is output in this cycle, but the branch map does + the flush in the next cycle to leave time to the packet + emitter to read values and put them in the payload + */ + // flushes at each packet emitted to get a less precise tracing + flush_d = shallow_trace_i; + + // setting the packet to emit as valid + packet_valid_o = '1; + + /* packet payload creation: + at the beginning it's put in the payload the common part (i.e. the packet format) + then, for each format and subformat it's put the rest of the payload + */ + + // setting the packet format - common for all payloads + packet_payload_o[1:0] = packet_format_i; + + // format bits + used_bits += 2; + + case(packet_format_i) + te_pkg::F_SYNC: begin // format 3 + // setting packet subformat - common for all type 3 payloads + packet_payload_o[3:2] = packet_f_sync_subformat_i; + + used_bits += 2; // subformat bits + + // setting the rest of payload for each type + case(packet_f_sync_subformat_i) + te_pkg::SF_START: begin // subformat 0 + // updating packet type + packet_type_o = te_pkg::F3SF0; + update_latest_addr = '1; + + case(time_and_context) + 2'b00: begin + used_bits += 1 + (address_off * 8) + te_pkg::PRIV_LEN; + + packet_payload_o[4+:1+te_pkg::PRIV_LEN] = { + tc_priv_i, + branch + }; + // address compression + case (address_off) + 1: begin + packet_payload_o[5+te_pkg::PRIV_LEN+:8] = { + addr_to_compress_o[7:0] + }; + end + 2: begin + packet_payload_o[5+te_pkg::PRIV_LEN+:16] = { + addr_to_compress_o[15:0] + }; + end + 3: begin + packet_payload_o[5+te_pkg::PRIV_LEN+:24] = { + addr_to_compress_o[23:0] + }; + end + 4: begin + packet_payload_o[5+te_pkg::PRIV_LEN+:32] = { + addr_to_compress_o[31:0] + }; + end + `ifdef TE_ARCH64 // 64bits case + 5: begin + packet_payload_o[5+te_pkg::PRIV_LEN+:40] = { + addr_to_compress_o[39:0] + }; + end + 6: begin + packet_payload_o[5+te_pkg::PRIV_LEN+:48] = { + addr_to_compress_o[47:0] + }; + end + 7: begin + packet_payload_o[5+te_pkg::PRIV_LEN+:56] = { + addr_to_compress_o[55:0] + }; + end + 8: begin + packet_payload_o[5+te_pkg::PRIV_LEN+:64] = { + addr_to_compress_o + }; + end + `endif + endcase + end + + 2'b10: begin + used_bits += 1 + te_pkg::PRIV_LEN + te_pkg::TIME_LEN + (address_off * 8); + + packet_payload_o[4+:1+te_pkg::PRIV_LEN+te_pkg::TIME_LEN] = { + tc_time_i, + tc_priv_i, + branch + }; + // address compression + // FIXME(MAX): simplify case with: + // for (int unsigned i = 1; i <= 8; i++) begin + // if (i == address_off) begin + // packet_payload_o[5+te_pkg::PRIV_LEN+te_pkg::TIME_LEN+:i*8] = { + // addr_to_compress_o[i*8-1:0] + // }; + // end + // end + case (address_off) + 1: begin + packet_payload_o[5+te_pkg::PRIV_LEN+te_pkg::TIME_LEN+:8] = { + addr_to_compress_o[7:0] + }; + end + 2: begin + packet_payload_o[5+te_pkg::PRIV_LEN+te_pkg::TIME_LEN+:16] = { + addr_to_compress_o[15:0] + }; + end + 3: begin + packet_payload_o[5+te_pkg::PRIV_LEN+te_pkg::TIME_LEN+:24] = { + addr_to_compress_o[23:0] + }; + end + 4: begin + packet_payload_o[5+te_pkg::PRIV_LEN+te_pkg::TIME_LEN+:32] = { + addr_to_compress_o[31:0] + }; + end + `ifdef TE_ARCH64 // 64bits case + 5: begin + packet_payload_o[5+te_pkg::PRIV_LEN+te_pkg::TIME_LEN+:40] = { + addr_to_compress_o[39:0] + }; + end + 6: begin + packet_payload_o[5+te_pkg::PRIV_LEN+te_pkg::TIME_LEN+:48] = { + addr_to_compress_o[47:0] + }; + end + 7: begin + packet_payload_o[5+te_pkg::PRIV_LEN+te_pkg::TIME_LEN+:56] = { + addr_to_compress_o[55:0] + }; + end + 8: begin + packet_payload_o[5+te_pkg::PRIV_LEN+te_pkg::TIME_LEN+:64] = { + addr_to_compress_o + }; + end + `endif + endcase + end + /*TODO: other cases*/ + endcase + end + te_pkg::SF_TRAP: begin // subformat 1 + // updating packet type + packet_type_o = te_pkg::F3SF1; + update_latest_addr = '1; + + case(time_and_context) + 2'b00: begin + used_bits += 1 + te_pkg::PRIV_LEN + te_pkg::XLEN + 2 + (address_off * 8) + te_pkg::XLEN; // last XLEN is for tval + + packet_payload_o[4+:1+te_pkg::PRIV_LEN+te_pkg::XLEN+2] = { + thaddr_i, + interrupt, + ecause, + tc_priv_i, + branch + }; + // address compression //FIXME Why tval is with addr_to_compress ? and not before ??? + case (address_off) + 1: begin + packet_payload_o[7+te_pkg::PRIV_LEN+te_pkg::XLEN+:8+te_pkg::XLEN] = { + addr_to_compress_o[7:0], + tval + + }; + end + 2: begin + packet_payload_o[7+te_pkg::PRIV_LEN+te_pkg::XLEN+:16+te_pkg::XLEN] = { + addr_to_compress_o[15:0], + tval + }; + end + 3: begin + packet_payload_o[7+te_pkg::PRIV_LEN+te_pkg::XLEN+:24+te_pkg::XLEN] = { + addr_to_compress_o[23:0], + tval + }; + end + 4: begin + packet_payload_o[7+te_pkg::PRIV_LEN+te_pkg::XLEN+:32+te_pkg::XLEN] = { + addr_to_compress_o[31:0], + tval + }; + end + `ifdef TE_ARCH64 // 64bits case + 5: begin + packet_payload_o[7+te_pkg::PRIV_LEN+te_pkg::XLEN+:40+te_pkg::XLEN] = { + addr_to_compress_o[39:0], + tval + }; + end + 6: begin + packet_payload_o[7+te_pkg::PRIV_LEN+te_pkg::XLEN+:48+te_pkg::XLEN] = { + addr_to_compress_o[47:0], + tval + }; + end + 7: begin + packet_payload_o[7+te_pkg::PRIV_LEN+te_pkg::XLEN+:56+te_pkg::XLEN] = { + addr_to_compress_o[55:0], + tval + }; + end + 8: begin + packet_payload_o[7+te_pkg::PRIV_LEN+te_pkg::XLEN+:64+te_pkg::XLEN] = { + addr_to_compress_o, + tval + }; + end + `endif + endcase + end + + 2'b10: begin + used_bits += 1 + te_pkg::PRIV_LEN + te_pkg::XLEN + 2 + (address_off * 8) + te_pkg::TIME_LEN + te_pkg::XLEN ; // why time_len *2 , time = 64 bits ? + + packet_payload_o[4+:1+te_pkg::PRIV_LEN+te_pkg::XLEN+2+te_pkg::TIME_LEN] = { + thaddr_i, + interrupt, + ecause, + tc_time_i, + tc_priv_i, + branch + }; + // address compression + case (address_off) + 1: begin + packet_payload_o[7+te_pkg::PRIV_LEN+te_pkg::XLEN+te_pkg::TIME_LEN+:8+te_pkg::XLEN] = { // FIXME Replace XLEN by TIME_LEN every time ? + addr_to_compress_o[7:0], + tval + + }; + end + 2: begin + packet_payload_o[7+te_pkg::PRIV_LEN+te_pkg::XLEN+te_pkg::TIME_LEN+:16+te_pkg::XLEN] = { + addr_to_compress_o[15:0], + tval + }; + end + 3: begin + packet_payload_o[7+te_pkg::PRIV_LEN+te_pkg::XLEN+te_pkg::TIME_LEN+:24+te_pkg::XLEN] = { + addr_to_compress_o[23:0], + tval + }; + end + 4: begin + packet_payload_o[7+te_pkg::PRIV_LEN+te_pkg::XLEN+te_pkg::TIME_LEN+:32+te_pkg::XLEN] = { + addr_to_compress_o[31:0], + tval + }; + end + `ifdef TE_ARCH64 // 64bits case + 5: begin + packet_payload_o[7+te_pkg::PRIV_LEN+te_pkg::XLEN+te_pkg::TIME_LEN+:40+te_pkg::XLEN] = { + addr_to_compress_o[39:0], + tval + }; + end + 6: begin + packet_payload_o[7+te_pkg::PRIV_LEN+te_pkg::XLEN+te_pkg::TIME_LEN+:48+te_pkg::XLEN] = { + addr_to_compress_o[47:0], + tval + }; + end + 7: begin + packet_payload_o[7+te_pkg::PRIV_LEN+te_pkg::XLEN+te_pkg::TIME_LEN+:56+te_pkg::XLEN] = { + addr_to_compress_o[55:0], + tval + }; + end + 8: begin + packet_payload_o[7+te_pkg::PRIV_LEN+te_pkg::XLEN+te_pkg::TIME_LEN+:64+te_pkg::XLEN] = { + addr_to_compress_o, + tval + }; + end + `endif + endcase + end + /*TODO: other cases*/ + endcase + end + te_pkg::SF_CONTEXT: begin // subformat 2 + // updating packet type + packet_type_o = te_pkg::F3SF2; + + case(time_and_context) + 2'b00: begin + used_bits += te_pkg::PRIV_LEN; + + packet_payload_o[4+:te_pkg::PRIV_LEN] = { + tc_priv_i + }; + end + + 2'b10: begin + used_bits += te_pkg::PRIV_LEN + te_pkg::TIME_LEN; + + packet_payload_o[4+:te_pkg::PRIV_LEN+te_pkg::TIME_LEN] = { + tc_time_i, + tc_priv_i + }; + end + /*TODO: other cases*/ + endcase + end + te_pkg::SF_SUPPORT: begin // subformat 3 + // updating packet type + packet_type_o = te_pkg::F3SF3; + + used_bits += 11; + + packet_payload_o[4+:1+1+2+7] = { + /* info required for data tracing - in the future + doptions_i, + dloss_i, + denable_i, */ + ioptions_i, + qual_status_i, + encoder_mode_i, + tc_ienable_i + }; + end + endcase + end + + te_pkg::F_ADDR_ONLY: begin // format 2 + // updating packet type + packet_type_o = te_pkg::F2; + update_latest_addr = '1; + + // requires trigger unit in CPU + /* + if(notify_i) begin // request from trigger unit + notify = !tc_address_i[XLEN-1]; + updiscon = notify; + irreport = updsicon; + irdepth = irdepth_i; + end else begin*/ + + // case of an updiscon + if(lc_updiscon_i && (nc_exc_only_i || nc_ppccd_br_i)) begin //FIXME spec says lc_updiscon AND nc_execption/interrupt /priv change / resync <= need to add nc_resync + notify = tc_address_i[te_pkg::XLEN-1]; + updiscon = !notify; + irreport = updiscon; + irdepth = {2**te_pkg::CALL_COUNTER_SIZE{updiscon}}; + /* non mandatory + end else if(implicit_mode_i && irreport_i) begin // request for implicit return mode + notify = tc_address_i[XLEN-1]; + updiscon = notify; + irreport = !updiscon; + irdepth = irdepth_i; + */ + end else begin //other cases + notify = tc_address_i[te_pkg::XLEN-1]; + updiscon = notify; + irreport = updiscon; + irdepth = {2**te_pkg::CALL_COUNTER_SIZE{updiscon}}; + end + + // checking if implicit return is supported + if (te_pkg::CALL_COUNTER_SIZE == 0 && + te_pkg::RETURN_STACK_SIZE == 0) begin // not supported + + // payload bits + used_bits += 3 + address_off*8 ; + + // address compression + case (address_off) + 1: begin + packet_payload_o[2+:8+3] = { + addr_to_compress_o[7:0], + irreport, + updiscon, + notify + }; + end + 2: begin + packet_payload_o[2+:16+3] = { + addr_to_compress_o[15:0], + irreport, + updiscon, + notify + }; + end + 3: begin + packet_payload_o[2+:24+3] = { + addr_to_compress_o[23:0], + irreport, + updiscon, + notify + }; + end + 4: begin + packet_payload_o[2+:32+3] = { + addr_to_compress_o[31:0], + irreport, + updiscon, + notify + }; + end + `ifdef TE_ARCH64 // 64bits case + 5: begin + packet_payload_o[2+:40+3] = { + addr_to_compress_o[39:0], + irreport, + updiscon, + notify + }; + end + 6: begin + packet_payload_o[2+:48+3] = { + addr_to_compress_o[47:0], + irreport, + updiscon, + notify + }; + end + 7: begin + packet_payload_o[2+:56+3] = { + addr_to_compress_o[55:0], + irreport, + updiscon, + notify + }; + end + 8: begin + packet_payload_o[2+:64+3] = { + addr_to_compress_o, + irreport, + updiscon, + notify + }; + end + `endif + endcase + + end else begin // supported + // payload bits + used_bits += 3 + 2**te_pkg::CALL_COUNTER_SIZE + address_off*8 ; + + // address compression + case (address_off) + 1: begin + packet_payload_o[2+:8+3+2**te_pkg::CALL_COUNTER_SIZE] = { + addr_to_compress_o[7:0], + irdepth, + irreport, + updiscon, + notify + }; + end + 2: begin + packet_payload_o[2+:16+3+2**te_pkg::CALL_COUNTER_SIZE] = { + addr_to_compress_o[15:0], + irdepth, + irreport, + updiscon, + notify + }; + end + 3: begin + packet_payload_o[2+:24+3+2**te_pkg::CALL_COUNTER_SIZE] = { + addr_to_compress_o[23:0], + irdepth, + irreport, + updiscon, + notify + }; + end + 4: begin + packet_payload_o[2+:32+3+2**te_pkg::CALL_COUNTER_SIZE] = { + addr_to_compress_o[31:0], + irdepth, + irreport, + updiscon, + notify + }; + end + `ifdef TE_ARCH64 // 64bits case + 5: begin + packet_payload_o[2+:40+3+2**te_pkg::CALL_COUNTER_SIZE] = { + addr_to_compress_o[39:0], + irdepth, + irreport, + updiscon, + notify + }; + end + 6: begin + packet_payload_o[2+:48+3+2**te_pkg::CALL_COUNTER_SIZE] = { + addr_to_compress_o[47:0], + irdepth, + irreport, + updiscon, + notify + }; + end + 7: begin + packet_payload_o[2+:56+3+2**te_pkg::CALL_COUNTER_SIZE] = { + addr_to_compress_o[55:0], + irdepth, + irreport, + updiscon, + notify + }; + end + 8: begin + packet_payload_o[2+:64+3+2**te_pkg::CALL_COUNTER_SIZE] = { + addr_to_compress_o, + irdepth, + irreport, + updiscon, + notify + }; + end + `endif + endcase + end + end + + te_pkg::F_DIFF_DELTA: begin // format 1 + /* There can be two type of payloads for this format: + 1. address, branch map + 2. no address, branch map + + Type 1 payload is used when there has been at least + one branch from last packet. This can be determined + by the number of branches in the branch map. + + Type 2 payload is used when the address is not needed, + for examples if the branch map is full. + */ + // flushing the branch_map + flush_d = '1; + // updating packet type + packet_type_o = te_pkg::F1; + + // requires trigger unit in CPU + /* + if(notify_i) begin // request from trigger unit + notify = !tc_address_i[XLEN-1]; + updiscon = notify; + irreport = updsicon; + irdepth = irdepth_i; + end else begin*/ + + // case of an updiscon + if(lc_updiscon_i && (nc_exc_only_i || nc_ppccd_br_i)) begin //FIXME spec says lc_updiscon AND nc_execption/interrupt /priv change / resync <= need to add nc_resync + notify = tc_address_i[te_pkg::XLEN-1]; + updiscon = !notify; + irreport = updiscon; + irdepth = {2**te_pkg::CALL_COUNTER_SIZE{updiscon}}; + /* non mandatory + end else if(implicit_return_i && irreport_i) begin // request for implicit return mode + notify = tc_address_i[XLEN-1]; + updiscon = notify; + irreport = !updiscon; + irdepth = irdepth_i; + */ + end else begin // other cases + notify = tc_address_i[te_pkg::XLEN-1]; + updiscon = notify; + irreport = updiscon; + irdepth = {2**te_pkg::CALL_COUNTER_SIZE{updiscon}}; + end + + // branches and branch_map bits + used_bits += (branch_map_off==0)? te_pkg::BRANCH_COUNT_LEN + 32 : te_pkg::BRANCH_COUNT_LEN + branch_map_off; + + // adding branch count and branch map + if (branch_map_off == 1) begin + packet_payload_o[2+:te_pkg::BRANCH_COUNT_LEN+1] = { + branch_map_i[0], + branches_i + }; + end else if (branch_map_off == 3) begin + packet_payload_o[2+:te_pkg::BRANCH_COUNT_LEN+3] = { + branch_map_i[2:0], + branches_i + }; + end else if (branch_map_off == 7) begin + packet_payload_o[2+:te_pkg::BRANCH_COUNT_LEN+7] = { + branch_map_i[6:0], + branches_i + }; + end else if (branch_map_off == 15) begin + packet_payload_o[2+:te_pkg::BRANCH_COUNT_LEN+15] = { + branch_map_i[14:0], + branches_i + }; + end else if (branch_map_off == 31) begin + packet_payload_o[2+:te_pkg::BRANCH_COUNT_LEN+31] = { + branch_map_i[30:0], + branches_i + }; + end else begin //FIXME if we have discontinuity branches =31 not 0 + packet_payload_o[2+:te_pkg::BRANCH_COUNT_LEN+31] = { + branch_map_i[30:0], + 5'b00000 + }; + end + + // attaching the rest of the payload + if(branches_i < 31) begin // branch map not full - address + update_latest_addr = '1; + // checking if implicit return is supported + if (te_pkg::CALL_COUNTER_SIZE == 0 && + te_pkg::RETURN_STACK_SIZE == 0) begin // not supported + // rest of the payload bits + used_bits += 3 + address_off*8 ; + + // address compression + case (address_off) + 1: begin + packet_payload_o[2+te_pkg::BRANCH_COUNT_LEN+branch_map_off+:8+3] = { + addr_to_compress_o[7:0], + irreport, + updiscon, + notify + }; + end + 2: begin + packet_payload_o[2+te_pkg::BRANCH_COUNT_LEN+branch_map_off+:16+3] = { + addr_to_compress_o[15:0], + irreport, + updiscon, + notify + }; + end + 3: begin + packet_payload_o[2+te_pkg::BRANCH_COUNT_LEN+branch_map_off+:24+3] = { + addr_to_compress_o[23:0], + irreport, + updiscon, + notify + }; + end + 4: begin + packet_payload_o[2+te_pkg::BRANCH_COUNT_LEN+branch_map_off+:32+3] = { + addr_to_compress_o[31:0], + irreport, + updiscon, + notify + }; + end + `ifdef TE_ARCH64 // 64bits case + 5: begin + packet_payload_o[2+te_pkg::BRANCH_COUNT_LEN+branch_map_off+:40+3] = { + addr_to_compress_o[39:0], + irreport, + updiscon, + notify + }; + end + 6: begin + packet_payload_o[2+te_pkg::BRANCH_COUNT_LEN+branch_map_off+:48+3] = { + addr_to_compress_o[47:0], + irreport, + updiscon, + notify + }; + end + 7: begin + packet_payload_o[2+te_pkg::BRANCH_COUNT_LEN+branch_map_off+:56+3] = { + addr_to_compress_o[55:0], + irreport, + updiscon, + notify + }; + end + 8: begin + packet_payload_o[2+te_pkg::BRANCH_COUNT_LEN+branch_map_off+:64+3] = { + addr_to_compress_o, + irreport, + updiscon, + notify + }; + end + `endif + endcase + + end else begin // supported -> uses irdepth and irreport + // rest of the payload bits + used_bits += 3 + 2**te_pkg::CALL_COUNTER_SIZE + address_off*8 ; + + // address compression + case (address_off) + 1: begin + packet_payload_o[2+te_pkg::BRANCH_COUNT_LEN+branch_map_off+:8+3+2**te_pkg::CALL_COUNTER_SIZE] = { + addr_to_compress_o[7:0], + irdepth, + irreport, + updiscon, + notify + }; + end + 2: begin + packet_payload_o[2+te_pkg::BRANCH_COUNT_LEN+branch_map_off+:16+3+2**te_pkg::CALL_COUNTER_SIZE] = { + addr_to_compress_o[15:0], + irdepth, + irreport, + updiscon, + notify + }; + end + 3: begin + packet_payload_o[2+te_pkg::BRANCH_COUNT_LEN+branch_map_off+:24+3+2**te_pkg::CALL_COUNTER_SIZE] = { + addr_to_compress_o[23:0], + irdepth, + irreport, + updiscon, + notify + }; + end + 4: begin + packet_payload_o[2+te_pkg::BRANCH_COUNT_LEN+branch_map_off+:32+3+2**te_pkg::CALL_COUNTER_SIZE] = { + addr_to_compress_o[31:0], + irdepth, + irreport, + updiscon, + notify + }; + end + `ifdef TE_ARCH64 // 64bits case + 5: begin + packet_payload_o[2+te_pkg::BRANCH_COUNT_LEN+branch_map_off+:40+3+2**te_pkg::CALL_COUNTER_SIZE] = { + addr_to_compress_o[39:0], + irdepth, + irreport, + updiscon, + notify + }; + end + 6: begin + packet_payload_o[2+te_pkg::BRANCH_COUNT_LEN+branch_map_off+:48+3+2**te_pkg::CALL_COUNTER_SIZE] = { + addr_to_compress_o[47:0], + irdepth, + irreport, + updiscon, + notify + }; + end + 7: begin + packet_payload_o[2+te_pkg::BRANCH_COUNT_LEN+branch_map_off+:56+3+2**te_pkg::CALL_COUNTER_SIZE] = { + addr_to_compress_o[55:0], + irdepth, + irreport, + updiscon, + notify + }; + end + 8: begin + packet_payload_o[2+te_pkg::BRANCH_COUNT_LEN+branch_map_off+:64+3+2**te_pkg::CALL_COUNTER_SIZE] = { + addr_to_compress_o, + irdepth, + irreport, + updiscon, + notify + }; + end + `endif + endcase + end + end + end + + //F_OPT_EXT: begin // format 0 // TODO + // requires trigger unit in CPU + /* + if(notify_i) begin // request from trigger unit + notify = !tc_address_i[XLEN-1]; + updiscon = notify; + irreport = updsicon; + irdepth = irdepth_i; + end else begin + notify = tc_address_i[XLEN-1]; + updiscon = notify; + irreport = updiscon; + irdepth = {2**CALL_COUNTER_SIZE{updiscon}}; + end */ + + /* requires non mandatory support for jtc and branch prediction + case(packet_f_opt_ext_subformat_i) + SF_PBC: begin // subformat 0 + // There can be two type of payloads for this subformat: + // 1. no address, branch count + // 2. address, branch count + + // only for F0SF0 payload w/address + // updating latest address sent in a packet + + packet_payload_o = {F_OPT_EXT, SF_PBC, etc..}; + packet_valid_o = '1; + end + + SF_JTC: begin // subformat 1 + packet_payload_o = {F_OPT_EXT, SF_JTC, etc..}; + packet_valid_o = '1; + end + endcase + */ + //end + endcase + end + end + + always_comb begin : address_to_compress + diff_addr = '0; + addr_to_compress_o = '0; + latest_addr_d = latest_addr_q; + + // determines differential address for F1, F2 + if (packet_valid_o && (packet_format_i == te_pkg::F_DIFF_DELTA || + packet_format_i == te_pkg::F_ADDR_ONLY)) begin + if (ioptions_i.delta_address_en) begin + diff_addr = latest_addr_q - tc_address_i; // mostly >0 exept for jump , remove signed + addr_to_compress_o = diff_addr; + end else if (ioptions_i.full_address_en) begin + addr_to_compress_o = tc_address_i; + end + end + + // determines latest address + if (packet_valid_o && update_latest_addr) begin + if (packet_type_o == te_pkg::F1 || + packet_type_o == te_pkg::F2) begin // F1, F2 + latest_addr_d = tc_address_i; + addr_to_compress_o = tc_address_i; + end + if (packet_type_o == te_pkg::F3SF0) begin // F3SF0 + if (resync_q) begin //FIXME WHY ? + latest_addr_d = tc_address_i; + addr_to_compress_o = tc_address_i; + end else begin + latest_addr_d = tc_address_i; + addr_to_compress_o = tc_address_i; + end + end + if (packet_type_o == te_pkg::F3SF1) begin // F3SF1 + latest_addr_d = address; + addr_to_compress_o = address; + end + end + end + +endmodule diff --git a/corev_apu/instr_tracing/rv_tracer-main/rtl/te_priority.sv b/corev_apu/instr_tracing/rv_tracer-main/rtl/te_priority.sv new file mode 100644 index 00000000000..9fd6db48af5 --- /dev/null +++ b/corev_apu/instr_tracing/rv_tracer-main/rtl/te_priority.sv @@ -0,0 +1,405 @@ +// Copyright 2025 ETH Zurich and University of Bologna. +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. +// SPDX-License-Identifier: SHL-0.51 + +// Author: Umberto Laghi +// Contact: umberto.laghi2@unibo.it +// Github: @ubolakes + +/*PRIORITY*/ +/* +change this module name to a more appropriate one +for example "packet identifier" or something similar +*/ +/* +it orders packet generation - refer to page 53 of the spec +*/ + +module te_priority ( + + input logic clk_i, + input logic rst_ni, + + input logic valid_i, + + /* signals for the jump target cache mode - non mandatory */ + //input logic jtc_enabled_i, + //input logic address_in_cache_i, // communicates if the address is present in cache + + // lc (last cycle) signals + input logic lc_exception_i, + input logic lc_updiscon_i, // updsicon == uninferable PC discontinuity + + // tc (this cycle) signals + input logic tc_qualified_i, + input logic tc_exception_i, + input logic [te_pkg::IRETIRE_LEN-1:0] tc_retired_i, + input logic tc_first_qualified_i, + input logic tc_privchange_i, + //input logic tc_context_change_i, // non mandatory + //input logic tc_precise_context_report_i, // requires ctype signal CPU side + //input logic tc_context_report_as_disc_i, // ibidem + //input logic tc_imprecise_context_report_i, // ibidem + input logic tc_gt_max_resync_i, // greater than timeout + input logic tc_et_max_resync_i, // one step to timeout + input logic tc_branch_map_empty_i, + input logic tc_branch_map_full_i, + //input logic tc_branch_misprediction_i, // non mandatory + //input logic tc_pbc_i, // correctly predicted branch count, non mandatory + + // format 3 subformat 3 - NOT shown in graph + input logic tc_enc_enabled_i, + input logic tc_enc_disabled_i, + input logic tc_opmode_change_i, + input logic tc_final_qualified_i, + input logic tc_packets_lost_i, // non mandatory + + // nc (next cycle) signals + input logic nc_exception_i, + input logic nc_privchange_i, + //input logic nc_context_change_i, // non mandatory + //input logic nc_precise_context_report_i, // requires ctype signal CPU side + //input logic nc_context_report_as_disc_i, // ibidem + input logic nc_branch_map_empty_i, + input logic nc_qualified_i, + input logic [te_pkg::IRETIRE_LEN-1:0] nc_retired_i, // used w/nc_exception for signal nc_exc_only + + // non mandatory sideband signals + // refer to page 52 of the spec + //input logic halted_i, + //input logic reset_i, + + // inputs for irreport and irdepth, non mandatory + //input logic implicit_return_i, // tells if the mode is enabled + //input logic [:0] call_counter_size_i, // size of nested calls counter, 2^value + //input logic [:0] return_stack_size_i, // size of nested calls stack, 2^value + + // trigger unit request ports, must be supported by the CPU + //input logic tc_trigger_req_i, + //output logic notify_o, + // communicates the packet emitter that format 2 packet was requested by trigger unit + + // input to compress + input logic [te_pkg::XLEN-1:0] addr_to_compress_i, + + // outputs for packet_emitter + output logic valid_o, + output te_pkg::format_e packet_format_o, + output te_pkg::f_sync_subformat_e packet_f_sync_subformat_o, + //output te_pkg::f_opt_ext_subformat_e packet_f_opt_ext_subformat_o, // non mandatory, used for jtc and branch prediction + output logic thaddr_o, // required for f3 sf1 packet payload + output logic lc_tc_mux_o, // operates the MUX to choose between lc or tc cause, tval, interrupt: 0 -> lc, 1 + output logic resync_timer_rst_o, // resets counter + output te_pkg::qual_status_e qual_status_o, + //output logic irreport_o, // non mandatory, required implicit return mode + output logic tc_resync_o, + output logic nc_exc_only_o, + output logic nc_ppccd_br_o, + // output for compression + output logic [$clog2(te_pkg::XLEN):0] keep_bits_o + ); + + + /* internal signals required for packet determination */ + // last cycle + logic lc_ended_ntr_d, lc_ended_ntr_q; + logic lc_ended_rep_d, lc_ended_rep_q; + // this cycle + logic tc_exc_only; // for a precise definition: page 51 of the spec + logic tc_ppccd; // ibidem + logic tc_resync_br; // ibidem + logic tc_er_n; // ibidem + logic tc_rpt_br; // ibidem + //logic tc_cci; // ibidem + logic tc_reported_d, tc_reported_q; // ibidem + logic reported_status; + logic reported_update; // determines when reported_q updates + // reported is updated when the lc_exception was updated or not + logic tc_f3_sf3; + // next cycle + + // signals for compression + logic [$clog2(te_pkg::XLEN)-1:0] addr_zeros, addr_ones; + logic [$clog2(te_pkg::XLEN)-1:0] sign_extendable; + logic empty_zeros; + logic empty_ones; + + // signals to store + logic tc_resync_br_d, tc_resync_br_q; + + // value assignment + assign tc_exc_only = tc_exception_i && tc_retired_i == 0; + assign tc_ppccd = tc_privchange_i /*|| (tc_context_change_i && + (tc_precise_context_report_i || + tc_context_report_as_disc_i))*/; + assign tc_resync_br = tc_et_max_resync_i && ~tc_branch_map_empty_i; + assign tc_er_n = (tc_exception_i && tc_retired_i != 0) /*|| tc_trigger_req_i*/; + assign tc_rpt_br = tc_branch_map_full_i && !nc_branch_map_empty_i/* || tc_branch_misprediction_i*/; + //assign tc_cci = tc_context_change_i && tc_imprecise_context_report_i; + assign nc_exc_only_o = nc_exception_i && nc_retired_i == 0; + assign nc_ppccd_br_o = (nc_privchange_i /*|| (nc_context_change_i && + (nc_precise_context_report_i || nc_context_report_as_disc_i))*/) && + ~nc_branch_map_empty_i; + assign tc_f3_sf3 = tc_enc_enabled_i || tc_enc_disabled_i || tc_opmode_change_i || + tc_final_qualified_i || tc_packets_lost_i; + assign reported_update = ( packet_format_o == te_pkg::F_SYNC && + packet_f_sync_subformat_o == te_pkg::SF_TRAP && + ~thaddr_o) || + ( packet_format_o == te_pkg::F_SYNC && + packet_f_sync_subformat_o == te_pkg::SF_START && + ~tc_exc_only); + assign tc_resync_o = valid_i && tc_resync_br_q; + + always_comb begin + // init + tc_resync_br_d = tc_resync_br_q; + + if (reported_update) begin + tc_reported_d = reported_status; + end + + if (tc_resync_br) begin + tc_resync_br_d = '1; + end + + if (valid_o && + (packet_format_o == te_pkg::F_DIFF_DELTA || + packet_format_o == te_pkg::F_ADDR_ONLY)) begin + tc_resync_br_d = '0; + end + end + + /* + The reset value is 0, the spec doesn't say how to behave. + The 0 value specifies an exception w/out retired instr + in this cycle and an exception in the previous cycle. + */ + always_ff @( posedge clk_i, negedge rst_ni ) begin + if(~rst_ni) begin + tc_reported_q <= '0; + lc_ended_ntr_q <= '0; + lc_ended_rep_q <= '0; + tc_resync_br_q <= '0; + end else begin + tc_reported_q <= tc_reported_d; + tc_resync_br_q <= tc_resync_br_d; + lc_ended_ntr_q <= lc_ended_ntr_d; + lc_ended_rep_q <= lc_ended_rep_d; + end + end + + /*TODO: add condition to determine if F2, F1, F0SF0 are requested by the trigger unit*/ + + /* combinatorial network to determine packet format */ + // refer to flowchart at page 53 of the spec + always_comb begin : select_packet_format + // default init values + valid_o = '0; + packet_format_o = te_pkg::F_OPT_EXT; + packet_f_sync_subformat_o = te_pkg::SF_START; + //packet_f_opt_ext_subformat_o = SF_PBC; + //notify_o = '0; + thaddr_o = '0; + lc_tc_mux_o = '0; + resync_timer_rst_o = '0; + reported_status = '0; + qual_status_o = te_pkg::NO_CHANGE; + lc_ended_ntr_d = '0; + lc_ended_rep_d = '0; + + if(valid_i) begin + // format 3 subformat 3 packet generation + /* this if is not in the flowchart, but it's only described. + To me it made more sense to have it as the first if. */ + if(tc_f3_sf3) begin + packet_format_o = te_pkg::F_SYNC; + packet_f_sync_subformat_o = te_pkg::SF_SUPPORT; + // if-then-else to determine qual_status value for payload + if(lc_ended_ntr_q == '1) begin + qual_status_o = te_pkg::ENDED_NTR; + end else if(lc_ended_rep_q == '1) begin + qual_status_o = te_pkg::ENDED_REP; + end else if(tc_packets_lost_i == '1) begin + qual_status_o = te_pkg::TRACE_LOST; + end + valid_o = '1; + /* TODO: if for halted and reset sideband signals, + if at least one asserted -> considers unqualified*/ + end else if(tc_qualified_i) begin + if(lc_exception_i) begin + if(tc_exc_only) begin + packet_format_o = te_pkg::F_SYNC; + packet_f_sync_subformat_o = te_pkg::SF_TRAP; + resync_timer_rst_o = '1; + lc_tc_mux_o = 0; + reported_status = '1; + thaddr_o = '0; + /* thaddr_d = 0; resync_cnt = 0 + cause = lc_cause_i; tval = lc_tval*/ + valid_o = '1; + end else if(tc_reported_q) begin + packet_format_o = te_pkg::F_SYNC; + packet_f_sync_subformat_o = te_pkg::SF_START; + resync_timer_rst_o = '1; + //reported_d = '0; // not necessary + // resync_cnt = 0 + valid_o = '1; + end else begin // not reported + packet_format_o = te_pkg::F_SYNC; + packet_f_sync_subformat_o = te_pkg::SF_TRAP; + resync_timer_rst_o = '1; + lc_tc_mux_o = '0; + thaddr_o = '1; + /*thaddr_d = 1; resync_cnt = 0 + cause = lc_cause_i; tval = lc_tval */ + valid_o = '1; + end + end else if(tc_first_qualified_i || tc_ppccd || (tc_gt_max_resync_i && !tc_resync_br_q)) begin + packet_format_o = te_pkg::F_SYNC; + packet_f_sync_subformat_o = te_pkg::SF_START; + resync_timer_rst_o = '1; + //resync_cnt = 0 + valid_o = '1; + end else if(lc_updiscon_i) begin + // packet generated due to updiscon + lc_ended_ntr_d = '1; + if(tc_exc_only) begin + packet_format_o = te_pkg::F_SYNC; + packet_f_sync_subformat_o = te_pkg::SF_TRAP; + thaddr_o = '0; + resync_timer_rst_o = '1; + lc_tc_mux_o = '1; + /* thaddr = 0; resync_cnt = 0 + cause = tc_cause_i; tval = tc_tval */ + valid_o = '1; + end else begin + /* choosing between format 0/1/2 */ + /*if(tc_pbc_i >= 31) begin // format 0 subformat 0 + packet_format_o = F_OPT_EXT; + packet_f_opt_ext_subformat_o = SF_JTC; + // value for payload TBD + end else if(jtc_enabled_i && address_in_cache_i) begin // format 0 subformat 1 + packet_format_o = F_OPT_EXT; + packet_f_opt_ext_subformat_o = SF_JTC; + // value for payload TBD + end else*/ if(!tc_branch_map_empty_i) begin + packet_format_o = te_pkg::F_DIFF_DELTA; + end else begin // branch count == 0 + packet_format_o = te_pkg::F_ADDR_ONLY; + end + valid_o = '1; + end + end else if(tc_resync_br_q || tc_er_n) begin + // non mandatory + /* if(tc_er_n && tc_trigger_req_i) begin // requested from trigger unit + notify_o = '1; + end */ + + /* choosing between format 0/1/2 */ + /*if(tc_pbc_i >= 31) begin + packet_format_o = F_OPT_EXT; + packet_f_opt_ext_subformat_o = SF_JTC; + // value for payload TBD + end else if(jtc_enabled_i && address_in_cache_i) begin + packet_format_o = F_OPT_EXT; + packet_f_opt_ext_subformat_o = SF_JTC; + // value for payload TBD + end else*/ if(!tc_branch_map_empty_i) begin + packet_format_o = te_pkg::F_DIFF_DELTA; + end else begin // branch count == 0 + packet_format_o = te_pkg::F_ADDR_ONLY; + end + valid_o = '1; + end else if(nc_exc_only_o || nc_ppccd_br_o || !nc_qualified_i) begin + if(!nc_qualified_i) begin + // the packet is sent because it's the last instr qualified + lc_ended_rep_d = '1; + end + /* choosing between format 0/1/2 */ + /*if(tc_pbc_i >= 31) begin + packet_format_o = F_OPT_EXT; + packet_f_opt_ext_subformat_o = SF_JTC; + // value for payload TBD + end else if(jtc_enabled_i && address_in_cache_i) begin + packet_format_o = F_OPT_EXT; + packet_f_opt_ext_subformat_o = SF_JTC; + // value for payload TBD + end else*/ if(!tc_branch_map_empty_i) begin + packet_format_o = te_pkg::F_DIFF_DELTA; + end else begin // branch count == 0 + packet_format_o = te_pkg::F_ADDR_ONLY; + end + valid_o = '1; + end else if(tc_rpt_br) begin + /* // non mandatory, requires support for jtc and branch prediction + if(tc_pbc_i >= 31) begin + packet_format_o = F_OPT_EXT; + packet_f_opt_ext_subformat_o = SF_PBC; + valid_o = '1; + end else begin*/ + packet_format_o = te_pkg::F_DIFF_DELTA; + valid_o = '1; + //end + end /*else if(tc_cci) begin // non mandatory, requires support for context + packet_format_o = F_SYNC; + packet_f_sync_subformat_o = SF_CONTEXT; + valid_o = '1; + end*/ + end + end + end + + /* compression logic */ + /* short explanation on how it works: + by using the lzc we determine how many bits we can discard starting from the MSB, + this process is done with the normal address (we count 0s) and bitwise not of the + signal (we count 1s). + Then we decide in which way we can compress more and output the keep_bits signal. + + On the encoder side, it's possible to reconstruct the address: because we don't + remove all 0s (or 1s) from the MSB, but we keep one. This way it's possible to + sign extend the compressed address and get back the original address. + + Example 1: + address to compress: 0000001100010 + bits kept: -----01100010 + + Example 2: + address to compress: 1111011110110 + bits kept: ---1011110110 + + */ + // choosing between removing 1s or 0s + assign sign_extendable = addr_zeros > addr_ones ? addr_zeros : addr_ones; + // outputting the least sign bits we want to keep + // empty signals are used to cover 32'b0 and 32'b1 corner cases + assign keep_bits_o = (empty_zeros || empty_ones) ? 1 : te_pkg::XLEN - sign_extendable + 1; + + // leading zero counters + // from common_cells + lzc #( + .WIDTH(te_pkg::XLEN), + .MODE(1) + )i_lzc_zeros( + .in_i (addr_to_compress_i), + .cnt_o (addr_zeros), + .empty_o(empty_zeros) + ); + + lzc #( + .WIDTH(te_pkg::XLEN), + .MODE(1) + )i_lzc_ones( + .in_i (~addr_to_compress_i), + .cnt_o (addr_ones), + .empty_o(empty_ones) + ); + +endmodule \ No newline at end of file diff --git a/corev_apu/instr_tracing/rv_tracer-main/rtl/te_reg.sv b/corev_apu/instr_tracing/rv_tracer-main/rtl/te_reg.sv new file mode 100644 index 00000000000..0b7a086a514 --- /dev/null +++ b/corev_apu/instr_tracing/rv_tracer-main/rtl/te_reg.sv @@ -0,0 +1,792 @@ +// Copyright 2025 ETH Zurich and University of Bologna. +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. +// SPDX-License-Identifier: SHL-0.51 + +// Author: Umberto Laghi +// Contact: umberto.laghi2@unibo.it +// Github: @ubolakes + +/*REG*/ +/* +it stores values for the encoder in memory mapped registers +*/ + +// uncomment to enable 64bits arch support +//`define TE_ARCH64 + +module te_reg #( + parameter APB_ADDR_WIDTH = 32 // it is the max allowed, maybe change to a smaller value +) +( + input logic clk_i, + input logic rst_ni, + + // tracing management + input logic trace_req_off_i, // from filter + input logic trace_req_on_i, // directly from trigger unit + input logic encapsulator_ready_i, + + // filter settings + output logic cause_filter_o, + output logic [te_pkg::XLEN-1:0] upper_cause_o, + output logic [te_pkg::XLEN-1:0] lower_cause_o, + output logic [te_pkg::XLEN-1:0] match_cause_o, + output logic cause_mode_o, + output logic tvec_filter_o, + output logic [te_pkg::XLEN-1:0] upper_tvec_o, + output logic [te_pkg::XLEN-1:0] lower_tvec_o, + output logic [te_pkg::XLEN-1:0] match_tvec_o, + output logic tvec_mode_o, + output logic tval_filter_o, + output logic [te_pkg::XLEN-1:0] upper_tval_o, + output logic [te_pkg::XLEN-1:0] lower_tval_o, + output logic [te_pkg::XLEN-1:0] match_tval_o, + output logic tval_mode_o, + output logic priv_lvl_filter_o, + output logic [te_pkg::PRIV_LEN-1:0] upper_priv_o, + output logic [te_pkg::PRIV_LEN-1:0] lower_priv_o, + output logic [te_pkg::PRIV_LEN-1:0] match_priv_o, + output logic priv_lvl_mode_o, + output logic iaddr_filter_o, + output logic [te_pkg::XLEN-1:0] upper_iaddr_o, + output logic [te_pkg::XLEN-1:0] lower_iaddr_o, + output logic [te_pkg::XLEN-1:0] match_iaddr_o, + output logic iaddr_mode_o, + + output logic trace_enable_o, // turned off by filter + output logic trace_activated_o, // managed by user + // packet_emitter settings and control + output logic nocontext_o, + output logic notime_o, + output logic encoder_mode_o, // hardwired to 0 - can only be 0 according to spec + output te_pkg::ioptions_s configuration_o, + output logic lossless_trace_o, + output logic shallow_trace_o, + + output logic clk_gated_o, + + // APB I/O interface + input logic [APB_ADDR_WIDTH-1:0] paddr_i, + input logic pwrite_i, + input logic psel_i, + input logic penable_i, + input logic [31:0] pwdata_i, + output logic pready_o, + output logic [31:0] prdata_o +); + + // FFs I/Os + logic trace_enable_d, trace_enable_q; + // trace enabling + logic trace_req_off, trace_req_on; + logic turn_on, turn_off; + logic clk_gated; + logic test_enabled; + + // registers I/O + logic cause_filter_d, cause_filter_q; + logic [te_pkg::XLEN-1:0] upper_cause_d, upper_cause_q; + logic [te_pkg::XLEN-1:0] lower_cause_d, lower_cause_q; + logic [te_pkg::XLEN-1:0] match_cause_d, match_cause_q; + logic cause_mode_d, cause_mode_q; + logic tvec_filter_d, tvec_filter_q; + logic [te_pkg::XLEN-1:0] upper_tvec_d, upper_tvec_q; + logic [te_pkg::XLEN-1:0] lower_tvec_d, lower_tvec_q; + logic [te_pkg::XLEN-1:0] match_tvec_d, match_tvec_q; + logic tvec_mode_d, tvec_mode_q; + logic tval_filter_d, tval_filter_q; + logic [te_pkg::XLEN-1:0] upper_tval_d, upper_tval_q; + logic [te_pkg::XLEN-1:0] lower_tval_d, lower_tval_q; + logic [te_pkg::XLEN-1:0] match_tval_d, match_tval_q; + logic tval_mode_d, tval_mode_q; + logic priv_lvl_filter_d, priv_lvl_filter_q; + logic [te_pkg::PRIV_LEN-1:0] upper_priv_d, upper_priv_q; + logic [te_pkg::PRIV_LEN-1:0] lower_priv_d, lower_priv_q; + logic [te_pkg::PRIV_LEN-1:0] match_priv_d, match_priv_q; + logic priv_lvl_mode_d, priv_lvl_mode_q; + logic iaddr_filter_d, iaddr_filter_q; + logic [te_pkg::XLEN-1:0] upper_iaddr_d, upper_iaddr_q; + logic [te_pkg::XLEN-1:0] lower_iaddr_d, lower_iaddr_q; + logic [te_pkg::XLEN-1:0] match_iaddr_d, match_iaddr_q; + logic iaddr_mode_d, iaddr_mode_q; + logic trace_activated_d, trace_activated_q; + logic nocontext_d, nocontext_q; + logic notime_d, notime_q; + te_pkg::ioptions_s configuration_d, configuration_q; + logic lossless_trace_d, lossless_trace_q; + logic shallow_trace_d, shallow_trace_q; + + // APB transaction + logic read_access; + logic write_access; + logic setup_d, setup_q; + + // assignments + // filter + assign cause_filter_o = cause_filter_q; + assign upper_cause_o = upper_cause_q; + assign lower_cause_o = lower_cause_q; + assign match_cause_o = match_cause_q; + assign cause_mode_o = cause_mode_q; + assign tvec_filter_o = tvec_filter_q; + assign upper_tvec_o = upper_tvec_q; + assign lower_tvec_o = lower_tvec_q; + assign match_tvec_o = match_tvec_q; + assign tvec_mode_o = tvec_mode_q; + assign tval_filter_o = tval_filter_q; + assign upper_tval_o = upper_tval_q; + assign lower_tval_o = lower_tval_q; + assign match_tval_o = match_tval_q; + assign tval_mode_o = tval_mode_q; + assign priv_lvl_filter_o = priv_lvl_filter_q; + assign upper_priv_o = upper_priv_q; + assign lower_priv_o = lower_priv_q; + assign match_priv_o = match_priv_q; + assign priv_lvl_mode_o = priv_lvl_mode_q; + assign iaddr_filter_o = iaddr_filter_q; + assign upper_iaddr_o = upper_iaddr_q; + assign lower_iaddr_o = lower_iaddr_q; + assign match_iaddr_o = match_iaddr_q; + assign iaddr_mode_o = iaddr_mode_q; + // packet emitter + assign configuration_o = configuration_q; + assign lossless_trace_o = lossless_trace_q; // if == 1 stalls the core when the encapsulator buffer is full + assign shallow_trace_o = shallow_trace_q; // if == 1 flushes the branch map at each packet emitted + assign nocontext_o = nocontext_q; + assign notime_o = notime_q; + assign encoder_mode_o = '0; // hardwired + assign trace_activated_o = trace_activated_q; + + // tracing is switched on only when it's not enabled anc a request of turning on is received + assign turn_on = (trace_enable_q == 0) && (trace_req_on /*|| encapsulator_ready_i*/); // encapsulator signal is temporarely disabled + // tracing is switched off only when it's not enabled anc a request of turning off is received + assign turn_off = (trace_enable_q == 1) && (trace_req_off /*|| ~encapsulator_ready_i*/); + // the toggle of trace_enable value happens only when turn off or turn off is asserted + assign trace_enable_d = (turn_off || turn_on) ? ~trace_enable_q : trace_enable_q; + assign trace_enable_o = trace_enable_d; + + assign clk_gated_o = clk_gated; + assign test_enabled = '0; + + assign setup_d = psel_i && ~penable_i; + assign pready_o = setup_q && psel_i && penable_i; + assign read_access = pready_o && !pwrite_i; + assign write_access = pready_o && pwrite_i; + + /* APB read and write */ + always_comb begin + // initialization + // set _d as _q, because we don't to erase them all + cause_filter_d = cause_filter_q; + cause_mode_d = cause_mode_q; + tvec_filter_d = tvec_filter_q; + tvec_mode_d = tvec_mode_q; + tval_filter_d = tval_filter_q; + tval_mode_d = tval_mode_q; + priv_lvl_filter_d = priv_lvl_filter_q; + priv_lvl_mode_d = priv_lvl_mode_q; + iaddr_filter_d = iaddr_filter_q; + iaddr_mode_d = iaddr_mode_q; + lower_priv_d = lower_priv_q; + upper_priv_d = upper_priv_q; + match_priv_d = match_priv_q; + trace_activated_d = trace_activated_q; + lossless_trace_d = lossless_trace_q; + shallow_trace_d = shallow_trace_q; + notime_d = notime_q; + nocontext_d = nocontext_q; + configuration_d = configuration_q; + upper_cause_d = upper_cause_q; + lower_cause_d = lower_cause_q; + match_cause_d = match_cause_q; + upper_tvec_d = upper_tvec_q; + lower_tvec_d = lower_tvec_q; + match_tvec_d = match_tvec_q; + upper_tval_d = upper_tval_q; + lower_tval_d = lower_tval_q; + match_tval_d = match_tval_q; + upper_iaddr_d = upper_iaddr_q; + lower_iaddr_d = lower_iaddr_q; + match_iaddr_d = match_iaddr_q; + prdata_o = '0; // clean output + + if (read_access) begin + case (paddr_i[7:0]) + // XLEN agnostic (or always <= than 32) + // FILTER + // enable and mode + te_pkg::CAUSE_ENABLE_MODE: begin + prdata_o[0] = cause_filter_q; + prdata_o[1] = cause_mode_q; + end + + te_pkg::TVEC_ENABLE_MODE: begin + prdata_o[0] = tvec_filter_q; + prdata_o[1] = tvec_mode_q; + end + + te_pkg::TVAL_ENABLE_MODE: begin + prdata_o[0] = tval_filter_q; + prdata_o[1] = tval_mode_q; + end + + te_pkg::PRIV_ENABLE_MODE: begin + prdata_o[0] = priv_lvl_filter_q; + prdata_o[1] = priv_lvl_mode_q; + end + + te_pkg::IADDR_ENABLE_MODE: begin + prdata_o[0] = iaddr_filter_q; + prdata_o[1] = iaddr_mode_q; + end + + // priv + te_pkg::PRIV_RANGE: begin + prdata_o[te_pkg::PRIV_LEN-1:0] = lower_priv_q; + prdata_o[te_pkg::PRIV_LEN*2-1:te_pkg::PRIV_LEN] = upper_priv_q; + end + + te_pkg::PRIV_MATCH: begin + prdata_o[te_pkg::PRIV_LEN-1:0] = match_priv_q; + end + + // TRACE MANAGEMENT + te_pkg::TRACE_STATE: begin + prdata_o[0] = trace_activated_q; + end + + te_pkg::LOSSLESS_TRACE: begin + prdata_o[0] = lossless_trace_q; + end + + te_pkg::SHALLOW_TRACE: begin + prdata_o[0] = shallow_trace_q; + end + + // PACKET EMITTER + te_pkg::NO_TIME: begin + prdata_o[0] = notime_q; + end + + te_pkg::NO_CONTEXT: begin + prdata_o[0] = nocontext_q; + end + + te_pkg::DELTA_ADDRESS: begin + prdata_o[0] = configuration_q.delta_address_en; + end + te_pkg::FULL_ADDRESS: begin + prdata_o[0] = configuration_q.full_address_en; + end + te_pkg::IMPLICIT_EXCEPTION: begin + prdata_o[0] = configuration_q.implicit_exception_en; + end + te_pkg::SIJUMP: begin + prdata_o[0] = configuration_q.sijump_en; + end + te_pkg::IMPLICIT_RETURN: begin + prdata_o[0] = configuration_q.implicit_return_en; + end + te_pkg::BRANCH_PREDICTION: begin + prdata_o[0] = configuration_q.branch_prediction_en; + end + te_pkg::JUMP_TARGET_CACHE: begin + prdata_o[0] = configuration_q.jump_target_cache_en; + end + + `ifdef TE_ARCH64 // 64bits case + // FILTER + // cause + te_pkg::CAUSE_UPPER: begin + prdata_o[te_pkg::XLEN-1:0] = upper_cause_q; + end + + te_pkg::CAUSE_LOWER: begin + prdata_o[te_pkg::XLEN-1:0] = lower_cause_q; + end + + te_pkg::CAUSE_MATCH: begin + prdata_o[te_pkg::XLEN-1:0] = match_cause_q; + end + + // tvec + te_pkg::TVEC_UPPER_L: begin // least significant bits + prdata_o = upper_tvec_q[31:0]; + end + + te_pkg::TVEC_UPPER_M: begin // most significant bits + prdata_o = upper_tvec_q[63:32]; + end + + te_pkg::TVEC_LOWER_L: begin // least significant bits + prdata_o = lower_tvec_q[31:0]; + end + + te_pkg::TVEC_LOWER_M: begin // most significant bits + prdata_o = lower_tvec_q[63:32]; + end + + te_pkg::TVEC_MATCH_L: begin // least significant bits + prdata_o = match_tvec_q[31:0]; + end + + te_pkg::TVEC_MATCH_M: begin // most significant bits + prdata_o = match_tvec_q[63:32]; + end + + // tval + te_pkg::TVAL_UPPER_L: begin // least significant bits + prdata_o = upper_tval_q[31:0]; + end + + te_pkg::TVAL_UPPER_M: begin // most significant bits + prdata_o = upper_tval_q[63:32]; + end + + te_pkg::TVAL_LOWER_L: begin // least significant bits + prdata_o = lower_tval_q[31:0]; + end + + te_pkg::TVAL_LOWER_M: begin // most significant bits + prdata_o = lower_tval_q[63:32]; + end + + te_pkg::TVAL_MATCH_L: begin // least significant bits + prdata_o = match_tval_q[31:0]; + end + + te_pkg::TVAL_MATCH_M: begin // most significant bits + prdata_o = match_tval_q[63:32]; + end + + // iaddr + te_pkg::IADDR_UPPER_L: begin // least significant bits + prdata_o = upper_iaddr_q[31:0]; + end + + te_pkg::IADDR_UPPER_M: begin // most significant bits + prdata_o = upper_iaddr_q[63:32]; + end + + te_pkg::IADDR_LOWER_L: begin // least significant bits + prdata_o = lower_iaddr_q[31:0]; + end + + te_pkg::IADDR_LOWER_M: begin // most significant bits + prdata_o = lower_iaddr_q[63:32]; + end + + te_pkg::IADDR_MATCH_L: begin // least significant bits + prdata_o = match_iaddr_q[31:0]; + end + + te_pkg::IADDR_MATCH_M: begin // most significant bits + prdata_o = match_iaddr_q[63:32]; + end + + `else // 32bits case + // FILTER + // cause + te_pkg::CAUSE_UPPER: begin + prdata_o[te_pkg::XLEN-1:0] = upper_cause_q; + end + + te_pkg::CAUSE_LOWER: begin + prdata_o[te_pkg::XLEN-1:0] = lower_cause_q; + end + + te_pkg::CAUSE_MATCH: begin + prdata_o[te_pkg::XLEN-1:0] = match_cause_d; + end + + // tvec + te_pkg::TVEC_UPPER: begin + prdata_o = upper_tvec_q; + end + + te_pkg::TVEC_LOWER: begin + prdata_o = lower_tvec_q; + end + + te_pkg::TVEC_MATCH: begin + prdata_o = match_tvec_q; + end + + // tval + te_pkg::TVAL_UPPER: begin + prdata_o = upper_tval_q; + end + + te_pkg::TVAL_LOWER: begin + prdata_o = lower_tval_q; + end + + te_pkg::TVAL_MATCH: begin + prdata_o = match_tval_q; + end + + // iaddr + te_pkg::IADDR_UPPER: begin + prdata_o = upper_iaddr_q; + end + + te_pkg::IADDR_LOWER: begin + prdata_o = lower_iaddr_q; + end + + te_pkg::IADDR_MATCH: begin + prdata_o = match_iaddr_q; + end + `endif + endcase + end else if (write_access) begin + + + case (paddr_i[7:0]) + // common cases + te_pkg::CAUSE_ENABLE_MODE: begin + cause_filter_d = pwdata_i[0]; + cause_mode_d = pwdata_i[1]; + end + + te_pkg::TVEC_ENABLE_MODE: begin + tvec_filter_d = pwdata_i[0]; + tvec_mode_d = pwdata_i[1]; + end + + te_pkg::TVAL_ENABLE_MODE: begin + tval_filter_d = pwdata_i[0]; + tval_mode_d = pwdata_i[1]; + end + + te_pkg::PRIV_ENABLE_MODE: begin + priv_lvl_filter_d = pwdata_i[0]; + priv_lvl_mode_d = pwdata_i[1]; + end + + te_pkg::IADDR_ENABLE_MODE: begin + iaddr_filter_d = pwdata_i[0]; + iaddr_mode_d = pwdata_i[1]; + end + + // priv + te_pkg::PRIV_RANGE: begin + lower_priv_d = pwdata_i[te_pkg::PRIV_LEN-1:0]; + upper_priv_d = pwdata_i[te_pkg::PRIV_LEN*2-1:te_pkg::PRIV_LEN]; + end + + te_pkg::PRIV_MATCH: begin + match_priv_d = pwdata_i[te_pkg::PRIV_LEN-1:0]; + end + + // TRACE MANAGEMENT + te_pkg::TRACE_STATE: begin + trace_activated_d = pwdata_i[0]; + end + + te_pkg::LOSSLESS_TRACE: begin + lossless_trace_d = pwdata_i[0]; + end + + te_pkg::SHALLOW_TRACE: begin + shallow_trace_d = pwdata_i[0]; + end + + // PACKET EMITTER + te_pkg::NO_TIME: begin + notime_d = pwdata_i[0]; + end + + te_pkg::NO_CONTEXT: begin + nocontext_d = pwdata_i[0]; + end + + te_pkg::DELTA_ADDRESS: begin + configuration_d.delta_address_en = pwdata_i[0]; + end + + te_pkg::FULL_ADDRESS: begin + configuration_d.full_address_en = pwdata_i[0]; + end + + te_pkg::IMPLICIT_EXCEPTION: begin + configuration_d.implicit_exception_en = pwdata_i[0]; + end + + te_pkg::SIJUMP: begin + configuration_d.sijump_en = pwdata_i[0]; + end + + te_pkg::IMPLICIT_RETURN: begin + configuration_d.implicit_return_en = pwdata_i[0]; + end + + te_pkg::BRANCH_PREDICTION: begin + configuration_d.branch_prediction_en = pwdata_i[0]; + end + + te_pkg::JUMP_TARGET_CACHE: begin + configuration_d.jump_target_cache_en = pwdata_i[0]; + end + + `ifdef TE_ARCH64 + // cause + te_pkg::CAUSE_UPPER: begin + upper_cause_d = pwdata_i[te_pkg::XLEN-1:0]; + end + + te_pkg::CAUSE_LOWER: begin + lower_cause_d = pwdata_i[te_pkg::XLEN-1:0]; + end + + te_pkg::CAUSE_MATCH: begin + match_cause_d = pwdata_i[te_pkg::XLEN-1:0]; + end + + // tvec + te_pkg::TVEC_UPPER_L: begin // least significant bits + upper_tvec_d[31:0] = pwdata_i; + end + + te_pkg::TVEC_UPPER_M: begin // most significant bits + upper_tvec_d[63:32] = pwdata_i; + end + + te_pkg::TVEC_LOWER_L: begin // least significant bits + lower_tvec_d[31:0] = pwdata_i; + end + + te_pkg::TVEC_LOWER_M: begin // most significant bits + lower_tvec_d[63:32] = pwdata_i; + end + + te_pkg::TVEC_MATCH_L: begin // least significant bits + match_tvec_d[31:0] = pwdata_i; + end + + te_pkg::TVEC_MATCH_M: begin // most significant bits + match_tvec_d[63:32] = pwdata_i; + end + + // tval + te_pkg::TVAL_UPPER_L: begin // least significant bits + upper_tval_d[31:0] = pwdata_i; + end + + te_pkg::TVAL_UPPER_M: begin // most significant bits + upper_tval_d[63:32] = pwdata_i; + end + + te_pkg::TVAL_LOWER_L: begin // least significant bits + lower_tval_d[31:0] = pwdata_i; + end + + te_pkg::TVAL_LOWER_M: begin // most significant bits + lower_tval_d[63:32] = pwdata_i; + end + + te_pkg::TVAL_MATCH_L: begin // least significant bits + match_tval_d[31:0] = pwdata_i; + end + + te_pkg::TVAL_MATCH_M: begin // most significant bits + match_tval_d[63:32] = pwdata_i; + end + + // iaddr + te_pkg::IADDR_UPPER_L: begin // least significant bits + upper_iaddr_d[31:0] = pwdata_i; + end + + te_pkg::IADDR_UPPER_M: begin // most significant bits + upper_iaddr_d[63:32] = pwdata_i; + end + + te_pkg::IADDR_LOWER_L: begin // least significant bits + lower_iaddr_d[31:0] = pwdata_i; + end + + te_pkg::IADDR_LOWER_M: begin // most significant bits + lower_iaddr_d[63:32] = pwdata_i; + end + + te_pkg::IADDR_MATCH_L: begin // least significant bits + match_iaddr_d[31:0] = pwdata_i; + end + + te_pkg::IADDR_MATCH_M: begin // most significant bits + match_iaddr_d[63:32] = pwdata_i; + end + `else // 32 bits case + // cause + te_pkg::CAUSE_UPPER: begin + upper_cause_d = pwdata_i[te_pkg::XLEN-1:0]; + end + + te_pkg::CAUSE_LOWER: begin + lower_cause_d = pwdata_i[te_pkg::XLEN-1:0]; + end + + te_pkg::CAUSE_MATCH: begin + match_cause_d = pwdata_i[te_pkg::XLEN-1:0]; + end + + // tvec + te_pkg::TVEC_UPPER: begin + upper_tvec_d = pwdata_i; + end + + te_pkg::TVEC_LOWER: begin + lower_tvec_d = pwdata_i; + end + + te_pkg::TVEC_MATCH: begin + match_tvec_d = pwdata_i; + end + + // tval + te_pkg::TVAL_UPPER: begin + upper_tval_d = pwdata_i; + end + + te_pkg::TVAL_LOWER: begin + lower_tval_d = pwdata_i; + end + + te_pkg::TVAL_MATCH: begin + match_tval_d = pwdata_i; + end + + // iaddr + te_pkg::IADDR_UPPER: begin + upper_iaddr_d = pwdata_i; + end + + te_pkg::IADDR_LOWER: begin + lower_iaddr_d = pwdata_i; + end + + te_pkg::IADDR_MATCH: begin + match_iaddr_d = pwdata_i; + end + `endif + endcase + end + end + + // clock gating module + pulp_clock_gating i_clock_gating( + .clk_i (clk_i), + .en_i (trace_activated_o), + .test_en_i(test_enabled), + .clk_o (clk_gated) + ); + + // edge detector for trace_req_on_i + // turns on and off the tracing + edge_detect i_edge_detect_on( + .clk_i(clk_gated), + .rst_ni(rst_ni), + .d_i(trace_req_on_i), + .re_o(trace_req_on), + .fe_o() + ); + + // edge detector for trace_req_off_i + // turns on and off the tracing + edge_detect i_edge_detect_off( + .clk_i(clk_gated), + .rst_ni(rst_ni), + .d_i(trace_req_off_i), + .re_o(trace_req_off), + .fe_o() + ); + + always_ff @(posedge clk_i, negedge rst_ni) begin + if(~rst_ni) begin + trace_enable_q <= '1; + // storing config parameters + cause_filter_q <= '0; + upper_cause_q <= '0; + lower_cause_q <= '0; + match_cause_q <= '0; + cause_mode_q <= '0; + tvec_filter_q <= '0; + upper_tvec_q <= '0; + lower_tvec_q <= '0; + match_tvec_q <= '0; + tvec_mode_q <= '0; + tval_filter_q <= '0; + upper_tval_q <= '0; + lower_tval_q <= '0; + match_tval_q <= '0; + tval_mode_q <= '0; + priv_lvl_filter_q <= '0; + upper_priv_q <= '0; + lower_priv_q <= '0; + match_priv_q <= '0; + priv_lvl_mode_q <= '0; + iaddr_filter_q <= '0; + upper_iaddr_q <= '0; + lower_iaddr_q <= '0; + match_iaddr_q <= '0; + iaddr_mode_q <= '0; + configuration_q.delta_address_en <= '0; // delta address only one mandatory //FIXME changing this for debug + configuration_q.full_address_en <= '1; + configuration_q.implicit_exception_en <= '0; + configuration_q.sijump_en <= '0; + configuration_q.implicit_return_en <= '0; + configuration_q.branch_prediction_en <= '0; + configuration_q.jump_target_cache_en <= '0; + lossless_trace_q <= '0; + shallow_trace_q <= '0; + nocontext_q <= '1; + notime_q <= '0; + trace_activated_q <= '1; + setup_q <= '0; + end else begin + trace_enable_q <= trace_enable_d; + // storing config parameters + cause_filter_q <= cause_filter_d; + upper_cause_q <= upper_cause_d; + lower_cause_q <= lower_cause_d; + match_cause_q <= match_cause_d; + cause_mode_q <= cause_mode_d; + tvec_filter_q <= tvec_filter_d; + upper_tvec_q <= upper_tvec_d; + lower_tvec_q <= lower_tvec_d; + match_tvec_q <= match_tvec_d; + tvec_mode_q <= tvec_mode_d; + tval_filter_q <= tval_filter_d; + upper_tval_q <= upper_tval_d; + lower_tval_q <= lower_tval_d; + match_tval_q <= match_tval_d; + tval_mode_q <= tval_mode_d; + priv_lvl_filter_q <= priv_lvl_filter_d; + upper_priv_q <= upper_priv_d; + lower_priv_q <= lower_priv_d; + match_priv_q <= match_priv_d; + priv_lvl_mode_q <= priv_lvl_mode_d; + iaddr_filter_q <= iaddr_filter_d; + upper_iaddr_q <= upper_iaddr_d; + lower_iaddr_q <= lower_iaddr_d; + match_iaddr_q <= match_iaddr_d; + iaddr_mode_q <= iaddr_mode_d; + configuration_q <= configuration_d; + lossless_trace_q <= lossless_trace_d; + shallow_trace_q <= shallow_trace_d; + nocontext_q <= nocontext_d; + notime_q <= notime_d; + trace_activated_q <= trace_activated_d; + setup_q <= setup_d; + end + end + +endmodule \ No newline at end of file diff --git a/corev_apu/instr_tracing/rv_tracer-main/rtl/te_resync_counter.sv b/corev_apu/instr_tracing/rv_tracer-main/rtl/te_resync_counter.sv new file mode 100644 index 00000000000..d8c6f9a8aa3 --- /dev/null +++ b/corev_apu/instr_tracing/rv_tracer-main/rtl/te_resync_counter.sv @@ -0,0 +1,106 @@ +// Copyright 2025 ETH Zurich and University of Bologna. +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. +// SPDX-License-Identifier: SHL-0.51 + +// Author: Umberto Laghi +// Contact: umberto.laghi2@unibo.it +// Github: @ubolakes + +/* RESYNC COUNTER */ +/* +It keeps track of the emitted packets or cycles elapsed, +operational mode and threshold are set by the user. + +It produces a signal when the counter reaches the specified +threshold and it remains to 1 until it receives a reset signal. + +In packed mode: the packets that exceeds the defined threshold +are discarded, because they belong to a pre-resync period. +Packets received while the counter is requesting a resync are +ignored. +*/ + +module te_resync_counter #( + parameter N = 1, + parameter MODE = te_pkg::CYCLE_MODE, // counts cycles as default + parameter MAX_VALUE = 16'hFFFF // default max value, can be personalized + ) + ( + input logic clk_i, + input logic rst_ni, + + input logic trace_enabled_i, // it comes from filter + input logic [N-1:0] packet_emitted_i, + input logic resync_rst_i, + + output logic gt_resync_max_o, // greater than the max value, in reality MAX_VALUE + output logic et_resync_max_o // equals to the max value, in reality MAX_VALUE-1 + ); + + /* + The packets that exceeds the defined threshold are discarded, + because they belong to a pre-resync period. + Packets received while the counter is requesting a resync are + ignored. + */ + + // signals declaration + logic [$clog2(MAX_VALUE):0] counter_d, counter_q; + logic [$clog2(N):0] n_packets; + logic overflow; + + // assignments + // both for packet and cycle mode + assign et_resync_max_o = counter_d == MAX_VALUE; + assign gt_resync_max_o = counter_d > MAX_VALUE && ~resync_rst_i; + + always_comb begin + // init + counter_d = counter_q; + n_packets = '0; + + // packet mode + if (MODE == te_pkg::PACKET_MODE && trace_enabled_i) begin + // counting the packets received + for (int i = 0; i < N; i++) begin + if (packet_emitted_i[i]) begin + n_packets += 1; + end + end + + // summing the packets counted + for (int i = 0; i < n_packets; i++) begin + if (counter_d <= MAX_VALUE) begin + counter_d += 1; + end + end + end + + // cycle mode + if (MODE == te_pkg::CYCLE_MODE && trace_enabled_i && counter_d <= MAX_VALUE) begin + counter_d += 1; + end + + // synchronous reset + if (resync_rst_i) begin + counter_d = '0; + end + end + + + always_ff @(posedge clk_i, negedge rst_ni) begin + if (~rst_ni) begin + counter_q <= '0; + end else begin + counter_q <= counter_d; + end + end + +endmodule \ No newline at end of file diff --git a/corev_apu/openpiton/ariane_verilog_wrap.sv b/corev_apu/openpiton/ariane_verilog_wrap.sv index 5b8e5744217..8e7cceb4968 100644 --- a/corev_apu/openpiton/ariane_verilog_wrap.sv +++ b/corev_apu/openpiton/ariane_verilog_wrap.sv @@ -12,17 +12,69 @@ // Date: 19.03.2017 // Description: Ariane Top-level wrapper to break out SV structs to logic vectors. - module ariane_verilog_wrap import ariane_pkg::*; + import config_pkg::*; + import l15_pkg::*; #( parameter int unsigned RASDepth = 2, parameter int unsigned BTBEntries = 32, parameter int unsigned BHTEntries = 128, + parameter int unsigned NrCommitPorts = 2, + parameter int unsigned NrLoadBufEntries = 2, + parameter int unsigned NrRgprPorts = 0, + parameter int unsigned NrWbPorts = 0, + parameter int unsigned MaxOutstandingStores = 7, + parameter logic [63:0] HaltAddress = 64'h800, + parameter logic [63:0] ExceptionAddress = 64'h808, + parameter bit EnableAccelerator = 0, + parameter bit SupervisorModeEn = 1, + parameter bit TvalEn = 1, + parameter bit DebugEn = 1, + parameter bit NonIdemPotenceEn = 0, + parameter int unsigned XLEN = 64, + parameter int unsigned VLEN = 64, + parameter bit FpgaEn = 0, + parameter bit FpgaAlteraEn = 0, + // RISCV extensions + parameter bit FpuEn = 1, + parameter bit F16En = 0, + parameter bit F16AltEn = 0, + parameter bit F8En = 0, + parameter bit FVecEn = 0, + parameter bit CvxifEn = 0, + parameter bit CExtEn = 1, + parameter bit ZcbExtEn = 0, + parameter bit AExtEn = 1, + parameter bit BExtEn = 0, + parameter bit VExtEn = 0, + parameter bit ZcmpExtEn = 0, + parameter bit FExtEn = 0, + parameter bit DExtEn = 0, + parameter bit RVUEn = 1, + parameter bit RVZicntrEn = 0, + parameter bit RVZiCondEn = 0, + parameter bit RVZihpmEn = 0, + parameter bit HExtEn = 0, + parameter bit RVFEn = 1, + parameter bit RVDEn = 1, + // extended + parameter bit FpPresent = 0, + parameter int unsigned FLen = 0, + parameter bit NSXEn = 0, // non standard extensions present + parameter bit RVFVecEn = 0, + parameter bit XF16VecEn = 0, + parameter bit XF16ALTVecEn = 0, + parameter bit XF8VecEn = 0, + parameter bit PerfCounterEn = 0, // debug module base address parameter logic [63:0] DmBaseAddress = 64'h0, - // swap endianess in l15 adapter + // swap endianness in l15 adapter parameter bit SwapEndianess = 1, + // AXI Configuration + parameter int unsigned AxiIdWidth = 4, + parameter int unsigned AxiUserWidth = 64, + parameter int unsigned AxiBurstWriteEn = 0, // PMA configuration // idempotent region parameter int unsigned NrNonIdempotentRules = 1, @@ -37,14 +89,18 @@ module ariane_verilog_wrap parameter logic [NrMaxRules*64-1:0] CachedRegionAddrBase = '0, parameter logic [NrMaxRules*64-1:0] CachedRegionLength = '0, // PMP - parameter int unsigned NrPMPEntries = 8 + parameter int unsigned NrPMPEntries = 8, + // HPDC Write coalescing + parameter bit WriteCoalescingEn = 0, + parameter int unsigned WriteCoalescingTh = 0, + parameter bit UseHPDcache = 0 // 1: HPDC, 0: WTcache ) ( input clk_i, input reset_l, // this is an openpiton-specific name, do not change (hier. paths in TB use this) output spc_grst_l, // this is an openpiton-specific name, do not change (hier. paths in TB use this) // Core ID, Cluster ID and boot address are considered more or less static - input [riscv::VLEN-1:0] boot_addr_i, // reset boot address - input [riscv::XLEN-1:0] hart_id_i, // hart id in a multicore environment (reflected in a CSR) + input [VLEN-1:0] boot_addr_i, // reset boot address + input [XLEN-1:0] hart_id_i, // hart id in a multicore environment (reflected in a CSR) // Interrupt inputs input [1:0] irq_i, // level sensitive IR lines, mip & sip (async) input ipi_i, // inter-processor interrupts (async) @@ -53,14 +109,115 @@ module ariane_verilog_wrap input debug_req_i, // debug request (async) // L15 (memory side) - output [$size(wt_cache_pkg::l15_req_t)-1:0] l15_req_o, - input [$size(wt_cache_pkg::l15_rtrn_t)-1:0] l15_rtrn_i + output [$size(l15_pkg::l15_req_t)-1:0] l15_req_o, + input [$size(l15_pkg::l15_rtrn_t)-1:0] l15_rtrn_i ); + localparam cva6_user_cfg_t cva6_user_cfg = '{ + XLEN: XLEN, + VLEN: VLEN, + RVA: AExtEn, + RVB: BExtEn, + ZKN: 1'b0, // Scalar Cryptography extension disabled + RVV: VExtEn, + RVC: CExtEn, + RVH: HExtEn, + RVZCB: ZcbExtEn, + RVZCMP: ZcmpExtEn, + RVZCMT: 1'b0, // Zcmt extension disabled + RVZiCond: RVZiCondEn, + RVZicntr: RVZicntrEn, + RVZihpm: RVZihpmEn, + RVZiCbom: 1'b0, // OpenPiton doesn't support CMOs at this time + RVF: RVFEn, + RVD: RVDEn, + XF16: F16En, + XF16ALT: F16AltEn, + XF8: F8En, + XFVec: FVecEn, + PerfCounterEn: PerfCounterEn, + MmuPresent: 1'b1, + RVS: SupervisorModeEn, + RVU: RVUEn, + SoftwareInterruptEn: 1'b1, // Software interrupts enabled + DebugEn: DebugEn, + DmBaseAddress: DmBaseAddress, + HaltAddress: HaltAddress, + ExceptionAddress: ExceptionAddress, + TvalEn: TvalEn, + DirectVecOnly: 1'b0, + NrPMPEntries: NrPMPEntries, + PMPCfgRstVal: {16{64'h0}}, + PMPAddrRstVal: {16{64'h0}}, + PMPEntryReadOnly: 16'd0, + PMPNapotEn: 1'b1, // PMP NAPOT mode enabled + NrNonIdempotentRules: NrNonIdempotentRules, + NonIdempotentAddrBase: NonIdempotentAddrBase, + NonIdempotentLength: NonIdempotentLength, + NrExecuteRegionRules: NrExecuteRegionRules, + ExecuteRegionAddrBase: ExecuteRegionAddrBase, + ExecuteRegionLength: ExecuteRegionLength, + NrCachedRegionRules: NrCachedRegionRules, + CachedRegionAddrBase: CachedRegionAddrBase, + CachedRegionLength: CachedRegionLength, + CvxifEn: CvxifEn, + CoproType: config_pkg::COPRO_NONE, // No coprocessor + NOCType: SwapEndianess ? NOC_TYPE_L15_BIG_ENDIAN : NOC_TYPE_L15_LITTLE_ENDIAN, + AxiAddrWidth: 40, + AxiDataWidth: 128, // Used to calculate the mem data width of hpdc + AxiIdWidth: 6, + AxiUserWidth: AxiUserWidth, + AxiBurstWriteEn: AxiBurstWriteEn, + MemTidWidth: 6, + IcacheByteSize: 16384, + IcacheSetAssoc: 4, + IcacheLineWidth: 256, + DCacheType: UseHPDcache ? config_pkg::HPDCACHE_WT : config_pkg::WT, + DcacheIdWidth: 1, + DcacheByteSize: 8192, + DcacheSetAssoc: 4, + DcacheLineWidth: 128, + DcacheFlushOnFence: 1'b0, // Don't flush D$ on fence + DcacheFlushOnFenceI: 1'b0, + DcacheInvalidateOnFlush: 1'b0, // Don't invalidate on flush + DataUserEn: 1'b0, + WtDcacheWbufDepth: 8, + FetchUserEn: 0, + FetchUserWidth: 64, + FpgaEn: FpgaEn, + FpgaAlteraEn: FpgaAlteraEn, + TechnoCut: 1'b0, + SuperscalarEn: 1'b0, + ALUBypass: 1'b0, // ALU bypass disabled + NrCommitPorts: NrCommitPorts, + NrLoadPipeRegs: 2, + NrStorePipeRegs: 0, + NrScoreboardEntries: 8, + NrLoadBufEntries: NrLoadBufEntries, + MaxOutstandingStores: MaxOutstandingStores, + RASDepth: RASDepth, + BTBEntries: BTBEntries, + BPType: config_pkg::BHT, // Bimodal predictor + BHTEntries: BHTEntries, + BHTHist: 2, // 2-bit history for BHT + InstrTlbEntries: 16, + DataTlbEntries: 16, + UseSharedTlb: 0, + SvnapotEn: 0, + SharedTlbDepth: 64, + SDTRIG: 0, + Mcontrol6: 0, + Icount: 0, + Etrigger: 0, + Itrigger: 0 + }; + + localparam cva6_cfg_t cva6_cfg = build_config_pkg::build_config(cva6_user_cfg); + // assign bitvector to packed struct and vice versa // L15 (memory side) - wt_cache_pkg::l15_req_t l15_req; - wt_cache_pkg::l15_rtrn_t l15_rtrn; + l15_req_t l15_req; + l15_rtrn_t l15_rtrn; assign l15_req_o = l15_req; assign l15_rtrn = l15_rtrn_i; @@ -156,33 +313,10 @@ module ariane_verilog_wrap // ariane instance ///////////////////////////// - localparam ariane_pkg::ariane_cfg_t ArianeOpenPitonCfg = '{ - RASDepth: RASDepth, - BTBEntries: BTBEntries, - BHTEntries: BHTEntries, - // idempotent region - NrNonIdempotentRules: NrNonIdempotentRules, - NonIdempotentAddrBase: NonIdempotentAddrBase, - NonIdempotentLength: NonIdempotentLength, - NrExecuteRegionRules: NrExecuteRegionRules, - ExecuteRegionAddrBase: ExecuteRegionAddrBase, - ExecuteRegionLength: ExecuteRegionLength, - // cached region - NrCachedRegionRules: NrCachedRegionRules, - CachedRegionAddrBase: CachedRegionAddrBase, - CachedRegionLength: CachedRegionLength, - // cache config - AxiCompliant: 1'b0, - SwapEndianess: SwapEndianess, - // debug - DmBaseAddress: DmBaseAddress, - NrPMPEntries: NrPMPEntries - }; - ariane #( - .ArianeCfg ( ArianeOpenPitonCfg ), - .noc_req_t ( wt_cache_pkg::l15_req_t ), - .noc_resp_t ( wt_cache_pkg::l15_rtrn_t ) + .CVA6Cfg ( cva6_cfg ), + .noc_req_t ( l15_req_t ), + .noc_resp_t ( l15_rtrn_t ) ) ariane ( .clk_i ( clk_i ), .rst_ni ( spc_grst_l ), diff --git a/corev_apu/openpiton/bootrom/linux/src/spi.c b/corev_apu/openpiton/bootrom/linux/src/spi.c index c574f59cf65..fa5b53f4163 100644 --- a/corev_apu/openpiton/bootrom/linux/src/spi.c +++ b/corev_apu/openpiton/bootrom/linux/src/spi.c @@ -115,7 +115,7 @@ int spi_write_bytes(uint8_t *bytes, uint32_t len, uint8_t *ret) for (int i = 0; i < len;) { status = read_reg(SPI_STATUS_REG); - if ((status & 0x1) != 0x1) // recieve fifo not empty + if ((status & 0x1) != 0x1) // receive fifo not empty { ret[i++] = read_reg(SPI_RECEIVE_REG); } diff --git a/corev_apu/src/ariane.sv b/corev_apu/src/ariane.sv index 866c6d63693..272b7f35160 100644 --- a/corev_apu/src/ariane.sv +++ b/corev_apu/src/ariane.sv @@ -12,16 +12,18 @@ // Date: 19.03.2017 // Description: Ariane Top-level module +`include "rvfi_types.svh" `include "cvxif_types.svh" module ariane import ariane_pkg::*; #( parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty, - parameter type rvfi_probes_instr_t = logic, - parameter type rvfi_probes_csr_t = logic, + parameter type rvfi_probes_instr_t = `RVFI_PROBES_INSTR_T(CVA6Cfg), + parameter type rvfi_probes_csr_t = `RVFI_PROBES_CSR_T(CVA6Cfg), parameter type rvfi_probes_t = struct packed { logic csr; - logic instr; + rvfi_probes_instr_t instr; }, + // CVXIF Types localparam type readregflags_t = `READREGFLAGS_T(CVA6Cfg), localparam type writeregflags_t = `WRITEREGFLAGS_T(CVA6Cfg), @@ -29,12 +31,12 @@ module ariane import ariane_pkg::*; #( localparam type hartid_t = `HARTID_T(CVA6Cfg), localparam type x_compressed_req_t = `X_COMPRESSED_REQ_T(CVA6Cfg, hartid_t), localparam type x_compressed_resp_t = `X_COMPRESSED_RESP_T(CVA6Cfg), - localparam type x_issue_req_t = `X_ISSUE_REQ_T(CVA6Cfg, hartit_t, id_t), + localparam type x_issue_req_t = `X_ISSUE_REQ_T(CVA6Cfg, hartid_t, id_t), localparam type x_issue_resp_t = `X_ISSUE_RESP_T(CVA6Cfg, writeregflags_t, readregflags_t), localparam type x_register_t = `X_REGISTER_T(CVA6Cfg, hartid_t, id_t, readregflags_t), localparam type x_commit_t = `X_COMMIT_T(CVA6Cfg, hartid_t, id_t), localparam type x_result_t = `X_RESULT_T(CVA6Cfg, hartid_t, id_t, writeregflags_t), - localparam type cvxif_req_t = `CVXIF_REQ_T(CVA6Cfg, x_compressed_req_t, x_issue_req_t, x_register_req_t, x_commit_t), + localparam type cvxif_req_t = `CVXIF_REQ_T(CVA6Cfg, x_compressed_req_t, x_issue_req_t, x_register_t, x_commit_t), localparam type cvxif_resp_t = `CVXIF_RESP_T(CVA6Cfg, x_compressed_resp_t, x_issue_resp_t, x_result_t), // AXI Types parameter int unsigned AxiAddrWidth = ariane_axi::AddrWidth, @@ -108,38 +110,36 @@ module ariane import ariane_pkg::*; #( .noc_resp_i ( noc_resp_i ) ); - if (CVA6Cfg.CvxifEn) begin : gen_example_coprocessor - cvxif_example_coprocessor #( - .NrRgprPorts (CVA6Cfg.NrRgprPorts), - .XLEN (CVA6Cfg.XLEN), - .readregflags_t (readregflags_t), - .writeregflags_t (writeregflags_t), - .id_t (id_t), - .hartid_t (hartid_t), - .x_compressed_req_t (x_compressed_req_t), - .x_compressed_resp_t (x_compressed_resp_t), - .x_issue_req_t (x_issue_req_t), - .x_issue_resp_t (x_issue_resp_t), - .x_register_t (x_register_t), - .x_commit_t (x_commit_t), - .x_result_t (x_result_t), - .cvxif_req_t (cvxif_req_t), - .cvxif_resp_t (cvxif_resp_t) - ) i_cvxif_coprocessor ( - .clk_i ( clk_i ), - .rst_ni ( rst_ni ), - .cvxif_req_i ( cvxif_req ), - .cvxif_resp_o ( cvxif_resp ) - ); - end else begin - always_comb begin - cvxif_resp = '0; - cvxif_resp.compressed_ready = 1'b1; - cvxif_resp.issue_ready = 1'b1; - cvxif_resp.register_ready = 1'b1; + if (CVA6Cfg.CvxifEn) begin: gen_cvxif + if (CVA6Cfg.CoproType == config_pkg::COPRO_EXAMPLE) begin: gen_COPRO_EXAMPLE + cvxif_example_coprocessor #( + .NrRgprPorts (CVA6Cfg.NrRgprPorts), + .XLEN (CVA6Cfg.XLEN), + .readregflags_t (readregflags_t), + .writeregflags_t (writeregflags_t), + .id_t (id_t), + .hartid_t (hartid_t), + .x_compressed_req_t (x_compressed_req_t), + .x_compressed_resp_t (x_compressed_resp_t), + .x_issue_req_t (x_issue_req_t), + .x_issue_resp_t (x_issue_resp_t), + .x_register_t (x_register_t), + .x_commit_t (x_commit_t), + .x_result_t (x_result_t), + .cvxif_req_t (cvxif_req_t), + .cvxif_resp_t (cvxif_resp_t) + ) i_cvxif_coprocessor ( + .clk_i ( clk_i ), + .rst_ni ( rst_ni ), + .cvxif_req_i ( cvxif_req ), + .cvxif_resp_o ( cvxif_resp ) + ); + end else begin: gen_COPRO_NONE + assign cvxif_resp = '{compressed_ready: 1'b1, issue_ready: 1'b1, register_ready: 1'b1, default: '0}; end + end else begin: gen_no_cvxif + assign cvxif_resp = '0; end - endmodule // ariane diff --git a/corev_apu/src/axi_riscv_atomics b/corev_apu/src/axi_riscv_atomics deleted file mode 160000 index 550881f12e2..00000000000 --- a/corev_apu/src/axi_riscv_atomics +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 550881f12e22dfae405612fc1df6368f4c003e68 diff --git a/corev_apu/tb/ariane_gate_tb.sv b/corev_apu/tb/ariane_gate_tb.sv index 958a56fc143..d0774432962 100644 --- a/corev_apu/tb/ariane_gate_tb.sv +++ b/corev_apu/tb/ariane_gate_tb.sv @@ -24,10 +24,13 @@ import uvm_pkg::*; `timescale 1ns/1ns +`ifndef READ_ELF_T +`define READ_ELF_T import "DPI-C" function void read_elf(input string filename); import "DPI-C" function byte get_section(output longint address, output longint len); import "DPI-C" context function void read_section_sv(input longint address, inout byte buffer[]); import "DPI-C" function string getenv(input string env_name); +`endif module ariane_gate_tb; diff --git a/corev_apu/tb/ariane_soc_pkg.sv b/corev_apu/tb/ariane_soc_pkg.sv index d20b6a6b8bd..7785485310e 100644 --- a/corev_apu/tb/ariane_soc_pkg.sv +++ b/corev_apu/tb/ariane_soc_pkg.sv @@ -29,12 +29,12 @@ package ariane_soc; PLIC = 6, CLINT = 7, ROM = 8, - Debug = 9 + Debug = 9, + HPS = 10 } axi_slaves_t; localparam NB_PERIPHERALS = Debug + 1; - localparam logic[63:0] DebugLength = 64'h1000; localparam logic[63:0] ROMLength = 64'h10000; localparam logic[63:0] CLINTLength = 64'hC0000; @@ -44,6 +44,7 @@ package ariane_soc; localparam logic[63:0] SPILength = 64'h800000; localparam logic[63:0] EthernetLength = 64'h10000; localparam logic[63:0] GPIOLength = 64'h1000; + localparam logic[63:0] HPSLength = 64'h800000; `ifdef NEXYS_VIDEO localparam logic[63:0] DRAMLength = 64'h20000000; // 512MByte of DDR on Nexys video board `else @@ -63,7 +64,8 @@ package ariane_soc; SPIBase = 64'h2000_0000, EthernetBase = 64'h3000_0000, GPIOBase = 64'h4000_0000, - DRAMBase = 64'h8000_0000 + DRAMBase = 64'h8000_0000, + HPSBase = 64'hFF80_0000 } soc_bus_start_t; localparam NrRegion = 1; diff --git a/corev_apu/tb/ariane_tb.cpp b/corev_apu/tb/ariane_tb.cpp index 8de0c5b20fb..3653eaa5164 100644 --- a/corev_apu/tb/ariane_tb.cpp +++ b/corev_apu/tb/ariane_tb.cpp @@ -120,7 +120,7 @@ class preload_aware_dtm_t : public dtm_t { preload_aware_dtm_t(int argc, char **argv) : dtm_t(argc, argv) {} bool is_address_preloaded(addr_t taddr, size_t len) override { return true; } // We do not want to reset the hart here as the reset function in `dtm_t` seems to disregard - // the privilege level and in general does not perform propper reset (despite the name). + // the privilege level and in general does not perform proper reset (despite the name). // As all our binaries in preloading will always start at the base of DRAM this should not // be such a big problem. void reset() {} @@ -351,7 +351,7 @@ int main(int argc, char **argv) { try { read_section_void(addr, (void *) MEM_USER , mem_size); } catch (...){ - std::cerr << "No user memory instanciated ...\n"; + std::cerr << "No user memory instantiated ...\n"; } } diff --git a/corev_apu/tb/ariane_testharness.sv b/corev_apu/tb/ariane_testharness.sv index 1df11e75782..6e1d7a283cd 100644 --- a/corev_apu/tb/ariane_testharness.sv +++ b/corev_apu/tb/ariane_testharness.sv @@ -15,6 +15,7 @@ `include "axi/assign.svh" `include "rvfi_types.svh" +`include "iti_types.svh" `ifdef VERILATOR `include "custom_uvm_macros.svh" @@ -46,6 +47,8 @@ module ariane_testharness #( localparam type rvfi_instr_t = `RVFI_INSTR_T(CVA6Cfg); localparam type rvfi_csr_elmt_t = `RVFI_CSR_ELMT_T(CVA6Cfg); localparam type rvfi_csr_t = `RVFI_CSR_T(CVA6Cfg, rvfi_csr_elmt_t); + localparam type rvfi_to_iti_t = `RVFI_TO_ITI_T(CVA6Cfg); + localparam type iti_to_encoder_t = `ITI_TO_ENCODER_T(CVA6Cfg); // RVFI PROBES localparam type rvfi_probes_instr_t = `RVFI_PROBES_INSTR_T(CVA6Cfg); @@ -130,7 +133,7 @@ module ariane_testharness #( initial begin if (!$value$plusargs("jtag_rbb_enable=%b", jtag_enable)) jtag_enable = 'h0; if ($test$plusargs("debug_disable")) debug_enable = 'h0; else debug_enable = 'h1; - if (CVA6Cfg.XLEN != 32 & CVA6Cfg.XLEN != 64) $error("CVA6Cfg.XLEN different from 32 and 64"); + if (!CVA6Cfg.IS_XLEN32 & !CVA6Cfg.IS_XLEN64) $error("CVA6Cfg.XLEN different from 32 and 64"); end // debug if MUX @@ -625,6 +628,8 @@ module ariane_testharness #( rvfi_probes_t rvfi_probes; rvfi_csr_t rvfi_csr; rvfi_instr_t [CVA6Cfg.NrCommitPorts-1:0] rvfi_instr; + rvfi_to_iti_t rvfi_to_iti; + iti_to_encoder_t iti_to_encoder; ariane #( .CVA6Cfg ( CVA6Cfg ), @@ -672,7 +677,117 @@ module ariane_testharness #( end end + cva6_iti #( + .CVA6Cfg (CVA6Cfg), + .CAUSE_LEN (iti_pkg::CAUSE_LEN), + .ITYPE_LEN (iti_pkg::ITYPE_LEN), + .IRETIRE_LEN (iti_pkg::IRETIRE_LEN), + .block_mode(0), + .rvfi_to_iti_t(rvfi_to_iti_t), + .iti_to_encoder_t(iti_to_encoder_t) + ) i_cva6_iti ( + .clk_i (clk_i), + .rst_ni (ndmreset_n), + // inputs from rvfi + .valid_i(rvfi_to_iti.valid), + .rvfi_to_iti_i(rvfi_to_iti), + .valid_o(), + .iti_to_encoder_o(iti_to_encoder) + ); + + logic packet_valid; + te_pkg::it_packet_type_e [0:0] packet_type; + logic [te_pkg::P_LEN-1:0] packet_length; + logic [te_pkg::PAYLOAD_LEN-1:0] packet_payload; + + rv_tracer #( + .N(1), + .ONLY_BRANCHES(1) + ) i_encoder( + .clk_i (clk_i), + .rst_ni (rst_ni), + .valid_i (iti_to_encoder.valid), + .itype_i (iti_to_encoder.itype), + .cause_i (iti_to_encoder.cause), + .tval_i (iti_to_encoder.tval), + .priv_i (iti_to_encoder.priv), + .iaddr_i (iti_to_encoder.iaddr), + .iretire_i (iti_to_encoder.iretire), + .ilastsize_i (iti_to_encoder.ilastsize), + .time_i (iti_to_encoder.cycles), + .tvec_i ('0), + .epc_i ('0), + .encapsulator_ready_i('1), + .paddr_i ('0), + .pwrite_i ('0), + .psel_i ('0), + .penable_i ('0), + .pwdata_i ('0), + .packet_valid_o (packet_valid), + .packet_type_o (packet_type), + .packet_length_o (packet_length), + .packet_payload_o (packet_payload), + .stall_o (), + .pready_o (), + .prdata_o () + ); + logic encap_valid; + encap_pkg::encap_fifo_entry_s encap_fifo_entry_i; + encap_pkg::encap_fifo_entry_s encap_fifo_entry_o; + logic encap_fifo_full; + logic encap_fifo_empty; + logic encap_fifo_pop; + + encapsulator i_encapsulator ( + .clk_i (clk_i), + .valid_i (packet_valid), + .packet_length_i (packet_length), + .flow_i ('0), + .timestamp_present_i('1), + //.srcid_i(), + .timestamp_i (rvfi_to_iti.cycles), + //.type_i(), + .trace_payload_i (packet_payload), + .valid_o (encap_valid), + .encap_fifo_entry_o (encap_fifo_entry_i) + ); + + fifo_v3 # ( + .DEPTH(16), + .dtype(encap_pkg::encap_fifo_entry_s) + ) i_fifo_encap ( + .clk_i (clk_i), + .rst_ni (rst_ni), + .flush_i ('0), + .testmode_i('0), + .full_o (encap_fifo_full), + .empty_o (encap_fifo_empty), + .usage_o (), + .data_i (encap_fifo_entry_i), + .push_i (encap_valid), + .data_o (encap_fifo_entry_o), + .pop_i (encap_fifo_pop) + ); + localparam DATA_LEN = 8; + + logic slicer_valid; + logic [DATA_LEN-1:0] slice; + logic [$clog2(DATA_LEN)-4:0] valid_bytes; + + slicer_DPTI #( + .SLICE_LEN(DATA_LEN), + .NO_TIME ('0) + ) i_slicer ( + .clk_i (clk_i), + .rst_ni (rst_ni), + .valid_i (!encap_fifo_empty), + .encap_fifo_entry_i(encap_fifo_entry_o), + .fifo_full_i ('0), // usrFull DPTI in ariane_xilinx + .valid_o (slicer_valid), + .slice_o (slice), + .done_o (encap_fifo_pop) + ); cva6_rvfi #( .CVA6Cfg (CVA6Cfg), @@ -680,13 +795,15 @@ module ariane_testharness #( .rvfi_csr_t(rvfi_csr_t), .rvfi_probes_instr_t(rvfi_probes_instr_t), .rvfi_probes_csr_t(rvfi_probes_csr_t), - .rvfi_probes_t(rvfi_probes_t) + .rvfi_probes_t(rvfi_probes_t), + .rvfi_to_iti_t(rvfi_to_iti_t) ) i_cva6_rvfi ( - .clk_i (clk_i), - .rst_ni (rst_ni), + .clk_i (clk_i), + .rst_ni (rst_ni), .rvfi_probes_i(rvfi_probes), - .rvfi_instr_o(rvfi_instr), - .rvfi_csr_o(rvfi_csr) + .rvfi_instr_o (rvfi_instr), + .rvfi_to_iti_o (rvfi_to_iti), + .rvfi_csr_o (rvfi_csr) ); rvfi_tracer #( diff --git a/corev_apu/tb/common/mock_uart.sv b/corev_apu/tb/common/mock_uart.sv index 0124ea714ef..839b41f0e15 100644 --- a/corev_apu/tb/common/mock_uart.sv +++ b/corev_apu/tb/common/mock_uart.sv @@ -10,7 +10,7 @@ // // Author: Florian Zaruba, ETH Zurich // Date: 28/09/2018 -// Description: Mock replacement for UART in testbench (not synthesiesable!) +// Description: Mock replacement for UART in testbench (not synthesizable!) module mock_uart ( input logic clk_i, diff --git a/corev_apu/tb/common/tb_amoport.sv b/corev_apu/tb/common/tb_amoport.sv index 18a59636ffe..604f211fc9f 100644 --- a/corev_apu/tb/common/tb_amoport.sv +++ b/corev_apu/tb/common/tb_amoport.sv @@ -88,7 +88,7 @@ program tb_amoport import ariane_pkg::*; import tb_pkg::*; #( else size = 'h2; - // For LRs/SCs, choose from only 4 adresses, + // For LRs/SCs, choose from only 4 addresses, // so that valid LR/SC combinations become more likely. // Note: AMOs to address 0 are not supported in axi_riscv_atomics module // so we start at 8 (for alignment purposes) @@ -97,7 +97,7 @@ program tb_amoport import ariane_pkg::*; import tb_pkg::*; #( else void'(randomize(paddr) with {paddr >= 8; paddr < (MemWords<<$clog2(CVA6Cfg.XLEN/8));}); - // Align adress + // Align address if (size == 2) paddr[1:0] = '0; else diff --git a/corev_apu/tb/common/tb_dcache_pkg.sv b/corev_apu/tb/common/tb_dcache_pkg.sv index 7584d81a868..0597824453b 100644 --- a/corev_apu/tb/common/tb_dcache_pkg.sv +++ b/corev_apu/tb/common/tb_dcache_pkg.sv @@ -31,7 +31,7 @@ package tb_pkg; time CLK_LO = 5ns; // set clock low time time CLK_PERIOD = CLK_HI+CLK_LO; time APPL_DEL = 2ns; // set stimuli application delay - time ACQ_DEL = 8ns; // set response aquisition delay + time ACQ_DEL = 8ns; // set response acquisition delay parameter ERROR_CNT_STOP_LEVEL = 1; // use 1 for debugging. 0 runs the complete simulation... diff --git a/corev_apu/tb/common/tb_writeport.sv b/corev_apu/tb/common/tb_writeport.sv index 46cb3628759..82cc10bbee1 100644 --- a/corev_apu/tb/common/tb_writeport.sv +++ b/corev_apu/tb/common/tb_writeport.sv @@ -152,7 +152,7 @@ program tb_writeport import tb_pkg::*; import ariane_pkg::*; #( dut_req_port_o.data_wdata = 'x; endtask : genSeqWrite - // Repeadedly write to the same address + // Repeatedly write to the same address task automatic genConstWrite(); automatic logic [CVA6Cfg.XLEN-1:0] val; paddr = CachedAddrBeg; diff --git a/corev_apu/tb/dpi/elfloader.cc b/corev_apu/tb/dpi/elfloader.cc index f137015a5e0..8cdf6a4cbc8 100644 --- a/corev_apu/tb/dpi/elfloader.cc +++ b/corev_apu/tb/dpi/elfloader.cc @@ -50,7 +50,7 @@ extern "C" char get_section (long long* address, long long* len) { } extern "C" void read_section (long long address, const svOpenArrayHandle buffer) { - // get actual poitner + // get actual pointer void* buf = svGetArrayPtr(buffer); // check that the address points to a section assert(mems.count(address) > 0); diff --git a/corev_apu/tb/rvfi_tracer.sv b/corev_apu/tb/rvfi_tracer.sv index 13d7183fa6c..1fdd099f25b 100644 --- a/corev_apu/tb/rvfi_tracer.sv +++ b/corev_apu/tb/rvfi_tracer.sv @@ -69,6 +69,39 @@ module rvfi_tracer #( logic[31:0] end_of_test_q; logic[31:0] end_of_test_d; + function automatic logic fp_instr_writes_gpr(logic [31:0] insn); + logic [6:0] opcode; + logic [4:0] funct5; + logic [2:0] rm; + + opcode = insn[6:0]; + funct5 = insn[31:27]; + rm = insn[14:12]; + + if (opcode != riscv::OpcodeOpFp) begin + return 1'b0; + end + + if (funct5 == 5'b11000) begin + return 1'b1; + end + + if (funct5 == 5'b10100) begin + return 1'b1; + end + + if (funct5 == 5'b11100) begin + if ((rm == 3'b000) || (rm == 3'b001)) begin + return 1'b1; + end + if (CVA6Cfg.XF16ALT && ((rm == 3'b100) || (rm == 3'b101))) begin + return 1'b1; + end + end + + return 1'b0; + endfunction + assign end_of_test_o = end_of_test_d; always_ff @(posedge clk_i) begin @@ -77,6 +110,7 @@ module rvfi_tracer #( pc64 = {{CVA6Cfg.XLEN-CVA6Cfg.VLEN{rvfi_i[i].pc_rdata[CVA6Cfg.VLEN-1]}}, rvfi_i[i].pc_rdata}; // print the instruction information if the instruction is valid or a trap is taken if (rvfi_i[i].valid) begin + logic dest_is_fp; // Instruction information if (rvfi_i[i].intr[2]) begin $fwrite(f, "core INTERRUPT 0: 0x%h (0x%h) DASM(%h)\n", @@ -96,6 +130,7 @@ module rvfi_tracer #( end // Decode instruction to know if destination register is FP register. // Handle both uncompressed and compressed instructions. + dest_is_fp = 1'b0; if ( rvfi_i[i].insn[6:0] == 7'b1001111 || rvfi_i[i].insn[6:0] == 7'b1001011 || rvfi_i[i].insn[6:0] == 7'b1000111 || @@ -104,23 +139,31 @@ module rvfi_tracer #( (rvfi_i[i].insn[6:0] == 7'b1010011 && rvfi_i[i].insn[31:26] != 6'b111000 && rvfi_i[i].insn[31:26] != 6'b101000 && rvfi_i[i].insn[31:26] != 6'b110000) || - (rvfi_i[i].insn[0] == 1'b0 && ((rvfi_i[i].insn[15:13] == 3'b001 && CVA6Cfg.XLEN == 64) || - (rvfi_i[i].insn[15:13] == 3'b011 && CVA6Cfg.XLEN == 32) ))) begin + (rvfi_i[i].insn[0] == 1'b0 && ((rvfi_i[i].insn[15:13] == 3'b001 && CVA6Cfg.IS_XLEN64) || + (rvfi_i[i].insn[15:13] == 3'b011 && CVA6Cfg.IS_XLEN32) ))) begin + if (fp_instr_writes_gpr(rvfi_i[i].insn)) begin + dest_is_fp = 1'b0; + end else begin + dest_is_fp = 1'b1; + end + end + + if (dest_is_fp) begin $fwrite(f, " f%d 0x%h", rvfi_i[i].rd_addr, rvfi_i[i].rd_wdata); end else if (rvfi_i[i].rd_addr != 0) begin $fwrite(f, " x%d 0x%h", rvfi_i[i].rd_addr, rvfi_i[i].rd_wdata); if (rvfi_i[i].mem_rmask != 0) begin $fwrite(f, " mem 0x%h", rvfi_i[i].mem_addr); end - end else begin - if (rvfi_i[i].mem_wmask != 0) begin - $fwrite(f, " mem 0x%h 0x%h", rvfi_i[i].mem_addr, rvfi_i[i].mem_wdata); - if (TOHOST_ADDR != '0 && - rvfi_i[i].mem_paddr == TOHOST_ADDR && - rvfi_i[i].mem_wdata[0] == 1'b1) begin - end_of_test_q <= rvfi_i[i].mem_wdata[31:0]; - $display("*** [rvfi_tracer] INFO: Simulation terminated after %d cycles!\n", cycles); - end + end + // Handle memory writes (including for AMO instructions which have both rd and mem_wmask) + if (rvfi_i[i].mem_wmask != 0) begin + $fwrite(f, " mem 0x%h 0x%h", rvfi_i[i].mem_addr, rvfi_i[i].mem_wdata); + if (TOHOST_ADDR != '0 && + rvfi_i[i].mem_paddr == TOHOST_ADDR && + rvfi_i[i].mem_wdata[0] == 1'b1) begin + end_of_test_q <= rvfi_i[i].mem_wdata[31:0]; + $display("*** [rvfi_tracer] INFO: Simulation terminated after %d cycles!\n", cycles); end end $fwrite(f, "\n"); @@ -136,6 +179,11 @@ module rvfi_tracer #( 32'h6: cause = "ST_ADDR_MISALIGNED"; 32'h7: cause = "ST_ACCESS_FAULT"; 32'hb: cause = "ENV_CALL_MMODE"; + 32'h8: cause = "ENV_CALL_UMODE"; + 32'h9: cause = "ENV_CALL_SMODE"; + 32'hc: cause = "INSTR_PAGE_FAULT"; + 32'hd: cause = "LOAD_PAGE_FAULT"; + 32'hf: cause = "STORE_PAGE_FAULT"; endcase; if (rvfi_i[i].insn[1:0] != 2'b11) begin $fwrite(f, "%s exception @ 0x%h (0x%h)\n", cause, pc64, rvfi_i[i].insn[15:0]); @@ -159,12 +207,13 @@ module rvfi_tracer #( // Trace any custom signals // Define signals to be traced by adding them into debug and name arrays - string name[0:10]; - logic[63:0] debug[0:10], debug_previous[0:10]; + localparam int unsigned DEBUG_SIZE = 11; + string name [0:DEBUG_SIZE-1]; + logic [63:0] debug [0:DEBUG_SIZE-1], debug_previous [0:DEBUG_SIZE-1]; always_ff @(posedge clk_i) begin if (cycles > DEBUG_START && cycles < DEBUG_STOP) - for (int index = 0; index < 100; index++) + for (int index = 0; index < DEBUG_SIZE; index++) if (debug_previous[index] != debug[index]) $fwrite(f, "%d %s %x\n", cycles, name[index], debug[index]); debug_previous <= debug; diff --git a/corev_apu/tb/tb_cva6_icache/hdl/mem_emul.sv b/corev_apu/tb/tb_cva6_icache/hdl/mem_emul.sv index 994190e314a..300c8d1f8ea 100644 --- a/corev_apu/tb/tb_cva6_icache/hdl/mem_emul.sv +++ b/corev_apu/tb/tb_cva6_icache/hdl/mem_emul.sv @@ -151,7 +151,7 @@ module mem_emul import ariane_pkg::*; import wt_cache_pkg::*; #( infifo_data.rtype = ICACHE_INV_REQ; // since we do not keep a mirror tag table here, - // we allways invalidate all ways of the aliased index. + // we always invalidate all ways of the aliased index. // this is not entirely correct and will produce // too many invalidations infifo_data.inv.idx = rand_addr_q[CVA6Cfg.ICACHE_INDEX_WIDTH-1:0]; diff --git a/corev_apu/tb/tb_cva6_icache/hdl/tb_pkg.sv b/corev_apu/tb/tb_cva6_icache/hdl/tb_pkg.sv index ae461862ab8..488d4713a97 100644 --- a/corev_apu/tb/tb_cva6_icache/hdl/tb_pkg.sv +++ b/corev_apu/tb/tb_cva6_icache/hdl/tb_pkg.sv @@ -30,7 +30,7 @@ package tb_pkg; time CLK_HI = 5ns; // set clock high time time CLK_LO = 5ns; // set clock low time time APPL_DEL = 2ns; // set stimuli application delay - time ACQ_DEL = 8ns; // set response aquisition delay + time ACQ_DEL = 8ns; // set response acquisition delay parameter ERROR_CNT_STOP_LEVEL = 1; // use 1 for debugging. 0 runs the complete simulation... diff --git a/corev_apu/tb/tb_serdiv/hdl/tb.sv b/corev_apu/tb/tb_serdiv/hdl/tb.sv index a01a1bfe3bc..75903539461 100644 --- a/corev_apu/tb/tb_serdiv/hdl/tb.sv +++ b/corev_apu/tb/tb_serdiv/hdl/tb.sv @@ -188,7 +188,7 @@ module tb; $display("TB> response acquisition started"); /////////////////////////////////////////////// - // acquisiton and verification + // acquisition and verification /////////////////////////////////////////////// repeat(4) begin diff --git a/corev_apu/tb/tb_serdiv/hdl/tb_pkg.sv b/corev_apu/tb/tb_serdiv/hdl/tb_pkg.sv index 9767d472e27..15ff02e8196 100644 --- a/corev_apu/tb/tb_serdiv/hdl/tb_pkg.sv +++ b/corev_apu/tb/tb_serdiv/hdl/tb_pkg.sv @@ -33,7 +33,7 @@ package tb_pkg; time CLK_LO = 5ns; // set clock low time time CLK_PERIOD = CLK_HI+CLK_LO; time APPL_DEL = 2ns; // set stimuli application delay - time ACQ_DEL = 8ns; // set response aquisition delay + time ACQ_DEL = 8ns; // set response acquisition delay parameter ERROR_CNT_STOP_LEVEL = 1; // use 1 for debugging. 0 runs the complete simulation... diff --git a/corev_apu/tb/tb_wb_dcache/hdl/tb.sv b/corev_apu/tb/tb_wb_dcache/hdl/tb.sv index 37e992c220f..9cba78c7db5 100644 --- a/corev_apu/tb/tb_wb_dcache/hdl/tb.sv +++ b/corev_apu/tb/tb_wb_dcache/hdl/tb.sv @@ -318,7 +318,7 @@ module tb import ariane_pkg::*; import std_cache_pkg::*; import tb_pkg::*; #( amo_op_a_u = $unsigned(amo_shadow[31:0]); amo_op_b_u = $unsigned(amo_req_i.operand_b[31:0]); - // The result that is expected to be returned by AMO and evantually to be stored in rd. + // The result that is expected to be returned by AMO and eventually to be stored in rd. // For most AMOs, this is the previous memory content. // RISC-V spec requires: "For RV64, 32-bit AMOs always sign-extend the value placed in rd." amo_exp_result = amo_op_a; diff --git a/corev_apu/tb/tb_wb_dcache/tb.list b/corev_apu/tb/tb_wb_dcache/tb.list index d08c0adaef7..8e67d1e4c58 100644 --- a/corev_apu/tb/tb_wb_dcache/tb.list +++ b/corev_apu/tb/tb_wb_dcache/tb.list @@ -39,12 +39,12 @@ hdl/cv64a6_config_pkg.sv ../../../vendor/pulp-platform/common_cells/src/stream_demux.sv ../../../core/cache_subsystem/axi_adapter.sv ../../../common/local/util/sram.sv -../../src/axi_riscv_atomics/src/axi_res_tbl.sv -../../src/axi_riscv_atomics/src/axi_riscv_amos.sv -../../src/axi_riscv_atomics/src/axi_riscv_amos_alu.sv -../../src/axi_riscv_atomics/src/axi_riscv_lrsc.sv -../../src/axi_riscv_atomics/src/axi_riscv_atomics.sv -../../src/axi_riscv_atomics/src/axi_riscv_atomics_wrap.sv +../../../vendor/pulp-platform/axi_riscv_atomics/src/axi_res_tbl.sv +../../../vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_amos.sv +../../../vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_amos_alu.sv +../../../vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_lrsc.sv +../../../vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_atomics.sv +../../../vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_atomics_wrap.sv ../common/tb_dcache_pkg.sv ../common/tb_readport.sv diff --git a/corev_apu/tb/tb_wt_axi_dcache/hdl/tb.sv b/corev_apu/tb/tb_wt_axi_dcache/hdl/tb.sv index f3279f3439f..f47b77fa4e8 100644 --- a/corev_apu/tb/tb_wt_axi_dcache/hdl/tb.sv +++ b/corev_apu/tb/tb_wt_axi_dcache/hdl/tb.sv @@ -279,7 +279,7 @@ module tb import ariane_pkg::*; import wt_cache_pkg::*; import tb_pkg::*; #()(); amo_op_a_u = $unsigned(amo_shadow[31:0]); amo_op_b_u = $unsigned(amo_req_i.operand_b[31:0]); - // The result that is expected to be returned by AMO and evantually to be stored in rd. + // The result that is expected to be returned by AMO and eventually to be stored in rd. // For most AMOs, this is the previous memory content. // RISC-V spec requires: "For RV64, 32-bit AMOs always sign-extend the value placed in rd." amo_exp_result = amo_op_a; diff --git a/corev_apu/tb/tb_wt_axi_dcache/tb.list b/corev_apu/tb/tb_wt_axi_dcache/tb.list index 50a6df5c25d..5d951111f06 100644 --- a/corev_apu/tb/tb_wt_axi_dcache/tb.list +++ b/corev_apu/tb/tb_wt_axi_dcache/tb.list @@ -40,12 +40,12 @@ ../../src/tech_cells_generic/src/rtl/tc_sram.sv ../../../common/local/util/tc_sram_wrapper.sv ../../../common/local/util/sram.sv -../../src/axi_riscv_atomics/src/axi_res_tbl.sv -../../src/axi_riscv_atomics/src/axi_riscv_amos.sv -../../src/axi_riscv_atomics/src/axi_riscv_amos_alu.sv -../../src/axi_riscv_atomics/src/axi_riscv_lrsc.sv -../../src/axi_riscv_atomics/src/axi_riscv_atomics.sv -../../src/axi_riscv_atomics/src/axi_riscv_atomics_wrap.sv +../../../vendor/pulp-platform/axi_riscv_atomics/src/axi_res_tbl.sv +../../../vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_amos.sv +../../../vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_amos_alu.sv +../../../vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_lrsc.sv +../../../vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_atomics.sv +../../../vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_atomics_wrap.sv ../common/tb_dcache_pkg.sv ../common/tb_readport.sv diff --git a/corev_apu/tb/tb_wt_dcache/hdl/tb_mem.sv b/corev_apu/tb/tb_wt_dcache/hdl/tb_mem.sv index f7094bcc7c5..92f4c7cc608 100644 --- a/corev_apu/tb/tb_wt_dcache/hdl/tb_mem.sv +++ b/corev_apu/tb/tb_wt_dcache/hdl/tb_mem.sv @@ -159,7 +159,7 @@ module tb_mem import tb_pkg::*; import ariane_pkg::*; import wt_cache_pkg::*;#( rand_addr_q <= lval<<3; // with the current TB setup, we cannot invalidate a memory location if a write response to the same address is - // in flight, since this could lead to an incosistent state between the real memory and the shadow memory view. + // in flight, since this could lead to an inconsistent state between the real memory and the shadow memory view. // the workaround is not to overwrite shadow memory regions that are still pending in the write buffer // this can be improved. for(int k=0; k<8; k++) begin @@ -205,7 +205,7 @@ module tb_mem import tb_pkg::*; import ariane_pkg::*; import wt_cache_pkg::*;#( infifo_data.rtype = DCACHE_INV_REQ; // since we do not keep a mirror tag table here, - // we allways invalidate all ways of the aliased index. + // we always invalidate all ways of the aliased index. // this is not entirely correct and will produce // too many invalidations infifo_data.inv.idx = rand_addr_q[CVA6Cfg.DCACHE_INDEX_WIDTH-1:0]; diff --git a/docs/01_cva6_user/AXI_Interface.rst b/docs/01_cva6_user/AXI_Interface.rst index 09c8f51a30f..b7a9fa5f5cd 100644 --- a/docs/01_cva6_user/AXI_Interface.rst +++ b/docs/01_cva6_user/AXI_Interface.rst @@ -15,7 +15,7 @@ Introduction ------------ In this chapter, we describe in detail the restriction that apply to the supported features. -In order to understand how the AXI memory interface behaves in CVA6, it is necessary to read the AMBA AXI and ACE Protocol Specification (https://developer.arm.com/documentation/ihi0022/hc) and this chapter. +In order to understand how the AXI memory interface behaves in CVA6, it is necessary to read the AXI and ACE Protocol Specification (https://developer.arm.com/documentation/ihi0022/hc) and this chapter. *Applicability of this chapter to configurations:* @@ -30,7 +30,7 @@ In order to understand how the AXI memory interface behaves in CVA6, it is neces About the AXI4 protocol ~~~~~~~~~~~~~~~~~~~~~~~ -The AMBA AXI protocol supports high-performance, high-frequency system designs for communication between Manager and Subordinate components. +The AXI protocol supports high-performance, high-frequency system designs for communication between Manager and Subordinate components. The AXI protocol features are: @@ -59,7 +59,7 @@ AXI4 and CVA6 The AXI bus protocol is used with the CVA6 processor as a memory interface. Since the processor is the one that initiates the connection with the memory, it will have a manager interface to send requests to the subordinate, which will be the memory. -Features supported by CVA6 are the ones in the AMBA AXI4 specification and the Atomic Operation feature from AXI5. With restriction that apply to some features. +Features supported by CVA6 are the ones in the AXI4 specification and the Atomic Operation feature from AXI5. With restriction that apply to some features. This doesn’t mean that all the full set of signals available on an AXI interface are supported by the CVA6. Nevertheless, all required AXI signals are implemented. @@ -510,7 +510,7 @@ for each 8 bits of the write data bus, therefore ``WSTRB[n]`` corresponds to ``W *The size of transactions performed by cva6 is equal to the number of data byte lanes containing valid information.* *This means 1, 2, 4, ... or (AXI_DATA_WIDTH/8) byte lanes containing valid information.* -*CVA6 doesn't perform unaligned memory acces, therefore the WSTRB take only combination of aligned access* +*CVA6 doesn't perform unaligned memory access, therefore the WSTRB take only combination of aligned access* *If(RV32) WSTRB < 255 (Since AWSIZE lower than 3, so the data bus cannot have more than 4 valid byte lanes)* @@ -596,7 +596,7 @@ If the CVA6 requires ordering between transactions that have no ordering guarant Memory locations and Peripheral regions (Section A6.2) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The address map in AMBA is made up of Memory locations and Peripheral regions. But the AXI is associated to the memory interface of CVA6. +The address maps in some bus specifications can differentiate Memory locations and Peripheral regions. But the AXI is associated to the memory interface of CVA6. A Memory location has all of the following properties: @@ -640,7 +640,7 @@ An interface that exhibits Ordered Write Observation gives guarantees for write Atomic transactions (Section E1.1) ----------------------------------- -AMBA 5 introduces Atomic transactions, which perform more than just a single access and have an operation that is associated with the transaction. Atomic transactions enable sending the operation to the data, permitting the operation to be performed closer to where the data is located. Atomic transactions are suited to situations where the data is located a significant distance from the agent that must perform the operation. +AXI 5 introduces Atomic transactions, which perform more than just a single access and have an operation that is associated with the transaction. Atomic transactions enable sending the operation to the data, permitting the operation to be performed closer to where the data is located. Atomic transactions are suited to situations where the data is located a significant distance from the agent that must perform the operation. *If(RVA) AWATOP = 0 (If AMO instructions are not supported, CVA6 cannot perform Atomic transaction)* diff --git a/docs/01_cva6_user/CSR_Performance_Counters.rst b/docs/01_cva6_user/CSR_Performance_Counters.rst index 46455c74e22..1b55bc9a43f 100644 --- a/docs/01_cva6_user/CSR_Performance_Counters.rst +++ b/docs/01_cva6_user/CSR_Performance_Counters.rst @@ -97,7 +97,7 @@ Each of the six generic performance counters is able to monitor events from one Controlling the counters from software --------------------------------------- -All performance counters are enabled after reset. The ``mcountinhibit`` CSR at address ``0x320`` controls which of the performance counters increment as described in the RISC-V Privileged Specification, version 1.11 (see Machine Counter-Inhibit CSR, Section 3.1.12). For instance, bit 0 is set to 0 for ``mcycle(h)`` to increment as usual, bit 2 for ``minstrert(h)`` and bit X for event counter mhpmcounterX(h). +All performance counters are enabled after reset. The ``mcountinhibit`` CSR at address ``0x320`` controls which of the performance counters increment as described in the RISC-V Privileged Specification, version 1.11 (see Machine Counter-Inhibit CSR, Section 3.1.12). For instance, bit 0 is set to 0 for ``mcycle(h)`` to increment as usual, bit 2 for ``minstret(h)`` and bit X for event counter mhpmcounterX(h). The lower 32 bits of all counters can be accessed through the base register, whereas the upper 32 bits are accessed through the h-register. diff --git a/docs/01_cva6_user/CV32A6_Control_Status_Registers.rst b/docs/01_cva6_user/CV32A6_Control_Status_Registers.rst index f7f3805ff4b..374ed8156bb 100644 --- a/docs/01_cva6_user/CV32A6_Control_Status_Registers.rst +++ b/docs/01_cva6_user/CV32A6_Control_Status_Registers.rst @@ -24,7 +24,7 @@ access a CSR with a higher privilege level than the core is currently running in will throw an illegal instruction exception. This is largely a moot point for the CV32E40P as it only supports machine and debug modes. The remaining letters indicate the read and/or write behavior of the CSR when accessed by -the indicated or higher privilge level: +the indicated or higher privilege level: * **RW**: CSR is **read-write**. That is, CSR instructions (e.g. csrrw) may write any value and that value will be returned on a subsequent read (unless @@ -86,7 +86,7 @@ Register Summary "``pmpcfg2``", "0x3A2", "32", "RW", "0x00000000", "Physical Memory Protection Config 2" "``pmpcfg3``", "0x3A3", "32", "RW", "0x00000000", "Physical Memory Protection Config 3" "``pmpaddr[16]``", "0x3B0 [+ i*0x1]", "32", "RW", "0x00000000", "Physical Memory Protection Address" - "``icache``", "0x700", "32", "RW", "0x00000001", "Instuction Cache" + "``icache``", "0x700", "32", "RW", "0x00000001", "Instruction Cache" "``dcache``", "0x701", "32", "RW", "0x00000001", "Data Cache" "``tselect``", "0x7A0", "32", "RW", "0x00000000", "Trigger Select" "``tdata1``", "0x7A1", "32", "RW", "0x00000000", "Trigger Data 1" @@ -596,7 +596,7 @@ Supervisor Interrupt Pending (``sip``) :Supervisor-level Software Interrupt Pending (``SSIP``): SSIP is the interrupt-pending bit for supervisor-level software interrupts. -:``USIP``: A user-level software interrupt is triggered on the current hart by riting 1 to its user software interrupt-pending (USIP) bit +:``USIP``: A user-level software interrupt is triggered on the current hart by writing 1 to its user software interrupt-pending (USIP) bit Supervisor Address Translation and Protection (``satp``) @@ -878,7 +878,7 @@ Machine Interrupt Enable (``mie``) :S-mode Software Interrupt Enable (``SSIE``): Enables supervisor mode software interrupts. -:``USIE``: enable U-mode software interrrupts +:``USIE``: enable U-mode software interrupts Machine Trap Vector (``mtvec``) @@ -1255,7 +1255,7 @@ Physical Memory Protection Address (``pmpaddr[16]``) :Address (``address``): Encodes bits 33-2 of a 34-bit physical address. -Instuction Cache (``icache``) +Instruction Cache (``icache``) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Address Offset: 0x700 @@ -1432,7 +1432,7 @@ Debug Control and Status (``dcsr``) :Width (bits): 32 :Access Type: RW :Reset Value: 0x00000000 -:Description: Debug ontrol and status register. +:Description: Debug control and status register. .. csv-table:: :widths: auto @@ -1465,7 +1465,7 @@ Debug Control and Status (``dcsr``) "0b0000", "no_ext_debug", "There is no external debug support." "0b0100", "ext_debug_spec", "External debug support exists as it is described in the riscv-debug-release document." "0b1111", "ext_debug_no_spec", "There is external debug support, but it does not conform to any available version of the riscv-debug-release spec." -:Environment Breakpoint M-mode (``ebreakm``): Shows the behvior of the ``ebreak`` instruction in machine mode. +:Environment Breakpoint M-mode (``ebreakm``): Shows the behavior of the ``ebreak`` instruction in machine mode. .. csv-table:: The following table shows the bitfield encoding :widths: auto @@ -1474,7 +1474,7 @@ Debug Control and Status (``dcsr``) "0", "break_as_spec", "``ebreak`` instructions in M-mode behave as described in the Privileged Spec." "1", "break_to_debug", "``ebreak`` instructions in M-mode enter Debug Mode." -:Environment Breakpoint S-mode (``ebreaks``): Shows the behvior of the ``ebreak`` instruction in supervisor mode. +:Environment Breakpoint S-mode (``ebreaks``): Shows the behavior of the ``ebreak`` instruction in supervisor mode. .. csv-table:: The following table shows the bitfield encoding :widths: auto @@ -2303,7 +2303,7 @@ Machine Vendor ID (``mvendorid``) :Width (bits): 32 :Access Type: RO :Reset Value: 0x00000000 -:Description: This register provids the JEDEC manufacturer ID of the provider of the core. +:Description: This register provides the JEDEC manufacturer ID of the provider of the core. .. csv-table:: :widths: auto @@ -2315,7 +2315,7 @@ Machine Vendor ID (``mvendorid``) :Bank (``bank``): Contain encoding for number of one-byte continuation codes discarding the parity bit. -:Offset (``offset``): Contain encording for the final byte discarding the parity bit. +:Offset (``offset``): Contain encoding for the final byte discarding the parity bit. Machine Architecture ID (``marchid``) diff --git a/docs/01_cva6_user/CVX_Interface_Coprocessor.rst b/docs/01_cva6_user/CVX_Interface_Coprocessor.rst index ede928b0395..60c4e14efc2 100644 --- a/docs/01_cva6_user/CVX_Interface_Coprocessor.rst +++ b/docs/01_cva6_user/CVX_Interface_Coprocessor.rst @@ -1,203 +1,203 @@ -.. - Copyright (c) 2023 OpenHW Group - Copyright (c) 2023 Thales - - SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 - -.. Level 1 - ======= - - Level 2 - ------- - - Level 3 - ~~~~~~~ - - Level 4 - ^^^^^^^ - -.. _cva6_cvx_interface_coprocessor: - -CV-X-IF Interface and Coprocessor -================================= - -The CV-X-IF interface of CVA6 allows to extend its supported instruction set -with external coprocessors. - -*Applicability of this chapter to configurations:* - -.. csv-table:: - :widths: auto - :align: left - :header: "Configuration", "Implementation" - - "CV32A60AX", "CV-X-IF included" - "CV32A60X", "CV-X-IF included" - "CV64A6_MMU", "CV-X-IF included" - - -CV-X-IF interface specification -------------------------------- - -Description -~~~~~~~~~~~ -This design specification presents global functionalities of -Core-V-eXtension-Interface (XIF, CVXIF, CV-X-IF, X-interface) in the CVA6 core. - -.. code-block:: text - - The CORE-V X-Interface is a RISC-V eXtension interface that provides a - generalized framework suitable to implement custom coprocessors and ISA - extensions for existing RISC-V processors. - - --core-v-xif Readme, https://github.com/openhwgroup/core-v-xif - -The specification of the CV-X-IF bus protocol can be found at [CV-X-IF]. - -CV-X-IF aims to: - -* Create interfaces to connect a coprocessor to the CVA6 to execute instructions. -* Offload CVA6 illegal instrutions to the coprocessor to be executed. -* Get the results of offloaded instructions from the coprocessor so they are written back into the CVA6 register file. -* Add standard RISC-V instructions unsupported by CVA6 or custom instructions and implement them in a coprocessor. -* Kill offloaded instructions to allow speculative execution in the coprocessor. (Unsupported in CVA6 yet) -* Connect the coprocessor to memory via the CVA6 Load and Store Unit. (Unsupported in CVA6 yet) - -The coprocessor operates like another functional unit so it is connected to -the CVA6 in the execute stage. - -Only the 3 mandatory interfaces from the CV-X-IF specification (issue, commit and result -) have been implemented. -Compressed interface, Memory Interface and Memory result interface are not yet -implemented in the CVA6. - -Supported Parameters -~~~~~~~~~~~~~~~~~~~~ -The following table presents CVXIF parameters supported by CVA6. - -=============== =========================== =============================================== -Signal Value Description -=============== =========================== =============================================== -**X_NUM_RS** int: 2 or 3 (configurable) | Number of register file read ports that can - | be used by the eXtension interface -**X_ID_WIDTH** int: 3 | Identification width for the eXtension - | interface -**X_MEM_WIDTH** n/a (feature not supported) | Memory access width for loads/stores via the - | eXtension interface -**X_RFR_WIDTH** int: ``XLEN`` (32 or 64) | Register file read access width for the - | eXtension interface -**X_RFW_WIDTH** int: ``XLEN`` (32 or 64) | Register file write access width for the - | eXtension interface -**X_MISA** logic[31:0]: 0x0000_0000 | MISA extensions implemented on the eXtension - | interface -=============== =========================== =============================================== - -CV-X-IF Enabling -~~~~~~~~~~~~~~~~ -CV-X-IF can be enabled or disabled via the ``CVA6ConfigCvxifEn`` parameter in the SystemVerilog source code. - -Illegal instruction decoding -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The CVA6 decoder module detects illegal instructions for the CVA6, prepares exception field -with relevant information (exception code "ILLEGAL INSTRUCTION", instruction value). - -The exception valid flag is raised in CVA6 decoder when CV-X-IF is disabled. Otherwise -it is not raised at this stage because the decision belongs to the coprocessor -after the offload process. - -RS3 support -~~~~~~~~~~~ -The number of source registers used by the CV-X-IF coprocessor is configurable with 2 or -3 source registers. - -If CV-X-IF is enabled and configured with 3 source registers, -a third read port is added to the CVA6 general purpose register file. - -Description of interface connections between CVA6 and Coprocessor -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -In CVA6 execute stage, there is a new functional unit dedicated to drive the CV-X-IF interfaces. -Here is *how* and *to what* CV-X-IF interfaces are connected to the CVA6. - -* Issue interface - - Request - + | Operands are connected to ``issue_req.rs`` signals - + | Scoreboard transaction id is connected to ``issue_req.id`` signal. - | Therefore scoreboard ids and offloaded instruction ids are linked - | together (equal in this implementation). It allows the CVA6 to do out - | of order execution with the coprocessor in the same way as other - | functional units. - + | Undecoded instruction is connected to ``issue_req.instruction`` - + | Valid signal for CVXIF functional unit is connected to - | ``issue_req.valid`` - + | All ``issue_req.rs_valid`` signals are set to 1. The validity of source - | registers is assured by the validity of valid signal sent from issue stage. - - Response - + | If ``issue_resp.accept`` is set during a transaction (i.e. issue valid - | and ready are set), the offloaded instruction is accepted by the coprocessor - | and a result transaction will happen. - + | If ``issue_resp.accept`` is not set during a transaction, the offloaded - | instruction is illegal and an illegal instruction exception will be - | raised as soon as no result transaction are written on the writeback bus. - -* Commit interface - - | Valid signal of commit interface is connected to the valid signal of - | issue interface. - - | Id signal of commit interface is connected to issue interface id signal - | (i.e. scoreboard id). - - | Killing of offload instruction is never set. (Unsupported feature) - - | Therefore all accepted offloaded instructions are commited to their - | execution and no killing of instruction is possible in this implementation. - -* Result interface - - Request - + | Ready signal of result interface is always set as CVA6 is always ready - | to take a result from coprocessor for an accepted offloaded instruction. - - Response - + | Result response is directly connected to writeback bus of the CV-X-IF - | functionnal unit. - + | Valid signal of result interface is connected to valid signal of - | writeback bus. - + | Id signal of result interface is connected to scoreboard id of - | writeback bus. - + | Write enable signal of result interface is connected to a dedicated CV-X-IF WE - | signal in CVA6 which signals scoreboard if a writeback should happen - | or not to the CVA6 register file. - + | ``exccode`` and ``exc`` signal of result interface are connected to exception - | signals of writeback bus. Exception from coprocessor does not write - | the ``tval`` field in exception signal of writeback bus. - + | Three registers are added to hold illegal instruction information in - | case a result transaction and a non-accepted issue transaction happen - | in the same cycle. Result transactions will be written to the writeback - | bus in this case having priority over the non-accepted instruction due - | to being linked to an older offloaded instruction. Once the writeback - | bus is free, an illegal instruction exception will be raised thanks to - | information held in these three registers. - -Coprocessor recommendations for use with CVA6's CV-X-IF -------------------------------------------------------- - -CVA6 supports all coprocessors supporting the CV-X-IF specification with the exception of : - -* Coprocessor requiring the Memory interface and Memory result interface (not implemented in CVA6 yet). - - All memory transaction should happen via the Issue interface, i.e. Load into CVA6 register file - then initialize an issue transaction. -* Coprocessor requiring the Compressed interface (not implemented in CVA6 yet). - - RISC-V Compressed extension (RVC) is already implemented in CVA6. User Space for custom compressed instruction - is not big enough to have RVC and a custom compressed extension. -* Stateful coprocessors. - - CVA6 will commit on the Commit interface all its issue transactions. Speculation - informations are only kept in the CVA6 and speculation process is only done in CVA6. - The coprocessor shall be stateless otherwise it will not be able to revert its state if CVA6 kills an - in-flight instruction (in case of mispredict or flush). - -How to use CVA6 without CV-X-IF interface ------------------------------------------ -Select a configuration with ``CVA6ConfigCvxifEn`` parameter disabled or change it for your configuration. - -Never let the CV-X-IF interface unconnected with the ``CVA6ConfigCvxifEn`` parameter enabled. - -How to design a coprocessor for the CV-X-IF interface ------------------------------------------------------ +.. + Copyright (c) 2023 OpenHW Group + Copyright (c) 2023 Thales + + SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 + +.. Level 1 + ======= + + Level 2 + ------- + + Level 3 + ~~~~~~~ + + Level 4 + ^^^^^^^ + +.. _cva6_cvx_interface_coprocessor: + +CV-X-IF Interface and Coprocessor +================================= + +The CV-X-IF interface of CVA6 allows to extend its supported instruction set +with external coprocessors. + +*Applicability of this chapter to configurations:* + +.. csv-table:: + :widths: auto + :align: left + :header: "Configuration", "Implementation" + + "CV32A60AX", "CV-X-IF included" + "CV32A60X", "CV-X-IF included" + "CV64A6_MMU", "CV-X-IF included" + + +CV-X-IF interface specification +------------------------------- + +Description +~~~~~~~~~~~ +This design specification presents global functionalities of +Core-V-eXtension-Interface (XIF, CVXIF, CV-X-IF, X-interface) in the CVA6 core. + +.. code-block:: text + + The CORE-V X-Interface is a RISC-V eXtension interface that provides a + generalized framework suitable to implement custom coprocessors and ISA + extensions for existing RISC-V processors. + + --core-v-xif Readme, https://github.com/openhwgroup/core-v-xif + +The specification of the CV-X-IF bus protocol can be found at [CV-X-IF]. + +CV-X-IF aims to: + +* Create interfaces to connect a coprocessor to the CVA6 to execute instructions. +* Offload CVA6 illegal instructions to the coprocessor to be executed. +* Get the results of offloaded instructions from the coprocessor so they are written back into the CVA6 register file. +* Add standard RISC-V instructions unsupported by CVA6 or custom instructions and implement them in a coprocessor. +* Kill offloaded instructions to allow speculative execution in the coprocessor. (Unsupported in CVA6 yet) +* Connect the coprocessor to memory via the CVA6 Load and Store Unit. (Unsupported in CVA6 yet) + +The coprocessor operates like another functional unit so it is connected to +the CVA6 in the execute stage. + +Only the 3 mandatory interfaces from the CV-X-IF specification (issue, commit and result +) have been implemented. +Compressed interface, Memory Interface and Memory result interface are not yet +implemented in the CVA6. + +Supported Parameters +~~~~~~~~~~~~~~~~~~~~ +The following table presents CVXIF parameters supported by CVA6. + +=============== =========================== =============================================== +Signal Value Description +=============== =========================== =============================================== +**X_NUM_RS** int: 2 or 3 (configurable) | Number of register file read ports that can + | be used by the eXtension interface +**X_ID_WIDTH** int: 3 | Identification width for the eXtension + | interface +**X_MEM_WIDTH** n/a (feature not supported) | Memory access width for loads/stores via the + | eXtension interface +**X_RFR_WIDTH** int: ``XLEN`` (32 or 64) | Register file read access width for the + | eXtension interface +**X_RFW_WIDTH** int: ``XLEN`` (32 or 64) | Register file write access width for the + | eXtension interface +**X_MISA** logic[31:0]: 0x0000_0000 | MISA extensions implemented on the eXtension + | interface +=============== =========================== =============================================== + +CV-X-IF Enabling +~~~~~~~~~~~~~~~~ +CV-X-IF can be enabled or disabled via the ``CVA6ConfigCvxifEn`` parameter in the SystemVerilog source code. + +Illegal instruction decoding +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The CVA6 decoder module detects illegal instructions for the CVA6, prepares exception field +with relevant information (exception code "ILLEGAL INSTRUCTION", instruction value). + +The exception valid flag is raised in CVA6 decoder when CV-X-IF is disabled. Otherwise +it is not raised at this stage because the decision belongs to the coprocessor +after the offload process. + +RS3 support +~~~~~~~~~~~ +The number of source registers used by the CV-X-IF coprocessor is configurable with 2 or +3 source registers. + +If CV-X-IF is enabled and configured with 3 source registers, +a third read port is added to the CVA6 general purpose register file. + +Description of interface connections between CVA6 and Coprocessor +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +In CVA6 execute stage, there is a new functional unit dedicated to drive the CV-X-IF interfaces. +Here is *how* and *to what* CV-X-IF interfaces are connected to the CVA6. + +* Issue interface + - Request + + | Operands are connected to ``issue_req.rs`` signals + + | Scoreboard transaction id is connected to ``issue_req.id`` signal. + | Therefore scoreboard ids and offloaded instruction ids are linked + | together (equal in this implementation). It allows the CVA6 to do out + | of order execution with the coprocessor in the same way as other + | functional units. + + | Undecoded instruction is connected to ``issue_req.instruction`` + + | Valid signal for CVXIF functional unit is connected to + | ``issue_req.valid`` + + | All ``issue_req.rs_valid`` signals are set to 1. The validity of source + | registers is assured by the validity of valid signal sent from issue stage. + - Response + + | If ``issue_resp.accept`` is set during a transaction (i.e. issue valid + | and ready are set), the offloaded instruction is accepted by the coprocessor + | and a result transaction will happen. + + | If ``issue_resp.accept`` is not set during a transaction, the offloaded + | instruction is illegal and an illegal instruction exception will be + | raised as soon as no result transaction are written on the writeback bus. + +* Commit interface + - | Valid signal of commit interface is connected to the valid signal of + | issue interface. + - | Id signal of commit interface is connected to issue interface id signal + | (i.e. scoreboard id). + - | Killing of offload instruction is never set. (Unsupported feature) + - | Therefore all accepted offloaded instructions are commited to their + | execution and no killing of instruction is possible in this implementation. + +* Result interface + - Request + + | Ready signal of result interface is always set as CVA6 is always ready + | to take a result from coprocessor for an accepted offloaded instruction. + - Response + + | Result response is directly connected to writeback bus of the CV-X-IF + | functional unit. + + | Valid signal of result interface is connected to valid signal of + | writeback bus. + + | Id signal of result interface is connected to scoreboard id of + | writeback bus. + + | Write enable signal of result interface is connected to a dedicated CV-X-IF WE + | signal in CVA6 which signals scoreboard if a writeback should happen + | or not to the CVA6 register file. + + | ``exccode`` and ``exc`` signal of result interface are connected to exception + | signals of writeback bus. Exception from coprocessor does not write + | the ``tval`` field in exception signal of writeback bus. + + | Three registers are added to hold illegal instruction information in + | case a result transaction and a non-accepted issue transaction happen + | in the same cycle. Result transactions will be written to the writeback + | bus in this case having priority over the non-accepted instruction due + | to being linked to an older offloaded instruction. Once the writeback + | bus is free, an illegal instruction exception will be raised thanks to + | information held in these three registers. + +Coprocessor recommendations for use with CVA6's CV-X-IF +------------------------------------------------------- + +CVA6 supports all coprocessors supporting the CV-X-IF specification with the exception of : + +* Coprocessor requiring the Memory interface and Memory result interface (not implemented in CVA6 yet). + - All memory transaction should happen via the Issue interface, i.e. Load into CVA6 register file + then initialize an issue transaction. +* Coprocessor requiring the Compressed interface (not implemented in CVA6 yet). + - RISC-V Compressed extension (RVC) is already implemented in CVA6. User Space for custom compressed instruction + is not big enough to have RVC and a custom compressed extension. +* Stateful coprocessors. + - CVA6 will commit on the Commit interface all its issue transactions. Speculation + information is only kept in the CVA6 and speculation process is only done in CVA6. + The coprocessor shall be stateless otherwise it will not be able to revert its state if CVA6 kills an + in-flight instruction (in case of mispredict or flush). + +How to use CVA6 without CV-X-IF interface +----------------------------------------- +Select a configuration with ``CVA6ConfigCvxifEn`` parameter disabled or change it for your configuration. + +Never let the CV-X-IF interface unconnected with the ``CVA6ConfigCvxifEn`` parameter enabled. + +How to design a coprocessor for the CV-X-IF interface +----------------------------------------------------- We can add a custom coprocessor that implements custom instructions by modifying the example coprocessor in this repository. This section is structured as a tutorial to implement two instructions that manipulate binary-coded decimal numbers. @@ -420,7 +420,7 @@ For example, 123 in decimal = 0x7B in hexadecimal = 0x123 in binary-coded decima gtkwave verif/sim/out_*/veri-testharness_sim/cvxif_bcd.cv64a6_imafdc_sv39.vcd The signals in TOP.ariane_testharness.i_ariane.cvxif_req/resp should be useful. - -How to program a CV-X-IF coprocessor + +How to program a CV-X-IF coprocessor ------------------------------------ *The team is looking for a contributor to write this section.* diff --git a/docs/01_cva6_user/Introduction.rst b/docs/01_cva6_user/Introduction.rst index 2e39faea644..3bde759061a 100644 --- a/docs/01_cva6_user/Introduction.rst +++ b/docs/01_cva6_user/Introduction.rst @@ -40,7 +40,7 @@ The current limitation of documentation on CVA6 is well understood. Rather than regretting this, the reader is encouraged to contribute to it to make CVA6 an even better core. To contribute to the project, refer to the Contributing_ guidelines and get in touch with the team. -.. _Contributing: https://github.com/jquevremont/cva6/blob/master/CONTRIBUTING.md +.. _Contributing: https://github.com/openhwgroup/cva6/blob/master/CONTRIBUTING.md Target Audience --------------- @@ -49,7 +49,7 @@ The CVA6 user manual targets: * SW programmers * HW designers who integrate CVA6 into a SoC/ASIC/FPGA * Architects who design a coprocessor for the CV-X-IF interface and who need to create SW to use it -* HW designers who synthetize/place&route/verify a design that embeds CVA6 +* HW designers who synthesize/place&route/verify a design that embeds CVA6 * Verification engineers involved in the OpenHW Group’s CVA6 project who use this manual as a reference. The user guide does not target people who dig into CVA6 design. No internal mechanisms are described here, diff --git a/docs/01_cva6_user/Programmer_View.rst b/docs/01_cva6_user/Programmer_View.rst index cd67c3c7511..14ef0b4f27c 100644 --- a/docs/01_cva6_user/Programmer_View.rst +++ b/docs/01_cva6_user/Programmer_View.rst @@ -39,19 +39,21 @@ Some of them are optional and are enabled through parameters in the SystemVerilo :align: left :header: "Extension", "Optional", "RV32 (in CV32A6)", "RV64 (in CV64A6)", "Note" - "I- Base Integer Instruction Set", "No", "✔", "✔", "Note 1" - "A - Atomic Instructions", "Yes", "✔", "✔", "Note 1" - "Zb* - Bit-Manipulation", "Yes", "✔", "✔", "Note 1" - "C - Compressed Instructions ", "Yes", "✔", "✔", "Note 1" - "Zcb - Code Size Reduction", "Yes", "✔", "✔", "Note 1" - "Zcmp - Code Size Reduction", "Yes", "✔", "✔", "Note 1" - "D - Double precision floating-point", "Yes", "", "✔", "Note 1" - "F - Single precision floating-point", "Yes", "✔", "✔", "Note 1" - "M - Integer Multiply/Divide", "No", "✔", "✔", "Note 1" - "Zicount - Performance Counters", "Yes", "✔", "✔", "Note 2" - "Zicsr - Control and Status Register Instructions", "No", "✔", "✔", "Note 2" - "Zifencei - Instruction-Fetch Fence", "No", "✔", "✔", "Note 2" - "Zicond - Integer Conditional Operations(Ratification pending)", "Yes", "✔", "✔", "Note 2" + "I- Base Integer Instruction Set", "No", "✔", "✔", "Note 1" + "A - Atomic Instructions", "Yes", "✔", "✔", "Note 1" + "Zb* - Bit-Manipulation", "Yes", "✔", "✔", "Note 1" + "C - Compressed Instructions ", "Yes", "✔", "✔", "Note 1" + "Zcb - Code Size Reduction", "Yes", "✔", "✔", "Note 1" + "Zcmp - Code Size Reduction", "Yes", "✔", "✔", "Note 1" + "Zcmt - Code Size Reduction", "Yes", "✔", "✔", "Note 2" + "Zkn - NIST Algorithm Suite (comprised of Zbkb, Zbkc, Zbkx, Zkne, Zknd and Zknh)", "Yes", "✔", "✔", "Note 1" + "D - Double precision floating-point", "Yes", "", "✔", "Note 1" + "F - Single precision floating-point", "Yes", "✔", "✔", "Note 1" + "M - Integer Multiply/Divide", "No", "✔", "✔", "Note 1" + "Zicount - Performance Counters", "Yes", "✔", "✔", "Note 2" + "Zicsr - Control and Status Register Instructions", "No", "✔", "✔", "Note 2" + "Zifencei - Instruction-Fetch Fence", "No", "✔", "✔", "Note 2" + "Zicond - Integer Conditional Operations(Ratification pending)", "Yes", "✔", "✔", "Note 2" Notes: @@ -76,6 +78,8 @@ These extensions are available in CV32A60AX: "RV32C - Compressed Instructions ", "✔" "RV32Zcb - Code Size Reduction", "✔" "RVZcmp - Code Size Reduction", "" + "RVZcmt - Code Size Reduction", "" + "Zkn - NIST Algorithm Suite", "" "RV32D - Double precision floating-point", "" "RV32F - Single precision floating-point", "" "RV32M - Integer Multiply/Divide", "✔" @@ -100,6 +104,8 @@ These extensions are available in CV32A60X: "RV32C - Compressed Instructions ", "✔" "RV32Zcb - Code Size Reduction", "✔" "RVZcmp - Code Size Reduction", "✔" + "RVZcmt - Code Size Reduction", "" + "Zkn - NIST Algorithm Suite", "" "RV32D - Double precision floating-point", "" "RV32F - Single precision floating-point", "" "RV32M - Integer Multiply/Divide", "✔" @@ -124,6 +130,8 @@ These extensions are available in CV64A6_MMU: "RV32C - Compressed Instructions ", "✔" "RV32Zcb - Code Size Reduction", "✔" "RVZcmp - Code Size Reduction", "✔" + "RVZcmt - Code Size Reduction", "" + "Zkn - NIST Algorithm Suite", "" "RV32D - Double precision floating-point", "" "RV32F - Single precision floating-point", "" "RV32M - Integer Multiply/Divide", "✔" @@ -203,7 +211,7 @@ CVA6 family CV32A6 supports the RISC-V **Sv32** virtual memory when the ``MMUEn`` parameter is set to 1 (and ``Xlen`` is set to 32). -CV64A6 supports the RISC-V **Sv39** virtual memory when the ``MMUEn`` parameter is set to 1 (and ``Xlen`` is set to 64). +CV64A6 supports the RISC-V **Sv39** virtual memory when the ``MMUEn`` parameter is set to 1 (and ``Xlen`` is set to 64). Additionally, the **Svnapot** extension can be enabled with Sv39 when ``SvnapotEn`` parameter is set to 1. Within CV64A6, the hypervisor extension is available and supports **Sv39x4** virtual memory when the ``CVA6ConfigHExtEn`` parameter is set to 1 (and ``Xlen`` is set to 64). diff --git a/docs/01_cva6_user/RISCV_Instructions_RV32A.rst b/docs/01_cva6_user/RISCV_Instructions_RV32A.rst index 76b8bc434c1..c5cc06156ab 100644 --- a/docs/01_cva6_user/RISCV_Instructions_RV32A.rst +++ b/docs/01_cva6_user/RISCV_Instructions_RV32A.rst @@ -134,7 +134,7 @@ Atomic Memory Operations **Format**: amomin.d rd, rs2, (rs1) - **Description**: AMOMIN.W atomically loads a data value from the address in rs1, places the value into register rd, then choses the minimum between the loaded value and the original value in rs2, then stores the result back to the address in rs1. + **Description**: AMOMIN.W atomically loads a data value from the address in rs1, places the value into register rd, then chooses the minimum between the loaded value and the original value in rs2, then stores the result back to the address in rs1. **Pseudocode**: x[rd] = AMO32(M[x[rs1]] MIN x[rs2]) diff --git a/docs/01_cva6_user/RISCV_Instructions_RVZbb.rst b/docs/01_cva6_user/RISCV_Instructions_RVZbb.rst index 6981ce82bc0..a58cc862c45 100644 --- a/docs/01_cva6_user/RISCV_Instructions_RVZbb.rst +++ b/docs/01_cva6_user/RISCV_Instructions_RVZbb.rst @@ -205,7 +205,7 @@ RV64 specific instructions -Integer minumum/maximum +Integer minimum/maximum -------------------------- The integer minimum/maximum instructions are arithmetic R-type instructions that return the smaller/larger of two operands. diff --git a/docs/01_cva6_user/RISCV_Instructions_RVZbkc.rst b/docs/01_cva6_user/RISCV_Instructions_RVZbkc.rst new file mode 100644 index 00000000000..abaf205afc2 --- /dev/null +++ b/docs/01_cva6_user/RISCV_Instructions_RVZbkc.rst @@ -0,0 +1,87 @@ +.. + Copyright (c) 2023 OpenHW Group + Copyright (c) 2023 10xEngineers + Copyright (c) 2025 Thales + + SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 + +.. Level 1 + ======= + + Level 2 + ------- + + Level 3 + ~~~~~~~ + + Level 4 + ^^^^^^^ + +.. _cva6_riscv_instructions_RV32Zbkc: + +*Applicability of this chapter to configurations:* + +.. csv-table:: + :widths: auto + :align: left + :header: "Configuration", "Implementation" + + "CV32A60AX", "Implemented extension" + "CV32A60X", "Implemented extension" + "CV64A6_MMU", "Implemented extension" + + +================================================== +RVZbkc: Carry-less multiplication for Cryptography +================================================== +This extension is a subset of the Zbc extension. + +Carry-less multiplication is the multiplication in the polynomial ring over GF(2). + +clmul produces the lower half of the carry-less product and clmulh produces the upper half of the 2✕XLEN carry-less product. + +The following instructions (and pseudoinstructions) comprise the Zbkc extension: + ++-----------+-----------+-----------------------+ +| RV32 | RV64 | Mnemonic | ++===========+===========+=======================+ +| ✔ | ✔ | clmul rd, rs1, rs2 | ++-----------+-----------+-----------------------+ +| ✔ | ✔ | clmulh rd, rs1, rs2 | ++-----------+-----------+-----------------------+ + +RV32 and RV64 Instructions +-------------------------- + +- **CLMUL**: Carry-less multiply (low-part) + + **Format**: clmul rd, rs1, rs2 + + **Description**: clmul produces the lower half of the 2.XLEN carry-less product. + + **Pseudocode**: foreach (i from 1 to xlen by 1) { output = if ((rs2 >> i) & 1) then output ^ (rs1 << i); else output; } + + **Invalid values**: NONE + + **Exception raised**: NONE + +- **CLMULH**: Carry-less multiply (high-part) + + **Format**: clmulh rd, rs1, rs2 + + **Description**: clmulh produces the upper half of the 2.XLEN carry-less product. + + **Pseudocode**: foreach (i from 1 to xlen by 1) { output = if ((rs2_val >> i) & 1) then output ^ (rs1_val >> (xlen - i)) else output } + + **Invalid values**: NONE + + **Exception raised**: NONE + + + + + + + + + diff --git a/docs/01_cva6_user/RISCV_Instructions_RVZbkx.rst b/docs/01_cva6_user/RISCV_Instructions_RVZbkx.rst new file mode 100644 index 00000000000..1b6395f54d5 --- /dev/null +++ b/docs/01_cva6_user/RISCV_Instructions_RVZbkx.rst @@ -0,0 +1,93 @@ +.. Licensed under the Solderpad Hardware Licence, Version 2.1 (the "License"); +.. you may not use this file except in compliance with the License. +.. SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +.. You may obtain a copy of the License at https://solderpad.org/licenses/ + +.. Author: Munail Waqar, 10xEngineers +.. Date: 03.05.2025 +.. + Copyright (c) 2023 OpenHW Group + Copyright (c) 2023 10xEngineers + + SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 + +.. Level 1 + ======= + + Level 2 + ------- + + Level 3 + ~~~~~~~ + + Level 4 + ^^^^^^^ + +.. _cva6_riscv_instructions_RV32Zbkx: + +*Applicability of this chapter to configurations:* + +.. csv-table:: + :widths: auto + :align: left + :header: "Configuration", "Implementation" + + "CV32A60AX", "Implemented extension" + "CV64A6_MMU", "Implemented extension" + +============================= +RVZbkx: Crossbar permutation instructions +============================= + +The following instructions comprise the Zbkx extension: + +Xperm instructions +-------------------- +The xperm instructions perform permutation operations on a register. They use indices extracted from rs2 to select data chunks (bytes for xperm8 or nibbles for xperm4) from rs1. The selected data is then placed into the destination register (rd) at positions corresponding to the extracted indices in rs2. If an index in rs2 is out of range, the corresponding chunk in rd is set to 0. + ++-----------+-----------+-----------------------+ +| RV32 | RV64 | Mnemonic | ++===========+===========+=======================+ +| ✔ | ✔ | xperm8 rd, rs1, rs2 | ++-----------+-----------+-----------------------+ +| ✔ | ✔ | xperm4 rd, rs1, rs2 | ++-----------+-----------+-----------------------+ + + +RV32 and RV64 Instructions +~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +- **XPERM8**: Crossbar permutation (bytes) + + **Format**: xperm8 rd, rs1, rs2 + + **Description**: The xperm8 instruction operates on bytes. The rs1 register contains a vector of XLEN/8 8-bit elements. The rs2 register contains a vector of XLEN/8 8-bit indexes. The result is each element in rs2 replaced by the indexed element in rs1, or zero if the index into rs2 is out of bounds. + + **Pseudocode**: foreach (i from 0 to xlen by 8) { + if (rs2[i*8+:8]<(xlen/8)) + X(rd)[i*8+:8] = rs1[rs2[i*8+:8]*8+:8]; + else + X(rd)[i*8+:8] = 8'b0; + } + + **Invalid values**: NONE + + **Exception raised**: NONE + +- **XPERM4**: Crossbar permutation (nibbles) + + **Format**: xperm4 rd, rs1, rs2 + + **Description**: The xperm4 instruction operates on nibbles. The rs1 register contains a vector of XLEN/4 4-bit elements. The rs2 register contains a vector of XLEN/4 4-bit indexes. The result is each element in rs2 replaced by the indexed element in rs1, or zero if the index into rs2 is out of bounds. + + **Pseudocode**: foreach (i from 0 to xlen by 4) { + if (rs2[i*4+:4]<(xlen/4)) + X(rd)[i*4+:4] = rs1[rs2[i*4+:4]*4+:4]; + else + X(rd)[i*4+:4] = 4'b0; + } + + **Invalid values**: NONE + + **Exception raised**: NONE diff --git a/docs/01_cva6_user/RISCV_Instructions_RVZknd.rst b/docs/01_cva6_user/RISCV_Instructions_RVZknd.rst new file mode 100644 index 00000000000..fc17673b67f --- /dev/null +++ b/docs/01_cva6_user/RISCV_Instructions_RVZknd.rst @@ -0,0 +1,161 @@ +.. Licensed under the Solderpad Hardware Licence, Version 2.1 (the "License"); +.. you may not use this file except in compliance with the License. +.. SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +.. You may obtain a copy of the License at https://solderpad.org/licenses/ + +.. Author: Munail Waqar, 10xEngineers +.. Date: 03.05.2025 +.. + Copyright (c) 2023 OpenHW Group + Copyright (c) 2023 10xEngineers + + SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 + +.. Level 1 + ======= + + Level 2 + ------- + + Level 3 + ~~~~~~~ + + Level 4 + ^^^^^^^ + +.. _cva6_riscv_instructions_RV32Zkne: + +*Applicability of this chapter to configurations:* + +.. csv-table:: + :widths: auto + :align: left + :header: "Configuration", "Implementation" + + "CV32A60AX", "Implemented extension" + "CV64A6_MMU", "Implemented extension" + +============================= +RVZknd: NIST Suite: AES Decryption +============================= + +The following instructions comprise the Zknd extension: + +Decryption instructions +-------------------- +The Decryption instructions (Zknd) provide support and acceleration for AES decryption and key expansion. + ++-----------+-----------+----------------------------+ +| RV32 | RV64 | Mnemonic | ++===========+===========+============================+ +| ✔ | | aes32dsi rd, rs1, rs2, bs | ++-----------+-----------+----------------------------+ +| ✔ | | aes32dsmi rd, rs1, rs2, bs | ++-----------+-----------+----------------------------+ +| | ✔ | aes64ds rd, rs1, rs2 | ++-----------+-----------+----------------------------+ +| | ✔ | aes64dsm rd, rs1, rs2 | ++-----------+-----------+----------------------------+ + +RV32 specific instructions +~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +- **AES32DSI**: AES final round decryption instruction for RV32 + + **Format**: aes32dsi rd, rs1, rs2, bs + + **Description**: This instruction sources a single byte from rs2 according to bs. To this it applies the inverse AES SBox operation, and XOR the result with rs1. + + **Pseudocode**: X(rd) = X(rs1)[31..0] ^ rol32((0x000000 @ aes_sbox_inv((X(rs2)[31..0] >> bs*8)[7..0])), unsigned(bs*8)); + + **Invalid values**: NONE + + **Exception raised**: NONE + +- **AES32DSMI**: AES middle round decryption instruction for RV32. + + **Format**: aes32dsmi rd, rs1, rs2, bs + + **Description**: This instruction sources a single byte from rs2 according to bs. To this it applies the inverse AES SBox operation, and a partial inverse MixColumn, before XORing the result with rs1. + + **Pseudocode**: X(rd) = X(rs1)[31..0] ^ rol32(aes_mixcolumn_byte_inv(aes_sbox_inv((X(rs2)[31..0] >> bs*8)[7..0])), unsigned(bs*8)); + + **Invalid values**: NONE + + **Exception raised**: NONE + +RV64 specific instructions +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- **AES64DS**: AES final round decryption instruction for RV64. + + **Format**: aes64ds rd, rs1, rs2 + + **Description**: Uses the two 64-bit source registers to represent the entire AES state, and produces half of the next round output, applying the Inverse ShiftRows and SubBytes steps. + + **Pseudocode**: X(rd) = aes_apply_inv_sbox_to_each_byte(aes_rv64_shiftrows_inv(X(rs2)[63..0], X(rs1)[63..0])); + + **Invalid values**: NONE + + **Exception raised**: NONE + +- **AES64DSM**: AES middle round decryption instruction for RV64. + + **Format**: aes64dsm rd, rs1, rs2 + + **Description**: Uses the two 64-bit source registers to represent the entire AES state, and produces half of the next round output, applying the Inverse ShiftRows, SubBytes and MixColumns steps. + + **Pseudocode**: X(rd) = aes_mixcolumn_inv(aes_apply_inv_sbox_to_each_byte(aes_rv64_shiftrows_inv(X(rs2)[63..0], X(rs1)[63..0]))[63..32]) + @ + aes_mixcolumn_inv(aes_apply_inv_sbox_to_each_byte(aes_rv64_shiftrows_inv(X(rs2)[63..0], X(rs1)[63..0]))[31..0]); + + **Invalid values**: NONE + + **Exception raised**: NONE + + +Key Schedule instructions +-------------------------------- + ++-----------+-----------+-----------------------+ +| RV32 | RV64 | Mnemonic | ++===========+===========+=======================+ +| | ✔ | aes64ks1i rd, rs | ++-----------+-----------+-----------------------+ +| | ✔ | aes64ks2 rd, rs | ++-----------+-----------+-----------------------+ + +RV64 specific Instructions +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- **AES64KS1I**: This instruction implements part of the KeySchedule operation for the AES Block cipher involving the SBox operation. + + **Format**: aes64ks1i rd, rs1, rnum + + **Description**: This instruction implements the rotation, SubBytes and Round Constant addition steps of the AES block cipher Key Schedule. Note that rnum must be in the range 0x0..0xA. + + **Pseudocode**: if(unsigned(rnum) > A) { + X(rd) = 64'b0; + } else { + tmp = if (rnum ==0xA) + X(rs1)[63..32] + else + ror32(X(rs1)[63..32], 8) + X(rd) = (aes_subword_fwd(tmp) ^ aes_decode_rcon(rnum)) @ (aes_subword_fwd(tmp) ^ aes_decode_rcon(rnum)); + + **Invalid values**: NONE + + **Exception raised**: NONE + +- **AES64KS2**: This instruction implements part of the KeySchedule operation for the AES Block cipher. + + **Format**: aes64ks2 rd, rs1, rs2 + + **Description**: This instruction implements the additional XORing of key words as part of the AES block cipher Key Schedule. + + **Pseudocode**: X(rd) = (X(rs1)[63..32] ^ X(rs2)[31..0] ^ X(rs2)[63..32]) @ (X(rs1)[63..32] ^ X(rs2)[31..0]); + + **Invalid values**: NONE + + **Exception raised**: NONE diff --git a/docs/01_cva6_user/RISCV_Instructions_RVZkne.rst b/docs/01_cva6_user/RISCV_Instructions_RVZkne.rst new file mode 100644 index 00000000000..4884a274859 --- /dev/null +++ b/docs/01_cva6_user/RISCV_Instructions_RVZkne.rst @@ -0,0 +1,161 @@ +.. Licensed under the Solderpad Hardware Licence, Version 2.1 (the "License"); +.. you may not use this file except in compliance with the License. +.. SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +.. You may obtain a copy of the License at https://solderpad.org/licenses/ + +.. Author: Munail Waqar, 10xEngineers +.. Date: 03.05.2025 +.. + Copyright (c) 2023 OpenHW Group + Copyright (c) 2023 10xEngineers + + SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 + +.. Level 1 + ======= + + Level 2 + ------- + + Level 3 + ~~~~~~~ + + Level 4 + ^^^^^^^ + +.. _cva6_riscv_instructions_RV32Zkne: + +*Applicability of this chapter to configurations:* + +.. csv-table:: + :widths: auto + :align: left + :header: "Configuration", "Implementation" + + "CV32A60AX", "Implemented extension" + "CV64A6_MMU", "Implemented extension" + +============================= +RVZkne: NIST Suite: AES Encryption +============================= + +The following instructions comprise the Zkne extension: + +Encryption instructions +-------------------- +The Encryption instructions (Zkne) provide support and acceleration for AES encryption and key expansion. + ++-----------+-----------+----------------------------+ +| RV32 | RV64 | Mnemonic | ++===========+===========+============================+ +| ✔ | | aes32esi rd, rs1, rs2, bs | ++-----------+-----------+----------------------------+ +| ✔ | | aes32esmi rd, rs1, rs2, bs | ++-----------+-----------+----------------------------+ +| | ✔ | aes64es rd, rs1, rs2 | ++-----------+-----------+----------------------------+ +| | ✔ | aes64esm rd, rs1, rs2 | ++-----------+-----------+----------------------------+ + +RV32 specific instructions +~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +- **AES32ESI**: AES final round encryption instruction for RV32 + + **Format**: aes32esi rd, rs1, rs2, bs + + **Description**: This instruction sources a single byte from rs2 according to bs. To this it applies the forward AES SBox operation, before XORing the result with rs1. + + **Pseudocode**: X(rd) = X(rs1)[31..0] ^ rol32((0x000000 @ aes_sbox_fwd((X(rs2)[31..0] >> bs*8)[7..0])), unsigned(bs*8)); + + **Invalid values**: NONE + + **Exception raised**: NONE + +- **AES32ESMI**: AES middle round encryption instruction for RV32. + + **Format**: aes32esmi rd, rs1, rs2, bs + + **Description**: This instruction sources a single byte from rs2 according to bs. To this it applies the forward AES SBox operation, and a partial forward MixColumn, before XORing the result with rs1. + + **Pseudocode**: X(rd) = X(rs1)[31..0] ^ rol32(aes_mixcolumn_byte_fwd(aes_sbox_fwd((X(rs2)[31..0] >> bs*8)[7..0])), unsigned(bs*8)); + + **Invalid values**: NONE + + **Exception raised**: NONE + +RV64 specific instructions +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- **AES64ES**: AES final round encryption instruction for RV64. + + **Format**: aes64es rd, rs1, rs2 + + **Description**: Uses the two 64-bit source registers to represent the entire AES state, and produces half of the next round output, applying the ShiftRows and SubBytes steps. + + **Pseudocode**: X(rd) = aes_apply_fwd_sbox_to_each_byte(aes_rv64_shiftrows_fwd(X(rs2)[63..0], X(rs1)[63..0])); + + **Invalid values**: NONE + + **Exception raised**: NONE + +- **AES64ESM**: AES middle round encryption instruction for RV64. + + **Format**: aes64esm rd, rs1, rs2 + + **Description**: Uses the two 64-bit source registers to represent the entire AES state, and produces half of the next round output, applying the ShiftRows, SubBytes and MixColumns steps. + + **Pseudocode**: X(rd) = aes_mixcolumn_fwd(aes_apply_fwd_sbox_to_each_byte(aes_rv64_shiftrows_fwd(X(rs2)[63..0], X(rs1)[63..0]))[63..32]) + @ + aes_mixcolumn_fwd(aes_apply_fwd_sbox_to_each_byte(aes_rv64_shiftrows_fwd(X(rs2)[63..0], X(rs1)[63..0]))[31..0]); + + **Invalid values**: NONE + + **Exception raised**: NONE + + +Key Schedule instructions +-------------------------------- + ++-----------+-----------+-----------------------+ +| RV32 | RV64 | Mnemonic | ++===========+===========+=======================+ +| | ✔ | aes64ks1i rd, rs | ++-----------+-----------+-----------------------+ +| | ✔ | aes64ks2 rd, rs | ++-----------+-----------+-----------------------+ + +RV64 specific Instructions +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- **AES64KS1I**: This instruction implements part of the KeySchedule operation for the AES Block cipher involving the SBox operation. + + **Format**: aes64ks1i rd, rs1, rnum + + **Description**: This instruction implements the rotation, SubBytes and Round Constant addition steps of the AES block cipher Key Schedule. Note that rnum must be in the range 0x0..0xA. + + **Pseudocode**: if(unsigned(rnum) > A) { + X(rd) = 64'b0; + } else { + tmp = if (rnum ==0xA) + X(rs1)[63..32] + else + ror32(X(rs1)[63..32], 8) + X(rd) = (aes_subword_fwd(tmp) ^ aes_decode_rcon(rnum)) @ (aes_subword_fwd(tmp) ^ aes_decode_rcon(rnum)); + + **Invalid values**: NONE + + **Exception raised**: NONE + +- **AES64KS2**: This instruction implements part of the KeySchedule operation for the AES Block cipher. + + **Format**: aes64ks2 rd, rs1, rs2 + + **Description**: This instruction implements the additional XORing of key words as part of the AES block cipher Key Schedule. + + **Pseudocode**: X(rd) = (X(rs1)[63..32] ^ X(rs2)[31..0] ^ X(rs2)[63..32]) @ (X(rs1)[63..32] ^ X(rs2)[31..0]); + + **Invalid values**: NONE + + **Exception raised**: NONE diff --git a/docs/01_cva6_user/RISCV_Instructions_RVZknh.rst b/docs/01_cva6_user/RISCV_Instructions_RVZknh.rst new file mode 100644 index 00000000000..51dd0a9b903 --- /dev/null +++ b/docs/01_cva6_user/RISCV_Instructions_RVZknh.rst @@ -0,0 +1,263 @@ +.. Licensed under the Solderpad Hardware Licence, Version 2.1 (the "License"); +.. you may not use this file except in compliance with the License. +.. SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +.. You may obtain a copy of the License at https://solderpad.org/licenses/ + +.. Author: Munail Waqar, 10xEngineers +.. Date: 03.05.2025 +.. + Copyright (c) 2023 OpenHW Group + Copyright (c) 2023 10xEngineers + + SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 + +.. Level 1 + ======= + + Level 2 + ------- + + Level 3 + ~~~~~~~ + + Level 4 + ^^^^^^^ + +.. _cva6_riscv_instructions_RV32Zknh: + +*Applicability of this chapter to configurations:* + +.. csv-table:: + :widths: auto + :align: left + :header: "Configuration", "Implementation" + + "CV32A60AX", "Implemented extension" + "CV64A6_MMU", "Implemented extension" + +============================= +RVZknh: NIST Suite: Hash Function Instructions +============================= + +The following instructions comprise the Zknh extension: + +Hash Function instructions +-------------------- +The Hash Function instructions (Zknh) provide acceleration for the SHA2 family of cryptographic hash functions. + ++-----------+-----------+----------------------------+ +| RV32 | RV64 | Mnemonic | ++===========+===========+============================+ +| ✔ | ✔ | sha256sig0 rd, rs1 | ++-----------+-----------+----------------------------+ +| ✔ | ✔ | sha256sig1 rd, rs1 | ++-----------+-----------+----------------------------+ +| ✔ | ✔ | sha256sum0 rd, rs1 | ++-----------+-----------+----------------------------+ +| ✔ | ✔ | sha256sum1 rd, rs1 | ++-----------+-----------+----------------------------+ +| ✔ | | sha512sig0h rd, rs1, rs2 | ++-----------+-----------+----------------------------+ +| ✔ | | sha512sig0l rd, rs1, rs2 | ++-----------+-----------+----------------------------+ +| ✔ | | sha512sig1h rd, rs1, rs2 | ++-----------+-----------+----------------------------+ +| ✔ | | sha512sig1l rd, rs1, rs2 | ++-----------+-----------+----------------------------+ +| ✔ | | sha512sum0r rd, rs1, rs2 | ++-----------+-----------+----------------------------+ +| ✔ | | sha512sum1r rd, rs1, rs2 | ++-----------+-----------+----------------------------+ +| | ✔ | sha512sig0 rd, rs1 | ++-----------+-----------+----------------------------+ +| | ✔ | sha512sig1 rd, rs1 | ++-----------+-----------+----------------------------+ +| | ✔ | sha512sum0 rd, rs1 | ++-----------+-----------+----------------------------+ +| | ✔ | sha512sum1 rd, rs1 | ++-----------+-----------+----------------------------+ + + +RV32 and RV64 Instructions +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- **SHA256SIG0**: SHA2-256 Sigma0 instruction + + **Format**: sha256sig0 rd, rs1 + + **Description**: Implements the Sigma0 transformation function as used in the SHA2-256 hash function. For RV32, the entire XLEN source register is operated on. For RV64, the low 32 bits of the source register are operated on, and the result sign extended to XLEN bits. + + **Pseudocode**: X(rd) = EXTS(ror32(X(rs1)[31..0], 7) ^ ror32(X(rs1)[31..0], 18) ^ (X(rs1)[31..0] >> 3)); + + **Invalid values**: NONE + + **Exception raised**: NONE + + +- **SHA256SIG1**: SHA2-256 Sigma1 instruction + + **Format**: sha256sig1 rd, rs1 + + **Description**: Implements the Sigma1 transformation function as used in the SHA2-256 hash function. For RV32, the entire XLEN source register is operated on. For RV64, the low 32 bits of the source register are operated on, and the result sign extended to XLEN bits. + + **Pseudocode**: X(rd) = EXTS(ror32(X(rs1)[31..0], 17) ^ ror32(X(rs1)[31..0], 19) ^ (X(rs1)[31..0] >> 10)); + + **Invalid values**: NONE + + **Exception raised**: NONE + + +- **SHA256SUM0**: SHA2-256 Sum0 instruction + + **Format**: sha256sum0 rd, rs1 + + **Description**: Implements the Sum0 transformation function as used in the SHA2-256 hash function. For RV32, the entire XLEN source register is operated on. For RV64, the low 32 bits of the source register are operated on, and the result sign extended to XLEN bits. + + **Pseudocode**: X(rd) = EXTS(ror32(X(rs1)[31..0], 2) ^ ror32(X(rs1)[31..0], 13) ^ ror32(X(rs1)[31..0] >> 22)); + + **Invalid values**: NONE + + **Exception raised**: NONE + + +- **SHA256SUM1**: SHA2-256 Sum1 instruction + + **Format**: sha256sum1 rd, rs1 + + **Description**: Implements the Sum1 transformation function as used in the SHA2-256 hash function. For RV32, the entire XLEN source register is operated on. For RV64, the low 32 bits of the source register are operated on, and the result sign extended to XLEN bits. + + **Pseudocode**: X(rd) = EXTS(ror32(X(rs1)[31..0], 6) ^ ror32(X(rs1)[31..0], 11) ^ ror32(X(rs1)[31..0] >> 25)); + + **Invalid values**: NONE + + **Exception raised**: NONE + + + +RV32 specific instructions +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- **SHA512SIG0H**: SHA2-512 Sigma0 high (RV32) + + **Format**: sha512sig0h rd, rs1, rs2 + + **Description**: Implements the high half of the Sigma0 transformation, as used in the SHA2-512 hash function. Used to compute the Sigma0 transform of the SHA2-512 hash function in conjunction with the sha512sig0l instruction. The transform is a 64-bit to 64-bit function, so the input and output are each represented by two 32-bit registers. + + **Pseudocode**: X(rd) = EXTS((X(rs1) >> 1) ^ (X(rs1) >> 7) ^ (X(rs1) >> 8) ^ (X(rs2) << 31) ^ (X(rs2) << 24)); + + **Invalid values**: NONE + + **Exception raised**: NONE + +- **SHA512SIG0L**: SHA2-512 Sigma0 low (RV32) + + **Format**: sha512sig0l rd, rs1, rs2 + + **Description**: Implements the low half of the Sigma0 transformation, as used in the SHA2-512 hash function. Used to compute the Sigma0 transform of the SHA2-512 hash function in conjunction with the sha512sig0h instruction. The transform is a 64-bit to 64-bit function, so the input and output are each represented by two 32-bit registers. + + **Pseudocode**: X(rd) = EXTS((X(rs1) >> 1) ^ (X(rs1) >> 7) ^ (X(rs1) >> 8) ^ (X(rs2) << 31) ^ (X(rs2) << 25) ^ (X(rs2) << 24)); + + **Invalid values**: NONE + + **Exception raised**: NONE + +- **SHA512SIG1H**: SHA2-512 Sigma1 high (RV32) + + **Format**: sha512sig1h rd, rs1, rs2 + + **Description**: Implements the high half of the Sigma1 transformation, as used in the SHA2-512 hash function. Used to compute the Sigma1 transform of the SHA2-512 hash function in conjunction with the sha512sig1l instruction. The transform is a 64-bit to 64-bit function, so the input and output are each represented by two 32-bit registers. + + **Pseudocode**: X(rd) = EXTS((X(rs1) << 3) ^ (X(rs1) >> 6) ^ (X(rs1) >> 19) ^ (X(rs2) >> 29) ^ (X(rs2) << 13)); + + **Invalid values**: NONE + + **Exception raised**: NONE + +- **SHA512SIG1L**: SHA2-512 Sigma1 low (RV32) + + **Format**: sha512sig1l rd, rs1, rs2 + + **Description**: Implements the low half of the Sigma1 transformation, as used in the SHA2-512 hash function. Used to compute the Sigma1 transform of the SHA2-512 hash function in conjunction with the sha512sig0h instruction. The transform is a 64-bit to 64-bit function, so the input and output are each represented by two 32-bit registers. + + **Pseudocode**: X(rd) = EXTS((X(rs1) << 3) ^ (X(rs1) >> 6) ^ (X(rs1) >> 19) ^ (X(rs2) >> 29) ^ (X(rs2) << 26) ^ (X(rs2) << 13)); + + **Invalid values**: NONE + + **Exception raised**: NONE + +- **SHA512SUM0R**: SHA2-512 Sum0 (RV32) + + **Format**: sha512sum0r rd, rs1, rs2 + + **Description**: Implements the Sum0 transformation, as used in the SHA2-512 hash function. The transform is a 64-bit to 64-bit function, so the input and output are each represented by two 32-bit registers. + + **Pseudocode**: X(rd) = EXTS((X(rs1) << 25) ^ (X(rs1) << 30) ^ (X(rs1) >> 28) ^ (X(rs2) >> 7) ^ (X(rs2) >> 2) ^ (X(rs2) << 4)); + + **Invalid values**: NONE + + **Exception raised**: NONE + +- **SHA512SUM1R**: SHA2-512 Sum1 (RV32) + + **Format**: sha512sum1r rd, rs1, rs2 + + **Description**: Implements the Sum1 transformation, as used in the SHA2-512 hash function. The transform is a 64-bit to 64-bit function, so the input and output are each represented by two 32-bit registers. + + **Pseudocode**: X(rd) = EXTS((X(rs1) << 23) ^ (X(rs1) >> 14) ^ (X(rs1) >> 18) ^ (X(rs2) >> 9) ^ (X(rs2) << 18) ^ (X(rs2) << 14)); + + **Invalid values**: NONE + + **Exception raised**: NONE + + + +RV64 specific Instructions +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- **SHA512SIG0**: SHA2-512 Sigma0 instruction (RV64) + + **Format**: sha512sig0 rd, rs1 + + **Description**: Implements the Sigma0 transformation function as used in the SHA2-512 hash function. + + **Pseudocode**: X(rd) = ror64(X(rs1), 1) ^ ror64(X(rs1), 8) ^ (X(rs1) >> 7); + + **Invalid values**: NONE + + **Exception raised**: NONE + +- **SHA512SIG1**: SHA2-512 Sigma1 instruction (RV64) + + **Format**: sha512sig1 rd, rs1 + + **Description**: Implements the Sigma1 transformation function as used in the SHA2-512 hash function. + + **Pseudocode**: X(rd) = ror64(X(rs1), 19) ^ ror64(X(rs1), 61) ^ (X(rs1) >> 6); + + **Invalid values**: NONE + + **Exception raised**: NONE + +- **SHA512SUM0**: SHA2-512 Sum0 instruction (RV64) + + **Format**: sha512sum0 rd, rs1 + + **Description**: Implements the Sum0 transformation function as used in the SHA2-512 hash function. + + **Pseudocode**: X(rd) = ror64(X(rs1), 28) ^ ror64(X(rs1), 34) ^ ror64(X(rs1) ,39); + + **Invalid values**: NONE + + **Exception raised**: NONE + +- **SHA512SUM1**: SHA2-512 Sum1 instruction (RV64) + + **Format**: sha512sum1 rd, rs1 + + **Description**: Implements the Sum1 transformation function as used in the SHA2-512 hash function. + + **Pseudocode**: X(rd) = ror64(X(rs1), 14) ^ ror64(X(rs1), 18) ^ ror64(X(rs1) ,41); + + **Invalid values**: NONE + + **Exception raised**: NONE diff --git a/docs/01_cva6_user/Traps_Interrupts_Exceptions.rst b/docs/01_cva6_user/Traps_Interrupts_Exceptions.rst index bb0c8f266c9..14793223fc6 100644 --- a/docs/01_cva6_user/Traps_Interrupts_Exceptions.rst +++ b/docs/01_cva6_user/Traps_Interrupts_Exceptions.rst @@ -9,7 +9,7 @@ Traps, Interrupts, Exceptions ============================= Traps are composed of interrupts and exceptions. Interrupts are asynchronous events whereas exceptions are synchronous ones. -On one hand, interrupts are occuring independently of the instructions +On one hand, interrupts are occurring independently of the instructions (mainly raised by peripherals or debug module). On the other hand, an instruction may raise exceptions synchronously. diff --git a/docs/01_cva6_user/Trigger_Module.rst b/docs/01_cva6_user/Trigger_Module.rst new file mode 100644 index 00000000000..23fd1a2c034 --- /dev/null +++ b/docs/01_cva6_user/Trigger_Module.rst @@ -0,0 +1,333 @@ +.. + Copyright (c) 2023 OpenHW Group + Copyright (c) 2023 Thales DIS SAS + + SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 + Original Author : Munail Waqar - 10X Engineers + Contributors : Mounsaf YOUSFI - Thales DIS + + +Trigger Module (Sdtrig Extension) +================================= +The module provides powerful hardware breakpoints and watchpoints in the core. +Upon trigger match, the core supports two actions i.e. breakpoint excpetion generation and entry into debug mode. +The number of triggers is parameterized and the module itself is configurable under the SDTRIG bit. + +Configuration CSRs +~~~~~~~~~~~~~~~~~~ +* ``tselect`` : The currently selected trigger. +* ``tinfo`` : Shows the currently supported triggers. +* ``tdata1`` : Specifies trigger data like trigger type, configuration, privilege mode, status. +* ``tdata2`` : The value to be matched. +* ``tdata3`` : Specifies context data. +* ``scontext`` : Specifies supervisor mode context data. + + +Modified CSRs (Breakpoint action) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* ``mstatus``: several fields are updated like previous privilege mode (``MPP``), previous interrupt enabled (``MPIE``) +* ``mepc`` : updated with the address of the instruction raising the exception. +* ``mcause`` : updated with a breakpoint code (0x00000003) indicating the event causing the trap. + +Modified CSRs (Debug action) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* ``dpc`` : updated with the address of the instruction causing the debug request. +* ``dcsr`` : some fields are updated like debug entry cause (``CAUSE``) + +Priorities + +All triggers are subject to priority handling. The priority is such : ``Mcontrol6 load data timing:AFTER`` <=> ``Icount`` <=> ``Etrigger`` <=> ``Itrigger`` > ``Mcontrol6 execute address timing:BEFORE`` > ``Mcontrol6 execute data timing:BEFORE`` > ``Mcontrol6 load address timing:BEFORE`` <=> ``Mcontrol6 store address/data timing:BEFORE``. + +Priorities are handled as such : if multiple triggers request fire at the same time, only the highest priority ones are taken. If multiple triggers request fire in the same priority, all actions within this priority are taken at the same time. + +This order and behaviour fits the RISC-V debug specification chapter 5 (Sdtrig), paragraph 5.3 (Priority). + +Precision + +All triggers are precise which means ``mepc`` will always correspond to the matching instruction, except ``mcontrol6 load data`` trigger type, which updates ``mepc`` with the immediately-next instruction for physics related reasons(impossible to match on a load result if result is not obtained yet, which implies the execution of the whole instruction hence breaking on the next instruction to commit the result of the load instead of losing the data). + +Icount +------ +The ``icount`` trigger is used to delay a breakpoint or debug entry by a programmable number of instructions. It acts like a countdown timer based on instruction commits and gives deterministic trigger behavior useful for testing or stepping into debug mode after a specific number of instructions. + +Prerequisites +~~~~~~~~~~~~~ +- ``SDTRIG`` and ``Icount`` configuration bits must be enabled. +- Trigger type must be ``4'd3`` in ``tdata1``. + +Trigger Match Logic +~~~~~~~~~~~~~~~~~~~ +- The ``count`` field in ``tdata1`` is initialized with the number of instructions to wait. +- The counter decrements on every instruction commit. +- Countdown continues only outside trap handlers to avoid miscounts during exceptions. + +- Matching occurs when: + - ``count == 0`` + - Current privilege level matches the trigger config (``m/s/u``) + +- On match: + - ``pending`` is set + - The specified ``action`` is triggered: + - ``0`` → raise a breakpoint exception + - ``1`` → enter debug mode + +- Once in debug mode: + - ``pending`` is cleared + - ``hit`` is set and remains latched + +Key Fields (in ``tdata1``) +~~~~~~~~~~~~~~~~~~~~~~~~~~ +- ``count``: Current countdown value. +- ``action``: Determines what to do on match: + + - ``0``: Raise a breakpoint exception + - ``1``: Enter debug mode + +- ``m``, ``s``, ``u``: Privilege mode flags — trigger only fires in selected modes. +- ``pending``: Indicates the trigger condition has been met and is awaiting action. +- ``hit``: Latched once the action (break/debug) occurs. + +Action Taken on Match +~~~~~~~~~~~~~~~~~~~~~ +- Breakpoint (``fire_req_Icount.action == 0``): + - Sets ``fire_req_Icount.valid = 1``, which results in a trap request that, if taken, results in: + - Trap entry + - Updates to ``mstatus``, ``mepc``, ``mcause`` + +- Debug Entry (``fire_req_Icount.action == 1``): + - Sets ``debug_from_trigger_d = 1``, resulting in: + - Trap into debug mode + - Updates ``dpc``, ``dcsr`` + +Pseudocode +~~~~~~~~~~ +.. code-block:: text + + If icount trigger is enabled and type is 0x3: + On instruction execute: + If in trap handler: + Hold countdown + Else if not in trap and count > 0: + Decrement count + If count == 0 and privilege matches and not pending: + Set pending + If action == 0: raise breakpoint + If action == 1: enter debug mode + If breakpoint or debug action occurred: + Set hit + Clear pending (for debug) + + +Mcontrol6 +--------- +The ``mcontrol6`` trigger detects specific memory accesses (load/store), instruction fetches or execution of specific instructions. It matches on instruction address, instruction, load/store data and load/store addresses. It is the most general and powerful of the trigger types allowing address/data breakpoints, watchpoints, and instruction level filters. + +Prerequisites +~~~~~~~~~~~~~~~ +- ``SDTRIG`` and ``Mcontrol6`` configuration bits must be enabled. +- Trigger type must be ``4'd6`` in ``tdata1``. + +Trigger Match Logic +~~~~~~~~~~~~~~~~~~~ +A match occurs if: + +1. Privilege Mode Match: + - One of the flags ``m``, ``s``, ``u`` in ``tdata1`` must match current mode. + +2. Condition Match: + - Based on operation type and mode: + - Instruction Execute: + - Match against PC (`fetch_sdtrig_pc_i`) or instruction (`fetch_sdtrig_instr_i`). + - Store Operation: + - Match against store data (`sdtrig_lsu_inputs_data_i`) or address (`sdtrig_lsu_inputs_vaddr_i`). + - Load Operation: + - Match against load result (`sdtrig_load_data_i`) or load address (`sdtrig_lsu_inputs_vaddr_i`). + +3. Selection Mode: + - If ``select == 1`` → compare data/instruction value. + - If ``select == 0`` → compare address. + +4. Match Type (`match` field): + - ``0`` → exact match (``==``) + - ``1`` → NAPOT (Naturally Aligned Power-of-Two) range match + - ``8`` → not equal (``!=``) + +5. Action (only one supported here): + - ``0`` → breakpoint exception generation + - ``1`` → enter debug mode + +6. Trigger chains + +``Mcontrol6`` type trigger supports trigger chaining. A trigger chain is necessarily a located on a contiguous sequence of ``tselect`` indexes (e.g. first trigger on index 2, last trigger on index 4, index 3 is part of the chain too). First chain' trigger has ``chain == 1``, last has ``chain == 0``. + +Every trigger must match and the only action taken is last trigger's action. + +Since priorities are taken into account, multiple trigger timings exist within ``mcontrol6`` type trigger and the CVA6 is a pipeline, it is necessary for the trigger chain to fire that the earliest events in terms of pipeline stages must be located on the lowest indexes, e.g. for a trigger chain on a load data instruction the order must be : execute address (pc check) > load address > load data because these events happen in that order in the pipeline. + +On match: +- The configured ``action`` is executed. +- In debug mode, internal state is reset: + - ``hit0`` is cleared + - ``hit1`` is latched + +Key Fields +~~~~~~~~~~ +- ``tdata1``: + - ``execute`` / ``load`` / ``store``: Operation type + - ``select``: Controls address vs. value comparison + - ``match``: Match type (exact, NAPOT, not-equal) + - ``action``: Trigger response (`1` → debug) + - ``m``, ``s``, ``u``: Privilege filters + - ``hit0``, ``hit1``: Used to track match state + +- ``tdata2``: Match value — can be an address, instruction or data value + +Pseudocode +~~~~~~~~~~ +.. code-block:: text + + If mcontrol6 is enabled and type is 0x6: + If privilege level matches tdata1: + Determine comparison target: + If execute: + If select == 0 → compare PC + If select == 1 → compare instruction + If store: + If select == 0 → compare store address + If select == 1 → compare store data + If load: + If select == 0 → compare load address + If select == 1 → compare load result + Use match field (==, NAPOT, !=) to evaluate + If match: + If action == 0 → generate breakpoint exception + If action == 1 → enter debug mode + In debug mode: + Clear hit0, set hit1, reset trigger state + +Etrigger +-------- +The ``etrigger`` trigger monitors **exception causes** and fires a trigger action when a matching exception occurs depending on privilege mode. It is highly useful for detecting specific trap causes such as illegal instructions, page faults, breakpoints etc. + +Prerequisites +~~~~~~~~~~~~~ +- ``SDTRIG`` and ``Etrigger`` configuration bits must be enabled. +- Trigger type must be ``4'd5`` in ``tdata1``. + +Trigger Match Logic +~~~~~~~~~~~~~~~~~~~ +- The trigger matches and activates when both conditions are met: + + - The trigger checks if the current exception cause (`ex_i.cause`) is set in the exception mask stored in ``tdata2``. + - The current privilege mode (`m`, `s`, `u`) matches what is enabled in ``tdata1``. + +- On a match: + - The normal exception is suppressed. + - The ``hit`` bit in ``tdata1`` is latched. + - The specified ``action`` is triggered: + - ``0`` → raise a breakpoint exception + - ``1`` → enter debug mode + +- While in debug mode, ``hit`` and internal state are cleared. + +Key Fields +~~~~~~~~~~ +- ``tdata1``: + - ``action``: Determines the response: + - ``0``: Raise a breakpoint exception + - ``1``: Enter debug mode + - ``m``, ``s``, ``u``: Privilege level flags. + - ``hit``: Latched on trigger match. + +- ``tdata2``: Bitmask for exception causes where each bit corresponds to a cause number. For example: + - Bit 2 → Illegal instruction + - Bit 3 → Breakpoint + - Bit 11 → Environment call from M-mode + +Action Taken on Match +~~~~~~~~~~~~~~~~~~~~~ +- Breakpoint (``action == 0``): + - Raises exception + - Updates ``mstatus``, ``mepc``, ``mcause`` + +- Debug Entry (``action == 1``): + - Requests debug mode entry + - Updates ``dpc``, ``dcsr`` + +Pseudocode +~~~~~~~~~~ +.. code-block:: text + + If etrigger is enabled and type is 0x5: + If current priv level matches trigger (m/s/u): + If tdata2[exception_cause] is set: + Mark hit + If action == 0: raise breakpoint + If action == 1: enter debug mode + In debug mode: + Clear hit and trigger state + + + +Itrigger +-------- +The ``itrigger`` trigger monitors **interrupt causes** and fires a trigger action when a matching interrupt occurs at the configured privilege level. This allows catching specific hardware or software interrupt events and take debugging or trapping action immediately. + +Prerequisites +~~~~~~~~~~~~~ +- ``SDTRIG`` and ``Itrigger`` configuration bits must be enabled. +- Trigger type must be ``4'd4`` in ``tdata1``. + +Trigger Match Logic +~~~~~~~~~~~~~~~~~~~ +- The trigger matches when both of the following are true: + + - The current exception (`ex_i.cause`) is a valid interrupt (i.e., MSB of the cause is set). + - The lower 5 bits of `ex_i.cause` index into a set bit in the interrupt mask (`tdata2`). + - Privilege mode matches enabled flags in ``tdata1`` (``m``, ``s``, ``u``). + +- On a match: + - The normal exception is suppressed. + - The ``hit`` bit is latched. + - The configured ``action`` is taken: + - ``0`` → raise a breakpoint exception + - ``1`` → enter debug mode + +- When in debug mode: + - The ``hit`` bit and trigger state are cleared + +Key Fields +~~~~~~~~~~ +- ``tdata1``: + - ``action``: Determines what to do when the interrupt matches: + - ``0``: Breakpoint + - ``1``: Debug mode + - ``m``, ``s``, ``u``: Privilege level match + - ``hit``: Set on match + +- ``tdata2``: Interrupt cause bitmask + +Action Taken on Match +~~~~~~~~~~~~~~~~~~~~~ +- Breakpoint (``action == 0``): + - Raises exception + - Updates ``mstatus``, ``mepc``, ``mcause`` + +- Debug Entry (``action == 1``): + - Requests debug mode entry + - Updates ``dpc``, ``dcsr`` + +Pseudocode +~~~~~~~~~~~~ +.. code-block:: text + + If itrigger is enabled and type is 0x4: + If ex_i.cause[XLEN-1] == 1 (interrupt): + If tdata2[ex_i.cause[4:0]] is set: + If current priv level matches tdata1 (m/s/u): + Mark hit + If action == 0: raise breakpoint + If action == 1: enter debug mode + In debug mode: + Clear hit and internal match state + diff --git a/docs/01_cva6_user/index.rst b/docs/01_cva6_user/index.rst index 6ca5b007270..f086acf8aa0 100644 --- a/docs/01_cva6_user/index.rst +++ b/docs/01_cva6_user/index.rst @@ -42,6 +42,12 @@ CVA6 User Manual RVZbb RVZbc RVZbs + RVZbkb + RVZbkc + RVZbkx + RVZkne + RVZknd + RVZknh RVZicsr RVZifencei RVZicond @@ -62,3 +68,4 @@ CVA6 User Manual + diff --git a/docs/01_cva6_user/user_cfg_doc.rst b/docs/01_cva6_user/user_cfg_doc.rst index d0e52b1a1bd..cec1dbb2328 100644 --- a/docs/01_cva6_user/user_cfg_doc.rst +++ b/docs/01_cva6_user/user_cfg_doc.rst @@ -262,7 +262,7 @@ * - ``TechnoCut`` - ``bit`` - - Is Techno Cut instanciated + - Is Techno Cut instantiated * - ``SuperscalarEn`` - ``bit`` diff --git a/docs/02_cva6_requirements/cva6_requirements_specification.rst b/docs/02_cva6_requirements/cva6_requirements_specification.rst index da5605efbb0..57bf1d9e7e2 100644 --- a/docs/02_cva6_requirements/cva6_requirements_specification.rst +++ b/docs/02_cva6_requirements/cva6_requirements_specification.rst @@ -1,9 +1,9 @@ =============================== CVA6 Requirement Specification =============================== -Editor: **Jerome Quevremont** +Editor: **Jérôme Quévremont** -Revision 1.0.1 +.. Revision 1.0.1 .. _license: @@ -35,20 +35,19 @@ configured as a 32- or 64-bit core (RV32 or RV64). It includes L1 caches, optional MMU, optional PMP and optional FPU. It is an industrial evolution of ARIANE created by ETH Zürich and the -University of Bologna. It is written in SystemVerilog and maintained by -the OpenHW Group. +University of Bologna. It is written in SystemVerilog and maintained at +the OpenHW Foundation, part of Eclipse Foundation. This specification is organized as requirements that apply to the “Scope of the IP”. -The requirement list is to be approved by the OpenHW Group Technical -Work Group (TWG), as well as its change requests. +The requirement list is maintained by the project committers. -The specification will be complemented by a user’s guide. +The specification is complemented by a user’s guide. -Revision 1.0.0 refers to the product of the first CVA6 project led at -OpenHW Group. It is a placeholder in case of future evolutions after -project freeze (PF gate). +.. Revision 1.0.0 refers to the product of the first CVA6 project led at +.. OpenHW Group. It is a placeholder in case of future evolutions after +.. project freeze (PF gate). A list of abbreviations is available at the end of this document. @@ -79,7 +78,7 @@ As displayed in the picture above, the IP comprises: - The CVA6 core; -- L1 write-through cache; +- L1 caches; - Optional FPU; @@ -117,7 +116,7 @@ support…​”, “…​should reduce latency…​”). These are not in the scope of this specification: - SW layers, such as compiler and OSes (that can however be part of the - OpenHW Group CVA6 project); + OpenHW Foundation CVA6 project); - SW emulation of RISC-V optional extensions ( feasible but the scope of the IP is the core hardware); @@ -136,19 +135,22 @@ Initial Release The CVA6 is highly configurable via SystemVerilog parameters. It is not practical to fully document and verify all possible combinations of parameters, so a set of "viable IP configurations" has been defined. -The full list of parameters for this configuration will be detailed in the users’ guide. + +The full list of parameters for these configuration are detailed in the users’ guide. Below are the configuration of the first releases of the CVA6. -+--------------------+---------+---------+------+-------+---------+---------+---------+---------+ -| Release ID | Target | ISA | XLEN | FPU | CV-X-IF | MMU | L1 D$ | L1 I$ | -+====================+=========+=========+======+=======+=========+=========+=========+=========+ -| ``CV32A60X`` | ASIC | IMC | 32 | No | Yes | None | 2 kB | 2 kB | -+--------------------+---------+---------+------+-------+---------+---------+---------+---------+ -| ``CV32A60AX`` | ASIC | IMC | 32 | No | Yes | Sv32 | 16kB | 16 kB | -+--------------------+---------+---------+------+-------+---------+---------+---------+---------+ ++--------------------+---------+-----------------+------+-------+---------+---------+---------+---------+ +| Release ID | Target | ISA (main ext.) | XLEN | FPU | CV-X-IF | MMU | L1 D$ | L1 I$ | ++====================+=========+=================+======+=======+=========+=========+=========+=========+ +| ``CV32A60X`` | ASIC | IMC | 32 | No | Yes | None | None | None | ++--------------------+---------+-----------------+------+-------+---------+---------+---------+---------+ +| ``CV32A60AX`` | ASIC | IMC | 32 | No | Yes | Sv32 | 16kB | 16 kB | ++--------------------+---------+-----------------+------+-------+---------+---------+---------+---------+ +| ``CV64A60AX`` | ASIC | IMACFDB | 64 | Yes | Yes | Sv39 | 32kB | 32 kB | ++--------------------+---------+-----------------+------+-------+---------+---------+---------+---------+ -CV32A60X could evolve to CV32A65X if the team decides to integrate the dual-issue optional architectural feature. +.. note:: CV32A60X is the first fully verified (TRL-5) configuration of CVA6. .. Possible Future Releases .. ------------------------ @@ -157,7 +159,7 @@ CV32A60X could evolve to CV32A65X if the team decides to integrate the dual-issu .. The full list of parameters for these configurations will be detailed in the users’ guide if and when these configurations are fully verified. .. .. +--------------------+---------+--------+------+-------+---------+---------+---------+---------+ -.. | Configuation ID | Target | ISA | XLEN | FPU | CV-X-IF | MMU | L1 D$ | L1 I$ | +.. | Configuration ID | Target | ISA | XLEN | FPU | CV-X-IF | MMU | L1 D$ | L1 I$ | .. +====================+=========+========+======+=======+=========+=========+=========+=========+ .. | cv32a6_imacf_sv32 | FPGA | IMACF | 32 | Yes | TBD | Sv32 | 32 kB | 16 kB | .. +--------------------+---------+--------+------+-------+---------+---------+---------+---------+ @@ -245,7 +247,7 @@ General requirement +-----------------------------------+-----------------------------------+ As the RISC-V specification leaves space for variations, this -specification specificies some of these variations. +specification specifies some of these variations. .. _risc_v_standard_instructions: @@ -311,8 +313,8 @@ independent requirements. +-----------------------------------+-----------------------------------+ | ISA-130 | CVA6 should support as an | | | **option** the **Zicond** | -| | extension(ratification pending) | -| | version 1.0. | +| | extension (integer conditional | +| | operations) version 1.0. | +-----------------------------------+-----------------------------------+ | ISA-140 | CVA6 should support as an | | | **option** the **Zcb** | @@ -322,9 +324,20 @@ independent requirements. | | **option** the **Zcmp** | | | extension version 1.0. | +-----------------------------------+-----------------------------------+ +| ISA-160 | CVA6 should support as an | +| | **option** the **Zcmt** | +| | extension version 1.0. | ++-----------------------------------+-----------------------------------+ +| ISA-170 | CVA6 should support as an | +| | **option** the **Zkn** extension | +| | (NIST algorithm suite). The | +| | **Zkn** extension comprises the | +| | **Zbkb**, **Zbkc**, **Zbkx**, | +| | **Zkne**, **Zknd** and **Zknh** | +| | extensions. | ++-----------------------------------+-----------------------------------+ - -Note to ISA-60 and ISA-70: CV64A6 cannot support the D extension with +Note to ISA-60 and ISA-70: CV64A6 cannot support the D extension without the F extension. .. _privileges_and_virtual_memory: @@ -359,6 +372,11 @@ The MMU includes a TLB and a hardware PTW. | | **option** the **H** extension | | | (hypervisor) version 1.0. | +-----------------------------------+-----------------------------------+ +| PVL‑70 | CVA6 shall support as an | +| | **option** the **Svnapot** | +| | (NAPOT Translation Contiguity) | +| | extension version 1.0. | ++-----------------------------------+-----------------------------------+ .. _csr: @@ -366,7 +384,7 @@ CSR --- There are no requirements related to CSR as they derive from other -requirements, such as PVL-10, PVL-60… Details of CSRs will be available +requirements, such as PVL-10, PVL-60… Details of CSRs are available in the user’s manual. .. _performance_counters: @@ -450,7 +468,7 @@ applications. | | counterparts in CV32A6). | +-----------------------------------+-----------------------------------+ -The user’s manual will detail the list of counters, events and related +The user’s manual details the list of counters, events and related controls. .. _cache_requirements: @@ -487,11 +505,8 @@ where a high level of timing predictability is needed. | | cycles. The upper-bound is fixed | | | but not specified here. | +-----------------------------------+-----------------------------------+ -| L1W‑20 | L1WTD shall not change the order | -| | of write accesses to the external | -| | memory with respect to the order | -| | of write accesses (stores) | -| | received from the CVA6 core. | +| L1W‑20 | L1WTD shall support RISC-V | +| | Weak Memory Ordering (RVWMO). | +-----------------------------------+-----------------------------------+ | L1W‑30 | L1WTD should offer the | | | following size/ways | @@ -545,6 +560,12 @@ size/ways configurations may be implemented in the design. The design will support one replacement policy allowed by L1W-80. +These L1WTD requirements apply to the legacy WT cache from PULP. + +They also apply to the HPDCache that is superseding the legacy PULP caches. +Note that the HPDCache has more features, such as write-back options, that +are beyond the scope of this specification. + .. _l1_instruction_cache: L1 Instruction cache @@ -603,6 +624,9 @@ size/ways configurations may be implemented in the design. The design will support one replacement policy allowed by L1I-50. +These requirements apply to the HPICache, a modified version of HPDCache, that +will likely supersede the legacy PULP cache. + .. _fence_t_custom_instruction: FENCE.T custom instruction @@ -650,8 +674,16 @@ integrated in the continuous integration flow. | PPA‑10 | CVA6 should be resource-optimized | | | on FPGA and ASIC targets. | +-----------------------------------+-----------------------------------+ -| PPA‑20 | CVA6 should deliver more than 2.1 | -| | CoreMark/MHz. | +| PPA‑20 | CVA6 should target 3.0 | +| | CoreMark/MHz , assuming a | +| | sufficiently fast memory | +| | hierarchy. | ++-----------------------------------+-----------------------------------+ +| PPA‑25 | CVA6 should target as an | +| | **option** 4.5 | +| | CoreMark/MHz, assuming a | +| | sufficiently fast memory | +| | hierarchy. | +-----------------------------------+-----------------------------------+ | PPA‑30 | CV32A6 should run at more than | | | 150 MHz in the cv32a6_imac_sv32 | @@ -675,6 +707,8 @@ integrated in the continuous integration flow. | | performance per MHz. | +-----------------------------------+-----------------------------------+ +PPA-25 comes with the optional dual-issue feature. + .. _interface_requirements: Interface requirements @@ -785,11 +819,21 @@ integration in FPGA and ASIC design flows: | RUL‑40 | CVA6 should not include | | | technology-dependent blocks. | +-----------------------------------+-----------------------------------+ +| RUL-50 | CVA6 should support as an | +| | **option** protection of SRAM | +| | against single-event upsets (SEU).| ++-----------------------------------+-----------------------------------+ If technology-dependent blocks are used, e.g. to improve PPA on certain targets, the equivalent technology-independent block should be available. Parameters can be used to select between the implementations. +Also refer to https://github.com/openhwgroup/cva6/blob/master/CONTRIBUTING.md +for contribution guidelines. + +.. attention:: + RUL-10 is not supported by CVA6 as of now. + .. _list_of_abbreviations: List of abbreviations @@ -815,6 +859,7 @@ List of abbreviations | LFSR: Linear Feedback Shift Register | LRU: Least Recently Used | MMU: Memory Management Unit +| NAPOT: Naturally aligned power-of-two | OS: Operating System | PF: Project Freeze | PPA: Power Performance Area @@ -823,7 +868,6 @@ List of abbreviations | RW: Read Write | SW: Software | TLB: Translation Lookaside Buffer -| TWG: Technical Work Group | WB: Write-Back | WT: Write-Through diff --git a/docs/03_cva6_design/MMU.rst b/docs/03_cva6_design/MMU.rst index 7e67fea64c3..5f5024fe9bf 100644 --- a/docs/03_cva6_design/MMU.rst +++ b/docs/03_cva6_design/MMU.rst @@ -255,7 +255,7 @@ The MMU block can be parameterized to support sv32, sv39 and sv39x4 virtual memo - in - CSR RegFile - logic - - Enables virtual memory translation for instrucionts + - Enables virtual memory translation for instructions * - ``en_ld_st_translation_i`` - in @@ -1159,7 +1159,7 @@ Figure shows every possible path that traverses to find out the PLRU entry. If t .. raw:: html -

Table 9: Entry Selection for Reaplacement

+

Table 9: Entry Selection for Replacement

+-------------------+---------------+----------------------+ | **Path Traverse** | **PLRU Bits** | **Entry to replace** | @@ -1887,7 +1887,7 @@ Page Table Walker is implemented as a finite state machine. It listens to shared * **IDLE:** The initial state where the PTW is awaiting a trigger, often a Shared TLB miss, to initiate a memory access request. In the case of the Hypervisor extension, the stage to which the translation belongs is determined by the enable_translation_XX and en_ld_st_translation_XX signals. There are 3 possible stages: (i) S-Stage - the PTW current state is translating a guest-virtual address into a guest-physical address; (ii) G-Stage Intermed - the PTW current state is translating memory access made from the VS-Stage during the walk to host-physical address; and (iii) G-Stage Final - the PTW current state is translating the final output address from VS-Stage into a host-physical address. When Hypervisor is not enabled PTW is always in S_STAGE. * **WAIT_GRANT:** Request memory access and wait for data grant -* **PTE_LOOKUP:** Once granted access, the PTW examines the valid Page Table Entry (PTE), checking attributes to determine the appropriate course of action. Depending on the STAGE determined in the previous state, pptr and other atributes are updated accordingly. +* **PTE_LOOKUP:** Once granted access, the PTW examines the valid Page Table Entry (PTE), checking attributes to determine the appropriate course of action. Depending on the STAGE determined in the previous state, pptr and other attributes are updated accordingly. * **PROPAGATE_ERROR:** If the PTE is invalid, this state handles the propagation of an error, often leading to a page-fault exception due to non-compliance with access conditions. * **PROPAGATE_ACCESS_ERROR:** Propagate access fault if access is not allowed from a PMP perspective * **WAIT_RVALID:** After processing a PTE, the PTW waits for a valid data signal, indicating that relevant data is ready for further processing. diff --git a/docs/03_cva6_design/_static/bht2lvl.png b/docs/03_cva6_design/_static/bht2lvl.png new file mode 100644 index 00000000000..60f53c6cb40 Binary files /dev/null and b/docs/03_cva6_design/_static/bht2lvl.png differ diff --git a/docs/03_cva6_design/_static/ld_pipeline_diagram.svg b/docs/03_cva6_design/_static/ld_pipeline_diagram.svg index f559adbe923..6ff74956961 100644 --- a/docs/03_cva6_design/_static/ld_pipeline_diagram.svg +++ b/docs/03_cva6_design/_static/ld_pipeline_diagram.svg @@ -142,7 +142,7 @@ Two cycle memory access. The cache is physically indexed and virtually tagged. Multicycle memory access. Address translation -is perforemd in the same cycle. +is performed in the same cycle. Same as option one but the addressing of the cache needs to be delayed until the whole address has successfully been translated. diff --git a/docs/03_cva6_design/commit_stage.rst b/docs/03_cva6_design/commit_stage.rst index 878d7e43cfe..71430f4f919 100644 --- a/docs/03_cva6_design/commit_stage.rst +++ b/docs/03_cva6_design/commit_stage.rst @@ -22,7 +22,7 @@ In addition to retiring instructions the commit stage also manages the various exception sources. In particular at time of commit exceptions can arise from three different sources. First an exception has occurred in any of the previous four pipeline stages (only four as PC Gen can't -throw an exception). Second an exception happend during commit. The only +throw an exception). Second an exception happened during commit. The only source where during commit an exception can happen is from the CS register file and from an interrupt. diff --git a/docs/03_cva6_design/ex_stage.md b/docs/03_cva6_design/ex_stage.md index c3a083eb587..7e9b706413b 100644 --- a/docs/03_cva6_design/ex_stage.md +++ b/docs/03_cva6_design/ex_stage.md @@ -38,7 +38,7 @@ issued to a functional unit and monitor the branch prediction information. If a branch was accidentally predicted on a non-branch instruction it also takes corrective action and re-sets the PC to the correct address (depending on whether the instruction was compressed or -not it add PC `+ 2` or PC `+ 4`). +not it adds PC `+ 2` or PC `+ 4`). As briefly mentioned in the section about instruction re-aligning the branch unit places the PC from an unaligned 32-bit instruction on the @@ -121,9 +121,9 @@ is described in more detail in the upcoming paragraphs: ##### LSU Bypass {#par:lsu_bypass} -The LSU bypass module is a auxiliary module which manages the LSU status +The LSU bypass module is an auxiliary module which manages the LSU status information (full flag etc.) which it presents to the issue stage. This -is necessary for a the following reason: The design of the LSU is critical in +is necessary for the following reason: The design of the LSU is critical in most aspects as it directly interfaces the relatively slow SRAMs. It additionally needs to do some costly operation in sequence. The most costly (in terms of timing) being address generation, address translation and checking @@ -194,7 +194,7 @@ signal of the commit queue goes to the commit stage. Commit stage will stall if it the commit queue can't accept any new data items. On every committed store the commit stage also asserts the `lsu_commit` signal which will put the particular entry from the speculative queue into the -non-sepculative (commit) queue. +non-speculative (commit) queue. As soon as a store is in the commit queue the queue will automatically try to commit the oldest store in the queue to memory as soon as the @@ -290,7 +290,7 @@ access to the (translated) physical address. However, PMPs must be checked during the page table walk as well. During a page walk, all memory access must pass the PMP rules. -The amount of entries is parametrizable under the +The amount of entries is parameterizable under the `CVA6Cfg.NrPMPEntries` parameter. However, the core only supports granularity 8 (G=8). This simplifies the implementation since we do not have to worry about any unaligned accesses. There are a total of @@ -317,10 +317,10 @@ division is a simple serial divider which needs 64 cycles in the worst case. #### CSR Buffer -The CSR buffer a functional unit which its only purpose is to store the +The CSR buffer is a functional unit which only purpose is to store the address of the CSR register the instruction is going to read/write. There are two reasons why we need to do this. The first reason is that -an CSR instruction alters the architectural state, hence this +a CSR instruction alters the architectural state, hence this instruction has to be buffered and can only be executed as soon as the commit stage decides to commit the instruction. The second reason is the way the scoreboard entry is structured: It has only one result diff --git a/docs/03_cva6_design/id_stage.md b/docs/03_cva6_design/id_stage.md index 81ef701e900..3e9fcf286a5 100644 --- a/docs/03_cva6_design/id_stage.md +++ b/docs/03_cva6_design/id_stage.md @@ -79,7 +79,7 @@ It gets incrementally processed further down the pipeline. The scoreboard entry controls operand selection, dispatch and the execution. Furthermore it contains an exception entry which strongly ties the particular instruction to its potential exception. As the first time an -exception could have occoured was already in the IF stage the decoder +exception could have occurred was already in the IF stage the decoder also makes sure that this exception finds its way into the scoreboard entry. A potential illegal instruction exception can occur during decoding. If this is the case and no previous exception has happened the diff --git a/docs/04_cv32a65x/tristan/README.md b/docs/04_cv32a65x/tristan/README.md index 9b7111edc71..b285d5e040e 100644 --- a/docs/04_cv32a65x/tristan/README.md +++ b/docs/04_cv32a65x/tristan/README.md @@ -1,6 +1,6 @@ This directory contains documents written for Tristan project. -- [Verification Specifications](./verif-spec/verification_specifications.adoc) -This document describes the CVA6 verification strategy and implementation. -- [Tandem-Based Verification](./tandem-verification/tandem.adoc) -This document describes the CVA6 tandem (lockstep) verification infrastructure and contains associated User and Reference Manuals. +- [Verification Specifications](./verification/README.adoc) +This is the top-level verification document that describes the CVA6 verification strategy and implementation. +- [Tandem-Based Verification](./verification/tandem/README.adoc) +The collection of documents under `verification/tandem` describes in detail the CVA6 tandem (lockstep) verification infrastructure and contains associated User and Reference Manuals. diff --git a/docs/04_cv32a65x/tristan/tandem-verification/tandem.adoc b/docs/04_cv32a65x/tristan/tandem-verification/tandem.adoc deleted file mode 100644 index 46a139f5d23..00000000000 --- a/docs/04_cv32a65x/tristan/tandem-verification/tandem.adoc +++ /dev/null @@ -1,321 +0,0 @@ -= Tandem-based verification -:toc: - -This document describes the OpenHW Group functional verification environment based on lockstep ("tandem") simulation of a RISC-V reference model and an RTL implementation of a RISC-V core. - -It is divided into two parts: - -* a User Manual which discusses the principle, the architecture and the usage of the environment, and outlines future work; -* a Reference Manual which provides a reference of configuration parameters and programming interfaces to support hardware designers, software developers, and verification engineers. - -== User Manual - -=== Scope of verification - -The verification is performed on the CVA6 core, with the exclusion of interrupt controllers, platform-related mechanisms (real-time timer), peripherals etc. - -The behaviors that are verified are: - -* instruction completion -* general-purpose register value changes -* CSR value changes -* memory operations (as seen by the CVA6 core) -* raising of exceptions -* raising of interrupts -* trap entry and return - -=== Basic Architecture and Design Choices - -Tandem-based functional verification of an RTL design consists in a lockstep comparison of the behavior of an RTL implementation against the behavior of a reference model (usually an Instruction Set Simulator, or ISS), both executing the same programs from the same initial state. In opposition to post-execution trace comparison, the tandem approach enables immediate detection of differences in observable behavior of the RTL implementation and the reference model, thus greatly simplifying the investigation of the root causes of any discrepancies. - -The OpenHW Group tandem verification environment relies on the use of RVFI (RISC-V Formal Interface, https://github.com/SymbioticEDA/riscv-formal/blob/master/docs/rvfi.md). RVFI provides a well-defined abstraction of design state at each instruction commit or exception occurrence. - -RVFI events are collected from both RTL and reference model side, and the RVFI states of both simulations are compared after every step. - -The reference model is a slave to the RTL model; it performs an execution step only when the RTL model has completed the current step. This enables partial verification of behaviors involving values that depend on micro-architecture features, e.g., clock cycle counts. The RTL provides the actual values of such registers to the reference model; these values are trusted by the reference model and hence, the reads of CSR registers yield the same results in the reference model as they do in the RTL simulation. - -The RTL simulation environment provides the testbench and the required abstractions of platform-level resources and behaviors. To match the features of the RTL environment, the reference model needs to include a basic platform abstraction that at the very minimum contains a memory model. For this reason Spike is a prime choice as it contains a superset of the minimum platform needed, cf. xref:fig-spike-platform[xrefstyle=short]. - -.High-level view of the platform supported by Spike -[#fig-spike-platform] -image::figures/Spike-simulation-scope.svg[High-level view of Spike platform,1024] - -In order to ease the integration with RTL simulators, the tandem infrastructure does not depend on the availability of a fully-featured UVM implementation. Instead, it uses a limited subset of UVM to provide a uniform SystemVerilog interface across all supported RTL simulators, whether commercial or open-source. - -==== Operation - -The principle of operation of CVA6 tandem verification is shown in xref:fig-overall-tandem-flow[xrefstyle=short]. The execution of the tandem simulation is controlled by the main RTL simulation loop that is managed either by the "run" phase of the UVM testbench, or explicitly in a test harness. The RTL simulation runs through successive clock cycles until the RVFI state of the RTL model is marked as valid, indicating an instruction commit or an exception in the current RTL clock cycle. - -.Overall tandem verification flow -[#fig-overall-tandem-flow] -image::figures/overall-tandem-architecture.svg[Tandem verification flow,1024] - -In the CVA6 RTL implementation multiple commits or exceptions can occur in a single cycle. If multiple simultaneous events are reported by RVFI, the corresponding entries in the RFVI interface are always ordered in the sequential execution order. For each commit or exception reported by the RVFI interface of the RTL model, the tandem control loop performs a single step of the reference model and compares the RVFI state between the current RTL-side RVFI entry and the reference model RVFI output. Per-commit entries in the RFVI interface are ordered in the sequential execution order, - -Interrupt and debug events detected by the RTL model are injected into the reference model at the beginning of each step. Likewise, the most recent *previously* committed values of microarchitecture-dependent CSRs such as clock cycle counters (`cycle`/`cycleh`, `mcycle`/`mcycleh`) are injected before the reference model step since the RTL values of these registers already correspond to RTL state *after* the corresponding RTL event. - -//.Stages of a single reference model step -//[#fig-refmodel-step] -//image::figures/refmodel-step-stages.svg[Stages of a reference model step,800,opts=inline] - -If a discrepancy in RFVI state is detected, an appropriate human-readable error output is written into the log file and the error count of the simulation is incremented. The tandem simulation stops once a preset number of errors is encountered. By controlling the error count limit is it possible to accommodate transient differences between the RTL and reference model states. A typical example of transient difference occurs when two instructions are committed in a single cycle by a superscalar RTL implementation, causing the counter of retired instructions `minstret` to be atomically incremented by two whereas the reference model will always commit instruction one by one, thus incrementing `minstret` by one each time. - -At the end of a tandem simulation a Yaml report file is produced. It contains information about the test setup (architecture, ISA, test name, etc.) and the list of mismatches found if any. - -For the purpose of CVA6 core verification the core-level interrupt controller (CLIC) is **not** modeled; instead, interrupt management is performed by the testbench. The RTL core model receives interrupt notifications from the testbench through the available interrupt input ports. When the RTL model of the core detects an interrupt, the information about the interrupt is passed to the reference model by reconstructing the value of the `mip` (Machine Interrupt Pending) CSR from the value of the `mcause` register to ensure that the interrupt taken is the same as the one already taken by the RTL simulation. The actual RTL value of the `mip` register may contain additional bits which are set; it will be injected into the reference model state at the end of the reference model step. - -==== Implementation - -The RTL testbenches use DPI functions to control Spike stepping, inject CSR values and query Spike's RVFI interface. - -The selection of single/tandem operation mode is achieved using the SystemVerilog macro `SPIKE_TANDEM`. If defined to a non-zero ("true") value, it enables the tandem configuration in the RTL simulation by instantiating and connecting the Spike wrapper, and activates the stepping and RVFI compare functions. - -The selection of file locations for the Yaml configuration and the Yaml report file locations is performed using dedicated "plusarg" command-line options added to the testbenches: - -* `+config_file=` sets the name of the Yaml configuration file to `` -* `+report_file=` sets the name of the Yaml tandem report file to ``. - -Option `+config_file` should only be used when an appropriate configuration file exists, and should be omitted otherwise. - -SystemVerilog code of the tandem infrastructure is maintained in OpenHW Group repositiory `core-v-verif` (https://github.com/openhwgroup/core-v-verif) which also contains the UVM components and agents that leverage the pure SystemVerilog layer. - -A pure SystemVerilog tandem testbench for CVA6 is available in the OpenHW Group CVA6 repository (https://github.com/openhwgroup/cva6/). - -To limit the impact on the Spike original code base, Spike modifications rely on "shim" (adapter) classes that add extra functionality in two ways: - -* by adding a new base class below the original base class (used for CSRs) -* by specializing a class to provide additional interfaces (Processor and Simulation) - -Spike execution model was modified to run a single-instruction step function instead of the performance-optimized "instruction batch" mode that executes hundreds to thousands of instructions without yielding control to the environment of the simulated design. - -In order to provide fine-grained control over the configuration of the simulated design, Spike was extended with a parameter mechanism with the following characteristics: - -* multiple ways of controlling Spike simulator behavior: -** configuration files (Yaml) -** DPI API -** C++ API -** additional command-line options -* ability to set platform-related values (memory map, boot addresses) -* ability to set implementation-defined values (number of PMP regions in total, vendor ID, architecture ID, implementation ID, ...) -* extended CSR control: -** availability or not of any CSR -** CSR initialization masks and values -** CSR write-enable masks with bit granularity -* ability to inject CSR values from the RTL model for architecture-dependent CSRs (`cycles`/`cyclesh`, `mcycles`/`mcyclesh`, `mip` etc.) - -Spike modifications are maintained in a forked Spike tree integrated into the OpenHW `core-v-verif` repository (https://github.com/openhwgroup/core-v-verif/). - -=== Fundamental limitations of the tandem verification approach - -* By definition, a reference model based on an instruction set simulator has only the notion of instruction commits and is not capable of representing the behaviors between commits (transient signals, micro-architectural artefacts such as stalls etc.) -+ -Such behaviors must be verified by other means. - -* Simultaneous occurrence of the same error in both reference model and RTL implementation will not be detected since the two behaviors will match. -+ -This stresses the importance of validation of the reference model against the specification. - -* Since the reference model for tandem verification does not include an interrupt controller, the presence of pending interrupts must be notified to the `mip` register by other means. -+ -In the OpenHW Group solution, the presence of the interrupt is detected by the RTL model and the information about the actual interrupt raised as the result of interrupt arbitration is passed to the reference model in the `mcause` register. The value in `mcause` is then used to trigger the corresponding event in the reference model. - -* Transient discrepancies can be caused by differences between purely sequential and concurrent model execution. -+ -Spike executes instructions in sequence whereas a superscalar architecture may commit multiple instructions in a single cycle; this means that some CSR updates may differ between Spike and RTL, typically MINSTRET may advance by 2 or more in the RTL model, yet Spike will increment it by 1 at every instruction committed. - -=== QuickStart Guide - -==== Build instructions - -The standard build procedure of Spike supplied with the CVA6 project (https://github.com/openhwgroup/cva6/) builds a Spike binary with all necessary modifications required for DPI interfacing to the RTL testbench. - -Building Spike with tandem extensions requires the availability of `CMake` in version 3.16 or higher. The `yaml-cpp` source package (https://github.com/jbeder/yaml-cpp) that is used to parse and manipulate Yaml configurations is a submodule of Spike and will be downloaded when performing a recursive clone or update of the CVA6 repository. - -If a rebuild is required in an existing setup, it is necessary to either select a different installation directory for Spike or to remove the current installation directory of Spike. It is also necessary to remove Spike build directories `verif/core-v-verif/vendor/riscv/riscv-isa-sim/build` (Spike proper) and `verif/core-v-verif/vendor/riscv/riscv-isa-sim/yaml-cpp/build` (`yaml-cpp` library). - -==== Understanding the Spike configuration file - -Spike configuration files represent a Spike parameter tree in the form of nested Yaml dictionaries under a common root node `spike_param_tree`: - -[,yaml] ----- - spike_param_tree: - bootrom_enable: true - bootrom_base: 0x10000 - bootrom_size: 0x1000 - dram_enable: true - dram_base: 0x80000000 - dram_size: 0x40000000 - core_configs: - - - isa: rv32imczicsr_zcb_zba_zbb_zbc_zbs - priv: M - extensions: cv32a60x,cvxif - boot_addr: 0x80000000 - marchid_override_mask: 0xFFFFFFFF - marchid_override_value: 0x3 - misa_write_mask: 0x0 ----- - -The first-level entries define platform properties (`bootrom_*` and `dram_*`) and the default settings for all cores of the system (`core_configs`). - -The configuration fragment above instructs the reference model that: - -* the platform contains a boot ROM of size 4 KiB starting at address 0x10000 (0+64 KiB); -* the platform contains a DRAM memory of 1 GiB starting at the address 0x80000000 (0+2 GiB) -* all cores: -** implement an RV32IMC ISA with extensions `Zicsr`, `Zcb`, `Zba`, `Zbb`, `Zbc` and `Zbs`; -** support only the Machine privilege level; -** implement additional features modeled in Spike custom extensions `cv32a60x` (additional CSRs specific to `CV32A6*X` family of cores) and `cvxif` (the CV-X-IF interface); -** boot from address `0x80000000` (the start address of the DRAM memory); -** force the reset value of register `marchid` to value `0x3` (corresponding to the CVA6 architecture); -** discard writes into `misa` CSR register by marking all its bits as non-mutable. - -==== Running simulations in tandem mode - -Currently, tandem simulations are supported out-of-the-box only for CVA6 target `cv32a65x` using RTL simulator configurations `vcs-uvm` (recommended), `vcs-testharness`, `questa-uvm` and `questa-testharness`. Tandem simulations of target `cv32a65x` with Verilator using the `veri-testharness` configuration require Verilator v5.016 or higher. - -Tandem verification is enabled by setting environment variable `SPIKE_TANDEM` to a non-empty value prior to invoking any of the test scripts located in the `verif/regress` directory of the CVA6 source tree. - -**Example:** -[,sh] ----- -export SPIKE_TANDEM=1 ; bash verif/regress/dv-csr-embedded-tests.sh ----- - -The output of tandem simulation is sent to the log file of the RTL simulator, by default `verif/sim/out_/_sim/..log.iss`. - -A machine-processable Yaml report file summarizing the mismatches detected during the simulation is stored in a separate report file, by default `verif/sim/out_/_sim/..log.yaml`. It contains the configuration of the simulated design, the number of mismatches that were found (if any) and a list of entries describing the successive mismatches. - -=== How to analyze tandem verification results - -To simplify failure analysis, the RVFI state comparator reports mismatches between commit states of the reference model and the RTL model at all verbosity levels. However, it produces no output if the commit states are identical and the verbosioty level is `UVM_LOW`. By controlling output verbosity, the simulation log can be reduced to the sole list of state discrepancies, or it can contain a complete log of commits and exceptions to provide additional context at failure locations. - -A scoreboard discrepancy is represented by a line describing the nature of the error, followed by two lines that provide a summary view of the RVFI state of the reference model and the RTL core. - -**Example:** -[,text] ----- -CSR 304 Mismatch [REF]: 0x0 [CORE]: 0x8 -UVM_INFO @ 45992.000 ns : uvmc_rvfi_scoreboard_utils.sv(206) reporter [spike_tandem] 45992.000 ns | RVFI | 0 | 0 | 800036ac | 30419073 | M | x3 | 00000008 | x0 | 0000000000000000 | csrrw zero, mie, gp -UVM_ERROR @ 45992.000 ns : uvmc_rvfi_scoreboard_utils.sv(211) reporter [spike_tandem] 45992.000 ns | RVFI | 0 | 0 | 800036ac | 30419073 | M | x3 | 00000008 | x0 | 0000000000000000 | csrrw zero, mie, gp <- CORE ----- - -The first line indicates that for current instruction commit the content of the CSR with hexadecimal address `304`, i.e., `mie` ("Machine Interrupt Enable") differs between the reference model (value `0x0`) and the RTL core model (value `0x8`). The next two lines provide details about the current instruction in both models: - -* the current time stamp: `45992.000 ns`, -* the value of PC: `0x800036ac`, -* the encoding of the instruction: hex `30419073`, -* the current privilege mode: `M` (Machine), -* the values of general-purpose register operands of the instruction: `x3` (`gp` in RISC-V ABI) equals `0x00000008`, `x0` equals `0x00000000`. - -Since the values stored into the `mie` CSR differ whereas the instruction executed is the same including the values of its input operands, the discrepancy can only come from the write behavior of the `mie` CSR. In this specific case, bit 3 of the `mie` register is specified as "read-only zero" in the reference model, yet the RTL implementation accepts writes into this specific bit of `mie`. - -The following is the corresponding fragment from the Yaml report, including the configuration and status summary of the simulation run: - -[,yaml] ----- -csrs_match_count: 461 -exit_cause: MISMATCH -exit_code: 0 -instr_count: 3280 -isa: rv32imc_zba_zbb_zbs_zbc_zicsr_zifencei -mismatch_description: 'CSR 304 Mismatch [REF]: 0x880 [CORE]: 0x888 ' -mismatches: -- 0: null - core: - insn: 0000000030419073 - insn_disasm: csrrw zero, mie, gp - mode: 3 - pc_rdata: 00000000800036ac - pc_wdata: 0 - rd1_addr: 0 - rd1_rdata: 0 - rs1_addr: 3 - rs1_rdata: 0000000000000008 - trap: 0 - reference_model: - insn: 0000000030419073 - insn_disasm: csrrw zero, mie, gp - mode: 3 - pc_rdata: 00000000800036ac - pc_wdata: 0 - rd1_addr: 0 - rd1_rdata: 0 - rs1_addr: 3 - rs1_rdata: 0000000000000008 - trap: 0 -[...] -mismatches_count: 5 -simulator: vcs-uvm -target: cv32a65x -test: csr_test -testlist: csr_embedded ----- - -=== Example uses of Yaml reference model parameters - -==== Enable (make "accessible") or disable (make "inaccessible") a CSR - -A Boolean parameter consisting of CSR name and suffix `_accessible`, placed in generic or per-core configuration, indicates whether the given register should be accessible or not. - -**Example**: - -[,yaml] ----- -spike_param_tree: - ... - core_configs: - - - ... - tinfo_accessible: False ----- - -makes the `tinfo` CSR inaccessible in the reference model for all cores, meaning that any attempt to access (read or write) the `tinfo` register when executing an instruction in the reference model will trigger an illegal instruction exception. - -==== Force specific bits in a CSR to a constant value - -The reference model parameters provide two levels of control over the content of CSRs: - -* override the reset value of selected bits of any CSR; -* define which bits of a CSR cannot be modified. - -Assuming that bit 5 of a certain CSR `` should always be set irrespective of the default setting in the reference model, it is necessary to indicate that: - -* the reset value of that bit should be 1; -* writes to that bit should be ignored. - -The parameters needed to express this property are: - -* `_override_mask` which defines which bits of `` should be forced to a specific value at reset, -* `_override_value` which indicates the reset value of the forced bits of ``, -* `_write_mask` which indicates which bits of `` are writable (mask bit is set) and which are not (mask bit is cleared). - -Assuming that the XLEN is 32 and only bit 5 of `` should be fixed, the Yaml settings to use are: - -[,yaml] ----- -spike_param_tree: - ... - core_configs: - - - ... - _override_mask: 0x00000020 - _override_value: 0x00000020 - _write_mask: 0xffffffdf ----- - -=== Integration with the RISC-V Open Source ecosystem - -* The entire tandem verification infrastructure is available as Open Source under SHL 2.0+ (an Apache-type license) in OpenHW Group repositories `cva6` (https://github.com/openhwgroup/cva6/) and `core-v-verif` (https://github.com/openhwgroup/cva6/). - -* The OpenHW Group tandem verification infrastructure relies on Spike (https://github.com/riscv-software-src/riscv-isa-sim/) as reference model. -+ -The tandem verification approach is a general template and is not bound to a single ISS or RTL simulator. However, it requires that the ISS provides a basic platform capable of running software matching the capabilities of the RTL testbench, including a model of memory and buses. -Because of this constraint the current tandem framework relies on Spike which is fully Open Source and provides all necessary components. - -* Verilator-based tandem verification -+ -Starting with version 5.016, Verilator supports tandem simulations. Earlier versions did not provide sufficient support for structured types in the DPI interface. - -include::reference.adoc[] diff --git a/docs/04_cv32a65x/tristan/verification/README.adoc b/docs/04_cv32a65x/tristan/verification/README.adoc new file mode 100644 index 00000000000..030fbf2a82c --- /dev/null +++ b/docs/04_cv32a65x/tristan/verification/README.adoc @@ -0,0 +1,99 @@ += CV32A6 Verification: Strategy, Environment and the Actual Verification Process +:toc: + +== Introduction +=== General Information + +This document describes the CV32A6 verification strategy, the verification environment and the actual verification process that led to the CV32A60X cores reaching TRL5. + +The development of the environment and the actual verification process of the CV32A6 cores was supported by the TRISTAN project. + +[#_Verification_Strategy] +== Verification Strategy + +To verify the CVA6 core, the starting point are the specification documents as +tailored RISC-V International ISA Manuals, OpenHW Foundation specifications (for CV-X-IF and OBI) and CVA6 CSR specifications. See the link:../../../design/design-manual/source/intro.adoc[design documentation] for all the references. + +As CVA6 as many parameters, currently only one configuration is fully verified according the described strategy. It is the so called CV32A60X core. + +From them, link:../../../../verif/docs/VerifPlans/source/index.rst[DV plans] +are written with the help of VP tool. +For each applicable feature in the specifications, several informations are provided in these plans: +e.g. which kind of tests to use, which criteria for passing, which coverage method, unique tag for traceability, link to coverage model. + +Based on these DV plans, on one hand, functional coverage items are implemented in the UVM test bench +and on the second hand, tests are generated. Afterwards, the tests are executed on the test bench. +To ensure the compliance of the RTL, the tests are simultaneously run on Spike, used as reference model. +According to produced test results, functional and code coverage is computed. +If some items (cover group for functional coverage, line and condition for code coverage) are not covered, it means that generated tests are not sufficient or the RTL itself contains useless code. + +image:./media/verif-strategy.png[./media/verif-strategy,width=723,height=295] + +To fill the holes, tests are added (either by better generation or by writing dedicated tests by hand) +and/or RTL code is adapted. +At the end, the few remaining gaps are fully explained (see GitHub tasks +link:https://github.com/openhwgroup/cva6/issues/2870[2870] and +link:https://github.com/openhwgroup/cva6/issues/2908[2908]). + +The coverage results and the checklist regarding the CV32A60X configuration are available on +link:https://github.com/openhwgroup/programs/tree/master/Project-Descriptions-and-Plans/CV32A60X[OpenHW project level documentation GitHub repository]. + +=== Objectives + +In order to ensure that the implementation of the design conforms to the specification and that all parts of the implementation have been exercised during the verification process, the verification of a design involves three key aspects: + +* the generation of stimuli (through statically defined and/or generated tests), +* the checking of behaviors and properties when the design processes the stimuli, +* the coverage analysis of the RTL code of the implementation. + +The checking of behaviors and properties is usually performed by combining several methods: + +* logical properties defined in the specification are typically represented using assertions that must hold true at all times; +* behaviors (especially complex ones) are checked by comparing the state of the design at the end of a test scenario against a reference state encoded in the test, typically one or more expected register values; +* when a reference model is available, the behaviors of the design can be tested against the behaviors of the reference model. + +The comparison of behaviors of the implementation against a reference model can take two forms: + +* post-mortem trace comparison, whereby simulation traces of the implementation and the reference model are compared once both simulations have completed; +* lock-step or "tandem" simulation, whereby both implementation and reference model simulations advance one step at a time and a state comparison between the implementation and the reference model is performed at a common granularity (typically upon instruction completion and trap entry). + +For the verification of the CV32A60X core, the decision was made to rely as much as possible on tandem simulations, complemented with assertions when micro-architectural properties needed to be verified. +This choice was motivated by several factors: + +* a reference model was already available in the form the Spike instruction set simulator; +* tandem simulations provide quasi-immediate feedback in case of divergence between the behavior of the implementation and that of the referece model; +* the team at Thales has an in-depth knowldege of the RTL implementation, the Spike simulator and the UVM framework developed inside OpenHW Foundation. + +=== Approach + +The verification solution retained for CV32A60X and CV32A65X is to combine the UVM framework and Spike into a tandem simulation environment in which the RTL simulator acts as a master and Spike is the slave (see xref:fig-overall-tandem-flow[xrefstyle=short]): + +* The UVM-based RTL simulation advances until an instruction is committed or a trap in entered; +* If a trap was entered, this fact is notified to the reference model; +* The reference model performs the simulation of one instruction; +* If any CSR registers have been modified by hardware without a corresponding software action, their values are injected into reference model state in place of the values reported by the reference model; +* The hart state reported by the reference model after the single instruction is compared against the state of the RTL model; +* If a difference is found, it is reported to the user; +* If a predefined (and adjustable) number of differences is found, the tandem simulation is aborted. + +The structure and operation of the tandem simulation environment is discussed futher in a xref:tandem/README.adoc[dedicated document] which also provides access to reference documentation for Spike and UVM tandem users and developers. + +.Overall tandem verification flow +[#fig-overall-tandem-flow] +image::tandem/figures/overall-tandem-architecture.svg[Tandem verification flow,800] + +The UVM verification environment used in the verification the CV32A60X and CV32A65X cores is further presented in a xref:verification_environment.adoc[separate CV32A6 UVM environment manual] which describes the architecture of the environment, its elements and their interactions. + +The verification process deployed to verify the CV32A60X and CV32A65X cores to TRL5 is described in the xref:verification_process.adoc[CV32A6 verification process document] that discusses the planning, the execution and the outcomes of the verification process using the CV32A6 UVM environment. + +http://www.tristan-project.eu[_www.tristan-project.eu_] + +_info@tristan-project.eu_ + + +[width="100%",cols="28%,72%",options="header",] + +|=== + +|image:./media/image7.png[Graphical user interface, application Description automatically generated,width=173,height=80] |_TRISTAN has received funding from the Key Digital Technologies Joint Undertaking (KDT JU) under grant agreement nr. 101095947. The KDT JU receives support from the European Union’s Horizon Europe’s research and innovation programme and Austria, Belgium, Bulgaria, Croatia, Cyprus, Czechia, Germany, Denmark, Estonia, Greece, Spain, Finland, France, Hungary, Ireland, Israel, Iceland, Italy, Lithuania, Luxembourg, Latvia, Malta, Netherlands, Norway, Poland, Portugal, Romania, Sweden, Slovenia, Slovakia, Turkey. +|=== diff --git a/docs/04_cv32a65x/tristan/verif-spec/media/axiagentmerge.png b/docs/04_cv32a65x/tristan/verification/media/axiagentmerge.png similarity index 100% rename from docs/04_cv32a65x/tristan/verif-spec/media/axiagentmerge.png rename to docs/04_cv32a65x/tristan/verification/media/axiagentmerge.png diff --git a/docs/04_cv32a65x/tristan/verif-spec/media/frontendsb.png b/docs/04_cv32a65x/tristan/verification/media/frontendsb.png similarity index 100% rename from docs/04_cv32a65x/tristan/verif-spec/media/frontendsb.png rename to docs/04_cv32a65x/tristan/verification/media/frontendsb.png diff --git a/docs/04_cv32a65x/tristan/verif-spec/media/funccovresults.png b/docs/04_cv32a65x/tristan/verification/media/funccovresults.png similarity index 100% rename from docs/04_cv32a65x/tristan/verif-spec/media/funccovresults.png rename to docs/04_cv32a65x/tristan/verification/media/funccovresults.png diff --git a/docs/04_cv32a65x/tristan/verif-spec/media/hvp.png b/docs/04_cv32a65x/tristan/verification/media/hvp.png similarity index 100% rename from docs/04_cv32a65x/tristan/verif-spec/media/hvp.png rename to docs/04_cv32a65x/tristan/verification/media/hvp.png diff --git a/docs/04_cv32a65x/tristan/verif-spec/media/image1.png b/docs/04_cv32a65x/tristan/verification/media/image1.png similarity index 100% rename from docs/04_cv32a65x/tristan/verif-spec/media/image1.png rename to docs/04_cv32a65x/tristan/verification/media/image1.png diff --git a/docs/04_cv32a65x/tristan/verif-spec/media/image2.png b/docs/04_cv32a65x/tristan/verification/media/image2.png similarity index 100% rename from docs/04_cv32a65x/tristan/verif-spec/media/image2.png rename to docs/04_cv32a65x/tristan/verification/media/image2.png diff --git a/docs/04_cv32a65x/tristan/verif-spec/media/image3.png b/docs/04_cv32a65x/tristan/verification/media/image3.png similarity index 100% rename from docs/04_cv32a65x/tristan/verif-spec/media/image3.png rename to docs/04_cv32a65x/tristan/verification/media/image3.png diff --git a/docs/04_cv32a65x/tristan/verif-spec/media/image4.png b/docs/04_cv32a65x/tristan/verification/media/image4.png similarity index 100% rename from docs/04_cv32a65x/tristan/verif-spec/media/image4.png rename to docs/04_cv32a65x/tristan/verification/media/image4.png diff --git a/docs/04_cv32a65x/tristan/verif-spec/media/image5.png b/docs/04_cv32a65x/tristan/verification/media/image5.png similarity index 100% rename from docs/04_cv32a65x/tristan/verif-spec/media/image5.png rename to docs/04_cv32a65x/tristan/verification/media/image5.png diff --git a/docs/04_cv32a65x/tristan/verif-spec/media/image6.png b/docs/04_cv32a65x/tristan/verification/media/image6.png similarity index 100% rename from docs/04_cv32a65x/tristan/verif-spec/media/image6.png rename to docs/04_cv32a65x/tristan/verification/media/image6.png diff --git a/docs/04_cv32a65x/tristan/verif-spec/media/image7.png b/docs/04_cv32a65x/tristan/verification/media/image7.png similarity index 100% rename from docs/04_cv32a65x/tristan/verif-spec/media/image7.png rename to docs/04_cv32a65x/tristan/verification/media/image7.png diff --git a/docs/04_cv32a65x/tristan/verif-spec/media/interrupt_uvm_agent.png b/docs/04_cv32a65x/tristan/verification/media/interrupt_uvm_agent.png similarity index 100% rename from docs/04_cv32a65x/tristan/verif-spec/media/interrupt_uvm_agent.png rename to docs/04_cv32a65x/tristan/verification/media/interrupt_uvm_agent.png diff --git a/docs/04_cv32a65x/tristan/verif-spec/media/rtlparam.png b/docs/04_cv32a65x/tristan/verification/media/rtlparam.png similarity index 100% rename from docs/04_cv32a65x/tristan/verif-spec/media/rtlparam.png rename to docs/04_cv32a65x/tristan/verification/media/rtlparam.png diff --git a/docs/04_cv32a65x/tristan/verif-spec/media/rtlparamgates.png b/docs/04_cv32a65x/tristan/verification/media/rtlparamgates.png similarity index 100% rename from docs/04_cv32a65x/tristan/verif-spec/media/rtlparamgates.png rename to docs/04_cv32a65x/tristan/verification/media/rtlparamgates.png diff --git a/docs/04_cv32a65x/tristan/verif-spec/media/toggleresults.png b/docs/04_cv32a65x/tristan/verification/media/toggleresults.png similarity index 100% rename from docs/04_cv32a65x/tristan/verif-spec/media/toggleresults.png rename to docs/04_cv32a65x/tristan/verification/media/toggleresults.png diff --git a/docs/04_cv32a65x/tristan/verification/media/verif-strategy.png b/docs/04_cv32a65x/tristan/verification/media/verif-strategy.png new file mode 100644 index 00000000000..7a9b1d91907 Binary files /dev/null and b/docs/04_cv32a65x/tristan/verification/media/verif-strategy.png differ diff --git a/docs/04_cv32a65x/tristan/verification/tandem/README.adoc b/docs/04_cv32a65x/tristan/verification/tandem/README.adoc new file mode 100644 index 00000000000..8f4ce9c12b4 --- /dev/null +++ b/docs/04_cv32a65x/tristan/verification/tandem/README.adoc @@ -0,0 +1,126 @@ += CVA6 Tandem Verification +:toc: + +== Quick links + +User manual and technical reference documentation of the tandem simulation framework used in the TRISTAN project can be directly accessed through these links: + +* xref:./tandem-user-guide.adoc[Tandem User Guide] + provides a progressive introduction to tandem simulation using UVM and Spike as deployed for the CV32A60X and CV32A65X cores. +* xref:./uvm-tandem-refman.adoc[UVM Tandem Reference Manual] + describes in detail the UVM-side tandem support. +* xref:./spike-tandem-refman.adoc[Spike Tandem Reference Manual] + contains the programming manual of the Spike part of tandem verification infrastructure. +* xref:./tandem-modifications-for-trl5.adoc[Tandem Modifications for TRL5 Verification of CV32A60X core] + discusses the modifications of Spike and the tandem infrastructure that were necessary to support TRL5 verification of the CV32A60X core. + += Introduction to Tandem Verification + +Tandem-based functional verification of an RTL design consists in a lockstep comparison of the behavior of an RTL implementation against the behavior of a reference model (usually an Instruction Set Simulator, or ISS), both executing the same programs from the same initial state. In opposition to post-execution trace comparison, the tandem approach enables immediate detection of differences in observable behavior of the RTL implementation and the reference model, thus greatly simplifying the investigation of the root causes of any discrepancies. + +The verification is performed on the CVA6 core, with the exclusion of interrupt controllers, platform-related mechanisms (e.g. real-time timer), peripherals etc. + +The behaviors that are verified are: + +* instruction completion +* general-purpose register value changes +* CSR value changes +* memory operations (as seen by the CVA6 core) +* raising of exceptions +* raising of interrupts +* trap entry and return + +== Basic Architecture and Design Choices + +.Overall tandem verification flow +[#fig-overall-tandem-flow] +image::figures/overall-tandem-architecture.svg[Tandem verification flow,1024] + +The tandem simulation environment (see xref:fig-overall-tandem-flow[xrefstyle=short]) consists of: + +* an RTL simulator that models the design and provides a testbench capable of loading programs and reporting changes in design state via a well-defined interface; +* a reference model provided by the Spike ISS that exposes its state on an interface identifcal to that of the RTL simulator; +* a comparison agent that checks if the the state of the RTL simulation and the state of the reference are equivalent. + +To represent simulation state, the OpenHW Group tandem verification environment relies on the use of the RISC-V Formal Interface, or RVFI (https://github.com/SymbioticEDA/riscv-formal/blob/master/docs/rvfi.md). RVFI provides a well-defined abstraction of design state at each instruction commit or exception occurrence. + +RVFI events are collected from both RTL and reference model side, and the RVFI states of both simulations are compared after every step. In the CVA6 RTL implementation, multiple commits or exceptions can occur in a single cycle. If multiple simultaneous events are reported by RVFI, the corresponding entries in the RVFI interface are always ordered in the sequential execution order. For each commit or exception reported by the RVFI interface of the RTL model, the tandem control loop performs a single step of the reference model and compares the RVFI state reported by the RTL simulator and the reference model. + +Since the CVA6 is only a processor core, the simulation of actual program execution requires a minimal platform that will at least contain the memory to store the program and its data and provide a means of loading programs into that memory. The RTL simulation environment provides the required abstractions of platform-level resources and behaviors as part of the testbench. The reference model provides its own platform abstraction which needs to be aligned with the constraints and choices of the RTL platform. For this reason Spike is a prime choice as it contains a superset of the minimum platform needed and its properties can be controlled by means of Spike configuration parameters. + +In order to ease the integration with RTL simulators, the Spike part of tandem infrastructure does not depend on the availability of a fully-featured UVM implementation. Instead, it uses a limited subset of UVM to provide a uniform SystemVerilog interface across all supported RTL simulators, whether commercial or open-source. + +=== Operation + +The principle of operation of CVA6 tandem verification is shown in xref:fig-overall-tandem-flow[xrefstyle=short]. The execution of the tandem simulation is controlled by the main RTL simulation loop that is managed either by the "run" phase of the UVM testbench, or explicitly in a test harness. The RTL simulation runs through successive clock cycles until the RVFI state of the RTL model is marked as valid, indicating an instruction commit or an exception in the current RTL clock cycle. + +Interrupt and debug events detected by the RTL model are injected into the reference model at the beginning of each step. Likewise, the most recent *previously* committed values of microarchitecture-dependent CSRs such as clock cycle counters (`cycle`/`cycleh`, `mcycle`/`mcycleh`) are injected before the reference model step since the RTL values of these registers already correspond to RTL state *after* the corresponding RTL event. + +//.Stages of a single reference model step +//[#fig-refmodel-step] +//image::figures/refmodel-step-stages.svg[Stages of a reference model step,800,opts=inline] + +If a discrepancy in RFVI state is detected, an appropriate human-readable error output is written into the log file and the error count of the simulation is incremented. The tandem simulation stops once a preset number of errors is encountered. By controlling the error count limit is it possible to accommodate transient differences between the RTL and reference model states. A typical example of transient difference occurs when two instructions are committed in a single cycle by a superscalar RTL implementation, causing the counter of retired instructions `minstret` to be atomically incremented by two whereas the reference model will always commit instruction one by one, thus incrementing `minstret` by one each time. + +At the end of a tandem simulation a Yaml report file is produced. It contains information about the test setup (architecture, ISA, test name, etc.) and the list of mismatches found if any. + +For the purpose of CVA6 core verification the core-level interrupt controller (CLIC) is **not** modeled; instead, interrupt management is performed by the testbench. The RTL core model receives interrupt notifications from the testbench through the available interrupt input ports. When the RTL model of the core detects an interrupt, the information about the interrupt is passed to the reference model by reconstructing the value of the `mip` (Machine Interrupt Pending) CSR from the value of the `mcause` register to ensure that the interrupt taken is the same as the one already taken by the RTL simulation. The actual RTL value of the `mip` register may contain additional bits which are set; it will be injected into the reference model state at the end of the reference model step. + +=== Implementation + +The RTL testbenches use DPI functions to control Spike stepping, inject CSR values and query Spike's RVFI interface. + +The selection of single/tandem operation mode is achieved using the SystemVerilog macro `SPIKE_TANDEM`. If defined to a non-zero ("true") value, it enables the tandem configuration in the RTL simulation by instantiating and connecting the Spike wrapper, and activates the stepping and RVFI compare functions. + +The selection of file locations for the Yaml configuration and the Yaml report file locations is performed using dedicated "plusarg" command-line options added to the testbenches: + +* `+config_file=` sets the name of the Yaml configuration file to `` +* `+report_file=` sets the name of the Yaml tandem report file to ``. + +Option `+config_file` should only be used when an appropriate configuration file exists, and should be omitted otherwise. + +SystemVerilog code of the tandem infrastructure is maintained in OpenHW Group repositiory `core-v-verif` (https://github.com/openhwgroup/core-v-verif) which also contains the UVM components and agents that leverage the pure SystemVerilog layer. + +A pure SystemVerilog tandem testbench for CVA6 is available in the OpenHW Group CVA6 repository (https://github.com/openhwgroup/cva6/). + +To limit the impact on the Spike original code base, Spike modifications rely on "shim" (adapter) classes that add extra functionality in two ways: + +* by adding a new base class below the original base class (used for CSRs) +* by specializing a class to provide additional interfaces (Processor and Simulation) + +Spike execution model was modified to run a single-instruction step function instead of the performance-optimized "instruction batch" mode that executes hundreds to thousands of instructions without yielding control to the environment of the simulated design. + +In order to provide fine-grained control over the configuration of the simulated design, Spike was extended with a parameter mechanism with the following characteristics: + +* multiple ways of controlling Spike simulator behavior: +** configuration files (Yaml) +** DPI API +** C++ API +** additional command-line options +* ability to set platform-related values (memory map, boot addresses) +* ability to set implementation-defined values (number of PMP regions in total, vendor ID, architecture ID, implementation ID, ...) +* extended CSR control: +** availability or not of any CSR +** CSR initialization masks and values +** CSR write-enable masks with bit granularity +* ability to inject CSR values from the RTL model for architecture-dependent CSRs (`cycles`/`cyclesh`, `mcycles`/`mcyclesh`, `mip` etc.) + +Spike modifications are maintained in a forked Spike tree integrated into the OpenHW `core-v-verif` repository (https://github.com/openhwgroup/core-v-verif/). + +== Fundamental limitations of the tandem verification approach + +* By definition, a reference model based on an instruction set simulator has only the notion of instruction commits and is not capable of representing the behaviors between commits (transient signals, micro-architectural artefacts such as stalls etc.) ++ +Such behaviors must be verified by other means. + +* Simultaneous occurrence of the same error in both reference model and RTL implementation will not be detected since the two behaviors will match. ++ +This stresses the importance of validation of the reference model against the specification. + +* Since the reference model for tandem verification does not include an interrupt controller, the presence of pending interrupts must be notified to the `mip` register by other means. ++ +In the OpenHW Group solution, the presence of the interrupt is detected by the RTL model and the information about the actual interrupt raised as the result of interrupt arbitration is passed to the reference model in the `mcause` register. The value in `mcause` is then used to trigger the corresponding event in the reference model. + +* Transient discrepancies can be caused by differences between purely sequential and concurrent model execution. ++ +Spike executes instructions in sequence whereas a superscalar architecture may commit multiple instructions in a single cycle; this means that some CSR updates may differ between Spike and RTL, typically MINSTRET may advance by 2 or more in the RTL model, yet Spike will increment it by 1 at every instruction committed. diff --git a/docs/04_cv32a65x/tristan/tandem-verification/figures/Spike-simulation-scope.svg b/docs/04_cv32a65x/tristan/verification/tandem/figures/Spike-simulation-scope.svg similarity index 100% rename from docs/04_cv32a65x/tristan/tandem-verification/figures/Spike-simulation-scope.svg rename to docs/04_cv32a65x/tristan/verification/tandem/figures/Spike-simulation-scope.svg diff --git a/docs/04_cv32a65x/tristan/verification/tandem/figures/interrupt-tandem-scenario-edited.svg b/docs/04_cv32a65x/tristan/verification/tandem/figures/interrupt-tandem-scenario-edited.svg new file mode 100644 index 00000000000..ec291c4cb2a --- /dev/null +++ b/docs/04_cv32a65x/tristan/verification/tandem/figures/interrupt-tandem-scenario-edited.svg @@ -0,0 +1,8677 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + clk + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + int #0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + int #n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bit[0] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bit[n] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bit[0] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bit[n] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + commit0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + i1 + RM + i2 + RM + uarch + i3 + RM + uarch + H1 + RM + H2 + RM + + + + + + + + bit[0] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bit[n] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bit[0] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bit[n] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mcause + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INTn + + + + step + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + i1 + i2 + i3 + H1 + H2 + + + + + + + + + + + + + + + + + + + committed before INTn taken + + + + + + hold and inject MIP/MIE state associated with INTn + + + + r + + + + e + + + + c + + + + f + + + + g + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + int active + + + + + + INT agent + + + + + + mip + + + + + + mie + + + + + + RTL + + + + + + mip + + + + + + mie + + + + + + Spike + + + + + + diff --git a/docs/04_cv32a65x/tristan/verification/tandem/figures/interrupt-tandem-scenario-svg.png b/docs/04_cv32a65x/tristan/verification/tandem/figures/interrupt-tandem-scenario-svg.png new file mode 100644 index 00000000000..e2866fe31f8 Binary files /dev/null and b/docs/04_cv32a65x/tristan/verification/tandem/figures/interrupt-tandem-scenario-svg.png differ diff --git a/docs/04_cv32a65x/tristan/verification/tandem/figures/interrupt-tandem-scenario.wave b/docs/04_cv32a65x/tristan/verification/tandem/figures/interrupt-tandem-scenario.wave new file mode 100644 index 00000000000..2cb93539f83 --- /dev/null +++ b/docs/04_cv32a65x/tristan/verification/tandem/figures/interrupt-tandem-scenario.wave @@ -0,0 +1,52 @@ +// Copyright 2024 Thales DIS France SAS +// +// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +// You may obtain a copy of the License at https://solderpad.org/licenses/ +// +// Original Author: Zbigniew CHAMSKI - Thales + +{signal: [ + { name: 'clk', wave: 'p.PlPlp.Plp|PlPlp'}, + ['INT agent', + ['int active', + {name: 'int #0', wave: '0..........|.....'}, + {name: 'int #n', wave: '01.x.......|.....'}, + ] + ], + {}, + ['RTL', + ['mip', + {name: 'bit[0]', wave: 'x..........|.....'}, + {name: 'bit[n]', wave: '0.1........|.....', + node: '..rC.............'}, + ], + ['mie', + {name: 'bit[0]', wave: '0..........|.....'}, + {name: 'bit[n]', wave: '01..0......|.....', + node: '.e..c............'}, + ], + {name: 'commit0', wave: 'x.72723.723|4242x', data: 'i1 RM i2 RM uarch i3 RM uarch H1 RM H2 RM', + node: '..XCf.....g..J...'}, + ], + { node: '...EF.....GZ.....'}, + ['Spike', + ['mip', + {name: 'bit[0]', wave: 'x..........|.....'}, + {name: 'bit[n]', wave: '0..1.0.....|.....'}, + ], + ['mie', + {name: 'bit[0]', wave: '0..........|.....'}, + {name: 'bit[n]', wave: '0..1.0.....|.....', + node: '.................'}, + ], + {name: 'mcause', wave: 'x..........|.4x..', data: 'INTn'}, + {name: 'step', wave: 'x..7x7x..7x|.4x4x', data: 'i1 i2 i3 H1 H2',}, + {node: '...RS........H...'} + ], + {}, +], + edge: + ['r|X', 'C|R', 'f|F', 'g|G', 'F<->G committed before INTn taken', 'J|H', 'R->H hold and inject MIP/MIE state associated with INTn'], +} diff --git a/docs/04_cv32a65x/tristan/tandem-verification/figures/overall-tandem-architecture.svg b/docs/04_cv32a65x/tristan/verification/tandem/figures/overall-tandem-architecture.svg similarity index 100% rename from docs/04_cv32a65x/tristan/tandem-verification/figures/overall-tandem-architecture.svg rename to docs/04_cv32a65x/tristan/verification/tandem/figures/overall-tandem-architecture.svg diff --git a/docs/04_cv32a65x/tristan/tandem-verification/figures/refmodel-step-stages.svg b/docs/04_cv32a65x/tristan/verification/tandem/figures/refmodel-step-stages.svg similarity index 100% rename from docs/04_cv32a65x/tristan/tandem-verification/figures/refmodel-step-stages.svg rename to docs/04_cv32a65x/tristan/verification/tandem/figures/refmodel-step-stages.svg diff --git a/docs/04_cv32a65x/tristan/tandem-verification/reference.adoc b/docs/04_cv32a65x/tristan/verification/tandem/spike-tandem-refman.adoc similarity index 90% rename from docs/04_cv32a65x/tristan/tandem-verification/reference.adoc rename to docs/04_cv32a65x/tristan/verification/tandem/spike-tandem-refman.adoc index 35109f87723..8ab841b3b66 100644 --- a/docs/04_cv32a65x/tristan/tandem-verification/reference.adoc +++ b/docs/04_cv32a65x/tristan/verification/tandem/spike-tandem-refman.adoc @@ -1,8 +1,10 @@ -== Programming Reference Manual += Tandem Programming Reference Manual: Spike Interface +:toc: -=== Configuration parameter names and scopes -Parameters are referenced by their hierarchical names of the form `PREFIX/PARAM_NAME` that enable a tree-like hierachical structure. Supported values of `PREFIX` are: +== Spike configuration parameter names and scopes + +Parameters are referenced by their hierarchical names of the form `PREFIX/PARAM_NAME` that enable a tree-like hierarchical structure. Supported values of `PREFIX` are: * `/top`: parameter values apply to the complete platform (which may consist of several cores.) * `/top/cores`: parameter values apply to all harts, and can be overridden on a core-by-core basis using core-specific values. @@ -18,9 +20,9 @@ Parameter names are not constrained by the C/C++/SystemVerilog identifier syntax Some parameters are only meaningful in specific scopes: either platform (`/top/`), or core (`/top/cores/` or `/top/core//`). -=== Parameter index +== Parameter index -==== Platform-level parameters +=== Platform-level parameters [cols="1,1,1,5"] |=== @@ -87,7 +89,7 @@ Some parameters are only meaningful in specific scopes: either platform (`/top/` |Number of cores (harts) in the platform. |=== -==== Per-CSR parameters +=== Per-CSR parameters All CSRs of cores in the platform can be controlled wrt. their presence ("availability") using a per-CSR parameter. For each CSR that is available, per-CSR parameters control the initial value, the writable bits and the overall writability of the register. @@ -133,16 +135,21 @@ Depending on the prefix used (`/top/cores/` or `/top/core/`) the core-le |=== |Name |Type |Default |Description -|`boot_addr` -|uint64_t -|`0x10000` -|Boot address for core(s). +|`allow_unmapped_mem_access` +|bool +|`False` +|If `True`, do not raise exceptions upon accessing unmapped memory locations; instead, return zeroes on load and fetch accesses, and do nothing on store accesses. -|`csr_counters_injection` +r|`csr_counters_injection` |bool |`False` |If `True`, inject values of microarchitecture-dependent counter CSRs from RTL into the reference model. Affected CSRs are `cycle`, `cycleh`, `mcycle`, `mcycleh` and `mip`. +|`cvxif_x_num_rs` +|uint64_t +|`3` +|Maximum count of source registers that can be accessed by R4-type instructions of the CV-X-IF interface on this core. + |`debug_exception_handler_addr` |uint64_t |`0x1a140000` @@ -219,7 +226,7 @@ Extensions currently supported: + |`non_standard_interrupts` |bool |`False` -|Support non-standard interrupt notification scheme in which arbitraty patterns can be written into the lower 16 bits of `mie` and `mip` CSRs. +|Support non-standard interrupt notification scheme in which arbitrary patterns can be written into the lower 16 bits of `mie` and `mip` CSRs. |`override_custom_extensions` |bool @@ -268,14 +275,14 @@ Extensions currently supported: + |=== -=== DPI Programming Interface +== DPI Programming Interface The DPI interface is implemented in file `vendor/riscv/riscv-isa-sim/riscv/riscv_dpi.cc` in `core-v-verif` repository (https://github.com/openhwgroup/core-v-verif/). The shared library providing the implementation of the DPI functions to RTL simulators is named `libriscv.so`. It is built during Spike build and is installed in the `lib` subdirectory of Spike installation directory, typically `/tools/spike/lib`. -==== Create a new instance of Spike extended with DPI interfaces suitable for tandem operation +=== Create a new instance of Spike extended with DPI interfaces suitable for tandem operation [,verilog] ---- @@ -334,7 +341,7 @@ Return value: NONE. Before stepping, the entry state of the reference model will be adjusted according to the state of the RTL model. After the step completes, the return state will represent the result of stepping the reference model for one commit (or exception) from the *updated* input state. -==== Set Boolean parameter `` to `` +=== Set Boolean parameter `` to `` [,verilog] ---- @@ -354,7 +361,7 @@ Input args: Return value: NONE. -==== Set uint64_t parameter `` to `` +=== Set uint64_t parameter `` to `` [,verilog] ---- @@ -374,7 +381,7 @@ Input args: Return value: NONE. -==== Set string parameter `` to `` +=== Set string parameter `` to `` [,verilog] ---- @@ -394,7 +401,7 @@ Input args: Return value: NONE. -==== Return the value of Boolean parameter `` +=== Return the value of Boolean parameter `` [,verilog] ---- @@ -413,7 +420,7 @@ Input args: Return value: Current value of Boolean parameter ``. -==== Return the value of uint64_t parameter `` +=== Return the value of uint64_t parameter `` [,verilog] ---- @@ -432,7 +439,7 @@ Input args: Return value: Current value of uint64_t parameter `` -==== Return the value of string parameter `` +=== Return the value of string parameter `` [,verilog] ---- @@ -451,7 +458,7 @@ Input args: Return value: Current value of string parameter ``. -==== Set a collection of parameters from a Yaml configuration file +=== Set a collection of parameters from a Yaml configuration file [,verilog] ---- @@ -465,7 +472,7 @@ extern "C" void spike_set_params_from_file(const char *paramFilePath); Sets parameters of the current Spike instance according to the content of file named ``. -==== Get current value of a Spike CSR of a specific core +=== Get current value of a Spike CSR of a specific core [,verilog] ---- @@ -485,7 +492,7 @@ Input args: Return value: NONE (CSR value is passed in an in-out arg). -==== Set value of a Spike CSR for a specific core +=== Set value of a Spike CSR for a specific core [,verilog] ---- @@ -508,14 +515,14 @@ Return value: NONE. //=== C++ Programming Interface -=== Command-line interface +== Command-line interface Command-line options added to Spike serve a dual purpose: * run Spike in standalone mode using the same configurations as in tandem mode; * (development aid) test the effect of individual parameters without editing configuration files. -==== Load Spike parameters from a configuration file +=== Load Spike parameters from a configuration file [,sh] ---- @@ -526,7 +533,7 @@ Load the parameter tree from Yaml file named ``. The file is expected to contain a valid parameter tree. Parameters which are not recognized will be silently ignored. -==== Set a single Spike parameter +=== Set a single Spike parameter [,sh] ---- diff --git a/docs/04_cv32a65x/tristan/verification/tandem/tandem-modifications-for-trl5.adoc b/docs/04_cv32a65x/tristan/verification/tandem/tandem-modifications-for-trl5.adoc new file mode 100644 index 00000000000..6b29951778e --- /dev/null +++ b/docs/04_cv32a65x/tristan/verification/tandem/tandem-modifications-for-trl5.adoc @@ -0,0 +1,192 @@ += Case Study: Tandem Modifications for TRL5 Verification of CV32A60X +:toc: + +== Introduction + +The CV32A60X core was verified at TRL5 level through tandem co-simulation of the RTL implementation and a Spike reference model in a UVM environment. +Spike operation was primarily controlled by parameters supplied through a core-specific Yaml file. However, during the verification process it appeared that several implementation-dependent choices hardcoded in Spike were in conflict with the choices specified for the CV32A60X core for the corresponding features. +Addressing these differences required additional Spike modifications and the introduction of new parameters not present in the initial version of the tandem infrastructure. Similarly, Spike was not aware of custom ISA extensions such as the CV-X-IF verification instructions. + +The following sections discuss the modifications that were necessary and the way they are addressed in the CVA6 tandem verification infrastructure in order to support TRL5 verificatiom of the CV32A60X and CV32A65X cores. + +== Precise handling of interrupts + +The handling of interrupts in tandem simulation needs to address the fact tha in the RTL implementation, interrupt detection and processing are decoupled because of micro-architectural behavior properties: + +* the occurrence of non-masked interrupts is detected in the "instruction decode" stage of the instruction pipeline; +* the instructions already decoded and the instruction being decoded when the interrupt is detected are executed to completion. + +This is illustrated in xref:fig-tandem-interrupt-scenario[xrefstyle=short]: + +.Interrupt processing scenario in tandem environment +[#fig-tandem-interrupt-scenario] +image::figures/interrupt-tandem-scenario-svg.png[Tandem interrupt scenario,1024] + +where: + +* clock (`clk`) rising edges marked with an upward arrow indicate cycles in which instructions are committed; rising clock edges without an upward arrow correspond to additional RTL clock cycles required by microarchitectural constraints; +* `i1`, `i2`, `i3` are normal instruction flow instructions; the interrupt arrives while decoding instruction `i3`; +* `H1` and `H2` are the first two instructions of the interrupt handler; +* `uarch` stands for RTL cycles in which no commits occur (cf. rising clock edges without an upward arrow marker); +* `RM` stands for **Reference Model** and designates intervals in the RTL-driven tandem simulation when the reference model (Spike) simulation is active rather than the RTL one. + +In the scenario presented in the figure, the arrival of an external interrupt is represented by interrupt line `int #n` being raised by the UVM interrupt agent. +Since the corresponding interrupt enable bit `mie[n]` was already high (marker `e` on RTL `mie[n]` waveform), the raising of the `mip[n]` triggers the `INT#n` interrupt in the core (marker `r` on the RTL `mip[n]` waveform). +The interrupt is memorized in the cycle in which instruction `i1` is ready to be committed. The fact that the `mie[n]` interrupt enable bit corresponding to `int #n` is cleared after committing instruction `i1` has no impact on the already latched interrupt: its presence will be propagated through the instruction pipeline. +However, the corresponding handler will only be entered by the RTL implementation when all three instructions that have already been decoded (`i1`, `i2`, `i3`) will have completed. + +On the other hand, without special provisions the Reference Model (Spike) would observe the arrival of the interrupt when committing instruction `i1`, and would enter the interrupt handler before committing instruction `i2` which does not match the hardware behavior. + +A simple interrupt delaying mechanism consisting in propagating the value of the `mcause` CSR to Spike to indicate that an associated interrupt was taken is **not** reliable either: since the corresponding interrupt enable flag is cleared before the `mcause` notification, Spike will complain that a **disabled** interrupt was taken. + +In order to address this issue correctly, it is necessary to notify the Reference Model of the arrival of a taken interrupt upon committing the instruction that was being decoded when the interrupt arrived, and to provide the memorized `mip` and `mie` context matching the detection of the interrupt. +This mechanism was added to Spike in the CSR injection stage. The information about the *commit* of an instruction associated with an interrupt at decode time is obtained from the RVFI data structures, and the CSR conditions corresponding to the arrival of a non-masked interrupt are maintained inside the Spike tandem interface. + +== Support of instructions with multiple destination registers + +* describe all additions using a diagram to guide the reader: + +** RVFI additions + conventions +** instruction monitor +** new types +** communication channels +** Spike-side UVM interface +** UVM scoreboard and its conventions (no compare of x0, debugging support for reg comparison) + +== Implicit activation of ISA extensions by Spike + +The specification of CV32A60X ISA does not support the `Zifencei` extension. However, Spike activated this extension implicitly at all times. + +**Remedy: ** + +. Modify extension activation policy in the ISA handler class `isa_parser_t` to comply with the content of the ISA string wrt. the presence of extension `Zifencei`. This extension is now activated for a core only if extension name `zifencei` occurs in the ISA string of that core. +. Ensure that the Yaml parameter file of the CV32A60X target does not specify the `zifencei` extension in any ISA strings. + +== Addition of a new ISA extension + +Spike was not aware of the CV-X-IF verification instructions which are custom additions specific to OpenHW Foundation cores. + +**Remedy: ** + +. Add a new custom extension `xcvxif` to the set of supported ISA extensions in the ISA handler class `isa_parser_t` (files `riscv/isa_parser.h`, `disasm/isa_parser.cc`). +. Add suitable mask and match patterns for the CV-X-IF verification instructions to the list of known encodings in file `riscv/encoding.h`. +. Place the definitions of the instructions in a custom Spike extension `cvxif` which is automatically loaded when `xcvxif` ISA extension name is present in an ISA string. + +== Configuration of extensions using parameter files + +The CV-X-IF interface has two modes of operation for instructions with three input operands (so-called *R4-type* instructions): these instructions can use all three input operands or only the first two of them. The mode is controlled by a statically set configuration parameter. The CV32A60X core only uses the first two source registers. + +**Remedy: ** + +. Add a new core-specific parameter `cvxif_x_num_rs` to Spike. +. Let the `cvxif` custom extension store the value of the parameter as part of its internal state and use it to control the execution of R4-type CV-X-IF instructions. +. Pass the value of the parameter to the extension by means of the standard `reset()` method of the `extension_t` class called when resetting the `Processor` class object used to represent a core. +. Modify the Yaml parameter file of the CV32A60X simulation target to set the `cvxif_x_num_rs` parameter to value 2. + +== Behavior of accesses to unmapped memory addresses + +The CV32A60X core is intended for embedded applications and has no memory protection unit. The memory protection is delegated to platform level and the core treats read and fetch accesses to unmapped locations as returning zeroes, and silently ignores writes to unmapped locations. On the other hand Spike implicitly integrates a PMP unit and raises exceptions under these conditions. + +**Remedy: ** + +. Add a new core-specific parameter `allow_unmapped_mem_access` to Spike. +. Modify Spike low-level physical read, fetch and store routines in class `mmu_t` to change behaviour according to the value of the `allow_unmapped_mem_access` parameter. +. Modify the Yaml parameter file of the CV32A60X simulation target to set the `allow_unmapped_mem_access` parameter to `True`. + +== Parameter-only adjustments of Spike behaviour + +The remaining behaviour differences between Spike defaults and the CV32A60X specification could be addressed by already existing parameters: + +* CV32A60X has no writable PMP regions: set the number of writable PMP registers to zero + +[,yaml] +---- + pmpregions_writable: 0 +---- + +* The `misa` register in CV32A60X has the `X` bit cleared even when the `xcvxif` extension is enabled: override the value of bit 23 in `misa` as determined by Spike and replace it with value 0: + +[,yaml] +---- + misa_override_mask: 0x00800000 + misa_override_value: 0x00000000 +---- + + +* The `mtvec` register in CV32A60X is writable, but the `MODE` field of `mtvec` has always value 0 corresponding to *direct mode*: enable writing arbitrary values into bits 31:2 of `mtvec` register but force bits 1:0 to zero + +[,yaml] +---- + mtvec_write_mask: 0xFFFFFFFC + mtvec_override_mask: 0x00000003 + mtvec_override_value: 0x00000000 +---- + +== Appendix: The final Yaml parameter file used for CV32A60X TRL5 verification + +This is a verbatim copy of file config/gen_from_riscv_config/cv32a60x/spike/spike.yaml@b1f80bd7cff3a94e5191aad96dc3a22f87d0a517 (branch `cv32a60x`, tag `cv32a60x-v6.0.0`): + +[,yaml] +---- +spike_param_tree: + bootrom: true + bootrom_base: 65536 + bootrom_size: 4096 + dram: true + dram_base: 2147483648 + dram_size: 1073741824 + generic_core_config: false + max_steps: 200000 + max_steps_enabled: false + isa: rv32imczicsr_zcb_zba_zbb_zbc_zbs_xcvxif + priv: M + core_configs: + - + isa: rv32imczicsr_zcb_zba_zbb_zbc_zbs_xcvxif + extensions: cv32a60x + boot_addr: 2147483648 + marchid_override_mask: 0xFFFFFFFF + marchid_override_value: 0x3 + misa_write_mask: 0x0 + misa_override_mask: 0x00800000 + misa_override_value: 0x00000000 + pmp_granularity: 8 + pmpaddr0: 0 + pmpcfg0: 0 + pmpregions_max: 64 + pmpregions_writable: 0 + priv: M + status_fs_field_we: false + status_fs_field_we_enable: false + status_vs_field_we: false + status_vs_field_we_enable: false + mstatus_write_mask: 136 + mstatus_override_mask: 6144 + mie_write_mask: 0x00000880 + mie_override_mask: 0xfffff77f + mie_override_value: 0x00000000 + mip_write_mask: 0x00000000 + mip_override_mask: 0xfffff77f + mip_override_value: 0x00000000 + mtval_write_mask: 0 + tinfo_accessible: 0 + mscontext_accessible: 0 + mcontext_accessible: 0 + tdata1_accessible: 0 + tdata2_accessible: 0 + tdata3_accessible: 0 + tselect_accessible: 0 + mtvec_write_mask: 0xFFFFFFFC + mtvec_override_mask: 0x00000003 + mtvec_override_value: 0x00000000 + mhartid: 0 + mvendorid_override_mask : 0xFFFFFFFF + mvendorid_override_value: 1538 + csr_counters_injection: true + interrupts_injection: true + unified_traps: true + mcycleh_implemented: false + mhpmevent31_implemented: false + cvxif_x_num_rs: 2 + allow_unmapped_mem_access: true +---- diff --git a/docs/04_cv32a65x/tristan/verification/tandem/tandem-user-guide.adoc b/docs/04_cv32a65x/tristan/verification/tandem/tandem-user-guide.adoc new file mode 100644 index 00000000000..362cc81cfa6 --- /dev/null +++ b/docs/04_cv32a65x/tristan/verification/tandem/tandem-user-guide.adoc @@ -0,0 +1,197 @@ += Tandem-based Verification User Manual +:toc: + +== QuickStart Guide + +=== Build instructions + +The standard build procedure of Spike supplied with the CVA6 project (https://github.com/openhwgroup/cva6/) builds a Spike binary with all necessary modifications required for DPI interfacing to the RTL testbench. + +Building Spike with tandem extensions requires the availability of `CMake` in version 3.16 or higher. The `yaml-cpp` source package (https://github.com/jbeder/yaml-cpp) that is used to parse and manipulate Yaml configurations is a submodule of Spike and will be downloaded when performing a recursive clone or update of the CVA6 repository. + +If a rebuild is required in an existing setup, it is necessary to either select a different installation directory for Spike or to remove the current installation directory of Spike. It is also necessary to remove Spike build directories `verif/core-v-verif/vendor/riscv/riscv-isa-sim/build` (Spike proper) and `verif/core-v-verif/vendor/riscv/riscv-isa-sim/yaml-cpp/build` (`yaml-cpp` library). + +=== Understanding the Spike configuration file + +Spike configuration files represent a Spike parameter tree in the form of nested Yaml dictionaries under a common root node `spike_param_tree`: + +[,yaml] +---- + spike_param_tree: + bootrom_enable: true + bootrom_base: 0x10000 + bootrom_size: 0x1000 + dram_enable: true + dram_base: 0x80000000 + dram_size: 0x40000000 + core_configs: + - + isa: rv32imczicsr_zcb_zba_zbb_zbc_zbs + priv: M + extensions: cv32a60x,cvxif + boot_addr: 0x80000000 + marchid_override_mask: 0xFFFFFFFF + marchid_override_value: 0x3 + misa_write_mask: 0x0 +---- + +The first-level entries define platform properties (`bootrom_*` and `dram_*`) and the default settings for all cores of the system (`core_configs`). + +The configuration fragment above instructs the reference model that: + +* the platform contains a boot ROM of size 4 KiB starting at address 0x10000 (0+64 KiB); +* the platform contains a DRAM memory of 1 GiB starting at the address 0x80000000 (0+2 GiB) +* all cores: +** implement an RV32IMC ISA with extensions `Zicsr`, `Zcb`, `Zba`, `Zbb`, `Zbc` and `Zbs`; +** support only the Machine privilege level; +** implement additional features modeled in Spike custom extensions `cv32a60x` (additional CSRs specific to `CV32A6*X` family of cores) and `cvxif` (the CV-X-IF interface); +** boot from address `0x80000000` (the start address of the DRAM memory); +** force the reset value of register `marchid` to value `0x3` (corresponding to the CVA6 architecture); +** discard writes into `misa` CSR register by marking all its bits as non-mutable. + +=== Running simulations in tandem mode + +Currently, tandem simulations are supported out-of-the-box only for CVA6 target `cv32a65x` using RTL simulator configurations `vcs-uvm` (recommended), `vcs-testharness`, `questa-uvm` and `questa-testharness`. Tandem simulations of target `cv32a65x` with Verilator using the `veri-testharness` configuration require Verilator v5.016 or higher. + +Tandem verification is enabled by setting environment variable `SPIKE_TANDEM` to a non-empty value prior to invoking any of the test scripts located in the `verif/regress` directory of the CVA6 source tree. + +**Example:** +[,sh] +---- +export SPIKE_TANDEM=1 ; bash verif/regress/dv-csr-embedded-tests.sh +---- + +The output of tandem simulation is sent to the log file of the RTL simulator, by default `verif/sim/out_/_sim/..log.iss`. + +A machine-processable Yaml report file summarizing the mismatches detected during the simulation is stored in a separate report file, by default `verif/sim/out_/_sim/..log.yaml`. It contains the configuration of the simulated design, the number of mismatches that were found (if any) and a list of entries describing the successive mismatches. + +== How to analyze tandem verification results + +To simplify failure analysis, the RVFI state comparator reports mismatches between commit states of the reference model and the RTL model at all verbosity levels. However, it produces no output if the commit states are identical and the verbosity level is `UVM_LOW`. By controlling output verbosity, the simulation log can be reduced to the sole list of state discrepancies, or it can contain a complete log of commits and exceptions to provide additional context at failure locations. + +A scoreboard discrepancy is represented by a line describing the nature of the error, followed by two lines that provide a summary view of the RVFI state of the reference model and the RTL core. + +**Example:** +[,text] +---- +CSR 304 Mismatch [REF]: 0x0 [CORE]: 0x8 +UVM_INFO @ 45992.000 ns : uvmc_rvfi_scoreboard_utils.sv(206) reporter [spike_tandem] 45992.000 ns | RVFI | 0 | 0 | 800036ac | 30419073 | M | x3 | 00000008 | x0 | 0000000000000000 | csrrw zero, mie, gp +UVM_ERROR @ 45992.000 ns : uvmc_rvfi_scoreboard_utils.sv(211) reporter [spike_tandem] 45992.000 ns | RVFI | 0 | 0 | 800036ac | 30419073 | M | x3 | 00000008 | x0 | 0000000000000000 | csrrw zero, mie, gp <- CORE +---- + +The first line indicates that for current instruction commit the content of the CSR with hexadecimal address `304`, i.e., `mie` ("Machine Interrupt Enable") differs between the reference model (value `0x0`) and the RTL core model (value `0x8`). The next two lines provide details about the current instruction in both models: + +* the current time stamp: `45992.000 ns`, +* the value of PC: `0x800036ac`, +* the encoding of the instruction: hex `30419073`, +* the current privilege mode: `M` (Machine), +* the values of general-purpose register operands of the instruction: `x3` (`gp` in RISC-V ABI) equals `0x00000008`, `x0` equals `0x00000000`. + +Since the values stored into the `mie` CSR differ whereas the instruction executed is the same including the values of its input operands, the discrepancy can only come from the write behavior of the `mie` CSR. In this specific case, bit 3 of the `mie` register is specified as "read-only zero" in the reference model, yet the RTL implementation accepts writes into this specific bit of `mie`. + +The following is the corresponding fragment from the Yaml report, including the configuration and status summary of the simulation run: + +[,yaml] +---- +csrs_match_count: 461 +exit_cause: MISMATCH +exit_code: 0 +instr_count: 3280 +isa: rv32imc_zba_zbb_zbs_zbc_zicsr_zifencei +mismatch_description: 'CSR 304 Mismatch [REF]: 0x880 [CORE]: 0x888 ' +mismatches: +- 0: null + core: + insn: 0000000030419073 + insn_disasm: csrrw zero, mie, gp + mode: 3 + pc_rdata: 00000000800036ac + pc_wdata: 0 + rd1_addr: 0 + rd1_rdata: 0 + rs1_addr: 3 + rs1_rdata: 0000000000000008 + trap: 0 + reference_model: + insn: 0000000030419073 + insn_disasm: csrrw zero, mie, gp + mode: 3 + pc_rdata: 00000000800036ac + pc_wdata: 0 + rd1_addr: 0 + rd1_rdata: 0 + rs1_addr: 3 + rs1_rdata: 0000000000000008 + trap: 0 +[...] +mismatches_count: 5 +simulator: vcs-uvm +target: cv32a65x +test: csr_test +testlist: csr_embedded +---- + +== Example uses of Yaml reference model parameters + +=== Enable (make "accessible") or disable (make "inaccessible") a CSR + +A Boolean parameter consisting of CSR name and suffix `_accessible`, placed in generic or per-core configuration, indicates whether the given register should be accessible or not. + +**Example**: + +[,yaml] +---- +spike_param_tree: + ... + core_configs: + - + ... + tinfo_accessible: False +---- + +makes the `tinfo` CSR inaccessible in the reference model for all cores, meaning that any attempt to access (read or write) the `tinfo` register when executing an instruction in the reference model will trigger an illegal instruction exception. + +=== Force specific bits in a CSR to a constant value + +The reference model parameters provide two levels of control over the content of CSRs: + +* override the reset value of selected bits of any CSR; +* define which bits of a CSR cannot be modified. + +Assuming that bit 5 of a certain CSR `` should always be set irrespective of the default setting in the reference model, it is necessary to indicate that: + +* the reset value of that bit should be 1; +* writes to that bit should be ignored. + +The parameters needed to express this property are: + +* `_override_mask` which defines which bits of `` should be forced to a specific value at reset, +* `_override_value` which indicates the reset value of the forced bits of ``, +* `_write_mask` which indicates which bits of `` are writable (mask bit is set) and which are not (mask bit is cleared). + +Assuming that the XLEN is 32 and only bit 5 of `` should be fixed, the Yaml settings to use are: + +[,yaml] +---- +spike_param_tree: + ... + core_configs: + - + ... + _override_mask: 0x00000020 + _override_value: 0x00000020 + _write_mask: 0xffffffdf +---- + +== Integration with the RISC-V Open Source ecosystem + +* The entire tandem verification infrastructure is available as Open Source under SHL 2.0+ (an Apache-type license) in OpenHW Group repositories `cva6` (https://github.com/openhwgroup/cva6/) and `core-v-verif` (https://github.com/openhwgroup/cva6/). + +* The OpenHW Group tandem verification infrastructure relies on Spike (https://github.com/riscv-software-src/riscv-isa-sim/) as reference model. ++ +The tandem verification approach is a general template and is not bound to a single ISS or RTL simulator. However, it requires that the ISS provides a basic platform capable of running software matching the capabilities of the RTL testbench, including a model of memory and buses. +Because of this constraint the current tandem framework relies on Spike which is fully Open Source and provides all necessary components. + +* Verilator-based tandem verification ++ +Starting with version 5.016, Verilator supports tandem simulations. Earlier versions did not provide sufficient support for structured types in the DPI interface. diff --git a/docs/04_cv32a65x/tristan/verification/tandem/uvm-tandem-refman.adoc b/docs/04_cv32a65x/tristan/verification/tandem/uvm-tandem-refman.adoc new file mode 100644 index 00000000000..9ddf0265e51 --- /dev/null +++ b/docs/04_cv32a65x/tristan/verification/tandem/uvm-tandem-refman.adoc @@ -0,0 +1,8 @@ += [PLACEHOLDER] UVM Tandem Support: the Reference Manual +:toc: + +== Architectue of UVM Tandem Support + +== UVM Programmer's View + +== Adapting tandem support to new targets diff --git a/docs/04_cv32a65x/tristan/verif-spec/verification_specifications.adoc b/docs/04_cv32a65x/tristan/verification/verification_environment.adoc similarity index 76% rename from docs/04_cv32a65x/tristan/verif-spec/verification_specifications.adoc rename to docs/04_cv32a65x/tristan/verification/verification_environment.adoc index b7b59b27e14..c5bafee2004 100644 --- a/docs/04_cv32a65x/tristan/verif-spec/verification_specifications.adoc +++ b/docs/04_cv32a65x/tristan/verification/verification_environment.adoc @@ -1,93 +1,10 @@ -[.text-center] -*TRISTAN* += CV32A6 Verification Environment: Structure and Organization +:toc: -[.text-center] -*Together for RISc-V Technology and ApplicatioNs* - -[.text-center] -image:./media/image1.png[./media/image1,width=273,height=273] - -[.text-center] -*Verification Specifications* - -*Project Website* www.tristan-project.eu - -*JU Grant Agreement Number* 101095947 - -[width="100%",cols="40%,60%",options="header",] - -|=== - -|image:./media/image2.png[./media/image2,width=172,height=81] |TRISTAN - -has received funding from the Key Digital Technologies Joint Undertaking -(KDT JU) under grant agreement nr. 101095947. The KDT JU receives support from the European Union’s Horizon Europe’s research and innovation programme and Austria, Belgium, Bulgaria, Croatia, Cyprus, Czechia, Germany, Denmark, Estonia, Greece, Spain, Finland, France, Hungary, Ireland, Israel, Iceland, Italy, Lithuania, Luxembourg, Latvia, Malta, Netherlands, Norway, Poland, Portugal, Romania, Sweden, Slovenia, Slovakia, Turkey - -|=== - -== Table of Contents - -. link:#_Introduction[Introduction] - -.. General Information - -.. Acronyms and Definitions - -. link:#_Verification_Strategy[Verification Strategy] - -.. Methodology - -.. Database Structure - -.. Tools - -.. Planned releases - -. link:#_Testbench[Testbench] - -.. Testbench Architecture - -.. Testbench Block-Diagram - -.. Testbench Components - -... Agents - -... UVCs - -... Checkers - -... Assertions - -... UVM Scoreboard - -... Coverage Model - -... Write or Generate Tests - -. link:#_Verification_Plan[Verification Plan] - -.. - -.. - -. link:#_Verification_Reports[Verification Reports] - -.. Regression Results - -.. Functional coverage - -.. Code coverage - -.. SpyGlass integration - -.. RTL issues detected - -[#_Introduction] == Introduction === General Information -This document describes the CVA6 verification strategy and implementation. +This document describes the structure and organization of the CV32A6 verification environment which was developed with partial support of the TRISTAN project. === Acronyms and Definitions @@ -105,10 +22,10 @@ This document describes the CVA6 verification strategy and implementation. |SV | SystemVerilog |VIF | Virtual InterFace |AXI | Advanced eXtensible Interface +|ISS | Instruction Set Simulator +|RM | Reference Model |=== -[#_Verification_Strategy] -== Verification Strategy === Methodology This project is not a single verification environment that can support any-and-all CORE-V cores. Rather, it supports the verification of multiple cores by enabling the rapid creation of core-specific verification environments. There is no attempt to define a one-size-fits-all environment as these inevitably lead to either bloated code, needless complexity, or both. Instead, the idea is to create a toolkit allowing the rapid development of core-specific environments using a set of high-level reusable components and a standard UVM framework. @@ -119,7 +36,7 @@ The core-v-verif project exploits this idea to maximize re-use across multiple c Depending on the details of the top-level interfaces of individual cores, the lowest layers of this environment may not be re-usable at all. -=== Database Structure +=== UVM Database Structure The verification environment, built from the resources provided by core-v-verif project can be conceptually divided into four levels: Testbench Layer, Translation Layer, Abstraction Layer and Test Layer. Each of these will be discussed in turn. @@ -404,7 +321,7 @@ This class has the expected functionality following UVM standards. It receives t *_[.underline]#Axi Agent#_* -This agent is an AXI4 (Advanced eXtensible Interface) SV UVM1.1 SLAVE. Aligned to AXI4 AMBA spec https://developer.arm.com/documentation/ihi0022/hc +This agent is an AXI4 (Advanced eXtensible Interface) SV UVM1.1 SLAVE. Aligned to AXI4 spec https://developer.arm.com/documentation/ihi0022/hc [.underline]#Agent Architecture:# @@ -479,7 +396,7 @@ This collaboration is also important for the open-source community, as it enable It is described in a previous section of this document. ===== Agent developed by CEA -The AXI superset agent is a highly configurable AXI agent. It is based on the AMBA AXI and ACE Protocol Specification from ARM(https://developer.arm.com/documentation/ihi0022/g/). It provides the functionality of AXI master and AXI slave. In the master mode, it provides the sequences/APIs to drive READ/WRITE/ATOP transactions. In the slave mode, the agent uses an external memory to perform response. +The AXI superset agent is a highly configurable AXI agent. It is based on the AXI and ACE Protocol Specification from ARM(https://developer.arm.com/documentation/ihi0022/g/). It provides the functionality of AXI master and AXI slave. In the master mode, it provides the sequences/APIs to drive READ/WRITE/ATOP transactions. In the slave mode, the agent uses an external memory to perform response. ===== Enhancement The idea was to merge the master part of the CEA agent with the Thales slave agent and create one agent supporting both slave and master functionality, incorporating all AXI4 features and the potential to support additional functionality from AXI5. The agent must also support external memory in slave mode. @@ -677,131 +594,7 @@ Our verification environment has functional coverage also, define with several c * *_AXI_*: provide functional coverage relate to AXI protocol. -To know all the functional coverage related to the CVA6 only is define in the environment, like CVXIF custom instruction, and soma AXI features. - -==== Write or Generate Tests -Testing is a crucial part of the verification process. Different types of tests are employed: - -* Generate assembly tests using CVA6-DV: Uses the RISCV-DV framework to generate assembly-level test programs for the CVA6 core. RISCV-DV is a flexible and extensible tool used for generating RISC-V architecture assembly programs to stress-test the core. The extensions to RISCV-DV are available at (https://github.com/openhwgroup/cva6/tree/master/verif/env/corev-dv). -* Write directed assembly tests: These are manually written test cases designed to target specific behaviors or edge cases that are not covered by automated test generation. - - - -[#_Verification_Plan] -== Verification Plan - -The DVPlans are available at (https://github.com/openhwgroup/cva6/tree/master/verif/docs/VerifPlans). - -=== - -* ISA DVPlan: Focuses on verifying the Instruction Set Architecture (ISA) to ensure the core executes instructions correctly. -* CV-XIF DVPlan: This covers the verification of the Core-View External Interface (CV-XIF), likely to be an interface protocol used for communication between the core and external components. It mentions that this plan is for the first version and will require updates as the protocol evolves. -* AXI DVPlan: Deals with the verification of the AXI (Advanced eXtensible Interface). -* Traps DVPlan: Verifies the behavior of the core when exceptions, interrupts, or traps occur. -* CSRs DVPlan: Focuses on verifying the control and status registers (CSRs), which are key for managing the operation of the core. - -=== - -* Frontend DVPlan: Verifies the frontend part of the core, which involves instruction fetching, next pc generation, pre-decoding instruction and RET/Branch prediction. - -[#_Verification_Reports] -== Verification Reports - -=== Regression Results - -* 2000+ tests running on the server: specifically, 2112 tests are executed as part of the regression process, which runs the entire suite of tests repeatedly to ensure that changes or updates do not introduce new bugs. All tests passed, which indicates a stable design at this stage. - -[cols="1,1,1,1,1"] -|=== -| -|ISA -|Traps -|CSRs -|Data hazard - -|Generated tests -|900 -|449 -|450 -|300 - -|Directed tests -|6 -|2 -|5 -|0 -|=== - -* Scripts handling failed tests: A script is used to automatically remove failing tests from the coverage database. This ensures that the coverage report is based solely on tests that pass, meaning the coverage metrics are representative of correctly functioning parts of the design. - - -=== Functional coverage - -* Create HVP in the CVA6 env to track functional coverage: HVP refers to "Hierarchical Verification Plan," which helps monitor and track the functional coverage of the tests. The goal is to ensure that all functional aspects of the core are exercised during the verification. Functional coverage measures how much of the design’s intended functionality has been exercised. -The functional coverage is split in several parts: - - * Programmer view level: it corresponds to CVA6 from the perspective of the programmer (architectural view): ISA, CSRs, and traps. - * Design level: it corresponds to the different parts of the CVA6 pipeline (micro-architectural view). - -image:./media/hvp.png[./media/hvp,width=624,height=190] - -* 98.09% functional coverage for programmer view level: Achieving 98.09% coverage is an excellent result, indicating that most of the ISA (Instruction Set Architecture), CSRs (Control and Status Registers), and traps (interrupt and exception handling) have been tested thoroughly. - -image:./media/funccovresults.png[./media/funccovresults,width=426,height=93] - -* Justificative report for coverage holes: This refers to generating a report explaining any missing coverage (the 1.91% not covered). This might happen due to untested corner cases or unsupported configurations. - -* Regarding the design level, the 6.65% coverage result is poor as only the frontend stage of the CVA6 pipeline is currently addressed. - - -=== Code coverage - -* The coverage of line and condition was low, primarily due to unsupported features in the CV32A65X configuration. -* The solution was to parameterize the RTL to make it configurable, remove dead code from the coverage report, and eliminate dead gates from the netlist. -* To achieve this, we used the VCS switch “-cm_seqnoconst -diag noconst” to automatically exclude constant variables and inaccessible code from the coverage analysis. -* An example of the implementation is provided below: - -image:./media/rtlparam.png[./media/rtlparam,width=624,height=161] - -* The gain of parameterization for only MMU and FPU: - -image:./media/rtlparamgates.png[./media/rtlparamgates,width=975,height=92] - -* We encountered the same problem with toggle coverage, and the score was very low compared to that of line and condition coverage. -* We can’t use the same options applied for line and condition coverage because we can’t parameterize the interface signals. Additionally, the VCS simulator only tracks constant signals if they are directly assigned to a constant value. -* For example, if the aw_user signal from the AXI interface is directly assigned to '0', the simulator will exclude the signal from toggle coverage. However, if aw_user is assigned to another signal, even if that signal is constant, the simulator will take no action. -* To address this, the solution is to generate an exclusion file based on the results of a Python script that detects unsupported signals according to your configuration. (More details about the script) -* Low toggle coverage initially (50%): Toggle coverage refers to how often signals switch between states during simulation. Initially, only 50% of the signals in the design were toggling, which suggests that a significant portion of the design was not being exercised. - -image:./media/toggleresults.png[./media/toggleresults,width=241,height=70] - -* Issue with unsupported signals for configuration: The problem was that some signals were unsupported in the current design configuration. A Python script was used to identify these unsupported signals, and an exclusion file was generated to exclude these signals from code coverage, ensuring accurate reporting. - -==== What is missing in code coverage - -* CV-XIF tests: An update of the Core-View External Interface (CV-X-IF) protocol (version 1.0) is available, and the verification tests hadn’t been updated to reflect these changes. This gap in testing impacts code coverage, as some parts of the design using this protocol may remain untested. -The verification work of CV-X-IF v1.0 will be done in the ISOLDE project. -* Dead code: There is still some "dead code" in the design, code that is never executed. This could indicate unnecessary or outdated features that need to be either removed or refactored. - -=== SpyGlass integration - -SpyGlass is a static analysis tool used to find potential issues in RTL code, such as linting errors, coding style violations, and design rule checks. The verification effort involved: - -* Adding SpyGlass support from scratch: This included setting up scripts, Makefiles, and other infrastructure to integrate SpyGlass into the CVA6 verification environment. -* Integrating SpyGlass into regression tests: SpyGlass was included in the regression process so that any RTL changes would automatically be checked for issues. -* Reporting results in a dashboard: The results of the SpyGlass runs were compared with previous runs, and reports were generated to track progress, likely in a dashboard for easy visualization of errors and trends. - -=== RTL issues detected - -RTL (Register Transfer Level) bugs have been detected in various areas of the CVA6 design thanks to verification: - -* ISA bugs: Bugs in the instruction set implementation. -* Traps: Bugs in how the core handles exceptions and interrupts. -* CSRs: Bugs related to control and status registers. -* CV-X-IF: Bugs related to the CV-X-IF protocol. -* AXI: Bugs related to the AXI protocol. - -All issues are described in CVA6 GitHub repository (https://github.com/openhwgroup/cva6/issues?q=label%3AType%3ABug). +To know all the functional coverage related to the CVA6 only is define in the environment, like CVXIF custom instruction, and some AXI features. http://www.tristan-project.eu[_www.tristan-project.eu_] diff --git a/docs/04_cv32a65x/tristan/verification/verification_process.adoc b/docs/04_cv32a65x/tristan/verification/verification_process.adoc new file mode 100644 index 00000000000..96fe10024f6 --- /dev/null +++ b/docs/04_cv32a65x/tristan/verification/verification_process.adoc @@ -0,0 +1,163 @@ += CV32A6 Verification Process: Planning, Execution and Outcomes +:toc: + +== Introduction +=== General Information + +This document describes the CV32A6 verification process, focussing on the creation of verification plans, the use of the environment to verify the CV32A60X and CV32A65X designs to TRL5, and reports on the outcomes of the process. This process was defined and deployed with partial support from the TRISTAN project. + +=== Acronyms and Definitions + +[width="100%",cols="24%,76%",options="header",] + +|=== +|Acronym |Description +|TB |Testbench +|UVC |Universal verification component +|IF |SystemVerilog Interface +|CVXIF |CORE-V eXtension Interface +|UVM | Universal Verification Methodology +|RVFI | RISC-V Formal Interface +|DUT | Device Under Test +|SV | SystemVerilog +|VIF | Virtual InterFace +|AXI | Advanced eXtensible Interface +|ISS | Instruction Set Simulator +|RM | Reference Model +|=== + +==== Write or Generate Tests +Testing is a crucial part of the verification process. Different types of tests are employed: + +* Generate assembly tests using CVA6-DV: Uses the RISCV-DV framework to generate assembly-level test programs for the CVA6 core. RISCV-DV is a flexible and extensible tool used for generating RISC-V architecture assembly programs to stress-test the core. The extensions to RISCV-DV are available at (https://github.com/openhwgroup/cva6/tree/master/verif/env/corev-dv). +* Write directed assembly tests: These are manually written test cases designed to target specific behaviors or edge cases that are not covered by automated test generation. + + + +[#_Verification_Plan] +== Verification Plan + +The DVPlans are available at (https://github.com/openhwgroup/cva6/tree/master/verif/docs/VerifPlans). + +=== + +* ISA DVPlan: Focuses on verifying the Instruction Set Architecture (ISA) to ensure the core executes instructions correctly. +* CV-XIF DVPlan: This covers the verification of the Core-View External Interface (CV-XIF), likely to be an interface protocol used for communication between the core and external components. It mentions that this plan is for the first version and will require updates as the protocol evolves. +* AXI DVPlan: Deals with the verification of the AXI (Advanced eXtensible Interface). +* Traps DVPlan: Verifies the behavior of the core when exceptions, interrupts, or traps occur. +* CSRs DVPlan: Focuses on verifying the control and status registers (CSRs), which are key for managing the operation of the core. + +=== + +* Frontend DVPlan: Verifies the frontend part of the core, which involves instruction fetching, next pc generation, pre-decoding instruction and RET/Branch prediction. + +[#_Verification_Reports] +== Verification Reports + +=== Regression Results + +* 2000+ tests running on the server: specifically, 2112 tests are executed as part of the regression process, which runs the entire suite of tests repeatedly to ensure that changes or updates do not introduce new bugs. All tests passed, which indicates a stable design at this stage. + +[cols="1,1,1,1,1"] +|=== +| +|ISA +|Traps +|CSRs +|Data hazard + +|Generated tests +|900 +|449 +|450 +|300 + +|Directed tests +|6 +|2 +|5 +|0 +|=== + +* Scripts handling failed tests: A script is used to automatically remove failing tests from the coverage database. This ensures that the coverage report is based solely on tests that pass, meaning the coverage metrics are representative of correctly functioning parts of the design. + + +=== Functional coverage + +* Create HVP in the CVA6 env to track functional coverage: HVP refers to "Hierarchical Verification Plan," which helps monitor and track the functional coverage of the tests. The goal is to ensure that all functional aspects of the core are exercised during the verification. Functional coverage measures how much of the design’s intended functionality has been exercised. +The functional coverage is split in several parts: + + * Programmer view level: it corresponds to CVA6 from the perspective of the programmer (architectural view): ISA, CSRs, and traps. + * Design level: it corresponds to the different parts of the CVA6 pipeline (micro-architectural view). + +image:./media/hvp.png[./media/hvp,width=624,height=190] + +* 98.09% functional coverage for programmer view level: Achieving 98.09% coverage is an excellent result, indicating that most of the ISA (Instruction Set Architecture), CSRs (Control and Status Registers), and traps (interrupt and exception handling) have been tested thoroughly. + +image:./media/funccovresults.png[./media/funccovresults,width=426,height=93] + +* Justificative report for coverage holes: This refers to generating a report explaining any missing coverage (the 1.91% not covered). This might happen due to untested corner cases or unsupported configurations. + +* Regarding the design level, the 6.65% coverage result is poor as only the frontend stage of the CVA6 pipeline is currently addressed. + + +=== Code coverage + +* The coverage of line and condition was low, primarily due to unsupported features in the CV32A65X configuration. +* The solution was to parameterize the RTL to make it configurable, remove dead code from the coverage report, and eliminate dead gates from the netlist. +* To achieve this, we used the VCS switch “-cm_seqnoconst -diag noconst” to automatically exclude constant variables and inaccessible code from the coverage analysis. +* An example of the implementation is provided below: + +image:./media/rtlparam.png[./media/rtlparam,width=624,height=161] + +* The gain of parameterization for only MMU and FPU: + +image:./media/rtlparamgates.png[./media/rtlparamgates,width=975,height=92] + +* We encountered the same problem with toggle coverage, and the score was very low compared to that of line and condition coverage. +* We can’t use the same options applied for line and condition coverage because we can’t parameterize the interface signals. Additionally, the VCS simulator only tracks constant signals if they are directly assigned to a constant value. +* For example, if the aw_user signal from the AXI interface is directly assigned to '0', the simulator will exclude the signal from toggle coverage. However, if aw_user is assigned to another signal, even if that signal is constant, the simulator will take no action. +* To address this, the solution is to generate an exclusion file based on the results of a Python script that detects unsupported signals according to your configuration. (More details about the script) +* Low toggle coverage initially (50%): Toggle coverage refers to how often signals switch between states during simulation. Initially, only 50% of the signals in the design were toggling, which suggests that a significant portion of the design was not being exercised. + +image:./media/toggleresults.png[./media/toggleresults,width=241,height=70] + +* Issue with unsupported signals for configuration: The problem was that some signals were unsupported in the current design configuration. A Python script was used to identify these unsupported signals, and an exclusion file was generated to exclude these signals from code coverage, ensuring accurate reporting. + +==== What is missing in code coverage + +* CV-XIF tests: An update of the Core-View External Interface (CV-X-IF) protocol (version 1.0) is available, and the verification tests hadn’t been updated to reflect these changes. This gap in testing impacts code coverage, as some parts of the design using this protocol may remain untested. +The verification work of CV-X-IF v1.0 will be done in the ISOLDE project. +* Dead code: There is still some "dead code" in the design, code that is never executed. This could indicate unnecessary or outdated features that need to be either removed or refactored. + +=== SpyGlass integration + +SpyGlass is a static analysis tool used to find potential issues in RTL code, such as linting errors, coding style violations, and design rule checks. The verification effort involved: + +* Adding SpyGlass support from scratch: This included setting up scripts, Makefiles, and other infrastructure to integrate SpyGlass into the CVA6 verification environment. +* Integrating SpyGlass into regression tests: SpyGlass was included in the regression process so that any RTL changes would automatically be checked for issues. +* Reporting results in a dashboard: The results of the SpyGlass runs were compared with previous runs, and reports were generated to track progress, likely in a dashboard for easy visualization of errors and trends. + +=== RTL issues detected + +RTL (Register Transfer Level) bugs have been detected in various areas of the CVA6 design thanks to verification: + +* ISA bugs: Bugs in the instruction set implementation. +* Traps: Bugs in how the core handles exceptions and interrupts. +* CSRs: Bugs related to control and status registers. +* CV-X-IF: Bugs related to the CV-X-IF protocol. +* AXI: Bugs related to the AXI protocol. + +All issues are described in CVA6 GitHub repository (https://github.com/openhwgroup/cva6/issues?q=label%3AType%3ABug). + +http://www.tristan-project.eu[_www.tristan-project.eu_] + +_info@tristan-project.eu_ + + +[width="100%",cols="28%,72%",options="header",] + +|=== + +|image:./media/image7.png[Graphical user interface, application Description automatically generated,width=173,height=80] |_TRISTAN has received funding from the Key Digital Technologies Joint Undertaking (KDT JU) under grant agreement nr. 101095947. The KDT JU receives support from the European Union’s Horizon Europe’s research and innovation programme and Austria, Belgium, Bulgaria, Croatia, Cyprus, Czechia, Germany, Denmark, Estonia, Greece, Spain, Finland, France, Hungary, Ireland, Israel, Iceland, Italy, Lithuania, Luxembourg, Latvia, Malta, Netherlands, Norway, Poland, Portugal, Romania, Sweden, Slovenia, Slovakia, Turkey. +|=== diff --git a/docs/05_cva6_apu/cva6_testharness.md b/docs/05_cva6_apu/cva6_testharness.md index 958838df029..338d6add74f 100644 --- a/docs/05_cva6_apu/cva6_testharness.md +++ b/docs/05_cva6_apu/cva6_testharness.md @@ -128,7 +128,7 @@ Only the signals related to the test_harness have been shown in the above diagra ## PLIC -PLIC is a slave in this SoC. The hiearchy through which the request is propagated to the plic_top module is as follows: +PLIC is a slave in this SoC. The hierarchy through which the request is propagated to the plic_top module is as follows: ![plic_hierarchy](_static/plic.png ) diff --git a/docs/07_cv32a60x/index.rst b/docs/07_cv32a60x/index.rst new file mode 100644 index 00000000000..0d0669c016c --- /dev/null +++ b/docs/07_cv32a60x/index.rst @@ -0,0 +1,17 @@ +CV32A60X documentation +====================== + +.. toctree:: + :maxdepth: 1 + +.. + riscv/unpriv.rst + riscv/priv.rst + +Below are links to RISC-V ISA documents tailored for the CV32A60X and to CV32A60X-specific design documentation. +Only those CSRs and Instructions that are supported by the CV32A60X are documented here. + +| `Unprivileged RISC-V ISA `_ +| `Privileged RISC-V ISA `_ +| `Design Documentation for CV32A60X `_ + diff --git a/docs/07_cv32a60x/riscv/Makefile b/docs/07_cv32a60x/riscv/Makefile new file mode 100644 index 00000000000..85540807ba4 --- /dev/null +++ b/docs/07_cv32a60x/riscv/Makefile @@ -0,0 +1,10 @@ +# Copyright 2025 Thales DIS France SAS +# Licensed under the Solderpad Hardware License, Version 2.1 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Original Author: André Sintzoff - Thales DIS + +CONFIG := cv32a60x +include ../../riscv-isa/build.mk diff --git a/docs/07_cv32a60x/riscv/priv.rst b/docs/07_cv32a60x/riscv/priv.rst new file mode 100644 index 00000000000..b6e0a8d8cd1 --- /dev/null +++ b/docs/07_cv32a60x/riscv/priv.rst @@ -0,0 +1,14 @@ +.. + Copyright (c) 2025 Thales DIS France SAS + Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 + You may obtain a copy of the License at https://solderpad.org/licenses/ + + Original Author: André Sintzoff - Thales DIS + +Privileged RISC-V ISA +===================== + +.. raw:: html + :file: priv-isa-cv32a60x.html diff --git a/docs/07_cv32a60x/riscv/unpriv.rst b/docs/07_cv32a60x/riscv/unpriv.rst new file mode 100644 index 00000000000..ed4ce544780 --- /dev/null +++ b/docs/07_cv32a60x/riscv/unpriv.rst @@ -0,0 +1,14 @@ +.. + Copyright (c) 2025 Thales DIS France SAS + Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 + You may obtain a copy of the License at https://solderpad.org/licenses/ + + Original Author: André Sintzoff - Thales DIS + +Unprivileged RISC-V ISA +======================= + +.. raw:: html + :file: unpriv-isa-cv32a60x.html diff --git a/docs/Makefile b/docs/Makefile index 0e7527e7055..567c13ceb64 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -6,6 +6,8 @@ prepare: make -C 06_cv64a6_mmu/riscv priv-html unpriv-html + make -C 07_cv32a60x/riscv priv-html unpriv-html + sphinx: sphinx-build . _build diff --git a/docs/common/config_define.adoc b/docs/common/config_define.adoc index 3d7952b36db..6003998f7f2 100644 --- a/docs/common/config_define.adoc +++ b/docs/common/config_define.adoc @@ -1,12 +1,21 @@ +ifeval::["{ohg-config}"=="CV32A60X"] +:archi-CVA6: +:archi-CV32A60X: +// specify that it is a custom architecture +:archi-not-default: +endif::[] + ifeval::["{ohg-config}"=="CV32A65X"] :archi-CVA6: +:archi-CV32A65X: // specify that it is a custom architecture :archi-not-default: endif::[] ifeval::["{ohg-config}"=="CV64A6_MMU"] :archi-CVA6: +:archi-CV64A6_MMU: // specify that it is a custom architecture :archi-not-default: endif::[] diff --git a/docs/csr-from-ip-xact/cv32a60ax/cva6_csr.md b/docs/csr-from-ip-xact/cv32a60ax/cva6_csr.md index 87fd36c732e..8b1f08755b5 100644 --- a/docs/csr-from-ip-xact/cv32a60ax/cva6_csr.md +++ b/docs/csr-from-ip-xact/cv32a60ax/cva6_csr.md @@ -171,7 +171,7 @@ The ``sip`` register contains information on pending interrupts. | 4 | UTIP | | read-write,WARL | A user\-level timer interrupt is pending if the UTIP bit in the sip register is set\.``Legal Values:``0\.| | 3:2 | Reserved_2 | Reserved | read-write,WARL | Reserved\.``Legal Values:``0\.| | 1 | SSIP | Supervisor-level software interrupt pending | read-only,WARL | SSIP is the interrupt\-pending bit for supervisor\-level software interrupts\.| -| 0 | USIP | | read-write,WARL | A user\-level software interrupt is triggered on the current hart by riting 1 to its user software interrupt\-pending \(USIP\) bit\.``Legal Values:``0\.| +| 0 | USIP | | read-write,WARL | A user\-level software interrupt is triggered on the current hart by writing 1 to its user software interrupt\-pending \(USIP\) bit\.``Legal Values:``0\.| ## Supervisor Address Translation and Protection Register ### *AddressOffset*: 'h180 @@ -259,7 +259,7 @@ This register contains machine interrupt enable bits. | 3 | MSIE | M-mode software interrupt enable | read-write | Enables machine mode software interrupts\.| | 2 | Reserved_2 | Reserved | read-write,WARL | Reserved\.``Legal Values:``0\.| | 1 | SSIE | S-mode software interrupt enable | read-write,WARL | Enables supervisor mode software interrupts\.| -| 0 | USIE | | read-write,WARL | enable U\-mode software interrrupts\.``Legal Values:``0\.| +| 0 | USIE | | read-write,WARL | enable U\-mode software interrupts\.``Legal Values:``0\.| ## Machine Trap Vector Register ### *AddressOffset*: 'h305 @@ -426,7 +426,7 @@ Address register for Physical Memory Protection. | --- | ----------- | ------------ | ------ | -------------------------------------------------------------------- | | 31:0 | address | Address | read-write,WARL | Address register for Physical Memory Protection\.| -## Instuction Cache Register +## Instruction Cache Register ### *AddressOffset*: 'h7C0 ### *Description*: Custom Register to enable/disable for Icache [bit 0] @@ -487,13 +487,13 @@ Shows trigger information. ## Debug Control and Status Register ### *AddressOffset*: 'h7B0 ### *Description*: -Debug ontrol and status register. +Debug control and status register. | BIT | NAME | displayName | RIGHT | Description | | --- | ----------- | ------------ | ------ | -------------------------------------------------------------------- | | 31:28 | xdebugver | Debug version | read-only | Shows the version of the debug support\. // ``Enumerated Values``( "no_ext_debug" :0 ) ( "ext_debug_spec" :4 ) ( "ext_debug_no_spec" :15 ) | -| 15 | ebreakm | Environment breakpoint m-mode | read-write | Shows the behvior of the ``ebreak`` instruction in machine mode\. // ``Enumerated Values``( "break_as_spec" :0 ) ( "break_to_debug" :1 ) | -| 13 | ebreaks | Environment breakpoint s-mode | read-write | Shows the behvior of the ``ebreak`` instruction in supervisor mode\. // ``Enumerated Values``( "break_as_spec" :0 ) ( "break_to_debug" :1 ) | -| 12 | ebreaku | Environment breakpoint u-mode | read-write | Shows the behvior of the ``ebreak`` instruction in user mode\. // ``Enumerated Values``( "break_as_spec" :0 ) ( "break_to_debug" :1 ) | +| 15 | ebreakm | Environment breakpoint m-mode | read-write | Shows the behavior of the ``ebreak`` instruction in machine mode\. // ``Enumerated Values``( "break_as_spec" :0 ) ( "break_to_debug" :1 ) | +| 13 | ebreaks | Environment breakpoint s-mode | read-write | Shows the behavior of the ``ebreak`` instruction in supervisor mode\. // ``Enumerated Values``( "break_as_spec" :0 ) ( "break_to_debug" :1 ) | +| 12 | ebreaku | Environment breakpoint u-mode | read-write | Shows the behavior of the ``ebreak`` instruction in user mode\. // ``Enumerated Values``( "break_as_spec" :0 ) ( "break_to_debug" :1 ) | | 11 | stepie | Stepping interrupt enable | read-write,WARL | Enables/disables interrupts for single stepping\. The debugger must not change the value of this bit while the hart is running\. // ``Enumerated Values``( "disabled" :0 ) ( "enabled" :1 ) | | 10 | stopcount | Stop counters | read-write,WARL | Starts/stops incrementing counters in debug mode\. // ``Enumerated Values``( "increment_counters" :0 ) ( "dont_increment_counters" :1 ) | | 9 | stoptime | Stop timers | read-write,WARL | Starts/stops incrementing timers in debug mode\. // ``Enumerated Values``( "increment_timers" :0 ) ( "dont_increment_timers" :1 ) | @@ -844,11 +844,11 @@ Instructions-retired counter for RDINSTRET instruction ## Machine Vendor ID Register ### *AddressOffset*: 'hF11 ### *Description*: -This register provids the JEDEC manufacturer ID of the provider of the core. +This register provides the JEDEC manufacturer ID of the provider of the core. | BIT | NAME | displayName | RIGHT | Description | | --- | ----------- | ------------ | ------ | -------------------------------------------------------------------- | | 31:7 | bank | Bank | read-only | Contain encoding for number of one\-byte continuation codes discarding the parity bit\.| -| 6:0 | offset | Offset | read-only | Contain encording for the final byte discarding the parity bit\.| +| 6:0 | offset | Offset | read-only | Contain encoding for the final byte discarding the parity bit\.| ## Machine Architecture ID Register ### *AddressOffset*: 'hF12 diff --git a/docs/csr-from-ip-xact/cv32a60ax/cva6_csr.rst b/docs/csr-from-ip-xact/cv32a60ax/cva6_csr.rst index f4190bb896d..24ba5f3a043 100644 --- a/docs/csr-from-ip-xact/cv32a60ax/cva6_csr.rst +++ b/docs/csr-from-ip-xact/cv32a60ax/cva6_csr.rst @@ -570,7 +570,7 @@ The ``sip`` register contains information on pending interrupts. - USIP - - read-write,WARL - - A user-level software interrupt is triggered on the current hart by riting 1 to its user software interrupt-pending \(USIP\) bit.``Legal Values:`` 0. + - A user-level software interrupt is triggered on the current hart by writing 1 to its user software interrupt-pending \(USIP\) bit.``Legal Values:`` 0. Supervisor Address Translation and Protection Register ------------------------------------------------------ @@ -888,7 +888,7 @@ This register contains machine interrupt enable bits. - USIE - - read-write,WARL - - enable U-mode software interrrupts.``Legal Values:`` 0. + - enable U-mode software interrupts.``Legal Values:`` 0. Machine Trap Vector Register ---------------------------- @@ -1428,7 +1428,7 @@ Address register for Physical Memory Protection. - read-write,WARL - Address register for Physical Memory Protection. -Instuction Cache Register +Instruction Cache Register -------------------------- AddressOffset: 'h7C0 -------------------------- @@ -1605,7 +1605,7 @@ AddressOffset: 'h7B0 -------------------------- Description: -------------------------- -Debug ontrol and status register. +Debug control and status register. .. list-table:: :widths: 20 20 15 15 40 @@ -1625,7 +1625,7 @@ Debug ontrol and status register. - ebreakm - Environment breakpoint m-mode - read-write - - Shows the behvior of the ``ebreak`` instruction in machine mode. ``Enumerated Values`` ( "break_as_spec" :0)( "break_to_debug" :1)'\n' + - Shows the behavior of the ``ebreak`` instruction in machine mode. ``Enumerated Values`` ( "break_as_spec" :0)( "break_to_debug" :1)'\n' * - 13 - ebreaks - Environment breakpoint s-mode @@ -2651,7 +2651,7 @@ AddressOffset: 'hF11 -------------------------- Description: -------------------------- -This register provids the JEDEC manufacturer ID of the provider of the core. +This register provides the JEDEC manufacturer ID of the provider of the core. .. list-table:: :widths: 20 20 15 15 40 @@ -2671,7 +2671,7 @@ This register provids the JEDEC manufacturer ID of the provider of the core. - offset - Offset - read-only - - Contain encording for the final byte discarding the parity bit. + - Contain encoding for the final byte discarding the parity bit. Machine Architecture ID Register -------------------------------- diff --git a/docs/csr-from-ip-xact/cv32a60ax/cva6_csr.xml b/docs/csr-from-ip-xact/cv32a60ax/cva6_csr.xml index f6c12612c8f..0feeceeb2b4 100644 --- a/docs/csr-from-ip-xact/cv32a60ax/cva6_csr.xml +++ b/docs/csr-from-ip-xact/cv32a60ax/cva6_csr.xml @@ -1130,7 +1130,7 @@ The value loaded into ``stval`` on an illegal-instruction exception is right-jus USIP - A user-level software interrupt is triggered on the current hart by riting 1 to its user software interrupt-pending (USIP) bit.``Legal Values:``0. + A user-level software interrupt is triggered on the current hart by writing 1 to its user software interrupt-pending (USIP) bit.``Legal Values:``0. 0 @@ -2066,7 +2066,7 @@ with the index of the bit position equal to the value returned in the ``mcause`` USIE - enable U-mode software interrrupts.``Legal Values:``0. + enable U-mode software interrupts.``Legal Values:``0. 0 @@ -2910,7 +2910,7 @@ If ``mtval`` is written with a nonzero value when an instruction access-fault or icache - Instuction Cache + Instruction Cache Custom Register to enable/disable for Icache [bit 0] 'h7C0 32 @@ -3218,7 +3218,7 @@ If ``type`` is not writable, this register may be unimplemented, in which case r dcsr Debug Control and Status - Debug ontrol and status register. + Debug control and status register. 'h7B0 32 true @@ -3258,7 +3258,7 @@ If ``type`` is not writable, this register may be unimplemented, in which case r ebreakm Environment Breakpoint M-mode - Shows the behvior of the ``ebreak`` instruction in machine mode. + Shows the behavior of the ``ebreak`` instruction in machine mode. 15 @@ -3284,7 +3284,7 @@ If ``type`` is not writable, this register may be unimplemented, in which case r ebreaks Environment Breakpoint S-mode - Shows the behvior of the ``ebreak`` instruction in supervisor mode. + Shows the behavior of the ``ebreak`` instruction in supervisor mode. 13 @@ -3310,7 +3310,7 @@ If ``type`` is not writable, this register may be unimplemented, in which case r ebreaku Environment Breakpoint U-mode - Shows the behvior of the ``ebreak`` instruction in user mode. + Shows the behavior of the ``ebreak`` instruction in user mode. 12 @@ -4614,7 +4614,7 @@ When resuming, the hart’s PC is updated to the virtual address stored in ``dpc mvendorid Machine Vendor ID - This register provids the JEDEC manufacturer ID of the provider of the core. + This register provides the JEDEC manufacturer ID of the provider of the core. 'hF11 32 true @@ -4637,7 +4637,7 @@ When resuming, the hart’s PC is updated to the virtual address stored in ``dpc offset Offset - Contain encording for the final byte discarding the parity bit. + Contain encoding for the final byte discarding the parity bit. 0 diff --git a/docs/csr-from-ip-xact/cv32a60ax/cva6_csr.yaml b/docs/csr-from-ip-xact/cv32a60ax/cva6_csr.yaml index 7b9ed4f7ff8..c0bfeff8c51 100644 --- a/docs/csr-from-ip-xact/cv32a60ax/cva6_csr.yaml +++ b/docs/csr-from-ip-xact/cv32a60ax/cva6_csr.yaml @@ -801,7 +801,7 @@ component: vendorExtensions: RISCV_behavior: WARL - name: USIP - description: A user-level software interrupt is triggered on the current hart by riting 1 to its user software interrupt-pending (USIP) bit.``Legal Values:``0. + description: A user-level software interrupt is triggered on the current hart by writing 1 to its user software interrupt-pending (USIP) bit.``Legal Values:``0. bitOffset: '0' resets: reset: @@ -2072,7 +2072,7 @@ component: vendorExtensions: privilege_mode: M - name: icache - displayName: Instuction Cache + displayName: Instruction Cache description: Custom Register to enable/disable for Icache [bit 0] addressOffset: "'h7C0" size: '32' diff --git a/docs/csr-from-ip-xact/cv32a60x/csr.rst b/docs/csr-from-ip-xact/cv32a60x/csr.rst index 4ff553a2704..9fc79270357 100644 --- a/docs/csr-from-ip-xact/cv32a60x/csr.rst +++ b/docs/csr-from-ip-xact/cv32a60x/csr.rst @@ -116,7 +116,7 @@ The ``mstatus`` register keeps track of and controls the hart’s current operat - Indicates whether machine interrupts were enabled prior to trapping into machine mode\. ``Enumerated Values``( "Disabled" :0)( "Enabled" :1)'\n' * - 6 - UBE - - User mode bit endianess + - User mode bit endianness - 0x0 - read-write,WARL - UBE controls whether explicit load and store memory accesses made from U\-mode are little\-endian or big\-endian\.``Legal Values``:0\. ``Enumerated Values``( "Little-endian" :0)( "Big-endian" :1)'\n' @@ -289,7 +289,7 @@ This register contains machine interrupt enable bits. - - 0x0 - read-write,WARL - - enable U\-mode software interrrupts\.``Legal Values:``0\. + - enable U\-mode software interrupts\.``Legal Values:``0\. MTVEC:Machine Trap Vector Register -------------------------- @@ -348,13 +348,13 @@ The ``mstatush`` is the upper 32-bits of Machine status only for RV32. - Reserved * - 4 - SBE - - Supervisor mode bit endianess + - Supervisor mode bit endianness - 0x0 - read-write,WARL - SBE controls whether explicit load and store memory accesses made from S\-mode are little\-endian or big\-endian\.``Legal Values``:0\. ``Enumerated Values``( "Little-endian" :0)( "Big-endian" :1)'\n' * - 5 - MBE - - Machine mode bit endianess + - Machine mode bit endianness - 0x0 - read-write,WARL - MBE controls whether explicit load and store memory accesses made from M\-mode are little\-endian or big\-endian\.``Legal Values``:0\. ``Enumerated Values``( "Little-endian" :0)( "Big-endian" :1)'\n' @@ -3646,7 +3646,7 @@ AddressOffset: 'hF11 -------------------------- Description: -------------------------- -This register provids the JEDEC manufacturer ID of the provider of the core. +This register provides the JEDEC manufacturer ID of the provider of the core. .. list-table:: :widths: 20 20 15 10 15 40 @@ -3669,7 +3669,7 @@ This register provids the JEDEC manufacturer ID of the provider of the core. - Offset - 0x2 - read-only - - Contain encording for the final byte discarding the parity bit\. + - Contain encoding for the final byte discarding the parity bit\. MARCHID:Machine Architecture ID Register -------------------------- diff --git a/docs/csr-from-ip-xact/cv32a60x/cv32a60mx_csr.md b/docs/csr-from-ip-xact/cv32a60x/cv32a60mx_csr.md index 42b74e652ad..be8e5e0ca0c 100644 --- a/docs/csr-from-ip-xact/cv32a60x/cv32a60mx_csr.md +++ b/docs/csr-from-ip-xact/cv32a60x/cv32a60mx_csr.md @@ -28,7 +28,7 @@ The ``mstatus`` register keeps track of and controls the hart’s current operat | 10:9 | VS | Vector extension state | 0x0 | read-only,WARL | V extension is not supported\.``Legal Values``:0\.| | 8 | SPP | Supervisor mode prior privilege | 0x0 | read-write | Holds the previous privilege mode for supervisor mode\. // ``Enumerated Values``( "U-mode" :0 ) ( "Otherwise" :1 ) | | 7 | MPIE | Machine mode prior interrupt enable | 0x0 | read-write | Indicates whether machine interrupts were enabled prior to trapping into machine mode\. // ``Enumerated Values``( "Disabled" :0 ) ( "Enabled" :1 ) | -| 6 | UBE | User mode bit endianess | 0x0 | read-write,WARL | UBE controls whether explicit load and store memory accesses made from U\-mode are little\-endian or big\-endian\.``Legal Values``:0\. // ``Enumerated Values``( "Little-endian" :0 ) ( "Big-endian" :1 ) | +| 6 | UBE | User mode bit endianness | 0x0 | read-write,WARL | UBE controls whether explicit load and store memory accesses made from U\-mode are little\-endian or big\-endian\.``Legal Values``:0\. // ``Enumerated Values``( "Little-endian" :0 ) ( "Big-endian" :1 ) | | 5 | SPIE | Supervisor mode prior interrupt enable | 0x0 | read-write | Indicates whether supervisor interrupts were enabled prior to trapping into supervisor mode\. // ``Enumerated Values``( "Disabled" :0 ) ( "Enabled" :1 ) | | 4 | reserved_1 | Reserved | 0x0 | read-write,WPRI | Reserved| | 3 | MIE | Machine mode interrupt enable | 0x0 | read-write | Global interrupt\-enable bit for Machine mode\. // ``Enumerated Values``( "Disabled" :0 ) ( "Enabled" :1 ) | @@ -64,7 +64,7 @@ This register contains machine interrupt enable bits. | 3 | MSIE | M-mode software interrupt enable | 0x0 | read-write | Enables machine mode software interrupts\.| | 2 | Reserved_2 | Reserved | 0x0 | read-write,WARL | Reserved\.``Legal Values:``0\.| | 1 | SSIE | S-mode software interrupt enable | 0x0 | read-write,WARL | Enables supervisor mode software interrupts\.| -| 0 | USIE | | 0x0 | read-write,WARL | enable U\-mode software interrrupts\.``Legal Values:``0\.| +| 0 | USIE | | 0x0 | read-write,WARL | enable U\-mode software interrupts\.``Legal Values:``0\.| ## MTVEC : Machine Trap Vector Register ### *AddressOffset*: 'h305 @@ -82,8 +82,8 @@ The ``mstatush`` is the upper 32-bits of Machine status only for RV32. | BIT | NAME | displayName |Reset| RIGHT | Description | | --- | ----------- | ------------ |-----| ------ | -------------------------------------------------------------------- | | 3:0 | reserved_0 | Reserved | 0x0 | read-write,WPRI | Reserved| -| 4 | SBE | Supervisor mode bit endianess | 0x0 | read-write,WARL | SBE controls whether explicit load and store memory accesses made from S\-mode are little\-endian or big\-endian\.``Legal Values``:0\. // ``Enumerated Values``( "Little-endian" :0 ) ( "Big-endian" :1 ) | -| 5 | MBE | Machine mode bit endianess | 0x0 | read-write,WARL | MBE controls whether explicit load and store memory accesses made from M\-mode are little\-endian or big\-endian\.``Legal Values``:0\. // ``Enumerated Values``( "Little-endian" :0 ) ( "Big-endian" :1 ) | +| 4 | SBE | Supervisor mode bit endianness | 0x0 | read-write,WARL | SBE controls whether explicit load and store memory accesses made from S\-mode are little\-endian or big\-endian\.``Legal Values``:0\. // ``Enumerated Values``( "Little-endian" :0 ) ( "Big-endian" :1 ) | +| 5 | MBE | Machine mode bit endianness | 0x0 | read-write,WARL | MBE controls whether explicit load and store memory accesses made from M\-mode are little\-endian or big\-endian\.``Legal Values``:0\. // ``Enumerated Values``( "Little-endian" :0 ) ( "Big-endian" :1 ) | | 31:6 | reserved_1 | Reserved | 0x0 | read-write,WPRI | Reserved| ## MHPMEVENT3 : Machine Hardware Performance-Monitoring Event Selector Register @@ -1115,11 +1115,11 @@ Instructions-retired counter for RDINSTRET instruction. Shadow of minstreth. ## MVENDORID : Machine Vendor ID Register ### *AddressOffset*: 'hF11 ### *Description*: -This register provids the JEDEC manufacturer ID of the provider of the core. +This register provides the JEDEC manufacturer ID of the provider of the core. | BIT | NAME | displayName |Reset| RIGHT | Description | | --- | ----------- | ------------ |-----| ------ | -------------------------------------------------------------------- | | 31:7 | bank | Bank | 0xC | read-only | Contain encoding for number of one\-byte continuation codes discarding the parity bit\.| -| 6:0 | offset | Offset | 0x2 | read-only | Contain encording for the final byte discarding the parity bit\.| +| 6:0 | offset | Offset | 0x2 | read-only | Contain encoding for the final byte discarding the parity bit\.| ## MARCHID : Machine Architecture ID Register ### *AddressOffset*: 'hF12 diff --git a/docs/csr-from-ip-xact/cv32a60x/cv32a60mx_csr.xml b/docs/csr-from-ip-xact/cv32a60x/cv32a60mx_csr.xml index 32bc2c9be09..f216d9e59c9 100644 --- a/docs/csr-from-ip-xact/cv32a60x/cv32a60mx_csr.xml +++ b/docs/csr-from-ip-xact/cv32a60x/cv32a60mx_csr.xml @@ -424,7 +424,7 @@ UBE - User mode Bit Endianess + User mode Bit Endianness UBE controls whether explicit load and store memory accesses made from U-mode are little-endian or big-endian.``Legal Values``:0. 6 @@ -998,7 +998,7 @@ USIE - enable U-mode software interrrupts.``Legal Values:``0. + enable U-mode software interrupts.``Legal Values:``0. 0 @@ -1108,7 +1108,7 @@ SBE - Supervisor mode Bit Endianess + Supervisor mode Bit Endianness SBE controls whether explicit load and store memory accesses made from S-mode are little-endian or big-endian.``Legal Values``:0. 4 @@ -1135,7 +1135,7 @@ MBE - Machine mode Bit Endianess + Machine mode Bit Endianness MBE controls whether explicit load and store memory accesses made from M-mode are little-endian or big-endian.``Legal Values``:0. 5 @@ -4757,7 +4757,7 @@ If ``mtval`` is written with a nonzero value when an instruction access-fault or mvendorid Machine Vendor ID - This register provids the JEDEC manufacturer ID of the provider of the core. + This register provides the JEDEC manufacturer ID of the provider of the core. 'hF11 32 true @@ -4780,7 +4780,7 @@ If ``mtval`` is written with a nonzero value when an instruction access-fault or offset Offset - Contain encording for the final byte discarding the parity bit. + Contain encoding for the final byte discarding the parity bit. 0 diff --git a/docs/design/design-manual/source/AXI_Interface.adoc b/docs/design/design-manual/source/AXI_Interface.adoc index 1da1cf31c0d..2430cd5c042 100644 --- a/docs/design/design-manual/source/AXI_Interface.adoc +++ b/docs/design/design-manual/source/AXI_Interface.adoc @@ -16,7 +16,7 @@ Introduction ^^^^^^^^^^^^ In this chapter, we describe in detail the restriction that apply to the supported features. -In order to understand how the AXI memory interface behaves in CVA6, it is necessary to read the AMBA AXI and ACE Protocol Specification (https://developer.arm.com/documentation/ihi0022/hc) and this chapter. +In order to understand how the AXI memory interface behaves in CVA6, it is necessary to read the AXI and ACE Protocol Specification (https://developer.arm.com/documentation/ihi0022/hc) and this chapter. _Applicability of this chapter to configurations:_ @@ -31,7 +31,7 @@ _Applicability of this chapter to configurations:_ About the AXI4 protocol +++++++++++++++++++++++ -The AMBA AXI protocol supports high-performance, high-frequency system designs for communication between Manager and Subordinate components. +The AXI protocol supports high-performance, high-frequency system designs for communication between Manager and Subordinate components. The AXI protocol features are: @@ -61,7 +61,7 @@ AXI4 and CVA6 The AXI bus protocol is used with the CVA6 processor as a memory interface. Since the processor is the one that initiates the connection with the memory, it will have a manager interface to send requests to the subordinate, which will be the memory. -Features supported by CVA6 are the ones in the AMBA AXI4 specification and the Atomic Operation feature from AXI5. With restriction that apply to some features. +Features supported by CVA6 are the ones in the AXI4 specification and the Atomic Operation feature from AXI5. With restriction that apply to some features. This doesn’t mean that all the full set of signals available on an AXI interface are supported by the CVA6. Nevertheless, all required AXI signals are implemented. @@ -747,7 +747,7 @@ _Write Strobe width is equal to (AXI_DATA_WIDTH/8) (n = (AXI_DATA_WIDTH/8)-1)._ _The size of transactions performed by cva6 is equal to the number of data byte lanes containing valid information._ _This means 1, 2, 4, ... or (AXI_DATA_WIDTH/8) byte lanes containing valid information._ -_CVA6 doesn't perform unaligned memory acces, therefore the WSTRB take only combination of aligned access_ +_CVA6 doesn't perform unaligned memory access, therefore the WSTRB take only combination of aligned access_ _If(RV32) WSTRB < 255 (Since AWSIZE lower than 3, so the data bus cannot have more than 4 valid byte lanes)_ *Unaligned transfers* @@ -829,7 +829,7 @@ If the CVA6 requires ordering between transactions that have no ordering guarant Memory locations and Peripheral regions (Section A6.2) ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -The address map in AMBA is made up of Memory locations and Peripheral regions. But the AXI is associated to the memory interface of CVA6. +The address maps in some bus specifications can differentiate Memory locations and Peripheral regions. But the AXI is associated to the memory interface of CVA6. A Memory location has all of the following properties: @@ -873,7 +873,7 @@ An interface that exhibits Ordered Write Observation gives guarantees for write Atomic transactions (Section E1.1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -AMBA 5 introduces Atomic transactions, which perform more than just a single access and have an operation that is associated with the transaction. Atomic transactions enable sending the operation to the data, permitting the operation to be performed closer to where the data is located. Atomic transactions are suited to situations where the data is located a significant distance from the agent that must perform the operation. +AXI 5 introduces Atomic transactions, which perform more than just a single access and have an operation that is associated with the transaction. Atomic transactions enable sending the operation to the data, permitting the operation to be performed closer to where the data is located. Atomic transactions are suited to situations where the data is located a significant distance from the agent that must perform the operation. _If(RVA) AWATOP = 0 (If AMO instructions are not supported, CVA6 cannot perform Atomic transaction)_ diff --git a/docs/design/design-manual/source/CVX_Interface_Coprocessor.adoc b/docs/design/design-manual/source/CVX_Interface_Coprocessor.adoc index cfdfdf86071..0ca23120d3b 100644 --- a/docs/design/design-manual/source/CVX_Interface_Coprocessor.adoc +++ b/docs/design/design-manual/source/CVX_Interface_Coprocessor.adoc @@ -41,7 +41,7 @@ The specification of the CV-X-IF bus protocol can be found at [CV-X-IF]. CV-X-IF aims to: * Create interfaces to connect a coprocessor to the CVA6 to execute instructions. -* Offload CVA6 illegal instrutions to the coprocessor to be executed. +* Offload CVA6 illegal instructions to the coprocessor to be executed. * Get the results of offloaded instructions from the coprocessor so they are written back into the CVA6 register file. * Add standard RISC-V instructions unsupported by CVA6 or custom instructions and implement them in a coprocessor. * Kill offloaded instructions to allow speculative execution in the coprocessor. (Unsupported in CVA6 yet) @@ -234,7 +234,7 @@ Here is _how_ and _to what_ CV-X-IF interfaces are connected to the CVA6. *** [verse] -- Result response is directly connected to writeback bus of the CV-X-IF - functionnal unit. + functional unit. -- *** [verse] -- @@ -283,7 +283,7 @@ CVA6 supports all coprocessors supporting the CV-X-IF specification with the exc is not big enough to have RVC and a custom compressed extension. * Stateful coprocessors.:: ** CVA6 will commit on the Commit interface all its issue transactions. Speculation - informations are only kept in the CVA6 and speculation process is only done in CVA6. + information is only kept in the CVA6 and speculation process is only done in CVA6. The coprocessor shall be stateless otherwise it will not be able to revert its state if CVA6 kills an in-flight instruction (in case of mispredict or flush). diff --git a/docs/design/design-manual/source/Traps_Interrupts_Exceptions.adoc b/docs/design/design-manual/source/Traps_Interrupts_Exceptions.adoc index 078e02584e4..48764d6251d 100644 --- a/docs/design/design-manual/source/Traps_Interrupts_Exceptions.adoc +++ b/docs/design/design-manual/source/Traps_Interrupts_Exceptions.adoc @@ -4,7 +4,7 @@ Traps, Interrupts, Exceptions Traps are composed of interrupts and exceptions. Interrupts are asynchronous events whereas exceptions are synchronous ones. -On one hand, interrupts are occuring independently of the instructions +On one hand, interrupts are occurring independently of the instructions (mainly raised by peripherals or debug module). On the other hand, an instruction may raise exceptions synchronously. diff --git a/docs/design/design-manual/source/cva6_execute.adoc b/docs/design/design-manual/source/cva6_execute.adoc index 55f98719cfe..f39802ffb35 100644 --- a/docs/design/design-manual/source/cva6_execute.adoc +++ b/docs/design/design-manual/source/cva6_execute.adoc @@ -98,7 +98,7 @@ include::port_load_store_unit.adoc[] The store_unit module manages the data store operations. -As stores can be speculative, the store instructions need to be committed by ISSUE_STAGE module before possibily altering the processor state. +As stores can be speculative, the store instructions need to be committed by ISSUE_STAGE module before possibly altering the processor state. Store buffer keeps track of store requests. Outstanding store instructions (which are speculative) are differentiated from committed stores. When ISSUE_STAGE module commits a store instruction, outstanding stores @@ -121,7 +121,7 @@ It stalls until it can satisfy the current request. This means: * Two loads to the same address are allowed. * Two stores to the same address are allowed. * A store after a load to the same address is allowed. -* A load after a store to the same address can only be processed if the store has already been sent to the cache i.e there is no fowarding. +* A load after a store to the same address can only be processed if the store has already been sent to the cache i.e there is no forwarding. After the check of the store buffer, a read request is sent to the D$ with the index field of the address (1). The load unit stalls until the D$ acknowledges this request (2). diff --git a/docs/design/design-manual/source/cva6_frontend.adoc b/docs/design/design-manual/source/cva6_frontend.adoc index ced4d04ffc6..925a3de448b 100644 --- a/docs/design/design-manual/source/cva6_frontend.adoc +++ b/docs/design/design-manual/source/cva6_frontend.adoc @@ -28,7 +28,7 @@ FRONTEND can fetch up to {instr-per-fetch} instructions per cycle, but DECODE mo The module is connected to: -* CACHES module provides fethed instructions to FRONTEND. +* CACHES module provides fetched instructions to FRONTEND. * DECODE module receives instructions from FRONTEND. * CONTROLLER module can order to flush and to halt FRONTEND PC gen stage * EXECUTE, CONTROLLER, CSR and COMMIT modules trigger PC jumping due to @@ -57,8 +57,8 @@ cases are considered: ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ 1. When the instruction is a JALR which corresponds to a return (rs1 = x1 or rs1 = x5). RAS provides next PC as a prediction. -2. When the instruction is a JALR which *does not* correspond to areturn. -If BTB (Branch Target Buffer) returns a valid address, then BTBpredicts next PC. +2. When the instruction is a JALR which *does not* correspond to a return. +If BTB (Branch Target Buffer) returns a valid address, then BTB predicts next PC. Else JALR is not considered as a control flow instruction, which will generate a mispredict. 3. When the instruction is a conditional branch. If BHT (Branch History table) returns a valid address, then BHT predicts next PC. @@ -250,9 +250,9 @@ include::port_instr_realign.adoc[] Instr_queue submodule +++++++++++++++++++++ -The instr_queue receives mutliple instructions from instr_realign submodule to create a valid stream to be executed. +The instr_queue receives multiple instructions from instr_realign submodule to create a valid stream to be executed. Frontend pushes instructions and all related information into the FIFO for storage, including details needed in case of a misprediction or exception: the instructions themselves, instruction control flow type, exception, exception address, and predicted address. -DECODE pops them when decode stage is ready and indicates to the FRONTEND the instruction has been consummed. +DECODE pops them when decode stage is ready and indicates to the FRONTEND the instruction has been consumed. The instruction queue contains two FIFOs: one for instructions and one for addresses, which stores addresses in case of a prediction. @@ -272,7 +272,7 @@ Instr_scan submodule As compressed extension is enabled, {instr-per-fetch} instr_scan are instantiated to handle up to {instr-per-fetch} instructions per cycle. Each instr_scan submodule pre-decodes the fetched instructions coming from the instr_realign module, also calculate the immediate, instructions could be compressed or not. -The instr_scan submodule is a flox controler which provides the intruction type: branch, jump, return, jalr, imm, call or others. +The instr_scan submodule is a flow controller which provides the instruction type: branch, jump, return, jalr, imm, call or others. These outputs are used by the branch prediction feature. include::port_instr_scan.adoc[] diff --git a/docs/design/design-manual/source/cva6_issue_stage.adoc b/docs/design/design-manual/source/cva6_issue_stage.adoc index ab8a1c08e86..d1c113217fe 100644 --- a/docs/design/design-manual/source/cva6_issue_stage.adoc +++ b/docs/design/design-manual/source/cva6_issue_stage.adoc @@ -52,7 +52,7 @@ ISSUE_STAGE has three functionalities. (1) ISSUE_STAGE issues instructions. Instructions from ID_STAGE are sent to Scoreboard module, which forwards them to Issue_read_operands module. -Issue_read_operands queries Scoreboard module for data dependences (Scoreboard is also able to return forwarded values) and gets the list of busy functional units from EX_STAGE. +Issue_read_operands queries Scoreboard module for data dependencies (Scoreboard is also able to return forwarded values) and gets the list of busy functional units from EX_STAGE. Issue_read_operands sends to EX_STAGE the instructions to execute and acknowledges to Scoreboard so that it stores them: the instruction is issued. Issued instructions are acknowledged to ID_STAGE. Each of these steps can block its successors. @@ -86,7 +86,7 @@ Scoreboard is used in all three functionalities of ISSUE_STAGE. (1) ISSUE_STAGE issues instructions. Up to {issue-width} instruction(s) can be received from ID_STAGE each cycle. They are transmitted to Issue_read_operands with incremental transaction IDs which wrap at {NrScoreboardEntries}. -The result buses and Scoreboard entries are also transmitted to Issue_read_operands for it to detect data dependences and perform operand forwarding. +The result buses and Scoreboard entries are also transmitted to Issue_read_operands for it to detect data dependencies and perform operand forwarding. When Issue_read_operands acknowledges an instruction, it is inserted into the FIFO. Scoreboard has a capacity of {NrScoreboardEntries} entries. diff --git a/docs/design/design-manual/source/design.adoc b/docs/design/design-manual/source/design.adoc index 169f9904370..34f1581a9b0 100644 --- a/docs/design/design-manual/source/design.adoc +++ b/docs/design/design-manual/source/design.adoc @@ -21,7 +21,7 @@ ifeval::[{SuperscalarEn} == false] :ifetch-len: 32 :instr-per-fetch: 2 :issue-width: 1 -:commit-width: {NrCommmitPorts} +:commit-width: {NrCommitPorts} endif::[] :SpeculativeSb: {SuperscalarEn} diff --git a/docs/index.rst b/docs/index.rst index ce38770a99a..7cfef391e31 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -38,7 +38,7 @@ The naming convention for these cores is: ``CV <# of pipeline stages> `` Thus, the CV64A60 would be a 64-bit application core with a six stage pipeline. -Note that in this example, the product identifer is "0". +Note that in this example, the product identifier is "0". Organization of this Document @@ -69,5 +69,6 @@ The :doc:`CVA6 APU <05_cva6_apu/index>` describes an Application Processor Unit 01_cva6_user/index.rst 03_cva6_design/index.rst 04_cv32a65x/index.rst + 07_cv32a60x/index.rst 06_cv64a6_mmu/index.rst 05_cva6_apu/index.rst diff --git a/docs/riscv-isa/src/machine.adoc b/docs/riscv-isa/src/machine.adoc index 1f647106c7d..06246d1aa7b 100644 --- a/docs/riscv-isa/src/machine.adoc +++ b/docs/riscv-isa/src/machine.adoc @@ -398,7 +398,7 @@ field is not implemented. The Implementation value should reflect the design of the RISC-V processor itself and not any surrounding system. endif::[] -ifeval::["{ohg-config}" == "CV32A65X"] +ifdef::archi-CV32A60X,archi-CV32A65X[] The `mimpid` CSR provides a unique encoding of the version of the processor implementation. @@ -508,7 +508,7 @@ For RV32 only, `mstatush` is a 32-bit read/write register formatted as shown in <>. Bits 30:4 of `mstatush` generally contain the same fields found in bits 62:36 of `mstatus` for RV64. Fields SD, SXL, and UXL do not exist in `mstatush`. endif::[] -ifeval::["{ohg-config}" == "CV32A65X"] +ifdef::archi-CV32A60X,archi-CV32A65X[] [{ohg-config}] `mstatush` is a 32-bit read/write register formatted as shown in <>. endif::[] @@ -1249,7 +1249,7 @@ different encoding than XS. ==== endif::[] -ifeval::["{ohg-config}" == "CV32A65X"] +ifdef::archi-CV32A60X,archi-CV32A65X[] [{ohg-config}] The FS[1:0] and VS[1:0] *WARL* fields and the XS[1:0] read-only field are used to reduce the cost of context save and restore by setting and tracking the current state of the floating-point unit and any other user-mode @@ -2115,7 +2115,7 @@ ifdef::archi-CVA6[] As the Sscofpmf extension is not implemented, `mip`.LCOFIP and `mie`.LCOFIE are read-only zeros. endif::[] -ifeval::["{ohg-config}" == "CV32A65X"] +ifdef::archi-CV32A60X,archi-CV32A65X[] [{ohg-config}] Multiple simultaneous interrupts destined for M-mode are handled in the following decreasing priority order: MEI, MSI, MTI. @@ -2218,7 +2218,7 @@ As XLEN=64, `mcycleh`, `minstreth`, and `mhpmcounter__n__h` do not exist. endif::[] -ifeval::["{ohg-config}" == "CV32A65X"] +ifdef::archi-CV32A60X,archi-CV32A65X[] As the Sscofpmf extension is not implemented, the `mhpmevent__n__h` CSRs are not provided. endif::[] @@ -3509,7 +3509,7 @@ As "{ohg-config}" does not distinguished different reset conditions, The `mcause` returns 0 after reset. endif::[] -ifeval::["{ohg-config}" == "CV32A65X"] +ifdef::archi-CV32A60X,archi-CV32A65X[] [{ohg-config}] Privilege mode is always M. As little-endian memory accesses are supported, the `mstatus`/`mstatush` field MBE is reset to 0. @@ -4068,6 +4068,13 @@ endif::[] [[pmp]] === Physical Memory Protection +ifeval::[{NrPMPEntries} == 0] +[{ohg-config}] There is no optional physical memory protection (PMP) +unit. +endif::[] + +ifeval::[{NrPMPEntries} != 0] + To support secure processing and contain faults, it is desirable to limit the physical addresses accessible by software running on a hart. An optional physical memory protection (PMP) unit provides per-hart @@ -4491,3 +4498,5 @@ ifeval::["{ohg-config}" == "CV32A65X"] [{ohg-config}] As page-based virtual memory systems is not implemented, memory accesses check the PMP settings synchronously. endif::[] + +endif::[] diff --git a/docs/riscv-isa/src/mm-formal.adoc b/docs/riscv-isa/src/mm-formal.adoc index 200edb8febb..87832d341a1 100644 --- a/docs/riscv-isa/src/mm-formal.adoc +++ b/docs/riscv-isa/src/mm-formal.adoc @@ -2,6 +2,6 @@ == Formal Memory Model Specifications, Version 0.1 [[mm-formal]] -ifeval::["{ohg-config}" == "CV32A65X"] +ifdef::archi-CV32A60X,archi-CV32A65X[] {ohg-config}: No RVWMO memory model. endif::[] diff --git a/docs/riscv-isa/src/rv-32-64g.adoc b/docs/riscv-isa/src/rv-32-64g.adoc index b23abfab43b..4f2e8f2629f 100644 --- a/docs/riscv-isa/src/rv-32-64g.adoc +++ b/docs/riscv-isa/src/rv-32-64g.adoc @@ -16,6 +16,39 @@ ifdef::archi-CVA6[] listings for {ohg-config}. endif::[] +ifeval::[{RVA} == true] +:AMO: AMO +endif::[] +ifeval::[{RVA} == false] +:AMO: not used +endif::[] +ifeval::[{RVF} == true] +:LOAD-FP: LOAD-FP +:STORE-FP: STORE-FP +:MADD: MADD +:MSUB: MSUB +:NMSUB: NMSUB +:NMADD: NMADD +:OP-FP: OP-FP +endif::[] +ifeval::[{RVF} == false] +:LOAD-FP: _not-used_ +:STORE-FP: not used +:MADD: not used +:MSUB: not used +:NMSUB: not used +:NMADD: not used +:OP-FP: not used +endif::[] +ifeval::[{RVV} == true] +:OP-V: OP-V +:OP-VE: OP-VE +endif::[] +ifeval::[{RVV} == false] +:OP-V: not used +:OP-VE: not used +endif::[] + // note: ≥ is unicode for >= [[opcodemap]] .RISC-V base opcode map, inst[1:0]=11 @@ -23,10 +56,10 @@ endif::[] |=== |inst[4:2] .2+|000 .2+|001 .2+|010 .2+|011 .2+|100 .2+|101 .2+|110 .2+|111 (>32b) |inst[6:5] -|00 |LOAD |LOAD-FP |_custom-0_ |MISC-MEM |OP-IMM |AUIPC |OP-IMM-32 |48b -|01 |STORE |STORE-FP |_custom-1_ |AMO |OP |LUI |OP-32 |64b -|10 |MADD |MSUB |NMSUB |NMADD |OP-FP |OP-V |_custom-2/rv128_|48b -|11 |BRANCH |JALR |_reserved_ |JAL |SYSTEM |OP-VE |_custom-3/rv128_|≥80b +|00 |LOAD |{LOAD-FP}|_custom-0_ |MISC-MEM |OP-IMM |AUIPC |OP-IMM-32 |48b +|01 |STORE |{STORE-FP}|_custom-1_|{AMO} |OP |LUI |OP-32 |64b +|10 |{MADD} |{MSUB} |{NMSUB} |{NMADD} |{OP-FP}|{OP-V} |_custom-2/rv128_|48b +|11 |BRANCH |JALR |_reserved_ |JAL |SYSTEM |{OP-VE} |_custom-3/rv128_|≥80b |=== <> shows a map of the major opcodes for diff --git a/docs/riscv-isa/src/zimop.adoc b/docs/riscv-isa/src/zimop.adoc index b66c8364142..98ba3b2a045 100644 --- a/docs/riscv-isa/src/zimop.adoc +++ b/docs/riscv-isa/src/zimop.adoc @@ -7,6 +7,6 @@ endif::[] === "Zcmop" Compressed May-Be-Operations Extension, Version 1.0 -ifeval::[{RVZimop} == false] +ifeval::[{RVZcmop} == false] {ohg-config}: This extension is not supported. endif::[] diff --git a/docs/scripts/classes.py b/docs/scripts/classes.py index cfc79cb1458..f11b5ec8b0a 100644 --- a/docs/scripts/classes.py +++ b/docs/scripts/classes.py @@ -7,7 +7,7 @@ # # Original Author: Jean-Roch COULON - Thales -#!/usr/bin/python3 +#!/usr/bin/env python3 class Parameter: diff --git a/docs/scripts/define_blacklist.py b/docs/scripts/define_blacklist.py index bdee4b2fdfa..2ed886339c5 100644 --- a/docs/scripts/define_blacklist.py +++ b/docs/scripts/define_blacklist.py @@ -7,7 +7,7 @@ # # Original Author: Jean-Roch COULON - Thales -#!/usr/bin/python3 +#!/usr/bin/env python3 def define_blacklist(parameters): diff --git a/docs/scripts/parameters_extractor.py b/docs/scripts/parameters_extractor.py index 09365c263d1..e5ef4dd7666 100644 --- a/docs/scripts/parameters_extractor.py +++ b/docs/scripts/parameters_extractor.py @@ -7,7 +7,7 @@ # # Original Author: Jean-Roch COULON - Thales -#!/usr/bin/python3 +#!/usr/bin/env python3 import sys import os diff --git a/docs/scripts/spec_builder.py b/docs/scripts/spec_builder.py index 31c47ea86cb..1abb760dd19 100755 --- a/docs/scripts/spec_builder.py +++ b/docs/scripts/spec_builder.py @@ -7,7 +7,7 @@ # # Original Author: Jean-Roch COULON - Thales -#!/usr/bin/python3 +#!/usr/bin/env python3 import re import sys @@ -51,14 +51,24 @@ 'RVZabha': False, 'RVZacas': False, 'RVZawrs': False, + 'RVZcmop': False, 'RVZfa': False, 'RVZfbf-RZvfbf': False, 'RVZfh': False, 'RVZfinx': False, 'RVZicbo': False, 'RVZicfilp': False, + 'RVZifencei': False, + 'RVZihintntl': False, + 'RVZihintpause': False, + 'RVZimop': False, + 'RVZk': False, 'RVZpm': False, + 'RVZsmcdeleg': False, + 'RVZsmcntrpmf': False, + 'RVZsmcsrind-RVZsscsrind': False, 'RVZsmctr': False, + 'RVZsmdbltrp': False, 'RVZsmepmp': False, 'RVZsmmpm': False, 'RVZsmrnmi': False, @@ -181,6 +191,7 @@ def main(): file.append("../core/cva6.sv") file.append("../core/frontend/frontend.sv") file.append("../core/frontend/bht.sv") + file.append("../core/frontend/bht2lvl.sv") file.append("../core/frontend/btb.sv") file.append("../core/frontend/ras.sv") file.append("../core/frontend/instr_queue.sv") diff --git a/docs/user_guide/cva6_ug_csr.adoc b/docs/user_guide/cva6_ug_csr.adoc index 113f0b8afb5..a609e83410f 100644 --- a/docs/user_guide/cva6_ug_csr.adoc +++ b/docs/user_guide/cva6_ug_csr.adoc @@ -36,7 +36,7 @@ This is illustrated below for the `12'h7C0`-`12'h7FF` range. |`CSR_SIP`|`12’h144`|Supervisor interrupt pending|Yes|Yes|Supervisor |`CSR_STVEC`|`12’h105`|Supervisor trap handler base address|Yes|Yes|Supervisor |`CSR_SCOUNTEREN`|`12’h106`|Supervisor counter enable|Yes|Yes|Supervisor -|`CSR_SSCRATCH`|`12’h140`|Scartch Register for supervisor trap handlers|Yes|Yes|Supervisor +|`CSR_SSCRATCH`|`12’h140`|Scratch Register for supervisor trap handlers|Yes|Yes|Supervisor |`CSR_SEPC`|`12’h141`|Supervisor exception program counter|Yes|Yes|Supervisor |`CSR_SCAUSE`|`12’h142`|Supervisor trap cause|Yes|Yes|Supervisor |`CSR_STVAL`|`12’h143`|Supervisor bad address or instruction|Yes|Yes|Supervisor diff --git a/pd/synth/hpdcache_sram_1rw_00000006_0000001c_00000040.sv b/pd/synth/hpdcache_sram_1rw_00000006_0000001c_00000040.sv deleted file mode 100644 index f933dc6637b..00000000000 --- a/pd/synth/hpdcache_sram_1rw_00000006_0000001c_00000040.sv +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2023 CEA* - * *Commissariat a l'Energie Atomique et aux Energies Alternatives (CEA) - * - * 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. - */ -/* - * Authors : Cesar Fuguet - * Creation Date : March, 2020 - * Description : SRAM behavioral model - * History : - */ -module hpdcache_sram_1rw_00000006_0000001c_00000040 -#( - parameter int unsigned ADDR_SIZE = 6, - parameter int unsigned DATA_SIZE = 28, - parameter int unsigned DEPTH = 2**ADDR_SIZE -) -( - input logic clk, - input logic rst_n, - input logic cs, - input logic we, - input logic [ADDR_SIZE-1:0] addr, - input logic [DATA_SIZE-1:0] wdata, - output logic [DATA_SIZE-1:0] rdata -); - - /* - * Internal memory array declaration - */ - typedef logic [DATA_SIZE-1:0] mem_t [DEPTH]; - mem_t mem; - - /* - * Process to update or read the memory array - */ - always_ff @(posedge clk) - begin : mem_update_ff - if (cs == 1'b1) begin - if (we == 1'b1) begin - mem[addr] <= wdata; - end - rdata <= mem[addr]; - end - end : mem_update_ff -endmodule : hpdcache_sram_1rw_00000006_0000001c_00000040 diff --git a/pd/synth/hpdcache_sram_1rw_00000006_0000001c_00000040_00000001.sv b/pd/synth/hpdcache_sram_1rw_00000006_0000001c_00000040_00000001.sv new file mode 100644 index 00000000000..9e72dab90ba --- /dev/null +++ b/pd/synth/hpdcache_sram_1rw_00000006_0000001c_00000040_00000001.sv @@ -0,0 +1,70 @@ +/* + * Copyright 2023 Commissariat a l'Energie Atomique et aux Energies Alternatives (CEA) + * Copyright 2025 Univ. Grenoble Alpes, Inria, TIMA Laboratory + * + * SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 + */ +/* + * Authors : Cesar Fuguet + * Creation Date : March, 2020 + * Description : SRAM behavioral model + * History : + */ +module hpdcache_sram_1rw_00000006_0000001c_00000040_00000001 +#( + parameter int unsigned ADDR_SIZE = 6, + parameter int unsigned DATA_SIZE = 28, + parameter int unsigned DEPTH = 2**ADDR_SIZE, + parameter int unsigned NDATA = 1 +) +( + input logic clk, + input logic rst_n, + input logic cs, + input logic we, + input logic [ADDR_SIZE-1:0] addr, + input logic [NDATA-1:0][DATA_SIZE-1:0] wdata, + output logic [NDATA-1:0][DATA_SIZE-1:0] rdata +); + + /* + * Internal memory array declaration + */ + typedef logic [NDATA-1:0][DATA_SIZE-1:0] mem_t [DEPTH]; + mem_t mem; + + /* + * Process to update or read the memory array + */ + always_ff @(posedge clk) + begin : mem_update_ff + if (cs == 1'b1) begin + if (we == 1'b1) begin + mem[addr] <= wdata; + end else begin + rdata <= mem[addr]; + end + end + end : mem_update_ff + + // DPI + // {{{ +`ifdef HPDCACHE_DPI_ON + export "DPI-C" task publicSramSetMask; + export "DPI-C" task publicSramSetData; + + task automatic publicSramSetMask; + input int index; + input logic [NDATA-1:0][DATA_SIZE-1:0] mask; + mem[index] ^= mask; + endtask + + task automatic publicSramSetData; + input int index; + input logic [NDATA-1:0][DATA_SIZE-1:0] data; + mem[index] = data; + endtask +`endif + // }}} +endmodule +// vim: ts=4 : sts=4 : sw=4 : et : tw=100 : spell : spelllang=en diff --git a/pd/synth/hpdcache_sram_wbyteenable_1rw_00000007_00000020_00000080_00000002.sv b/pd/synth/hpdcache_sram_wbyteenable_1rw_00000007_00000020_00000080_00000002.sv new file mode 100644 index 00000000000..ad6b04bd7b5 --- /dev/null +++ b/pd/synth/hpdcache_sram_wbyteenable_1rw_00000007_00000020_00000080_00000002.sv @@ -0,0 +1,75 @@ +/* + * Copyright 2023 Commissariat a l'Energie Atomique et aux Energies Alternatives (CEA) + * Copyright 2025 Univ. Grenoble Alpes, Inria, TIMA Laboratory + * + * SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 + */ +/* + * Authors : Cesar Fuguet + * Creation Date : March, 2020 + * Description : Behavioral model of a 1RW SRAM with write byte enable + * History : + */ +module hpdcache_sram_wbyteenable_1rw_00000007_00000020_00000080_00000002 +#( + parameter int unsigned ADDR_SIZE = 7, + parameter int unsigned DATA_SIZE = 32, + parameter int unsigned DEPTH = 2**ADDR_SIZE, + parameter int unsigned NDATA = 2 +) +( + input logic clk, + input logic rst_n, + input logic cs, + input logic we, + input logic [ADDR_SIZE-1:0] addr, + input logic [NDATA-1:0][DATA_SIZE-1:0] wdata, + input logic [NDATA-1:0][DATA_SIZE/8-1:0] wbyteenable, + output logic [NDATA-1:0][DATA_SIZE-1:0] rdata +); + + /* + * Internal memory array declaration + */ + typedef logic [NDATA-1:0][DATA_SIZE-1:0] mem_t [DEPTH]; + mem_t mem; + + /* + * Process to update or read the memory array + */ + always_ff @(posedge clk) + begin : mem_update_ff + if (cs == 1'b1) begin + if (we == 1'b1) begin + for (int j = 0; j < NDATA; j++) begin + for (int i = 0; i < DATA_SIZE/8; i++) begin + if (wbyteenable[j][i]) mem[addr][j][i*8 +: 8] <= wdata[j][i*8 +: 8]; + end + end + end else begin + rdata <= mem[addr]; + end + end + end + + // DPI + // {{{ +`ifdef HPDCACHE_DPI_ON + export "DPI-C" task publicSramBeSetMask; + export "DPI-C" task publicSramBeSetData; + + task automatic publicSramBeSetMask; + input int index; + input logic [NDATA-1:0][DATA_SIZE-1:0] mask; + mem[index] ^= mask; + endtask + + task automatic publicSramBeSetData; + input int index; + input logic [NDATA-1:0][DATA_SIZE-1:0] data; + mem[index] = data; + endtask +`endif + // }}} +endmodule +// vim: ts=4 : sts=4 : sw=4 : et : tw=100 : spell : spelllang=en diff --git a/pd/synth/hpdcache_sram_wbyteenable_1rw_00000007_00000040_00000080.sv b/pd/synth/hpdcache_sram_wbyteenable_1rw_00000007_00000040_00000080.sv deleted file mode 100644 index cd294ca9553..00000000000 --- a/pd/synth/hpdcache_sram_wbyteenable_1rw_00000007_00000040_00000080.sv +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2023 CEA* - * *Commissariat a l'Energie Atomique et aux Energies Alternatives (CEA) - * - * 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. - */ -/* - * Authors : Cesar Fuguet - * Creation Date : March, 2020 - * Description : Behavioral model of a 1RW SRAM with write byte enable - * History : - */ -module hpdcache_sram_wbyteenable_1rw_00000007_00000040_00000080 - -#( - parameter int unsigned ADDR_SIZE = 7, - parameter int unsigned DATA_SIZE = 64, - parameter int unsigned DEPTH = 2**ADDR_SIZE -) -( - input logic clk, - input logic rst_n, - input logic cs, - input logic we, - input logic [ADDR_SIZE-1:0] addr, - input logic [DATA_SIZE-1:0] wdata, - input logic [DATA_SIZE/8-1:0] wbyteenable, - output logic [DATA_SIZE-1:0] rdata -); - - /* - * Internal memory array declaration - */ - typedef logic [DATA_SIZE-1:0] mem_t [DEPTH]; - mem_t mem; - - /* - * Process to update or read the memory array - */ - always_ff @(posedge clk) - begin : mem_update_ff - if (cs == 1'b1) begin - if (we == 1'b1) begin - for (int i = 0; i < DATA_SIZE/8; i++) begin - if (wbyteenable[i]) mem[addr][i*8 +: 8] <= wdata[i*8 +: 8]; - end - end - rdata <= mem[addr]; - end - end : mem_update_ff -endmodule : hpdcache_sram_wbyteenable_1rw_00000007_00000040_00000080 diff --git a/perf-model/README.md b/perf-model/README.md new file mode 100644 index 00000000000..8d8c1137288 --- /dev/null +++ b/perf-model/README.md @@ -0,0 +1,131 @@ +# CVA6 cycle-accurate performance model + +This repository contains a cycle-accurate performance model of CVA6 control-path. + +It was developed to explore microarchitecture changes in CVA6 before implementing them. + +To cite this model, please head to the end of this document. + + +## Getting started + +### Generate an RVFI trace + +To generate an RVFI trace, follow the instructions in the CVA6 repository to run a simulation. +The RVFI trace will be in `verif/sim/out_//.log`. + + +### Running the model + +```bash +python3 model.py verif/sim/out_//.log +``` + +The annotated trace is generated in an `annotated.log` file in the current directory. + +It prints a lot of debug information so that you can see all the events (note: it slows down model execution). +To disable these prints, modify the instantiation with `Model(debug=False)` in the `main` function. + +At the end of the simulation, the model prints statistics with the `print_stats` call in the `main` function. +These statistics can be performed on the timed part, which is filtered with the `filter_timed_part` function. +Feel free to modify the `filter_timed_part` function to suit your needs. + + +### Exploring design space + +In `model.py`, the `main` function runs the model with arguments which override default values. +Generic parameters are available in `Model.__init__`. +You can add new parameters to explore here. + +To perform exploration, run the model in a loop, like `issue_commit_graph` does. +The `display_scores` function is meant to print a 3D plot if you have `matplotlib`. +`issue_commit_graph` prints the scores so that you can store it and display the figure without re-running the model. + + +## Comparing the model and the RTL + +### Adapt RVFI trace generation + +The regular expression expects the cycle number to be in the RVFI trace. +The value is not used by the model but it is used to compare the model and CVA6. + +To emit cycle number in RVFI trace, modify `corev_apu/tb/rvfi_tracer.sv` in CVA6 repository as below. + +```diff +- $fwrite(f, "core 0: 0x%h (0x%h) DASM(%h)\n", +- pc64, rvfi_i[i].insn, rvfi_i[i].insn); ++ $fwrite(f, "core 0: 0x%h (0x%h) @%d DASM(%h)\n", ++ pc64, rvfi_i[i].insn, cycles, rvfi_i[i].insn); +``` + + +### Calculate instruction duration + +Run `cycle_diff.py` for each script. + +```bash +python3 perf-model/cycle_diff.py annotated.log +mv traceout.log model.log +python3 perf-model/cycle_diff.py verif/sim/out_//.log +``` + +Note: the `cycles_diff.py` script filters the "timed" part of the program. +To do this, it tries to find `csrr minstret` instructions. +Feel free to modify the script to suit your needs. + + +### List the differences + +```bash +diff -y traceout.log model.log | less +``` + +## RVFI-based Flamegraph Profiler + +This tool generates execution profile visualizations and performance metrics from CVA6 RISC-V trace logs. +The profiler processes RVFI traces with cycle number (cf Adapt RVFI trace generation) and produces two complementary flamegraph outputs: a standard cycle-attribution and an instruction-level breakdown variant. + +```bash +python perf-model/profile.py dumpfile.dump traceout.log svg_name.svg +``` + +**Parameters:** +- `dumpfile.dump`: ELF binary dump file (generated via `riscv-none-elf-objdump -h test_name.o`) +- `traceout.log`: RVFI execution trace file from CVA6 simulation +- `svg_name.svg`: Output flamegraph basename (generates `svg_name.svg` and `svg_name_with_ins.svg`) + +**Outputs:** +- `svg_name.svg`: Cycle-based flamegraph showing execution hotspots by cycle attribution +- `svg_name_with_ins.svg`: Instruction-level flamegraph with per-instruction cost breakdown + + +## Files + +| Name | Description | +| :--- | :--- | +| `cycle_diff.py` | Calculates duration of each instruction in an RVFI trace | +| `isa.py` | Module to create Python objects from RISC-V instructions | +| `model.py` | The CVA6 performance model | +| `profile.py` | RVFI-based flamegraph profiler | + + +## Citing + +```bibtex +@inproceedings{cf24, + author = {Allart, C\^{o}me and Coulon, Jean-Roch and Sintzoff, Andr\'{e} and Potin, Olivier and Rigaud, Jean-Baptiste}, + title = {Using a Performance Model to Implement a Superscalar CVA6}, + year = {2024}, + isbn = {9798400704925}, + publisher = {Association for Computing Machinery}, + url = {https://doi.org/10.1145/3637543.3652871}, + doi = {10.1145/3637543.3652871}, + abstract = {A performance model of CVA6 RISC-V processor is built to evaluate performance-related modifications before implementing them in RTL. Its accuracy is 99.2\% on CoreMark. This model is used to evaluate a superscalar feature for CVA6. During design phase, the model helped detecting and fixing performance bugs. The superscalar feature resulted in a CVA6 performance improvement of 40\% on CoreMark.}, + booktitle = {Proceedings of the 21st ACM International Conference on Computing Frontiers: Workshops and Special Sessions}, + pages = {43–46}, + numpages = {4}, + keywords = {CVA6, Cycle-Based Model, Multi-Issue, Performance, RISC-V, Superscalar}, + location = {Ischia, Italy}, + series = {CF '24 Companion} +} +``` diff --git a/perf-model/cycle_diff.py b/perf-model/cycle_diff.py new file mode 100644 index 00000000000..436c976aa6f --- /dev/null +++ b/perf-model/cycle_diff.py @@ -0,0 +1,80 @@ +# Copyright 2024 Thales Silicon Security +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Original Author: Côme ALLART - Thales + +import re +import sys + +re_csrr_minstret = re.compile(r"^csrrs\s+\w+,\s*minstret\b") +re_full = re.compile( + r"([a-z]+)\s+0:\s*0x00000000([0-9a-f]+)\s*\(([0-9a-fx]+)\)\s*(\S*)@\s*([0-9]+)\s*(.*)" +) + +class Trace: + def __init__(self, addr, cycle, mnemo, flags): + self.addr = addr + self.cycle = cycle + self.mnemo = mnemo + self.flags = flags + self.delta = None + + def report(self): + """True if the instruction is a loading instruction""" + return f"+{self.delta} {self.flags} 0x{self.addr}: {self.mnemo}" + +def print_data(name, value): + "Prints 'name = data' with alignment of the '='" + spaces = ' ' * (24 - len(name)) + print(f"{name}{spaces} = {value}") + +def read_traces(input_file): + "Collect stage traces from file" + l = [] + def filter_add(trace): + if not hasattr(filter_add, "accepting"): + filter_add.accepting = False + if re_csrr_minstret.search(trace.mnemo): + filter_add.accepting = not filter_add.accepting + return + if filter_add.accepting: + l.append(trace) + with open(input_file, "r", encoding="utf8") as f: + for line in [l.strip() for l in f]: + found = re_full.search(line) + if found: + addr = found.group(2) + flags = found.group(4) + cycle = int(found.group(5)) + mnemo = found.group(6) + filter_add(Trace(addr, cycle, mnemo, flags)) + #l.append(Trace(addr, cycle, mnemo, flags)) + return l + +def write_traces(outfile, traces): + "Write all instructions to output file" + print("output file:", outfile) + with open(outfile, "w", encoding="utf8") as f: + for trace in traces: + f.write(trace.report() + "\n") + +def main(input_file: str): + "Main function" + traces = read_traces(input_file) + cycle = traces[0].cycle + cycle_number = traces[-1].cycle - cycle + 1 + for trace in traces: + trace.delta = trace.cycle - cycle + cycle = trace.cycle + print_data("cycle number", cycle_number) + print_data("Coremark/MHz", 1000000 / cycle_number) + print_data("instruction number", len(traces)) + print_data("IPC", len(traces) / cycle_number) + write_traces("traceout.log", traces) + +if __name__ == "__main__": + main(sys.argv[1]) diff --git a/perf-model/isa.py b/perf-model/isa.py new file mode 100644 index 00000000000..d0c35e83cf8 --- /dev/null +++ b/perf-model/isa.py @@ -0,0 +1,577 @@ +# Copyright 2024 Thales Silicon Security +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Original Author: Côme ALLART - Thales + +""" +Represents the instruction set +""" + +from dataclasses import dataclass + +class Reg: + """Constants to represent registers""" + # ABI names + zero = 0 + ra = 1 + sp = 2 + gp = 3 + tp = 4 + t0 = 5 + t1 = 6 + t2 = 7 + s0 = 8 + fp = 8 + s1 = 9 + a0 = 10 + a1 = 11 + a2 = 12 + a3 = 13 + a4 = 14 + a5 = 15 + a6 = 16 + a7 = 17 + s2 = 18 + s3 = 19 + s4 = 20 + s5 = 21 + s6 = 22 + s7 = 23 + s8 = 24 + s9 = 25 + s10 = 26 + s11 = 27 + t3 = 28 + t4 = 29 + t5 = 30 + t6 = 31 + # Register names + x0 = 0 + x1 = 1 + x2 = 2 + x3 = 3 + x4 = 4 + x5 = 5 + x6 = 6 + x7 = 7 + x8 = 8 + x9 = 9 + x10 = 10 + x11 = 11 + x12 = 12 + x13 = 13 + x14 = 14 + x15 = 15 + x16 = 16 + x17 = 17 + x18 = 18 + x19 = 19 + x20 = 20 + x21 = 21 + x22 = 22 + x23 = 23 + x24 = 24 + x25 = 25 + x26 = 26 + x27 = 27 + x28 = 28 + x29 = 29 + x30 = 30 + x31 = 31 + +def sign_ext(imm, index, xlen=32): + """ + Sign extends a value + imm: value to sign extend + index: index of the sign bit of the value + len: target len for sign extended value + """ + imm_bits = index + 1 + assert (imm >> imm_bits) == 0 + neg = imm >> index + sext_bits = xlen - imm_bits + sext_ones = (1 << sext_bits) - 1 + sext = neg * sext_ones << imm_bits + return sext | imm + +@dataclass +class AddrFields: + """Represents the data used to build a memory address""" + base_reg: int + offset: int + +class Rtype: + """R-type instructions""" + def __init__(self, instr): + self.funct7 = instr.bin >> 25 + self.rs2 = (instr.bin >> 20) & 31 + self.rs1 = (instr.bin >> 15) & 31 + self.funct3 = (instr.bin >> 12) & 7 + self.rd = (instr.bin >> 7) & 31 + self.opcode = instr.bin & 63 + +class Itype: + """I-type instructions""" + def __init__(self, instr): + self.rs1 = (instr.bin >> 15) & 31 + self.funct3 = (instr.bin >> 12) & 7 + self.rd = (instr.bin >> 7) & 31 + self.opcode = instr.bin & 63 + self.imm = sign_ext(instr.bin >> 20, 11) + +class Stype: + """S-type instructions""" + def __init__(self, instr): + self.rs2 = (instr.bin >> 20) & 31 + self.rs1 = (instr.bin >> 15) & 31 + self.funct3 = (instr.bin >> 12) & 7 + self.opcode = instr.bin & 63 + self.imm = sign_ext( + ((instr.bin >> 25) << 5) \ + | ((instr.bin >> 7) & 31) + , 11) + +class Btype: + """B-type instructions""" + def __init__(self, instr): + self.rs2 = (instr.bin >> 20) & 31 + self.rs1 = (instr.bin >> 15) & 31 + self.funct3 = (instr.bin >> 12) & 7 + self.opcode = instr.bin & 63 + self.imm = sign_ext( + ((instr.bin >> 31) << 12) \ + | (((instr.bin >> 7) & 1) << 11) \ + | (((instr.bin >> 25) & 0x3f) << 5) \ + | (((instr.bin >> 8) & 15) << 1) + , 12) + +class Utype: + """U-type instructions""" + def __init__(self, instr): + self.imm_31_12 = instr.bin >> 12 + self.imm_4_0 = (instr.bin >> 7) & 31 + self.rd = (instr.bin >> 7) & 31 + self.opcode = instr.bin & 63 + self.imm = self.imm_31_12 << 12 + +class Jtype: + """J-type instructions""" + def __init__(self, instr): + self.rd = (instr.bin >> 7) & 31 + self.opcode = instr.bin & 63 + self.imm = sign_ext( + ((instr.bin >> 31) << 20) \ + | (((instr.bin >> 12) & 0xff) << 12) \ + | (((instr.bin >> 20) & 1) << 11) \ + | (((instr.bin >> 21) & 0x3ff) << 1) + , 20) + +class MOItype: + """Memory ordering instructions""" + def __init__(self, instr): + self.fm = instr.bin >> 28 + self.PI = (instr.bin >> 27) & 1 + self.PO = (instr.bin >> 26) & 1 + self.PR = (instr.bin >> 25) & 1 + self.PW = (instr.bin >> 24) & 1 + self.SI = (instr.bin >> 23) & 1 + self.SO = (instr.bin >> 22) & 1 + self.SR = (instr.bin >> 21) & 1 + self.SW = (instr.bin >> 20) & 1 + self.rs1 = (instr.bin >> 15) & 31 + self.funct3 = (instr.bin >> 12) & 7 + self.rd = (instr.bin >> 7) & 31 + self.opcode = instr.bin & 63 + +class CRtype: + """Compressed register""" + def __init__(self, instr): + self.funct4 = instr.bin >> 12 + r = (instr.bin >> 7) & 31 + self.rs2 = (instr.bin >> 2) & 31 + self.op = instr.bin & 3 + self.rs1 = r + base = instr.base() + if base == 'C.J[AL]R/C.MV/C.ADD': + if self.funct4 & 1: + if self.rs2 == 0: + if r == 0: + base = 'C.EBREAK' + else: + base = 'C.JALR' + else: + base = 'C.ADD' + else: + if self.rs2 == 0: + base = 'C.JR' + else: + base = 'C.MV' + if base in CRtype.regreg: + self.rd = r + self.name = base + + control = ['C.JR', 'C.JALR'] + regreg = ['C.MV', 'C.ADD'] + +class CItype: + """Compressed immediate""" + def __init__(self, instr): + self.funct3 = instr.bin >> 13 + r = (instr.bin >> 7) & 31 + self.op = instr.bin & 3 + base = instr.base() + if base == 'C.LUI/C.ADDI16SP': + if r == Reg.sp: + base = 'C.ADDI16SP' + else: + base = 'C.LUI' + if base in CItype.SPload + CItype.constgen: + self.rd = r + if base in CItype.SPload: + self.rs1 = Reg.sp + self.offset = CItype.offset[base](instr.bin) + # zero-extended offset + if base == 'C.LI': + self.imm = sign_ext(CItype.imm(instr.bin), 5) + if base == 'C.LUI': + self.nzimm = sign_ext(CItype.imm(instr.bin) << 12, 17) + if base in CItype.regimm: + self.rd = r + self.rs1 = r + if base == 'C.ADDI': + self.nzimm = sign_ext(CItype.imm(instr.bin), 5) + if base == 'C.ADDIW': + self.imm = sign_ext(CItype.imm(instr.bin), 5) + if base == 'C.ADDI16SP': + self.nzimm = sign_ext(CItype.immsp(instr.bin), 9) + if base == 'C.SLLI': + self.shamt = CItype.imm(instr.bin) + + SPload = ['C.LWSP', 'C.LDSP', 'C.LQSP', 'C.FLWSP', 'C.FLDSP'] + constgen = ['C.LI', 'C.LUI'] + regimm = ['C.ADDI', 'C.ADDIW', 'C.ADDI16SP', 'C.SLLI'] + + Woffset = lambda i: (((i >> 12) & 1) << 5) | (((i >> 4) & 7) << 2) \ + | (((i >> 2) & 3) << 6) + Doffset = lambda i: (((i >> 12) & 1) << 5) | (((i >> 5) & 3) << 3) \ + | (((i >> 2) & 7) << 6) + Qoffset = lambda i: (((i >> 12) & 1) << 5) | (((i >> 6) & 1) << 4) \ + | (((i >> 2) & 15) << 6) + imm = lambda i: (((i >> 12) & 1) << 5) | ((i >> 2) & 31) + immsp = lambda i: (((i >> 12) & 1) << 9) | (((i >> 6) & 1) << 4) \ + | (((i >> 5) & 1) << 6) | (((i >> 3) & 3) << 7) \ + | (((i >> 2) & 1) << 5) + + offset = { + 'C.LWSP': Woffset, + 'C.LDSP': Doffset, + 'C.LQSP': Qoffset, + 'C.FLWSP': Woffset, + 'C.FLDSP': Doffset, + } + +class CSStype: + """Compressed stack-relative store""" + def __init__(self, instr): + self.funct3 = instr.bin >> 13 + self.rs1 = Reg.sp + self.rs2 = (instr.bin >> 2) & 31 + self.op = instr.bin & 3 + self.offset = CSStype.offset[instr.base()](instr.bin) + # zero-extended offset + + Woffset = lambda i: (((i >> 9) & 15) << 2) | (((i >> 7) & 3) << 6) + Doffset = lambda i: (((i >> 10) & 7) << 3) | (((i >> 7) & 7) << 6) + Qoffset = lambda i: (((i >> 11) & 3) << 4) | (((i >> 7) & 15) << 6) + + offset = { + 'C.SWSP': Woffset, + 'C.SDSP': Doffset, + 'C.SQSP': Qoffset, + 'C.FSWSP': Woffset, + 'C.FSDSP': Doffset, + } + +class CIWtype: + """Compressed wide immediate""" + def __init__(self, instr): + i = instr.bin + self.funct3 = i >> 13 + rd_ = (i >> 2) & 7 + self.rd = rd_ + 8 + self.op = i & 3 + self.nzuimm = (((i >> 11) & 3) << 4) | (((i >> 7) & 15) << 6) \ + | (((i >> 6) & 1) << 2) | (((i >> 5) & 1) << 3) + # zero-extended (unsigned) non-zero immediate + if instr.base() == 'C.ADDI4SPN': + self.rs1 = Reg.sp + +CLS_Woffset = lambda i: (((i >> 10) & 7) << 3) | (((i >> 6) & 1) << 2) \ + | (((i >> 5) & 1) << 6) +CLS_Doffset = lambda i: (((i >> 10) & 7) << 3) | (((i >> 5) & 3) << 6) +CLS_Qoffset = lambda i: (((i >> 11) & 3) << 4) | (((i >> 10) & 1) << 8) \ + | (((i >> 5) & 3) << 6) + +class CLtype: + """Compressed load""" + def __init__(self, instr): + self.funct3 = instr.bin >> 13 + rs1_ = (instr.bin >> 7) & 7 + rd_ = (instr.bin >> 2) & 7 + self.rs1 = rs1_ + 8 + self.rd = rd_ + 8 + self.op = instr.bin & 3 + self.offset = CLtype.offset[instr.base()](instr.bin) + # zero-extended offset + + offset = { + 'C.LW': CLS_Woffset, + 'C.LD': CLS_Doffset, + 'C.LQ': CLS_Qoffset, + 'C.FLW': CLS_Woffset, + 'C.FLD': CLS_Doffset, + } + +class CStype: + """Compressed store""" + def __init__(self, instr): + self.funct3 = instr.bin >> 13 + rs1_ = (instr.bin >> 7) & 7 + rs2_ = (instr.bin >> 2) & 7 + self.rs1 = rs1_ + 8 + self.rs2 = rs2_ + 8 + self.op = instr.bin & 3 + self.offset = CStype.offset[instr.base()](instr.bin) + # zero-extended offset + + offset = { + 'C.SW': CLS_Woffset, + 'C.SD': CLS_Doffset, + 'C.SQ': CLS_Qoffset, + 'C.FSW': CLS_Woffset, + 'C.FSD': CLS_Doffset, + } + +class CAtype: + """Compressed arithmetic""" + def __init__(self, instr): + self.funct6 = instr.bin >> 10 + r = (instr.bin >> 7) & 7 + self.rd = r + 8 + self.rs1 = r + 8 + self.funct2 = (instr.bin >> 5) & 3 + self.rs2 = ((instr.bin >> 2) & 7) + 8 + self.op = instr.bin & 3 + +class CBtype: + """Compressed branch""" + def __init__(self, instr): + i = instr.bin + base = instr.base() + self.funct3 = i >> 13 + self.offset = (i >> 10) & 7 + rs1_ = (i >> 7) & 7 + self.rs1 = rs1_ + 8 + self.op = instr.bin & 3 + if base in CBtype.branch: + self.offset = sign_ext( + (((i >> 12) & 1) << 8) \ + | (((i >> 10) & 3) << 3) \ + | (((i >> 5) & 3) << 6) \ + | (((i >> 3) & 3) << 1) \ + | (((i >> 2) & 1) << 5) + , 8) + else: + if (instr.bin >> 10) & 3 == 2: + self.shamt = sign_ext(CItype.imm(i), 5) + else: + self.shamt = CItype.imm(i) + self.rd = self.rs1 + + branch = ['C.BEQZ', 'C.BNEZ'] + regimm = ['C.SRLI', 'C.SRAI', 'C.ANDI'] + +class CJtype: + """Compressed jump""" + def __init__(self, instr): + self.funct3 = instr.bin >> 13 + assert instr.base() in ['C.J', 'C.JAL'] + self.offset = sign_ext(CJtype.offset(instr.bin), 11) + self.jump_target = (instr.bin >> 2) & 0x7ff + self.op = instr.bin & 3 + + offset = lambda i: (((i >> 12) & 1) << 11) | (((i << 11) & 1) << 4) \ + | (((i >> 9) & 3) << 8) | (((i >> 8) & 1) << 10) \ + | (((i >> 7) & 1) << 6) | (((i >> 6) & 1) << 7) \ + | (((i >> 3) & 1) << 1) | (((i >> 2) & 1) << 5) + +class Instr: + """Instructions""" + + table_16_4_RV32 = [ + ['C.ADDI4SPN', 'C.FLD', 'C.LW', 'C.FLW', + 'Reserved', 'C.FSD', 'C.SW', 'C.FSW'], + ['C.ADDI', 'C.JAL', 'C.LI', 'C.LUI/C.ADDI16SP', + 'MISC-ALU', 'C.J', 'C.BEQZ', 'C.BNEZ'], + ['C.SLLI', 'C.FLDSP', 'C.LWSP', 'C.FLWSP', + 'C.J[AL]R/C.MV/C.ADD', 'C.FSDSP', 'C.SWSP', 'C.FSWSP'], + ] + + table_24_1 = [ + ['LOAD', 'LOAD-FP', 'custom-0', 'MISC-MEM', 'OP-IMM', 'AUIPC', 'OP-IMM-32', '48b'], + ['STORE', 'STORE-FP', 'custom-1', 'AMO', 'OP', 'LUI', 'OP-32', '64b'], + ['MADD', 'MSUB', 'NMSUB', 'NMADD', 'OP-FP', 'reserved', 'custom-2/rv128', '48b'], + ['BRANCH', 'JALR', 'reserved', 'JAL', 'SYSTEM', 'reserved', 'custom-3/rv128', '80b'], + ] + type_of_base = { + 'OP-IMM': Itype, + 'LUI': Utype, + 'AUIPC': Utype, + 'OP': Rtype, + 'OP-32': Rtype, + 'JAL': Jtype, + 'JALR': Itype, + 'BRANCH': Btype, + 'LOAD': Itype, + 'STORE': Stype, + 'SYSTEM': Itype, + 'C.LWSP': CItype, + 'C.LDSP': CItype, + 'C.LQSP': CItype, + 'C.FLWSP': CItype, + 'C.FLDSP': CItype, + 'C.SWSP': CSStype, + 'C.SDSP': CSStype, + 'C.SQSP': CSStype, + 'C.FSWSP': CSStype, + 'C.FSDSP': CSStype, + 'C.LW': CLtype, + 'C.LD': CLtype, + 'C.LQ': CLtype, + 'C.FLW': CLtype, + 'C.FLD': CLtype, + 'C.SW': CStype, + 'C.SD': CStype, + 'C.SQ': CStype, + 'C.FSW': CStype, + 'C.FSD': CStype, + 'C.J': CJtype, + 'C.JAL': CJtype, + 'C.J[AL]R/C.MV/C.ADD': CRtype, + 'C.BEQZ': CBtype, + 'C.BNEZ': CBtype, + 'C.LI': CItype, + 'C.LUI/C.ADDI16SP': CItype, + 'C.ADDI': CItype, + 'C.ADDIW': CItype, + 'C.ADDI4SPN': CIWtype, + 'C.SLLI': CItype, + 'MISC-ALU': lambda instr: CAtype(instr) if (instr.bin >> 10) & 3 == 3 else CBtype(instr), + } + iloads = ['C.LW', 'C.LWSP', 'LOAD'] + floads = ['C.FLD', 'C.FLW', 'C.FLDSP', 'C.FLWSP', 'LOAD-FP'] + istores = ['C.SW', 'C.SWSP', 'STORE'] + fstores = ['C.FSD', 'C.FSW', 'C.FSDSP', 'C.FSWSP', 'STORE-FP'] + loads = iloads + floads + stores = istores + fstores + + def __init__(self, bincode): + self.bin = bincode + self.inst_1_0 = self.bin & 3 + + def base(self): + """Get the name of the base instruction""" + result = "" + if self.is_compressed(): + line = self.bin & 3 + col = (self.bin >> 13) & 7 + result = Instr.table_16_4_RV32[line][col] + else: + line = (self.bin >> 5) & 3 + col = (self.bin >> 2) & 7 + result = Instr.table_24_1[line][col] + return result + + def fields(self): + """Get an object with the fields of the instruction""" + return Instr.type_of_base[self.base()](self) + + def is_compressed(self): + """Is the instruction from the C extension?""" + return (self.bin & 3) < 3 + + def size(self): + """Size of the instruction in bytes""" + return 2 if self.is_compressed() else 4 + + def is_load(self): + """Is the instruction a load?""" + return self.base() in Instr.loads + + def is_store(self): + """Is the instruction a store?""" + return self.base() in Instr.stores + + def is_branch(self): + """Is it a taken/not taken branch?""" + return self.base() in ['C.BEQZ', 'C.BNEZ', 'BRANCH'] + + def is_regjump(self): + """Is it a register jump?""" + if self.base() in ['JALR']: + return True + if self.base() == 'C.J[AL]R/C.MV/C.ADD': + return self.fields().name in ['C.JALR', 'C.JR'] + return False + + def is_jump(self): + """Is it an immediate jump?""" + return self.base() in ['JAL', 'C.JAL', 'C.J'] + + def is_muldiv(self): + """Is it a muldiv instruction?""" + if self.base() not in ['OP', 'OP-32']: + return False + f = self.fields() + return f.funct7 == 1 or (f.funct7 == 5 and f.funct3 in [1, 3]) + + def offset(self): + """Get offset from instr (sometimes it is just 'imm' in RISCV spec)""" + fields = self.fields() + return fields.offset if hasattr(fields, 'offset') else fields.imm + + def addr_fields(self): + """Get the register and offset to build an address""" + return AddrFields(self.fields().rs1, self.offset()) + + def has_WAW_from(self, other): + """b.has_WAW_from(a) if a.rd == b.rd""" + a = other.fields() + b = self.fields() + if not (hasattr(a, 'rd') and hasattr(b, 'rd')): + return False + return a.rd == b.rd and a.rd != Reg.zero + + def has_RAW_from(self, other): + """b.has_RAW_from(a) if b.rsX == a.rd""" + a = other.fields() + b = self.fields() + if not hasattr(a, 'rd') or a.rd == Reg.zero: + return False + if hasattr(b, 'rs1') and a.rd == b.rs1: + return True + return hasattr(b, 'rs2') and a.rd == b.rs2 + + def has_WAR_from(self, other): + """b.has_WAR_from(a) if b.rd == a.rsX""" + a = other.fields() + b = self.fields() + if not hasattr(b, 'rd') or b.rd == Reg.zero: + return False + if hasattr(a, 'rs1') and a.rs1 == b.rd: + return True + return hasattr(a, 'rs2') and a.rs2 == b.rd diff --git a/perf-model/model.py b/perf-model/model.py new file mode 100644 index 00000000000..e1f2f61941e --- /dev/null +++ b/perf-model/model.py @@ -0,0 +1,668 @@ +# Copyright 2024 Thales Silicon Security +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Original Author: Côme ALLART - Thales + +""" +Performance model of the cva6 +""" + +import sys +import re + +from dataclasses import dataclass +from enum import Enum +from collections import defaultdict + +#from matplotlib import pyplot as plt + +from isa import Instr, Reg + +EventKind = Enum('EventKind', [ + 'WAW', 'WAR', 'RAW', + 'BMISS', 'BHIT', + 'STRUCT', + 'issue', 'done', 'commit', +]) + +def to_signed(value, xlen=32): + signed = value + if signed >> (xlen - 1): + signed -= 1 << xlen + return signed + +class Event: + """Represents an event on an instruction""" + def __init__(self, kind, cycle): + self.kind = kind + self.cycle = cycle + + def __repr__(self): + return f"@{self.cycle}: {self.kind}" + +class Instruction(Instr): + """Represents a RISC-V instruction with annotations""" + + def __init__(self, line, address, hex_code, mnemo): + Instr.__init__(self, int(hex_code, base=16)) + self.line = line + self.address = int(address, base=16) + self.hex_code = hex_code + self.mnemo = mnemo + self.events = [] + + def mnemo_name(self): + """The name of the instruction (fisrt word of the mnemo)""" + return self.mnemo.split()[0] + + def next_addr(self): + """Address of next instruction""" + return self.address + self.size() + + _ret_regs = [Reg.ra, Reg.t0] + + def is_ret(self): + "Does CVA6 consider this instruction as a ret?" + f = self.fields() + # Strange conditions, no imm check, no rd-discard check + return self.is_regjump() \ + and f.rs1 in Instruction._ret_regs \ + and (self.is_compressed() or f.rs1 != f.rd) + + def is_call(self): + "Does CVA6 consider this instruction as a ret?" + base = self.base() + f = self.fields() + return base == 'C.JAL' \ + or base == 'C.J[AL]R/C.MV/C.ADD' and f.name == 'C.JALR' \ + or base in ['JAL', 'JALR'] and f.rd in Instruction._ret_regs + + def __repr__(self): + return self.mnemo + +@dataclass +class Entry: + """A scoreboard entry""" + instr: Instruction + cycles_since_issue = 0 + done: bool = False + + def __repr__(self): + status = "DONE" if self.done else "WIP " + addr = f"0x{self.instr.address:08X}" + return f"{status} {addr}:`{self.instr}` for {self.cycles_since_issue}" + +@dataclass +class LastIssue: + """To store the last issued instruction""" + instr: Instruction + issue_cycle: int + +class IqLen: + """Model of the instruction queue with only a size counter""" + def __init__(self, fetch_size, debug=False): + self.fetch_size = 4 + while self.fetch_size < fetch_size: + self.fetch_size <<= 1 + self.debug = debug + self.len = self.fetch_size + self.new_fetch = True + + def fetch(self): + """Fetch bytes""" + self.len += self.fetch_size + self._debug(f"fetched {self.fetch_size}, got {self.len}") + self.new_fetch = True + + def flush(self): + """Flush instruction queue (bmiss or exception)""" + self.len = 0 + self._debug(f"flushed, got {self.len}") + self.new_fetch = False + + def jump(self): + """Loose a fetch cycle and truncate (jump, branch hit taken)""" + if self.new_fetch: + self.len -= self.fetch_size + self._debug(f"jumping, removed {self.fetch_size}, got {self.len}") + self.new_fetch = False + self._truncate() + self._debug(f"jumped, got {self.len}") + + def has(self, instr): + """Does the instruction queue have this instruction?""" + length = self.len + if self._is_crossword(instr): + length -= (self.fetch_size - 2) + self._debug(f"comparing {length} to {instr.size()} ({instr})") + return length >= instr.size() + + def remove(self, instr): + """Remove instruction from queue""" + self.len -= instr.size() + self._debug(f"removed {instr.size()}, got {self.len}") + self._truncate(self._addr_index(instr.next_addr())) + if instr.is_jump(): + self.jump() + + def _addr_index(self, addr): + return addr & (self.fetch_size - 1) + + def _is_crossword(self, instr): + is_last = self._addr_index(instr.address) == self.fetch_size - 2 + return is_last and not instr.is_compressed() + + def _truncate(self, index=0): + occupancy = self.fetch_size - self._addr_index(self.len) + to_remove = index - occupancy + if to_remove < 0: + to_remove += self.fetch_size + self.len -= to_remove + self._debug(f"truncated, removed {to_remove}, got {self.len}") + + def _debug(self, message): + if self.debug: + print(f"iq: {message}") + +class Ras: + "Return Address Stack" + def __init__(self, depth=2, debug=False): + self.depth = depth - 1 + self.stack = [] + self.debug = debug + self.last_dropped = None + + def push(self, addr): + "Push an address on the stack, forget oldest entry if full" + self.stack.append(addr) + self._debug(f"pushed 0x{addr:08X}") + if len(self.stack) > self.depth: + self.stack.pop(0) + self._debug("overflown") + + def drop(self): + "Drop an address from the stack" + self._debug("dropping") + if len(self.stack) > 0: + self.last_dropped = self.stack.pop() + else: + self.last_dropped = None + self._debug("was already empty") + + def read(self): + "Read the top of the stack without modifying it" + self._debug("reading") + if self.last_dropped is not None: + addr = self.last_dropped + self._debug(f"read 0x{addr:08X}") + return addr + self._debug("was empty") + return None + + def resolve(self, instr): + "Push or pop depending on the instruction" + self._debug(f"issuing {instr}") + if instr.is_ret(): + self._debug("detected ret") + self.drop() + if instr.is_call(): + self._debug("detected call") + self.push(instr.next_addr()) + + def _debug(self, message): + if self.debug: + print(f"RAS: {message}") + +class Bht: + "Branch History Table" + + @dataclass + class Entry: + "A BTB entry" + valid: bool = False + sat_counter: int = 0 + + def __init__(self, entries=128): + self.contents = [Bht.Entry() for _ in range(entries)] + + def predict(self, addr): + "Is the branch taken? None if don't know" + entry = self.contents[self._index(addr)] + if entry.valid: + return entry.sat_counter >= 2 + return None + + def resolve(self, addr, taken): + "Update branch prediction" + index = self._index(addr) + entry = self.contents[index] + entry.valid = True + if taken: + if entry.sat_counter < 3: + entry.sat_counter += 1 + else: + if entry.sat_counter > 0: + entry.sat_counter -= 1 + + def _index(self, addr): + return (addr >> 1) % len(self.contents) + +Fu = Enum('Fu', ['ALU', 'MUL', 'BRANCH', 'LDU', 'STU']) + +# We have +# - FLU gathering ALU + BRANCH (+ CSR, not significant in CoreMark) +# - LSU for loads and stores +# - FP gathering MUL + second ALU (+ Floating, unused in CoreMark) +# This way we do not have more write-back ports than currently with F + +def to_fu(instr): + if instr.is_branch() or instr.is_jump() or instr.is_regjump(): + return Fu.BRANCH + if instr.is_muldiv(): + return Fu.MUL + if instr.is_load(): + return Fu.LDU + if instr.is_store(): + return Fu.STU + return Fu.ALU + +class FusBusy: + "Is each functional unit busy" + def __init__(self, has_alu2 = False): + self.has_alu2 = has_alu2 + + self.alu = False + self.mul = False + self.branch = False + self.ldu = False + self.stu = False + self.alu2 = False + + self.issued_mul = False + + def _alu2_ready(self): + return self.has_alu2 and not self.alu2 + + def is_ready(self, fu): + return { + Fu.ALU: self._alu2_ready() or not self.alu, + Fu.MUL: not self.mul, + Fu.BRANCH: not self.branch, + Fu.LDU: not self.ldu, + Fu.STU: not self.stu, + }[fu] + + def is_ready_for(self, instr): + return self.is_ready(to_fu(instr)) + + def issue(self, instr): + return { + Fu.ALU: FusBusy.issue_alu, + Fu.MUL: FusBusy.issue_mul, + Fu.BRANCH: FusBusy.issue_branch, + Fu.LDU: FusBusy.issue_ldu, + Fu.STU: FusBusy.issue_stu, + }[to_fu(instr)](self) + + def issue_mul(self): + self.mul = True + self.issued_mul = True + + def issue_alu(self): + if not self._alu2_ready(): + assert not self.alu + self.alu = True + self.branch = True + else: + self.alu2 = True + + def issue_branch(self): + self.alu = True + self.branch = True + # Stores are not allowed yet + self.stu = True + + def issue_ldu(self): + self.ldu = True + self.stu = True + + def issue_stu(self): + self.stu = True + self.ldu = True + + def cycle(self): + self.alu = self.issued_mul + self.mul = False + self.branch = self.issued_mul + self.ldu = False + self.stu = False + self.alu2 = False + self.issued_mul = False + +class Model: + """Models the scheduling of CVA6""" + + re_instr = re.compile( + r"([a-z]+)\s+0:\s*0x0*([0-9a-f]+)\s*\(([0-9a-fx]+)\)\s*(@\s*[0-9]+)?\s*(.*)" + ) + + def __init__( + self, + debug=False, + issue=1, + commit=2, + sb_len=8, + fetch_size=None, + has_forwarding=True, + has_renaming=True): + self.ras = Ras(debug=debug) + self.bht = Bht() + self.instr_queue = [] + self.scoreboard = [] + self.fus = FusBusy(issue > 1) + self.last_issued = None + self.last_committed = None + self.retired = [] + self.sb_len = sb_len + self.debug = debug + self.iqlen = IqLen(fetch_size or 4 * issue, debug) + self.issue_width = issue + self.commit_width = commit + self.has_forwarding = has_forwarding + self.has_renaming = has_renaming + self.log = [] + + def log_event_on(self, instr, kind, cycle): + """Log an event on the instruction""" + if self.debug: + print(f"{instr}: {kind}") + event = Event(kind, cycle) + instr.events.append(event) + self.log.append((event, instr)) + + def predict_branch(self, instr): + """Predict if branch is taken or not""" + pred = self.bht.predict(instr.address) + if pred is not None: + return pred + return instr.offset() >> 31 != 0 + + def predict_regjump(self, instr): + """Predict destination address of indirect jump""" + if instr.is_ret(): + return self.ras.read() or 0 + return 0 # always miss, as there is no btb yet + + def predict_pc(self, last): + """Predict next program counter depending on last issued instruction""" + if last.is_branch(): + taken = self.predict_branch(last) + offset = to_signed(last.offset()) if taken else last.size() + return last.address + offset + if last.is_regjump(): + return self.predict_regjump(last) + return None + + def issue_manage_last_branch(self, instr, cycle): + """Flush IQ if branch miss, jump if branch hit""" + if self.last_issued is not None: + last = self.last_issued.instr + pred = self.predict_pc(last) + if pred is not None: + bmiss = pred != instr.address + resolved = cycle >= self.last_issued.issue_cycle + 6 + if bmiss and not resolved: + self.iqlen.flush() + branch = EventKind.BMISS if bmiss else EventKind.BHIT + if branch not in [e.kind for e in instr.events]: + self.log_event_on(instr, branch, cycle) + taken = instr.address != last.next_addr() + if taken and not bmiss: + # last (not instr) was like a jump + self.iqlen.jump() + + def commit_manage_last_branch(self, instr, cycle): + "Resolve branch prediction" + if self.last_committed is not None: + last = self.last_committed + if last.is_branch(): + taken = instr.address != last.next_addr() + self.bht.resolve(last.address, taken) + self.last_committed = instr + + def find_data_hazards(self, instr, cycle): + """Detect and log data hazards""" + found = False + for entry in self.scoreboard: + if instr.has_WAW_from(entry.instr) and not self.has_renaming: + self.log_event_on(instr, EventKind.WAW, cycle) + found = True + can_forward = self.has_forwarding and entry.done + if instr.has_RAW_from(entry.instr) and not can_forward: + self.log_event_on(instr, EventKind.RAW, cycle) + found = True + return found + + def find_structural_hazard(self, instr, cycle): + """Detect and log structural hazards""" + if not self.fus.is_ready_for(instr): + self.log_event_on(instr, EventKind.STRUCT, cycle) + return True + return False + + def try_issue(self, cycle): + """Try to issue an instruction""" + if len(self.instr_queue) == 0 or len(self.scoreboard) >= self.sb_len: + return + can_issue = True + instr = self.instr_queue[0] + if self.find_data_hazards(instr, cycle): + can_issue = False + if self.find_structural_hazard(instr, cycle): + can_issue = False + self.issue_manage_last_branch(instr, cycle) + if not self.iqlen.has(instr): + can_issue = False + if can_issue: + self.iqlen.remove(instr) + instr = self.instr_queue.pop(0) + self.log_event_on(instr, EventKind.issue, cycle) + entry = Entry(instr) + self.scoreboard.append(entry) + self.fus.issue(instr) + self.last_issued = LastIssue(instr, cycle) + self.ras.resolve(instr) + + def try_execute(self, cycle): + """Try to execute instructions""" + for entry in self.scoreboard: + entry.cycles_since_issue += 1 + instr = entry.instr + duration = 1 + if instr.is_load() or instr.is_store(): + duration = 2 + if instr.is_muldiv(): + duration = 2 + if entry.cycles_since_issue == duration: + self.log_event_on(instr, EventKind.done, cycle) + entry.done = True + + def try_commit(self, cycle, commit_port): + """Try to commit an instruction""" + if len(self.scoreboard) == 0: + return + entry = self.scoreboard[0] + can_commit = True + if commit_port > 0: + if entry.instr.is_store(): + can_commit = False + if not entry.done: + can_commit = False + if can_commit: + instr = self.scoreboard.pop(0).instr + self.log_event_on(instr, EventKind.commit, cycle) + self.retired.append(instr) + self.commit_manage_last_branch(instr, cycle) + + def run_cycle(self, cycle): + """Runs a cycle""" + self.fus.cycle() + for commit_port in range(self.commit_width): + self.try_commit(cycle, commit_port) + self.try_execute(cycle) + for _ in range(self.issue_width): + self.try_issue(cycle) + self.iqlen.fetch() + + def load_file(self, path): + """Fill a model from a trace file""" + with open(path, "r", encoding="utf8") as file: + for line in [l.strip() for l in file]: + found = Model.re_instr.search(line) + if found: + address = found.group(2) + hex_code = found.group(3) + mnemo = found.group(5) + instr = Instruction(line, address, hex_code, mnemo) + self.instr_queue.append(instr) + + def run(self, cycles=None): + """Run until completion""" + cycle = 0 + while len(self.instr_queue) > 0 or len(self.scoreboard) > 0: + self.run_cycle(cycle) + if self.debug: + print(f"Scoreboard @{cycle}") + for entry in self.scoreboard: + print(f" {entry}") + print(f"iqlen = {self.iqlen.len}") + print() + cycle += 1 + + if cycles is not None and cycle > cycles: + break + return cycle + +def write_trace(output_file, instructions): + """Write cycle-annotated trace""" + pattern = re.compile(r"\)\s*(@\s*[0-9]+)? ") + + lines = [] + for instr in instructions: + commit_event = instr.events[-1] + assert commit_event.kind == EventKind.commit + cycle = commit_event.cycle + annotated = re.sub(pattern, f") @ {cycle} ", instr.line) + #if EventKind.STRUCT in [e.kind for e in instr.events]: + # annotated += " #STRUCT" + #if EventKind.RAW in [e.kind for e in instr.events]: + # annotated += " #RAW" + lines.append(f"{annotated}\n") + + with open(output_file, 'w') as f: + f.writelines(lines) + +def print_data(name, value, ts=24, sep='='): + "Prints 'name = data' with alignment of the '='" + + spaces = ' ' * (ts - len(name)) + print(f"{name}{spaces} {sep} {value}") + +def display_scores(scores): + """Display a 3D graph of scores against commit/issue-wide""" + bars = [] + for x, l in enumerate(scores): + for y, z in enumerate(l): + bars.append((x, y, z)) + + x, y, z, dx, dy, dz = [], [], [], [], [], [] + for bx, by, bz in bars: + x.append(bx) + y.append(by) + z.append(0) + dx.append(.5) + dy.append(.5) + dz.append(bz) + + #fig = plt.figure() + #ax1 = fig.add_subplot(111, projection='3d') + #ax1.bar3d(x, y, z, dx, dy, dz) + #ax1.set_xlabel("issue") + #ax1.set_ylabel("commit") + #ax1.set_zlabel("CoreMark/MHz") + #plt.show() + +def issue_commit_graph(input_file, n = 3): + """Plot the issue/commit graph""" + + r = range(n + 1) + scores = [[0 for _ in r] for _ in r] + + if input_file is None: + scores = [[0, 0, 0, 0, 0, 0], [0, 2.651936045910317, 2.651936045910317, 2.651936045910317, 2.651936045910317, 2.651936045910317], [0, 3.212779150348426, 3.6292766488711137, 3.6292766488711137, 3.6292766488711137, 3.6292766488711137], [0, 3.2550388000624966, 3.900216852056974, 3.914997572701505, 3.914997572701505, 3.914997572701505], [0, 3.2596436557555526, 3.9257869239889134, 3.9420984578510834, 3.9421606193922765, 3.9421606193922765], [0, 3.260695897718491, 3.944757614368385, 3.9623576027736505, 3.9625460150656, 3.9625460150656]] # pylint: disable=line-too-long + else: + r = range(1, n + 1) + for issue in r: + for commit in r: + print("running", issue, commit) + model = Model(issue=issue, commit=commit) + model.load_file(input_file) + model.run() + n_cycles = count_cycles(filter_timed_part(model.retired)) + score = 1000000 / n_cycles + scores[issue][commit] = score + print(scores) + display_scores(scores) + +def filter_timed_part(all_instructions): + "Keep only timed part from a trace" + filtered = [] + re_csrr_minstret = re.compile(r"^csrrs\s+\w+,\s*minstret\b") + accepting = False + for instr in all_instructions: + if re_csrr_minstret.search(instr.mnemo): + accepting = not accepting + continue + if accepting: + filtered.append(instr) + return filtered + +def count_cycles(retired): + start = min(e.cycle for e in retired[0].events) + end = max(e.cycle for e in retired[-1].events) + return end - start + +def print_stats(instructions): + ecount = defaultdict(lambda: 0) + + for instr in instructions: + for e in instr.events: + ecount[e.kind] += 1 + cycle = e.cycle + n_instr = len(instructions) + n_cycles = count_cycles(instructions) + + print_data("cycle number", n_cycles) + print_data("Coremark/MHz", 1000000 / n_cycles) + print_data("instruction number", n_instr) + for ek, count in ecount.items(): + print_data(f"{ek}/instr", f"{100 * count / n_instr:.2f}%") + +def main(input_file: str): + "Entry point" + + model = Model(debug=True, issue=2, commit=2) + model.load_file(input_file) + model.run() + + write_trace('annotated.log', model.retired) + + #print_stats(filter_timed_part(model.retired)) + print_stats(model.retired) + +if __name__ == "__main__": + main(sys.argv[1]) diff --git a/perf-model/profile.py b/perf-model/profile.py new file mode 100644 index 00000000000..9b53a639b52 --- /dev/null +++ b/perf-model/profile.py @@ -0,0 +1,310 @@ +from dataclasses import dataclass +import subprocess +import sys +import re + +import flameprof + +import isa + +re_instr = re.compile( + r"([a-z]+)\s+0:\s*0x00000000([0-9a-f]+)\s*\(([0-9a-fx]+)\)\s*@\s*([0-9]+)\s*(.*)" +) +re_mem = re.compile(r"mem\s*0x([0-9a-f]+)") + +@dataclass +class AsmFunc: + index: int + name: str + size: int + vma: int + lma: int + file_off: int + align: int + + def start_addr(self): + return self.vma + + def end_addr(self): + return self.vma + self.size + + def contains(self, addr): + return self.start_addr() <= addr and addr < self.end_addr() + + def load_elf(path): + with open(path, "r", encoding="utf8") as f: + lines = f.readlines() + return [AsmFunc._from_line(l.split()) for l in lines if ".text." in l] + + def _from_line(line): + return AsmFunc( + index = int(line[0]), + name = line[1][6:], + size = int(line[2], 16), + vma = int(line[3], 16), + lma = int(line[4], 16), + file_off = int(line[5], 16), + align = int(line[6][3:], 16), + ) + +@dataclass +class RvfiInstr: + def __init__(self, address, cycle, op, name, line, next_line=None): + self.address = address + self.cycle = cycle + self.op = isa.Instr(op) + self.line = line + self.name = name + self.mem_address = None + if self.op.is_load() or self.op.is_store(): + assert(next_line is not None) + self.mem_address = int(re_mem.search(next_line).group(1), 16) + + def load_trace(path): + with open(path, "r", encoding="utf8") as f: + lines = f.readlines() + return RvfiInstr._from_lines(lines) + + def _from_lines(lines): + instrs = [] + for i, l in enumerate(lines): + line = l.strip() + found = re_instr.search(line) + if found: + instr = RvfiInstr( + address = int(found.group(2), 16), + cycle = int(found.group(4)), + op = int(found.group(3), 16), + line = line, + name = found.group(5).split(" ")[0], + next_line = lines[i+1] if i + 1 < len(lines) else None, + ) + instrs.append(instr) + return instrs + +class CallStack: + def __init__(self, functions): + self.stack = [] + self.fns = { f.start_addr(): f for f in functions } + + def run(self, instr): + addr = instr.address + + f = self.fns.get(addr) + if f: + e = RawEvent(stack=self.stack_names(), cycle=instr.cycle) + self.stack.append(f) + return e + + if len(self.stack) > 0: + curr = self.stack[-1] + if not curr.contains(addr) and any(f.contains(addr) for f in self.fns.values()): + e = RawEvent(stack=self.stack_names(), cycle=instr.cycle) + self.stack.pop() + return e + + return None + + def stack_names(self): + return [f.name for f in self.stack] + +@dataclass +class RawEvent: + stack: list + cycle: int + +@dataclass +class Event: + stack: list + instr: RvfiInstr + duration: int + icount: int + executed_ins : dict + +def run_all(fns, instrs): + events = [] + cs = CallStack(fns) + last_event_cycle = 0 + last_event_i = 0 + last_instr_cycle = 0 + executed_ins = {} + + for i, instr in enumerate(instrs): + count, tot_duration = executed_ins.get(instr.name, (0, 0)) + count += 1 + tot_duration += instr.cycle - last_instr_cycle + executed_ins[instr.name] = count, tot_duration + last_instr_cycle = instr.cycle + + event = cs.run(instr) + if event: + events.append(Event( + stack = event.stack, + instr = instr, + duration = event.cycle - last_event_cycle, + icount = i - last_event_i, + executed_ins = executed_ins, + )) + last_event_cycle = event.cycle + last_event_i = i + executed_ins = {} + + return events + +def fake_file(func): + return ("", 1, func) + +class Stat: + def __init__(self): + self.cc = 0 + self.nc = 0 + self.tt = 0 + self.ct = 0 + self.icount = 0 + self.callers = {} + + def ipc(self): + return self.icount / self.tt if self.tt > 0 else 0.0 + + def build(self): + callers = { fake_file(func): t for func, t in self.callers.items() } + return (self.cc, self.nc, self.tt, self.ct, callers) + + def add_caller(self, caller, c_cc, c_nc, c_tt, c_ct): + (cc, nc, tt, ct) = self.callers[caller] if caller in self.callers else \ + (0, 0, 0, 0) + + cc += c_cc + nc += c_nc + tt += c_tt + ct += c_ct + + self.callers[caller] = (cc, nc, tt, ct) + +def put_stat(d, name): + if not name in d: + d[name] = Stat() + +def build_stats(events, inst_analysis=False): + stats = {} + last_stack = [] + + for event in events: + if len(event.stack) == 0: + continue + stack = event.stack + # Current function, in the which event.duration has been spent + func = stack[-1] + put_stat(stats, func) + # All time is spent inside instructions + duration = 0 if inst_analysis else event.duration + + if inst_analysis: + for instr_name, (count, d) in event.executed_ins.items(): + put_stat(stats, instr_name) + stats[instr_name].tt += d + stats[instr_name].ct += d + stats[instr_name].add_caller(func, 0, count, d, d) + + # Spent duration right into func + stats[func].tt += duration + stats[func].icount += event.icount + + # Spent duration in func and its parents + for f in stack: + stats[f].ct += event.duration + + # Spent duration while being called directly by caller + if len(stack) > 1: + caller = stack[-2] + stats[func].add_caller(caller, 0, 0, duration, 0) + + # Each function in the call stack spent duration called by its caller + for i, callee in enumerate(stack): + if i > 0: + caller = stack[i - 1] + stats[callee].add_caller(caller, 0, 0, 0, event.duration) + + if len(event.stack) >= len(last_stack): + # Make sure it is a call + assert len(event.stack) == len(last_stack) + 1 + else: + # Make sure it is a ret + assert len(event.stack) == len(last_stack) - 1 + + callee = last_stack[-1] + caller = func + put_stat(stats, caller) + + # The caller called the callee once + # It is not a prim call if the callee was already in the stack. + c_cc = 1 if not callee in event.stack else 0 + stats[callee].add_caller(caller, c_cc, 1, 0, 0) + stats[callee].cc += c_cc + stats[callee].nc += 1 + + last_stack = stack + + return stats + + #{ func: (cc, nc, tt, ct, callers) } + # func = file_name, line_number, func_name + # cc = prim_calls = number of calls if not already in call stack (non-recurse calls)? + # nc = number of calls + # tt = tottime = time spent in this function alone (not callees) + # ct = cumtime = time spent in the function plus all functions that this function called + # callers/clist = { cfunc: t } = { name: (cc, nc, tt, ct) } + +def format_stack_change(old_stack, new_stack): + if len(old_stack) > len(new_stack): + return f"RET FROM {old_stack[-1]} (in {new_stack})" + if len(new_stack) > len(old_stack): + return f"CALL {new_stack[-1]} (in {old_stack})" + return None + +def render(stats, svg_path, threshold=0): + stats = { fake_file(func): stat.build() for func, stat in stats.items() } + + with open(svg_path, 'w') as f: + flameprof.render(stats, f, width=3000, threshold=threshold) + +def filter_events(events, func_name): + return [e for e in events if func_name not in e.stack] + +if __name__ == "__main__": + assert len(sys.argv) == 4 + elf_file = sys.argv[1] + trace_file = sys.argv[2] + path_svg = sys.argv[3] + assert path_svg.endswith(".svg") + + functions = AsmFunc.load_elf(elf_file) + instructions = RvfiInstr.load_trace(trace_file) + + events = run_all(functions, instructions) + + i_event = 0 + for instr in instructions: + if i_event < len(events)-1 and events[i_event].instr is instr: + print(">>>", format_stack_change(events[i_event].stack, events[i_event+1].stack)) + i_event += 1 + print(instr.line) + + stats = build_stats(events) + duration = sum(map(lambda e: e.duration, events)) + icount = sum(map(lambda e: e.icount, events)) + print("duration:", duration) + print("icount:", icount) + print("IPC:", icount / duration) + + ipcs = [(stat.ipc(), func) for func, stat in stats.items()] + ipcs.sort(reverse=True) + for ipc, func in ipcs: + print(f"{ipc:.02f} IPC for {func}") + + render(stats, path_svg) + + stats = build_stats(events, True) + for f, s in stats.items(): + print(f"{f}: {s.ct}") + render(stats, f"{path_svg[:-4]}_with_ins.svg") diff --git a/spyglass/reference_summary.rpt b/spyglass/reference_summary.rpt index 21af934a3b2..0b03cd0570e 100644 --- a/spyglass/reference_summary.rpt +++ b/spyglass/reference_summary.rpt @@ -72,7 +72,7 @@ INFO ElabSummary 1 Generates Elaborated design units +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Severity Rule Name Count Short Help =============================================================================== -ERROR W123 12 A signal or variable has been read but +ERROR W123 18 A signal or variable has been read but is not set ERROR W416 1 Width of return type and return value of a function should be same (Verilog) diff --git a/src_files.yml b/src_files.yml index b71b628b6ea..33c8bf6c05e 100644 --- a/src_files.yml +++ b/src_files.yml @@ -22,6 +22,7 @@ ariane: src/ex_stage.sv, src/frontend/btb.sv, src/frontend/bht.sv, + src/frontend/bht2lvl.sv, src/frontend/ras.sv, src/frontend/instr_scan.sv, src/frontend/frontend.sv, diff --git a/tutorials/asic.md b/tutorials/asic.md new file mode 100644 index 00000000000..2a2ed80fef8 --- /dev/null +++ b/tutorials/asic.md @@ -0,0 +1,23 @@ +## ASIC Synthesis + +How to make cva6 synthesis ? +``` +make -C pd/synth cva6_synth FOUNDRY_PATH=/your/techno/basepath/ TECH_NAME=yourTechnoName TARGET_LIBRARY_FILES="yourLib1.db\ yourLib2.db" PERIOD=10 NAND2_AREA=650 TARGET=cv64a6_imafdc_sv39 ADDITIONAL_SEARCH_PATH="others/libs/paths/one\ others/libs/paths/two" +``` +Don't forget to escape spaces in lists. +Reports are under: pd/synth/ariane/reports + + +## ASIC Gate Simulation with `core-v-verif` repository + +> :warning: **Warning**: this chapter needs to be updated. See Github issue https://github.com/openhwgroup/cva6/issues/1358. + +```sh +export DV_SIMULATORS=veri-testharness,spike +cva6/regress/smoke-tests.sh +make -C pd/synth cva6_synth FOUNDRY_PATH=/your/techno/basepath/ TECH_NAME=yourTechnoName TARGET_LIBRARY_FILES="yourLib1.db\ yourLib2.db" PERIOD=10 NAND2_AREA=650 TARGET=cv64a6_imafdc_sv39 ADDITIONAL_SEARCH_PATH="others/libs/paths/one\ others/libs/paths/two" +sed 's/module SyncSpRamBeNx64_1/module SyncSpRamBeNx64_2/' pd/synth/ariane_synth.v > pd/synth/ariane_synth_modified.v +cd cva6/sim +make vcs_clean +python3 cva6.py --testlist=../tests/testlist_riscv-tests-cv64a6_imafdc_sv39-p.yaml --test rv64ui-p-ld --iss_yaml cva6.yaml --target cv64a6_imafdc_sv39 --iss=spike,vcs-core-gate $DV_OPTS +``` diff --git a/tutorials/fpga.md b/tutorials/fpga.md new file mode 100644 index 00000000000..30f416f3563 --- /dev/null +++ b/tutorials/fpga.md @@ -0,0 +1,279 @@ +# COREV-APU FPGA Emulation + +We currently provide support for the [Genesys 2 board](https://reference.digilentinc.com/reference/programmable-logic/genesys-2/reference-manual) and the [Agilex 7 Development Kit](https://www.intel.la/content/www/xl/es/products/details/fpga/development-kits/agilex/agf014.html). + +- **Genesys 2** + + We provide pre-build bitstream and memory configuration files for the Genesys 2 [here](https://github.com/openhwgroup/cva6/releases). + + Tested on Vivado 2018.2. The FPGA currently contains the following peripherals: + + - DDR3 memory controller + - SPI controller to connect to an SDCard + - Ethernet controller + - JTAG port (see debugging section below) + - Bootrom containing zero stage bootloader and device tree. + - UART + - GPIOs connected to LEDs + +> The ethernet controller and the corresponding network connection is still work in progress and not functional at the moment. Expect some updates soon-ish. + +- **Agilex 7** + + Tested on Quartus Prime Version 24.1.0 Pro Edition. The FPGA currently contains the following peripherals: + + - DDR4 memory controller + - JTAG port (see debugging section below) + - Bootrom containing zero stage bootloader + - UART + - GPIOs connected to LEDs + +> The ethernet controller and the corresponding network connection, as well as the SD Card connection and the capability to boot linux are still work in progress and not functional at the moment. Expect some updates soon-ish. + + +## Programming the Memory Configuration File or bitstream + +- **Genesys 2** + + - Open Vivado 2018.2 + - Open the hardware manager and open the target board (Genesys II - `xc7k325t`) + - Tools - Add Configuration Memory Device + - Select the following Spansion SPI flash `s25fl256xxxxxx0` + - Add `ariane_xilinx.mcs` + - Press Ok. Flashing will take a couple of minutes. + - Right click on the FPGA device - Boot from Configuration Memory Device (or press the program button on the FPGA) + +- **Agilex 7** + + - Open Quartus programmer + - Configure HW Setup by selecting the AGF FPGA Development Kit + - Click Auto-Detect to scan the JTAG chain + - In the device list, right click over device AGFB014R24B and add file (.rbf under corev_apu/altera/output_files) + - Click on Start button to program the FPGA + - Right after programming you can connect to the UART and see your CVA6 alive on Agilex! + - For this you need to use the JTAG UART provided with Quartus installation + +``` +.$quartus_installation_path/qprogrammer/quartus/bin/juart-terminal +juart-terminal: connected to hardware target using JTAG UART on cable +juart-terminal: "AGF FPGA Development Kit [1-3]", device 1, instance 0 +juart-terminal: (Use the IDE stop button or Ctrl-C to terminate) + +Hello World! +``` + +## Booting Linux + +The first stage bootloader will boot from SD Card by default. Get yourself a suitable SD Card (we use [this](https://www.amazon.com/Kingston-Digital-Mobility-MBLY10G2-32GB/dp/B00519BEQO) one). Either grab a pre-built Linux image from [here](https://github.com/pulp-platform/ariane-sdk/releases) or generate the Linux image yourself following the README in the [ariane-sdk repository](https://github.com/pulp-platform/ariane-sdk). Prepare the SD Card by following the "Booting from SD card" section in the ariane-sdk repository. + +Connect a terminal to the USB serial device opened by the FTDI chip e.g.: +``` +screen /dev/ttyUSB0 115200 +``` + +Default baudrate set by the bootloader and Linux is `115200`. + +After you've inserted the SD Card and programmed the FPGA you can connect to the serial port of the FPGA and should see the bootloader and afterwards Linux booting. Default username is `root`, no password required. + +## Booting zephyr RTOS + +[zephyr](https://zephyrproject.org/) is a real-time unikernel operating system developed by the Linux Foundation that targets resource-constrained embedded devices. It is highly configurable and optionally provides subsystems like userspace support with the PMP, a full network stack and a file system. + +zephyr natively supports the cva6 SoC and the **Genesys 2** board in two configurations: [cv64a6_imafdc_sv39](https://docs.zephyrproject.org/latest/boards/openhwgroup/cv64a6_genesys_2/doc/index.html) and [cv32a6_imac_sv32](https://docs.zephyrproject.org/latest/boards/openhwgroup/cv32a6_genesys_2/doc/index.html). +See the +`cv64a6_imafdc_sv39` is the configuration that will be synthesized when you follow the steps [below](#generating-a-bitstream). +In order to build `cv32a6_imac_sv32`, use the following command instead: +```bash +target=cv32a6_imac_sv32 make fpga +``` + +In order to build a zephyr application, follow the [zephyr getting started guide](https://docs.zephyrproject.org/latest/develop/getting_started/index.html) to setup the build dependencies and install zephyr's meta tool *west*. +You can then build zephyr applications using the standard process: +```bash +west build -p -b cv64a6_genesys_2 samples/hello_world # for cv64a6_imafdc_sv39 +west build -p -b cv32a6_genesys_2 samples/hello_world # for cv32a6_imac_sv32 +``` + + +You can use zephyr's *west* to debug or flash the application via openocd, akin to [the instructions below](#debugging): +```bash +west flash # loads the application into memory and runs it +west debug # launches an interactive GDB console that loads the application and stops at the first instruction +west attach # attaches to an application loaded using "west load" +``` + +Alternatively, similar to the [Linux instructions](#booting-linux), you may load zephyr from an SD card. +To this end, *after building the application*, use the provided script: +```bash +./util/write-zephyr-sd.sh /dev/sdXXX /path/to/zephyrproject/zephyr # provide correct SD card device and path to top level of cloned zephyrproject/zephyr repository +``` +**WARNING: The script will wipe the partition table and destroy all data on the SD card. Double-check the device path before running the script.** + +You can then insert the SD card into the board and have the zero-stage boot loader load and run zephyr. + + + +## Generating a Bitstream + +- **Genesys 2** + +To generate the FPGA bitstream (and memory configuration) yourself for the Genesys II board run: + +``` +make fpga +``` + +This will produce a bitstream file and memory configuration file (in `fpga/work-fpga`) which you can permanently flash by running the above commands. + +- **Agilex 7** + +To generate the FPGA bitstream yourself for the Agilex 7 board run: + +``` +make altera +``` + +We recommend to set the parameter FpgaAlteraEn (and also FpgaEn) to benefit from the FPGA optimizations. + +This will produce a bitstream file (in `altera/output_files`) which you can program following the previous instructions. **Note: Bear in mind that you need a Quartus Pro Licence to be able to generate this bitstream** + +To clean the project after generating the bitstream, use + +``` +make clean-altera +``` + +## Debugging + +- **Genesys 2** +You can debug (and program) the FPGA using [OpenOCD](http://openocd.org/doc/html/Architecture-and-Core-Commands.html). We provide two example scripts for OpenOCD below. + +To get started, connect the micro USB port that is labeled with JTAG to your machine. This port is attached to the FTDI 2232 USB-to-serial chip on the Genesys 2 board, and is usually used to access the native JTAG interface of the Kintex-7 FPGA (e.g. to program the device using Vivado 2018.2). However, the FTDI chip also exposes a second serial link that is routed to GPIO pins on the FPGA, and we leverage this to wire up the JTAG from the RISC-V debug module. + +>If you are on an Ubuntu based system you need to add the following udev rule to `/etc/udev/rules.d/99-ftdi.rules` +>``` +> SUBSYSTEM=="usb", ACTION=="add", ATTRS{idProduct}=="6010", ATTRS{idVendor}=="0403", MODE="664", GROUP="plugdev" +>``` + +Once attached to your system, the FTDI chip should be listed when you type `lsusb`: + +``` +Bus 005 Device 019: ID 0403:6010 Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC +``` + +If this is the case, you can go on and start openocd with the `fpga/ariane.cfg` configuration file: + +``` +openocd -f fpga/ariane.cfg + +Open On-Chip Debugger 0.10.0+dev-00195-g933cb87 (2018-09-14-19:32) +Licensed under GNU GPL v2 +For bug reports, read + http://openocd.org/doc/doxygen/bugs.html +adapter speed: 1000 kHz +Info : auto-selecting first available session transport "jtag". To override use 'transport select '. +Info : clock speed 1000 kHz +Info : TAP riscv.cpu does not have IDCODE +Info : datacount=2 progbufsize=8 +Info : Examined RISC-V core; found 1 harts +Info : hart 0: XLEN=64, misa=0x8000000000141105 +Info : Listening on port 3333 for gdb connections +Ready for Remote Connections +Info : Listening on port 6666 for tcl connections +Info : Listening on port 4444 for telnet connections +Info : accepting 'gdb' connection on tcp/3333 +``` +- **Agilex 7** + +You can debug (and program) the FPGA using a modified version of OpenOCD included with Quartus installation ($quartus_installation_path/qprogrammer/quartus/bin/openocd). + +To get started, connect the micro USB port that is labeled with J13 to your machine. It is the same port that is used for the UART. Both use the JTAG interface and connect to the System Level Debugging (SLD) Hub instantiated inside the FPGA. Then the debugger connection goes to the virtual JTAG IP (vJTAG) which can be accessed with the modified version of OpenOCD. + +You can start openocd with the `altera/cva6.cfg` configuration file: + +``` +./$quartus_installation_path/qprogrammer/quartus/bin/openocd -f altera/cva6.cfg +Open On-Chip Debugger 0.11.0-R22.4 +Licensed under GNU GPL v2 +For bug reports, read + http://openocd.org/doc/doxygen/bugs.html +Info : only one transport option; autoselect 'jtag' +Info : Application name is OpenOCD.20241016093010 +Info : No cable specified, so will be searching for cables + +Info : At present, The first hardware cable will be used [1 cable(s) detected] +Info : Cable 1: device_name=(null), hw_name=AGF FPGA Development Kit, server=(null), port=1-3, chain_id=0x559319c8cde0, persistent_id=1, chain_type=1, features=34816, server_version_info=Version 24.1.0 Build 115 03/21/2024 SC Pro Edition +Info : TAP position 0 (C341A0DD) has 3 SLD nodes +Info : node 0 idcode=00406E00 position_n=0 +Info : node 1 idcode=30006E00 position_n=0 +Info : node 2 idcode=0C006E00 position_n=0 +Info : TAP position 1 (20D10DD) has 1 SLD nodes +Info : node 0 idcode=0C206E00 position_n=0 +Info : Discovered 2 TAP devices +Info : Detected device (tap_position=0) device_id=c341a0dd, instruction_length=10, features=12, device_name=AGFB014R24A(.|R1|R2)/.. +Info : Found an Intel device at tap_position 0.Currently assuming it is SLD Hub +Info : Detected device (tap_position=1) device_id=020d10dd, instruction_length=10, features=4, device_name=VTAP10 +Info : Found an Intel device at tap_position 1.Currently assuming it is SLD Hub +Info : This adapter doesn't support configurable speed +Info : JTAG tap: agilex7.fpga.tap tap/device found: 0xc341a0dd (mfg: 0x06e (Altera), part: 0x341a, ver: 0xc) +Info : JTAG tap: auto0.tap tap/device found: 0x020d10dd (mfg: 0x06e (Altera), part: 0x20d1, ver: 0x0) +Info : JTAG tap: agilex7.fpga.tap Parent Tap found: 0xc341a0dd (mfg: 0x06e (Altera), part: 0x341a, ver: 0xc) +Info : Virtual Tap/SLD node 0x00406E00 found at tap position 0 vtap position 0 +Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 10 -expected-id 0x020d10dd" +Info : datacount=2 progbufsize=8 +Info : Examined RISC-V core; found 1 harts +Info : hart 0: XLEN=32, misa=0x40141107 +Info : starting gdb server for agilex7.cva6.0 on 3333 +Info : Listening on port 3333 for gdb connections +Ready for Remote Connections +Info : Listening on port 6666 for tcl connections +Info : Listening on port 4444 for telnet connections +``` + +- **Common for both boards** + +Then you will be able to either connect through `telnet` or with `gdb`: + +``` +risc-none-elf-gdb /path/to/elf + +(gdb) target remote localhost:3333 +(gdb) load +Loading section .text, size 0x6508 lma 0x80000000 +Loading section .rodata, size 0x900 lma 0x80006508 +(gdb) b putchar +(gdb) c +Continuing. + +Program received signal SIGTRAP, Trace/breakpoint trap. +0x0000000080009126 in putchar (s=72) at lib/qprintf.c:69 +69 uart_sendchar(s); +(gdb) si +0x000000008000912a 69 uart_sendchar(s); +(gdb) p/x $mepc +$1 = 0xfffffffffffdb5ee +``` + +You can read or write device memory by using: +``` +(gdb) x/i 0x1000 + 0x1000: lui t0,0x4 +(gdb) set {int} 0x1000 = 22 +(gdb) set $pc = 0x1000 +``` + + +## Preliminary Support for OpenPiton Cache System + +CVA6 has preliminary support for the OpenPiton distributed cache system from Princeton University. To this end, a different L1 cache subsystem (`src/cache_subsystem/wt_cache_subsystem.sv`) has been developed that follows a write-through protocol and that has support for cache invalidations and atomics. + +The corresponding integration patches will be released on [OpenPiton GitHub repository](https://github.com/PrincetonUniversity/openpiton). Check the `README` in that repository to see how to use CVA6 in the OpenPiton setting. + +To activate the different cache system, compile your code with the macro `DCACHE_TYPE`. + + +## Re-generating the Bootcode (ZSBL) + +The zero stage bootloader (ZSBL) for RTL simulation lives in `bootrom/` while the bootcode for the FPGA is in `fpga/src/bootrom`. The RTL bootcode simply jumps to the base of the DRAM where the FSBL takes over. For the FPGA the ZSBL performs additional housekeeping. Both bootloader pass the hartid as well as address to the device tree in argument register `a0` and `a1` respectively. + +To re-generate the bootcode you can use the existing makefile within those directories. To generate the SystemVerilog files you will need the `bitstring` python package installed on your system. diff --git a/tutorials/running_sim.md b/tutorials/running_sim.md new file mode 100644 index 00000000000..c603170b27f --- /dev/null +++ b/tutorials/running_sim.md @@ -0,0 +1,137 @@ +# Running standalone simulations + +Simulating the CVA6 is done by using `verif/sim/cva6.py`. + +The environment variable `DV_SIMULATORS` allows you to specify which simulator to use. + +Four simulation types are supported: +- **veri-testharness**: verilator with corev_apu/testharness testbench +- **veri-testharness-pk**: verilator with corev_apu/testharness and RISC-V Proxy Kernel (for system-level software) +- **vcs-testharness**: vcs with corev_apu/testharness testbench +- **vcs-uvm**: vcs with UVM testbench +- **Spike** ISS + +You can set several simulators, such as : + +```sh +export DV_SIMULATORS=veri-testharness,vcs-testharness,vcs_uvm +``` + +If exactly 2 simulators are given, their trace is compared ([see the Regression tests section](#running-regression-tests-simulations)). + +Here is how you can run the hello world C program with the Verilator model: + +```sh +# Make sure to source this script from the root directory +# to correctly set the environment variables related to the tools +source verif/sim/setup-env.sh + +# Set the NUM_JOBS variable to increase the number of parallel make jobs +# export NUM_JOBS= + +export DV_SIMULATORS=veri-testharness + +cd ./verif/sim + +python3 cva6.py --target cv32a60x --iss=$DV_SIMULATORS --iss_yaml=cva6.yaml \ +--c_tests ../tests/custom/hello_world/hello_world.c \ +--linker=../../config/gen_from_riscv_config/linker/link.ld \ +--gcc_opts="-static -mcmodel=medany -fvisibility=hidden -nostdlib \ +-nostartfiles -g ../tests/custom/common/syscalls.c \ +../tests/custom/common/crt.S -lgcc \ +-I../tests/custom/env -I../tests/custom/common" +``` + +You can run either assembly programs (check `verif/test/custom/hello_world/custom_test_template.S`) or C programs. Run `python3 cva6.py --help` to have more information on the available parameters. + +## Simulating with the RISC-V proxy kernel +When running C programs, a common requirement is to use standard library functions like printf. On a bare-metal core, these functions do not work because they rely on underlying system calls that have no operating system to handle them. The veri-testharness-pk simulation mode solves this by integrating the [RISC-V proxy kernel](https://github.com/riscv-software-src/riscv-pk), which acts as a lightweight service layer to handle these calls (e.g. to properly display printf output). + +A reference script is provided to demonstrate this flow. It automatically builds the proxy kernel and runs a hello_world test on both a 64-bit and a 32-bit target. +To run the simulation, execute the following from the repository root: +```sh +bash verif/regress/veri-testharness-pk-tests.sh +``` +The C program associated with this test contains printf statement(s) with some text. The associated `.log.iss` logfile will display the corresponding text, confirming that the printf statement was executed properly. + +For more information about this simulation mode, installation directories, logfiles, refer to the comments in `verif/regress/veri-testharness-pk-tests.sh` and `verif/regress/install-pk.sh`. For general information regarding simulation logfiles, see the **Logs** section. + +## Simulating with VCS and Verdi + +You can set the environment variable `VERDI` as such if you want to launch Verdi while simulating with VCS: + +```sh +export VERDI=1 +``` + + +# Running regression tests simulations + +The smoke-tests script installs a random instruction generator and several tests suites: +- [riscv-dv](https://github.com/chipsalliance/riscv-dv) +- [riscv-compliance](https://github.com/lowRISC/riscv-compliance) +- [riscv-tests](https://github.com/riscv-software-src/riscv-tests) +- [riscv-arch-test](https://github.com/riscv-non-isa/riscv-arch-test) + + +The regression tests are done by comparing a model simulation trace with the Spike trace. + +Several tests scripts can be found in `./verif/regress` + +For example, here is how would run the riscv-arch-test regression test suite with the Verilator model: + +```sh +export DV_SIMULATORS=veri-testharness,spike +bash verif/regress/dv-riscv-arch-test.sh +``` + + +# Logs + +The logs from cva6.py are located in `./verif/sim/out_YEAR-MONTH-DAY`. + +Assuming you ran the smoke-tests scripts in the previous step, here is the log directory hierarchy: + +- **directed_asm_tests/**: The compiled (to .o then .bin) assembly tests +- **directed_c_tests/**: The compiled (to .o then .bin) c tests +- **spike_sim/**: Spike simulation log and trace files +- **veri_testharness_sim**: Verilator simulation log and trace files, when simulated using veri-testharness +- **veri-testharness-pk_sim:** Verilator simulation log and trace files, when simulated using veri-testharness-pk +- **iss_regr.log**: The regression test log + +The regression test log summarizes the comparison between the simulator trace and the Spike trace. Beware that a if a test fails before the comparison step, it will not appear in this log, check the output of cva6.py and the logs of the simulation instead. + + +# Waveform generation + +Waveform generation is currently supported for Verilator (`veri-testharness`) +and VCS with full UVM testbench (`vcs-uvm`) simulation types. It is disabled +by default to save simulation time and storage space. + +To enable waveform generation for a supported simulation mode, set either +of the two shell variables that control tracing before running any of the +test scripts under `verif/regress`: +- `export TRACE_FAST=1` enables "fast" waveform generation (keep simulation + time low at the expense of space). This will produce VCD files when using + Verilator, and VPD files when using Synopsys VCS with UVM testbench (`vcs-uvm`). +- `export TRACE_COMPACT=1` enables "compact" waveform generation (keep waveform + files smaller at the expense of increased simulation time). This will + produce FST files when using Verilator, and FSDB files when using Synopsys + VCS with UVM testbench (`vcs-uvm`). + +To generate VCD waveforms of the `smoke-tests` regression suite using Verilator, use: +```sh +export DV_SIMULATORS=veri-testharness,spike +export TRACE_FAST=1 +bash verif/regress/smoke-tests-.sh +``` + +Where `` is one of the following, depending on the CPU variant you want to use. +- `cv32a65x`. +- `cv32a6_imac_sv32`. +- `cv64a6_imafdc_sv39`. + +After each simulation run involving Verilator or VCS, the generated waveforms +will be copied to the directory containing the log files (see above,) with +the name of the current HW configuration added to the file name right before +the file type suffix (e.g., `I-ADD-01.cv32a60x.vcd`). diff --git a/util/sanitize/Makefile b/util/sanitize/Makefile new file mode 100644 index 00000000000..2a386b8ba03 --- /dev/null +++ b/util/sanitize/Makefile @@ -0,0 +1,27 @@ +# Copyright 2026 Univ. Grenoble Alpes, Inria, TIMA Laboratory +# +# SPDX-License-Identifier: Apaches-2.0 WITH SHL-2.1 +# +# Authors : Vincent Verdillon +# Creation Date : June, 2026 +# Description : Sanitize Makefile +# History : +# + +# root path +mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) +root-dir := $(abspath $(dir $(mkfile_path))/..) + +ifndef CVA6_REPO_DIR +$(warning must set CVA6_REPO_DIR to point at the root of CVA6 sources -- doing it for you...) +export CVA6_REPO_DIR = $(abspath $(root-dir)) +endif + +all: verilog xlen + +verilog: + cd $(root-dir) && \ + verible-verilog-format --inplace $$(git ls-tree -r HEAD --name-only core | grep '\.sv$$' | grep -v '^core/include/std_cache_pkg.sv$$' | grep -v cvfpu) + +xlen: + bash $(root-dir)/sanitize/systemverilog/xlen_misuse.sh diff --git a/util/sanitize/README.md b/util/sanitize/README.md new file mode 100644 index 00000000000..701996c5f65 --- /dev/null +++ b/util/sanitize/README.md @@ -0,0 +1,20 @@ + + +# Conform + +This directory provides multiple scripts to apply format and sanitize rules on this project. +You can execute all sanitize rules by executing `make`. +Or execute separately with `make verilog`, `make xlen`. + +- `make verilog` apply RTL format rule from the contributing doc. +- `make xlen` search for use of CVA6Cfg's XLEN attribute in arithmetical operations and IS_XLEN + attribute in logical operations. diff --git a/util/sanitize/systemverilog/xlen_misuse.sh b/util/sanitize/systemverilog/xlen_misuse.sh new file mode 100644 index 00000000000..56f3882dd2d --- /dev/null +++ b/util/sanitize/systemverilog/xlen_misuse.sh @@ -0,0 +1,66 @@ +#!/bin/bash + +# Copyright 2026 Univ. Grenoble Alpes, Inria, TIMA Laboratory +# +# SPDX-License-Identifier: Apaches-2.0 WITH SHL-2.1 +# +# Authors : Vincent Verdillon +# Creation Date : June, 2026 +# Description : Sanitize Makefile +# History : +# + +# check shell version +if [ -n "$BASH_VERSION" ]; then + SCRIPT_PATH="$BASH_SOURCE[0]" +elif [ -n "$ZSH_VERSION" ]; then + SCRIPT_PATH="${(%):-%N}" +else + echo "Error: Non recognized shell." + return +fi +export ROOT_PROJECT=$(readlink -f $(dirname "${SCRIPT_PATH}")/../../..) + +# Print all XLEN use in a logical expressions +# in this order : +# unary logical operators, +# conditional operator +# binary bitwise operators, +# binary logical operators, +# binary logical equality operators +# binary case equality operators, +# binary wildcard equality operators +xlen=$(grep $ROOT_PROJECT -rinHI -E --include="*.sv" --exclude="build_config_pkg.sv" \ + -e "(!|~|&|~&|\||~\||\^|~\^|\^~)[0-9a-zA-Z]*CVA6Cfg\.xlen" \ + -e "CVA6Cfg\.xlen *\?:" \ + -e "CVA6Cfg\.xlen *(&|\||\^|\^~|~^)" \ + -e "CVA6Cfg\.xlen *(&&|\|\||->|<->)" \ + -e "CVA6Cfg\.xlen *(==|!=)" \ + -e "CVA6Cfg\.xlen *(===|!==)" \ + -e "CVA6Cfg\.xlen *(==?|!=?)" | sort -u) + +# Print all IS_XLEN32 or IS_XLEN64 in a arithmetic expression +# unary arithmetic operators +# binary arithmetic operators +# binary shift operators +# binary relational operators +# unary increment, decrement operators +is_xlen=$(grep $ROOT_PROJECT -rinHI -E --include="*.sv" --exclude="build_config_pkg.sv" \ + -e "(\+|\-)[0-9a-zA-Z]*CVA6Cfg\.is_xlen(32|64)" \ + -e "CVA6Cfg\.is_xlen(32|64) *(\+|\-|\*|\/|\*\*|%)" \ + -e "CVA6Cfg\.is_xlen(32|64) *(>>|<<|>>>|<<<)" \ + -e "CVA6Cfg\.is_xlen(32|64) *(<|<=|>|>=)" \ + -e "(\+\+|\-\-)[0-9a-zA-Z]*CVA6Cfg\.is_xlen(32|64)" | sort -u) + +# Check if grep commands return something +if [ -z "$xlen" ] && [ -z "$is_xlen" ]; then + exit 0 +else + echo "There are misuses of CVA6Cfg XLEN attribute." + echo "XLEN misuses in arethmetical operations:" + echo "$xlen" + echo "" + echo "IS_XLEN misuses in logical operations:" + echo "$is_xlen" + exit 1 +fi diff --git a/util/toolchain-builder/README.md b/util/toolchain-builder/README.md index f6b56e5dcb5..9dff777d6bd 100644 --- a/util/toolchain-builder/README.md +++ b/util/toolchain-builder/README.md @@ -53,6 +53,13 @@ upstream toolchain (default: GCC 13.1.0) for bare-metal 32-bit and 64-bit applic # 3. Build and install the toolchain (requires write+create permissions for $INSTALL_DIR.) bash build-toolchain.sh $INSTALL_DIR +Additionally, after getting the GCC toolchain, you can apply +`gcc-cva6-tune.patch` to add support for the `-mtune=cva6` option in GCC. + +```bash +cd util/toolchain-builder/src/gcc && git apply ../../gcc-cva6-tune.patch +``` + ## File and directory structure The base infrastructure for building compilation toolchains consists of two scripts diff --git a/util/toolchain-builder/config/global.sh b/util/toolchain-builder/config/global.sh index dab7b0cba30..c5af7f6a6b1 100755 --- a/util/toolchain-builder/config/global.sh +++ b/util/toolchain-builder/config/global.sh @@ -60,11 +60,7 @@ BINUTILS_CONFIGURE_OPTS() { --target=$1 --prefix=${INSTALL_DIR} --disable-werror - --disable-gdb --disable-nls - --disable-sim - --disable-libdecnumber - --disable-readline ) echo "${OPTS[@]}" } diff --git a/util/toolchain-builder/gcc-cva6-tune.patch b/util/toolchain-builder/gcc-cva6-tune.patch new file mode 100644 index 00000000000..35f6988bb4d --- /dev/null +++ b/util/toolchain-builder/gcc-cva6-tune.patch @@ -0,0 +1,178 @@ +diff --git a/gcc/config/riscv/cva6.md b/gcc/config/riscv/cva6.md +new file mode 100644 +index 000000000..2dc397ee1 +--- /dev/null ++++ b/gcc/config/riscv/cva6.md +@@ -0,0 +1,98 @@ ++(define_automaton "cva6") ++ ++;; CVA6 core ++;; This has 4 functional unit groups: ++;; - ALU + Branch unit + Mult/Div + CSR ++;; - Load unit ++;; - Store Unit ++;; - FPU + ALU2 (for the superscalar configuration) ++ ++;; Issue ports ++(define_cpu_unit "cva6_issue0" "cva6") ++(define_cpu_unit "cva6_issue1" "cva6") ;; if superscalar ++ ++;; Fixed-latency (or so-called) functional units ++(define_cpu_unit "cva6_alu0" "cva6") ;; Includes the result bus ++(define_cpu_unit "cva6_branch" "cva6") ++(define_cpu_unit "cva6_mul" "cva6") ++(define_cpu_unit "cva6_div" "cva6") ++;; FIXME add CSR unit? (define_cpu_unit "cva6_csr" "cva6") ++ ++;; Accelerator/CV-X-IF functional unit ++(define_cpu_unit "cva6_cvxif" "cva6") ++ ++;; Load-Store Unit ++(define_cpu_unit "cva6_load" "cva6") ++(define_cpu_unit "cva6_store" "cva6") ++ ++;; FPU and ALU2 units ++(define_cpu_unit "cva6_fpu" "cva6") ++(define_cpu_unit "cva6_alu2" "cva6") ;; if superscalar ++ ++;; ISSUE can be either ISSUE0 or ISSUE1 ++(define_reservation "cva6_issue" "cva6_issue0|cva6_issue1") ++ ++;; ALU can be either ALU0 or ALU2, and ALU2 is preferred (if available) ++(define_reservation "cva6_alu" "cva6_alu2|cva6_alu0") ++ ++;; Most (integer) instructions are dispatched to the ALUs ++;; (All instructions need an issue port first) ++(define_insn_reservation "cva6_int" 1 ++ (and (eq_attr "tune" "cva6") ++ (eq_attr "type" "const,arith,logical,shift,slt,move,fmove,auipc,nop,bitmanip,rotate,condmove")) ++ "cva6_issue, cva6_alu") ++;; ALU-ALU forwarding is possible between integer instructions ++;;(define_bypass 0 "cva6_int" "cva6_int") ++;; Actually disabled as it decreases performance for now ++ ++;; Branches/jumps/calls use the branch unit and the first ALU ++(define_insn_reservation "cva6_branch" 1 ++ (and (eq_attr "tune" "cva6") ++ (eq_attr "type" "branch,jump,call")) ++ "cva6_issue, cva6_branch+cva6_alu0") ++;; When a branch is used, then the store unit is locked ++(absence_set "cva6_store" "cva6_branch") ++ ++;; Multiplications use the multiplier, then the result bus of the ALU ++(define_insn_reservation "cva6_mul" 2 ;; 2 cycles before the result is available ++ (and (eq_attr "tune" "cva6") ++ (eq_attr "type" "imul")) ++ "cva6_issue, cva6_mul, cva6_alu0") ++ ++;; Divisions make the divider busy for a long time ++(define_insn_reservation "cva6_div" 42 ;; FIXME use a realistic duration instead of 42 ++ (and (eq_attr "tune" "cva6") ++ (eq_attr "type" "idiv")) ++ "cva6_issue, cva6_div*42") ;; FIXME use a realistic duration instead of 42 ++;; FIXME the duration of the division can be XLEN-dependent ++;; Using the divider prevents from using alu0 and mul (and vice versa) ++(exclusion_set "cva6_div" "cva6_alu0,cva6_mul") ++ ++;; Unknown/custom and accelerator transfer instructions use CV-X-IF ++(define_insn_reservation "cva6_cvxif" 1 ;; FIXME update duration ++ (and (eq_attr "tune" "cva6") ++ (eq_attr "type" "mfc,mtc,unknown,multi")) ++ "cva6_issue, cva6_cvxif") ++ ++;; Load instructions, (int or float) use the load unit ++(define_insn_reservation "cva6_load" 2 ;; latency = 2 cycles... ++ (and (eq_attr "tune" "cva6") ++ (eq_attr "type" "load,fpload")) ++ "cva6_issue, cva6_load") ;; ... pipelined: unit busy for 1 cycle only ++ ++;; Store instructions, (int or float) use the store unit ++(define_insn_reservation "cva6_store" 2 ;; latency = 2 cycles... ++ (and (eq_attr "tune" "cva6") ++ (eq_attr "type" "store,fpstore")) ++ "cva6_issue, cva6_store") ;; ... pipelined: unit busy for 1 cycle only ++;; Cannot use load and store units simultaneously ++(exclusion_set "cva6_load" "cva6_store") ++ ++;; Floating point processing use the FPU for a long time ++(define_insn_reservation "cva6_fp" 42 ;; FIXME use a realistic value instead of 42 ++ (and (eq_attr "tune" "cva6") ++ (eq_attr "type" "fadd,fmul,fmadd,fdiv,fcmp,fcvt,fsqrt")) ++ "cva6_fpu*42") ;; FIXME use a realistic value instead of 42 ++;; FIXME the duration of the FP ops can be XLEN-dependent ++;; Using the FPU prevents from using alu2 (and vice versa) ++(exclusion_set "cva6_fpu" "cva6_alu2") ;; if superscalar ++ ++;; FIXME define reservation for the following instructions: ++;; sfb_alu atomic +diff --git a/gcc/config/riscv/riscv-cores.def b/gcc/config/riscv/riscv-cores.def +index 7d87ab7ce..b0993fd48 100644 +--- a/gcc/config/riscv/riscv-cores.def ++++ b/gcc/config/riscv/riscv-cores.def +@@ -37,6 +37,7 @@ RISCV_TUNE("rocket", generic, rocket_tune_info) + RISCV_TUNE("sifive-3-series", generic, rocket_tune_info) + RISCV_TUNE("sifive-5-series", generic, rocket_tune_info) + RISCV_TUNE("sifive-7-series", sifive_7, sifive_7_tune_info) ++RISCV_TUNE("cva6", cva6, cva6_tune_info) + RISCV_TUNE("thead-c906", generic, thead_c906_tune_info) + RISCV_TUNE("size", generic, optimize_size_tune_info) + +diff --git a/gcc/config/riscv/riscv-opts.h b/gcc/config/riscv/riscv-opts.h +index cf0cd669b..ff2a5ce33 100644 +--- a/gcc/config/riscv/riscv-opts.h ++++ b/gcc/config/riscv/riscv-opts.h +@@ -52,7 +52,8 @@ extern enum riscv_isa_spec_class riscv_isa_spec; + /* Keep this list in sync with define_attr "tune" in riscv.md. */ + enum riscv_microarchitecture_type { + generic, +- sifive_7 ++ sifive_7, ++ cva6 + }; + extern enum riscv_microarchitecture_type riscv_microarchitecture; + +diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc +index e88fa2d63..46a61b6b8 100644 +--- a/gcc/config/riscv/riscv.cc ++++ b/gcc/config/riscv/riscv.cc +@@ -339,6 +339,20 @@ static const struct riscv_tune_param sifive_7_tune_info = { + true, /* slow_unaligned_access */ + }; + ++/* Costs to use when optimizing for CVA6. */ ++static const struct riscv_tune_param cva6_tune_info = { ++ {COSTS_N_INSNS (4), COSTS_N_INSNS (5)}, /* fp_add */ ++ {COSTS_N_INSNS (4), COSTS_N_INSNS (5)}, /* fp_mul */ ++ {COSTS_N_INSNS (20), COSTS_N_INSNS (20)}, /* fp_div */ ++ {COSTS_N_INSNS (4), COSTS_N_INSNS (4)}, /* int_mul */ ++ {COSTS_N_INSNS (6), COSTS_N_INSNS (6)}, /* int_div */ ++ 2, /* issue_rate */ ++ 6, /* branch_cost */ ++ 2, /* memory_cost */ ++ 8, /* fmv_cost */ ++ false, /* slow_unaligned_access */ ++}; ++ + /* Costs to use when optimizing for T-HEAD c906. */ + static const struct riscv_tune_param thead_c906_tune_info = { + {COSTS_N_INSNS (4), COSTS_N_INSNS (5)}, /* fp_add */ +diff --git a/gcc/config/riscv/riscv.md b/gcc/config/riscv/riscv.md +index bc384d9ae..f4dacff34 100644 +--- a/gcc/config/riscv/riscv.md ++++ b/gcc/config/riscv/riscv.md +@@ -437,7 +437,7 @@ + ;; Microarchitectures we know how to tune for. + ;; Keep this in sync with enum riscv_microarchitecture. + (define_attr "tune" +- "generic,sifive_7" ++ "generic,sifive_7,cva6" + (const (symbol_ref "((enum attr_tune) riscv_microarchitecture)"))) + + ;; Describe a user's asm statement. +@@ -3145,5 +3145,6 @@ + (include "pic.md") + (include "generic.md") + (include "sifive-7.md") ++(include "cva6.md") + (include "thead.md") + (include "vector.md") diff --git a/util/user_config.py b/util/user_config.py index 3612dcbd5f3..7e7bab4c063 100644 --- a/util/user_config.py +++ b/util/user_config.py @@ -135,7 +135,7 @@ def build_param(line, value): return param_re.sub(r"\g<1>\g<2>\g<3>" + value + r"\g<5>", line) -cfg_re = re.compile(r"^(\s*)(?P\w+)(\s*:\s*)(?P.*?)(,?\s*)$") +cfg_re = re.compile(r"^(\s*)(?P\w+)(\s*:\s*)(?P.*?)(,?\s*)(//.*)?$") def parse_cfg(line): diff --git a/util/write-zephyr-sd.sh b/util/write-zephyr-sd.sh new file mode 100755 index 00000000000..78dabefc12f --- /dev/null +++ b/util/write-zephyr-sd.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +set -e + +ZEPHYR_BINARY=build/zephyr/zephyr.bin + +usage(){ + echo "Usage: $1 "; + exit 1; +} + +if [ -z $1 ]; then + usage $0 +fi + +if [ -z $2 ]; then + usage $0 +fi + +ZEPHYR_BINARY="$2/${ZEPHYR_BINARY}"; + +SDDEVICE=$1 + +# account for partition table etc. +ZEPHYR_SECTORSTART=2048 +ZEPHYR_BIN_SECTORS=$(ls -l --block-size=512 $ZEPHYR_BINARY | cut -d " " -f5) +ZEPHYR_BIN_SECTORS=$((ZEPHYR_SECTORSTART + ZEPHYR_BIN_SECTORS)) +PART_TWO_START=$((ZEPHYR_BIN_SECTORS + 512)) + +echo "Creating a partition with zephyr from $ZEPHYR_SECTORSTART to $ZEPHYR_BIN_SECTORS and an empty FAT32 partition from $ZEPHYR_BIN_SECTORS to the device end!" +sgdisk --clear -g --new=1:$ZEPHYR_SECTORSTART:$ZEPHYR_BIN_SECTORS --new=2:$PART_TWO_START:0 --typecode=1:3000 --typecode=2:0700 $SDDEVICE + +SDDEVICE_PART1=$(lsblk $SDDEVICE -no PATH | head -2 | tail -1) +SDDEVICE_PART2=$(lsblk $SDDEVICE -no PATH | head -3 | tail -1) + +echo "Copying zephyr image" +dd if=$ZEPHYR_BINARY of=$SDDEVICE_PART1 status=progress oflag=sync bs=1M + +echo "Creating FAT filesystem on second partition!" +mkfs.vfat -F 32 $SDDEVICE_PART2 diff --git a/vendor/pulp-platform/axi_riscv_atomics/CHANGELOG.md b/vendor/pulp-platform/axi_riscv_atomics/CHANGELOG.md new file mode 100644 index 00000000000..f0bdab76028 --- /dev/null +++ b/vendor/pulp-platform/axi_riscv_atomics/CHANGELOG.md @@ -0,0 +1,49 @@ +# Change Log + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/), and this project adheres to +[Semantic Versioning](http://semver.org). + +## Unreleased + +## v0.2.2 - 2019-02-28 + +### Changed +- Update `axi` dependency to v0.6.0 (from an intermediary commit). + +## v0.2.1 - 2019-02-25 + +### Fixed +- `axi_riscv_amos`: Fixed timing of R response (#10). + +## v0.2.0 - 2019-02-21 + +### Changed +- Made SystemVerilog interfaces optional. Top-level modules now expose a flattened port list, and + an optional wrapper provides SystemVerilog interfaces. This improves compatibility with tools + that have poor support for SystemVerilog interfaces. + +## Fixed +- `axi_riscv_amos`: Fixed burst, cache, lock, prot, qos, region, size, and user of ARs. + +## v0.1.1 - 2019-02-20 + +### Fixed +- `axi_res_tbl`: Fixed assignments in `always_ff` process. +- `axi_riscv_amos`: Removed unused register. +- `axi_riscv_amos`: Added missing default assignments in AW FSM. +- `axi_riscv_amos`: Fixed sign extension of 32bit AMOs on 64bit ALU. +- `axi_riscv_amos`: Removed unused signals. +- `axi_riscv_atomics_wrap`: Fixed syntax of interface signal assignments. +- `axi_riscv_lrsc`: Added missing feedthrough of `aw_atop`. +- `axi_riscv_lrsc`: Fixed assignments in `always_ff` process. +- `axi_riscv_lrsc_wrap`: Fixed syntax of interface signal assignments. + +### Added +- Added simple standalone synthesis bench for `axi_riscv_atomics`. +- Added simple standalone synthesis bench for `axi_riscv_lrsc`. + +## v0.1.0 - 2019-02-19 + +Initial public development release diff --git a/vendor/pulp-platform/axi_riscv_atomics/LICENSE b/vendor/pulp-platform/axi_riscv_atomics/LICENSE new file mode 100644 index 00000000000..3a2b87e2d69 --- /dev/null +++ b/vendor/pulp-platform/axi_riscv_atomics/LICENSE @@ -0,0 +1,176 @@ +SOLDERPAD HARDWARE LICENSE version 0.51 + +This license is based closely on the Apache License Version 2.0, but is not +approved or endorsed by the Apache Foundation. A copy of the non-modified +Apache License 2.0 can be found at http://www.apache.org/licenses/LICENSE-2.0. + +As this license is not currently OSI or FSF approved, the Licensor permits any +Work licensed under this License, at the option of the Licensee, to be treated +as licensed under the Apache License Version 2.0 (which is so approved). + +This License is licensed under the terms of this License and in particular +clause 7 below (Disclaimer of Warranties) applies in relation to its use. + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +“License” shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +“Licensor” shall mean the Rights owner or entity authorized by the Rights owner +that is granting the License. + +“Legal Entity” shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, “control” means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +“You” (or “Your”) shall mean an individual or Legal Entity exercising +permissions granted by this License. + +“Rights” means copyright and any similar right including design right (whether +registered or unregistered), semiconductor topography (mask) rights and +database rights (but excluding Patents and Trademarks). + +“Source” form shall mean the preferred form for making modifications, including +but not limited to source code, net lists, board layouts, CAD files, +documentation source, and configuration files. + +“Object” form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object +code, generated documentation, the instantiation of a hardware design and +conversions to other media types, including intermediate forms such as +bytecodes, FPGA bitstreams, artwork and semiconductor topographies (mask +works). + +“Work” shall mean the work of authorship, whether in Source form or other +Object form, made available under the License, as indicated by a Rights notice +that is included in or attached to the work (an example is provided in the +Appendix below). + +“Derivative Works” shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) or physically connect to or interoperate with the interfaces of, the Work +and Derivative Works thereof. + +“Contribution” shall mean any design or work of authorship, including the +original version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor for +inclusion in the Work by the Rights owner or by an individual or Legal Entity +authorized to submit on behalf of the Rights owner. For the purposes of this +definition, “submitted” means any form of electronic, verbal, or written +communication sent to the Licensor or its representatives, including but not +limited to communication on electronic mailing lists, source code control +systems, and issue tracking systems that are managed by, or on behalf of, the +Licensor for the purpose of discussing and improving the Work, but excluding +communication that is conspicuously marked or otherwise designated in writing +by the Rights owner as “Not a Contribution.” + +“Contributor” shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of License. Subject to the terms and conditions of this License, each +Contributor hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable license under the Rights to reproduce, +prepare Derivative Works of, publicly display, publicly perform, sublicense, +and distribute the Work and such Derivative Works in Source or Object form and +do anything in relation to the Work as if the Rights did not exist. + +3. Grant of Patent License. Subject to the terms and conditions of this +License, each Contributor hereby grants to You a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this +section) patent license to make, have made, use, offer to sell, sell, import, +and otherwise transfer the Work, where such license applies only to those +patent claims licensable by such Contributor that are necessarily infringed by +their Contribution(s) alone or by combination of their Contribution(s) with the +Work to which such Contribution(s) was submitted. If You institute patent +litigation against any entity (including a cross-claim or counterclaim in a +lawsuit) alleging that the Work or a Contribution incorporated within the Work +constitutes direct or contributory patent infringement, then any patent +licenses granted to You under this License for that Work shall terminate as of +the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or +Derivative Works thereof in any medium, with or without modifications, and in +Source or Object form, provided that You meet the following conditions: + + You must give any other recipients of the Work or Derivative Works a copy + of this License; and + + You must cause any modified files to carry prominent notices stating that + You changed the files; and + + You must retain, in the Source form of any Derivative Works that You + distribute, all copyright, patent, trademark, and attribution notices from + the Source form of the Work, excluding those notices that do not pertain to + any part of the Derivative Works; and + + If the Work includes a “NOTICE” text file as part of its distribution, then + any Derivative Works that You distribute must include a readable copy of + the attribution notices contained within such NOTICE file, excluding those + notices that do not pertain to any part of the Derivative Works, in at + least one of the following places: within a NOTICE text file distributed as + part of the Derivative Works; within the Source form or documentation, if + provided along with the Derivative Works; or, within a display generated by + the Derivative Works, if and wherever such third-party notices normally + appear. The contents of the NOTICE file are for informational purposes only + and do not modify the License. You may add Your own attribution notices + within Derivative Works that You distribute, alongside or as an addendum to + the NOTICE text from the Work, provided that such additional attribution + notices cannot be construed as modifying the License. You may add Your own + copyright statement to Your modifications and may provide additional or + different license terms and conditions for use, reproduction, or + distribution of Your modifications, or for any such Derivative Works as a + whole, provided Your use, reproduction, and distribution of the Work + otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any +Contribution intentionally submitted for inclusion in the Work by You to the +Licensor shall be under the terms and conditions of this License, without any +additional terms or conditions. Notwithstanding the above, nothing herein shall +supersede or modify the terms of any separate license agreement you may have +executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, +trademarks, service marks, or product names of the Licensor, except as required +for reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in +writing, Licensor provides the Work (and each Contributor provides its +Contributions) on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied, including, without limitation, any warranties +or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. You are solely responsible for determining the +appropriateness of using or redistributing the Work and assume any risks +associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in +tort (including negligence), contract, or otherwise, unless required by +applicable law (such as deliberate and grossly negligent acts) or agreed to in +writing, shall any Contributor be liable to You for damages, including any +direct, indirect, special, incidental, or consequential damages of any +character arising as a result of this License or out of the use or inability to +use the Work (including but not limited to damages for loss of goodwill, work +stoppage, computer failure or malfunction, or any and all other commercial +damages or losses), even if such Contributor has been advised of the +possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or +Derivative Works thereof, You may choose to offer, and charge a fee for, +acceptance of support, warranty, indemnity, or other liability obligations +and/or rights consistent with this License. However, in accepting such +obligations, You may act only on Your own behalf and on Your sole +responsibility, not on behalf of any other Contributor, and only if You agree +to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS diff --git a/vendor/pulp-platform/axi_riscv_atomics/README.md b/vendor/pulp-platform/axi_riscv_atomics/README.md new file mode 100644 index 00000000000..c27dd2033ff --- /dev/null +++ b/vendor/pulp-platform/axi_riscv_atomics/README.md @@ -0,0 +1,29 @@ +# AXI Adapter(s) for RISC-V Atomic Operations + +**Disclaimer**: This repository is under active development and not yet stabilized. Use only if you +know what you are doing and are prepared to adapt to wide-reaching changes as the project evolves. +Limited support is available for the latest v0.x version, but only for the latest, and we give no +backwards compatibility guarantees for versions before v1.0. + +The modules in this repository implement atomic operations (AMOs) for RISC-V processors ("A" +extension version 2.0) on the AXI protocol. The modules adheres to the RISC-V Weak Memory Ordering +(RVWMO) memory consistency model (version 0.1). + +## Usage + +Place one of the following modules in your memory hierarchy between an AXI master and slave, where +the slave owns a particular memory location (e.g., exclusive access to a memory controller or +adherence to a cache coherency protocol). Choose depending on your needs: + +- `axi_riscv_lrsc` tracks memory reservations for LR/SC, forwards only successful SCs, and responds + accordingly. This is sufficient to support LR/SC if the processor encodes them as AXI exclusive + memory accesses. Downstream modules do not have to support AXI exclusive memory accesses. + +- `axi_riscv_atomics` implements all RISC-V AMOs in addition to LR/SC. The processor needs to + encode RISC-V AMOs as AXI atomic transactions (`AtomicSwap` for `AMOSWAP`, `AtomicLoad` with the + corresponding opcode for all other AMOs). This is sufficient to support the entire RISC-V "A" + extension. Downstream modules do not have to support AXI atomic transactions or exclusive + memory accesses. + +For each of those modules we additionally provide a wrapper (`_wrap` filename suffix) that exposes +SystemVerilog interfaces instead of `logic` ports. diff --git a/vendor/pulp-platform/axi_riscv_atomics/src/axi_res_tbl.sv b/vendor/pulp-platform/axi_riscv_atomics/src/axi_res_tbl.sv new file mode 100644 index 00000000000..b3c56153347 --- /dev/null +++ b/vendor/pulp-platform/axi_riscv_atomics/src/axi_res_tbl.sv @@ -0,0 +1,93 @@ +// Copyright (c) 2018 ETH Zurich, University of Bologna +// +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. + +// AXI Reservation Table +module axi_res_tbl #( + parameter int unsigned AXI_ADDR_WIDTH = 0, + parameter int unsigned AXI_ID_WIDTH = 0 +) ( + input logic clk_i, + input logic rst_ni, + input logic [AXI_ADDR_WIDTH-1:0] clr_addr_i, + input logic clr_req_i, + output logic clr_gnt_o, + input logic [AXI_ADDR_WIDTH-1:0] set_addr_i, + input logic [AXI_ID_WIDTH-1:0] set_id_i, + input logic set_req_i, + output logic set_gnt_o, + input logic [AXI_ADDR_WIDTH-1:0] check_addr_i, + input logic [AXI_ID_WIDTH-1:0] check_id_i, + output logic check_res_o, + input logic check_req_i, + output logic check_gnt_o +); + + localparam integer N_IDS = 2**AXI_ID_WIDTH; + + // Declarations of Signals and Types + logic [N_IDS-1:0][AXI_ADDR_WIDTH-1:0] tbl_d, tbl_q; + logic clr, + set; + + generate for (genvar i = 0; i < N_IDS; ++i) begin: gen_tbl + always_comb begin + tbl_d[i] = tbl_q[i]; + if (set && i == set_id_i) begin + tbl_d[i] = set_addr_i; + end else if (clr && tbl_q[i] == clr_addr_i) begin + tbl_d[i] = '0; + end + end + end endgenerate + + // Table-Managing Logic + always_comb begin + clr = 1'b0; + set = 1'b0; + clr_gnt_o = 1'b0; + set_gnt_o = 1'b0; + check_res_o = 1'b0; + check_gnt_o = 1'b0; + + if (clr_req_i) begin + clr = 1'b1; + clr_gnt_o = 1'b1; + end else if (set_req_i) begin + set = 1'b1; + set_gnt_o = 1'b1; + end else if (check_req_i) begin + check_res_o = (tbl_q[check_id_i] == check_addr_i); + check_gnt_o = 1'b1; + end + end + + // Registers + always_ff @(posedge clk_i, negedge rst_ni) begin + if (~rst_ni) begin + tbl_q <= '0; + end else begin + tbl_q <= tbl_d; + end + end + + // Validate parameters. +// pragma translate_off +`ifndef VERILATOR + initial begin: validate_params + assert (AXI_ADDR_WIDTH > 0) + else $fatal(1, "AXI_ADDR_WIDTH must be greater than 0!"); + assert (AXI_ID_WIDTH > 0) + else $fatal(1, "AXI_ID_WIDTH must be greater than 0!"); + end +`endif +// pragma translate_on + +endmodule diff --git a/vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_amos.sv b/vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_amos.sv new file mode 100644 index 00000000000..dae2974a877 --- /dev/null +++ b/vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_amos.sv @@ -0,0 +1,1006 @@ +// Copyright (c) 2018 ETH Zurich, University of Bologna +// +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. + +// AXI RISC-V Atomic Operations (AMOs) Adapter +// +// This adapter implements atomic memory operations in accordance with the RVWMO memory consistency +// model. +// +// Interface notes: +// - This module has combinational paths between AXI inputs and outputs for minimum latency. Add +// slices upstream or downstream or in both directions if combinatorial paths become too long. +// The module adheres to the AXI ready/valid dependency specification to prevent combinatorial +// loops. + +module axi_riscv_amos #( + // AXI Parameters + parameter int unsigned AXI_ADDR_WIDTH = 0, + parameter int unsigned AXI_DATA_WIDTH = 0, + parameter int unsigned AXI_ID_WIDTH = 0, + parameter int unsigned AXI_USER_WIDTH = 0, + // Maximum number of AXI write transactions outstanding at the same time + parameter int unsigned AXI_MAX_WRITE_TXNS = 0, + // Word width of the widest RISC-V processor that can issue requests to this module. + // 32 for RV32; 64 for RV64, where both 32-bit (.W suffix) and 64-bit (.D suffix) AMOs are + // supported if `aw_strb` is set correctly. + parameter int unsigned RISCV_WORD_WIDTH = 0, + /// Derived Parameters (do NOT change manually!) + localparam int unsigned AXI_STRB_WIDTH = AXI_DATA_WIDTH / 8 +) ( + input logic clk_i, + input logic rst_ni, + + /// Slave Interface + input logic [AXI_ADDR_WIDTH-1:0] slv_aw_addr_i, + input logic [2:0] slv_aw_prot_i, + input logic [3:0] slv_aw_region_i, + input logic [5:0] slv_aw_atop_i, + input logic [7:0] slv_aw_len_i, + input logic [2:0] slv_aw_size_i, + input logic [1:0] slv_aw_burst_i, + input logic slv_aw_lock_i, + input logic [3:0] slv_aw_cache_i, + input logic [3:0] slv_aw_qos_i, + input logic [AXI_ID_WIDTH-1:0] slv_aw_id_i, + input logic [AXI_USER_WIDTH-1:0] slv_aw_user_i, + output logic slv_aw_ready_o, + input logic slv_aw_valid_i, + + input logic [AXI_ADDR_WIDTH-1:0] slv_ar_addr_i, + input logic [2:0] slv_ar_prot_i, + input logic [3:0] slv_ar_region_i, + input logic [7:0] slv_ar_len_i, + input logic [2:0] slv_ar_size_i, + input logic [1:0] slv_ar_burst_i, + input logic slv_ar_lock_i, + input logic [3:0] slv_ar_cache_i, + input logic [3:0] slv_ar_qos_i, + input logic [AXI_ID_WIDTH-1:0] slv_ar_id_i, + input logic [AXI_USER_WIDTH-1:0] slv_ar_user_i, + output logic slv_ar_ready_o, + input logic slv_ar_valid_i, + + input logic [AXI_DATA_WIDTH-1:0] slv_w_data_i, + input logic [AXI_STRB_WIDTH-1:0] slv_w_strb_i, + input logic [AXI_USER_WIDTH-1:0] slv_w_user_i, + input logic slv_w_last_i, + output logic slv_w_ready_o, + input logic slv_w_valid_i, + + output logic [AXI_DATA_WIDTH-1:0] slv_r_data_o, + output logic [1:0] slv_r_resp_o, + output logic slv_r_last_o, + output logic [AXI_ID_WIDTH-1:0] slv_r_id_o, + output logic [AXI_USER_WIDTH-1:0] slv_r_user_o, + input logic slv_r_ready_i, + output logic slv_r_valid_o, + + output logic [1:0] slv_b_resp_o, + output logic [AXI_ID_WIDTH-1:0] slv_b_id_o, + output logic [AXI_USER_WIDTH-1:0] slv_b_user_o, + input logic slv_b_ready_i, + output logic slv_b_valid_o, + + /// Master Interface + output logic [AXI_ADDR_WIDTH-1:0] mst_aw_addr_o, + output logic [2:0] mst_aw_prot_o, + output logic [3:0] mst_aw_region_o, + output logic [5:0] mst_aw_atop_o, + output logic [7:0] mst_aw_len_o, + output logic [2:0] mst_aw_size_o, + output logic [1:0] mst_aw_burst_o, + output logic mst_aw_lock_o, + output logic [3:0] mst_aw_cache_o, + output logic [3:0] mst_aw_qos_o, + output logic [AXI_ID_WIDTH-1:0] mst_aw_id_o, + output logic [AXI_USER_WIDTH-1:0] mst_aw_user_o, + input logic mst_aw_ready_i, + output logic mst_aw_valid_o, + + output logic [AXI_ADDR_WIDTH-1:0] mst_ar_addr_o, + output logic [2:0] mst_ar_prot_o, + output logic [3:0] mst_ar_region_o, + output logic [7:0] mst_ar_len_o, + output logic [2:0] mst_ar_size_o, + output logic [1:0] mst_ar_burst_o, + output logic mst_ar_lock_o, + output logic [3:0] mst_ar_cache_o, + output logic [3:0] mst_ar_qos_o, + output logic [AXI_ID_WIDTH-1:0] mst_ar_id_o, + output logic [AXI_USER_WIDTH-1:0] mst_ar_user_o, + input logic mst_ar_ready_i, + output logic mst_ar_valid_o, + + output logic [AXI_DATA_WIDTH-1:0] mst_w_data_o, + output logic [AXI_STRB_WIDTH-1:0] mst_w_strb_o, + output logic [AXI_USER_WIDTH-1:0] mst_w_user_o, + output logic mst_w_last_o, + input logic mst_w_ready_i, + output logic mst_w_valid_o, + + input logic [AXI_DATA_WIDTH-1:0] mst_r_data_i, + input logic [1:0] mst_r_resp_i, + input logic mst_r_last_i, + input logic [AXI_ID_WIDTH-1:0] mst_r_id_i, + input logic [AXI_USER_WIDTH-1:0] mst_r_user_i, + output logic mst_r_ready_o, + input logic mst_r_valid_i, + + input logic [1:0] mst_b_resp_i, + input logic [AXI_ID_WIDTH-1:0] mst_b_id_i, + input logic [AXI_USER_WIDTH-1:0] mst_b_user_i, + output logic mst_b_ready_o, + input logic mst_b_valid_i +); + + localparam int unsigned OUTSTND_BURSTS_WIDTH = $clog2(AXI_MAX_WRITE_TXNS+1); + localparam int unsigned AXI_ALU_RATIO = AXI_DATA_WIDTH/RISCV_WORD_WIDTH; + + // State types + typedef enum logic [1:0] { FEEDTHROUGH_AW, WAIT_RESULT_AW, SEND_AW } aw_state_t; + aw_state_t aw_state_d, aw_state_q; + + typedef enum logic [2:0] { FEEDTHROUGH_W, WAIT_DATA_W, WAIT_RESULT_W, WAIT_CHANNEL_W, SEND_W } w_state_t; + w_state_t w_state_d, w_state_q; + + typedef enum logic [1:0] { FEEDTHROUGH_B, WAIT_COMPLETE_B, WAIT_CHANNEL_B, SEND_B } b_state_t; + b_state_t b_state_d, b_state_q; + + typedef enum logic [1:0] { FEEDTHROUGH_AR, WAIT_CHANNEL_AR, SEND_AR } ar_state_t; + ar_state_t ar_state_d, ar_state_q; + + typedef enum logic [1:0] { FEEDTHROUGH_R, WAIT_DATA_R, WAIT_CHANNEL_R, SEND_R } r_state_t; + r_state_t r_state_d, r_state_q; + + typedef enum logic [1:0] { NONE, INVALID, LOAD, STORE } atop_req_t; + atop_req_t atop_valid_d, atop_valid_q; + + // Signal declarations + // Transaction FF + logic [AXI_ADDR_WIDTH-1:0] addr_d, addr_q; + logic [AXI_ID_WIDTH-1:0] id_d, id_q; + logic [AXI_STRB_WIDTH-1:0] strb_d, strb_q; + logic [2:0] size_d, size_q; + logic [5:0] atop_d, atop_q; + logic [3:0] cache_d, cache_q; + logic [2:0] prot_d, prot_q; + logic [3:0] qos_d, qos_q; + logic [3:0] region_d, region_q; + logic [1:0] r_resp_d, r_resp_q; + logic [AXI_USER_WIDTH-1:0] aw_user_d, aw_user_q, + w_user_d, w_user_q, + r_user_d, r_user_q; + // Data FF + logic [AXI_DATA_WIDTH-1:0] w_data_d, w_data_q; // AMO operand + logic [AXI_DATA_WIDTH-1:0] r_data_d, r_data_q; // Data from memory + logic [AXI_DATA_WIDTH-1:0] result_d, result_q; // Result of AMO operation + logic w_d_valid_d, w_d_valid_q, // AMO operand valid + r_d_valid_d, r_d_valid_q; // Data from memory valid + // Counters + logic [OUTSTND_BURSTS_WIDTH-1:0] w_cnt_d, w_cnt_q; // Outstanding W beats + logic [OUTSTND_BURSTS_WIDTH-1:0] w_cnt_req_d, w_cnt_req_q; // W beats until AMO can read W + logic [OUTSTND_BURSTS_WIDTH-1:0] w_cnt_inj_d, w_cnt_inj_q; // W beats until AMO can insert its W + // States + logic adapter_ready; + logic transaction_collision; + logic aw_valid, aw_ready, aw_free, + w_valid, w_ready, w_free, + b_valid, b_ready, b_free, + ar_valid, ar_ready, ar_free, + r_valid, r_ready, r_free; + logic big_endian; + // ALU Signals + logic [RISCV_WORD_WIDTH-1:0] alu_operand_a; + logic [RISCV_WORD_WIDTH-1:0] alu_operand_b; + logic [RISCV_WORD_WIDTH-1:0] alu_result; + logic [AXI_DATA_WIDTH-1:0] alu_result_ext; + logic [AXI_ALU_RATIO-1:0][RISCV_WORD_WIDTH-1:0] op_a; + logic [AXI_ALU_RATIO-1:0][RISCV_WORD_WIDTH-1:0] op_b; + logic [AXI_ALU_RATIO-1:0][RISCV_WORD_WIDTH-1:0] op_a_sign_ext; + logic [AXI_ALU_RATIO-1:0][RISCV_WORD_WIDTH-1:0] op_b_sign_ext; + logic [AXI_ALU_RATIO-1:0][RISCV_WORD_WIDTH-1:0] res; + logic [AXI_STRB_WIDTH-1:0][7:0] strb_ext; + logic sign_a; + logic sign_b; + + /** + * Calculate ready signals and channel states + */ + + // Check if all state machines are ready for the next atomic request + assign adapter_ready = (aw_state_q == FEEDTHROUGH_AW) && + ( w_state_q == FEEDTHROUGH_W ) && + ( b_state_q == FEEDTHROUGH_B ) && + (ar_state_q == FEEDTHROUGH_AR) && + ( r_state_q == FEEDTHROUGH_R ); + + // Calculate if the channels are free + assign aw_free = ~aw_valid | aw_ready; + assign w_free = ~ w_valid | w_ready; + assign b_free = ~ b_valid | b_ready; + assign ar_free = ~ar_valid | ar_ready; + assign r_free = ~ r_valid | r_ready; + + always_ff @(posedge clk_i or negedge rst_ni) begin + if(~rst_ni) begin + aw_valid <= 0; + aw_ready <= 0; + w_valid <= 0; + w_ready <= 0; + b_valid <= 0; + b_ready <= 0; + ar_valid <= 0; + ar_ready <= 0; + r_valid <= 0; + r_ready <= 0; + end else begin + aw_valid <= mst_aw_valid_o; + aw_ready <= mst_aw_ready_i; + w_valid <= mst_w_valid_o; + w_ready <= mst_w_ready_i; + b_valid <= slv_b_valid_o; + b_ready <= slv_b_ready_i; + ar_valid <= mst_ar_valid_o; + ar_ready <= mst_ar_ready_i; + r_valid <= slv_r_valid_o; + r_ready <= slv_r_ready_i; + end + end + + // Calculate if the request interferes with the ongoing atomic transaction + // The protected bytes go from addr_q up to addr_q + (1 << size_q) - 1 + // TODO Bursts need special treatment + assign transaction_collision = (slv_aw_addr_i < ( addr_q + (8'h01 << size_q))) & + ( addr_q < (slv_aw_addr_i + (8'h01 << slv_aw_size_i))); + + always_comb begin : calc_atop_valid + atop_valid_d = atop_valid_q; + if (adapter_ready) begin + atop_valid_d = NONE; + if (slv_aw_valid_i && slv_aw_atop_i) begin + // Default is invalid request + atop_valid_d = INVALID; + // Valid load operation + if ((slv_aw_atop_i == axi_pkg::ATOP_ATOMICSWAP) || + (slv_aw_atop_i[5:4] == {axi_pkg::ATOP_ATOMICLOAD})) begin + atop_valid_d = LOAD; + end + // Valid store operation + if (slv_aw_atop_i[5:4] == {axi_pkg::ATOP_ATOMICSTORE}) begin + atop_valid_d = STORE; + end + // Invalidate valid request if control signals do not match + // Burst or exclusive access + if (slv_aw_len_i | slv_aw_lock_i) begin + atop_valid_d = INVALID; + end + // Unsupported size + if (slv_aw_size_i > $clog2(RISCV_WORD_WIDTH/8)) begin + atop_valid_d = INVALID; + end + end + end + end + + always_ff @(posedge clk_i or negedge rst_ni) begin : proc_atop_valid + if(~rst_ni) begin + atop_valid_q <= NONE; + end else begin + atop_valid_q <= atop_valid_d; + end + end + + /** + * Write Channel: AW, W, B + */ + + /*==================================================================== + = AW = + ====================================================================*/ + always_comb begin : axi_aw_channel + // Defaults AXI Bus + mst_aw_id_o = slv_aw_id_i; + mst_aw_addr_o = slv_aw_addr_i; + mst_aw_len_o = slv_aw_len_i; + mst_aw_size_o = slv_aw_size_i; + mst_aw_burst_o = slv_aw_burst_i; + mst_aw_lock_o = slv_aw_lock_i; + mst_aw_cache_o = slv_aw_cache_i; + mst_aw_prot_o = slv_aw_prot_i; + mst_aw_qos_o = slv_aw_qos_i; + mst_aw_region_o = slv_aw_region_i; + mst_aw_atop_o = 6'b0; + mst_aw_user_o = slv_aw_user_i; + // Defaults FF + addr_d = addr_q; + id_d = id_q; + size_d = size_q; + atop_d = atop_q; + cache_d = cache_q; + prot_d = prot_q; + qos_d = qos_q; + region_d = region_q; + aw_user_d = aw_user_q; + w_cnt_inj_d = w_cnt_inj_q; + // State Machine + aw_state_d = aw_state_q; + + // Default control: Block AW channel if... + if (slv_aw_valid_i && slv_aw_atop_i) begin + // Block if atomic request + mst_aw_valid_o = 1'b0; + slv_aw_ready_o = 1'b0; + end else if (w_cnt_q == AXI_MAX_WRITE_TXNS) begin + // Block if counter is overflowing + mst_aw_valid_o = 1'b0; + slv_aw_ready_o = 1'b0; + end else if (slv_aw_valid_i && transaction_collision && !adapter_ready) begin + // Block requests to the same address as current atomic transaction + mst_aw_valid_o = 1'b0; + slv_aw_ready_o = 1'b0; + end else begin + // Forward + mst_aw_valid_o = slv_aw_valid_i; + slv_aw_ready_o = mst_aw_ready_i; + end + + // Count W burst to know when to inject the W data + if (w_cnt_inj_q && mst_w_valid_o && mst_w_ready_i && mst_w_last_o) begin + w_cnt_inj_d = w_cnt_inj_q - 1; + end + + unique case (aw_state_q) + + FEEDTHROUGH_AW: begin + // Feedthrough slave to master until atomic operation is detected + if (slv_aw_valid_i && slv_aw_atop_i && adapter_ready) begin + // Acknowledge atomic transaction + slv_aw_ready_o = 1'b1; + // Remember request + atop_d = slv_aw_atop_i; + addr_d = slv_aw_addr_i; + id_d = slv_aw_id_i; + size_d = slv_aw_size_i; + cache_d = slv_aw_cache_i; + prot_d = slv_aw_prot_i; + qos_d = slv_aw_qos_i; + region_d = slv_aw_region_i; + aw_user_d = slv_aw_user_i; + // If valid AMO --> wait for result + if (atop_valid_d != INVALID) begin + aw_state_d = WAIT_RESULT_AW; + end + end + + end // FEEDTHROUGH_AW + + WAIT_RESULT_AW, SEND_AW: begin + // If the result is ready and the channel is free --> inject AW request + if ((r_d_valid_q && w_d_valid_q && aw_free) || (aw_state_q == SEND_AW)) begin + // Block + slv_aw_ready_o = 1'b0; + // Make write request + mst_aw_valid_o = 1'b1; + mst_aw_addr_o = addr_q; + mst_aw_len_o = 8'h00; + mst_aw_id_o = id_q; + mst_aw_size_o = size_q; + mst_aw_burst_o = 2'b00; + mst_aw_lock_o = 1'b0; + mst_aw_cache_o = cache_q; + mst_aw_prot_o = prot_q; + mst_aw_qos_o = qos_q; + mst_aw_region_o = region_q; + mst_aw_user_o = aw_user_q; + // Check if request is acknowledged + if (mst_aw_ready_i) begin + aw_state_d = FEEDTHROUGH_AW; + end else begin + aw_state_d = SEND_AW; + end + // Remember outstanding W beats before injected request + if (aw_state_q == WAIT_RESULT_AW) begin + if (w_cnt_q && mst_w_valid_o && mst_w_ready_i && mst_w_last_o) begin + w_cnt_inj_d = w_cnt_q - 1; + end else begin + w_cnt_inj_d = w_cnt_q; + end + end + end + end // WAIT_RESULT_AW, SEND_AW + + default: aw_state_d = FEEDTHROUGH_AW; + + endcase + end // axi_aw_channel + + /*==================================================================== + = W = + ====================================================================*/ + always_comb begin : axi_w_channel + // Defaults AXI Bus + mst_w_data_o = slv_w_data_i; + mst_w_strb_o = slv_w_strb_i; + mst_w_last_o = slv_w_last_i; + mst_w_user_o = slv_w_user_i; + // Defaults FF + strb_d = strb_q; + w_user_d = w_user_q; + w_data_d = w_data_q; + result_d = result_q; + w_d_valid_d = w_d_valid_q; + w_cnt_req_d = w_cnt_req_q; + // State Machine + w_state_d = w_state_q; + + // Default control + // Make sure no data is sent without knowing if it's atomic + if (w_cnt_q == 0) begin + // Stall W as it precedes the AW request + slv_w_ready_o = 1'b0; + mst_w_valid_o = 1'b0; + end else begin + mst_w_valid_o = slv_w_valid_i; + slv_w_ready_o = mst_w_ready_i; + end + + unique case (w_state_q) + + FEEDTHROUGH_W: begin + if (adapter_ready) begin + // Reset read flag + w_d_valid_d = 1'b0; + result_d = '0; + + if (atop_valid_d != NONE) begin + // Check if data is also available and does not belong to previous request + if (w_cnt_q == 0) begin + // Block downstream + mst_w_valid_o = 1'b0; + // Fetch data and wait for all data + slv_w_ready_o = 1'b1; + if (slv_w_valid_i) begin + if (atop_valid_d != INVALID) begin + w_data_d = slv_w_data_i; + strb_d = slv_w_strb_i; + w_user_d = slv_w_user_i; + w_d_valid_d = 1'b1; + w_state_d = WAIT_RESULT_W; + end + end else begin + w_cnt_req_d = '0; + w_state_d = WAIT_DATA_W; + end + end else begin + // Remember the amount of outstanding bursts and count down + if (mst_w_valid_o && mst_w_ready_i && mst_w_last_o) begin + w_cnt_req_d = w_cnt_q - 1; + end else begin + w_cnt_req_d = w_cnt_q; + end + w_state_d = WAIT_DATA_W; + end + end + end + end // FEEDTHROUGH_W + + WAIT_DATA_W: begin + // Count W beats until data arrives that belongs to the AMO request + if (w_cnt_req_q == 0) begin + // Block downstream + mst_w_valid_o = 1'b0; + // Ready upstream + slv_w_ready_o = 1'b1; + + if (slv_w_valid_i) begin + if (atop_valid_q == INVALID) begin + w_state_d = FEEDTHROUGH_W; + end else begin + w_data_d = slv_w_data_i; + strb_d = slv_w_strb_i; + w_user_d = slv_w_user_i; + w_d_valid_d = 1'b1; + w_state_d = WAIT_RESULT_W; + end + end + end else if (mst_w_valid_o && mst_w_ready_i && mst_w_last_o) begin + w_cnt_req_d = w_cnt_req_q - 1; + end + end // WAIT_DATA_W + + WAIT_RESULT_W: begin + // If the result is ready, try to write it + if (r_d_valid_q && w_d_valid_q && aw_free) begin + // Check if W channel is free and make sure data is not interleaved + result_d = alu_result_ext; + if (w_free && w_cnt_q == 0) begin + // Block + slv_w_ready_o = 1'b0; + // Send write data + mst_w_valid_o = 1'b1; + mst_w_data_o = alu_result_ext; + mst_w_last_o = 1'b1; + mst_w_strb_o = strb_q; + mst_w_user_o = w_user_q; + if (mst_w_ready_i) begin + w_state_d = FEEDTHROUGH_W; + end else begin + w_state_d = SEND_W; + end + end else begin + w_state_d = WAIT_CHANNEL_W; + end + end + end // WAIT_RESULT_W + + WAIT_CHANNEL_W, SEND_W: begin + // Wait to not interleave the data + if ((w_free && w_cnt_inj_q == 0) || (w_state_q == SEND_W)) begin + // Block + slv_w_ready_o = 1'b0; + // Send write data + mst_w_valid_o = 1'b1; + mst_w_data_o = result_q; + mst_w_last_o = 1'b1; + mst_w_strb_o = strb_q; + mst_w_user_o = w_user_q; + if (mst_w_ready_i) begin + w_state_d = FEEDTHROUGH_W; + end else begin + w_state_d = SEND_W; + end + end + end // WAIT_CHANNEL_W, SEND_W + + default: w_state_d = FEEDTHROUGH_W; + + endcase + end // axi_w_channel + + /*==================================================================== + = B = + ====================================================================*/ + always_comb begin : axi_b_channel + // Defaults AXI Bus + mst_b_ready_o = slv_b_ready_i; + slv_b_id_o = mst_b_id_i; + slv_b_resp_o = mst_b_resp_i; + slv_b_user_o = mst_b_user_i; + slv_b_valid_o = mst_b_valid_i; + // State Machine + b_state_d = b_state_q; + + unique case (b_state_q) + + FEEDTHROUGH_B: begin + if (adapter_ready) begin + if (atop_valid_d == LOAD || atop_valid_d == STORE) begin + // Wait until write is complete + b_state_d = WAIT_COMPLETE_B; + end else if (atop_valid_d == INVALID) begin + // Inject B error resp once the channel is free + if (b_free) begin + // Block downstream + mst_b_ready_o = 1'b0; + // Write B response + slv_b_valid_o = 1'b1; + slv_b_id_o = slv_aw_id_i; + slv_b_resp_o = axi_pkg::RESP_SLVERR; + slv_b_user_o = '0; + if (!slv_b_ready_i) begin + b_state_d = SEND_B; + end + end else begin + b_state_d = WAIT_CHANNEL_B; + end + end + end + end // FEEDTHROUGH_B + + WAIT_CHANNEL_B, SEND_B: begin + if (b_free || (b_state_q == SEND_B)) begin + // Block downstream + mst_b_ready_o = 1'b0; + // Write B response + slv_b_valid_o = 1'b1; + slv_b_id_o = id_q; + slv_b_resp_o = axi_pkg::RESP_SLVERR; + slv_b_user_o = '0; + if (slv_b_ready_i) begin + b_state_d = FEEDTHROUGH_B; + end else begin + b_state_d = SEND_B; + end + end + end // WAIT_CHANNEL_B, SEND_B + + WAIT_COMPLETE_B: begin + if (mst_b_valid_i && (mst_b_id_i == id_q)) begin + b_state_d = FEEDTHROUGH_B; + end + end // WAIT_COMPLETE_B + + default: b_state_d = FEEDTHROUGH_B; + + endcase + end // axi_b_channel + + // Keep track of outstanding downstream write bursts and responses. + always_comb begin + w_cnt_d = w_cnt_q; + if (mst_aw_valid_o && mst_aw_ready_i) begin + w_cnt_d += 1; + end + if (mst_w_valid_o && mst_w_ready_i && mst_w_last_o) begin + w_cnt_d -= 1; + end + end + + always_ff @(posedge clk_i or negedge rst_ni) begin : axi_write_channel_ff + if(~rst_ni) begin + aw_state_q <= FEEDTHROUGH_AW; + w_state_q <= FEEDTHROUGH_W; + b_state_q <= FEEDTHROUGH_B; + w_cnt_q <= '0; + w_cnt_req_q <= '0; + w_cnt_inj_q <= '0; + addr_q <= '0; + id_q <= '0; + size_q <= '0; + strb_q <= '0; + cache_q <= '0; + prot_q <= '0; + qos_q <= '0; + region_q <= '0; + aw_user_q <= '0; + w_user_q <= '0; + w_data_q <= '0; + result_q <= '0; + w_d_valid_q <= '0; + atop_q <= 6'b0; + end else begin + aw_state_q <= aw_state_d; + w_state_q <= w_state_d; + b_state_q <= b_state_d; + w_cnt_q <= w_cnt_d; + w_cnt_req_q <= w_cnt_req_d; + w_cnt_inj_q <= w_cnt_inj_d; + addr_q <= addr_d; + id_q <= id_d; + size_q <= size_d; + strb_q <= strb_d; + cache_q <= cache_d; + prot_q <= prot_d; + qos_q <= qos_d; + region_q <= region_d; + aw_user_q <= aw_user_d; + w_user_q <= w_user_d; + w_data_q <= w_data_d; + result_q <= result_d; + w_d_valid_q <= w_d_valid_d; + atop_q <= atop_d; + end + end + + /** + * Read Channel: AR, R + */ + + /*==================================================================== + = AR = + ====================================================================*/ + always_comb begin : axi_ar_channel + // Defaults AXI Bus + mst_ar_id_o = slv_ar_id_i; + mst_ar_addr_o = slv_ar_addr_i; + mst_ar_len_o = slv_ar_len_i; + mst_ar_size_o = slv_ar_size_i; + mst_ar_burst_o = slv_ar_burst_i; + mst_ar_lock_o = slv_ar_lock_i; + mst_ar_cache_o = slv_ar_cache_i; + mst_ar_prot_o = slv_ar_prot_i; + mst_ar_qos_o = slv_ar_qos_i; + mst_ar_region_o = slv_ar_region_i; + mst_ar_user_o = slv_ar_user_i; + mst_ar_valid_o = 1'b0; + slv_ar_ready_o = 1'b0; + // State Machine + ar_state_d = ar_state_q; + + unique case (ar_state_q) + + FEEDTHROUGH_AR: begin + // Feed through + mst_ar_valid_o = slv_ar_valid_i; + slv_ar_ready_o = mst_ar_ready_i; + + if (adapter_ready) begin + if (atop_valid_d == LOAD | atop_valid_d == STORE) begin + if (ar_free) begin + // Acquire channel + slv_ar_ready_o = 1'b0; + // Immediately start read request + mst_ar_valid_o = 1'b1; + mst_ar_addr_o = slv_aw_addr_i; + mst_ar_id_o = slv_aw_id_i; + mst_ar_len_o = 8'h00; + mst_ar_size_o = slv_aw_size_i; + mst_ar_burst_o = 2'b00; + mst_ar_lock_o = 1'h0; + mst_ar_cache_o = slv_aw_cache_i; + mst_ar_prot_o = slv_aw_prot_i; + mst_ar_qos_o = slv_aw_qos_i; + mst_ar_region_o = slv_aw_region_i; + mst_ar_user_o = slv_aw_user_i; + if (!mst_ar_ready_i) begin + // Hold read request but do not depend on AW + ar_state_d = SEND_AR; + end + end else begin + // Wait until AR is free + ar_state_d = WAIT_CHANNEL_AR; + end + end + end + end // FEEDTHROUGH_AR + + WAIT_CHANNEL_AR, SEND_AR: begin + // Issue read request + if (ar_free || (ar_state_q == SEND_AR)) begin + // Inject read request + mst_ar_valid_o = 1'b1; + mst_ar_addr_o = addr_q; + mst_ar_id_o = id_q; + mst_ar_len_o = 8'h00; + mst_ar_size_o = size_q; + mst_ar_burst_o = 2'b00; + mst_ar_lock_o = 1'h0; + mst_ar_cache_o = cache_q; + mst_ar_prot_o = prot_q; + mst_ar_qos_o = qos_q; + mst_ar_region_o = region_q; + mst_ar_user_o = aw_user_q; + if (mst_ar_ready_i) begin + // Request acknowledged + ar_state_d = FEEDTHROUGH_AR; + end else begin + // Hold read request + ar_state_d = SEND_AR; + end + end else begin + // Wait until AR is free + mst_ar_valid_o = slv_ar_valid_i; + slv_ar_ready_o = mst_ar_ready_i; + end + end // WAIT_CHANNEL_AR, SEND_AR + + default: ar_state_d = FEEDTHROUGH_AR; + + endcase + end // axi_ar_channel + + /*==================================================================== + = R = + ====================================================================*/ + always_comb begin : axi_r_channel + // Defaults AXI Bus + mst_r_ready_o = slv_r_ready_i; + slv_r_id_o = mst_r_id_i; + slv_r_data_o = mst_r_data_i; + slv_r_resp_o = mst_r_resp_i; + slv_r_last_o = mst_r_last_i; + slv_r_user_o = mst_r_user_i; + slv_r_valid_o = mst_r_valid_i; + // Defaults FF + r_data_d = r_data_q; + r_resp_d = r_resp_q; + r_user_d = r_user_q; + r_d_valid_d = r_d_valid_q; + // State Machine + r_state_d = r_state_q; + + unique case (r_state_q) + + FEEDTHROUGH_R: begin + if (adapter_ready) begin + // Reset read flag + r_d_valid_d = 1'b0; + + if (atop_valid_d == LOAD || atop_valid_d == STORE) begin + // Wait for R response to read data + r_state_d = WAIT_DATA_R; + end else if (atop_valid_d == INVALID) begin + // Send R response once channel is free + if (r_free) begin + // Acquire the R channel + // Block downstream + mst_r_ready_o = 1'b0; + // Send R error response + slv_r_valid_o = 1'b1; + slv_r_data_o = '0; + slv_r_id_o = slv_aw_id_i; + slv_r_last_o = 1'b1; + slv_r_resp_o = axi_pkg::RESP_SLVERR; + slv_r_user_o = '0; + if (!slv_r_ready_i) begin + // Hold R response + r_state_d = SEND_R; + end + end else begin + r_state_d = WAIT_CHANNEL_R; + end + end + end + end // FEEDTHROUGH_R + + WAIT_DATA_R: begin + // Read data + if (mst_r_valid_i && (mst_r_id_i == id_q)) begin + // Acknowledge downstream and block upstream + mst_r_ready_o = 1'b1; + slv_r_valid_o = 1'b0; + // Store data + r_data_d = mst_r_data_i; + r_resp_d = mst_r_resp_i; + r_user_d = mst_r_user_i; + r_d_valid_d = 1'b1; + if (atop_valid_q == STORE) begin + r_state_d = FEEDTHROUGH_R; + end else begin + // Wait for B resp before injecting R + r_state_d = WAIT_CHANNEL_R; + end + end + end // WAIT_DATA_R + + WAIT_CHANNEL_R, SEND_R: begin + // Wait for the R channel to become free and B response to be valid + // TODO: Use b_state_d to be one cycle quicker + if ((r_free && (b_state_q != WAIT_COMPLETE_B)) || (r_state_q == SEND_R)) begin + // Block downstream + mst_r_ready_o = 1'b0; + // Send R response + slv_r_valid_o = 1'b1; + slv_r_data_o = r_data_q; + slv_r_id_o = id_q; + slv_r_last_o = 1'b1; + slv_r_resp_o = r_resp_q; + slv_r_user_o = r_user_q; + if (atop_valid_q == INVALID) begin + slv_r_data_o = '0; + slv_r_resp_o = axi_pkg::RESP_SLVERR; + slv_r_user_o = '0; + end + if (slv_r_ready_i) begin + r_state_d = FEEDTHROUGH_R; + end else begin + r_state_d = SEND_R; + end + end + end // WAIT_CHANNEL_R, SEND_R + + default: r_state_d = FEEDTHROUGH_R; + + endcase + end // axi_r_channel + + always_ff @(posedge clk_i or negedge rst_ni) begin : axi_read_channel_ff + if(~rst_ni) begin + ar_state_q <= FEEDTHROUGH_AR; + r_state_q <= FEEDTHROUGH_R; + r_data_q <= '0; + r_resp_q <= '0; + r_user_q <= '0; + r_d_valid_q <= 1'b0; + end else begin + ar_state_q <= ar_state_d; + r_state_q <= r_state_d; + r_data_q <= r_data_d; + r_resp_q <= r_resp_d; + r_user_q <= r_user_d; + r_d_valid_q <= r_d_valid_d; + end + end + + /** + * ALU + */ + + assign big_endian = (atop_q[3] == axi_pkg::ATOP_BIG_END); + assign op_a = big_endian ? {<<8{r_data_q & strb_ext}} : (r_data_q & strb_ext); + assign op_b = big_endian ? {<<8{w_data_q & strb_ext}} : (w_data_q & strb_ext); + assign sign_a = |(op_a & ~(strb_ext >> 1)); + assign sign_b = |(op_b & ~(strb_ext >> 1)); + assign alu_result_ext = big_endian ? {<<8{res}} : res; + + generate + if (AXI_ALU_RATIO == 1 && RISCV_WORD_WIDTH == 32) begin + assign alu_operand_a = op_a; + assign alu_operand_b = op_b; + assign res = alu_result; + end else if (AXI_ALU_RATIO == 1 && RISCV_WORD_WIDTH == 64) begin + assign res = alu_result; + always_comb begin + op_a_sign_ext = op_a | ({AXI_ALU_RATIO*RISCV_WORD_WIDTH{sign_a}} & ~strb_ext); + op_b_sign_ext = op_b | ({AXI_ALU_RATIO*RISCV_WORD_WIDTH{sign_b}} & ~strb_ext); + + if (atop_q[2:0] == axi_pkg::ATOP_SMAX || atop_q[2:0] == axi_pkg::ATOP_SMIN) begin + // Sign extend + alu_operand_a = op_a_sign_ext; + alu_operand_b = op_b_sign_ext; + end else begin + // No sign extension necessary + alu_operand_a = op_a; + alu_operand_b = op_b; + end + end + end else begin + always_comb begin + op_a_sign_ext = op_a | ({AXI_ALU_RATIO*RISCV_WORD_WIDTH{sign_a}} & ~strb_ext); + op_b_sign_ext = op_b | ({AXI_ALU_RATIO*RISCV_WORD_WIDTH{sign_b}} & ~strb_ext); + + if (atop_q[2:0] == axi_pkg::ATOP_SMAX || atop_q[2:0] == axi_pkg::ATOP_SMIN) begin + // Sign extend + alu_operand_a = op_a_sign_ext[addr_q[$clog2(AXI_DATA_WIDTH/8)-1:$clog2(RISCV_WORD_WIDTH/8)]]; + alu_operand_b = op_b_sign_ext[addr_q[$clog2(AXI_DATA_WIDTH/8)-1:$clog2(RISCV_WORD_WIDTH/8)]]; + end else begin + // No sign extension necessary + alu_operand_a = op_a[addr_q[$clog2(AXI_DATA_WIDTH/8)-1:$clog2(RISCV_WORD_WIDTH/8)]]; + alu_operand_b = op_b[addr_q[$clog2(AXI_DATA_WIDTH/8)-1:$clog2(RISCV_WORD_WIDTH/8)]]; + end + res = '0; + res[addr_q[$clog2(AXI_DATA_WIDTH/8)-1:$clog2(RISCV_WORD_WIDTH/8)]] = alu_result; + end + end + endgenerate + + generate + for (genvar i = 0; i < AXI_STRB_WIDTH; i++) begin + always_comb begin + if (strb_q[i]) begin + strb_ext[i] = 8'hFF; + end else begin + strb_ext[i] = 8'h00; + end + end + end + endgenerate + + axi_riscv_amos_alu #( + .DATA_WIDTH ( RISCV_WORD_WIDTH ) + ) i_amo_alu ( + .amo_op_i ( atop_q ), + .amo_operand_a_i ( alu_operand_a ), + .amo_operand_b_i ( alu_operand_b ), + .amo_result_o ( alu_result ) + ); + + // Validate parameters. +// pragma translate_off +`ifndef VERILATOR + initial begin: validate_params + assert (AXI_ADDR_WIDTH > 0) + else $fatal(1, "AXI_ADDR_WIDTH must be greater than 0!"); + assert (AXI_DATA_WIDTH > 0) + else $fatal(1, "AXI_DATA_WIDTH must be greater than 0!"); + assert (AXI_ID_WIDTH > 0) + else $fatal(1, "AXI_ID_WIDTH must be greater than 0!"); + assert (AXI_MAX_WRITE_TXNS > 0) + else $fatal(1, "AXI_MAX_WRITE_TXNS must be greater than 0!"); + assert (RISCV_WORD_WIDTH == 32 || RISCV_WORD_WIDTH == 64) + else $fatal(1, "RISCV_WORD_WIDTH must be 32 or 64!"); + assert (RISCV_WORD_WIDTH <= AXI_DATA_WIDTH) + else $fatal(1, "RISCV_WORD_WIDTH must not be greater than AXI_DATA_WIDTH!"); + end +`endif +// pragma translate_on + +endmodule diff --git a/vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_amos_alu.sv b/vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_amos_alu.sv new file mode 100644 index 00000000000..40a52b0ec66 --- /dev/null +++ b/vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_amos_alu.sv @@ -0,0 +1,78 @@ +// Copyright (c) 2018 ETH Zurich, University of Bologna +// +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. + +// AXI RISC-V Atomic Operations (AMOs) ALU +module axi_riscv_amos_alu # ( + parameter int unsigned DATA_WIDTH = 0 +) ( + input logic [5:0] amo_op_i, + input logic [DATA_WIDTH-1:0] amo_operand_a_i, + input logic [DATA_WIDTH-1:0] amo_operand_b_i, + output logic [DATA_WIDTH-1:0] amo_result_o +); + + logic [DATA_WIDTH:0] adder_sum; + logic [DATA_WIDTH:0] adder_operand_a, adder_operand_b; + + assign adder_sum = adder_operand_a + adder_operand_b; + + always_comb begin + + adder_operand_a = $signed(amo_operand_a_i); + adder_operand_b = $signed(amo_operand_b_i); + + amo_result_o = amo_operand_a_i; + + if (amo_op_i == axi_pkg::ATOP_ATOMICSWAP) begin + // Swap operation + amo_result_o = amo_operand_b_i; + end else if ((amo_op_i[5:4] == axi_pkg::ATOP_ATOMICLOAD) | (amo_op_i[5:4] == axi_pkg::ATOP_ATOMICSTORE)) begin + // Load operation + unique case (amo_op_i[2:0]) + // the default is to output operand_a + axi_pkg::ATOP_ADD: amo_result_o = adder_sum[DATA_WIDTH-1:0]; + axi_pkg::ATOP_CLR: amo_result_o = amo_operand_a_i & (~amo_operand_b_i); + axi_pkg::ATOP_SET: amo_result_o = amo_operand_a_i | amo_operand_b_i; + axi_pkg::ATOP_EOR: amo_result_o = amo_operand_a_i ^ amo_operand_b_i; + axi_pkg::ATOP_SMAX: begin + adder_operand_b = -$signed(amo_operand_b_i); + amo_result_o = adder_sum[DATA_WIDTH] ? amo_operand_b_i : amo_operand_a_i; + end + axi_pkg::ATOP_SMIN: begin + adder_operand_b = -$signed(amo_operand_b_i); + amo_result_o = adder_sum[DATA_WIDTH] ? amo_operand_a_i : amo_operand_b_i; + end + axi_pkg::ATOP_UMAX: begin + adder_operand_a = $unsigned(amo_operand_a_i); + adder_operand_b = -$unsigned(amo_operand_b_i); + amo_result_o = adder_sum[DATA_WIDTH] ? amo_operand_b_i : amo_operand_a_i; + end + axi_pkg::ATOP_UMIN: begin + adder_operand_a = $unsigned(amo_operand_a_i); + adder_operand_b = -$unsigned(amo_operand_b_i); + amo_result_o = adder_sum[DATA_WIDTH] ? amo_operand_a_i : amo_operand_b_i; + end + default: amo_result_o = '0; + endcase + end + end + + // Validate parameters. +// pragma translate_off +`ifndef VERILATOR + initial begin: validate_params + assert (DATA_WIDTH > 0) + else $fatal(1, "DATA_WIDTH must be greater than 0!"); + end +`endif +// pragma translate_on + +endmodule diff --git a/vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_atomics.sv b/vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_atomics.sv new file mode 100644 index 00000000000..f9b72d34143 --- /dev/null +++ b/vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_atomics.sv @@ -0,0 +1,400 @@ +// Copyright (c) 2018 ETH Zurich, University of Bologna +// +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. + +// AXI RISC-V Atomics ("A" Extension) Adapter +// +// This AXI adapter implements the RISC-V "A" extension and adheres to the RVWMO memory consistency +// model. +// +// Maintainer: Andreas Kurth + +module axi_riscv_atomics #( + /// AXI Parameters + parameter int unsigned AXI_ADDR_WIDTH = 0, + parameter int unsigned AXI_DATA_WIDTH = 0, + parameter int unsigned AXI_ID_WIDTH = 0, + parameter int unsigned AXI_USER_WIDTH = 0, + // Maximum number of AXI write bursts outstanding at the same time + parameter int unsigned AXI_MAX_WRITE_TXNS = 0, + // Word width of the widest RISC-V processor that can issue requests to this module. + // 32 for RV32; 64 for RV64, where both 32-bit (.W suffix) and 64-bit (.D suffix) AMOs are + // supported if `aw_strb` is set correctly. + parameter int unsigned RISCV_WORD_WIDTH = 0, + /// Derived Parameters (do NOT change manually!) + localparam int unsigned AXI_STRB_WIDTH = AXI_DATA_WIDTH / 8 +) ( + input logic clk_i, + input logic rst_ni, + + /// Slave Interface + input logic [AXI_ADDR_WIDTH-1:0] slv_aw_addr_i, + input logic [2:0] slv_aw_prot_i, + input logic [3:0] slv_aw_region_i, + input logic [5:0] slv_aw_atop_i, + input logic [7:0] slv_aw_len_i, + input logic [2:0] slv_aw_size_i, + input logic [1:0] slv_aw_burst_i, + input logic slv_aw_lock_i, + input logic [3:0] slv_aw_cache_i, + input logic [3:0] slv_aw_qos_i, + input logic [AXI_ID_WIDTH-1:0] slv_aw_id_i, + input logic [AXI_USER_WIDTH-1:0] slv_aw_user_i, + output logic slv_aw_ready_o, + input logic slv_aw_valid_i, + + input logic [AXI_ADDR_WIDTH-1:0] slv_ar_addr_i, + input logic [2:0] slv_ar_prot_i, + input logic [3:0] slv_ar_region_i, + input logic [7:0] slv_ar_len_i, + input logic [2:0] slv_ar_size_i, + input logic [1:0] slv_ar_burst_i, + input logic slv_ar_lock_i, + input logic [3:0] slv_ar_cache_i, + input logic [3:0] slv_ar_qos_i, + input logic [AXI_ID_WIDTH-1:0] slv_ar_id_i, + input logic [AXI_USER_WIDTH-1:0] slv_ar_user_i, + output logic slv_ar_ready_o, + input logic slv_ar_valid_i, + + input logic [AXI_DATA_WIDTH-1:0] slv_w_data_i, + input logic [AXI_STRB_WIDTH-1:0] slv_w_strb_i, + input logic [AXI_USER_WIDTH-1:0] slv_w_user_i, + input logic slv_w_last_i, + output logic slv_w_ready_o, + input logic slv_w_valid_i, + + output logic [AXI_DATA_WIDTH-1:0] slv_r_data_o, + output logic [1:0] slv_r_resp_o, + output logic slv_r_last_o, + output logic [AXI_ID_WIDTH-1:0] slv_r_id_o, + output logic [AXI_USER_WIDTH-1:0] slv_r_user_o, + input logic slv_r_ready_i, + output logic slv_r_valid_o, + + output logic [1:0] slv_b_resp_o, + output logic [AXI_ID_WIDTH-1:0] slv_b_id_o, + output logic [AXI_USER_WIDTH-1:0] slv_b_user_o, + input logic slv_b_ready_i, + output logic slv_b_valid_o, + + /// Master Interface + output logic [AXI_ADDR_WIDTH-1:0] mst_aw_addr_o, + output logic [2:0] mst_aw_prot_o, + output logic [3:0] mst_aw_region_o, + output logic [5:0] mst_aw_atop_o, + output logic [7:0] mst_aw_len_o, + output logic [2:0] mst_aw_size_o, + output logic [1:0] mst_aw_burst_o, + output logic mst_aw_lock_o, + output logic [3:0] mst_aw_cache_o, + output logic [3:0] mst_aw_qos_o, + output logic [AXI_ID_WIDTH-1:0] mst_aw_id_o, + output logic [AXI_USER_WIDTH-1:0] mst_aw_user_o, + input logic mst_aw_ready_i, + output logic mst_aw_valid_o, + + output logic [AXI_ADDR_WIDTH-1:0] mst_ar_addr_o, + output logic [2:0] mst_ar_prot_o, + output logic [3:0] mst_ar_region_o, + output logic [7:0] mst_ar_len_o, + output logic [2:0] mst_ar_size_o, + output logic [1:0] mst_ar_burst_o, + output logic mst_ar_lock_o, + output logic [3:0] mst_ar_cache_o, + output logic [3:0] mst_ar_qos_o, + output logic [AXI_ID_WIDTH-1:0] mst_ar_id_o, + output logic [AXI_USER_WIDTH-1:0] mst_ar_user_o, + input logic mst_ar_ready_i, + output logic mst_ar_valid_o, + + output logic [AXI_DATA_WIDTH-1:0] mst_w_data_o, + output logic [AXI_STRB_WIDTH-1:0] mst_w_strb_o, + output logic [AXI_USER_WIDTH-1:0] mst_w_user_o, + output logic mst_w_last_o, + input logic mst_w_ready_i, + output logic mst_w_valid_o, + + input logic [AXI_DATA_WIDTH-1:0] mst_r_data_i, + input logic [1:0] mst_r_resp_i, + input logic mst_r_last_i, + input logic [AXI_ID_WIDTH-1:0] mst_r_id_i, + input logic [AXI_USER_WIDTH-1:0] mst_r_user_i, + output logic mst_r_ready_o, + input logic mst_r_valid_i, + + input logic [1:0] mst_b_resp_i, + input logic [AXI_ID_WIDTH-1:0] mst_b_id_i, + input logic [AXI_USER_WIDTH-1:0] mst_b_user_i, + output logic mst_b_ready_o, + input logic mst_b_valid_i +); + + // Make the entire address range exclusively accessible. Since the AMO adapter does not support + // address ranges, it would not make sense to expose the address range as a parameter of this + // module. + localparam longint unsigned ADDR_BEGIN = '0; + localparam longint unsigned ADDR_END = {AXI_ADDR_WIDTH{1'b1}}; + + logic [AXI_ADDR_WIDTH-1:0] int_axi_aw_addr; + logic [2:0] int_axi_aw_prot; + logic [3:0] int_axi_aw_region; + logic [5:0] int_axi_aw_atop; + logic [7:0] int_axi_aw_len; + logic [2:0] int_axi_aw_size; + logic [1:0] int_axi_aw_burst; + logic int_axi_aw_lock; + logic [3:0] int_axi_aw_cache; + logic [3:0] int_axi_aw_qos; + logic [AXI_ID_WIDTH-1:0] int_axi_aw_id; + logic [AXI_USER_WIDTH-1:0] int_axi_aw_user; + logic int_axi_aw_ready; + logic int_axi_aw_valid; + + logic [AXI_ADDR_WIDTH-1:0] int_axi_ar_addr; + logic [2:0] int_axi_ar_prot; + logic [3:0] int_axi_ar_region; + logic [7:0] int_axi_ar_len; + logic [2:0] int_axi_ar_size; + logic [1:0] int_axi_ar_burst; + logic int_axi_ar_lock; + logic [3:0] int_axi_ar_cache; + logic [3:0] int_axi_ar_qos; + logic [AXI_ID_WIDTH-1:0] int_axi_ar_id; + logic [AXI_USER_WIDTH-1:0] int_axi_ar_user; + logic int_axi_ar_ready; + logic int_axi_ar_valid; + + logic [AXI_DATA_WIDTH-1:0] int_axi_w_data; + logic [AXI_STRB_WIDTH-1:0] int_axi_w_strb; + logic [AXI_USER_WIDTH-1:0] int_axi_w_user; + logic int_axi_w_last; + logic int_axi_w_ready; + logic int_axi_w_valid; + + logic [AXI_DATA_WIDTH-1:0] int_axi_r_data; + logic [1:0] int_axi_r_resp; + logic int_axi_r_last; + logic [AXI_ID_WIDTH-1:0] int_axi_r_id; + logic [AXI_USER_WIDTH-1:0] int_axi_r_user; + logic int_axi_r_ready; + logic int_axi_r_valid; + + logic [1:0] int_axi_b_resp; + logic [AXI_ID_WIDTH-1:0] int_axi_b_id; + logic [AXI_USER_WIDTH-1:0] int_axi_b_user; + logic int_axi_b_ready; + logic int_axi_b_valid; + + axi_riscv_amos #( + .AXI_ADDR_WIDTH (AXI_ADDR_WIDTH), + .AXI_DATA_WIDTH (AXI_DATA_WIDTH), + .AXI_ID_WIDTH (AXI_ID_WIDTH), + .AXI_USER_WIDTH (AXI_USER_WIDTH), + .AXI_MAX_WRITE_TXNS (AXI_MAX_WRITE_TXNS), + .RISCV_WORD_WIDTH (RISCV_WORD_WIDTH) + ) i_amos ( + .clk_i ( clk_i ), + .rst_ni ( rst_ni ), + .slv_aw_addr_i ( slv_aw_addr_i ), + .slv_aw_prot_i ( slv_aw_prot_i ), + .slv_aw_region_i ( slv_aw_region_i ), + .slv_aw_atop_i ( slv_aw_atop_i ), + .slv_aw_len_i ( slv_aw_len_i ), + .slv_aw_size_i ( slv_aw_size_i ), + .slv_aw_burst_i ( slv_aw_burst_i ), + .slv_aw_lock_i ( slv_aw_lock_i ), + .slv_aw_cache_i ( slv_aw_cache_i ), + .slv_aw_qos_i ( slv_aw_qos_i ), + .slv_aw_id_i ( slv_aw_id_i ), + .slv_aw_user_i ( slv_aw_user_i ), + .slv_aw_ready_o ( slv_aw_ready_o ), + .slv_aw_valid_i ( slv_aw_valid_i ), + .slv_ar_addr_i ( slv_ar_addr_i ), + .slv_ar_prot_i ( slv_ar_prot_i ), + .slv_ar_region_i ( slv_ar_region_i ), + .slv_ar_len_i ( slv_ar_len_i ), + .slv_ar_size_i ( slv_ar_size_i ), + .slv_ar_burst_i ( slv_ar_burst_i ), + .slv_ar_lock_i ( slv_ar_lock_i ), + .slv_ar_cache_i ( slv_ar_cache_i ), + .slv_ar_qos_i ( slv_ar_qos_i ), + .slv_ar_id_i ( slv_ar_id_i ), + .slv_ar_user_i ( slv_ar_user_i ), + .slv_ar_ready_o ( slv_ar_ready_o ), + .slv_ar_valid_i ( slv_ar_valid_i ), + .slv_w_data_i ( slv_w_data_i ), + .slv_w_strb_i ( slv_w_strb_i ), + .slv_w_user_i ( slv_w_user_i ), + .slv_w_last_i ( slv_w_last_i ), + .slv_w_ready_o ( slv_w_ready_o ), + .slv_w_valid_i ( slv_w_valid_i ), + .slv_r_data_o ( slv_r_data_o ), + .slv_r_resp_o ( slv_r_resp_o ), + .slv_r_last_o ( slv_r_last_o ), + .slv_r_id_o ( slv_r_id_o ), + .slv_r_user_o ( slv_r_user_o ), + .slv_r_ready_i ( slv_r_ready_i ), + .slv_r_valid_o ( slv_r_valid_o ), + .slv_b_resp_o ( slv_b_resp_o ), + .slv_b_id_o ( slv_b_id_o ), + .slv_b_user_o ( slv_b_user_o ), + .slv_b_ready_i ( slv_b_ready_i ), + .slv_b_valid_o ( slv_b_valid_o ), + .mst_aw_addr_o ( int_axi_aw_addr ), + .mst_aw_prot_o ( int_axi_aw_prot ), + .mst_aw_region_o ( int_axi_aw_region ), + .mst_aw_atop_o ( int_axi_aw_atop ), + .mst_aw_len_o ( int_axi_aw_len ), + .mst_aw_size_o ( int_axi_aw_size ), + .mst_aw_burst_o ( int_axi_aw_burst ), + .mst_aw_lock_o ( int_axi_aw_lock ), + .mst_aw_cache_o ( int_axi_aw_cache ), + .mst_aw_qos_o ( int_axi_aw_qos ), + .mst_aw_id_o ( int_axi_aw_id ), + .mst_aw_user_o ( int_axi_aw_user ), + .mst_aw_ready_i ( int_axi_aw_ready ), + .mst_aw_valid_o ( int_axi_aw_valid ), + .mst_ar_addr_o ( int_axi_ar_addr ), + .mst_ar_prot_o ( int_axi_ar_prot ), + .mst_ar_region_o ( int_axi_ar_region ), + .mst_ar_len_o ( int_axi_ar_len ), + .mst_ar_size_o ( int_axi_ar_size ), + .mst_ar_burst_o ( int_axi_ar_burst ), + .mst_ar_lock_o ( int_axi_ar_lock ), + .mst_ar_cache_o ( int_axi_ar_cache ), + .mst_ar_qos_o ( int_axi_ar_qos ), + .mst_ar_id_o ( int_axi_ar_id ), + .mst_ar_user_o ( int_axi_ar_user ), + .mst_ar_ready_i ( int_axi_ar_ready ), + .mst_ar_valid_o ( int_axi_ar_valid ), + .mst_w_data_o ( int_axi_w_data ), + .mst_w_strb_o ( int_axi_w_strb ), + .mst_w_user_o ( int_axi_w_user ), + .mst_w_last_o ( int_axi_w_last ), + .mst_w_ready_i ( int_axi_w_ready ), + .mst_w_valid_o ( int_axi_w_valid ), + .mst_r_data_i ( int_axi_r_data ), + .mst_r_resp_i ( int_axi_r_resp ), + .mst_r_last_i ( int_axi_r_last ), + .mst_r_id_i ( int_axi_r_id ), + .mst_r_user_i ( int_axi_r_user ), + .mst_r_ready_o ( int_axi_r_ready ), + .mst_r_valid_i ( int_axi_r_valid ), + .mst_b_resp_i ( int_axi_b_resp ), + .mst_b_id_i ( int_axi_b_id ), + .mst_b_user_i ( int_axi_b_user ), + .mst_b_ready_o ( int_axi_b_ready ), + .mst_b_valid_i ( int_axi_b_valid ) + ); + + axi_riscv_lrsc #( + .ADDR_BEGIN (ADDR_BEGIN), + .ADDR_END (ADDR_END), + .AXI_ADDR_WIDTH (AXI_ADDR_WIDTH), + .AXI_DATA_WIDTH (AXI_DATA_WIDTH), + .AXI_ID_WIDTH (AXI_ID_WIDTH), + .AXI_USER_WIDTH (AXI_USER_WIDTH) + ) i_lrsc ( + .clk_i ( clk_i ), + .rst_ni ( rst_ni ), + .slv_aw_addr_i ( int_axi_aw_addr ), + .slv_aw_prot_i ( int_axi_aw_prot ), + .slv_aw_region_i ( int_axi_aw_region ), + .slv_aw_atop_i ( int_axi_aw_atop ), + .slv_aw_len_i ( int_axi_aw_len ), + .slv_aw_size_i ( int_axi_aw_size ), + .slv_aw_burst_i ( int_axi_aw_burst ), + .slv_aw_lock_i ( int_axi_aw_lock ), + .slv_aw_cache_i ( int_axi_aw_cache ), + .slv_aw_qos_i ( int_axi_aw_qos ), + .slv_aw_id_i ( int_axi_aw_id ), + .slv_aw_user_i ( int_axi_aw_user ), + .slv_aw_ready_o ( int_axi_aw_ready ), + .slv_aw_valid_i ( int_axi_aw_valid ), + .slv_ar_addr_i ( int_axi_ar_addr ), + .slv_ar_prot_i ( int_axi_ar_prot ), + .slv_ar_region_i ( int_axi_ar_region ), + .slv_ar_len_i ( int_axi_ar_len ), + .slv_ar_size_i ( int_axi_ar_size ), + .slv_ar_burst_i ( int_axi_ar_burst ), + .slv_ar_lock_i ( int_axi_ar_lock ), + .slv_ar_cache_i ( int_axi_ar_cache ), + .slv_ar_qos_i ( int_axi_ar_qos ), + .slv_ar_id_i ( int_axi_ar_id ), + .slv_ar_user_i ( int_axi_ar_user ), + .slv_ar_ready_o ( int_axi_ar_ready ), + .slv_ar_valid_i ( int_axi_ar_valid ), + .slv_w_data_i ( int_axi_w_data ), + .slv_w_strb_i ( int_axi_w_strb ), + .slv_w_user_i ( int_axi_w_user ), + .slv_w_last_i ( int_axi_w_last ), + .slv_w_ready_o ( int_axi_w_ready ), + .slv_w_valid_i ( int_axi_w_valid ), + .slv_r_data_o ( int_axi_r_data ), + .slv_r_resp_o ( int_axi_r_resp ), + .slv_r_last_o ( int_axi_r_last ), + .slv_r_id_o ( int_axi_r_id ), + .slv_r_user_o ( int_axi_r_user ), + .slv_r_ready_i ( int_axi_r_ready ), + .slv_r_valid_o ( int_axi_r_valid ), + .slv_b_resp_o ( int_axi_b_resp ), + .slv_b_id_o ( int_axi_b_id ), + .slv_b_user_o ( int_axi_b_user ), + .slv_b_ready_i ( int_axi_b_ready ), + .slv_b_valid_o ( int_axi_b_valid ), + .mst_aw_addr_o ( mst_aw_addr_o ), + .mst_aw_prot_o ( mst_aw_prot_o ), + .mst_aw_region_o ( mst_aw_region_o ), + .mst_aw_atop_o ( mst_aw_atop_o ), + .mst_aw_len_o ( mst_aw_len_o ), + .mst_aw_size_o ( mst_aw_size_o ), + .mst_aw_burst_o ( mst_aw_burst_o ), + .mst_aw_lock_o ( mst_aw_lock_o ), + .mst_aw_cache_o ( mst_aw_cache_o ), + .mst_aw_qos_o ( mst_aw_qos_o ), + .mst_aw_id_o ( mst_aw_id_o ), + .mst_aw_user_o ( mst_aw_user_o ), + .mst_aw_ready_i ( mst_aw_ready_i ), + .mst_aw_valid_o ( mst_aw_valid_o ), + .mst_ar_addr_o ( mst_ar_addr_o ), + .mst_ar_prot_o ( mst_ar_prot_o ), + .mst_ar_region_o ( mst_ar_region_o ), + .mst_ar_len_o ( mst_ar_len_o ), + .mst_ar_size_o ( mst_ar_size_o ), + .mst_ar_burst_o ( mst_ar_burst_o ), + .mst_ar_lock_o ( mst_ar_lock_o ), + .mst_ar_cache_o ( mst_ar_cache_o ), + .mst_ar_qos_o ( mst_ar_qos_o ), + .mst_ar_id_o ( mst_ar_id_o ), + .mst_ar_user_o ( mst_ar_user_o ), + .mst_ar_ready_i ( mst_ar_ready_i ), + .mst_ar_valid_o ( mst_ar_valid_o ), + .mst_w_data_o ( mst_w_data_o ), + .mst_w_strb_o ( mst_w_strb_o ), + .mst_w_user_o ( mst_w_user_o ), + .mst_w_last_o ( mst_w_last_o ), + .mst_w_ready_i ( mst_w_ready_i ), + .mst_w_valid_o ( mst_w_valid_o ), + .mst_r_data_i ( mst_r_data_i ), + .mst_r_resp_i ( mst_r_resp_i ), + .mst_r_last_i ( mst_r_last_i ), + .mst_r_id_i ( mst_r_id_i ), + .mst_r_user_i ( mst_r_user_i ), + .mst_r_ready_o ( mst_r_ready_o ), + .mst_r_valid_i ( mst_r_valid_i ), + .mst_b_resp_i ( mst_b_resp_i ), + .mst_b_id_i ( mst_b_id_i ), + .mst_b_user_i ( mst_b_user_i ), + .mst_b_ready_o ( mst_b_ready_o ), + .mst_b_valid_i ( mst_b_valid_i ) + ); + +endmodule diff --git a/vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_atomics_wrap.sv b/vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_atomics_wrap.sv new file mode 100644 index 00000000000..ad3505cf30f --- /dev/null +++ b/vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_atomics_wrap.sv @@ -0,0 +1,151 @@ +// Copyright (c) 2018 ETH Zurich, University of Bologna +// +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. + +// Wrapper for the AXI RISC-V Atomics Adapter that exposes AXI SystemVerilog interfaces. +// +// See the header of `axi_riscv_atomics` for a description. +// +// Maintainer: Andreas Kurth + +module axi_riscv_atomics_wrap #( + /// AXI Parameters + parameter int unsigned AXI_ADDR_WIDTH = 0, + parameter int unsigned AXI_DATA_WIDTH = 0, + parameter int unsigned AXI_ID_WIDTH = 0, + parameter int unsigned AXI_USER_WIDTH = 0, + /// Maximum number of AXI bursts outstanding at the same time + parameter int unsigned AXI_MAX_WRITE_TXNS = 0, + // Word width of the widest RISC-V processor that can issue requests to this module. + // 32 for RV32; 64 for RV64, where both 32-bit (.W suffix) and 64-bit (.D suffix) AMOs are + // supported if `aw_strb` is set correctly. + parameter int unsigned RISCV_WORD_WIDTH = 0, + /// Derived Parameters (do NOT change manually!) + localparam int unsigned AXI_STRB_WIDTH = AXI_DATA_WIDTH / 8 +) ( + input logic clk_i, + input logic rst_ni, + AXI_BUS.Master mst, + AXI_BUS.Slave slv +); + + axi_riscv_atomics #( + .AXI_ADDR_WIDTH (AXI_ADDR_WIDTH), + .AXI_DATA_WIDTH (AXI_DATA_WIDTH), + .AXI_ID_WIDTH (AXI_ID_WIDTH), + .AXI_USER_WIDTH (AXI_USER_WIDTH), + .AXI_MAX_WRITE_TXNS (AXI_MAX_WRITE_TXNS), + .RISCV_WORD_WIDTH (RISCV_WORD_WIDTH) + ) i_atomics ( + .clk_i ( clk_i ), + .rst_ni ( rst_ni ), + .slv_aw_addr_i ( slv.aw_addr ), + .slv_aw_prot_i ( slv.aw_prot ), + .slv_aw_region_i ( slv.aw_region ), + .slv_aw_atop_i ( slv.aw_atop ), + .slv_aw_len_i ( slv.aw_len ), + .slv_aw_size_i ( slv.aw_size ), + .slv_aw_burst_i ( slv.aw_burst ), + .slv_aw_lock_i ( slv.aw_lock ), + .slv_aw_cache_i ( slv.aw_cache ), + .slv_aw_qos_i ( slv.aw_qos ), + .slv_aw_id_i ( slv.aw_id ), + .slv_aw_user_i ( slv.aw_user ), + .slv_aw_ready_o ( slv.aw_ready ), + .slv_aw_valid_i ( slv.aw_valid ), + .slv_ar_addr_i ( slv.ar_addr ), + .slv_ar_prot_i ( slv.ar_prot ), + .slv_ar_region_i ( slv.ar_region ), + .slv_ar_len_i ( slv.ar_len ), + .slv_ar_size_i ( slv.ar_size ), + .slv_ar_burst_i ( slv.ar_burst ), + .slv_ar_lock_i ( slv.ar_lock ), + .slv_ar_cache_i ( slv.ar_cache ), + .slv_ar_qos_i ( slv.ar_qos ), + .slv_ar_id_i ( slv.ar_id ), + .slv_ar_user_i ( slv.ar_user ), + .slv_ar_ready_o ( slv.ar_ready ), + .slv_ar_valid_i ( slv.ar_valid ), + .slv_w_data_i ( slv.w_data ), + .slv_w_strb_i ( slv.w_strb ), + .slv_w_user_i ( slv.w_user ), + .slv_w_last_i ( slv.w_last ), + .slv_w_ready_o ( slv.w_ready ), + .slv_w_valid_i ( slv.w_valid ), + .slv_r_data_o ( slv.r_data ), + .slv_r_resp_o ( slv.r_resp ), + .slv_r_last_o ( slv.r_last ), + .slv_r_id_o ( slv.r_id ), + .slv_r_user_o ( slv.r_user ), + .slv_r_ready_i ( slv.r_ready ), + .slv_r_valid_o ( slv.r_valid ), + .slv_b_resp_o ( slv.b_resp ), + .slv_b_id_o ( slv.b_id ), + .slv_b_user_o ( slv.b_user ), + .slv_b_ready_i ( slv.b_ready ), + .slv_b_valid_o ( slv.b_valid ), + .mst_aw_addr_o ( mst.aw_addr ), + .mst_aw_prot_o ( mst.aw_prot ), + .mst_aw_region_o ( mst.aw_region ), + .mst_aw_atop_o ( mst.aw_atop ), + .mst_aw_len_o ( mst.aw_len ), + .mst_aw_size_o ( mst.aw_size ), + .mst_aw_burst_o ( mst.aw_burst ), + .mst_aw_lock_o ( mst.aw_lock ), + .mst_aw_cache_o ( mst.aw_cache ), + .mst_aw_qos_o ( mst.aw_qos ), + .mst_aw_id_o ( mst.aw_id ), + .mst_aw_user_o ( mst.aw_user ), + .mst_aw_ready_i ( mst.aw_ready ), + .mst_aw_valid_o ( mst.aw_valid ), + .mst_ar_addr_o ( mst.ar_addr ), + .mst_ar_prot_o ( mst.ar_prot ), + .mst_ar_region_o ( mst.ar_region ), + .mst_ar_len_o ( mst.ar_len ), + .mst_ar_size_o ( mst.ar_size ), + .mst_ar_burst_o ( mst.ar_burst ), + .mst_ar_lock_o ( mst.ar_lock ), + .mst_ar_cache_o ( mst.ar_cache ), + .mst_ar_qos_o ( mst.ar_qos ), + .mst_ar_id_o ( mst.ar_id ), + .mst_ar_user_o ( mst.ar_user ), + .mst_ar_ready_i ( mst.ar_ready ), + .mst_ar_valid_o ( mst.ar_valid ), + .mst_w_data_o ( mst.w_data ), + .mst_w_strb_o ( mst.w_strb ), + .mst_w_user_o ( mst.w_user ), + .mst_w_last_o ( mst.w_last ), + .mst_w_ready_i ( mst.w_ready ), + .mst_w_valid_o ( mst.w_valid ), + .mst_r_data_i ( mst.r_data ), + .mst_r_resp_i ( mst.r_resp ), + .mst_r_last_i ( mst.r_last ), + .mst_r_id_i ( mst.r_id ), + .mst_r_user_i ( mst.r_user ), + .mst_r_ready_o ( mst.r_ready ), + .mst_r_valid_i ( mst.r_valid ), + .mst_b_resp_i ( mst.b_resp ), + .mst_b_id_i ( mst.b_id ), + .mst_b_user_i ( mst.b_user ), + .mst_b_ready_o ( mst.b_ready ), + .mst_b_valid_i ( mst.b_valid ) + ); + + // Validate parameters. +// pragma translate_off +`ifndef VERILATOR + initial begin: validate_params + assert (AXI_STRB_WIDTH == AXI_DATA_WIDTH/8) + else $fatal(1, "AXI_STRB_WIDTH must equal AXI_DATA_WIDTH/8!"); + end +`endif +// pragma translate_on + +endmodule diff --git a/vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_lrsc.sv b/vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_lrsc.sv new file mode 100644 index 00000000000..82c132c79ae --- /dev/null +++ b/vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_lrsc.sv @@ -0,0 +1,509 @@ +// Copyright (c) 2018 ETH Zurich, University of Bologna +// +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. + +// AXI RISC-V LR/SC Adapter +// +// This adapter adds support for AXI4 exclusive accesses to a slave that natively does not support +// exclusive accesses. It is to be placed between that slave and the upstream master port, so that +// the `mst` port of this module drives the slave and the `slv` port of this module is driven by +// the upstream master. +// +// Exclusive accesses are only enabled for a range of addresses specified through parameters. All +// addresses within that range are guaranteed to fulfill the constraints described in A7.2 of the +// AXI4 standard, both for normal and exclusive memory accesses. Addresses outside that range +// behave like a slave that does not support exclusive memory accesses (see AXI4, A7.2.5). +// +// Limitations: +// - The adapter allows at most one read and one write access to be outstanding at any given +// time. +// - The adapter does not support bursts in exclusive accessing. Only single words can be +// reserved. +// +// Maintainer: Andreas Kurth + +module axi_riscv_lrsc #( + /// Exclusively-accessible address range (closed interval from ADDR_BEGIN to ADDR_END) + parameter longint unsigned ADDR_BEGIN = 0, + parameter longint unsigned ADDR_END = 0, + /// AXI Parameters + parameter int unsigned AXI_ADDR_WIDTH = 0, + parameter int unsigned AXI_DATA_WIDTH = 0, + parameter int unsigned AXI_ID_WIDTH = 0, + parameter int unsigned AXI_USER_WIDTH = 0, + /// Derived Parameters (do NOT change manually!) + localparam int unsigned AXI_STRB_WIDTH = AXI_DATA_WIDTH / 8 +) ( + input logic clk_i, + input logic rst_ni, + + /// Slave Interface + input logic [AXI_ADDR_WIDTH-1:0] slv_aw_addr_i, + input logic [2:0] slv_aw_prot_i, + input logic [3:0] slv_aw_region_i, + input logic [5:0] slv_aw_atop_i, + input logic [7:0] slv_aw_len_i, + input logic [2:0] slv_aw_size_i, + input logic [1:0] slv_aw_burst_i, + input logic slv_aw_lock_i, + input logic [3:0] slv_aw_cache_i, + input logic [3:0] slv_aw_qos_i, + input logic [AXI_ID_WIDTH-1:0] slv_aw_id_i, + input logic [AXI_USER_WIDTH-1:0] slv_aw_user_i, + output logic slv_aw_ready_o, + input logic slv_aw_valid_i, + + input logic [AXI_ADDR_WIDTH-1:0] slv_ar_addr_i, + input logic [2:0] slv_ar_prot_i, + input logic [3:0] slv_ar_region_i, + input logic [7:0] slv_ar_len_i, + input logic [2:0] slv_ar_size_i, + input logic [1:0] slv_ar_burst_i, + input logic slv_ar_lock_i, + input logic [3:0] slv_ar_cache_i, + input logic [3:0] slv_ar_qos_i, + input logic [AXI_ID_WIDTH-1:0] slv_ar_id_i, + input logic [AXI_USER_WIDTH-1:0] slv_ar_user_i, + output logic slv_ar_ready_o, + input logic slv_ar_valid_i, + + input logic [AXI_DATA_WIDTH-1:0] slv_w_data_i, + input logic [AXI_STRB_WIDTH-1:0] slv_w_strb_i, + input logic [AXI_USER_WIDTH-1:0] slv_w_user_i, + input logic slv_w_last_i, + output logic slv_w_ready_o, + input logic slv_w_valid_i, + + output logic [AXI_DATA_WIDTH-1:0] slv_r_data_o, + output logic [1:0] slv_r_resp_o, + output logic slv_r_last_o, + output logic [AXI_ID_WIDTH-1:0] slv_r_id_o, + output logic [AXI_USER_WIDTH-1:0] slv_r_user_o, + input logic slv_r_ready_i, + output logic slv_r_valid_o, + + output logic [1:0] slv_b_resp_o, + output logic [AXI_ID_WIDTH-1:0] slv_b_id_o, + output logic [AXI_USER_WIDTH-1:0] slv_b_user_o, + input logic slv_b_ready_i, + output logic slv_b_valid_o, + + /// Master Interface + output logic [AXI_ADDR_WIDTH-1:0] mst_aw_addr_o, + output logic [2:0] mst_aw_prot_o, + output logic [3:0] mst_aw_region_o, + output logic [5:0] mst_aw_atop_o, + output logic [7:0] mst_aw_len_o, + output logic [2:0] mst_aw_size_o, + output logic [1:0] mst_aw_burst_o, + output logic mst_aw_lock_o, + output logic [3:0] mst_aw_cache_o, + output logic [3:0] mst_aw_qos_o, + output logic [AXI_ID_WIDTH-1:0] mst_aw_id_o, + output logic [AXI_USER_WIDTH-1:0] mst_aw_user_o, + input logic mst_aw_ready_i, + output logic mst_aw_valid_o, + + output logic [AXI_ADDR_WIDTH-1:0] mst_ar_addr_o, + output logic [2:0] mst_ar_prot_o, + output logic [3:0] mst_ar_region_o, + output logic [7:0] mst_ar_len_o, + output logic [2:0] mst_ar_size_o, + output logic [1:0] mst_ar_burst_o, + output logic mst_ar_lock_o, + output logic [3:0] mst_ar_cache_o, + output logic [3:0] mst_ar_qos_o, + output logic [AXI_ID_WIDTH-1:0] mst_ar_id_o, + output logic [AXI_USER_WIDTH-1:0] mst_ar_user_o, + input logic mst_ar_ready_i, + output logic mst_ar_valid_o, + + output logic [AXI_DATA_WIDTH-1:0] mst_w_data_o, + output logic [AXI_STRB_WIDTH-1:0] mst_w_strb_o, + output logic [AXI_USER_WIDTH-1:0] mst_w_user_o, + output logic mst_w_last_o, + input logic mst_w_ready_i, + output logic mst_w_valid_o, + + input logic [AXI_DATA_WIDTH-1:0] mst_r_data_i, + input logic [1:0] mst_r_resp_i, + input logic mst_r_last_i, + input logic [AXI_ID_WIDTH-1:0] mst_r_id_i, + input logic [AXI_USER_WIDTH-1:0] mst_r_user_i, + output logic mst_r_ready_o, + input logic mst_r_valid_i, + + input logic [1:0] mst_b_resp_i, + input logic [AXI_ID_WIDTH-1:0] mst_b_id_i, + input logic [AXI_USER_WIDTH-1:0] mst_b_user_i, + output logic mst_b_ready_o, + input logic mst_b_valid_i +); + + // Declarations of Signals and Types + + logic [AXI_ID_WIDTH-1:0] art_check_id, + art_set_id, + w_id_d, w_id_q; + + logic [AXI_ADDR_WIDTH-1:0] art_check_addr, + art_clr_addr, + art_set_addr, + rd_clr_addr, + wr_clr_addr, + w_addr_d, w_addr_q; + + logic art_check_req, art_check_gnt, + art_clr_req, art_clr_gnt, + art_set_req, art_set_gnt, + rd_clr_req, rd_clr_gnt, + wr_clr_req, wr_clr_gnt; + + logic art_check_res; + + logic b_excl_d, b_excl_q, + r_excl_d, r_excl_q; + + typedef enum logic [1:0] {R_IDLE, R_WAIT_AR, R_WAIT_R} r_state_t; + r_state_t r_state_d, r_state_q; + + typedef enum logic [2:0] {AW_IDLE, W_FORWARD, W_BYPASS, W_WAIT_ART_CLR, W_DROP, B_FORWARD, + B_INJECT} w_state_t; + w_state_t w_state_d, w_state_q; + + // AR and R Channel + + // Time-Invariant Signal Assignments + assign mst_ar_addr_o = slv_ar_addr_i; + assign mst_ar_prot_o = slv_ar_prot_i; + assign mst_ar_region_o = slv_ar_region_i; + assign mst_ar_len_o = slv_ar_len_i; + assign mst_ar_size_o = slv_ar_size_i; + assign mst_ar_burst_o = slv_ar_burst_i; + assign mst_ar_lock_o = 1'b0; + assign mst_ar_cache_o = slv_ar_cache_i; + assign mst_ar_qos_o = slv_ar_qos_i; + assign mst_ar_id_o = slv_ar_id_i; + assign mst_ar_user_o = slv_ar_user_i; + assign slv_r_data_o = mst_r_data_i; + assign slv_r_last_o = mst_r_last_i; + assign slv_r_id_o = mst_r_id_i; + assign slv_r_user_o = mst_r_user_i; + + // FSM for Time-Variant Signal Assignments + always_comb begin + mst_ar_valid_o = 1'b0; + slv_ar_ready_o = 1'b0; + mst_r_ready_o = 1'b0; + slv_r_valid_o = 1'b0; + slv_r_resp_o = '0; + art_set_addr = '0; + art_set_id = '0; + art_set_req = 1'b0; + rd_clr_addr = '0; + rd_clr_req = 1'b0; + r_excl_d = r_excl_q; + r_state_d = r_state_q; + + case (r_state_q) + + R_IDLE: begin + if (slv_ar_valid_i) begin + if (slv_ar_addr_i >= ADDR_BEGIN && slv_ar_addr_i <= ADDR_END && slv_ar_lock_i && + slv_ar_len_i == 8'h00) begin + // Inside exclusively-accessible address range and exclusive access and no + // burst + art_set_addr = slv_ar_addr_i; + art_set_id = slv_ar_id_i; + art_set_req = 1'b1; + r_excl_d = 1'b1; + if (art_set_gnt) begin + mst_ar_valid_o = 1'b1; + if (mst_ar_ready_i) begin + slv_ar_ready_o = 1'b1; + r_state_d = R_WAIT_R; + end else begin + r_state_d = R_WAIT_AR; + end + end + end else begin + // Outside exclusively-accessible address range or regular access or burst + r_excl_d = 1'b0; + mst_ar_valid_o = 1'b1; + if (mst_ar_ready_i) begin + slv_ar_ready_o = 1'b1; + r_state_d = R_WAIT_R; + end else begin + r_state_d = R_WAIT_AR; + end + end + end + end + + R_WAIT_AR: begin + mst_ar_valid_o = slv_ar_valid_i; + slv_ar_ready_o = mst_ar_ready_i; + if (mst_ar_ready_i && mst_ar_valid_o) begin + r_state_d = R_WAIT_R; + end + end + + R_WAIT_R: begin + mst_r_ready_o = slv_r_ready_i; + slv_r_valid_o = mst_r_valid_i; + if (mst_r_resp_i[1] == 1'b0) begin + slv_r_resp_o = {1'b0, r_excl_q}; + end else begin + slv_r_resp_o = mst_r_resp_i; + end + if (mst_r_valid_i && mst_r_ready_o && mst_r_last_i) begin + r_excl_d = 1'b0; + r_state_d = R_IDLE; + end + end + + default: begin + r_state_d = R_IDLE; + end + endcase + end + + // AW, W and B Channel + + // Time-Invariant Signal Assignments + assign mst_aw_addr_o = slv_aw_addr_i; + assign mst_aw_prot_o = slv_aw_prot_i; + assign mst_aw_region_o = slv_aw_region_i; + assign mst_aw_atop_o = slv_aw_atop_i; + assign mst_aw_len_o = slv_aw_len_i; + assign mst_aw_size_o = slv_aw_size_i; + assign mst_aw_burst_o = slv_aw_burst_i; + assign mst_aw_lock_o = 1'b0; + assign mst_aw_cache_o = slv_aw_cache_i; + assign mst_aw_qos_o = slv_aw_qos_i; + assign mst_aw_id_o = slv_aw_id_i; + assign mst_aw_user_o = slv_aw_user_i; + assign mst_w_data_o = slv_w_data_i; + assign mst_w_strb_o = slv_w_strb_i; + assign mst_w_user_o = slv_w_user_i; + assign mst_w_last_o = slv_w_last_i; + + always_comb begin + w_addr_d = w_addr_q; + w_id_d = w_id_q; + if (slv_aw_valid_i && slv_aw_ready_o) begin + w_addr_d = slv_aw_addr_i; + w_id_d = slv_aw_id_i; + end + end + + // FSM for Time-Variant Signal Assignments + always_comb begin + mst_aw_valid_o = 1'b0; + slv_aw_ready_o = 1'b0; + mst_w_valid_o = 1'b0; + slv_w_ready_o = 1'b0; + slv_b_valid_o = 1'b0; + mst_b_ready_o = 1'b0; + slv_b_resp_o = '0; + slv_b_id_o = '0; + slv_b_user_o = '0; + art_check_addr = '0; + art_check_id = '0; + art_check_req = 1'b0; + wr_clr_addr = '0; + wr_clr_req = 1'b0; + b_excl_d = b_excl_q; + w_state_d = w_state_q; + + case (w_state_q) + + AW_IDLE: begin + if (slv_aw_valid_i) begin + // New AW, and W channel is idle + if (slv_aw_addr_i >= ADDR_BEGIN && slv_aw_addr_i <= ADDR_END) begin + // Inside exclusively-accessible address range + if (slv_aw_lock_i && slv_aw_len_i == 8'h00) begin + // Exclusive access and no burst, so check if reservation exists + art_check_addr = slv_aw_addr_i; + art_check_id = slv_aw_id_i; + art_check_req = 1'b1; + if (art_check_gnt) begin + if (art_check_res) begin + // Yes, so forward downstream + mst_aw_valid_o = 1'b1; + if (mst_aw_ready_i) begin + slv_aw_ready_o = 1'b1; + b_excl_d = 1'b1; + w_state_d = W_FORWARD; + end + end else begin + // No, drop in W channel. + slv_aw_ready_o = 1'b1; + w_state_d = W_DROP; + end + end + end else begin + // Non-exclusive access or burst, so forward downstream + mst_aw_valid_o = 1'b1; + if (mst_aw_ready_i) begin + slv_aw_ready_o = 1'b1; + w_state_d = W_FORWARD; + end + end + end else begin + // Outside exclusively-accessible address range, so bypass any + // modifications. + mst_aw_valid_o = 1'b1; + slv_aw_ready_o = mst_aw_ready_i; + if (slv_aw_ready_o) begin + w_state_d = W_BYPASS; + end + end + end + end + + W_FORWARD: begin + mst_w_valid_o = slv_w_valid_i; + slv_w_ready_o = mst_w_ready_i; + if (slv_w_valid_i && slv_w_ready_o && slv_w_last_i) begin + wr_clr_addr = w_addr_q; + wr_clr_req = 1'b1; + if (wr_clr_gnt) begin + w_state_d = B_FORWARD; + end else begin + w_state_d = W_WAIT_ART_CLR; + end + end + end + + W_BYPASS: begin + mst_w_valid_o = slv_w_valid_i; + slv_w_ready_o = mst_w_ready_i; + if (slv_w_valid_i && slv_w_ready_o && slv_w_last_i) begin + w_state_d = B_FORWARD; + end + end + + W_WAIT_ART_CLR: begin + wr_clr_addr = w_addr_q; + wr_clr_req = 1'b1; + if (wr_clr_gnt) begin + w_state_d = B_FORWARD; + end + end + + W_DROP: begin + slv_w_ready_o = 1'b1; + if (slv_w_valid_i && slv_w_last_i) begin + w_state_d = B_INJECT; + end + end + + B_FORWARD: begin + mst_b_ready_o = slv_b_ready_i; + slv_b_valid_o = mst_b_valid_i; + slv_b_resp_o[1] = mst_b_resp_i[1]; + slv_b_resp_o[0] = (mst_b_resp_i[1] == 1'b0) ? b_excl_q : mst_b_resp_i[0]; + slv_b_user_o = mst_b_user_i; + slv_b_id_o = mst_b_id_i; + if (slv_b_valid_o && slv_b_ready_i) begin + b_excl_d = 1'b0; + w_state_d = AW_IDLE; + end + end + + B_INJECT: begin + slv_b_id_o = w_id_q; + slv_b_resp_o = 2'b00; + slv_b_valid_o = 1'b1; + if (slv_b_ready_i) begin + w_state_d = AW_IDLE; + end + end + + default: begin + w_state_d = AW_IDLE; + end + endcase + end + + // AXI Reservation Table + axi_res_tbl #( + .AXI_ADDR_WIDTH (AXI_ADDR_WIDTH), + .AXI_ID_WIDTH (AXI_ID_WIDTH) + ) i_art ( + .clk_i (clk_i), + .rst_ni (rst_ni), + .clr_addr_i (art_clr_addr), + .clr_req_i (art_clr_req), + .clr_gnt_o (art_clr_gnt), + .set_addr_i (art_set_addr), + .set_id_i (art_set_id), + .set_req_i (art_set_req), + .set_gnt_o (art_set_gnt), + .check_addr_i (art_check_addr), + .check_id_i (art_check_id), + .check_res_o (art_check_res), + .check_req_i (art_check_req), + .check_gnt_o (art_check_gnt) + ); + + // ART Clear Arbiter + stream_arbiter #( + .DATA_T (logic[AXI_ADDR_WIDTH-1:0]), + .N_INP (2) + ) i_non_excl_acc_arb ( + .clk_i (clk_i), + .rst_ni (rst_ni), + .inp_data_i ({rd_clr_addr, wr_clr_addr}), + .inp_valid_i ({rd_clr_req, wr_clr_req}), + .inp_ready_o ({rd_clr_gnt, wr_clr_gnt}), + .oup_data_o (art_clr_addr), + .oup_valid_o (art_clr_req), + .oup_ready_i (art_clr_gnt) + ); + + // Registers + always_ff @(posedge clk_i, negedge rst_ni) begin + if (~rst_ni) begin + b_excl_q <= 1'b0; + r_excl_q <= 1'b0; + r_state_q <= R_IDLE; + w_addr_q <= '0; + w_id_q <= '0; + w_state_q <= AW_IDLE; + end else begin + b_excl_q <= b_excl_d; + r_excl_q <= r_excl_d; + r_state_q <= r_state_d; + w_addr_q <= w_addr_d; + w_id_q <= w_id_d; + w_state_q <= w_state_d; + end + end + + // Validate parameters. +// pragma translate_off +`ifndef VERILATOR + initial begin: validate_params + assert (ADDR_END > ADDR_BEGIN) + else $fatal(1, "ADDR_END must be greater than ADDR_BEGIN!"); + assert (AXI_ADDR_WIDTH > 0) + else $fatal(1, "AXI_ADDR_WIDTH must be greater than 0!"); + assert (AXI_DATA_WIDTH > 0) + else $fatal(1, "AXI_DATA_WIDTH must be greater than 0!"); + assert (AXI_ID_WIDTH > 0) + else $fatal(1, "AXI_ID_WIDTH must be greater than 0!"); + end +`endif +// pragma translate_on + +endmodule diff --git a/vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_lrsc_wrap.sv b/vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_lrsc_wrap.sv new file mode 100644 index 00000000000..3eb409bf35f --- /dev/null +++ b/vendor/pulp-platform/axi_riscv_atomics/src/axi_riscv_lrsc_wrap.sv @@ -0,0 +1,148 @@ +// Copyright (c) 2018 ETH Zurich, University of Bologna +// +// Copyright and related rights are licensed under the Solderpad Hardware +// License, Version 0.51 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +// or agreed to in writing, software, hardware and materials distributed under +// this 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. + +// Wrapper for the AXI RISC-V LR/SC Adapter that exposes AXI SystemVerilog interfaces. +// +// See the header of `axi_riscv_lrsc` for a description. +// +// Maintainer: Andreas Kurth + +module axi_riscv_lrsc_wrap #( + /// Exclusively-accessible address range (closed interval from ADDR_BEGIN to ADDR_END) + parameter longint unsigned ADDR_BEGIN = 0, + parameter longint unsigned ADDR_END = 0, + /// AXI Parameters + parameter int unsigned AXI_ADDR_WIDTH = 0, + parameter int unsigned AXI_DATA_WIDTH = 0, + parameter int unsigned AXI_ID_WIDTH = 0, + parameter int unsigned AXI_USER_WIDTH = 0, + /// Derived Parameters (do NOT change manually!) + localparam int unsigned AXI_STRB_WIDTH = AXI_DATA_WIDTH / 8 +) ( + input logic clk_i, + input logic rst_ni, + AXI_BUS.Master mst, + AXI_BUS.Slave slv +); + + axi_riscv_lrsc #( + .ADDR_BEGIN (ADDR_BEGIN), + .ADDR_END (ADDR_END), + .AXI_ADDR_WIDTH (AXI_ADDR_WIDTH), + .AXI_DATA_WIDTH (AXI_DATA_WIDTH), + .AXI_ID_WIDTH (AXI_ID_WIDTH), + .AXI_USER_WIDTH (AXI_USER_WIDTH) + ) i_lrsc ( + .clk_i ( clk_i ), + .rst_ni ( rst_ni ), + .slv_aw_addr_i ( slv.aw_addr ), + .slv_aw_prot_i ( slv.aw_prot ), + .slv_aw_region_i ( slv.aw_region ), + .slv_aw_atop_i ( slv.aw_atop ), + .slv_aw_len_i ( slv.aw_len ), + .slv_aw_size_i ( slv.aw_size ), + .slv_aw_burst_i ( slv.aw_burst ), + .slv_aw_lock_i ( slv.aw_lock ), + .slv_aw_cache_i ( slv.aw_cache ), + .slv_aw_qos_i ( slv.aw_qos ), + .slv_aw_id_i ( slv.aw_id ), + .slv_aw_user_i ( slv.aw_user ), + .slv_aw_ready_o ( slv.aw_ready ), + .slv_aw_valid_i ( slv.aw_valid ), + .slv_ar_addr_i ( slv.ar_addr ), + .slv_ar_prot_i ( slv.ar_prot ), + .slv_ar_region_i ( slv.ar_region ), + .slv_ar_len_i ( slv.ar_len ), + .slv_ar_size_i ( slv.ar_size ), + .slv_ar_burst_i ( slv.ar_burst ), + .slv_ar_lock_i ( slv.ar_lock ), + .slv_ar_cache_i ( slv.ar_cache ), + .slv_ar_qos_i ( slv.ar_qos ), + .slv_ar_id_i ( slv.ar_id ), + .slv_ar_user_i ( slv.ar_user ), + .slv_ar_ready_o ( slv.ar_ready ), + .slv_ar_valid_i ( slv.ar_valid ), + .slv_w_data_i ( slv.w_data ), + .slv_w_strb_i ( slv.w_strb ), + .slv_w_user_i ( slv.w_user ), + .slv_w_last_i ( slv.w_last ), + .slv_w_ready_o ( slv.w_ready ), + .slv_w_valid_i ( slv.w_valid ), + .slv_r_data_o ( slv.r_data ), + .slv_r_resp_o ( slv.r_resp ), + .slv_r_last_o ( slv.r_last ), + .slv_r_id_o ( slv.r_id ), + .slv_r_user_o ( slv.r_user ), + .slv_r_ready_i ( slv.r_ready ), + .slv_r_valid_o ( slv.r_valid ), + .slv_b_resp_o ( slv.b_resp ), + .slv_b_id_o ( slv.b_id ), + .slv_b_user_o ( slv.b_user ), + .slv_b_ready_i ( slv.b_ready ), + .slv_b_valid_o ( slv.b_valid ), + .mst_aw_addr_o ( mst.aw_addr ), + .mst_aw_prot_o ( mst.aw_prot ), + .mst_aw_region_o ( mst.aw_region ), + .mst_aw_atop_o ( mst.aw_atop ), + .mst_aw_len_o ( mst.aw_len ), + .mst_aw_size_o ( mst.aw_size ), + .mst_aw_burst_o ( mst.aw_burst ), + .mst_aw_lock_o ( mst.aw_lock ), + .mst_aw_cache_o ( mst.aw_cache ), + .mst_aw_qos_o ( mst.aw_qos ), + .mst_aw_id_o ( mst.aw_id ), + .mst_aw_user_o ( mst.aw_user ), + .mst_aw_ready_i ( mst.aw_ready ), + .mst_aw_valid_o ( mst.aw_valid ), + .mst_ar_addr_o ( mst.ar_addr ), + .mst_ar_prot_o ( mst.ar_prot ), + .mst_ar_region_o ( mst.ar_region ), + .mst_ar_len_o ( mst.ar_len ), + .mst_ar_size_o ( mst.ar_size ), + .mst_ar_burst_o ( mst.ar_burst ), + .mst_ar_lock_o ( mst.ar_lock ), + .mst_ar_cache_o ( mst.ar_cache ), + .mst_ar_qos_o ( mst.ar_qos ), + .mst_ar_id_o ( mst.ar_id ), + .mst_ar_user_o ( mst.ar_user ), + .mst_ar_ready_i ( mst.ar_ready ), + .mst_ar_valid_o ( mst.ar_valid ), + .mst_w_data_o ( mst.w_data ), + .mst_w_strb_o ( mst.w_strb ), + .mst_w_user_o ( mst.w_user ), + .mst_w_last_o ( mst.w_last ), + .mst_w_ready_i ( mst.w_ready ), + .mst_w_valid_o ( mst.w_valid ), + .mst_r_data_i ( mst.r_data ), + .mst_r_resp_i ( mst.r_resp ), + .mst_r_last_i ( mst.r_last ), + .mst_r_id_i ( mst.r_id ), + .mst_r_user_i ( mst.r_user ), + .mst_r_ready_o ( mst.r_ready ), + .mst_r_valid_i ( mst.r_valid ), + .mst_b_resp_i ( mst.b_resp ), + .mst_b_id_i ( mst.b_id ), + .mst_b_user_i ( mst.b_user ), + .mst_b_ready_o ( mst.b_ready ), + .mst_b_valid_i ( mst.b_valid ) + ); + + // Validate parameters. +// pragma translate_off +`ifndef VERILATOR + initial begin: validate_params + assert (AXI_STRB_WIDTH == AXI_DATA_WIDTH/8) + else $fatal(1, "AXI_STRB_WIDTH must equal AXI_DATA_WIDTH/8!"); + end +`endif +// pragma translate_on + +endmodule diff --git a/vendor/pulp-platform/common_cells/CHANGELOG.md b/vendor/pulp-platform/common_cells/CHANGELOG.md index 8513988e400..c4fcb52c708 100644 --- a/vendor/pulp-platform/common_cells/CHANGELOG.md +++ b/vendor/pulp-platform/common_cells/CHANGELOG.md @@ -71,8 +71,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - `addr_decode`: Use `cf_math_pkg::idx_width` for computing the index width, inline documentation. - `lzc`: Use `cf_math_pkg::idx_width` for computing the index width, inline documentation. - `Bender`: Change levels of modules affected by depending on `cf_math_pkg::idx_width()`. -- `stream_xbar`: Fully connected stream bassed interconnect with variable number of inputs and outputs. -- `stream_xbar`: Fully connected stream-bassed interconnect with a variable number of inputs and outputs. +- `stream_xbar`: Fully connected stream based interconnect with variable number of inputs and outputs. +- `stream_xbar`: Fully connected stream-based interconnect with a variable number of inputs and outputs. - `stream_omega_net`: Stream-based network implementing an omega topology. Variable number of inputs, outputs and radix. Topology is isomorphic to a butterfly network. @@ -128,8 +128,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## 1.14.0 - 2019-10-08 ### Added -- Added spubstitution-permutation hash function module -- Added couning-bloom-filter module +- Added substitution-permutation hash function module +- Added counting-bloom-filter module - `spill_register`: Added Bypass parameter - `counter`: Added sticky overflow - Added counter with variable delta diff --git a/vendor/pulp-platform/fpga-support/README.md b/vendor/pulp-platform/fpga-support/README.md index da5f9c5edcb..58c5da229a0 100644 --- a/vendor/pulp-platform/fpga-support/README.md +++ b/vendor/pulp-platform/fpga-support/README.md @@ -15,7 +15,7 @@ behavioral and post-synthesis simulations, set the `CF_MATH_PKG_PATH` environmen path where you have that package installed. Add all files in the `rtl/` folder to the list of compilation files of your development tool (e.g., -Xilinx Vivado). Read the documentation (header of the source file) of the block that you want to +Xilinx Vivado 2018.2). Read the documentation (header of the source file) of the block that you want to use and use the block as described there. ## Contributing diff --git a/vendor/pulp-platform_axi_riscv_atomics.lock.hjson b/vendor/pulp-platform_axi_riscv_atomics.lock.hjson new file mode 100644 index 00000000000..e27d8bc51d3 --- /dev/null +++ b/vendor/pulp-platform_axi_riscv_atomics.lock.hjson @@ -0,0 +1,14 @@ +// Copyright lowRISC contributors. +// Licensed under the Apache License, Version 2.0, see LICENSE for details. +// SPDX-License-Identifier: Apache-2.0 + +// This file is generated by the util/vendor script. Please do not modify it +// manually. + +{ + upstream: + { + url: https://github.com/pulp-platform/axi_riscv_atomics.git + rev: 550881f12e22dfae405612fc1df6368f4c003e68 + } +} diff --git a/vendor/pulp-platform_axi_riscv_atomics.vendor.hjson b/vendor/pulp-platform_axi_riscv_atomics.vendor.hjson new file mode 100644 index 00000000000..b2c022cc8d4 --- /dev/null +++ b/vendor/pulp-platform_axi_riscv_atomics.vendor.hjson @@ -0,0 +1,31 @@ +// -*- coding: utf-8 -*- +// Copyright (C) 2025 Thales DIS France SAS +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0. +// Original Author: Zbigniew Chamski (zbigniew.chamski@thalesgroup.com) + +{ + // Name of the project + name: "pulp_axi_riscv_atomics", + + // Target directory: relative to the location of this script. + target_dir: "pulp-platform/axi_riscv_atomics", + + // Upstream repository + upstream: { + // URL + url: "https://github.com/pulp-platform/axi_riscv_atomics.git", + // revision + rev: "550881f12e22dfae405612fc1df6368f4c003e68", + } + + // Patch dir for local changes + patch_dir: "patches/pulp-platform/axi_riscv_atomics", + + // Exclusions from upstream content + exclude_from_upstream: [ + ".editorconfig", + ".git", + "Bender.yml", + "test", + ] +} diff --git a/verif/bsp/README.md b/verif/bsp/README.md index 8e6d5d44c6b..531cfdb6a43 100644 --- a/verif/bsp/README.md +++ b/verif/bsp/README.md @@ -101,7 +101,7 @@ The following exception handlers may be called from `u_sw_irq_handler`: entered" * `unknown_handler` - called when there is no handler for the interrupt/ exception. This is the only case where `mepc` is not incremented, because we - do not know the appropiate action to take. + do not know the appropriate action to take. Returning from the `u_sw_irq_handler`. All handlers called by `u_sw_irq_handler` increment `mepc` before calling `mret`, except for `unknown_handler`. Handlers diff --git a/verif/core-v-verif b/verif/core-v-verif index 60e57248c48..b3149ab0da3 160000 --- a/verif/core-v-verif +++ b/verif/core-v-verif @@ -1 +1 @@ -Subproject commit 60e57248c48b0f8f90cf52af20aecc5c16e9d6d8 +Subproject commit b3149ab0da3ac8bf2179e24595a4b7a860b668ff diff --git a/verif/docs/VerifPlans/FENCEI/VP_IP002.yml b/verif/docs/VerifPlans/FENCEI/VP_IP002.yml index 5d438577531..5802629bd77 100644 --- a/verif/docs/VerifPlans/FENCEI/VP_IP002.yml +++ b/verif/docs/VerifPlans/FENCEI/VP_IP002.yml @@ -196,8 +196,8 @@ subfeatures: !!omap cores: 56 coverage_loc: '' comments: '' -- 007_AckWithold: !Subfeature - name: 007_AckWithold +- 007_AckWithhold: !Subfeature + name: 007_AckWithhold tag: VP_FENCEI_F002_S007 next_elt_id: 1 display_order: 7 @@ -212,7 +212,7 @@ subfeatures: !!omap ref_page: '' ref_section: '' ref_viewer: firefox - verif_goals: Upon a req, try witholding ack for a long time and see that the + verif_goals: Upon a req, try withholding ack for a long time and see that the fence.i can be stalled arbitrarily long (should have covers for ack delays of at least {[0:5]}). pfc: 4 diff --git a/verif/docs/VerifPlans/ISA_RV32/VP_IP000.yml b/verif/docs/VerifPlans/ISA_RV32/VP_IP000.yml index ce490437ac2..d5eface3419 100644 --- a/verif/docs/VerifPlans/ISA_RV32/VP_IP000.yml +++ b/verif/docs/VerifPlans/ISA_RV32/VP_IP000.yml @@ -396,7 +396,7 @@ subfeatures: !!omap - '000': !VerifItem name: '000' tag: VP_ISA_RV32_F000_S006_I000 - description: "slli rd, rs, imm[4:0]\nrd = rs << imm[4:0]\nZeros are shirfted\ + description: "slli rd, rs, imm[4:0]\nrd = rs << imm[4:0]\nZeros are shifted\ \ into lower bits" reqt_doc: ./RISCV_Instructions.rst ref_mode: '' @@ -415,7 +415,7 @@ subfeatures: !!omap - '001': !VerifItem name: '001' tag: VP_ISA_RV32_F000_S006_I001 - description: "slli rd, rs, imm[4:0]\nrd = rs << imm[4:0]\nZeros are shirfted\ + description: "slli rd, rs, imm[4:0]\nrd = rs << imm[4:0]\nZeros are shifted\ \ into lower bits" reqt_doc: ./RISCV_Instructions.rst ref_mode: '' @@ -435,7 +435,7 @@ subfeatures: !!omap - '002': !VerifItem name: '002' tag: VP_ISA_RV32_F000_S006_I002 - description: "slli rd, rs, imm[4:0]\nrd = rs << imm[4:0]\nZeros are shirfted\ + description: "slli rd, rs, imm[4:0]\nrd = rs << imm[4:0]\nZeros are shifted\ \ into lower bits" reqt_doc: ./RISCV_Instructions.rst ref_mode: '' @@ -459,7 +459,7 @@ subfeatures: !!omap - '000': !VerifItem name: '000' tag: VP_ISA_RV32_F000_S007_I000 - description: "srli rd, rs, imm[4:0]\nrd = rs >> imm[4:0]\nZeros are shirfted\ + description: "srli rd, rs, imm[4:0]\nrd = rs >> imm[4:0]\nZeros are shifted\ \ into upper bits" reqt_doc: ./RISCV_Instructions.rst ref_mode: '' @@ -478,7 +478,7 @@ subfeatures: !!omap - '001': !VerifItem name: '001' tag: VP_ISA_RV32_F000_S007_I001 - description: "srli rd, rs, imm[4:0]\nrd = rs >> imm[4:0]\nZeros are shirfted\ + description: "srli rd, rs, imm[4:0]\nrd = rs >> imm[4:0]\nZeros are shifted\ \ into upper bits" reqt_doc: ./RISCV_Instructions.rst ref_mode: '' @@ -498,7 +498,7 @@ subfeatures: !!omap - '002': !VerifItem name: '002' tag: VP_ISA_RV32_F000_S007_I002 - description: "srli rd, rs, imm[4:0]\nrd = rs >> imm[4:0]\nZeros are shirfted\ + description: "srli rd, rs, imm[4:0]\nrd = rs >> imm[4:0]\nZeros are shifted\ \ into upper bits" reqt_doc: ./RISCV_Instructions.rst ref_mode: '' @@ -561,7 +561,7 @@ subfeatures: !!omap - '002': !VerifItem name: '002' tag: VP_ISA_RV32_F000_S008_I002 - description: "srli rd, rs, imm[4:0]\nrd = rs >> imm[4:0]\nZeros are shirfted\ + description: "srli rd, rs, imm[4:0]\nrd = rs >> imm[4:0]\nZeros are shifted\ \ into upper bits" reqt_doc: ./RISCV_Instructions.rst ref_mode: '' diff --git a/verif/docs/VerifPlans/ISA_RV32/VP_IP001.yml b/verif/docs/VerifPlans/ISA_RV32/VP_IP001.yml index 67a3f707d0f..af07cfabe30 100644 --- a/verif/docs/VerifPlans/ISA_RV32/VP_IP001.yml +++ b/verif/docs/VerifPlans/ISA_RV32/VP_IP001.yml @@ -472,7 +472,7 @@ subfeatures: !!omap - '000': !VerifItem name: '000' tag: VP_ISA_RV32_F001_S007_I000 - description: "sll rd, rs1, rs2\nrd = rs1 << rs2[4:0]\nZeros are shirfted into\ + description: "sll rd, rs1, rs2\nrd = rs1 << rs2[4:0]\nZeros are shifted into\ \ lower bits" reqt_doc: ./RISCV_Instructions.rst ref_mode: '' @@ -493,7 +493,7 @@ subfeatures: !!omap - '001': !VerifItem name: '001' tag: VP_ISA_RV32_F001_S007_I001 - description: "sll rd, rs1, rs2\nrd = rs1 << rs2[4:0]\nZeros are shirfted into\ + description: "sll rd, rs1, rs2\nrd = rs1 << rs2[4:0]\nZeros are shifted into\ \ lower bits" reqt_doc: ./RISCV_Instructions.rst ref_mode: '' @@ -513,7 +513,7 @@ subfeatures: !!omap - '002': !VerifItem name: '002' tag: VP_ISA_RV32_F001_S007_I002 - description: "sll rd, rs1, rs2\nrd = rs1 << rs2[4:0]\nZeros are shirfted into\ + description: "sll rd, rs1, rs2\nrd = rs1 << rs2[4:0]\nZeros are shifted into\ \ lower bits" reqt_doc: ./RISCV_Instructions.rst ref_mode: '' @@ -538,7 +538,7 @@ subfeatures: !!omap - '000': !VerifItem name: '000' tag: VP_ISA_RV32_F001_S008_I000 - description: "srl rd, rs1, rs2\nrd = rs1 >> rs2[4:0]\nZeros are shirfted into\ + description: "srl rd, rs1, rs2\nrd = rs1 >> rs2[4:0]\nZeros are shifted into\ \ upper bits" reqt_doc: ./RISCV_Instructions.rst ref_mode: page @@ -559,7 +559,7 @@ subfeatures: !!omap - '001': !VerifItem name: '001' tag: VP_ISA_RV32_F001_S008_I001 - description: "srl rd, rs1, rs2\nrd = rs1 >> rs2[4:0]\nZeros are shirfted into\ + description: "srl rd, rs1, rs2\nrd = rs1 >> rs2[4:0]\nZeros are shifted into\ \ upper bits" reqt_doc: ./RISCV_Instructions.rst ref_mode: '' @@ -579,7 +579,7 @@ subfeatures: !!omap - '002': !VerifItem name: '002' tag: VP_ISA_RV32_F001_S008_I002 - description: "srl rd, rs1, rs2\nrd = rs1 >> rs2[4:0]\nZeros are shirfted into\ + description: "srl rd, rs1, rs2\nrd = rs1 >> rs2[4:0]\nZeros are shifted into\ \ upper bits" reqt_doc: ./RISCV_Instructions.rst ref_mode: '' @@ -644,7 +644,7 @@ subfeatures: !!omap - '002': !VerifItem name: '002' tag: VP_ISA_RV32_F001_S009_I002 - description: "sra rd, rs1, rs2\nrd = rs1 >> rs2[4:0]\nZeros are shirfted into\ + description: "sra rd, rs1, rs2\nrd = rs1 >> rs2[4:0]\nZeros are shifted into\ \ upper bits" reqt_doc: ./RISCV_Instructions.rst ref_mode: '' diff --git a/verif/docs/VerifPlans/ISA_RV32/VP_IP008.yml b/verif/docs/VerifPlans/ISA_RV32/VP_IP008.yml index 11e6f403bad..afea799c7fe 100644 --- a/verif/docs/VerifPlans/ISA_RV32/VP_IP008.yml +++ b/verif/docs/VerifPlans/ISA_RV32/VP_IP008.yml @@ -74,7 +74,7 @@ subfeatures: !!omap ref_section: '' ref_viewer: firefox verif_goals: "Exception:\n\nMisaligned address (non-32-bit aligned) will always\ - \ cause exceptio" + \ cause exception" pfc: 3 test_type: 3 cov_method: 1 diff --git a/verif/docs/VerifPlans/MMU_SV32/VP_IP000.yml b/verif/docs/VerifPlans/MMU_SV32/VP_IP000.yml index 7149784d8c4..639663a2bbb 100644 --- a/verif/docs/VerifPlans/MMU_SV32/VP_IP000.yml +++ b/verif/docs/VerifPlans/MMU_SV32/VP_IP000.yml @@ -20,7 +20,7 @@ subfeatures: !!omap \ and non-reserved RWX permissions then test the following in supervisor\ \ and user privilege mode for level1 and level0 PTE.\n\n- Remove read PMP\ \ permission of translated Physical Address in pmpcfg and test the read\ - \ acces.\n- Remvoe write PMP permission of translated Physical Address in\ + \ access.\n- Remove write PMP permission of translated Physical Address in\ \ pmpcfg and test the write access.\n- Remove execute PMP permission of\ \ translated Physical Address in pmpcfg and test the execute access." reqt_doc: 'ISA Volume II: Privilege Architecture Version 20211203, Chapter @@ -54,7 +54,7 @@ subfeatures: !!omap \ it would raise access fault exception of the corresponding access type.\ \ \nWhen satp.mode=sv32, then test the following in supervisor and user\ \ privilege mode for level0 and level1 PTE.\n- Remove read PMP permission\ - \ of PTE address in pmpcfg and test the read acces.\n- Remvoe write PMP\ + \ of PTE address in pmpcfg and test the read access.\n- Remove write PMP\ \ permission of PTE address in pmpcfg and test the write access.\n- Remove\ \ execute PMP permission of PTE address in pmpcfg and test the execute access." reqt_doc: 'ISA Volume II: Privilege Architecture Version 20211203, Chapter @@ -88,12 +88,12 @@ subfeatures: !!omap \ it would raise page fault exception of the corresponding access type.\ \ \nWhen satp.mode=sv32 and PTE has (r,w,x) PMP permissions, then test the\ \ following in supervisor and user privilege mode for level0 and level1\ - \ PTE.\n- Set PTE.V = 0 and test the read acces.\n- Set PTE.V = 0 and test\ + \ PTE.\n- Set PTE.V = 0 and test the read access.\n- Set PTE.V = 0 and test\ \ the write access.\n- Set PTE.V = 0 and test the execute access.\n\n* For\ - \ testing at level0, set all the pte perimssions at level1 to 0 except pte.v,\ + \ testing at level0, set all the pte permissions at level1 to 0 except pte.v,\ \ so that level1 points to level0.\n* Set pte.U=0 when test in Supervisor\ \ mode and Set pte.U=1 when testing in user mode" - reqt_doc: 'ISA Volume II: Privilege Architecture Version 20211203, Chpter + reqt_doc: 'ISA Volume II: Privilege Architecture Version 20211203, Chapter 5.3.2' ref_mode: '' ref_page: '' @@ -124,10 +124,10 @@ subfeatures: !!omap \ accessing it would raise page fault exception of the corresponding access\ \ type. \nWhen satp.mode=sv32, PTE has (r,w,x) PMP permissions, and pte.v=1,\ \ then test the following in supervisor and user privilege mode for level0\ - \ and level1 PTE.\n- Set pte.w=1 & pte.r=0 and test the read acces.\n- Set\ + \ and level1 PTE.\n- Set pte.w=1 & pte.r=0 and test the read access.\n- Set\ \ pte.w=1 & pte.r=0 and test the write access.\n- Set pte.w=1 & pte.r=0\ \ and test the execute access.\n\n* For testing at level0, set all the pte\ - \ perimssions at level1 to 0 except pte.v, so that level1 points to level0.\n\ + \ permissions at level1 to 0 except pte.v, so that level1 points to level0.\n\ * Set pte.U=0 when test in Supervisor mode and Set pte.U=1 when testing\ \ in user mode" reqt_doc: 'ISA Volume II: Privilege Architecture Version 20211203, Chapter @@ -161,10 +161,10 @@ subfeatures: !!omap \ then accessing it would raise page fault exception of the corresponding\ \ access type. \nWhen satp.mode=sv32, PTE has (r,w,x) PMP permissions, and\ \ pte.v=1, then test the following in supervisor and user privilege mode\ - \ for level0 PTE.\n- Set pte.x=0 & pte.r=0 & pte.w=0 and test the read acces.\n\ + \ for level0 PTE.\n- Set pte.x=0 & pte.r=0 & pte.w=0 and test the read access.\n\ - Set pte.x=0 & pte.r=0 & pte.w=0 and test the write access.\n- Set pte.x=0\ \ & pte.r=0 & pte.w=0 and test the execute access.\n\n* For testing at level0,\ - \ set all the pte perimssions at level1 to 0 except pte.v, so that level1\ + \ set all the pte permissions at level1 to 0 except pte.v, so that level1\ \ points to level0.\n* Set pte.U=0 when test in Supervisor mode and Set\ \ pte.U=1 when testing in user mode" reqt_doc: 'ISA Volume II: Privilege Architecture Version 20211203, Chapter @@ -203,7 +203,7 @@ subfeatures: !!omap \ privilege mode for level 0 and level 1 PTE.\n- Test the read access for\ \ both pte.r=1 and for pte.r=0\n- Test the write access for both pte.w=1\ \ and for pte.w=0\n- Test the execute access for both pte.x=1 and for pte.x=0\n\ - \n* For testing at level0, set all the pte perimssions at level1 to 0 except\ + \n* For testing at level0, set all the pte permissions at level1 to 0 except\ \ pte.v, so that level1 points to level0." reqt_doc: 'ISA Volume II: Privilege Architecture Version 20211203, Chapter 5.3.1' @@ -240,9 +240,9 @@ subfeatures: !!omap \ page fault exception of the corresponding access type. \nWhen satp.mode=sv32,\ \ PTE has (r,w,x) PMP permissions, PTE has non-reserved RWX encoding, and\ \ pte.v=1, then test the following user privilege mode for level0 and level1\ - \ PTE.\n- Set pte.u=0 and test the read acces.\n- Set pte.u=0 and test the\ + \ PTE.\n- Set pte.u=0 and test the read access.\n- Set pte.u=0 and test the\ \ write access.\n- Set pte.u=0 and test the execute access.\n\n* For testing\ - \ at level0, set all the pte perimssions at level1 to 0 except pte.v, so\ + \ at level0, set all the pte permissions at level1 to 0 except pte.v, so\ \ that level1 points to level0." reqt_doc: 'ISA Volume II: Privilege Architecture Version 20211203, Chapter 5.3.2' @@ -276,9 +276,9 @@ subfeatures: !!omap \ \nWhen satp.mode=sv32, PTE has (r,w,x) PMP permissions, PTE has non-reserved\ \ RWX encoding, and pte.v=1, then test the following in supervisor mode\ \ for level 0 and level 1 PTE.\n- Set pte.u=1 & s/mstatus.SUM = 0 and test\ - \ the read acces.\n- Set pte.u=1 & s/mstatus.SUM = 0 and test the write\ + \ the read access.\n- Set pte.u=1 & s/mstatus.SUM = 0 and test the write\ \ access.\n- Set pte.u=1 & s/mstatus.SUM = 0 and test the execute access.\n\ - \n* For testing at level0, set all the pte perimssions at level1 to 0 except\ + \n* For testing at level0, set all the pte permissions at level1 to 0 except\ \ pte.v, so that level1 points to level0." reqt_doc: 'ISA Volume II: Privilege Architecture Version 20211203, Chapter 3.1.6.3, 5.3.2' @@ -313,10 +313,10 @@ subfeatures: !!omap \ fault exception in s-mode.\nWhen satp.mode=sv32, PTE has (r,w,x) PMP permissions,\ \ PTE has non-reserved RWX encoding, and pte.v=1, then test the following\ \ in supervisor mode for level0 and level1 PTE.\n- Set pte.r=1 & pte.u=1\ - \ & s/mstatus.SUM = 1 and test the read acces.\n- Set pte.w=1 & pte.u=1\ + \ & s/mstatus.SUM = 1 and test the read access.\n- Set pte.w=1 & pte.u=1\ \ & s/mstatus.SUM = 1 and test the write access.\n- Set pte.x=1 & pte.u=1\ \ & s/mstatus.SUM = 1 and test the execute access.\n\n* For testing at level0,\ - \ set all the pte perimssions at level1 to 0 except pte.v, so that level1\ + \ set all the pte permissions at level1 to 0 except pte.v, so that level1\ \ points to level0." reqt_doc: 'ISA Volume II: Privilege Architecture Version 20211203, Chapter 3.1.6.3, 5.3.2' @@ -326,7 +326,7 @@ subfeatures: !!omap ref_viewer: '' verif_goals: "Read and Write access to the PTE should be successful. So, check\ \ that the load and store works without page fault and expected data is\ - \ stored to and loaded from the memory, repectively.\n\nExecute access should\ + \ stored to and loaded from the memory, respectively.\n\nExecute access should\ \ raise instruction page fault. Check that:\n- m/scause must contain the\ \ exception number of instruction instruction access fault. \n- m/sepc must\ \ contain the virtual address of the instruction at which the trap occurs." @@ -354,7 +354,7 @@ subfeatures: !!omap \ and level1 PTE.\n- Test the read access for both pte.r=1 and for pte.r=0\n\ - Test the write access for both pte.w=1 and for pte.w=0\n- Test the execute\ \ access for both pte.x=1 and for pte.x=0\n\n* For testing at level0, set\ - \ all the pte perimssions at level1 to 0 except pte.v, so that level1 points\ + \ all the pte permissions at level1 to 0 except pte.v, so that level1 points\ \ to level0." reqt_doc: 'ISA Volume II: Privilege Architecture Version 20211203, Chapter 5.3.2' @@ -390,7 +390,7 @@ subfeatures: !!omap When satp.mode=sv32, PTE has (r,w,x) PMP permissions, and pte.v=1, then\ \ test the following in supervisor and user privilege mode for level0 and\ \ level1 PTE.\n- Set pte.r=0 & pte.w=0 & pte.x=1 & s/mstatus.MXR=0 and test\ - \ the read acces.\n\n* For testing at level0, set all the pte perimssions\ + \ the read access.\n\n* For testing at level0, set all the pte permissions\ \ at level1 to 0 except pte.v, so that level1 points to level0.\n* Set pte.U=0\ \ when test in Supervisor mode and Set pte.U=1 when testing in user mode" reqt_doc: 'ISA Volume II: Privilege Architecture Version 20211203, Chapter @@ -423,7 +423,7 @@ subfeatures: !!omap \ read permission (pte.r=0).\nWhen satp.mode=sv32, PTE has (r,w,x) PMP permissions,\ \ and pte.v=1, then test the following in supervisor and user privilege\ \ mode for level0 and level1 PTE.\n- Set pte.r=0 & pte.w=0 & pte.x=1 & s/mstatus.MXR=1\ - \ and test the read acces.\n\n* For testing at level0, set all the pte perimssions\ + \ and test the read access.\n\n* For testing at level0, set all the pte permissions\ \ at level1 to 0 except pte.v, so that level1 points to level0.\n* Set pte.U=0\ \ when test in Supervisor mode and Set pte.U=1 when testing in user mode" reqt_doc: 'ISA Volume II: Privilege Architecture Version 20211203, Chapter @@ -484,10 +484,10 @@ subfeatures: !!omap \ of the corresponding access type. \nWhen satp.mode=sv32, PTE has (r,w,x)\ \ PMP permissions, and pte.v=1, then test the following in supervisor and\ \ user privilege mode for level0 and level1 PTE. Execute sfence.vma before\ - \ accessign the PTE.\n- Set pte.r=1 & pte.a=0 and test the read acces. \n\ + \ accessing the PTE.\n- Set pte.r=1 & pte.a=0 and test the read access. \n\ - Set pte.w=1 & pte.a=0 and test the write access.\n- Set pte.x=1 & pte.a=0\ \ and test the execute access.\n\n* For testing at level0, set all the pte\ - \ perimssions at level1 to 0 except pte.v, so that level1 points to level0.\n\ + \ permissions at level1 to 0 except pte.v, so that level1 points to level0.\n\ * Set pte.U=0 when test in Supervisor mode and Set pte.U=1 when testing\ \ in user mode." reqt_doc: 'ISA Volume II: Privilege Architecture Version 20211203, Chapter @@ -522,8 +522,8 @@ subfeatures: !!omap \ Store/AMO page fault exception.\nWhen satp.mode=sv32, PTE has (r,w,x)\ \ PMP permissions, pte.a=1 and pte.v=1, then test the following in supervisor\ \ and user privilege mode for level0 and level1 PTE. Execute sfence.vma\ - \ before accessign the PTE.\n- Set pte.w=1 & pte.d=0 and test the write\ - \ access.\n\n* For testing at level0, set all the pte perimssions at level1\ + \ before accessing the PTE.\n- Set pte.w=1 & pte.d=0 and test the write\ + \ access.\n\n* For testing at level0, set all the pte permissions at level1\ \ to 0 except pte.v, so that level1 points to level0.\n* Set pte.U=0 when\ \ test in Supervisor mode and Set pte.U=1 when testing in user mode." reqt_doc: 'ISA Volume II: Privilege Architecture Version 20211203, Chapter diff --git a/verif/docs/VerifPlans/MMU_SV32/VP_IP002.yml b/verif/docs/VerifPlans/MMU_SV32/VP_IP002.yml index 6ae361a877d..437d8baa8a0 100644 --- a/verif/docs/VerifPlans/MMU_SV32/VP_IP002.yml +++ b/verif/docs/VerifPlans/MMU_SV32/VP_IP002.yml @@ -70,7 +70,7 @@ subfeatures: !!omap ref_page: '' ref_section: '' ref_viewer: '' - verif_goals: Show wirting {zero, non-zero} value to satp when mode=bare the + verif_goals: Show writing {zero, non-zero} value to satp when mode=bare the behaviour follows the design implemention pfc: 3 test_type: 0 diff --git a/verif/docs/VerifPlans/PMP/VP_IP000.yml b/verif/docs/VerifPlans/PMP/VP_IP000.yml new file mode 100644 index 00000000000..8e7da47c6a5 --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP000.yml @@ -0,0 +1,358 @@ +!Feature +next_elt_id: 15 +name: TRISTAN Restrictions +id: 0 +display_order: 0 +subfeatures: !!omap +- 000_general: !Subfeature + name: 000_general + tag: VP_PMP_F000_S000 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F000_S000_I000 + description: "\nthe verif plan is written for 32bits architecture only" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: '' + pfc: -1 + test_type: -1 + cov_method: -1 + cores: -1 + coverage_loc: '' + comments: '' +- 001_number of harts: !Subfeature + name: 001_number of harts + tag: VP_PMP_F000_S001 + next_elt_id: 2 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F000_S001_I000 + description: "\nthere is only 1 hart in cv32a6" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: '' + pfc: -1 + test_type: -1 + cov_method: -1 + cores: -1 + coverage_loc: '' + comments: '' +- 002_mxlen: !Subfeature + name: 002_mxlen + tag: VP_PMP_F000_S002 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F000_S002_I000 + description: "\nMXLEN is always 32bits" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: '' + pfc: -1 + test_type: -1 + cov_method: -1 + cores: -1 + coverage_loc: '' + comments: '' +- 003_xlen: !Subfeature + name: 003_xlen + tag: VP_PMP_F000_S003 + next_elt_id: 1 + display_order: 3 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F000_S003_I000 + description: "\nXLEN=MXLEN=32, so the PMP address registers are XLEN bits + long, so no zero-extension needed" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: '' + pfc: -1 + test_type: -1 + cov_method: -1 + cores: -1 + coverage_loc: '' + comments: '' +- 004_granularity: !Subfeature + name: 004_granularity + tag: VP_PMP_F000_S004 + next_elt_id: 1 + display_order: 4 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F000_S004_I000 + description: "\nPMP granularity is 8 bytes (G=1), but the verif plan is written + to take G=0 into account (NA4)" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: '' + pfc: -1 + test_type: -1 + cov_method: -1 + cores: -1 + coverage_loc: '' + comments: '' +- 005_number of pmp entries: !Subfeature + name: 005_number of pmp entries + tag: VP_PMP_F000_S005 + next_elt_id: 1 + display_order: 5 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F000_S005_I000 + description: "\nthere are 8 HW implemented PMP entries" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: '' + pfc: -1 + test_type: -1 + cov_method: -1 + cores: -1 + coverage_loc: '' + comments: '' +- 006_hardwired regions: !Subfeature + name: 006_hardwired regions + tag: VP_PMP_F000_S006 + next_elt_id: 1 + display_order: 6 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F000_S006_I000 + description: "\nnone of the 8 PMP entries is hardwired privileges" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: '' + pfc: -1 + test_type: -1 + cov_method: -1 + cores: -1 + coverage_loc: '' + comments: '' +- 007_virtual memory: !Subfeature + name: 007_virtual memory + tag: VP_PMP_F000_S007 + next_elt_id: 1 + display_order: 7 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F000_S007_I000 + description: "\nno virtual memory is implemented\nas a consequence no page-based + virtual memory is implemented" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: '' + pfc: -1 + test_type: -1 + cov_method: -1 + cores: -1 + coverage_loc: '' + comments: '' +- 008_physical memory regions: !Subfeature + name: 008_physical memory regions + tag: VP_PMP_F000_S008 + next_elt_id: 1 + display_order: 8 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F000_S008_I000 + description: "\nthe list of all physical memory regions\n - system memory + regions\n - I-$\n - D-$\n - I-scratchpad (preload mode)\n - I-scratchpad + (functional mode)\n - D-scratchpad\n - ahb_periph" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: '' + pfc: -1 + test_type: -1 + cov_method: -1 + cores: -1 + coverage_loc: '' + comments: '' +- 009_pmp entry disabling: !Subfeature + name: 009_pmp entry disabling + tag: VP_PMP_F000_S009 + next_elt_id: 1 + display_order: 9 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F000_S009_I000 + description: "\nwe assume an already written PMP entry (i) can be disabled\n\ + \ - if L=0, by clearing pmpcfg(i)\n - if L=1, only by hart reset" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: '' + pfc: -1 + test_type: -1 + cov_method: -1 + cores: -1 + coverage_loc: '' + comments: '' +- 010_access-faults (violations): !Subfeature + name: 010_access-faults (violations) + tag: VP_PMP_F000_S010 + next_elt_id: 1 + display_order: 10 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F000_S010_I000 + description: "\nThe testbench/testcases architecture ensures that:\n - any + time there is an access-fault type, we check it matches the related access-type\n + - all violations are trapped at the processor\n\n{Page 56 Volume II: RISC-V + Privileged Architectures V20211203}\nPMP violations are always trapped precisely + at the processor" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: '' + pfc: -1 + test_type: -1 + cov_method: -1 + cores: -1 + coverage_loc: '' + comments: '' +- 011_testcases modularity: !Subfeature + name: 011_testcases modularity + tag: VP_PMP_F000_S011 + next_elt_id: 1 + display_order: 11 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F000_S011_I000 + description: "\nThe verif plan is written assuming there is a way (like SystemVerilog + interaction):\n - to factorize the testcases in code blocks (in particular + configuration code block and access code block)\n - to randomize the code + blocks data and addresses\n - to randomize the sequence of code blocks" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: '' + pfc: -1 + test_type: -1 + cov_method: -1 + cores: -1 + coverage_loc: '' + comments: '' +- 012_access types: !Subfeature + name: 012_access types + tag: VP_PMP_F000_S012 + next_elt_id: 1 + display_order: 12 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F000_S012_I000 + description: "at the time of writing,\nthe verif plan makes no distinction + between load and load-reserved instructions. they are gathered in the same + access type, subtleties unknown\nthe verif plan makes no distinction between + store, store-conditional, and AMO instructions. they are gathered in the + same access type, subtleties unknown" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: '' + pfc: -1 + test_type: -1 + cov_method: -1 + cores: -1 + coverage_loc: '' + comments: '' +- 013_multiple accesses instructions: !Subfeature + name: 013_multiple accesses instructions + tag: VP_PMP_F000_S013 + next_elt_id: 1 + display_order: 13 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F000_S013_I000 + description: "\nwe assume there is no added value to test multiple accesses + instructions" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: '' + pfc: -1 + test_type: -1 + cov_method: -1 + cores: -1 + coverage_loc: '' + comments: '' +- 014_misaligned instructions: !Subfeature + name: 014_misaligned instructions + tag: VP_PMP_F000_S014 + next_elt_id: 1 + display_order: 14 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F000_S014_I000 + description: "\nwe assume that instructions are mandatorily aligned" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: '' + pfc: -1 + test_type: -1 + cov_method: -1 + cores: -1 + coverage_loc: '' + comments: '' +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP001.yml b/verif/docs/VerifPlans/PMP/VP_IP001.yml new file mode 100644 index 00000000000..f7c912bdf8f --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP001.yml @@ -0,0 +1,45 @@ +!Feature +next_elt_id: 1 +name: PMP granularity +id: 1 +display_order: 1 +subfeatures: !!omap +- 000_granularity_check: !Subfeature + name: 000_granularity_check + tag: VP_PMP_F001_S000 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F001_S000_I000 + description: "{Page 59 Volume II: RISC-V Privileged Architectures V20211203}\n + \nSoftware may determine the PMP granularity by writing zero to pmp0cfg, + then writing all ones to pmpaddr0, then reading back pmpaddr0.\nIf G is + the index of the least-significant bit set, the PMP granularity is 2G+2 bytes." + reqt_doc: '' + ref_mode: page + ref_page: '59' + ref_section: '' + ref_viewer: evince + verif_goals: determine the PMP granularity 2^(G+2) bytes by writing zero to + pmp(0)cfg, then writing all ones to pmpaddr(0), then reading back pmpaddr(0). + G is the index G of the least-significant bit set + pfc: 11 + test_type: 2 + cov_method: 0 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR07-b\nSoftware may determine the PMP granularity + by writing zero to pmp0cfg, then writing all ones to pmpaddr0, then reading + back pmpaddr0.\n If G is the index of the least-significant bit set, the + PMP granularity is 2G+2 bytes.\n\n\nTST01 (HIGH-PRIO) => FTR07-b\n[determine + the PMP granularity 2^(G+2) bytes by writing zero to pmp(0)cfg, then writing + all ones to pmpaddr(0), then reading back pmpaddr(0). G is the index G of + the least-significant bit set]" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP002.yml b/verif/docs/VerifPlans/PMP/VP_IP002.yml new file mode 100644 index 00000000000..82ecf96ce11 --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP002.yml @@ -0,0 +1,159 @@ +!Feature +next_elt_id: 4 +name: CSRs M-mode only +id: 2 +display_order: 2 +subfeatures: !!omap +- 000_configure_1_pmp_entry: !Subfeature + name: 000_configure_1_pmp_entry + tag: VP_PMP_F002_S001 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F002_S001_I000 + description: "{Section 3.7.1 Page 57 Volume II: RISC-V Privileged Architectures + V20211203}\n\nPMP CSRs are only accessible to M-mode" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "configure 1 PMP entry (i) (the 1st one),\n - check for each + PMP entry (i) reset value (read zero) by reading in M mode\n - check for + each PMP entry (i) that pmp(i)cfg and pmpaddr(i) are not writable/readable + in S or U modes\n - check for each PMP entry (i) that pmp(i)cfg and pmpaddr(i) + are writable/readable in M-mode only\n - check for each PMP entry (i) that + pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST02(group) => FTR02-d\n [check that all 8 HW implemented + PMP entries are writable/readable in M-mode (L=0)]\n [check that no HW + implemented PMP entry are writable/readable in S or U modes (L=0)]\n \ + \ - random values may be used\n - before any configuration (after hart + reset), check all pmp(i)cfg and pmpaddr(i) are M-mode read zero\n\nTST02-1 + (HIGH-PRIO)\n[configure 1 PMP entry ([FTR02-b1]: maybe mandatorily the first + one): with L=0,\n - if possible, the PMP entry number is a configurable + parameter\n - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) + are not writable/readable in S or U modes\n - check for PMP entry (i) where + L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only\n\ + \ - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are + not writable/readable in S or U modes]" +- 001_configure_2_pmp_entries: !Subfeature + name: 001_configure_2_pmp_entries + tag: VP_PMP_F002_S002 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F002_S002_I000 + description: "{Section 3.7.1 Page 57 Volume II: RISC-V Privileged Architectures + V20211203}\n\nPMP CSRs are only accessible to M-mode" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "configure 2 PMP entries (the 2 first ones in incrementing order),\n\ + \ - reuse of VP_PMP_F002_S001_I000 sequence" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST02(group) => FTR02-d\n [check that all 8 HW implemented + PMP entries are writable/readable in M-mode (L=0)]\n [check that no HW + implemented PMP entry are writable/readable in S or U modes (L=0)]\n \ + \ - random values may be used\n - before any configuration (after hart + reset), check all pmp(i)cfg and pmpaddr(i) are M-mode read zero\n\nTST02-2 + (LOW-PRIO) = 2 times reuse/call of TST02-1\n[configure 2 PMP entries ([FTR02-b1]: + maybe mandatorily the 2 first ones): both with L=0,\n - check for PMP entry + (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in + S or U modes\n - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) + are writable/readable in M-mode only\n - check for PMP entry (i) where + L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes]" +- 002_configure_N_pmp_entries: !Subfeature + name: 002_configure_N_pmp_entries + tag: VP_PMP_F002_S003 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F002_S003_I000 + description: "{Section 3.7.1 Page 57 Volume II: RISC-V Privileged Architectures + V20211203}\n\nPMP CSRs are only accessible to M-mode" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "configure N PMP entries (the N first ones in incrementing order),\n\ + \ - reuse of VP_PMP_F002_S001_I000 sequence" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST02(group) => FTR02-d\n [check that all 8 HW implemented + PMP entries are writable/readable in M-mode (L=0)]\n [check that no HW + implemented PMP entry are writable/readable in S or U modes (L=0)]\n \ + \ - random values may be used\n - before any configuration (after hart + reset), check all pmp(i)cfg and pmpaddr(i) are M-mode read zero\n\nTST02-3 + (LOW-PRIO) = N times reuse/call of TST02-1\n[configure N PMP entries ([FTR02-b1]: + maybe mandatorily the N first ones): all with L=0,\n - check for PMP entry + (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in + S or U modes\n - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) + are writable/readable in M-mode only\n - check for PMP entry (i) where + L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes]" +- 003_configure_8_pmp_entries: !Subfeature + name: 003_configure_8_pmp_entries + tag: VP_PMP_F002_S004 + next_elt_id: 1 + display_order: 3 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F002_S004_I000 + description: "{Section 3.7.1 Page 57 Volume II: RISC-V Privileged Architectures + V20211203}\n\nPMP CSRs are only accessible to M-mode" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "configure all 8 PMP entries (in incrementing order),\n - reuse + of VP_PMP_F002_S001_I000 sequence" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST02(group) => FTR02-d\n [check that all 8 HW implemented + PMP entries are writable/readable in M-mode (L=0)]\n [check that no HW + implemented PMP entry are writable/readable in S or U modes (L=0)]\n \ + \ - random values may be used\n - before any configuration (after hart + reset), check all pmp(i)cfg and pmpaddr(i) are M-mode read zero\n\nTST02-4 + (HIGH-PRIO) = 8 times reuse/call of TST02-1\n[configure 8 PMP entries: all + with L=0,\n - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) + are not writable/readable in S or U modes\n - check for PMP entry (i) where + L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only\n\ + \ - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are + not writable/readable in S or U modes]" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP003.yml b/verif/docs/VerifPlans/PMP/VP_IP003.yml new file mode 100644 index 00000000000..dbc0945d8bd --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP003.yml @@ -0,0 +1,277 @@ +!Feature +next_elt_id: 5 +name: CSRs locked access +id: 3 +display_order: 3 +subfeatures: !!omap +- 000_configure_1_pmp_entry: !Subfeature + name: 000_configure_1_pmp_entry + tag: VP_PMP_F003_S001 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F003_S001_I000 + description: "{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\n\nThe L bit indicates that the PMP + entry is locked, i.e., writes to the configuration register and associated + address registers are ignored\nIf PMP entry (i) is locked, writes to pmp(i)cfg + and pmpaddr(i) are ignored\nLocked PMP entries remain locked until the hart + is reset\n\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: + RISC-V Privileged Architectures V20211203}\n\nSetting the L bit locks the + PMP entry even when the A field is set to OFF\n\nAdditionally, if PMP entry + (i) is locked and pmp(i)cfg.A is set to TOR, writes to pmpaddr(i-1) are + ignored" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "configure 1 PMP entry (the 1st one) with L=1,\n - write PMP + entry (i) with L=1 in M-mode\n - A is random, should also be tried with + A=OFF when L=1 (to cover feature above)\n - check PMP entry (i) written + value in M-mode\n - check for PMP entry (i) where L=1 that pmp(i)cfg and + pmpaddr(i) are effectively locked (M-mode check only)\n - also check for + PMP entry (i) where L=1 and pmp(i)cfg.A=TOR that pmpaddr(i-1) is effectively + locked\n - apply hart reset\n - check for PMP entry (i) reset value (read + zero) by reading in M mode\n - write PMP entry (i) in M-mode\n - check + PMP entry (i) written value in M-mode\n\nREUSABILITY\n - if possible, the + PMP entry number (i) is a configurable parameter\n - if possible, (L) value + is a configurable parameter\n - so the same sub-functions are reused with + varying (i) and (L) parameters" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST03(group) => FTR08-a and FTR08-b\n [check that HW + implemented PMP entries are not writable/readable in M-mode (L=1)]\n [check + that no HW implemented PMP entry are writable/readable in S or U modes (L=1)]\n\ + \ - before any configuration, check all pmp(i)cfg and pmpaddr(i) are + M-mode read zero\n - configure PMP entry (i) with L=1 (or 0): pmp(i)cfg + and pmpaddr(i) maybe random values\n - execute following tests specific + checks\n - check only hart reset unlocks all => FTR08-b\n - check + reset values: all pmp(i)cfg and pmpaddr(i) are M-mode read zero\n\nTST03-1 + (HIGH-PRIO)\n[configure 1 PMP entry ([FTR02-b1]: maybe mandatorily the first + one): with L=1,\n - if possible, the PMP entry number is a configurable + parameter\n - if possible, L value is a configurable parameter\n - check + for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively + locked whatever the SW mode => FTR08-a\n - check for PMP entry (i) where + L=1 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes]" +- 001_configure_2_pmp_entries_L1: !Subfeature + name: 001_configure_2_pmp_entries_L1 + tag: VP_PMP_F003_S002 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F003_S002_I000 + description: "{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\n\nThe L bit indicates that the PMP + entry is locked, i.e., writes to the configuration register and associated + address registers are ignored\nIf PMP entry (i) is locked, writes to pmp(i)cfg + and pmpaddr(i) are ignored\nLocked PMP entries remain locked until the hart + is reset\n\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: + RISC-V Privileged Architectures V20211203}\n\nSetting the L bit locks the + PMP entry even when the A field is set to OFF\n\nAdditionally, if PMP entry + (i) is locked and pmp(i)cfg.A is set to TOR, writes to pmpaddr(i-1) are + ignored" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "configure 2 PMP entries (the 2 first ones in incrementing order) + with L=1,\n - reuse of VP_PMP_F003_S001_I000 sequence" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST03(group) => FTR08-a and FTR08-b\n [check that HW + implemented PMP entries are not writable/readable in M-mode (L=1)]\n [check + that no HW implemented PMP entry are writable/readable in S or U modes (L=1)]\n\ + \ - before any configuration, check all pmp(i)cfg and pmpaddr(i) are + M-mode read zero\n - configure PMP entry (i) with L=1 (or 0): pmp(i)cfg + and pmpaddr(i) maybe random values\n - execute following tests specific + checks\n - check only hart reset unlocks all => FTR08-b\n - check + reset values: all pmp(i)cfg and pmpaddr(i) are M-mode read zero\n\nTST03-2 + (LOW-PRIO) = 2 times reuse/call of TST02-1\n[configure 2 PMP entries ([FTR02-b1]: + maybe mandatorily the 2 first ones): both with L=1,\n - check for PMP entry + (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever + the SW mode => FTR08-a\n - check for PMP entry (i) where L=1 that pmp(i)cfg + and pmpaddr(i) are not writable/readable in S or U modes]" +- 002_configure_2_pmp_entries_L0_L1: !Subfeature + name: 002_configure_2_pmp_entries_L0_L1 + tag: VP_PMP_F003_S003 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F003_S003_I000 + description: "{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\n\nThe L bit indicates that the PMP + entry is locked, i.e., writes to the configuration register and associated + address registers are ignored\nIf PMP entry (i) is locked, writes to pmp(i)cfg + and pmpaddr(i) are ignored\nLocked PMP entries remain locked until the hart + is reset\n\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: + RISC-V Privileged Architectures V20211203}\n\nSetting the L bit locks the + PMP entry even when the A field is set to OFF\n\nAdditionally, if PMP entry + (i) is locked and pmp(i)cfg.A is set to TOR, writes to pmpaddr(i-1) are + ignored" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "configure 2 PMP entries (the 2 first ones in incrementing order) + at least one with L=1 and one with L=0,\n - write PMP entry (i) with L=0/1 + in M-mode\n - A is random, should also be tried with A=OFF when L=1 (to + cover feature above)\n - check PMP entry (i) written value in M-mode\n\ + \ - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are + writable in M mode (read back the written value in M mode)\n - check for + PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked + (M-mode check only)\n - also check for PMP entry (i) where L=1 and pmp(i)cfg.A=TOR + that pmpaddr(i-1) is effectively locked\n - apply hart reset\n - check + for PMP entry (i) reset value (read zero) by reading in M mode\n - write + PMP entry (i) in M-mode\n - check PMP entry (i) written value in M-mode\n\ + \nREUSABILITY\n - if possible, the PMP entry number (i) is a configurable + parameter\n - if possible, (L) value is a configurable parameter\n - so + the same sub-functions are reused with varying (i) and (L) parameters" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST03(group) => FTR08-a and FTR08-b\n [check that HW + implemented PMP entries are not writable/readable in M-mode (L=1)]\n [check + that no HW implemented PMP entry are writable/readable in S or U modes (L=1)]\n\ + \ - before any configuration, check all pmp(i)cfg and pmpaddr(i) are + M-mode read zero\n - configure PMP entry (i) with L=1 (or 0): pmp(i)cfg + and pmpaddr(i) maybe random values\n - execute following tests specific + checks\n - check only hart reset unlocks all => FTR08-b\n - check + reset values: all pmp(i)cfg and pmpaddr(i) are M-mode read zero\n\nTST03-3 + (HIGH-PRIO) = 2 times reuse/call of TST02-1\n[configure 2 PMP entries ([FTR02-b1]: + maybe mandatorily the 2 first ones): one with L=1 and one with L=0,\n - + check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively + locked whatever the SW mode => FTR08-a\n - check for PMP entry (i) where + L=1 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes\n\ + \ - check locked PMP entry (i) has no effect on unlocked PMP entry (j)\n\ + \ - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are + writable/readable in M-mode only\n - check for PMP entry (i) where L=0 + that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes]" +- 003_configure_N_pmp_entries: !Subfeature + name: 003_configure_N_pmp_entries + tag: VP_PMP_F003_S004 + next_elt_id: 1 + display_order: 3 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F003_S004_I000 + description: "{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\n\nThe L bit indicates that the PMP + entry is locked, i.e., writes to the configuration register and associated + address registers are ignored\nIf PMP entry (i) is locked, writes to pmp(i)cfg + and pmpaddr(i) are ignored\nLocked PMP entries remain locked until the hart + is reset\n\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: + RISC-V Privileged Architectures V20211203}\n\nSetting the L bit locks the + PMP entry even when the A field is set to OFF\n\nAdditionally, if PMP entry + (i) is locked and pmp(i)cfg.A is set to TOR, writes to pmpaddr(i-1) are + ignored" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "configure N PMP entries (the N first ones in incrementing order) + at least one with L=1 and one with L=0,\n - reuse of VP_PMP_F003_S003_I000 + sequence" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST03(group) => FTR08-a and FTR08-b\n [check that HW + implemented PMP entries are not writable/readable in M-mode (L=1)]\n [check + that no HW implemented PMP entry are writable/readable in S or U modes (L=1)]\n\ + \ - before any configuration, check all pmp(i)cfg and pmpaddr(i) are + M-mode read zero\n - configure PMP entry (i) with L=1 (or 0): pmp(i)cfg + and pmpaddr(i) maybe random values\n - execute following tests specific + checks\n - check only hart reset unlocks all => FTR08-b\n - check + reset values: all pmp(i)cfg and pmpaddr(i) are M-mode read zero\n\nTST03-4 + (LOW-PRIO) = N times reuse/call of TST02-1\n[configure N PMP entries ([FTR02-b1]: + maybe mandatorily the N first ones): at least one with L=1 and one with + L=0,\n - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) + are effectively locked whatever the SW mode => FTR08-a\n - check for PMP + entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are not writable/readable + in S or U modes\n - check locked PMP entry (i) has no effect on unlocked + PMP entry (j)\n - check for PMP entry (i) where L=0 that pmp(i)cfg and + pmpaddr(i) are writable/readable in M-mode only\n - check for PMP entry + (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in + S or U modes]" +- 004_configure_8_pmp_entries: !Subfeature + name: 004_configure_8_pmp_entries + tag: VP_PMP_F003_S005 + next_elt_id: 1 + display_order: 4 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F003_S005_I000 + description: "{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\n\nThe L bit indicates that the PMP + entry is locked, i.e., writes to the configuration register and associated + address registers are ignored\nIf PMP entry (i) is locked, writes to pmp(i)cfg + and pmpaddr(i) are ignored\nLocked PMP entries remain locked until the hart + is reset\n\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: + RISC-V Privileged Architectures V20211203}\n\nSetting the L bit locks the + PMP entry even when the A field is set to OFF\n\nAdditionally, if PMP entry + (i) is locked and pmp(i)cfg.A is set to TOR, writes to pmpaddr(i-1) are + ignored" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "configure all 8 PMP entries (in incrementing order) at least + one with L=1 and one with L=0,\n - reuse of VP_PMP_F003_S003_I000 sequence" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST03(group) => FTR08-a and FTR08-b\n [check that HW + implemented PMP entries are not writable/readable in M-mode (L=1)]\n [check + that no HW implemented PMP entry are writable/readable in S or U modes (L=1)]\n\ + \ - before any configuration, check all pmp(i)cfg and pmpaddr(i) are + M-mode read zero\n - configure PMP entry (i) with L=1 (or 0): pmp(i)cfg + and pmpaddr(i) maybe random values\n - execute following tests specific + checks\n - check only hart reset unlocks all => FTR08-b\n - check + reset values: all pmp(i)cfg and pmpaddr(i) are M-mode read zero\n\nTST03-5 + (HIGH-PRIO) = 8 times reuse/call of TST02-1\n[configure 8 PMP entries: at + least one with L=1 and one with L=0,\n - check for PMP entry (i) where + L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever the SW + mode => FTR08-a\n - check for PMP entry (i) where L=1 that pmp(i)cfg and + pmpaddr(i) are not writable/readable in S or U modes\n - check locked PMP + entry (i) has no effect on unlocked PMP entry (j)\n - check for PMP entry + (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode + only\n - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) + are not writable/readable in S or U modes]" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP004.yml b/verif/docs/VerifPlans/PMP/VP_IP004.yml new file mode 100644 index 00000000000..80ed9259c8a --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP004.yml @@ -0,0 +1,146 @@ +!Feature +next_elt_id: 4 +name: CSRs programming order +id: 4 +display_order: 4 +subfeatures: !!omap +- 000_configure_1_pmp_entry: !Subfeature + name: 000_configure_1_pmp_entry + tag: VP_PMP_F004_S001 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F004_S001_I000 + description: "{Section 3.7.1 Page 57 Volume II: RISC-V Privileged Architectures + V20211203}\n\nthe lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)\nAll PMP CSR fields are WARL and may be read-only + zero (QUESTION: does read-only zero mean not implemented?)" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "configure any PMP entry (i), but the first one\n - reuse of + VP_PMP_F003_S003_I000 sequence (Feature: \"CSRs locked access\")" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST04 => FTR02-b1 and FTR02-b2\n [check if the lowest-numbered + PMP CSRs must be programmed first before programming higher-numbered ones]\n + \nTST04-1 (LOW-PRIO) extends TST02-1\n[configure any PMP entry, but the + first one\n - check for configured PMP entry (i), pmp(i)cfg and pmpaddr(i) + are writable/readable in M-mode only\n - check for not configured PMP entry + (i), pmp(i)cfg and pmpaddr(i) are M-mode read zero]" +- 001_configure_2_pmp_entries: !Subfeature + name: 001_configure_2_pmp_entries + tag: VP_PMP_F004_S002 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F004_S002_I000 + description: "{Section 3.7.1 Page 57 Volume II: RISC-V Privileged Architectures + V20211203}\n\nthe lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)\nAll PMP CSR fields are WARL and may be read-only + zero (QUESTION: does read-only zero mean not implemented?)" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "configure 2 non-adjacent PMP entries (highest-numbered ones + first) (avoid the first PMP entry)\n - reuse of VP_PMP_F003_S003_I000 sequence + (Feature: \"CSRs locked access\")" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST04 => FTR02-b1 and FTR02-b2\n [check if the lowest-numbered + PMP CSRs must be programmed first before programming higher-numbered ones]\n + \nTST04-2 (HIGH-PRIO) extends TST02-2\n[configure 2 non-adjacent PMP entries + (highest-numbered ones first) (avoid the first PMP entry)\n - check for + configured PMP entry (i), pmp(i)cfg and pmpaddr(i) are writable/readable + in M-mode only\n - check for not configured PMP entry (i), pmp(i)cfg and + pmpaddr(i) are M-mode read zero]" +- 002_configure_N_pmp_entries: !Subfeature + name: 002_configure_N_pmp_entries + tag: VP_PMP_F004_S003 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F004_S003_I000 + description: "{Section 3.7.1 Page 57 Volume II: RISC-V Privileged Architectures + V20211203}\n\nthe lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)\nAll PMP CSR fields are WARL and may be read-only + zero (QUESTION: does read-only zero mean not implemented?)" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "configure N PMP entries (highest-numbered ones first) (as non-adjacent + as possible, and avoid the first PMP entry)\n - reuse of VP_PMP_F003_S003_I000 + sequence (Feature: \"CSRs locked access\")" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST04 => FTR02-b1 and FTR02-b2\n [check if the lowest-numbered + PMP CSRs must be programmed first before programming higher-numbered ones]\n + \nTST04-3 (LOW-PRIO) extends TST02-3\n[configure N PMP entries (highest-numbered + ones first) (as non-adjacent as possible, and avoid the first PMP entry)\n\ + \ - check for configured PMP entry (i), pmp(i)cfg and pmpaddr(i) are writable/readable + in M-mode only\n - check for not configured PMP entry (i), pmp(i)cfg and + pmpaddr(i) are M-mode read zero]" +- 003_configure_8_pmp_entries: !Subfeature + name: 003_configure_8_pmp_entries + tag: VP_PMP_F004_S004 + next_elt_id: 1 + display_order: 3 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F004_S004_I000 + description: "{Section 3.7.1 Page 57 Volume II: RISC-V Privileged Architectures + V20211203}\n\nthe lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)\nAll PMP CSR fields are WARL and may be read-only + zero (QUESTION: does read-only zero mean not implemented?)" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "configure all 8 PMP entries (highest-numbered ones first)\n\ + \ - reuse of VP_PMP_F003_S003_I000 sequence (Feature: \"CSRs locked access\"\ + )" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST04 => FTR02-b1 and FTR02-b2\n [check if the lowest-numbered + PMP CSRs must be programmed first before programming higher-numbered ones]\n + \nTST04-4 (HIGH-PRIO) extends TST02-4\n[configure 8 PMP entries (highest-numbered + ones first)\n - check for configured PMP entry (i), pmp(i)cfg and pmpaddr(i) + are writable/readable in M-mode only]" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP005.yml b/verif/docs/VerifPlans/PMP/VP_IP005.yml new file mode 100644 index 00000000000..1c295592384 --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP005.yml @@ -0,0 +1,90 @@ +!Feature +next_elt_id: 2 +name: CSRs Hardwired regions +id: 5 +display_order: 5 +subfeatures: !!omap +- 000_access with L=0: !Subfeature + name: 000_access with L=0 + tag: VP_PMP_F005_S001 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F005_S001_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + Certain regions’ privileges can be hardwired: so only ever be visible in + machine mode but in no lower-privilege layers.\n\n{Section 3.7.1 Page 57 + Volume II: RISC-V Privileged Architectures V20211203}\nImplementations may + implement zero, 16, or 64 PMP CSRs\n\n{https://docs.openhwgroup.org/projects/cva6-user-manual/01_cva6_user/PMP.html}\n + A maximum of 16 PMP entries are supported.\nAll PMP CSRs are always implemented, + but CSRs (or bitfields of CSRs) related to PMP entries with number CVA6Cfg.NrPMPEntries + and above are hardwired to zero.\n\nTRISTAN\n8 PMP entries are implemented" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "configure the first 8 PMP entries with L=0\n - for each PMP + entry (i), check several times that pmp(i)cfg and pmpaddr(i) can be written + and can be read back exactly the same (in M-mode)\n\nfor the last 8 PMP + entries, check that pmp(i)cfg and pmpaddr(i) always read zero after being + written (in M-mode with L=0)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST05 => FTR01-c and FTR01-c-extended\n [check all + regions are configurable in M-mode to make sure none is hardwired]\n [regions + hardwired privileges might only ever be visible in M-mode]\n\nTST05-1 (HIGH-PRIO) + extends TST02-4\n - check the written pmp(i)cfg and pmpaddr(i) values can + be read exactly the same as written" +- 001_access with L=1: !Subfeature + name: 001_access with L=1 + tag: VP_PMP_F005_S002 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F005_S002_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + Certain regions’ privileges can be hardwired: so only ever be visible in + machine mode but in no lower-privilege layers.\n\n{Section 3.7.1 Page 57 + Volume II: RISC-V Privileged Architectures V20211203}\nImplementations may + implement zero, 16, or 64 PMP CSRs\n\n{https://docs.openhwgroup.org/projects/cva6-user-manual/01_cva6_user/PMP.html}\n + A maximum of 16 PMP entries are supported.\nAll PMP CSRs are always implemented, + but CSRs (or bitfields of CSRs) related to PMP entries with number CVA6Cfg.NrPMPEntries + and above are hardwired to zero.\n\nTRISTAN\n8 PMP entries are implemented" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "configure the first 8 PMP entries with L=1\n - for each PMP + entry (i), check once that pmp(i)cfg and pmpaddr(i) can be written and can + be read back exactly the same (in M-mode)\n - apply hart reset\n - for + each PMP entry (i), check once that pmp(i)cfg and pmpaddr(i) can be written + and can be read back exactly the same (in M-mode)\n\nfor the last 8 PMP + entries, check that pmp(i)cfg and pmpaddr(i) always read zero after being + written (in M-mode with L=1)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST05 => FTR01-c and FTR01-c-extended\n [check all + regions are configurable in M-mode to make sure none is hardwired]\n [regions + hardwired privileges might only ever be visible in M-mode]\n\nTST05-2 (LOW-PRIO) + extends TST03-5\n - check the written pmp(i)cfg and pmpaddr(i) values can + be read exactly the same as written (before hart reset)" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP006.yml b/verif/docs/VerifPlans/PMP/VP_IP006.yml new file mode 100644 index 00000000000..f59c2d35678 --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP006.yml @@ -0,0 +1,82 @@ +!Feature +next_elt_id: 2 +name: CSRs reserved values +id: 6 +display_order: 6 +subfeatures: !!omap +- 000_access with L=0: !Subfeature + name: 000_access with L=0 + tag: VP_PMP_F006_S001 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F006_S001_I000 + description: "{Page 58 Volume II: RISC-V Privileged Architectures V20211203}\n + \nThe R, W, and X fields form a collective WARL field for which the combinations + with R=0 and W=1 are reserved." + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "repeat following sequence several times on some PMP entries\n\ + \ - write totally random values to pmp(i)cfg and pmpaddr(i), but with L=0\n\ + \ - check all pmp(i)cfg and pmpaddr(i) can be read back exactly the same + as written except:\n - except with the reserved combinations [R=0 and + W=1]\n - except with A=NA4 which must not be selectable as G>0" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST06 => FTR04-a\n[PMP CSR fields are WARL: PMP entry + combinations with R=0 and W=1 are reserved/can’t be read]\n[permissions + fields could be randomly written; should we try randomization ?]\n\nTST06-1 + (HIGH-PRIO) extends TST02-4\n - write totally random values to pmp(i)cfg + and pmpaddr(i)\n - check all pmp(i)cfg and pmpaddr(i) can be read exactly + the same as written except for the reserved combinations with R=0 and W=1" +- 001_access with L=1: !Subfeature + name: 001_access with L=1 + tag: VP_PMP_F006_S002 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F006_S002_I000 + description: "{Page 58 Volume II: RISC-V Privileged Architectures V20211203}\n + \nThe R, W, and X fields form a collective WARL field for which the combinations + with R=0 and W=1 are reserved." + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "repeat following sequence several times on some PMP entries\n\ + \ - write totally random values to pmp(i)cfg and pmpaddr(i), but with L=1\n\ + \ - check all pmp(i)cfg and pmpaddr(i) can be read back exactly the same + as written:\n - except with the reserved combinations [R=0 and W=1]\n\ + \ - except with A=NA4 which must not be selectable as G>0\n - apply + hart reset" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST06 => FTR04-a\n[PMP CSR fields are WARL: PMP entry + combinations with R=0 and W=1 are reserved/can’t be read]\n[permissions + fields could be randomly written; should we try randomization ?]\n\nTST06-2 + (LOW-PRIO) extends TST03-5\n - write totally random values to pmp(i)cfg + and pmpaddr(i)\n - check all pmp(i)cfg and pmpaddr(i) can be read exactly + the same as written except for the reserved combinations with R=0 and W=1 + (before hart reset)" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP010.yml b/verif/docs/VerifPlans/PMP/VP_IP010.yml new file mode 100644 index 00000000000..e44684c1925 --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP010.yml @@ -0,0 +1,128 @@ +!Feature +next_elt_id: 4 +name: no cfg matching/defined +id: 10 +display_order: 10 +subfeatures: !!omap +- 000_no matching entry - M mode access: !Subfeature + name: 000_no matching entry - M mode access + tag: VP_PMP_F010_S001 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F010_S001_I000 + description: "{Page 60 Section \"Priority and Matching Logic\" Volume II: + RISC-V Privileged Architectures V20211203}\n\nIf no PMP entry matches an + M-mode access, the access succeeds" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: check M-mode access succeeds if no PMP entry matches + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR09-e\n[If no PMP entry matches an M-mode access, + the access succeeds]\n \nTST10-1 (HIGH-PRIO) => FTR09-e\n[check M-mode access + succeeds if no PMP entry matches]" +- 001_no defined entry - M mode access: !Subfeature + name: 001_no defined entry - M mode access + tag: VP_PMP_F010_S002 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F010_S002_I000 + description: "{Page 60 Section \"Priority and Matching Logic\" Volume II: + RISC-V Privileged Architectures V20211203}\n\nIf no PMP entry matches an + M-mode access, the access succeeds\nQUESTION: what happens if no PMP entry + is implemented ?\nASSUMPTION: access succeeds" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: check M-mode access succeeds if no PMP entry defined + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR09-e-question\n[what happens if no PMP entry is implemented + ?]\n \nTST10-2 (HIGH-PRIO) => FTR09-e-question\n[check M-mode access succeeds + if no PMP entry defined]" +- 002_no matching entry - S/U mode access: !Subfeature + name: 002_no matching entry - S/U mode access + tag: VP_PMP_F010_S003 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F010_S003_I000 + description: "{Page 60 Section \"Priority and Matching Logic\" Volume II: + RISC-V Privileged Architectures V20211203}\n\nIf no PMP entry matches an + S-mode or U-mode access, but at least one PMP entry is implemented, the + access fails" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: check S or U mode access fails when no PMP entry matching and + at least one PMP entry implemented + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR09-f\n[If no PMP entry matches an S-mode or U-mode + access, but at least one PMP entry is implemented, the access fails]\n\n + TST10-3 (HIGH-PRIO) => FTR09-f\n[check S or U mode access fails when no + PMP entry matching and at least one PMP entry implemented]" +- 003_no defined entry - S/U mode access: !Subfeature + name: 003_no defined entry - S/U mode access + tag: VP_PMP_F010_S004 + next_elt_id: 1 + display_order: 3 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F010_S004_I000 + description: "{Page 60 Section \"Priority and Matching Logic\" Volume II: + RISC-V Privileged Architectures V20211203}\n\nIf no PMP entry matches an + S-mode or U-mode access, but at least one PMP entry is implemented, the + access fails\nQUESTION: what happens if no PMP entry is implemented ?\n + ASSUMPTION: access fails" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: check S or U mode access fails when no PMP entry implemented + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR09-f-question\n[what happens if no PMP entry is implemented + ?]\n \nTST10-4 (HIGH-PRIO) => FTR09-f-question\n[check S or U mode access + fails when no PMP entry implemented]" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP011.yml b/verif/docs/VerifPlans/PMP/VP_IP011.yml new file mode 100644 index 00000000000..3c6de2ba9d9 --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP011.yml @@ -0,0 +1,2069 @@ +!Feature +next_elt_id: 30 +name: cfg NA4 access S/U (G=0) +id: 11 +display_order: 11 +subfeatures: !!omap +- 000_fetch_L0_X1_addr_hit: !Subfeature + name: 000_fetch_L0_X1_addr_hit + tag: VP_PMP_F011_S011 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S011_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is clear, the R/W/X + permissions apply only to S and U modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access instruction fetch inside defined NA4 + address range with execute permissions and with L=0\n - choose an executable + pmp region and address range\n - choose only one PMP entry (i)\n\nCONFIGURATION\n\ + \ - pmpcfg(i): A=NA4, X=1, L=0, R/W:random, with reserve on R=0 & W=1\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\nACCESS\n \ + \ - fetch an instruction from that region (with exact address-matching)\n\ + \nCHECK\n - check no access-fault exception\n\nREUSABILITY\n - if + possible, the PMP entry number (i) is a configurable parameter\n - if + possible, the PMP entry lock (L) is a configurable parameter\n - if possible, + the PMP entry permissions (R,W,X) are configurable parameters\n - if + possible, the PMP entry address-matching mode (A) is a configurable parameter\n\ + \ - if possible, the PMP entry address range (pmpaddr) is a configurable + parameter\n - if possible, the PMP entry associated access address is + a configurable parameter\n - so a single CONFIGURATION function and a + single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e2-2 (refers to + FTR09-d2-2)\n [When the L bit is clear, the R/W/X permissions apply only + to S and U modes]\n FTR09-d2-2 (L=0 refers to FTR08-e2-2)\n[if the privilege + mode of the access is S or U (whatever L), then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\n\nTST11-1x(group) + => FTR01-d\n [PMP check on instruction fetch where effective privilege + mode is S or U:\n - choose an executable pmp region and address range\n\ + \ - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the + 1st one)\n - if possible, the PMP entry number is a configurable parameter\n\ + \ - choose pmpcfg(i).A=NA4\n - single access instruction fetch in + S and U mode]\n [create scenarios where PMP entries with A=2 (NA4) and + with/without matching permissions\n - check only NA4 defined addresses + are matching]\n TST11-11 (HIGH-PRIO)\n [with L=0 => FTR08-e2-2 (refers to + FTR09-d2-2),\n - configure the PMP entry with execute permissions for the + PMP region\n - fetch an instruction from that region (with exact address-matching)\n\ + \ - check no access-fault exception]" +- 001_fetch_L0_X0_addr_hit: !Subfeature + name: 001_fetch_L0_X0_addr_hit + tag: VP_PMP_F011_S012 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S012_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is clear, the R/W/X + permissions apply only to S and U modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set\n\n{Page 58 Volume II: RISC-V Privileged Architectures V20211203}\n + Attempting to fetch an instruction from a PMP region that does not have + execute permissions raises an instruction access-fault exception" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access instruction fetch inside defined NA4 + address range without execute permissions and with L=0\n - choose an + executable pmp region and address range\n - choose only one PMP entry + (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, X=0, L=0, R/W:random, with + reserve on R=0 & W=1\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\ + \nACCESS\n - fetch an instruction from that region (with exact address-matching)\n\ + \nCHECK\n - check instruction fetch access-fault exception raised\n\n\ + REUSABILITY\n - if possible, the PMP entry number (i) is a configurable + parameter\n - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e2-2 (refers to + FTR09-d2-2)\n [When the L bit is clear, the R/W/X permissions apply only + to S and U modes]\n FTR09-d2-2 (L=0 refers to FTR08-e2-2)\n[if the privilege + mode of the access is S or U (whatever L), then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\n\nFTR04-b\n + [Attempting to fetch an instruction from a PMP region that does not have + execute permissions raises an instruction access-fault exception]\n \nTST11-1x(group) + => FTR01-d\n [PMP check on instruction fetch where effective privilege + mode is S or U:\n - choose an executable pmp region and address range\n\ + \ - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the + 1st one)\n - if possible, the PMP entry number is a configurable parameter\n\ + \ - choose pmpcfg(i).A=NA4\n - single access instruction fetch in + S and U mode]\n [create scenarios where PMP entries with A=2 (NA4) and + with/without matching permissions\n - check only NA4 defined addresses + are matching]\n TST11-12 (MEDIUM-PRIO)\n[with L=0 => FTR08-e2-2 (refers + to FTR09-d2-2),\n - configure the PMP entry without execute permissions + for the PMP region\n - fetch an instruction from that region (with exact + address-matching)\n - check instruction fetch access-fault exception raised + => FTR04-b]" +- 002_fetch_L0_X1_addr_miss: !Subfeature + name: 002_fetch_L0_X1_addr_miss + tag: VP_PMP_F011_S013 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S013_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is clear, the R/W/X + permissions apply only to S and U modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access instruction fetch from outside defined + NA4 address range with execute permissions and with L=0\n - choose an + executable pmp region and address range\n - choose only one PMP entry + (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, X=1, L=0, R/W:random, with + reserve on R=0 & W=1\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\ + \nACCESS\n - fetch an instruction from outside all PMP defined regions\n\ + \nCHECK\n - check instruction fetch access-fault exception raised\n\n\ + REUSABILITY\n - if possible, the PMP entry number (i) is a configurable + parameter\n - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e2-2 (refers to + FTR09-d2-2)\n [When the L bit is clear, the R/W/X permissions apply only + to S and U modes]\n FTR09-d2-2 (L=0 refers to FTR08-e2-2)\n[if the privilege + mode of the access is S or U (whatever L), then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\n\nTST11-1x(group) + => FTR01-d\n [PMP check on instruction fetch where effective privilege + mode is S or U:\n - choose an executable pmp region and address range\n\ + \ - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the + 1st one)\n - if possible, the PMP entry number is a configurable parameter\n\ + \ - choose pmpcfg(i).A=NA4\n - single access instruction fetch in + S and U mode]\n [create scenarios where PMP entries with A=2 (NA4) and + with/without matching permissions\n - check only NA4 defined addresses + are matching]\n TST11-13 (MEDIUM-PRIO)\n [with L=0 => FTR08-e2-2 (refers + to FTR09-d2-2),\n - configure the PMP entry with execute permissions for + the PMP region\n - fetch an instruction from outside all PMP defined regions\n\ + \ - check instruction fetch access-fault exception raised]" +- 003_fetch_L1_X1_addr_hit: !Subfeature + name: 003_fetch_L1_X1_addr_hit + tag: VP_PMP_F011_S014 + next_elt_id: 1 + display_order: 3 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S014_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is set, these permissions + are enforced for all privilege modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the L bit is set, then the access succeeds only if the R, W, or X bit + corresponding to the access type is set\n\n{Page 60 Section \"Locking and + Privilege Mode\" Volume II: RISC-V Privileged Architectures V20211203}\n + Locked PMP entries remain locked until the hart is reset" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access instruction fetch inside defined NA4 + address range with execute permissions and with L=1\n - choose an executable + pmp region and address range\n - choose only one PMP entry (i)\n\nCONFIGURATION\n\ + \ - pmpcfg(i): A=NA4, X=1, L=1, R/W:random, with reserve on R=0 & W=1\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\nACCESS\n \ + \ - fetch an instruction from that region (with exact address-matching)\n\ + \nCHECK\n - check no access-fault exception\n\nREUSABILITY\n - if + possible, the PMP entry number (i) is a configurable parameter\n - if + possible, the PMP entry lock (L) is a configurable parameter\n - if possible, + the PMP entry permissions (R,W,X) are configurable parameters\n - if + possible, the PMP entry address-matching mode (A) is a configurable parameter\n\ + \ - if possible, the PMP entry address range (pmpaddr) is a configurable + parameter\n - if possible, the PMP entry associated access address is + a configurable parameter\n - so a single CONFIGURATION function and a + single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1)\n [When the L bit is set, these permissions + are enforced for all privilege modes]\n FTR09-d2-1 (refers to FTR08-e1) + (refers to FTR01-f)\n [if the L bit is set, then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\nFTR08-b\n + [Locked PMP entries remain locked until the hart is reset]\n\n\nTST11-1x(group) + => FTR01-d\n [PMP check on instruction fetch where effective privilege + mode is S or U:\n - choose an executable pmp region and address range\n\ + \ - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the + 1st one)\n - if possible, the PMP entry number is a configurable parameter\n\ + \ - choose pmpcfg(i).A=NA4\n - single access instruction fetch in + S and U mode]\n [create scenarios where PMP entries with A=2 (NA4) and + with/without matching permissions\n - check only NA4 defined addresses + are matching]\n TST11-14 (LOW-PRIO)\n[with L=1 => FTR08-e1 (refers to FTR01-f) + (refers to FTR09-d2-1),\n - configure the PMP entry with execute permissions + for the PMP region\n - fetch an instruction from that region (with exact + address-matching)\n - check no access-fault exception]" +- 004_fetch_L1_X0_addr_hit: !Subfeature + name: 004_fetch_L1_X0_addr_hit + tag: VP_PMP_F011_S015 + next_elt_id: 1 + display_order: 4 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S015_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is set, these permissions + are enforced for all privilege modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the L bit is set, then the access succeeds only if the R, W, or X bit + corresponding to the access type is set\n\n{Page 60 Section \"Locking and + Privilege Mode\" Volume II: RISC-V Privileged Architectures V20211203}\n + Locked PMP entries remain locked until the hart is reset\n\n{Page 58 Volume + II: RISC-V Privileged Architectures V20211203}\nAttempting to fetch an instruction + from a PMP region that does not have execute permissions raises an instruction + access-fault exception" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access instruction fetch inside defined NA4 + address range without execute permissions and with L=1\n - choose an + executable pmp region and address range\n - choose only one PMP entry + (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, X=0, L=1, R/W:random, with + reserve on R=0 & W=1\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\ + \nACCESS\n - fetch an instruction from that region (with exact address-matching)\n\ + \nCHECK\n - check instruction fetch access-fault exception raised\n\n\ + REUSABILITY\n - if possible, the PMP entry number (i) is a configurable + parameter\n - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1)\n [When the L bit is set, these permissions + are enforced for all privilege modes]\n FTR09-d2-1 (refers to FTR08-e1) + (refers to FTR01-f)\n [if the L bit is set, then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\nFTR08-b\n + [Locked PMP entries remain locked until the hart is reset]\n\nFTR04-b\n + [Attempting to fetch an instruction from a PMP region that does not have + execute permissions raises an instruction access-fault exception]\n\nTST11-1x(group) + => FTR01-d\n [PMP check on instruction fetch where effective privilege + mode is S or U:\n - choose an executable pmp region and address range\n\ + \ - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the + 1st one)\n - if possible, the PMP entry number is a configurable parameter\n\ + \ - choose pmpcfg(i).A=NA4\n - single access instruction fetch in + S and U mode]\n [create scenarios where PMP entries with A=2 (NA4) and + with/without matching permissions\n - check only NA4 defined addresses + are matching]\n TST11-15 (LOW-PRIO)\n[with L=1 => FTR08-e1 (refers to FTR01-f) + (refers to FTR09-d2-1),\n - configure the PMP entry without execute permissions + for the PMP region\n - fetch an instruction from that region (with exact + address-matching)\n - check instruction fetch access-fault exception raised + => FTR04-b]" +- 005_fetch_L1_X1_addr_miss: !Subfeature + name: 005_fetch_L1_X1_addr_miss + tag: VP_PMP_F011_S016 + next_elt_id: 1 + display_order: 5 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S016_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is set, these permissions + are enforced for all privilege modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the L bit is set, then the access succeeds only if the R, W, or X bit + corresponding to the access type is set\n\n{Page 60 Section \"Locking and + Privilege Mode\" Volume II: RISC-V Privileged Architectures V20211203}\n + Locked PMP entries remain locked until the hart is reset" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access instruction fetch from outside defined + NA4 address range with execute permissions and with L=1\n - choose an + executable pmp region and address range\n - choose only one PMP entry + (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, X=1, L=1, R/W:random, with + reserve on R=0 & W=1\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\ + \nACCESS\n - fetch an instruction from outside all PMP defined regions\n\ + \nCHECK\n - check instruction fetch access-fault exception raised\n\n\ + REUSABILITY\n - if possible, the PMP entry number (i) is a configurable + parameter\n - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1)\n [When the L bit is set, these permissions + are enforced for all privilege modes]\n FTR09-d2-1 (refers to FTR08-e1) + (refers to FTR01-f)\n [if the L bit is set, then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\nFTR08-b\n + [Locked PMP entries remain locked until the hart is reset]\n\nTST11-1x(group) + => FTR01-d\n [PMP check on instruction fetch where effective privilege + mode is S or U:\n - choose an executable pmp region and address range\n\ + \ - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the + 1st one)\n - if possible, the PMP entry number is a configurable parameter\n\ + \ - choose pmpcfg(i).A=NA4\n - single access instruction fetch in + S and U mode]\n [create scenarios where PMP entries with A=2 (NA4) and + with/without matching permissions\n - check only NA4 defined addresses + are matching]\n TST11-16 (LOW-PRIO)\n[with L=1 => FTR08-e1 (refers to FTR01-f) + (refers to FTR09-d2-1),\n - configure the PMP entry with execute permissions + for the PMP region\n - fetch an instruction from outside all PMP defined + regions\n - check instruction fetch access-fault exception raised]" +- 006_load_L0_R1_addr_hit: !Subfeature + name: 006_load_L0_R1_addr_hit + tag: VP_PMP_F011_S021 + next_elt_id: 1 + display_order: 6 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S021_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is clear, the R/W/X + permissions apply only to S and U modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access load or load-reserved instruction + inside defined NA4 address range with read permissions and with L=0\n \ + \ - choose a readable pmp region and address range\n - choose only one + PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=1, L=0, X/W:random\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\nACCESS\n \ + \ - execute a load or load-reserved instruction from that region (with + exact address-matching)\n\nCHECK\n - check no access-fault exception\n\ + \nREUSABILITY\n - if possible, the PMP entry number (i) is a configurable + parameter\n - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e2-2 (refers to + FTR09-d2-2)\n [When the L bit is clear, the R/W/X permissions apply only + to S and U modes]\n FTR09-d2-2 (L=0 refers to FTR08-e2-2)\n[if the privilege + mode of the access is S or U (whatever L), then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\n\nTST11-2x(group) + => FTR01-d\n [PMP check on load or load-reserved instruction where effective + privilege mode is S or U:\n - choose a data readable pmp region and address + range\n - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily + the 1st one)\n - if possible, the PMP entry number is a configurable + parameter\n - choose pmpcfg(i).A=NA4\n - single access data load in + S and U mode when the bit mstatus.MPRV=0]\n [create scenarios where PMP + entries with A=2 (NA4) and with/without matching permissions\n - check + only NA4 defined addresses are matching]\nTST11-21 (HIGH-PRIO)\n[with L=0 + => FTR08-e2-2 (refers to FTR09-d2-2),\n - configure the PMP entry with + read permissions for the PMP region\n - execute a load or load-reserved + instruction from that region (with exact address-matching)\n - check no + access-fault exception]" +- 007_load_L0_R0_addr_hit: !Subfeature + name: 007_load_L0_R0_addr_hit + tag: VP_PMP_F011_S022 + next_elt_id: 1 + display_order: 7 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S022_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is clear, the R/W/X + permissions apply only to S and U modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set\n\n{Page 58 Volume II: RISC-V Privileged Architectures V20211203}\n + Attempting to execute a load or load-reserved instruction which accesses + a physical address within a PMP region without read permissions raises a + load access-fault exception" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access load or load-reserved instruction + inside defined NA4 address range without read permissions and with L=0\n\ + \ - choose a readable pmp region and address range\n - choose only + one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=0, L=0, X/W:random\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\nACCESS\n \ + \ - execute a load or load-reserved instruction from that region (with + exact address-matching)\n\nCHECK\n - check load access-fault exception + raised\n\nREUSABILITY\n - if possible, the PMP entry number (i) is a + configurable parameter\n - if possible, the PMP entry lock (L) is a configurable + parameter\n - if possible, the PMP entry permissions (R,W,X) are configurable + parameters\n - if possible, the PMP entry address-matching mode (A) is + a configurable parameter\n - if possible, the PMP entry address range + (pmpaddr) is a configurable parameter\n - if possible, the PMP entry + associated access address is a configurable parameter\n - so a single + CONFIGURATION function and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e2-2 (refers to + FTR09-d2-2)\n [When the L bit is clear, the R/W/X permissions apply only + to S and U modes]\n FTR09-d2-2 (L=0 refers to FTR08-e2-2)\n[if the privilege + mode of the access is S or U (whatever L), then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\n\nFTR04-c\n + [Attempting to execute a load or load-reserved instruction which accesses + a physical address within a PMP region without read permissions raises a + load access-fault exception]\n\nTST11-2x(group) => FTR01-d\n [PMP check + on load or load-reserved instruction where effective privilege mode is S + or U:\n - choose a data readable pmp region and address range\n - + choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n\ + \ - if possible, the PMP entry number is a configurable parameter\n \ + \ - choose pmpcfg(i).A=NA4\n - single access data load in S and U mode + when the bit mstatus.MPRV=0]\n [create scenarios where PMP entries with + A=2 (NA4) and with/without matching permissions\n - check only NA4 defined + addresses are matching]\nTST11-22 (MEDIUM-PRIO)\n[with L=0 => FTR08-e2-2 + (refers to FTR09-d2-2),\n - configure the PMP entry without read permissions + for the PMP region\n - execute a load or load-reserved instruction from + that region (with exact address-matching)\n - check load access-fault exception + raised => FTR04-c]" +- 008_load_L0_R1_addr_miss: !Subfeature + name: 008_load_L0_R1_addr_miss + tag: VP_PMP_F011_S023 + next_elt_id: 1 + display_order: 8 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S023_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is clear, the R/W/X + permissions apply only to S and U modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access load or load-reserved instruction + from outside defined NA4 address range with read permissions and with L=0\n\ + \ - choose a readable pmp region and address range\n - choose only + one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=1, L=0, X/W:random\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\nACCESS\n \ + \ - execute a load or load-reserved instruction from outside all PMP defined + regions\n\nCHECK\n - check load access-fault exception raised\n\nREUSABILITY\n\ + \ - if possible, the PMP entry number (i) is a configurable parameter\n\ + \ - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e2-2 (refers to + FTR09-d2-2)\n [When the L bit is clear, the R/W/X permissions apply only + to S and U modes]\n FTR09-d2-2 (L=0 refers to FTR08-e2-2)\n[if the privilege + mode of the access is S or U (whatever L), then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\n\nTST11-2x(group) + => FTR01-d\n [PMP check on load or load-reserved instruction where effective + privilege mode is S or U:\n - choose a data readable pmp region and address + range\n - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily + the 1st one)\n - if possible, the PMP entry number is a configurable + parameter\n - choose pmpcfg(i).A=NA4\n - single access data load in + S and U mode when the bit mstatus.MPRV=0]\n [create scenarios where PMP + entries with A=2 (NA4) and with/without matching permissions\n - check + only NA4 defined addresses are matching]\nTST11-23 (MEDIUM-PRIO)\n[with + L=0 => FTR08-e2-2 (refers to FTR09-d2-2),\n - configure the PMP entry with + read permissions for the PMP region\n - execute a load or load-reserved + instruction from outside all PMP defined regions\n - check load access-fault + exception raised]" +- 009_load_L1_R1_addr_hit: !Subfeature + name: 009_load_L1_R1_addr_hit + tag: VP_PMP_F011_S024 + next_elt_id: 1 + display_order: 9 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S024_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is set, these permissions + are enforced for all privilege modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the L bit is set, then the access succeeds only if the R, W, or X bit + corresponding to the access type is set\n\n{Page 60 Section \"Locking and + Privilege Mode\" Volume II: RISC-V Privileged Architectures V20211203}\n + Locked PMP entries remain locked until the hart is reset" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access load or load-reserved instruction + inside defined NA4 address range with read permissions and with L=1\n \ + \ - choose a readable pmp region and address range\n - choose only one + PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=1, L=1, X/W:random\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\nACCESS\n \ + \ - execute a load or load-reserved instruction from that region (with + exact address-matching)\n\nCHECK\n - check no access-fault exception\n\ + \nREUSABILITY\n - if possible, the PMP entry number (i) is a configurable + parameter\n - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1)\n [When the L bit is set, these permissions + are enforced for all privilege modes]\n FTR09-d2-1 (refers to FTR08-e1) + (refers to FTR01-f)\n [if the L bit is set, then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\nFTR08-b\n + [Locked PMP entries remain locked until the hart is reset]\n\nTST11-2x(group) + => FTR01-d\n [PMP check on load or load-reserved instruction where effective + privilege mode is S or U:\n - choose a data readable pmp region and address + range\n - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily + the 1st one)\n - if possible, the PMP entry number is a configurable + parameter\n - choose pmpcfg(i).A=NA4\n - single access data load in + S and U mode when the bit mstatus.MPRV=0]\n [create scenarios where PMP + entries with A=2 (NA4) and with/without matching permissions\n - check + only NA4 defined addresses are matching]\nTST11-24 (LOW-PRIO)\n[with L=1 + => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1),\n - configure the + PMP entry with read permissions for the PMP region\n - execute a load or + load-reserved instruction from that region (with exact address-matching)\n\ + \ - check no access-fault exception]" +- 010_load_L1_R0_addr_hit: !Subfeature + name: 010_load_L1_R0_addr_hit + tag: VP_PMP_F011_S025 + next_elt_id: 1 + display_order: 10 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S025_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is set, these permissions + are enforced for all privilege modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the L bit is set, then the access succeeds only if the R, W, or X bit + corresponding to the access type is set\n\n{Page 60 Section \"Locking and + Privilege Mode\" Volume II: RISC-V Privileged Architectures V20211203}\n + Locked PMP entries remain locked until the hart is reset\n\n{Page 58 Volume + II: RISC-V Privileged Architectures V20211203}\nAttempting to execute a + load or load-reserved instruction which accesses a physical address within + a PMP region without read permissions raises a load access-fault exception" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access load or load-reserved instruction + inside defined NA4 address range without read permissions and with L=1\n\ + \ - choose a readable pmp region and address range\n - choose only + one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=0, L=1, X/W:random\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\nACCESS\n \ + \ - execute a load or load-reserved instruction from that region (with + exact address-matching)\n\nCHECK\n - check load access-fault exception + raised\n\nREUSABILITY\n - if possible, the PMP entry number (i) is a + configurable parameter\n - if possible, the PMP entry lock (L) is a configurable + parameter\n - if possible, the PMP entry permissions (R,W,X) are configurable + parameters\n - if possible, the PMP entry address-matching mode (A) is + a configurable parameter\n - if possible, the PMP entry address range + (pmpaddr) is a configurable parameter\n - if possible, the PMP entry + associated access address is a configurable parameter\n - so a single + CONFIGURATION function and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1)\n [When the L bit is set, these permissions + are enforced for all privilege modes]\n FTR09-d2-1 (refers to FTR08-e1) + (refers to FTR01-f)\n [if the L bit is set, then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\nFTR08-b\n + [Locked PMP entries remain locked until the hart is reset]\n\nFTR04-c\n + [Attempting to execute a load or load-reserved instruction which accesses + a physical address within a PMP region without read permissions raises a + load access-fault exception]\n \nTST11-2x(group) => FTR01-d\n [PMP check + on load or load-reserved instruction where effective privilege mode is S + or U:\n - choose a data readable pmp region and address range\n - + choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n\ + \ - if possible, the PMP entry number is a configurable parameter\n \ + \ - choose pmpcfg(i).A=NA4\n - single access data load in S and U mode + when the bit mstatus.MPRV=0]\n [create scenarios where PMP entries with + A=2 (NA4) and with/without matching permissions\n - check only NA4 defined + addresses are matching]\nTST11-25 (LOW-PRIO)\n [with L=1 => FTR08-e1 (refers + to FTR01-f) (refers to FTR09-d2-1),\n - configure the PMP entry without + read permissions for the PMP region\n - execute a load or load-reserved + instruction from that region (with exact address-matching)\n - check load + access-fault exception raised => FTR04-c]" +- 011_load_L1_R1_addr_miss: !Subfeature + name: 011_load_L1_R1_addr_miss + tag: VP_PMP_F011_S026 + next_elt_id: 1 + display_order: 11 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S026_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is set, these permissions + are enforced for all privilege modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the L bit is set, then the access succeeds only if the R, W, or X bit + corresponding to the access type is set\n\n{Page 60 Section \"Locking and + Privilege Mode\" Volume II: RISC-V Privileged Architectures V20211203}\n + Locked PMP entries remain locked until the hart is reset" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access load or load-reserved instruction + from outside defined NA4 address range with read permissions and with L=1\n\ + \ - choose a readable pmp region and address range\n - choose only + one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=1, L=1, X/W:random\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\nACCESS\n \ + \ - execute a load or load-reserved instruction from outside all PMP defined + regions\n\nCHECK\n - check load access-fault exception raised\n\nREUSABILITY\n\ + \ - if possible, the PMP entry number (i) is a configurable parameter\n\ + \ - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1)\n [When the L bit is set, these permissions + are enforced for all privilege modes]\n FTR09-d2-1 (refers to FTR08-e1) + (refers to FTR01-f)\n [if the L bit is set, then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\nFTR08-b\n + [Locked PMP entries remain locked until the hart is reset]\n\nTST11-2x(group) + => FTR01-d\n [PMP check on load or load-reserved instruction where effective + privilege mode is S or U:\n - choose a data readable pmp region and address + range\n - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily + the 1st one)\n - if possible, the PMP entry number is a configurable + parameter\n - choose pmpcfg(i).A=NA4\n - single access data load in + S and U mode when the bit mstatus.MPRV=0]\n [create scenarios where PMP + entries with A=2 (NA4) and with/without matching permissions\n - check + only NA4 defined addresses are matching]\nTST11-26 (LOW-PRIO)\n[with L=1 + => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1),\n - configure the + PMP entry with read permissions for the PMP region\n - execute a load or + load-reserved instruction from outside all PMP defined regions\n - check + load access-fault exception raised]" +- 012_store_L0_W1_addr_hit: !Subfeature + name: 012_store_L0_W1_addr_hit + tag: VP_PMP_F011_S031 + next_elt_id: 1 + display_order: 12 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S031_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is clear, the R/W/X + permissions apply only to S and U modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access store, store-conditional, or AMO instruction + inside defined NA4 address range with write permissions and with L=0\n \ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=1, L=0, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\n\ + ACCESS\n - execute a store, store-conditional, or AMO instruction to + that region (with exact address-matching)\n\nCHECK\n - check no access-fault + exception\n\nREUSABILITY\n - if possible, the PMP entry number (i) is + a configurable parameter\n - if possible, the PMP entry lock (L) is a + configurable parameter\n - if possible, the PMP entry permissions (R,W,X) + are configurable parameters\n - if possible, the PMP entry address-matching + mode (A) is a configurable parameter\n - if possible, the PMP entry address + range (pmpaddr) is a configurable parameter\n - if possible, the PMP + entry associated access address is a configurable parameter\n - so a + single CONFIGURATION function and a single ACCESS function can be reused + and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e2-2 (refers to + FTR09-d2-2)\n [When the L bit is clear, the R/W/X permissions apply only + to S and U modes]\n FTR09-d2-2 (L=0 refers to FTR08-e2-2)\n[if the privilege + mode of the access is S or U (whatever L), then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\n\nTST11-3x(group) + => FTR01-d\n [PMP check on store, store-conditional, or AMO instruction + where effective privilege mode is S or U:\n - choose a data writable + pmp region and address range\n - choose only one PMP entry (i) ([FTR02-b1]: + maybe mandatorily the 1st one)\n - if possible, the PMP entry number + is a configurable parameter\n - choose pmpcfg(i).A=NA4\n - single + access data store in S and U mode when the bit mstatus.MPRV=0]\n [create + scenarios where PMP entries with A=2 (NA4) and with/without matching permissions\n\ + \ - check only NA4 defined addresses are matching]\nTST11-31 (HIGH-PRIO)\n + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2),\n - configure the PMP entry + with write permissions for the PMP region\n - execute a store, store-conditional, + or AMO instruction to that region (with exact address-matching)\n - check + no access-fault exception]" +- 013_store_L0_W0_addr_hit: !Subfeature + name: 013_store_L0_W0_addr_hit + tag: VP_PMP_F011_S032 + next_elt_id: 1 + display_order: 13 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S032_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is clear, the R/W/X + permissions apply only to S and U modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set\n\n{Page 58 Volume II: RISC-V Privileged Architectures V20211203}\n + Attempting to execute a store, store-conditional, or AMO instruction which + accesses a physical address within a PMP region without write permissions + raises a store access-fault exception" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access store, store-conditional, or AMO instruction + inside defined NA4 address range without write permissions and with L=0\n\ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=0, L=0, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\n\ + ACCESS\n - execute a store, store-conditional, or AMO instruction to + that region (with exact address-matching)\n\nCHECK\n - check store access-fault + exception raised\n\nREUSABILITY\n - if possible, the PMP entry number + (i) is a configurable parameter\n - if possible, the PMP entry lock (L) + is a configurable parameter\n - if possible, the PMP entry permissions + (R,W,X) are configurable parameters\n - if possible, the PMP entry address-matching + mode (A) is a configurable parameter\n - if possible, the PMP entry address + range (pmpaddr) is a configurable parameter\n - if possible, the PMP + entry associated access address is a configurable parameter\n - so a + single CONFIGURATION function and a single ACCESS function can be reused + and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e2-2 (refers to + FTR09-d2-2)\n [When the L bit is clear, the R/W/X permissions apply only + to S and U modes]\n FTR09-d2-2 (L=0 refers to FTR08-e2-2)\n[if the privilege + mode of the access is S or U (whatever L), then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\n\nFTR04-d\n + [Attempting to execute a store, store-conditional, or AMO instruction which + accesses a physical address within a PMP region without write permissions + raises a store access-fault exception]\n\nTST11-3x(group) => FTR01-d\n \ + \ [PMP check on store, store-conditional, or AMO instruction where effective + privilege mode is S or U:\n - choose a data writable pmp region and address + range\n - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily + the 1st one)\n - if possible, the PMP entry number is a configurable + parameter\n - choose pmpcfg(i).A=NA4\n - single access data store + in S and U mode when the bit mstatus.MPRV=0]\n [create scenarios where + PMP entries with A=2 (NA4) and with/without matching permissions\n - + check only NA4 defined addresses are matching]\nTST11-32 (MEDIUM-PRIO)\n + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2),\n - configure the PMP entry + without write permissions for the PMP region\n - execute a store, store-conditional, + or AMO instruction to that region (with exact address-matching)\n - check + store access-fault exception raised => FTR04-d]" +- 014_store_L0_W1_addr_miss: !Subfeature + name: 014_store_L0_W1_addr_miss + tag: VP_PMP_F011_S033 + next_elt_id: 1 + display_order: 14 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S033_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is clear, the R/W/X + permissions apply only to S and U modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access store, store-conditional, or AMO instruction + from outside defined NA4 address range with write permissions and with L=0\n\ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=1, L=0, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\n\ + ACCESS\n - execute a store, store-conditional, or AMO instruction to + outside all PMP defined regions\n\nCHECK\n - check store access-fault + exception raised\n\nREUSABILITY\n - if possible, the PMP entry number + (i) is a configurable parameter\n - if possible, the PMP entry lock (L) + is a configurable parameter\n - if possible, the PMP entry permissions + (R,W,X) are configurable parameters\n - if possible, the PMP entry address-matching + mode (A) is a configurable parameter\n - if possible, the PMP entry address + range (pmpaddr) is a configurable parameter\n - if possible, the PMP + entry associated access address is a configurable parameter\n - so a + single CONFIGURATION function and a single ACCESS function can be reused + and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e2-2 (refers to + FTR09-d2-2)\n [When the L bit is clear, the R/W/X permissions apply only + to S and U modes]\n FTR09-d2-2 (L=0 refers to FTR08-e2-2)\n[if the privilege + mode of the access is S or U (whatever L), then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\n\nTST11-3x(group) + => FTR01-d\n [PMP check on store, store-conditional, or AMO instruction + where effective privilege mode is S or U:\n - choose a data writable + pmp region and address range\n - choose only one PMP entry (i) ([FTR02-b1]: + maybe mandatorily the 1st one)\n - if possible, the PMP entry number + is a configurable parameter\n - choose pmpcfg(i).A=NA4\n - single + access data store in S and U mode when the bit mstatus.MPRV=0]\n [create + scenarios where PMP entries with A=2 (NA4) and with/without matching permissions\n\ + \ - check only NA4 defined addresses are matching]\nTST11-33 (MEDIUM-PRIO)\n + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2),\n - configure the PMP entry + with write permissions for the PMP region\n - execute a store, store-conditional, + or AMO instruction to outside all PMP defined regions\n - check store access-fault + exception raised]" +- 015_store_L1_W1_addr_hit: !Subfeature + name: 015_store_L1_W1_addr_hit + tag: VP_PMP_F011_S034 + next_elt_id: 1 + display_order: 15 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S034_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is set, these permissions + are enforced for all privilege modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the L bit is set, then the access succeeds only if the R, W, or X bit + corresponding to the access type is set\n\n{Page 60 Section \"Locking and + Privilege Mode\" Volume II: RISC-V Privileged Architectures V20211203}\n + Locked PMP entries remain locked until the hart is reset" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access store, store-conditional, or AMO instruction + inside defined NA4 address range with write permissions and with L=1\n \ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=1, L=1, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\n\ + ACCESS\n - execute a store, store-conditional, or AMO instruction to + that region (with exact address-matching)\n\nCHECK\n - check no access-fault + exception\n\nREUSABILITY\n - if possible, the PMP entry number (i) is + a configurable parameter\n - if possible, the PMP entry lock (L) is a + configurable parameter\n - if possible, the PMP entry permissions (R,W,X) + are configurable parameters\n - if possible, the PMP entry address-matching + mode (A) is a configurable parameter\n - if possible, the PMP entry address + range (pmpaddr) is a configurable parameter\n - if possible, the PMP + entry associated access address is a configurable parameter\n - so a + single CONFIGURATION function and a single ACCESS function can be reused + and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1)\n [When the L bit is set, these permissions + are enforced for all privilege modes]\n FTR09-d2-1 (refers to FTR08-e1) + (refers to FTR01-f)\n [if the L bit is set, then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\nFTR08-b\n + [Locked PMP entries remain locked until the hart is reset]\n\nTST11-3x(group) + => FTR01-d\n [PMP check on store, store-conditional, or AMO instruction + where effective privilege mode is S or U:\n - choose a data writable + pmp region and address range\n - choose only one PMP entry (i) ([FTR02-b1]: + maybe mandatorily the 1st one)\n - if possible, the PMP entry number + is a configurable parameter\n - choose pmpcfg(i).A=NA4\n - single + access data store in S and U mode when the bit mstatus.MPRV=0]\n [create + scenarios where PMP entries with A=2 (NA4) and with/without matching permissions\n\ + \ - check only NA4 defined addresses are matching]\nTST11-34 (LOW-PRIO)\n + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1),\n - configure + the PMP entry with write permissions for the PMP region\n - execute a store, + store-conditional, or AMO instruction to that region (with exact address-matching)\n\ + \ - check no access-fault exception]" +- 016_store_L1_W0_addr_hit: !Subfeature + name: 016_store_L1_W0_addr_hit + tag: VP_PMP_F011_S035 + next_elt_id: 1 + display_order: 16 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S035_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is set, these permissions + are enforced for all privilege modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the L bit is set, then the access succeeds only if the R, W, or X bit + corresponding to the access type is set\n\n{Page 60 Section \"Locking and + Privilege Mode\" Volume II: RISC-V Privileged Architectures V20211203}\n + Locked PMP entries remain locked until the hart is reset\n\n{Page 58 Volume + II: RISC-V Privileged Architectures V20211203}\nAttempting to execute a + store, store-conditional, or AMO instruction which accesses a physical address + within a PMP region without write permissions raises a store access-fault + exception" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access store, store-conditional, or AMO instruction + inside defined NA4 address range without write permissions and with L=1\n\ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=0, L=1, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\n\ + ACCESS\n - execute a store, store-conditional, or AMO instruction to + that region (with exact address-matching)\n\nCHECK\n - check store access-fault + exception raised\n\nREUSABILITY\n - if possible, the PMP entry number + (i) is a configurable parameter\n - if possible, the PMP entry lock (L) + is a configurable parameter\n - if possible, the PMP entry permissions + (R,W,X) are configurable parameters\n - if possible, the PMP entry address-matching + mode (A) is a configurable parameter\n - if possible, the PMP entry address + range (pmpaddr) is a configurable parameter\n - if possible, the PMP + entry associated access address is a configurable parameter\n - so a + single CONFIGURATION function and a single ACCESS function can be reused + and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1)\n [When the L bit is set, these permissions + are enforced for all privilege modes]\n FTR09-d2-1 (refers to FTR08-e1) + (refers to FTR01-f)\n [if the L bit is set, then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\nFTR08-b\n + [Locked PMP entries remain locked until the hart is reset]\n\nFTR04-d\n + [Attempting to execute a store, store-conditional, or AMO instruction which + accesses a physical address within a PMP region without write permissions + raises a store access-fault exception]\n\nTST11-3x(group) => FTR01-d\n \ + \ [PMP check on store, store-conditional, or AMO instruction where effective + privilege mode is S or U:\n - choose a data writable pmp region and address + range\n - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily + the 1st one)\n - if possible, the PMP entry number is a configurable + parameter\n - choose pmpcfg(i).A=NA4\n - single access data store + in S and U mode when the bit mstatus.MPRV=0]\n [create scenarios where + PMP entries with A=2 (NA4) and with/without matching permissions\n - + check only NA4 defined addresses are matching]\nTST11-35 (LOW-PRIO)\n[with + L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1),\n - configure + the PMP entry without write permissions for the PMP region\n - execute + a store, store-conditional, or AMO instruction to that region (with exact + address-matching)\n - check store access-fault exception raised => FTR04-d]" +- 017_store_L1_W1_addr_miss: !Subfeature + name: 017_store_L1_W1_addr_miss + tag: VP_PMP_F011_S036 + next_elt_id: 1 + display_order: 17 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S036_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is set, these permissions + are enforced for all privilege modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the L bit is set, then the access succeeds only if the R, W, or X bit + corresponding to the access type is set\n\n{Page 60 Section \"Locking and + Privilege Mode\" Volume II: RISC-V Privileged Architectures V20211203}\n + Locked PMP entries remain locked until the hart is reset" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access store, store-conditional, or AMO instruction + from outside defined NA4 address range with write permissions and with L=1\n\ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=1, L=1, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\n\ + ACCESS\n - execute a store, store-conditional, or AMO instruction to + outside all PMP defined regions\n\nCHECK\n - check store access-fault + exception raised\n\nREUSABILITY\n - if possible, the PMP entry number + (i) is a configurable parameter\n - if possible, the PMP entry lock (L) + is a configurable parameter\n - if possible, the PMP entry permissions + (R,W,X) are configurable parameters\n - if possible, the PMP entry address-matching + mode (A) is a configurable parameter\n - if possible, the PMP entry address + range (pmpaddr) is a configurable parameter\n - if possible, the PMP + entry associated access address is a configurable parameter\n - so a + single CONFIGURATION function and a single ACCESS function can be reused + and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1)\n [When the L bit is set, these permissions + are enforced for all privilege modes]\n FTR09-d2-1 (refers to FTR08-e1) + (refers to FTR01-f)\n [if the L bit is set, then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\nFTR08-b\n + [Locked PMP entries remain locked until the hart is reset]\n\nTST11-3x(group) + => FTR01-d\n [PMP check on store, store-conditional, or AMO instruction + where effective privilege mode is S or U:\n - choose a data writable + pmp region and address range\n - choose only one PMP entry (i) ([FTR02-b1]: + maybe mandatorily the 1st one)\n - if possible, the PMP entry number + is a configurable parameter\n - choose pmpcfg(i).A=NA4\n - single + access data store in S and U mode when the bit mstatus.MPRV=0]\n [create + scenarios where PMP entries with A=2 (NA4) and with/without matching permissions\n\ + \ - check only NA4 defined addresses are matching]\nTST11-36 (LOW-PRIO)\n + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1),\n - configure + the PMP entry with write permissions for the PMP region\n - execute a store, + store-conditional, or AMO instruction to outside all PMP defined regions\n\ + \ - check store access-fault exception raised]" +- 018_load_MPP_L0_R1_addr_hit: !Subfeature + name: 018_load_MPP_L0_R1_addr_hit + tag: VP_PMP_F011_S041 + next_elt_id: 1 + display_order: 18 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S041_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is clear, the R/W/X + permissions apply only to S and U modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access load or load-reserved instruction + inside defined NA4 address range with read permissions and with L=0\n \ + \ - choose a readable pmp region and address range\n - choose only one + PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=1, L=0, X/W:random\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and mstatus.MPP + contains S or U\n\nACCESS\n - execute a load or load-reserved instruction + from that region (with exact address-matching)\n\nCHECK\n - check no + access-fault exception\n\nREUSABILITY\n - if possible, the PMP entry + number (i) is a configurable parameter\n - if possible, the PMP entry + lock (L) is a configurable parameter\n - if possible, the PMP entry permissions + (R,W,X) are configurable parameters\n - if possible, the PMP entry address-matching + mode (A) is a configurable parameter\n - if possible, the PMP entry address + range (pmpaddr) is a configurable parameter\n - if possible, the PMP + entry associated access address is a configurable parameter\n - so a + single CONFIGURATION function and a single ACCESS function can be reused + and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e2-2 (refers to + FTR09-d2-2)\n [When the L bit is clear, the R/W/X permissions apply only + to S and U modes]\n FTR09-d2-2 (L=0 refers to FTR08-e2-2)\n[if the privilege + mode of the access is S or U (whatever L), then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\n\nTST11-4x(group) + => FTR01-d\n [PMP check on load or load-reserved instruction where effective + privilege mode is S or U:\n - choose a data readable pmp region and address + range\n - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily + the 1st one)\n - if possible, the PMP entry number is a configurable + parameter\n - choose pmpcfg(i).A=NA4\n - single access data load in + any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U]\n\ + \ [create scenarios where PMP entries with A=2 (NA4) and with/without matching + permissions\n - check only NA4 defined addresses are matching]\nTST11-41 + (LOWEST-PRIO)\n [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2),\n - configure + the PMP entry with read permissions for the PMP region\n - execute a load + or load-reserved instruction from that region (with exact address-matching)\n\ + \ - check no access-fault exception]" +- 019_load_MPP_L0_R0_addr_hit: !Subfeature + name: 019_load_MPP_L0_R0_addr_hit + tag: VP_PMP_F011_S042 + next_elt_id: 1 + display_order: 19 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S042_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is clear, the R/W/X + permissions apply only to S and U modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set\n\n{Page 58 Volume II: RISC-V Privileged Architectures V20211203}\n + Attempting to execute a load or load-reserved instruction which accesses + a physical address within a PMP region without read permissions raises a + load access-fault exception" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access load or load-reserved instruction + inside defined NA4 address range without read permissions and with L=0\n\ + \ - choose a readable pmp region and address range\n - choose only + one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=0, L=0, X/W:random\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and mstatus.MPP + contains S or U\n\nACCESS\n - execute a load or load-reserved instruction + from that region (with exact address-matching)\n\nCHECK\n - check load + access-fault exception raised\n\nREUSABILITY\n - if possible, the PMP + entry number (i) is a configurable parameter\n - if possible, the PMP + entry lock (L) is a configurable parameter\n - if possible, the PMP entry + permissions (R,W,X) are configurable parameters\n - if possible, the + PMP entry address-matching mode (A) is a configurable parameter\n - if + possible, the PMP entry address range (pmpaddr) is a configurable parameter\n\ + \ - if possible, the PMP entry associated access address is a configurable + parameter\n - so a single CONFIGURATION function and a single ACCESS + function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e2-2 (refers to + FTR09-d2-2)\n [When the L bit is clear, the R/W/X permissions apply only + to S and U modes]\n FTR09-d2-2 (L=0 refers to FTR08-e2-2)\n[if the privilege + mode of the access is S or U (whatever L), then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\n\nFTR04-c\n + [Attempting to execute a load or load-reserved instruction which accesses + a physical address within a PMP region without read permissions raises a + load access-fault exception]\n\nTST11-4x(group) => FTR01-d\n [PMP check + on load or load-reserved instruction where effective privilege mode is S + or U:\n - choose a data readable pmp region and address range\n - + choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n\ + \ - if possible, the PMP entry number is a configurable parameter\n \ + \ - choose pmpcfg(i).A=NA4\n - single access data load in any mode + when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U]\n [create + scenarios where PMP entries with A=2 (NA4) and with/without matching permissions\n\ + \ - check only NA4 defined addresses are matching]\nTST11-42 (LOWEST-PRIO)\n + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2),\n - configure the PMP entry + without read permissions for the PMP region\n - execute a load or load-reserved + instruction from that region (with exact address-matching)\n - check load + access-fault exception raised => FTR04-c]" +- 020_load_MPP_L0_R1_addr_miss: !Subfeature + name: 020_load_MPP_L0_R1_addr_miss + tag: VP_PMP_F011_S043 + next_elt_id: 1 + display_order: 20 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S043_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is clear, the R/W/X + permissions apply only to S and U modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access load or load-reserved instruction + from outside defined NA4 address range with read permissions and with L=0\n\ + \ - choose a readable pmp region and address range\n - choose only + one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=1, L=0, X/W:random\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and mstatus.MPP + contains S or U\n\nACCESS\n - execute a load or load-reserved instruction + from outside all PMP defined regions\n\nCHECK\n - check load access-fault + exception raised\n\nREUSABILITY\n - if possible, the PMP entry number + (i) is a configurable parameter\n - if possible, the PMP entry lock (L) + is a configurable parameter\n - if possible, the PMP entry permissions + (R,W,X) are configurable parameters\n - if possible, the PMP entry address-matching + mode (A) is a configurable parameter\n - if possible, the PMP entry address + range (pmpaddr) is a configurable parameter\n - if possible, the PMP + entry associated access address is a configurable parameter\n - so a + single CONFIGURATION function and a single ACCESS function can be reused + and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e2-2 (refers to + FTR09-d2-2)\n [When the L bit is clear, the R/W/X permissions apply only + to S and U modes]\n FTR09-d2-2 (L=0 refers to FTR08-e2-2)\n[if the privilege + mode of the access is S or U (whatever L), then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\n\nTST11-4x(group) + => FTR01-d\n [PMP check on load or load-reserved instruction where effective + privilege mode is S or U:\n - choose a data readable pmp region and address + range\n - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily + the 1st one)\n - if possible, the PMP entry number is a configurable + parameter\n - choose pmpcfg(i).A=NA4\n - single access data load in + any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U]\n\ + \ [create scenarios where PMP entries with A=2 (NA4) and with/without matching + permissions\n - check only NA4 defined addresses are matching]\nTST11-43 + (LOWEST-PRIO)\n [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2),\n - configure + the PMP entry with read permissions for the PMP region\n - execute a load + or load-reserved instruction from outside all PMP defined regions\n - check + load access-fault exception raised]" +- 021_load_MPP_L1_R1_addr_hit: !Subfeature + name: 021_load_MPP_L1_R1_addr_hit + tag: VP_PMP_F011_S044 + next_elt_id: 1 + display_order: 21 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S044_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is set, these permissions + are enforced for all privilege modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the L bit is set, then the access succeeds only if the R, W, or X bit + corresponding to the access type is set\n\n{Page 60 Section \"Locking and + Privilege Mode\" Volume II: RISC-V Privileged Architectures V20211203}\n + Locked PMP entries remain locked until the hart is reset" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access load or load-reserved instruction + inside defined NA4 address range with read permissions and with L=1\n \ + \ - choose a readable pmp region and address range\n - choose only one + PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=1, L=1, X/W:random\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and mstatus.MPP + contains S or U\n\nACCESS\n - execute a load or load-reserved instruction + from that region (with exact address-matching)\n\nCHECK\n - check no + access-fault exception\n\nREUSABILITY\n - if possible, the PMP entry + number (i) is a configurable parameter\n - if possible, the PMP entry + lock (L) is a configurable parameter\n - if possible, the PMP entry permissions + (R,W,X) are configurable parameters\n - if possible, the PMP entry address-matching + mode (A) is a configurable parameter\n - if possible, the PMP entry address + range (pmpaddr) is a configurable parameter\n - if possible, the PMP + entry associated access address is a configurable parameter\n - so a + single CONFIGURATION function and a single ACCESS function can be reused + and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1)\n [When the L bit is set, these permissions + are enforced for all privilege modes]\n FTR09-d2-1 (refers to FTR08-e1) + (refers to FTR01-f)\n [if the L bit is set, then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\nFTR08-b\n + [Locked PMP entries remain locked until the hart is reset]\n\nTST11-4x(group) + => FTR01-d\n [PMP check on load or load-reserved instruction where effective + privilege mode is S or U:\n - choose a data readable pmp region and address + range\n - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily + the 1st one)\n - if possible, the PMP entry number is a configurable + parameter\n - choose pmpcfg(i).A=NA4\n - single access data load in + any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U]\n\ + \ [create scenarios where PMP entries with A=2 (NA4) and with/without matching + permissions\n - check only NA4 defined addresses are matching]\nTST11-44 + (LOWEST-PRIO)\n [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1),\n\ + \ - configure the PMP entry with read permissions for the PMP region\n\ + \ - execute a load or load-reserved instruction from that region (with + exact address-matching)\n - check no access-fault exception]" +- 022_load_MPP_L1_R0_addr_hit: !Subfeature + name: 022_load_MPP_L1_R0_addr_hit + tag: VP_PMP_F011_S045 + next_elt_id: 1 + display_order: 22 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S045_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is set, these permissions + are enforced for all privilege modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the L bit is set, then the access succeeds only if the R, W, or X bit + corresponding to the access type is set\n\n{Page 60 Section \"Locking and + Privilege Mode\" Volume II: RISC-V Privileged Architectures V20211203}\n + Locked PMP entries remain locked until the hart is reset\n\n{Page 58 Volume + II: RISC-V Privileged Architectures V20211203}\nAttempting to execute a + load or load-reserved instruction which accesses a physical address within + a PMP region without read permissions raises a load access-fault exception" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access load or load-reserved instruction + inside defined NA4 address range without read permissions and with L=1\n\ + \ - choose a readable pmp region and address range\n - choose only + one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=0, L=1, X/W:random\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and mstatus.MPP + contains S or U\n\nACCESS\n - execute a load or load-reserved instruction + from that region (with exact address-matching)\n\nCHECK\n - check load + access-fault exception raised\n\nREUSABILITY\n - if possible, the PMP + entry number (i) is a configurable parameter\n - if possible, the PMP + entry lock (L) is a configurable parameter\n - if possible, the PMP entry + permissions (R,W,X) are configurable parameters\n - if possible, the + PMP entry address-matching mode (A) is a configurable parameter\n - if + possible, the PMP entry address range (pmpaddr) is a configurable parameter\n\ + \ - if possible, the PMP entry associated access address is a configurable + parameter\n - so a single CONFIGURATION function and a single ACCESS + function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1)\n [When the L bit is set, these permissions + are enforced for all privilege modes]\n FTR09-d2-1 (refers to FTR08-e1) + (refers to FTR01-f)\n [if the L bit is set, then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\nFTR08-b\n + [Locked PMP entries remain locked until the hart is reset]\n\nFTR04-c\n + [Attempting to execute a load or load-reserved instruction which accesses + a physical address within a PMP region without read permissions raises a + load access-fault exception]\n \nTST11-4x(group) => FTR01-d\n [PMP check + on load or load-reserved instruction where effective privilege mode is S + or U:\n - choose a data readable pmp region and address range\n - + choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n\ + \ - if possible, the PMP entry number is a configurable parameter\n \ + \ - choose pmpcfg(i).A=NA4\n - single access data load in any mode + when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U]\n [create + scenarios where PMP entries with A=2 (NA4) and with/without matching permissions\n\ + \ - check only NA4 defined addresses are matching]\nTST11-45 (LOWEST-PRIO)\n + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1),\n - configure + the PMP entry without read permissions for the PMP region\n - execute a + load or load-reserved instruction from that region (with exact address-matching)\n\ + \ - check load access-fault exception raised => FTR04-c]" +- 023_load_MPP_L1_R1_addr_miss: !Subfeature + name: 023_load_MPP_L1_R1_addr_miss + tag: VP_PMP_F011_S046 + next_elt_id: 1 + display_order: 23 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S046_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is set, these permissions + are enforced for all privilege modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the L bit is set, then the access succeeds only if the R, W, or X bit + corresponding to the access type is set\n\n{Page 60 Section \"Locking and + Privilege Mode\" Volume II: RISC-V Privileged Architectures V20211203}\n + Locked PMP entries remain locked until the hart is reset" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access load or load-reserved instruction + from outside defined NA4 address range with read permissions and with L=1\n\ + \ - choose a readable pmp region and address range\n - choose only + one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=1, L=1, X/W:random\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and mstatus.MPP + contains S or U\n\nACCESS\n - execute a load or load-reserved instruction + from outside all PMP defined regions\n\nCHECK\n - check load access-fault + exception raised\n\nREUSABILITY\n - if possible, the PMP entry number + (i) is a configurable parameter\n - if possible, the PMP entry lock (L) + is a configurable parameter\n - if possible, the PMP entry permissions + (R,W,X) are configurable parameters\n - if possible, the PMP entry address-matching + mode (A) is a configurable parameter\n - if possible, the PMP entry address + range (pmpaddr) is a configurable parameter\n - if possible, the PMP + entry associated access address is a configurable parameter\n - so a + single CONFIGURATION function and a single ACCESS function can be reused + and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1)\n [When the L bit is set, these permissions + are enforced for all privilege modes]\n FTR09-d2-1 (refers to FTR08-e1) + (refers to FTR01-f)\n [if the L bit is set, then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\nFTR08-b\n + [Locked PMP entries remain locked until the hart is reset]\n\nTST11-4x(group) + => FTR01-d\n [PMP check on load or load-reserved instruction where effective + privilege mode is S or U:\n - choose a data readable pmp region and address + range\n - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily + the 1st one)\n - if possible, the PMP entry number is a configurable + parameter\n - choose pmpcfg(i).A=NA4\n - single access data load in + any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U]\n\ + \ [create scenarios where PMP entries with A=2 (NA4) and with/without matching + permissions\n - check only NA4 defined addresses are matching]\nTST11-46 + (LOWEST-PRIO)\n [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1),\n\ + \ - configure the PMP entry with read permissions for the PMP region\n\ + \ - execute a load or load-reserved instruction from outside all PMP defined + regions\n - check load access-fault exception raised]" +- 024_store_MPP_L0_W1_addr_hit: !Subfeature + name: 024_store_MPP_L0_W1_addr_hit + tag: VP_PMP_F011_S051 + next_elt_id: 1 + display_order: 24 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S051_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is clear, the R/W/X + permissions apply only to S and U modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access store, store-conditional, or AMO instruction + inside defined NA4 address range with write permissions and with L=0\n \ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=1, L=0, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and + mstatus.MPP contains S or U\n\nACCESS\n - execute a store, store-conditional, + or AMO instruction to that region (with exact address-matching)\n\nCHECK\n\ + \ - check no access-fault exception\n\nREUSABILITY\n - if possible, + the PMP entry number (i) is a configurable parameter\n - if possible, + the PMP entry lock (L) is a configurable parameter\n - if possible, the + PMP entry permissions (R,W,X) are configurable parameters\n - if possible, + the PMP entry address-matching mode (A) is a configurable parameter\n \ + \ - if possible, the PMP entry address range (pmpaddr) is a configurable + parameter\n - if possible, the PMP entry associated access address is + a configurable parameter\n - so a single CONFIGURATION function and a + single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e2-2 (refers to + FTR09-d2-2)\n [When the L bit is clear, the R/W/X permissions apply only + to S and U modes]\n FTR09-d2-2 (L=0 refers to FTR08-e2-2)\n[if the privilege + mode of the access is S or U (whatever L), then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\n\nTST11-5x(group) + => FTR01-d\n [PMP check on store, store-conditional, or AMO instruction + where effective privilege mode is S or U:\n - choose a data writable + pmp region and address range\n - choose only one PMP entry (i) ([FTR02-b1]: + maybe mandatorily the 1st one)\n - if possible, the PMP entry number + is a configurable parameter\n - choose pmpcfg(i).A=NA4\n - single + access data store in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP + contains S or U]\n [create scenarios where PMP entries with A=2 (NA4) and + with/without matching permissions\n - check only NA4 defined addresses + are matching]\n TST11-51 (LOWEST-PRIO)\n[with L=0 => FTR08-e2-2 (refers + to FTR09-d2-2),\n - configure the PMP entry with write permissions for + the PMP region\n - execute a store, store-conditional, or AMO instruction + to that region (with exact address-matching)\n - check no access-fault + exception]" +- 025_store_MPP_L0_W0_addr_hit: !Subfeature + name: 025_store_MPP_L0_W0_addr_hit + tag: VP_PMP_F011_S052 + next_elt_id: 1 + display_order: 25 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S052_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is clear, the R/W/X + permissions apply only to S and U modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set\n\n{Page 58 Volume II: RISC-V Privileged Architectures V20211203}\n + Attempting to execute a store, store-conditional, or AMO instruction which + accesses a physical address within a PMP region without write permissions + raises a store access-fault exception" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access store, store-conditional, or AMO instruction + inside defined NA4 address range without write permissions and with L=0\n\ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=0, L=0, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and + mstatus.MPP contains S or U\n\nACCESS\n - execute a store, store-conditional, + or AMO instruction to that region (with exact address-matching)\n\nCHECK\n\ + \ - check store access-fault exception raised\n\nREUSABILITY\n - if + possible, the PMP entry number (i) is a configurable parameter\n - if + possible, the PMP entry lock (L) is a configurable parameter\n - if possible, + the PMP entry permissions (R,W,X) are configurable parameters\n - if + possible, the PMP entry address-matching mode (A) is a configurable parameter\n\ + \ - if possible, the PMP entry address range (pmpaddr) is a configurable + parameter\n - if possible, the PMP entry associated access address is + a configurable parameter\n - so a single CONFIGURATION function and a + single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e2-2 (refers to + FTR09-d2-2)\n [When the L bit is clear, the R/W/X permissions apply only + to S and U modes]\n FTR09-d2-2 (L=0 refers to FTR08-e2-2)\n[if the privilege + mode of the access is S or U (whatever L), then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\n\nFTR04-d\n + [Attempting to execute a store, store-conditional, or AMO instruction which + accesses a physical address within a PMP region without write permissions + raises a store access-fault exception]\n\nTST11-5x(group) => FTR01-d\n \ + \ [PMP check on store, store-conditional, or AMO instruction where effective + privilege mode is S or U:\n - choose a data writable pmp region and address + range\n - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily + the 1st one)\n - if possible, the PMP entry number is a configurable + parameter\n - choose pmpcfg(i).A=NA4\n - single access data store + in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or + U]\n [create scenarios where PMP entries with A=2 (NA4) and with/without + matching permissions\n - check only NA4 defined addresses are matching]\n + TST11-52 (LOWEST-PRIO)\n [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2),\n\ + \ - configure the PMP entry without write permissions for the PMP region\n\ + \ - execute a store, store-conditional, or AMO instruction to that region + (with exact address-matching)\n - check store access-fault exception raised + => FTR04-d]" +- 026_store_MPP_L0_W1_addr_miss: !Subfeature + name: 026_store_MPP_L0_W1_addr_miss + tag: VP_PMP_F011_S053 + next_elt_id: 1 + display_order: 26 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S053_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is clear, the R/W/X + permissions apply only to S and U modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access store, store-conditional, or AMO instruction + from outside defined NA4 address range with write permissions and with L=0\n\ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=1, L=0, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and + mstatus.MPP contains S or U\n\nACCESS\n - execute a store, store-conditional, + or AMO instruction to outside all PMP defined regions\n\nCHECK\n - check + store access-fault exception raised\n\nREUSABILITY\n - if possible, the + PMP entry number (i) is a configurable parameter\n - if possible, the + PMP entry lock (L) is a configurable parameter\n - if possible, the PMP + entry permissions (R,W,X) are configurable parameters\n - if possible, + the PMP entry address-matching mode (A) is a configurable parameter\n \ + \ - if possible, the PMP entry address range (pmpaddr) is a configurable + parameter\n - if possible, the PMP entry associated access address is + a configurable parameter\n - so a single CONFIGURATION function and a + single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e2-2 (refers to + FTR09-d2-2)\n [When the L bit is clear, the R/W/X permissions apply only + to S and U modes]\n FTR09-d2-2 (L=0 refers to FTR08-e2-2)\n[if the privilege + mode of the access is S or U (whatever L), then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\n\nTST11-5x(group) + => FTR01-d\n [PMP check on store, store-conditional, or AMO instruction + where effective privilege mode is S or U:\n - choose a data writable + pmp region and address range\n - choose only one PMP entry (i) ([FTR02-b1]: + maybe mandatorily the 1st one)\n - if possible, the PMP entry number + is a configurable parameter\n - choose pmpcfg(i).A=NA4\n - single + access data store in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP + contains S or U]\n [create scenarios where PMP entries with A=2 (NA4) and + with/without matching permissions\n - check only NA4 defined addresses + are matching]\n TST11-53 (LOWEST-PRIO)\n[with L=0 => FTR08-e2-2 (refers + to FTR09-d2-2),\n - configure the PMP entry with write permissions for + the PMP region\n - execute a store, store-conditional, or AMO instruction + to outside all PMP defined regions\n - check store access-fault exception + raised]" +- 027_store_MPP_L1_W1_addr_hit: !Subfeature + name: 027_store_MPP_L1_W1_addr_hit + tag: VP_PMP_F011_S054 + next_elt_id: 1 + display_order: 27 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S054_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is set, these permissions + are enforced for all privilege modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the L bit is set, then the access succeeds only if the R, W, or X bit + corresponding to the access type is set\n\n{Page 60 Section \"Locking and + Privilege Mode\" Volume II: RISC-V Privileged Architectures V20211203}\n + Locked PMP entries remain locked until the hart is reset" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access store, store-conditional, or AMO instruction + inside defined NA4 address range with write permissions and with L=1\n \ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=1, L=1, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and + mstatus.MPP contains S or U\n\nACCESS\n - execute a store, store-conditional, + or AMO instruction to that region (with exact address-matching)\n\nCHECK\n\ + \ - check no access-fault exception\n\nREUSABILITY\n - if possible, + the PMP entry number (i) is a configurable parameter\n - if possible, + the PMP entry lock (L) is a configurable parameter\n - if possible, the + PMP entry permissions (R,W,X) are configurable parameters\n - if possible, + the PMP entry address-matching mode (A) is a configurable parameter\n \ + \ - if possible, the PMP entry address range (pmpaddr) is a configurable + parameter\n - if possible, the PMP entry associated access address is + a configurable parameter\n - so a single CONFIGURATION function and a + single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1)\n [When the L bit is set, these permissions + are enforced for all privilege modes]\n FTR09-d2-1 (refers to FTR08-e1) + (refers to FTR01-f)\n [if the L bit is set, then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\nFTR08-b\n + [Locked PMP entries remain locked until the hart is reset]\n\nTST11-5x(group) + => FTR01-d\n [PMP check on store, store-conditional, or AMO instruction + where effective privilege mode is S or U:\n - choose a data writable + pmp region and address range\n - choose only one PMP entry (i) ([FTR02-b1]: + maybe mandatorily the 1st one)\n - if possible, the PMP entry number + is a configurable parameter\n - choose pmpcfg(i).A=NA4\n - single + access data store in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP + contains S or U]\n [create scenarios where PMP entries with A=2 (NA4) and + with/without matching permissions\n - check only NA4 defined addresses + are matching]\n TST11-54 (LOWEST-PRIO)\n[with L=1 => FTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1),\n - configure the PMP entry with write + permissions for the PMP region\n - execute a store, store-conditional, + or AMO instruction to that region (with exact address-matching)\n - check + no access-fault exception]" +- 028_store_MPP_L1_W0_addr_hit: !Subfeature + name: 028_store_MPP_L1_W0_addr_hit + tag: VP_PMP_F011_S055 + next_elt_id: 1 + display_order: 28 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S055_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is set, these permissions + are enforced for all privilege modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the L bit is set, then the access succeeds only if the R, W, or X bit + corresponding to the access type is set\n\n{Page 60 Section \"Locking and + Privilege Mode\" Volume II: RISC-V Privileged Architectures V20211203}\n + Locked PMP entries remain locked until the hart is reset\n\n{Page 58 Volume + II: RISC-V Privileged Architectures V20211203}\nAttempting to execute a + store, store-conditional, or AMO instruction which accesses a physical address + within a PMP region without write permissions raises a store access-fault + exception" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access store, store-conditional, or AMO instruction + inside defined NA4 address range without write permissions and with L=1\n\ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=0, L=1, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and + mstatus.MPP contains S or U\n\nACCESS\n - execute a store, store-conditional, + or AMO instruction to that region (with exact address-matching)\n\nCHECK\n\ + \ - check store access-fault exception raised\n\nREUSABILITY\n - if + possible, the PMP entry number (i) is a configurable parameter\n - if + possible, the PMP entry lock (L) is a configurable parameter\n - if possible, + the PMP entry permissions (R,W,X) are configurable parameters\n - if + possible, the PMP entry address-matching mode (A) is a configurable parameter\n\ + \ - if possible, the PMP entry address range (pmpaddr) is a configurable + parameter\n - if possible, the PMP entry associated access address is + a configurable parameter\n - so a single CONFIGURATION function and a + single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1)\n [When the L bit is set, these permissions + are enforced for all privilege modes]\n FTR09-d2-1 (refers to FTR08-e1) + (refers to FTR01-f)\n [if the L bit is set, then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\nFTR08-b\n + [Locked PMP entries remain locked until the hart is reset]\n\nFTR04-d\n + [Attempting to execute a store, store-conditional, or AMO instruction which + accesses a physical address within a PMP region without write permissions + raises a store access-fault exception]\n\nTST11-5x(group) => FTR01-d\n \ + \ [PMP check on store, store-conditional, or AMO instruction where effective + privilege mode is S or U:\n - choose a data writable pmp region and address + range\n - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily + the 1st one)\n - if possible, the PMP entry number is a configurable + parameter\n - choose pmpcfg(i).A=NA4\n - single access data store + in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or + U]\n [create scenarios where PMP entries with A=2 (NA4) and with/without + matching permissions\n - check only NA4 defined addresses are matching]\n + TST11-55 (LOWEST-PRIO)\n [with L=1 => FTR08-e1 (refers to FTR01-f) (refers + to FTR09-d2-1),\n - configure the PMP entry without write permissions for + the PMP region\n - execute a store, store-conditional, or AMO instruction + to that region (with exact address-matching)\n - check store access-fault + exception raised => FTR04-d]" +- 029_store_MPP_L1_W1_addr_miss: !Subfeature + name: 029_store_MPP_L1_W1_addr_miss + tag: VP_PMP_F011_S056 + next_elt_id: 1 + display_order: 29 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F011_S056_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks are applied to all accesses whose effective privilege mode is + S or U\n\n{Page 60 Section \"Locking and Privilege Mode\" Volume II: RISC-V + Privileged Architectures V20211203}\nWhen the L bit is set, these permissions + are enforced for all privilege modes\n\n{Page 60 Section \"Priority and + Matching Logic\" Volume II: RISC-V Privileged Architectures V20211203}\n + if the L bit is set, then the access succeeds only if the R, W, or X bit + corresponding to the access type is set\n\n{Page 60 Section \"Locking and + Privilege Mode\" Volume II: RISC-V Privileged Architectures V20211203}\n + Locked PMP entries remain locked until the hart is reset" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "S or U mode single access store, store-conditional, or AMO instruction + from outside defined NA4 address range with write permissions and with L=1\n\ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=1, L=1, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and + mstatus.MPP contains S or U\n\nACCESS\n - execute a store, store-conditional, + or AMO instruction to outside all PMP defined regions\n\nCHECK\n - check + store access-fault exception raised\n\nREUSABILITY\n - if possible, the + PMP entry number (i) is a configurable parameter\n - if possible, the + PMP entry lock (L) is a configurable parameter\n - if possible, the PMP + entry permissions (R,W,X) are configurable parameters\n - if possible, + the PMP entry address-matching mode (A) is a configurable parameter\n \ + \ - if possible, the PMP entry address range (pmpaddr) is a configurable + parameter\n - if possible, the PMP entry associated access address is + a configurable parameter\n - so a single CONFIGURATION function and a + single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-d\n[PMP checks are applied to all accesses whose effective privilege + mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\nFTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1)\n [When the L bit is set, these permissions + are enforced for all privilege modes]\n FTR09-d2-1 (refers to FTR08-e1) + (refers to FTR01-f)\n [if the L bit is set, then the access succeeds only + if the R, W, or X bit corresponding to the access type is set]\nFTR08-b\n + [Locked PMP entries remain locked until the hart is reset]\n\nTST11-5x(group) + => FTR01-d\n [PMP check on store, store-conditional, or AMO instruction + where effective privilege mode is S or U:\n - choose a data writable + pmp region and address range\n - choose only one PMP entry (i) ([FTR02-b1]: + maybe mandatorily the 1st one)\n - if possible, the PMP entry number + is a configurable parameter\n - choose pmpcfg(i).A=NA4\n - single + access data store in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP + contains S or U]\n [create scenarios where PMP entries with A=2 (NA4) and + with/without matching permissions\n - check only NA4 defined addresses + are matching]\n TST11-56 (LOWEST-PRIO)\n[with L=1 => FTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1),\n - configure the PMP entry with write + permissions for the PMP region\n - execute a store, store-conditional, + or AMO instruction to outside all PMP defined regions\n - check store access-fault + exception raised]" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP012.yml b/verif/docs/VerifPlans/PMP/VP_IP012.yml new file mode 100644 index 00000000000..7f8c4a2e2d2 --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP012.yml @@ -0,0 +1,2052 @@ +!Feature +next_elt_id: 30 +name: cfg NA4 access M (G=0) +id: 12 +display_order: 12 +subfeatures: !!omap +- 000_fetch_L0_X1_addr_hit: !Subfeature + name: 000_fetch_L0_X1_addr_hit + tag: VP_PMP_F012_S011 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S011_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is clear, any M-mode access matching the PMP entry will succeed\n\n + {Page 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nIf the L bit is clear and the privilege mode of + the access is M, the access succeeds" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access instruction fetch inside defined NA4 address + range with execute permissions and with L=0\n - choose an executable + pmp region and address range\n - choose only one PMP entry (i)\n\nCONFIGURATION\n\ + \ - pmpcfg(i): A=NA4, X=1, L=0, R/W:random, with reserve on R=0 & W=1\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\nACCESS\n \ + \ - fetch an instruction from that region (with exact address-matching)\n\ + \nCHECK\n - check no access-fault exception\n\nREUSABILITY\n - if + possible, the PMP entry number (i) is a configurable parameter\n - if + possible, the PMP entry lock (L) is a configurable parameter\n - if possible, + the PMP entry permissions (R,W,X) are configurable parameters\n - if + possible, the PMP entry address-matching mode (A) is a configurable parameter\n\ + \ - if possible, the PMP entry address range (pmpaddr) is a configurable + parameter\n - if possible, the PMP entry associated access address is + a configurable parameter\n - so a single CONFIGURATION function and a + single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e2-1 + (refers to FTR09-d1)\n[When the L bit is clear, any M-mode access matching + the PMP entry will succeed]\nFTR09-d1 (refers to FTR08-e2-1)\n [If the L + bit is clear and the privilege mode of the access is M, the access succeeds]\n + \nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-1x(group) => FTR01-f\n [PMP check + on instruction fetch where effective privilege mode is M:\n - choose + an executable pmp region and address range\n - choose only one PMP entry + (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n - if possible, the + PMP entry number is a configurable parameter\n - choose pmpcfg(i).A=NA4\n\ + \ - single access instruction fetch in M mode]\n [create scenarios where + PMP entries with A=2 (NA4) and with/without matching permissions\n - + check only NA4 defined addresses are matching]\nTST12-11 (LOW-PRIO)\n [with + L=0 => FTR08-e2-1 (refers to FTR09-d1),\n - configure the PMP entry with + execute permissions for the PMP region\n - fetch an instruction from that + region (with exact address-matching)\n - check no access-fault exception]" +- 001_fetch_L0_X0_addr_hit: !Subfeature + name: 001_fetch_L0_X0_addr_hit + tag: VP_PMP_F012_S012 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S012_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is clear, any M-mode access matching the PMP entry will succeed\n\n + {Page 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nIf the L bit is clear and the privilege mode of + the access is M, the access succeeds" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access instruction fetch inside defined NA4 address + range without execute permissions and with L=0\n - choose an executable + pmp region and address range\n - choose only one PMP entry (i)\n\nCONFIGURATION\n\ + \ - pmpcfg(i): A=NA4, X=0, L=0, R/W:random, with reserve on R=0 & W=1\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\nACCESS\n \ + \ - fetch an instruction from that region (with exact address-matching)\n\ + \nCHECK\n - check no access-fault exception\n\nREUSABILITY\n - if + possible, the PMP entry number (i) is a configurable parameter\n - if + possible, the PMP entry lock (L) is a configurable parameter\n - if possible, + the PMP entry permissions (R,W,X) are configurable parameters\n - if + possible, the PMP entry address-matching mode (A) is a configurable parameter\n\ + \ - if possible, the PMP entry address range (pmpaddr) is a configurable + parameter\n - if possible, the PMP entry associated access address is + a configurable parameter\n - so a single CONFIGURATION function and a + single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e2-1 + (refers to FTR09-d1)\n[When the L bit is clear, any M-mode access matching + the PMP entry will succeed]\nFTR09-d1 (refers to FTR08-e2-1)\n [If the L + bit is clear and the privilege mode of the access is M, the access succeeds]\n + \nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-1x(group) => FTR01-f\n [PMP check + on instruction fetch where effective privilege mode is M:\n - choose + an executable pmp region and address range\n - choose only one PMP entry + (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n - if possible, the + PMP entry number is a configurable parameter\n - choose pmpcfg(i).A=NA4\n\ + \ - single access instruction fetch in M mode]\n [create scenarios where + PMP entries with A=2 (NA4) and with/without matching permissions\n - + check only NA4 defined addresses are matching]\nTST12-12 (LOW-PRIO)\n [with + L=0 => FTR08-e2-1 (refers to FTR09-d1),\n - configure the PMP entry without + execute permissions for the PMP region\n - fetch an instruction from that + region (with exact address-matching)\n - check no access-fault exception]" +- 002_fetch_L0_X1_addr_miss: !Subfeature + name: 002_fetch_L0_X1_addr_miss + tag: VP_PMP_F012_S013 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S013_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is clear, any M-mode access matching the PMP entry will succeed\n\n + {Page 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nIf the L bit is clear and the privilege mode of + the access is M, the access succeeds" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access instruction fetch from outside defined + NA4 address range with execute permissions and with L=0\n - choose an + executable pmp region and address range\n - choose only one PMP entry + (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, X=1, L=0, R/W:random, with + reserve on R=0 & W=1\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\ + \nACCESS\n - fetch an instruction from outside all PMP defined regions\n\ + \nCHECK\n - check no access-fault exception (Feature: \"no cfg matching\"\ + )\n\nREUSABILITY\n - if possible, the PMP entry number (i) is a configurable + parameter\n - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e2-1 + (refers to FTR09-d1)\n[When the L bit is clear, any M-mode access matching + the PMP entry will succeed]\nFTR09-d1 (refers to FTR08-e2-1)\n [If the L + bit is clear and the privilege mode of the access is M, the access succeeds]\n + \nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-1x(group) => FTR01-f\n [PMP check + on instruction fetch where effective privilege mode is M:\n - choose + an executable pmp region and address range\n - choose only one PMP entry + (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n - if possible, the + PMP entry number is a configurable parameter\n - choose pmpcfg(i).A=NA4\n\ + \ - single access instruction fetch in M mode]\n [create scenarios where + PMP entries with A=2 (NA4) and with/without matching permissions\n - + check only NA4 defined addresses are matching]\nTST12-13 (LOW-PRIO)\n [with + L=0 => FTR08-e2-1 (refers to FTR09-d1),\n - configure the PMP entry with + execute permissions for the PMP region\n - fetch an instruction from outside + all PMP defined regions\n - check no access-fault exception] //TODO: CHECK + IF M-MODE ALLOWED" +- 003_fetch_L1_X1_addr_hit: !Subfeature + name: 003_fetch_L1_X1_addr_hit + tag: VP_PMP_F012_S014 + next_elt_id: 1 + display_order: 3 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S014_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is set, these permissions are enforced for all privilege modes\n\n{Page + 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nif the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access instruction fetch inside defined NA4 address + range with execute permissions and with L=1\n - choose an executable + pmp region and address range\n - choose only one PMP entry (i)\n\nCONFIGURATION\n\ + \ - pmpcfg(i): A=NA4, X=1, L=1, R/W:random, with reserve on R=0 & W=1\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\nACCESS\n \ + \ - fetch an instruction from that region (with exact address-matching)\n\ + \nCHECK\n - check no access-fault exception\n\nREUSABILITY\n - if + possible, the PMP entry number (i) is a configurable parameter\n - if + possible, the PMP entry lock (L) is a configurable parameter\n - if possible, + the PMP entry permissions (R,W,X) are configurable parameters\n - if + possible, the PMP entry address-matching mode (A) is a configurable parameter\n\ + \ - if possible, the PMP entry address range (pmpaddr) is a configurable + parameter\n - if possible, the PMP entry associated access address is + a configurable parameter\n - so a single CONFIGURATION function and a + single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e1 + (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the L bit is set, these + permissions are enforced for all privilege modes]\nFTR09-d2-1 (refers to + FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set]\n\n + FTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-1x(group) => FTR01-f\n [PMP check + on instruction fetch where effective privilege mode is M:\n - choose + an executable pmp region and address range\n - choose only one PMP entry + (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n - if possible, the + PMP entry number is a configurable parameter\n - choose pmpcfg(i).A=NA4\n\ + \ - single access instruction fetch in M mode]\n [create scenarios where + PMP entries with A=2 (NA4) and with/without matching permissions\n - + check only NA4 defined addresses are matching]\nTST12-14 (HIGH-PRIO)\n [with + L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1),\n - configure + the PMP entry with execute permissions for the PMP region\n - fetch an + instruction from that region (with exact address-matching)\n - check no + access-fault exception]" +- 004_fetch_L1_X0_addr_hit: !Subfeature + name: 004_fetch_L1_X0_addr_hit + tag: VP_PMP_F012_S015 + next_elt_id: 1 + display_order: 4 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S015_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is set, these permissions are enforced for all privilege modes\n\n{Page + 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nif the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set\n\n{Page + 58 Volume II: RISC-V Privileged Architectures V20211203}\nAttempting to + fetch an instruction from a PMP region that does not have execute permissions + raises an instruction access-fault exception" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access instruction fetch inside defined NA4 address + range without execute permissions and with L=1\n - choose an executable + pmp region and address range\n - choose only one PMP entry (i)\n\nCONFIGURATION\n\ + \ - pmpcfg(i): A=NA4, X=0, L=1, R/W:random, with reserve on R=0 & W=1\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\nACCESS\n \ + \ - fetch an instruction from that region (with exact address-matching)\n\ + \nCHECK\n - check instruction fetch access-fault exception raised\n\n\ + REUSABILITY\n - if possible, the PMP entry number (i) is a configurable + parameter\n - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e1 + (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the L bit is set, these + permissions are enforced for all privilege modes]\nFTR09-d2-1 (refers to + FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set]\n\n + FTR04-b\n[Attempting to fetch an instruction from a PMP region that does + not have execute permissions raises an instruction access-fault exception]\n + \nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n \nTST12-1x(group) => FTR01-f\n [PMP check + on instruction fetch where effective privilege mode is M:\n - choose + an executable pmp region and address range\n - choose only one PMP entry + (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n - if possible, the + PMP entry number is a configurable parameter\n - choose pmpcfg(i).A=NA4\n\ + \ - single access instruction fetch in M mode]\n [create scenarios where + PMP entries with A=2 (NA4) and with/without matching permissions\n - + check only NA4 defined addresses are matching]\nTST12-15 (MEDIUM-PRIO)\n + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1),\n - configure + the PMP entry without execute permissions for the PMP region\n - fetch + an instruction from that region (with exact address-matching)\n - check + instruction fetch access-fault exception raised => FTR04-b]" +- 005_fetch_L1_X1_addr_miss: !Subfeature + name: 005_fetch_L1_X1_addr_miss + tag: VP_PMP_F012_S016 + next_elt_id: 1 + display_order: 5 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S016_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is set, these permissions are enforced for all privilege modes\n\n{Page + 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nif the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access instruction fetch from outside defined + NA4 address range with execute permissions and with L=1\n - choose an + executable pmp region and address range\n - choose only one PMP entry + (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, X=1, L=1, R/W:random, with + reserve on R=0 & W=1\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\ + \nACCESS\n - fetch an instruction from outside all PMP defined regions\n\ + \nCHECK\n - check no access-fault exception (Feature: \"no cfg matching\"\ + )\n\nREUSABILITY\n - if possible, the PMP entry number (i) is a configurable + parameter\n - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e1 + (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the L bit is set, these + permissions are enforced for all privilege modes]\nFTR09-d2-1 (refers to + FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set]\n\n + FTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-1x(group) => FTR01-f\n [PMP check + on instruction fetch where effective privilege mode is M:\n - choose + an executable pmp region and address range\n - choose only one PMP entry + (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n - if possible, the + PMP entry number is a configurable parameter\n - choose pmpcfg(i).A=NA4\n\ + \ - single access instruction fetch in M mode]\n [create scenarios where + PMP entries with A=2 (NA4) and with/without matching permissions\n - + check only NA4 defined addresses are matching]\nTST12-16 (HIGH-PRIO)\n [with + L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1),\n - configure + the PMP entry with execute permissions for the PMP region\n - fetch an + instruction from outside all PMP defined regions\n - check no access-fault + exception] //TODO: CHECK IF M-MODE ALLOWED" +- 006_load_L0_R1_addr_hit: !Subfeature + name: 006_load_L0_R1_addr_hit + tag: VP_PMP_F012_S021 + next_elt_id: 1 + display_order: 6 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S021_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is clear, any M-mode access matching the PMP entry will succeed\n\n + {Page 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nIf the L bit is clear and the privilege mode of + the access is M, the access succeeds" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access load or load-reserved instruction inside + defined NA4 address range with read permissions and with L=0\n - choose + a readable pmp region and address range\n - choose only one PMP entry + (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=1, L=0, X/W:random\n \ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\nACCESS\n - + execute a load or load-reserved instruction from that region (with exact + address-matching)\n\nCHECK\n - check no access-fault exception\n\nREUSABILITY\n\ + \ - if possible, the PMP entry number (i) is a configurable parameter\n\ + \ - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e2-1 + (refers to FTR09-d1)\n[When the L bit is clear, any M-mode access matching + the PMP entry will succeed]\nFTR09-d1 (refers to FTR08-e2-1)\n [If the L + bit is clear and the privilege mode of the access is M, the access succeeds]\n + \nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-2x(group) => FTR01-f\n [PMP check + on load or load-reserved instruction where effective privilege mode is M:\n\ + \ - choose a data readable pmp region and address range\n - choose + only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n \ + \ - if possible, the PMP entry number is a configurable parameter\n - + choose pmpcfg(i).A=NA4\n - single access data load in M mode when the + bit mstatus.MPRV=0]\n [create scenarios where PMP entries with A=2 (NA4) + and with/without matching permissions\n - check only NA4 defined addresses + are matching]\nTST12-21 (LOW-PRIO)\n[with L=0 => FTR08-e2-1 (refers to \ + \ FTR09-d1)\n - configure the PMP entry with read permissions for the PMP + region\n - execute a load or load-reserved instruction from that region + (with exact address-matching)\n - check no access-fault exception]" +- 007_load_L0_R0_addr_hit: !Subfeature + name: 007_load_L0_R0_addr_hit + tag: VP_PMP_F012_S022 + next_elt_id: 1 + display_order: 7 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S022_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is clear, any M-mode access matching the PMP entry will succeed\n\n + {Page 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nIf the L bit is clear and the privilege mode of + the access is M, the access succeeds" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access load or load-reserved instruction inside + defined NA4 address range without read permissions and with L=0\n - choose + a readable pmp region and address range\n - choose only one PMP entry + (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=0, L=0, X/W:random\n \ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\nACCESS\n - + execute a load or load-reserved instruction from that region (with exact + address-matching)\n\nCHECK\n - check no access-fault exception\n\nREUSABILITY\n\ + \ - if possible, the PMP entry number (i) is a configurable parameter\n\ + \ - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e2-1 + (refers to FTR09-d1)\n[When the L bit is clear, any M-mode access matching + the PMP entry will succeed]\nFTR09-d1 (refers to FTR08-e2-1)\n [If the L + bit is clear and the privilege mode of the access is M, the access succeeds]\n + \nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-2x(group) => FTR01-f\n [PMP check + on load or load-reserved instruction where effective privilege mode is M:\n\ + \ - choose a data readable pmp region and address range\n - choose + only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n \ + \ - if possible, the PMP entry number is a configurable parameter\n - + choose pmpcfg(i).A=NA4\n - single access data load in M mode when the + bit mstatus.MPRV=0]\n [create scenarios where PMP entries with A=2 (NA4) + and with/without matching permissions\n - check only NA4 defined addresses + are matching]\nTST12-22 (LOW-PRIO)\n[with L=0 => FTR08-e2-1 (refers to \ + \ FTR09-d1)\n - configure the PMP entry without read permissions for the + PMP region\n - execute a load or load-reserved instruction from that region + (with exact address-matching)\n - check no access-fault exception]" +- 008_load_L0_R1_addr_miss: !Subfeature + name: 008_load_L0_R1_addr_miss + tag: VP_PMP_F012_S023 + next_elt_id: 1 + display_order: 8 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S023_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is clear, any M-mode access matching the PMP entry will succeed\n\n + {Page 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nIf the L bit is clear and the privilege mode of + the access is M, the access succeeds" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access load or load-reserved instruction from + outside defined NA4 address range with read permissions and with L=0\n \ + \ - choose a readable pmp region and address range\n - choose only + one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=1, L=0, X/W:random\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\nACCESS\n \ + \ - execute a load or load-reserved instruction from outside all PMP defined + regions\n\nCHECK\n - check no access-fault exception (Feature: \"no cfg + matching\")\n\nREUSABILITY\n - if possible, the PMP entry number (i) + is a configurable parameter\n - if possible, the PMP entry lock (L) is + a configurable parameter\n - if possible, the PMP entry permissions (R,W,X) + are configurable parameters\n - if possible, the PMP entry address-matching + mode (A) is a configurable parameter\n - if possible, the PMP entry address + range (pmpaddr) is a configurable parameter\n - if possible, the PMP + entry associated access address is a configurable parameter\n - so a + single CONFIGURATION function and a single ACCESS function can be reused + and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e2-1 + (refers to FTR09-d1)\n[When the L bit is clear, any M-mode access matching + the PMP entry will succeed]\nFTR09-d1 (refers to FTR08-e2-1)\n [If the L + bit is clear and the privilege mode of the access is M, the access succeeds]\n + \nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-2x(group) => FTR01-f\n [PMP check + on load or load-reserved instruction where effective privilege mode is M:\n\ + \ - choose a data readable pmp region and address range\n - choose + only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n \ + \ - if possible, the PMP entry number is a configurable parameter\n - + choose pmpcfg(i).A=NA4\n - single access data load in M mode when the + bit mstatus.MPRV=0]\n [create scenarios where PMP entries with A=2 (NA4) + and with/without matching permissions\n - check only NA4 defined addresses + are matching]\nTST12-23 (LOW-PRIO)\n[with L=0 => FTR08-e2-1 (refers to \ + \ FTR09-d1)\n - configure the PMP entry with read permissions for the PMP + region\n - execute a load or load-reserved instruction from outside all + PMP defined regions\n - check no access-fault exception] //TODO: CHECK + IF M-MODE ALLOWED" +- 009_load_L1_R1_addr_hit: !Subfeature + name: 009_load_L1_R1_addr_hit + tag: VP_PMP_F012_S024 + next_elt_id: 1 + display_order: 9 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S024_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is set, these permissions are enforced for all privilege modes\n\n{Page + 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nif the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access load or load-reserved instruction inside + defined NA4 address range with read permissions and with L=1\n - choose + a readable pmp region and address range\n - choose only one PMP entry + (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=1, L=1, X/W:random\n \ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\nACCESS\n - + execute a load or load-reserved instruction from that region (with exact + address-matching)\n\nCHECK\n - check no access-fault exception\n\nREUSABILITY\n\ + \ - if possible, the PMP entry number (i) is a configurable parameter\n\ + \ - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e1 + (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the L bit is set, these + permissions are enforced for all privilege modes]\nFTR09-d2-1 (refers to + FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set]\n\n + FTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-2x(group) => FTR01-f\n [PMP check + on load or load-reserved instruction where effective privilege mode is M:\n\ + \ - choose a data readable pmp region and address range\n - choose + only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n \ + \ - if possible, the PMP entry number is a configurable parameter\n - + choose pmpcfg(i).A=NA4\n - single access data load in M mode when the + bit mstatus.MPRV=0]\n [create scenarios where PMP entries with A=2 (NA4) + and with/without matching permissions\n - check only NA4 defined addresses + are matching]\nTST12-24 (HIGH-PRIO)\n[with L=1 => FTR08-e1 (refers to FTR01-f) + (refers to FTR09-d2-1),\n - configure the PMP entry with read permissions + for the PMP region\n - execute a load or load-reserved instruction from + that region (with exact address-matching)\n - check no access-fault exception]" +- 010_load_L1_R0_addr_hit: !Subfeature + name: 010_load_L1_R0_addr_hit + tag: VP_PMP_F012_S025 + next_elt_id: 1 + display_order: 10 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S025_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is set, these permissions are enforced for all privilege modes\n\n{Page + 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nif the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set\n\n{Page + 58 Volume II: RISC-V Privileged Architectures V20211203}\nAttempting to + execute a load or load-reserved instruction which accesses a physical address + within a PMP region without read permissions raises a load access-fault + exception" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access load or load-reserved instruction inside + defined NA4 address range without read permissions and with L=1\n - choose + a readable pmp region and address range\n - choose only one PMP entry + (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=0, L=1, X/W:random\n \ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\nACCESS\n - + execute a load or load-reserved instruction from that region (with exact + address-matching)\n\nCHECK\n - check load access-fault exception raised\n\ + \nREUSABILITY\n - if possible, the PMP entry number (i) is a configurable + parameter\n - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e1 + (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the L bit is set, these + permissions are enforced for all privilege modes]\nFTR09-d2-1 (refers to + FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set]\n\n + FTR04-c\n[Attempting to execute a load or load-reserved instruction which + accesses a physical address within a PMP region without read permissions + raises a load access-fault exception]\n\nFTR02-b1\n[the lowest-numbered + PMP CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nTST12-2x(group) => FTR01-f\n [PMP check on load or load-reserved instruction + where effective privilege mode is M:\n - choose a data readable pmp region + and address range\n - choose only one PMP entry (i) ([FTR02-b1]: maybe + mandatorily the 1st one)\n - if possible, the PMP entry number is a configurable + parameter\n - choose pmpcfg(i).A=NA4\n - single access data load in + M mode when the bit mstatus.MPRV=0]\n [create scenarios where PMP entries + with A=2 (NA4) and with/without matching permissions\n - check only NA4 + defined addresses are matching]\nTST12-25 (MEDIUM-PRIO)\n[with L=1 => FTR08-e1 + (refers to FTR01-f) (refers to FTR09-d2-1),\n - configure the PMP entry + without read permissions for the PMP region\n - execute a load or load-reserved + instruction from that region (with exact address-matching)\n - check load + access-fault exception raised => FTR04-c]" +- 011_load_L1_R1_addr_miss: !Subfeature + name: 011_load_L1_R1_addr_miss + tag: VP_PMP_F012_S026 + next_elt_id: 1 + display_order: 11 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S026_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is set, these permissions are enforced for all privilege modes\n\n{Page + 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nif the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access load or load-reserved instruction from + outside defined NA4 address range with read permissions and with L=1\n \ + \ - choose a readable pmp region and address range\n - choose only + one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=1, L=1, X/W:random\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\nACCESS\n \ + \ - execute a load or load-reserved instruction from outside all PMP defined + regions\n\nCHECK\n - check no access-fault exception (Feature: \"no cfg + matching\")\n\nREUSABILITY\n - if possible, the PMP entry number (i) + is a configurable parameter\n - if possible, the PMP entry lock (L) is + a configurable parameter\n - if possible, the PMP entry permissions (R,W,X) + are configurable parameters\n - if possible, the PMP entry address-matching + mode (A) is a configurable parameter\n - if possible, the PMP entry address + range (pmpaddr) is a configurable parameter\n - if possible, the PMP + entry associated access address is a configurable parameter\n - so a + single CONFIGURATION function and a single ACCESS function can be reused + and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e1 + (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the L bit is set, these + permissions are enforced for all privilege modes]\nFTR09-d2-1 (refers to + FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set]\n\n + FTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-2x(group) => FTR01-f\n [PMP check + on load or load-reserved instruction where effective privilege mode is M:\n\ + \ - choose a data readable pmp region and address range\n - choose + only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n \ + \ - if possible, the PMP entry number is a configurable parameter\n - + choose pmpcfg(i).A=NA4\n - single access data load in M mode when the + bit mstatus.MPRV=0]\n [create scenarios where PMP entries with A=2 (NA4) + and with/without matching permissions\n - check only NA4 defined addresses + are matching]\nTST12-26 (HIGH-PRIO)\n[with L=1 => FTR08-e1 (refers to FTR01-f) + (refers to FTR09-d2-1),\n - configure the PMP entry with read permissions + for the PMP region\n - execute a load or load-reserved instruction from + outside all PMP defined regions\n - check no access-fault exception] //TODO: + CHECK IF M-MODE ALLOWED" +- 012_store_L0_W1_addr_hit: !Subfeature + name: 012_store_L0_W1_addr_hit + tag: VP_PMP_F012_S031 + next_elt_id: 1 + display_order: 12 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S031_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is clear, any M-mode access matching the PMP entry will succeed\n\n + {Page 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nIf the L bit is clear and the privilege mode of + the access is M, the access succeeds" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access store, store-conditional, or AMO instruction + inside defined NA4 address range with write permissions and with L=0\n \ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=1, L=0, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\n\ + ACCESS\n - execute a store, store-conditional, or AMO instruction to + that region (with exact address-matching)\n\nCHECK\n - check no access-fault + exception\n\nREUSABILITY\n - if possible, the PMP entry number (i) is + a configurable parameter\n - if possible, the PMP entry lock (L) is a + configurable parameter\n - if possible, the PMP entry permissions (R,W,X) + are configurable parameters\n - if possible, the PMP entry address-matching + mode (A) is a configurable parameter\n - if possible, the PMP entry address + range (pmpaddr) is a configurable parameter\n - if possible, the PMP + entry associated access address is a configurable parameter\n - so a + single CONFIGURATION function and a single ACCESS function can be reused + and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e2-1 + (refers to FTR09-d1)\n[When the L bit is clear, any M-mode access matching + the PMP entry will succeed]\nFTR09-d1 (refers to FTR08-e2-1)\n [If the L + bit is clear and the privilege mode of the access is M, the access succeeds]\n + \nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-3x(group) => FTR01-f\n [PMP check + on store, store-conditional, or AMO instruction where effective privilege + mode is M:\n - choose a data writable pmp region and address range\n\ + \ - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the + 1st one)\n - if possible, the PMP entry number is a configurable parameter\n\ + \ - choose pmpcfg(i).A=NA4\n - single access data store in M mode + when the bit mstatus.MPRV=0]\n [create scenarios where PMP entries with + A=2 (NA4) and with/without matching permissions\n - check only NA4 defined + addresses are matching]\nTST12-31 (LOW-PRIO)\n[with L=0 => FTR08-e2-1 (refers + to FTR09-d1)\n - configure the PMP entry with write permissions for the + PMP region\n - execute a store, store-conditional, or AMO instruction to + that region (with exact address-matching)\n - check no access-fault exception]" +- 013_store_L0_W0_addr_hit: !Subfeature + name: 013_store_L0_W0_addr_hit + tag: VP_PMP_F012_S032 + next_elt_id: 1 + display_order: 13 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S032_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is clear, any M-mode access matching the PMP entry will succeed\n\n + {Page 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nIf the L bit is clear and the privilege mode of + the access is M, the access succeeds" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access store, store-conditional, or AMO instruction + inside defined NA4 address range without write permissions and with L=0\n\ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=0, L=0, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\n\ + ACCESS\n - execute a store, store-conditional, or AMO instruction to + that region (with exact address-matching)\n\nCHECK\n - check no access-fault + exception\n\nREUSABILITY\n - if possible, the PMP entry number (i) is + a configurable parameter\n - if possible, the PMP entry lock (L) is a + configurable parameter\n - if possible, the PMP entry permissions (R,W,X) + are configurable parameters\n - if possible, the PMP entry address-matching + mode (A) is a configurable parameter\n - if possible, the PMP entry address + range (pmpaddr) is a configurable parameter\n - if possible, the PMP + entry associated access address is a configurable parameter\n - so a + single CONFIGURATION function and a single ACCESS function can be reused + and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e2-1 + (refers to FTR09-d1)\n[When the L bit is clear, any M-mode access matching + the PMP entry will succeed]\nFTR09-d1 (refers to FTR08-e2-1)\n [If the L + bit is clear and the privilege mode of the access is M, the access succeeds]\n + \nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-3x(group) => FTR01-f\n [PMP check + on store, store-conditional, or AMO instruction where effective privilege + mode is M:\n - choose a data writable pmp region and address range\n\ + \ - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the + 1st one)\n - if possible, the PMP entry number is a configurable parameter\n\ + \ - choose pmpcfg(i).A=NA4\n - single access data store in M mode + when the bit mstatus.MPRV=0]\n [create scenarios where PMP entries with + A=2 (NA4) and with/without matching permissions\n - check only NA4 defined + addresses are matching]\nTST12-32 (LOW-PRIO)\n[with L=0 => FTR08-e2-1 (refers + to FTR09-d1)\n - configure the PMP entry without write permissions for + the PMP region\n - execute a store, store-conditional, or AMO instruction + to that region (with exact address-matching)\n - check no access-fault + exception]" +- 014_store_L0_W1_addr_miss: !Subfeature + name: 014_store_L0_W1_addr_miss + tag: VP_PMP_F012_S033 + next_elt_id: 1 + display_order: 14 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S033_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is clear, any M-mode access matching the PMP entry will succeed\n\n + {Page 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nIf the L bit is clear and the privilege mode of + the access is M, the access succeeds" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access store, store-conditional, or AMO instruction + from outside defined NA4 address range with write permissions and with L=0\n\ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=1, L=0, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\n\ + ACCESS\n - execute a store, store-conditional, or AMO instruction to + outside all PMP defined regions\n\nCHECK\n - check no access-fault exception + (Feature: \"no cfg matching\")\n\nREUSABILITY\n - if possible, the PMP + entry number (i) is a configurable parameter\n - if possible, the PMP + entry lock (L) is a configurable parameter\n - if possible, the PMP entry + permissions (R,W,X) are configurable parameters\n - if possible, the + PMP entry address-matching mode (A) is a configurable parameter\n - if + possible, the PMP entry address range (pmpaddr) is a configurable parameter\n\ + \ - if possible, the PMP entry associated access address is a configurable + parameter\n - so a single CONFIGURATION function and a single ACCESS + function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e2-1 + (refers to FTR09-d1)\n[When the L bit is clear, any M-mode access matching + the PMP entry will succeed]\nFTR09-d1 (refers to FTR08-e2-1)\n [If the L + bit is clear and the privilege mode of the access is M, the access succeeds]\n + \nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-3x(group) => FTR01-f\n [PMP check + on store, store-conditional, or AMO instruction where effective privilege + mode is M:\n - choose a data writable pmp region and address range\n\ + \ - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the + 1st one)\n - if possible, the PMP entry number is a configurable parameter\n\ + \ - choose pmpcfg(i).A=NA4\n - single access data store in M mode + when the bit mstatus.MPRV=0]\n [create scenarios where PMP entries with + A=2 (NA4) and with/without matching permissions\n - check only NA4 defined + addresses are matching]\nTST12-33 (LOW-PRIO)\n[with L=0 => FTR08-e2-1 (refers + to FTR09-d1)\n - configure the PMP entry with write permissions for the + PMP region\n - execute a store, store-conditional, or AMO instruction to + outside all PMP defined regions\n - check no access-fault exception] //TODO: + CHECK IF M-MODE ALLOWED" +- 015_store_L1_W1_addr_hit: !Subfeature + name: 015_store_L1_W1_addr_hit + tag: VP_PMP_F012_S034 + next_elt_id: 1 + display_order: 15 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S034_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is set, these permissions are enforced for all privilege modes\n\n{Page + 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nif the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access store, store-conditional, or AMO instruction + inside defined NA4 address range with write permissions and with L=1\n \ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=1, L=1, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\n\ + ACCESS\n - execute a store, store-conditional, or AMO instruction to + that region (with exact address-matching)\n\nCHECK\n - check no access-fault + exception\n\nREUSABILITY\n - if possible, the PMP entry number (i) is + a configurable parameter\n - if possible, the PMP entry lock (L) is a + configurable parameter\n - if possible, the PMP entry permissions (R,W,X) + are configurable parameters\n - if possible, the PMP entry address-matching + mode (A) is a configurable parameter\n - if possible, the PMP entry address + range (pmpaddr) is a configurable parameter\n - if possible, the PMP + entry associated access address is a configurable parameter\n - so a + single CONFIGURATION function and a single ACCESS function can be reused + and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e1 + (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the L bit is set, these + permissions are enforced for all privilege modes]\nFTR09-d2-1 (refers to + FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set]\n\n + FTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-3x(group) => FTR01-f\n [PMP check + on store, store-conditional, or AMO instruction where effective privilege + mode is M:\n - choose a data writable pmp region and address range\n\ + \ - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the + 1st one)\n - if possible, the PMP entry number is a configurable parameter\n\ + \ - choose pmpcfg(i).A=NA4\n - single access data store in M mode + when the bit mstatus.MPRV=0]\n [create scenarios where PMP entries with + A=2 (NA4) and with/without matching permissions\n - check only NA4 defined + addresses are matching]\nTST12-34 (HIGH-PRIO)\n[with L=1 => FTR08-e1 (refers + to FTR01-f) (refers to FTR09-d2-1),\n - configure the PMP entry with write + permissions for the PMP region\n - execute a store, store-conditional, + or AMO instruction to that region (with exact address-matching)\n - check + no access-fault exception]" +- 016_store_L1_W0_addr_hit: !Subfeature + name: 016_store_L1_W0_addr_hit + tag: VP_PMP_F012_S035 + next_elt_id: 1 + display_order: 16 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S035_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is set, these permissions are enforced for all privilege modes\n\n{Page + 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nif the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set\n\n{Page + 58 Volume II: RISC-V Privileged Architectures V20211203}\nAttempting to + execute a store, store-conditional, or AMO instruction which accesses a + physical address within a PMP region without write permissions raises a + store access-fault exception" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access store, store-conditional, or AMO instruction + inside defined NA4 address range without write permissions and with L=1\n\ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=0, L=1, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\n\ + ACCESS\n - execute a store, store-conditional, or AMO instruction to + that region (with exact address-matching)\n\nCHECK\n - check store access-fault + exception raised\n\nREUSABILITY\n - if possible, the PMP entry number + (i) is a configurable parameter\n - if possible, the PMP entry lock (L) + is a configurable parameter\n - if possible, the PMP entry permissions + (R,W,X) are configurable parameters\n - if possible, the PMP entry address-matching + mode (A) is a configurable parameter\n - if possible, the PMP entry address + range (pmpaddr) is a configurable parameter\n - if possible, the PMP + entry associated access address is a configurable parameter\n - so a + single CONFIGURATION function and a single ACCESS function can be reused + and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e1 + (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the L bit is set, these + permissions are enforced for all privilege modes]\nFTR09-d2-1 (refers to + FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set]\n\n + FTR04-d\n[Attempting to execute a store, store-conditional, or AMO instruction + which accesses a physical address within a PMP region without write permissions + raises a store access-fault exception]\n\nFTR02-b1\n[the lowest-numbered + PMP CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \n TST12-3x(group) => FTR01-f\n [PMP check on store, store-conditional, + or AMO instruction where effective privilege mode is M:\n - choose a + data writable pmp region and address range\n - choose only one PMP entry + (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n - if possible, the + PMP entry number is a configurable parameter\n - choose pmpcfg(i).A=NA4\n\ + \ - single access data store in M mode when the bit mstatus.MPRV=0]\n\ + \ [create scenarios where PMP entries with A=2 (NA4) and with/without matching + permissions\n - check only NA4 defined addresses are matching]\nTST12-35 + (MEDIUM-PRIO)\n[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1),\n\ + \ - configure the PMP entry without write permissions for the PMP region\n\ + \ - execute a store, store-conditional, or AMO instruction to that region + (with exact address-matching)\n - check store access-fault exception raised + => FTR04-d]" +- 017_store_L1_W1_addr_miss: !Subfeature + name: 017_store_L1_W1_addr_miss + tag: VP_PMP_F012_S036 + next_elt_id: 1 + display_order: 17 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S036_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is set, these permissions are enforced for all privilege modes\n\n{Page + 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nif the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access store, store-conditional, or AMO instruction + from outside defined NA4 address range with write permissions and with L=1\n\ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=1, L=1, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=0\n\n\ + ACCESS\n - execute a store, store-conditional, or AMO instruction to + outside all PMP defined regions\n\nCHECK\n - check no access-fault exception + (Feature: \"no cfg matching\")\n\nREUSABILITY\n - if possible, the PMP + entry number (i) is a configurable parameter\n - if possible, the PMP + entry lock (L) is a configurable parameter\n - if possible, the PMP entry + permissions (R,W,X) are configurable parameters\n - if possible, the + PMP entry address-matching mode (A) is a configurable parameter\n - if + possible, the PMP entry address range (pmpaddr) is a configurable parameter\n\ + \ - if possible, the PMP entry associated access address is a configurable + parameter\n - so a single CONFIGURATION function and a single ACCESS + function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e1 + (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the L bit is set, these + permissions are enforced for all privilege modes]\nFTR09-d2-1 (refers to + FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set]\n\n + FTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-3x(group) => FTR01-f\n [PMP check + on store, store-conditional, or AMO instruction where effective privilege + mode is M:\n - choose a data writable pmp region and address range\n\ + \ - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the + 1st one)\n - if possible, the PMP entry number is a configurable parameter\n\ + \ - choose pmpcfg(i).A=NA4\n - single access data store in M mode + when the bit mstatus.MPRV=0]\n [create scenarios where PMP entries with + A=2 (NA4) and with/without matching permissions\n - check only NA4 defined + addresses are matching]\nTST12-36 (HIGH-PRIO)\n[with L=1 => FTR08-e1 (refers + to FTR01-f) (refers to FTR09-d2-1),\n - configure the PMP entry with write + permissions for the PMP region\n - execute a store, store-conditional, + or AMO instruction to outside all PMP defined regions\n - check no access-fault + exception] //TODO: CHECK IF M-MODE ALLOWED" +- 018_load_MPP_L0_R1_addr_hit: !Subfeature + name: 018_load_MPP_L0_R1_addr_hit + tag: VP_PMP_F012_S041 + next_elt_id: 1 + display_order: 18 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S041_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is clear, any M-mode access matching the PMP entry will succeed\n\n + {Page 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nIf the L bit is clear and the privilege mode of + the access is M, the access succeeds" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access load or load-reserved instruction inside + defined NA4 address range with read permissions and with L=0\n - choose + a readable pmp region and address range\n - choose only one PMP entry + (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=1, L=0, X/W:random\n \ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and mstatus.MPP + contains M (TODO: CHECK IF MAKING SENSE)\n\nACCESS\n - execute a load + or load-reserved instruction from that region (with exact address-matching)\n\ + \nCHECK\n - check no access-fault exception\n\nREUSABILITY\n - if + possible, the PMP entry number (i) is a configurable parameter\n - if + possible, the PMP entry lock (L) is a configurable parameter\n - if possible, + the PMP entry permissions (R,W,X) are configurable parameters\n - if + possible, the PMP entry address-matching mode (A) is a configurable parameter\n\ + \ - if possible, the PMP entry address range (pmpaddr) is a configurable + parameter\n - if possible, the PMP entry associated access address is + a configurable parameter\n - so a single CONFIGURATION function and a + single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e2-1 + (refers to FTR09-d1)\n[When the L bit is clear, any M-mode access matching + the PMP entry will succeed]\nFTR09-d1 (refers to FTR08-e2-1)\n [If the L + bit is clear and the privilege mode of the access is M, the access succeeds]\n + \nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-4x(group) => FTR01-f\n [PMP check + on load or load-reserved instruction where effective privilege mode is M:\n\ + \ - choose a data readable pmp region and address range\n - choose + only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n \ + \ - if possible, the PMP entry number is a configurable parameter\n - + choose pmpcfg(i).A=NA4\n - single access data load in any mode when the + bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING + SENSE)]\n [create scenarios where PMP entries with A=2 (NA4) and with/without + matching permissions\n - check only NA4 defined addresses are matching]\n + TST12-41 (LOWEST-PRIO)\n[with L=0 => FTR08-e2-1 (refers to FTR09-d1)\n\ + \ - configure the PMP entry with read permissions for the PMP region\n\ + \ - execute a load or load-reserved instruction from that region (with + exact address-matching)\n - check no access-fault exception]" +- 019_load_MPP_L0_R0_addr_hit: !Subfeature + name: 019_load_MPP_L0_R0_addr_hit + tag: VP_PMP_F012_S042 + next_elt_id: 1 + display_order: 19 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S042_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is clear, any M-mode access matching the PMP entry will succeed\n\n + {Page 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nIf the L bit is clear and the privilege mode of + the access is M, the access succeeds" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access load or load-reserved instruction inside + defined NA4 address range without read permissions and with L=0\n - choose + a readable pmp region and address range\n - choose only one PMP entry + (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=0, L=0, X/W:random\n \ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and mstatus.MPP + contains M (TODO: CHECK IF MAKING SENSE)\n\nACCESS\n - execute a load + or load-reserved instruction from that region (with exact address-matching)\n\ + \nCHECK\n - check no access-fault exception\n\nREUSABILITY\n - if + possible, the PMP entry number (i) is a configurable parameter\n - if + possible, the PMP entry lock (L) is a configurable parameter\n - if possible, + the PMP entry permissions (R,W,X) are configurable parameters\n - if + possible, the PMP entry address-matching mode (A) is a configurable parameter\n\ + \ - if possible, the PMP entry address range (pmpaddr) is a configurable + parameter\n - if possible, the PMP entry associated access address is + a configurable parameter\n - so a single CONFIGURATION function and a + single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e2-1 + (refers to FTR09-d1)\n[When the L bit is clear, any M-mode access matching + the PMP entry will succeed]\nFTR09-d1 (refers to FTR08-e2-1)\n [If the L + bit is clear and the privilege mode of the access is M, the access succeeds]\n + \nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-4x(group) => FTR01-f\n [PMP check + on load or load-reserved instruction where effective privilege mode is M:\n\ + \ - choose a data readable pmp region and address range\n - choose + only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n \ + \ - if possible, the PMP entry number is a configurable parameter\n - + choose pmpcfg(i).A=NA4\n - single access data load in any mode when the + bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING + SENSE)]\n [create scenarios where PMP entries with A=2 (NA4) and with/without + matching permissions\n - check only NA4 defined addresses are matching]\n + TST12-42 (LOWEST-PRIO)\n[with L=0 => FTR08-e2-1 (refers to FTR09-d1)\n\ + \ - configure the PMP entry without read permissions for the PMP region\n\ + \ - execute a load or load-reserved instruction from that region (with + exact address-matching)\n - check no access-fault exception]" +- 020_load_MPP_L0_R1_addr_miss: !Subfeature + name: 020_load_MPP_L0_R1_addr_miss + tag: VP_PMP_F012_S043 + next_elt_id: 1 + display_order: 20 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S043_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is clear, any M-mode access matching the PMP entry will succeed\n\n + {Page 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nIf the L bit is clear and the privilege mode of + the access is M, the access succeeds" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access load or load-reserved instruction from + outside defined NA4 address range with read permissions and with L=0\n \ + \ - choose a readable pmp region and address range\n - choose only + one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=1, L=0, X/W:random\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and mstatus.MPP + contains M (TODO: CHECK IF MAKING SENSE)\n\nACCESS\n - execute a load + or load-reserved instruction from outside all PMP defined regions\n\nCHECK\n\ + \ - check no access-fault exception (Feature: \"no cfg matching\")\n\n\ + REUSABILITY\n - if possible, the PMP entry number (i) is a configurable + parameter\n - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e2-1 + (refers to FTR09-d1)\n[When the L bit is clear, any M-mode access matching + the PMP entry will succeed]\nFTR09-d1 (refers to FTR08-e2-1)\n [If the L + bit is clear and the privilege mode of the access is M, the access succeeds]\n + \nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-4x(group) => FTR01-f\n [PMP check + on load or load-reserved instruction where effective privilege mode is M:\n\ + \ - choose a data readable pmp region and address range\n - choose + only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n \ + \ - if possible, the PMP entry number is a configurable parameter\n - + choose pmpcfg(i).A=NA4\n - single access data load in any mode when the + bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING + SENSE)]\n [create scenarios where PMP entries with A=2 (NA4) and with/without + matching permissions\n - check only NA4 defined addresses are matching]\n + TST12-43 (LOWEST-PRIO)\n[with L=0 => FTR08-e2-1 (refers to FTR09-d1)\n\ + \ - configure the PMP entry with read permissions for the PMP region\n\ + \ - execute a load or load-reserved instruction from outside all PMP defined + regions\n - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED" +- 021_load_MPP_L1_R1_addr_hit: !Subfeature + name: 021_load_MPP_L1_R1_addr_hit + tag: VP_PMP_F012_S044 + next_elt_id: 1 + display_order: 21 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S044_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is set, these permissions are enforced for all privilege modes\n\n{Page + 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nif the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access load or load-reserved instruction inside + defined NA4 address range with read permissions and with L=1\n - choose + a readable pmp region and address range\n - choose only one PMP entry + (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=1, L=1, X/W:random\n \ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and mstatus.MPP + contains M (TODO: CHECK IF MAKING SENSE)\n\nACCESS\n - execute a load + or load-reserved instruction from that region (with exact address-matching)\n\ + \nCHECK\n - check no access-fault exception\n\nREUSABILITY\n - if + possible, the PMP entry number (i) is a configurable parameter\n - if + possible, the PMP entry lock (L) is a configurable parameter\n - if possible, + the PMP entry permissions (R,W,X) are configurable parameters\n - if + possible, the PMP entry address-matching mode (A) is a configurable parameter\n\ + \ - if possible, the PMP entry address range (pmpaddr) is a configurable + parameter\n - if possible, the PMP entry associated access address is + a configurable parameter\n - so a single CONFIGURATION function and a + single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e1 + (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the L bit is set, these + permissions are enforced for all privilege modes]\nFTR09-d2-1 (refers to + FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set]\n\n + FTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-4x(group) => FTR01-f\n [PMP check + on load or load-reserved instruction where effective privilege mode is M:\n\ + \ - choose a data readable pmp region and address range\n - choose + only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n \ + \ - if possible, the PMP entry number is a configurable parameter\n - + choose pmpcfg(i).A=NA4\n - single access data load in any mode when the + bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING + SENSE)]\n [create scenarios where PMP entries with A=2 (NA4) and with/without + matching permissions\n - check only NA4 defined addresses are matching]\n + TST12-44 (LOWEST-PRIO)\n [with L=1 => FTR08-e1 (refers to FTR01-f) (refers + to FTR09-d2-1),\n - configure the PMP entry with read permissions for the + PMP region\n - execute a load or load-reserved instruction from that region + (with exact address-matching)\n - check no access-fault exception]" +- 022_load_MPP_L1_R0_addr_hit: !Subfeature + name: 022_load_MPP_L1_R0_addr_hit + tag: VP_PMP_F012_S045 + next_elt_id: 1 + display_order: 22 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S045_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is set, these permissions are enforced for all privilege modes\n\n{Page + 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nif the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set\n\n{Page + 58 Volume II: RISC-V Privileged Architectures V20211203}\nAttempting to + execute a load or load-reserved instruction which accesses a physical address + within a PMP region without read permissions raises a load access-fault + exception" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access load or load-reserved instruction inside + defined NA4 address range without read permissions and with L=1\n - choose + a readable pmp region and address range\n - choose only one PMP entry + (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=0, L=1, X/W:random\n \ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and mstatus.MPP + contains M (TODO: CHECK IF MAKING SENSE)\n\nACCESS\n - execute a load + or load-reserved instruction from that region (with exact address-matching)\n\ + \nCHECK\n - check load access-fault exception raised\n\nREUSABILITY\n\ + \ - if possible, the PMP entry number (i) is a configurable parameter\n\ + \ - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e1 + (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the L bit is set, these + permissions are enforced for all privilege modes]\nFTR09-d2-1 (refers to + FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set]\n\n + FTR04-c\n[Attempting to execute a load or load-reserved instruction which + accesses a physical address within a PMP region without read permissions + raises a load access-fault exception]\n\nFTR02-b1\n[the lowest-numbered + PMP CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nTST12-4x(group) => FTR01-f\n [PMP check on load or load-reserved instruction + where effective privilege mode is M:\n - choose a data readable pmp region + and address range\n - choose only one PMP entry (i) ([FTR02-b1]: maybe + mandatorily the 1st one)\n - if possible, the PMP entry number is a configurable + parameter\n - choose pmpcfg(i).A=NA4\n - single access data load in + any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: + CHECK IF MAKING SENSE)]\n [create scenarios where PMP entries with A=2 + (NA4) and with/without matching permissions\n - check only NA4 defined + addresses are matching]\nTST12-45 (LOWEST-PRIO)\n[with L=1 => FTR08-e1 (refers + to FTR01-f) (refers to FTR09-d2-1),\n - configure the PMP entry without + read permissions for the PMP region\n - execute a load or load-reserved + instruction from that region (with exact address-matching)\n - check load + access-fault exception raised => FTR04-c]" +- 023_load_MPP_L1_R1_addr_miss: !Subfeature + name: 023_load_MPP_L1_R1_addr_miss + tag: VP_PMP_F012_S046 + next_elt_id: 1 + display_order: 23 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S046_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is set, these permissions are enforced for all privilege modes\n\n{Page + 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nif the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access load or load-reserved instruction from + outside defined NA4 address range with read permissions and with L=1\n \ + \ - choose a readable pmp region and address range\n - choose only + one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, R=1, L=1, X/W:random\n\ + \ - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and mstatus.MPP + contains M (TODO: CHECK IF MAKING SENSE)\n\nACCESS\n - execute a load + or load-reserved instruction from outside all PMP defined regions\n\nCHECK\n\ + \ - check no access-fault exception (Feature: \"no cfg matching\")\n\n\ + REUSABILITY\n - if possible, the PMP entry number (i) is a configurable + parameter\n - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e1 + (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the L bit is set, these + permissions are enforced for all privilege modes]\nFTR09-d2-1 (refers to + FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set]\n\n + FTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-4x(group) => FTR01-f\n [PMP check + on load or load-reserved instruction where effective privilege mode is M:\n\ + \ - choose a data readable pmp region and address range\n - choose + only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n \ + \ - if possible, the PMP entry number is a configurable parameter\n - + choose pmpcfg(i).A=NA4\n - single access data load in any mode when the + bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING + SENSE)]\n [create scenarios where PMP entries with A=2 (NA4) and with/without + matching permissions\n - check only NA4 defined addresses are matching]\n + TST12-46 (LOWEST-PRIO)\n [with L=1 => FTR08-e1 (refers to FTR01-f) (refers + to FTR09-d2-1),\n - configure the PMP entry with read permissions for the + PMP region\n - execute a load or load-reserved instruction from outside + all PMP defined regions\n - check no access-fault exception] //TODO: CHECK + IF M-MODE ALLOWED" +- 024_store_MPP_L0_W1_addr_hit: !Subfeature + name: 024_store_MPP_L0_W1_addr_hit + tag: VP_PMP_F012_S051 + next_elt_id: 1 + display_order: 24 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S051_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is clear, any M-mode access matching the PMP entry will succeed\n\n + {Page 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nIf the L bit is clear and the privilege mode of + the access is M, the access succeeds" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access store, store-conditional, or AMO instruction + inside defined NA4 address range with write permissions and with L=0\n \ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=1, L=0, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and + mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)\n\nACCESS\n - execute + a store, store-conditional, or AMO instruction to that region (with exact + address-matching)\n\nCHECK\n - check no access-fault exception\n\nREUSABILITY\n\ + \ - if possible, the PMP entry number (i) is a configurable parameter\n\ + \ - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e2-1 + (refers to FTR09-d1)\n[When the L bit is clear, any M-mode access matching + the PMP entry will succeed]\nFTR09-d1 (refers to FTR08-e2-1)\n [If the L + bit is clear and the privilege mode of the access is M, the access succeeds]\n + \nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-5x(group) => FTR01-f\n [PMP check + on store, store-conditional, or AMO instruction where effective privilege + mode is M:\n - choose a data writable pmp region and address range\n\ + \ - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the + 1st one)\n - if possible, the PMP entry number is a configurable parameter\n\ + \ - choose pmpcfg(i).A=NA4\n - single access data store in any mode + when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK + IF MAKING SENSE)]\n [create scenarios where PMP entries with A=2 (NA4) + and with/without matching permissions\n - check only NA4 defined addresses + are matching]\nTST12-51 (LOWEST-PRIO)\n[with L=0 => FTR08-e2-1 (refers to\ + \ FTR09-d1)\n - configure the PMP entry with write permissions for the + PMP region\n - execute a store, store-conditional, or AMO instruction to + that region (with exact address-matching)\n - check no access-fault exception]" +- 025_store_MPP_L0_W0_addr_hit: !Subfeature + name: 025_store_MPP_L0_W0_addr_hit + tag: VP_PMP_F012_S052 + next_elt_id: 1 + display_order: 25 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S052_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is clear, any M-mode access matching the PMP entry will succeed\n\n + {Page 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nIf the L bit is clear and the privilege mode of + the access is M, the access succeeds" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access store, store-conditional, or AMO instruction + inside defined NA4 address range without write permissions and with L=0\n\ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=0, L=0, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and + mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)\n\nACCESS\n - execute + a store, store-conditional, or AMO instruction to that region (with exact + address-matching)\n\nCHECK\n - check no access-fault exception\n\nREUSABILITY\n\ + \ - if possible, the PMP entry number (i) is a configurable parameter\n\ + \ - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e2-1 + (refers to FTR09-d1)\n[When the L bit is clear, any M-mode access matching + the PMP entry will succeed]\nFTR09-d1 (refers to FTR08-e2-1)\n [If the L + bit is clear and the privilege mode of the access is M, the access succeeds]\n + \nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-5x(group) => FTR01-f\n [PMP check + on store, store-conditional, or AMO instruction where effective privilege + mode is M:\n - choose a data writable pmp region and address range\n\ + \ - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the + 1st one)\n - if possible, the PMP entry number is a configurable parameter\n\ + \ - choose pmpcfg(i).A=NA4\n - single access data store in any mode + when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK + IF MAKING SENSE)]\n [create scenarios where PMP entries with A=2 (NA4) + and with/without matching permissions\n - check only NA4 defined addresses + are matching]\nTST12-52 (LOWEST-PRIO)\n[with L=0 => FTR08-e2-1 (refers to\ + \ FTR09-d1)\n - configure the PMP entry without write permissions for + the PMP region\n - execute a store, store-conditional, or AMO instruction + to that region (with exact address-matching)\n - check no access-fault + exception]" +- 026_store_MPP_L0_W1_addr_miss: !Subfeature + name: 026_store_MPP_L0_W1_addr_miss + tag: VP_PMP_F012_S053 + next_elt_id: 1 + display_order: 26 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S053_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is clear, any M-mode access matching the PMP entry will succeed\n\n + {Page 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nIf the L bit is clear and the privilege mode of + the access is M, the access succeeds" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access store, store-conditional, or AMO instruction + from outside defined NA4 address range with write permissions and with L=0\n\ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=1, L=0, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and + mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)\n\nACCESS\n - execute + a store, store-conditional, or AMO instruction to outside all PMP defined + regions\n\nCHECK\n - check no access-fault exception (Feature: \"no cfg + matching\")\n\nREUSABILITY\n - if possible, the PMP entry number (i) + is a configurable parameter\n - if possible, the PMP entry lock (L) is + a configurable parameter\n - if possible, the PMP entry permissions (R,W,X) + are configurable parameters\n - if possible, the PMP entry address-matching + mode (A) is a configurable parameter\n - if possible, the PMP entry address + range (pmpaddr) is a configurable parameter\n - if possible, the PMP + entry associated access address is a configurable parameter\n - so a + single CONFIGURATION function and a single ACCESS function can be reused + and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e2-1 + (refers to FTR09-d1)\n[When the L bit is clear, any M-mode access matching + the PMP entry will succeed]\nFTR09-d1 (refers to FTR08-e2-1)\n [If the L + bit is clear and the privilege mode of the access is M, the access succeeds]\n + \nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-5x(group) => FTR01-f\n [PMP check + on store, store-conditional, or AMO instruction where effective privilege + mode is M:\n - choose a data writable pmp region and address range\n\ + \ - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the + 1st one)\n - if possible, the PMP entry number is a configurable parameter\n\ + \ - choose pmpcfg(i).A=NA4\n - single access data store in any mode + when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK + IF MAKING SENSE)]\n [create scenarios where PMP entries with A=2 (NA4) + and with/without matching permissions\n - check only NA4 defined addresses + are matching]\nTST12-53 (LOWEST-PRIO)\n[with L=0 => FTR08-e2-1 (refers to\ + \ FTR09-d1)\n - configure the PMP entry with write permissions for the + PMP region\n - execute a store, store-conditional, or AMO instruction to + outside all PMP defined regions\n - check no access-fault exception] //TODO: + CHECK IF M-MODE ALLOWED" +- 027_store_MPP_L1_W1_addr_hit: !Subfeature + name: 027_store_MPP_L1_W1_addr_hit + tag: VP_PMP_F012_S054 + next_elt_id: 1 + display_order: 27 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S054_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is set, these permissions are enforced for all privilege modes\n\n{Page + 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nif the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access store, store-conditional, or AMO instruction + inside defined NA4 address range with write permissions and with L=1\n \ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=1, L=1, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and + mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)\n\nACCESS\n - execute + a store, store-conditional, or AMO instruction to that region (with exact + address-matching)\n\nCHECK\n - check no access-fault exception\n\nREUSABILITY\n\ + \ - if possible, the PMP entry number (i) is a configurable parameter\n\ + \ - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e1 + (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the L bit is set, these + permissions are enforced for all privilege modes]\nFTR09-d2-1 (refers to + FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set]\n\n + FTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-5x(group) => FTR01-f\n [PMP check + on store, store-conditional, or AMO instruction where effective privilege + mode is M:\n - choose a data writable pmp region and address range\n\ + \ - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the + 1st one)\n - if possible, the PMP entry number is a configurable parameter\n\ + \ - choose pmpcfg(i).A=NA4\n - single access data store in any mode + when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK + IF MAKING SENSE)]\n [create scenarios where PMP entries with A=2 (NA4) + and with/without matching permissions\n - check only NA4 defined addresses + are matching]\n TST12-54 (LOWEST-PRIO)\n[with L=1 => FTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1),\n - configure the PMP entry with write + permissions for the PMP region\n - execute a store, store-conditional, + or AMO instruction to that region (with exact address-matching)\n - check + no access-fault exception]" +- 028_store_MPP_L1_W0_addr_hit: !Subfeature + name: 028_store_MPP_L1_W0_addr_hit + tag: VP_PMP_F012_S055 + next_elt_id: 1 + display_order: 28 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S055_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is set, these permissions are enforced for all privilege modes\n\n{Page + 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nif the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set\n\n{Page + 58 Volume II: RISC-V Privileged Architectures V20211203}\nAttempting to + execute a store, store-conditional, or AMO instruction which accesses a + physical address within a PMP region without write permissions raises a + store access-fault exception" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access store, store-conditional, or AMO instruction + inside defined NA4 address range without write permissions and with L=1\n\ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=0, L=1, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and + mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)\n\nACCESS\n - execute + a store, store-conditional, or AMO instruction to that region (with exact + address-matching)\n\nCHECK\n - check store access-fault exception raised\n\ + \nREUSABILITY\n - if possible, the PMP entry number (i) is a configurable + parameter\n - if possible, the PMP entry lock (L) is a configurable parameter\n\ + \ - if possible, the PMP entry permissions (R,W,X) are configurable parameters\n\ + \ - if possible, the PMP entry address-matching mode (A) is a configurable + parameter\n - if possible, the PMP entry address range (pmpaddr) is a + configurable parameter\n - if possible, the PMP entry associated access + address is a configurable parameter\n - so a single CONFIGURATION function + and a single ACCESS function can be reused and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e1 + (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the L bit is set, these + permissions are enforced for all privilege modes]\nFTR09-d2-1 (refers to + FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set]\n\n + FTR04-d\n[Attempting to execute a store, store-conditional, or AMO instruction + which accesses a physical address within a PMP region without write permissions + raises a store access-fault exception]\n\nFTR02-b1\n[the lowest-numbered + PMP CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \n TST12-5x(group) => FTR01-f\n [PMP check on store, store-conditional, + or AMO instruction where effective privilege mode is M:\n - choose a + data writable pmp region and address range\n - choose only one PMP entry + (i) ([FTR02-b1]: maybe mandatorily the 1st one)\n - if possible, the + PMP entry number is a configurable parameter\n - choose pmpcfg(i).A=NA4\n\ + \ - single access data store in any mode when the bit mstatus.MPRV=1 + and the mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)]\n [create + scenarios where PMP entries with A=2 (NA4) and with/without matching permissions\n\ + \ - check only NA4 defined addresses are matching]\n TST12-55 (LOWEST-PRIO)\n + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1),\n - configure + the PMP entry without write permissions for the PMP region\n - execute + a store, store-conditional, or AMO instruction to that region (with exact + address-matching)\n - check store access-fault exception raised => FTR04-d]" +- 029_store_MPP_L1_W1_addr_miss: !Subfeature + name: 029_store_MPP_L1_W1_addr_miss + tag: VP_PMP_F012_S056 + next_elt_id: 1 + display_order: 29 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F012_S056_I000 + description: "{Page 56 Volume II: RISC-V Privileged Architectures V20211203}\n + PMP checks may additionally apply to M-mode accesses, in which case the + PMP registers themselves are locked, so that even M-mode software cannot + change them until the hart is reset\n\n{Page 60 Section \"Locking and Privilege + Mode\" Volume II: RISC-V Privileged Architectures V20211203}\nWhen the L + bit is set, these permissions are enforced for all privilege modes\n\n{Page + 60 Section \"Priority and Matching Logic\" Volume II: RISC-V Privileged + Architectures V20211203}\nif the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "M mode single access store, store-conditional, or AMO instruction + from outside defined NA4 address range with write permissions and with L=1\n\ + \ - choose a data writable pmp region and address range\n - choose + only one PMP entry (i)\n\nCONFIGURATION\n - pmpcfg(i): A=NA4, W=1, L=1, + X/R:random\n - pmpaddr(i): NA4 address range\n - mstatus.MPRV=1 and + mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)\n\nACCESS\n - execute + a store, store-conditional, or AMO instruction to outside all PMP defined + regions\n\nCHECK\n - check no access-fault exception (Feature: \"no cfg + matching\")\n\nREUSABILITY\n - if possible, the PMP entry number (i) + is a configurable parameter\n - if possible, the PMP entry lock (L) is + a configurable parameter\n - if possible, the PMP entry permissions (R,W,X) + are configurable parameters\n - if possible, the PMP entry address-matching + mode (A) is a configurable parameter\n - if possible, the PMP entry address + range (pmpaddr) is a configurable parameter\n - if possible, the PMP + entry associated access address is a configurable parameter\n - so a + single CONFIGURATION function and a single ACCESS function can be reused + and combined" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<>\n\n<< link to the + old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) + : reading below not mandatory but may help for better understanding >>\n + \nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally apply to M-mode + accesses, in which case the PMP registers themselves are locked, so that + even M-mode software cannot change them until the hart is reset]\n \nFTR08-e1 + (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the L bit is set, these + permissions are enforced for all privilege modes]\nFTR09-d2-1 (refers to + FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access succeeds + only if the R, W, or X bit corresponding to the access type is set]\n\n + FTR02-b1\n[the lowest-numbered PMP CSRs must be implemented first (QUESTION: + does it mean programmed first)]\n\nTST12-5x(group) => FTR01-f\n [PMP check + on store, store-conditional, or AMO instruction where effective privilege + mode is M:\n - choose a data writable pmp region and address range\n\ + \ - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the + 1st one)\n - if possible, the PMP entry number is a configurable parameter\n\ + \ - choose pmpcfg(i).A=NA4\n - single access data store in any mode + when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK + IF MAKING SENSE)]\n [create scenarios where PMP entries with A=2 (NA4) + and with/without matching permissions\n - check only NA4 defined addresses + are matching]\n TST12-56 (LOWEST-PRIO)\n[with L=1 => FTR08-e1 (refers to + FTR01-f) (refers to FTR09-d2-1),\n - configure the PMP entry with write + permissions for the PMP region\n - execute a store, store-conditional, + or AMO instruction to outside all PMP defined regions\n - check no access-fault + exception] //TODO: CHECK IF M-MODE ALLOWED" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP013.yml b/verif/docs/VerifPlans/PMP/VP_IP013.yml new file mode 100644 index 00000000000..a0a659155d1 --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP013.yml @@ -0,0 +1,1133 @@ +!Feature +next_elt_id: 30 +name: cfg NAPOT access S/U +id: 13 +display_order: 13 +subfeatures: !!omap +- 000_fetch_L0_X1_addr_hit: !Subfeature + name: 000_fetch_L0_X1_addr_hit + tag: VP_PMP_F013_S011 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S011_I000 + description: 'reuse of VP_PMP_F011_S011_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S011_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-11 (HIGH-PRIO)\n [same as TST11-11(group), but with pmpcfg(i).A=NAPOT]" +- 001_fetch_L0_X0_addr_hit: !Subfeature + name: 001_fetch_L0_X0_addr_hit + tag: VP_PMP_F013_S012 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S012_I000 + description: 'reuse of VP_PMP_F011_S012_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S012_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-b\n [Attempting to fetch an instruction from a PMP region + that does not have execute permissions raises an instruction access-fault + exception]\n \n\nTST13-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-12 (MEDIUM-PRIO)\n [same as TST11-12(group), but with pmpcfg(i).A=NAPOT]" +- 002_fetch_L0_X1_addr_miss: !Subfeature + name: 002_fetch_L0_X1_addr_miss + tag: VP_PMP_F013_S013 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S013_I000 + description: 'reuse of VP_PMP_F011_S013_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S013_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-13 (MEDIUM-PRIO)\n [same as TST11-13(group), but with pmpcfg(i).A=NAPOT]" +- 003_fetch_L1_X1_addr_hit: !Subfeature + name: 003_fetch_L1_X1_addr_hit + tag: VP_PMP_F013_S014 + next_elt_id: 1 + display_order: 3 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S014_I000 + description: 'reuse of VP_PMP_F011_S014_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S014_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-14 (LOW-PRIO)\n [same as TST11-14(group), but with pmpcfg(i).A=NAPOT]" +- 004_fetch_L1_X0_addr_hit: !Subfeature + name: 004_fetch_L1_X0_addr_hit + tag: VP_PMP_F013_S015 + next_elt_id: 1 + display_order: 4 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S015_I000 + description: 'reuse of VP_PMP_F011_S015_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S015_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-b\n[Attempting to fetch an instruction from a PMP region that + does not have execute permissions raises an instruction access-fault exception]\n\ + \n\nTST13-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-15 (LOW-PRIO)\n [same as TST11-15(group), but with pmpcfg(i).A=NAPOT]" +- 005_fetch_L1_X1_addr_miss: !Subfeature + name: 005_fetch_L1_X1_addr_miss + tag: VP_PMP_F013_S016 + next_elt_id: 1 + display_order: 5 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S016_I000 + description: 'reuse of VP_PMP_F011_S016_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S016_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-16 (LOW-PRIO)\n [same as TST11-16(group), but with pmpcfg(i).A=NAPOT]" +- 006_load_L0_R1_addr_hit: !Subfeature + name: 006_load_L0_R1_addr_hit + tag: VP_PMP_F013_S021 + next_elt_id: 1 + display_order: 6 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S021_I000 + description: 'reuse of VP_PMP_F011_S021_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S021_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-2x(group)\n [same as TST11-2x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-21 (HIGH-PRIO)\n [same as TST11-21(group), but with pmpcfg(i).A=NAPOT]" +- 007_load_L0_R0_addr_hit: !Subfeature + name: 007_load_L0_R0_addr_hit + tag: VP_PMP_F013_S022 + next_elt_id: 1 + display_order: 7 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S022_I000 + description: 'reuse of VP_PMP_F011_S022_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S022_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-c\n [Attempting to execute a load or load-reserved instruction + which accesses a physical address within a PMP region without read permissions + raises a load access-fault exception]\n\n\nTST13-2x(group)\n [same as TST11-2x(group), + but with pmpcfg(i).A=NAPOT]\nTST13-22 (MEDIUM-PRIO)\n [same as TST11-22(group), + but with pmpcfg(i).A=NAPOT]" +- 008_load_L0_R1_addr_miss: !Subfeature + name: 008_load_L0_R1_addr_miss + tag: VP_PMP_F013_S023 + next_elt_id: 1 + display_order: 8 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S023_I000 + description: 'reuse of VP_PMP_F011_S023_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S023_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-2x(group)\n [same as TST11-2x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-23 (MEDIUM-PRIO)\n [same as TST11-23(group), but with pmpcfg(i).A=NAPOT]" +- 009_load_L1_R1_addr_hit: !Subfeature + name: 009_load_L1_R1_addr_hit + tag: VP_PMP_F013_S024 + next_elt_id: 1 + display_order: 9 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S024_I000 + description: 'reuse of VP_PMP_F011_S024_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S024_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-2x(group)\n [same as TST11-2x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-24 (LOW-PRIO)\n [same as TST11-24(group), but with pmpcfg(i).A=NAPOT]" +- 010_load_L1_R0_addr_hit: !Subfeature + name: 010_load_L1_R0_addr_hit + tag: VP_PMP_F013_S025 + next_elt_id: 1 + display_order: 10 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S025_I000 + description: 'reuse of VP_PMP_F011_S025_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S025_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-c\n[Attempting to execute a load or load-reserved instruction + which accesses a physical address within a PMP region without read permissions + raises a load access-fault exception]\n\n\nTST13-2x(group)\n [same as TST11-2x(group), + but with pmpcfg(i).A=NAPOT]\n TST13-25 (LOW-PRIO)\n [same as TST11-25(group), + but with pmpcfg(i).A=NAPOT]" +- 011_load_L1_R1_addr_miss: !Subfeature + name: 011_load_L1_R1_addr_miss + tag: VP_PMP_F013_S026 + next_elt_id: 1 + display_order: 11 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S026_I000 + description: 'reuse of VP_PMP_F011_S026_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S026_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-2x(group)\n [same as TST11-2x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-26 (LOW-PRIO)\n [same as TST11-26(group), but with pmpcfg(i).A=NAPOT]" +- 012_store_L0_W1_addr_hit: !Subfeature + name: 012_store_L0_W1_addr_hit + tag: VP_PMP_F013_S031 + next_elt_id: 1 + display_order: 12 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S031_I000 + description: 'reuse of VP_PMP_F011_S031_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S031_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-3x(group)\n [same as TST11-3x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-31 (HIGH-PRIO)\n [same as TST11-31(group), but with pmpcfg(i).A=NAPOT]" +- 013_store_L0_W0_addr_hit: !Subfeature + name: 013_store_L0_W0_addr_hit + tag: VP_PMP_F013_S032 + next_elt_id: 1 + display_order: 13 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S032_I000 + description: 'reuse of VP_PMP_F011_S032_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S032_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-d\n [Attempting to execute a store, store-conditional, or + AMO instruction which accesses a physical address within a PMP region without + write permissions raises a store access-fault exception]\n\n\nTST13-3x(group)\n\ + \ [same as TST11-3x(group), but with pmpcfg(i).A=NAPOT]\nTST13-32 (MEDIUM-PRIO)\n\ + \ [same as TST11-32(group), but with pmpcfg(i).A=NAPOT]" +- 014_store_L0_W1_addr_miss: !Subfeature + name: 014_store_L0_W1_addr_miss + tag: VP_PMP_F013_S033 + next_elt_id: 1 + display_order: 14 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S033_I000 + description: 'reuse of VP_PMP_F011_S033_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S033_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-3x(group)\n [same as TST11-3x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-33 (MEDIUM-PRIO)\n [same as TST11-33(group), but with pmpcfg(i).A=NAPOT]" +- 015_store_L1_W1_addr_hit: !Subfeature + name: 015_store_L1_W1_addr_hit + tag: VP_PMP_F013_S034 + next_elt_id: 1 + display_order: 15 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S034_I000 + description: 'reuse of VP_PMP_F011_S034_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S034_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-3x(group)\n [same as TST11-3x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-34 (LOW-PRIO)\n [same as TST11-34(group), but with pmpcfg(i).A=NAPOT]" +- 016_store_L1_W0_addr_hit: !Subfeature + name: 016_store_L1_W0_addr_hit + tag: VP_PMP_F013_S035 + next_elt_id: 1 + display_order: 16 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S035_I000 + description: 'reuse of VP_PMP_F011_S035_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S035_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-d\n[Attempting to execute a store, store-conditional, or AMO + instruction which accesses a physical address within a PMP region without + write permissions raises a store access-fault exception]\n\n\nTST13-3x(group)\n\ + \ [same as TST11-3x(group), but with pmpcfg(i).A=NAPOT]\nTST13-35 (LOW-PRIO)\n\ + \ [same as TST11-35(group), but with pmpcfg(i).A=NAPOT]" +- 017_store_L1_W1_addr_miss: !Subfeature + name: 017_store_L1_W1_addr_miss + tag: VP_PMP_F013_S036 + next_elt_id: 1 + display_order: 17 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S036_I000 + description: 'reuse of VP_PMP_F011_S036_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S036_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-3x(group)\n [same as TST11-3x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-36 (LOW-PRIO)\n [same as TST11-36(group), but with pmpcfg(i).A=NAPOT]" +- 018_load_MPP_L0_R1_addr_hit: !Subfeature + name: 018_load_MPP_L0_R1_addr_hit + tag: VP_PMP_F013_S041 + next_elt_id: 1 + display_order: 18 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S041_I000 + description: 'reuse of VP_PMP_F011_S041_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S041_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-4x(group)\n [same as TST11-4x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-41 (LOWEST-PRIO)\n [same as TST11-41(group), but with pmpcfg(i).A=NAPOT]" +- 019_load_MPP_L0_R0_addr_hit: !Subfeature + name: 019_load_MPP_L0_R0_addr_hit + tag: VP_PMP_F013_S042 + next_elt_id: 1 + display_order: 19 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S042_I000 + description: 'reuse of VP_PMP_F011_S042_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S042_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-c\n [Attempting to execute a load or load-reserved instruction + which accesses a physical address within a PMP region without read permissions + raises a load access-fault exception]\n\n\nTST13-4x(group)\n [same as TST11-4x(group), + but with pmpcfg(i).A=NAPOT]\nTST13-42 (LOWEST-PRIO)\n [same as TST11-42(group), + but with pmpcfg(i).A=NAPOT]" +- 020_load_MPP_L0_R1_addr_miss: !Subfeature + name: 020_load_MPP_L0_R1_addr_miss + tag: VP_PMP_F013_S043 + next_elt_id: 1 + display_order: 20 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S043_I000 + description: 'reuse of VP_PMP_F011_S043_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S043_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-4x(group)\n [same as TST11-4x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-43 (LOWEST-PRIO)\n [same as TST11-43(group), but with pmpcfg(i).A=NAPOT]" +- 021_load_MPP_L1_R1_addr_hit: !Subfeature + name: 021_load_MPP_L1_R1_addr_hit + tag: VP_PMP_F013_S044 + next_elt_id: 1 + display_order: 21 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S044_I000 + description: 'reuse of VP_PMP_F011_S044_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S044_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-4x(group)\n [same as TST11-4x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-44 (LOWEST-PRIO)\n [same as TST11-44(group), but with pmpcfg(i).A=NAPOT]" +- 022_load_MPP_L1_R0_addr_hit: !Subfeature + name: 022_load_MPP_L1_R0_addr_hit + tag: VP_PMP_F013_S045 + next_elt_id: 1 + display_order: 22 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S045_I000 + description: 'reuse of VP_PMP_F011_S045_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S045_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-c\n[Attempting to execute a load or load-reserved instruction + which accesses a physical address within a PMP region without read permissions + raises a load access-fault exception]\n\n\nTST13-4x(group)\n [same as TST11-4x(group), + but with pmpcfg(i).A=NAPOT]\n TST13-45 (LOWEST-PRIO)\n [same as TST11-45(group), + but with pmpcfg(i).A=NAPOT]" +- 023_load_MPP_L1_R1_addr_miss: !Subfeature + name: 023_load_MPP_L1_R1_addr_miss + tag: VP_PMP_F013_S046 + next_elt_id: 1 + display_order: 23 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S046_I000 + description: 'reuse of VP_PMP_F011_S046_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S046_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-4x(group)\n [same as TST11-4x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-46 (LOWEST-PRIO)\n [same as TST11-46(group), but with pmpcfg(i).A=NAPOT]" +- 024_store_MPP_L0_W1_addr_hit: !Subfeature + name: 024_store_MPP_L0_W1_addr_hit + tag: VP_PMP_F013_S051 + next_elt_id: 1 + display_order: 24 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S051_I000 + description: 'reuse of VP_PMP_F011_S051_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S051_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-5x(group)\n [same as TST11-5x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-51 (LOWEST-PRIO)\n [same as TST11-51(group), but with pmpcfg(i).A=NAPOT]" +- 025_store_MPP_L0_W0_addr_hit: !Subfeature + name: 025_store_MPP_L0_W0_addr_hit + tag: VP_PMP_F013_S052 + next_elt_id: 1 + display_order: 25 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S052_I000 + description: 'reuse of VP_PMP_F011_S052_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S052_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-d\n [Attempting to execute a store, store-conditional, or + AMO instruction which accesses a physical address within a PMP region without + write permissions raises a store access-fault exception]\n\n\nTST13-5x(group)\n\ + \ [same as TST11-5x(group), but with pmpcfg(i).A=NAPOT]\nTST13-52 (LOWEST-PRIO)\n\ + \ [same as TST11-52(group), but with pmpcfg(i).A=NAPOT]" +- 026_store_MPP_L0_W1_addr_miss: !Subfeature + name: 026_store_MPP_L0_W1_addr_miss + tag: VP_PMP_F013_S053 + next_elt_id: 1 + display_order: 26 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S053_I000 + description: 'reuse of VP_PMP_F011_S053_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S053_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-5x(group)\n [same as TST11-5x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-53 (LOWEST-PRIO)\n [same as TST11-53(group), but with pmpcfg(i).A=NAPOT]" +- 027_store_MPP_L1_W1_addr_hit: !Subfeature + name: 027_store_MPP_L1_W1_addr_hit + tag: VP_PMP_F013_S054 + next_elt_id: 1 + display_order: 27 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S054_I000 + description: 'reuse of VP_PMP_F011_S054_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S054_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-5x(group)\n [same as TST11-5x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-54 (LOWEST-PRIO)\n [same as TST11-54(group), but with pmpcfg(i).A=NAPOT]" +- 028_store_MPP_L1_W0_addr_hit: !Subfeature + name: 028_store_MPP_L1_W0_addr_hit + tag: VP_PMP_F013_S055 + next_elt_id: 1 + display_order: 28 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S055_I000 + description: 'reuse of VP_PMP_F011_S055_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S055_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-d\n[Attempting to execute a store, store-conditional, or AMO + instruction which accesses a physical address within a PMP region without + write permissions raises a store access-fault exception]\n\n\nTST13-5x(group)\n\ + \ [same as TST11-5x(group), but with pmpcfg(i).A=NAPOT]\nTST13-55 (LOWEST-PRIO)\n\ + \ [same as TST11-55(group), but with pmpcfg(i).A=NAPOT]" +- 029_store_MPP_L1_W1_addr_miss: !Subfeature + name: 029_store_MPP_L1_W1_addr_miss + tag: VP_PMP_F013_S056 + next_elt_id: 1 + display_order: 29 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F013_S056_I000 + description: 'reuse of VP_PMP_F011_S056_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S056_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n \ + \ - pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST13-5x(group)\n [same as TST11-5x(group), but with pmpcfg(i).A=NAPOT]\n + TST13-56 (LOWEST-PRIO)\n [same as TST11-56(group), but with pmpcfg(i).A=NAPOT]" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP014.yml b/verif/docs/VerifPlans/PMP/VP_IP014.yml new file mode 100644 index 00000000000..6d5b1e0ba49 --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP014.yml @@ -0,0 +1,1119 @@ +!Feature +next_elt_id: 30 +name: cfg NAPOT access M +id: 14 +display_order: 14 +subfeatures: !!omap +- 000_fetch_L0_X1_addr_hit: !Subfeature + name: 000_fetch_L0_X1_addr_hit + tag: VP_PMP_F014_S011 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S011_I000 + description: 'reuse of VP_PMP_F012_S011_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S011_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST14-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=NAPOT]\nTST14-11 (LOW-PRIO)\n\ + \ [same as TST12-11(group), but with pmpcfg(i).A=NAPOT]" +- 001_fetch_L0_X0_addr_hit: !Subfeature + name: 001_fetch_L0_X0_addr_hit + tag: VP_PMP_F014_S012 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S012_I000 + description: 'reuse of VP_PMP_F012_S012_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S012_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST14-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=NAPOT]\nTST14-12 (LOW-PRIO)\n\ + \ [same as TST12-12(group), but with pmpcfg(i).A=NAPOT]" +- 002_fetch_L0_X1_addr_miss: !Subfeature + name: 002_fetch_L0_X1_addr_miss + tag: VP_PMP_F014_S013 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S013_I000 + description: 'reuse of VP_PMP_F012_S013_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S013_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST14-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=NAPOT]\nTST14-13 (LOW-PRIO)\n\ + \ [same as TST12-13(group), but with pmpcfg(i).A=NAPOT]" +- 003_fetch_L1_X1_addr_hit: !Subfeature + name: 003_fetch_L1_X1_addr_hit + tag: VP_PMP_F014_S014 + next_elt_id: 1 + display_order: 3 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S014_I000 + description: 'reuse of VP_PMP_F012_S014_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S014_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST14-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=NAPOT]\nTST14-14 (HIGH-PRIO)\n\ + \ [same as TST12-14(group), but with pmpcfg(i).A=NAPOT]" +- 004_fetch_L1_X0_addr_hit: !Subfeature + name: 004_fetch_L1_X0_addr_hit + tag: VP_PMP_F014_S015 + next_elt_id: 1 + display_order: 4 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S015_I000 + description: 'reuse of VP_PMP_F012_S015_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S015_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR04-b\n[Attempting to fetch an instruction from + a PMP region that does not have execute permissions raises an instruction + access-fault exception]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST14-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=NAPOT]\nTST14-15 (MEDIUM-PRIO)\n\ + \ [same as TST12-15(group), but with pmpcfg(i).A=NAPOT]" +- 005_fetch_L1_X1_addr_miss: !Subfeature + name: 005_fetch_L1_X1_addr_miss + tag: VP_PMP_F014_S016 + next_elt_id: 1 + display_order: 5 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S016_I000 + description: 'reuse of VP_PMP_F012_S016_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S016_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST14-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=NAPOT]\nTST14-16 (HIGH-PRIO)\n\ + \ [same as TST12-16(group), but with pmpcfg(i).A=NAPOT]" +- 006_load_L0_R1_addr_hit: !Subfeature + name: 006_load_L0_R1_addr_hit + tag: VP_PMP_F014_S021 + next_elt_id: 1 + display_order: 6 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S021_I000 + description: 'reuse of VP_PMP_F012_S021_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S021_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST14-2x(group)\n\ + \ [same as TST12-2x(group), but with pmpcfg(i).A=NAPOT]\nTST14-21 (LOW-PRIO)\n\ + \ [same as TST12-21(group), but with pmpcfg(i).A=NAPOT]" +- 007_load_L0_R0_addr_hit: !Subfeature + name: 007_load_L0_R0_addr_hit + tag: VP_PMP_F014_S022 + next_elt_id: 1 + display_order: 7 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S022_I000 + description: 'reuse of VP_PMP_F012_S022_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S022_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST14-2x(group)\n\ + \ [same as TST12-2x(group), but with pmpcfg(i).A=NAPOT]\nTST14-22 (LOW-PRIO)\n\ + \ [same as TST12-22(group), but with pmpcfg(i).A=NAPOT]" +- 008_load_L0_R1_addr_miss: !Subfeature + name: 008_load_L0_R1_addr_miss + tag: VP_PMP_F014_S023 + next_elt_id: 1 + display_order: 8 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S023_I000 + description: 'reuse of VP_PMP_F012_S023_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S023_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST14-2x(group)\n\ + \ [same as TST12-2x(group), but with pmpcfg(i).A=NAPOT]\nTST14-23 (LOW-PRIO)\n\ + \ [same as TST12-23(group), but with pmpcfg(i).A=NAPOT]" +- 009_load_L1_R1_addr_hit: !Subfeature + name: 009_load_L1_R1_addr_hit + tag: VP_PMP_F014_S024 + next_elt_id: 1 + display_order: 9 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S024_I000 + description: 'reuse of VP_PMP_F012_S024_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S024_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST14-2x(group)\n\ + \ [same as TST12-2x(group), but with pmpcfg(i).A=NAPOT]\nTST14-24 (HIGH-PRIO)\n\ + \ [same as TST12-24(group), but with pmpcfg(i).A=NAPOT]" +- 010_load_L1_R0_addr_hit: !Subfeature + name: 010_load_L1_R0_addr_hit + tag: VP_PMP_F014_S025 + next_elt_id: 1 + display_order: 10 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S025_I000 + description: 'reuse of VP_PMP_F012_S025_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S025_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR04-c\n[Attempting to execute a load or load-reserved + instruction which accesses a physical address within a PMP region without + read permissions raises a load access-fault exception]\n\nFTR02-b1\n[the + lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean + programmed first)]\n \n\nTST14-2x(group)\n [same as TST12-2x(group), but + with pmpcfg(i).A=NAPOT]\n TST14-25 (MEDIUM-PRIO)\n [same as TST12-25(group), + but with pmpcfg(i).A=NAPOT]" +- 011_load_L1_R1_addr_miss: !Subfeature + name: 011_load_L1_R1_addr_miss + tag: VP_PMP_F014_S026 + next_elt_id: 1 + display_order: 11 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S026_I000 + description: 'reuse of VP_PMP_F012_S026_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S026_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST14-2x(group)\n\ + \ [same as TST12-2x(group), but with pmpcfg(i).A=NAPOT]\nTST14-26 (HIGH-PRIO)\n\ + \ [same as TST12-26(group), but with pmpcfg(i).A=NAPOT]" +- 012_store_L0_W1_addr_hit: !Subfeature + name: 012_store_L0_W1_addr_hit + tag: VP_PMP_F014_S031 + next_elt_id: 1 + display_order: 12 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S031_I000 + description: 'reuse of VP_PMP_F012_S031_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S031_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST14-3x(group)\n\ + \ [same as TST12-3x(group), but with pmpcfg(i).A=NAPOT]\nTST14-31 (LOW-PRIO)\n\ + \ [same as TST12-31(group), but with pmpcfg(i).A=NAPOT]" +- 013_store_L0_W0_addr_hit: !Subfeature + name: 013_store_L0_W0_addr_hit + tag: VP_PMP_F014_S032 + next_elt_id: 1 + display_order: 13 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S032_I000 + description: 'reuse of VP_PMP_F012_S032_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S032_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST14-3x(group)\n\ + \ [same as TST12-3x(group), but with pmpcfg(i).A=NAPOT]\nTST14-32 (LOW-PRIO)\n\ + \ [same as TST12-32(group), but with pmpcfg(i).A=NAPOT]" +- 014_store_L0_W1_addr_miss: !Subfeature + name: 014_store_L0_W1_addr_miss + tag: VP_PMP_F014_S033 + next_elt_id: 1 + display_order: 14 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S033_I000 + description: 'reuse of VP_PMP_F012_S033_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S033_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST14-3x(group)\n\ + \ [same as TST12-3x(group), but with pmpcfg(i).A=NAPOT]\nTST14-33 (LOW-PRIO)\n\ + \ [same as TST12-33(group), but with pmpcfg(i).A=NAPOT]" +- 015_store_L1_W1_addr_hit: !Subfeature + name: 015_store_L1_W1_addr_hit + tag: VP_PMP_F014_S034 + next_elt_id: 1 + display_order: 15 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S034_I000 + description: 'reuse of VP_PMP_F012_S034_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S034_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST14-3x(group)\n\ + \ [same as TST12-3x(group), but with pmpcfg(i).A=NAPOT]\nTST14-34 (HIGH-PRIO)\n\ + \ [same as TST12-34(group), but with pmpcfg(i).A=NAPOT]" +- 016_store_L1_W0_addr_hit: !Subfeature + name: 016_store_L1_W0_addr_hit + tag: VP_PMP_F014_S035 + next_elt_id: 1 + display_order: 16 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S035_I000 + description: 'reuse of VP_PMP_F012_S035_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S035_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR04-d\n[Attempting to execute a store, store-conditional, + or AMO instruction which accesses a physical address within a PMP region + without write permissions raises a store access-fault exception]\n\nFTR02-b1\n + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does + it mean programmed first)]\n\n\nTST14-3x(group)\n [same as TST12-3x(group), + but with pmpcfg(i).A=NAPOT]\nTST14-35 (MEDIUM-PRIO)\n [same as TST12-35(group), + but with pmpcfg(i).A=NAPOT]" +- 017_store_L1_W1_addr_miss: !Subfeature + name: 017_store_L1_W1_addr_miss + tag: VP_PMP_F014_S036 + next_elt_id: 1 + display_order: 17 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S036_I000 + description: 'reuse of VP_PMP_F012_S036_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S036_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST14-3x(group)\n\ + \ [same as TST12-3x(group), but with pmpcfg(i).A=NAPOT]\nTST14-36 (HIGH-PRIO)\n\ + \ [same as TST12-36(group), but with pmpcfg(i).A=NAPOT]" +- 018_load_MPP_L0_R1_addr_hit: !Subfeature + name: 018_load_MPP_L0_R1_addr_hit + tag: VP_PMP_F014_S041 + next_elt_id: 1 + display_order: 18 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S041_I000 + description: 'reuse of VP_PMP_F012_S041_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S041_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST14-4x(group)\n\ + \ [same as TST12-4x(group), but with pmpcfg(i).A=NAPOT]\nTST14-41 (LOWEST-PRIO)\n\ + \ [same as TST12-41(group), but with pmpcfg(i).A=NAPOT]" +- 019_load_MPP_L0_R0_addr_hit: !Subfeature + name: 019_load_MPP_L0_R0_addr_hit + tag: VP_PMP_F014_S042 + next_elt_id: 1 + display_order: 19 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S042_I000 + description: 'reuse of VP_PMP_F012_S042_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S042_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST14-4x(group)\n\ + \ [same as TST12-4x(group), but with pmpcfg(i).A=NAPOT]\nTST14-42 (LOWEST-PRIO)\n\ + \ [same as TST12-42(group), but with pmpcfg(i).A=NAPOT]" +- 020_load_MPP_L0_R1_addr_miss: !Subfeature + name: 020_load_MPP_L0_R1_addr_miss + tag: VP_PMP_F014_S043 + next_elt_id: 1 + display_order: 20 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S043_I000 + description: 'reuse of VP_PMP_F012_S043_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S043_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST14-4x(group)\n\ + \ [same as TST12-4x(group), but with pmpcfg(i).A=NAPOT]\nTST14-43 (LOWEST-PRIO)\n\ + \ [same as TST12-43(group), but with pmpcfg(i).A=NAPOT]" +- 021_load_MPP_L1_R1_addr_hit: !Subfeature + name: 021_load_MPP_L1_R1_addr_hit + tag: VP_PMP_F014_S044 + next_elt_id: 1 + display_order: 21 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S044_I000 + description: 'reuse of VP_PMP_F012_S044_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S044_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST14-4x(group)\n\ + \ [same as TST12-4x(group), but with pmpcfg(i).A=NAPOT]\nTST14-44 (LOWEST-PRIO)\n\ + \ [same as TST12-44(group), but with pmpcfg(i).A=NAPOT]" +- 022_load_MPP_L1_R0_addr_hit: !Subfeature + name: 022_load_MPP_L1_R0_addr_hit + tag: VP_PMP_F014_S045 + next_elt_id: 1 + display_order: 22 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S045_I000 + description: 'reuse of VP_PMP_F012_S045_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S045_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR04-c\n[Attempting to execute a load or load-reserved + instruction which accesses a physical address within a PMP region without + read permissions raises a load access-fault exception]\n\nFTR02-b1\n[the + lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean + programmed first)]\n \n\nTST14-4x(group)\n [same as TST12-4x(group), but + with pmpcfg(i).A=NAPOT]\n TST14-45 (LOWEST-PRIO)\n [same as TST12-45(group), + but with pmpcfg(i).A=NAPOT]" +- 023_load_MPP_L1_R1_addr_miss: !Subfeature + name: 023_load_MPP_L1_R1_addr_miss + tag: VP_PMP_F014_S046 + next_elt_id: 1 + display_order: 23 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S046_I000 + description: 'reuse of VP_PMP_F012_S046_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S046_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST14-4x(group)\n\ + \ [same as TST12-4x(group), but with pmpcfg(i).A=NAPOT]\nTST14-46 (LOWEST-PRIO)\n\ + \ [same as TST12-46(group), but with pmpcfg(i).A=NAPOT]" +- 024_store_MPP_L0_W1_addr_hit: !Subfeature + name: 024_store_MPP_L0_W1_addr_hit + tag: VP_PMP_F014_S051 + next_elt_id: 1 + display_order: 24 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S051_I000 + description: 'reuse of VP_PMP_F012_S051_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S051_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST14-5x(group)\n\ + \ [same as TST12-5x(group), but with pmpcfg(i).A=NAPOT]\nTST14-51 (LOWEST-PRIO)\n\ + \ [same as TST12-51(group), but with pmpcfg(i).A=NAPOT]" +- 025_store_MPP_L0_W0_addr_hit: !Subfeature + name: 025_store_MPP_L0_W0_addr_hit + tag: VP_PMP_F014_S052 + next_elt_id: 1 + display_order: 25 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S052_I000 + description: 'reuse of VP_PMP_F012_S052_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S052_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST14-5x(group)\n\ + \ [same as TST12-5x(group), but with pmpcfg(i).A=NAPOT]\nTST14-52 (LOWEST-PRIO)\n\ + \ [same as TST12-52(group), but with pmpcfg(i).A=NAPOT]" +- 026_store_MPP_L0_W1_addr_miss: !Subfeature + name: 026_store_MPP_L0_W1_addr_miss + tag: VP_PMP_F014_S053 + next_elt_id: 1 + display_order: 26 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S053_I000 + description: 'reuse of VP_PMP_F012_S053_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S053_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST14-5x(group)\n\ + \ [same as TST12-5x(group), but with pmpcfg(i).A=NAPOT]\nTST14-53 (LOWEST-PRIO)\n\ + \ [same as TST12-53(group), but with pmpcfg(i).A=NAPOT]" +- 027_store_MPP_L1_W1_addr_hit: !Subfeature + name: 027_store_MPP_L1_W1_addr_hit + tag: VP_PMP_F014_S054 + next_elt_id: 1 + display_order: 27 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S054_I000 + description: 'reuse of VP_PMP_F012_S054_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S054_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST14-5x(group)\n\ + \ [same as TST12-5x(group), but with pmpcfg(i).A=NAPOT]\nTST14-54 (LOWEST-PRIO)\n\ + \ [same as TST12-54(group), but with pmpcfg(i).A=NAPOT]" +- 028_store_MPP_L1_W0_addr_hit: !Subfeature + name: 028_store_MPP_L1_W0_addr_hit + tag: VP_PMP_F014_S055 + next_elt_id: 1 + display_order: 28 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S055_I000 + description: 'reuse of VP_PMP_F012_S055_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S055_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR04-d\n[Attempting to execute a store, store-conditional, + or AMO instruction which accesses a physical address within a PMP region + without write permissions raises a store access-fault exception]\n\nFTR02-b1\n + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does + it mean programmed first)]\n\n\nTST14-5x(group)\n [same as TST12-5x(group), + but with pmpcfg(i).A=NAPOT]\nTST14-55 (LOWEST-PRIO)\n [same as TST12-55(group), + but with pmpcfg(i).A=NAPOT]" +- 029_store_MPP_L1_W1_addr_miss: !Subfeature + name: 029_store_MPP_L1_W1_addr_miss + tag: VP_PMP_F014_S056 + next_elt_id: 1 + display_order: 29 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F014_S056_I000 + description: 'reuse of VP_PMP_F012_S056_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S056_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=NAPOT\n - + pmpaddr(i): any NAPOT address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST14-5x(group)\n\ + \ [same as TST12-5x(group), but with pmpcfg(i).A=NAPOT]\nTST14-56 (LOWEST-PRIO)\n\ + \ [same as TST12-56(group), but with pmpcfg(i).A=NAPOT]" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP015.yml b/verif/docs/VerifPlans/PMP/VP_IP015.yml new file mode 100644 index 00000000000..a84fd152c55 --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP015.yml @@ -0,0 +1,1502 @@ +!Feature +next_elt_id: 36 +name: cfg TOR access S/U +id: 15 +display_order: 15 +subfeatures: !!omap +- 000_fetch_L0_X1_addr_hit: !Subfeature + name: 000_fetch_L0_X1_addr_hit + tag: VP_PMP_F015_S011 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S011_I000 + description: 'reuse of VP_PMP_F011_S011_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S011_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=TOR]\n + TST15-11 (HIGH-PRIO)\n [same as TST11-11(group), but with pmpcfg(i).A=TOR]" +- 001_fetch_L0_X0_addr_hit: !Subfeature + name: 001_fetch_L0_X0_addr_hit + tag: VP_PMP_F015_S012 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S012_I000 + description: 'reuse of VP_PMP_F011_S012_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S012_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-b\n [Attempting to fetch an instruction from a PMP region + that does not have execute permissions raises an instruction access-fault + exception]\n \n\nTST15-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=TOR]\n + TST15-12 (MEDIUM-PRIO)\n [same as TST11-12(group), but with pmpcfg(i).A=TOR]" +- 002_fetch_L0_X1_addr_miss: !Subfeature + name: 002_fetch_L0_X1_addr_miss + tag: VP_PMP_F015_S013 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S013_I000 + description: 'reuse of VP_PMP_F011_S013_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S013_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=TOR]\n + TST15-13 (MEDIUM-PRIO)\n [same as TST11-13(group), but with pmpcfg(i).A=TOR]" +- 003_fetch_L1_X1_addr_hit: !Subfeature + name: 003_fetch_L1_X1_addr_hit + tag: VP_PMP_F015_S014 + next_elt_id: 1 + display_order: 3 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S014_I000 + description: 'reuse of VP_PMP_F011_S014_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S014_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=TOR]\n + TST15-14 (LOW-PRIO)\n [same as TST11-14(group), but with pmpcfg(i).A=TOR]" +- 004_fetch_L1_X0_addr_hit: !Subfeature + name: 004_fetch_L1_X0_addr_hit + tag: VP_PMP_F015_S015 + next_elt_id: 1 + display_order: 4 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S015_I000 + description: 'reuse of VP_PMP_F011_S015_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S015_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-b\n[Attempting to fetch an instruction from a PMP region that + does not have execute permissions raises an instruction access-fault exception]\n\ + \n\nTST15-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=TOR]\n + TST15-15 (LOW-PRIO)\n [same as TST11-15(group), but with pmpcfg(i).A=TOR]" +- 005_fetch_L1_X1_addr_miss: !Subfeature + name: 005_fetch_L1_X1_addr_miss + tag: VP_PMP_F015_S016 + next_elt_id: 1 + display_order: 5 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S016_I000 + description: 'reuse of VP_PMP_F011_S016_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S016_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=TOR]\n + TST15-16 (LOW-PRIO)\n [same as TST11-16(group), but with pmpcfg(i).A=TOR]" +- 006_load_L0_R1_addr_hit: !Subfeature + name: 006_load_L0_R1_addr_hit + tag: VP_PMP_F015_S021 + next_elt_id: 1 + display_order: 6 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S021_I000 + description: 'reuse of VP_PMP_F011_S021_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S021_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-2x(group)\n [same as TST11-2x(group), but with pmpcfg(i).A=TOR]\n + TST15-21 (HIGH-PRIO)\n [same as TST11-21(group), but with pmpcfg(i).A=TOR]" +- 007_load_L0_R0_addr_hit: !Subfeature + name: 007_load_L0_R0_addr_hit + tag: VP_PMP_F015_S022 + next_elt_id: 1 + display_order: 7 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S022_I000 + description: 'reuse of VP_PMP_F011_S022_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S022_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-c\n [Attempting to execute a load or load-reserved instruction + which accesses a physical address within a PMP region without read permissions + raises a load access-fault exception]\n\n\nTST15-2x(group)\n [same as TST11-2x(group), + but with pmpcfg(i).A=TOR]\nTST15-22 (MEDIUM-PRIO)\n [same as TST11-22(group), + but with pmpcfg(i).A=TOR]" +- 008_load_L0_R1_addr_miss: !Subfeature + name: 008_load_L0_R1_addr_miss + tag: VP_PMP_F015_S023 + next_elt_id: 1 + display_order: 8 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S023_I000 + description: 'reuse of VP_PMP_F011_S023_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S023_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-2x(group)\n [same as TST11-2x(group), but with pmpcfg(i).A=TOR]\n + TST15-23 (MEDIUM-PRIO)\n [same as TST11-23(group), but with pmpcfg(i).A=TOR]" +- 009_load_L1_R1_addr_hit: !Subfeature + name: 009_load_L1_R1_addr_hit + tag: VP_PMP_F015_S024 + next_elt_id: 1 + display_order: 9 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S024_I000 + description: 'reuse of VP_PMP_F011_S024_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S024_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-2x(group)\n [same as TST11-2x(group), but with pmpcfg(i).A=TOR]\n + TST15-24 (LOW-PRIO)\n [same as TST11-24(group), but with pmpcfg(i).A=TOR]" +- 010_load_L1_R0_addr_hit: !Subfeature + name: 010_load_L1_R0_addr_hit + tag: VP_PMP_F015_S025 + next_elt_id: 1 + display_order: 10 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S025_I000 + description: 'reuse of VP_PMP_F011_S025_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S025_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-c\n[Attempting to execute a load or load-reserved instruction + which accesses a physical address within a PMP region without read permissions + raises a load access-fault exception]\n\n\nTST15-2x(group)\n [same as TST11-2x(group), + but with pmpcfg(i).A=TOR]\n TST15-25 (LOW-PRIO)\n [same as TST11-25(group), + but with pmpcfg(i).A=TOR]" +- 011_load_L1_R1_addr_miss: !Subfeature + name: 011_load_L1_R1_addr_miss + tag: VP_PMP_F015_S026 + next_elt_id: 1 + display_order: 11 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S026_I000 + description: 'reuse of VP_PMP_F011_S026_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S026_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-2x(group)\n [same as TST11-2x(group), but with pmpcfg(i).A=TOR]\n + TST15-26 (LOW-PRIO)\n [same as TST11-26(group), but with pmpcfg(i).A=TOR]" +- 012_store_L0_W1_addr_hit: !Subfeature + name: 012_store_L0_W1_addr_hit + tag: VP_PMP_F015_S031 + next_elt_id: 1 + display_order: 12 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S031_I000 + description: 'reuse of VP_PMP_F011_S031_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S031_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-3x(group)\n [same as TST11-3x(group), but with pmpcfg(i).A=TOR]\n + TST15-31 (HIGH-PRIO)\n [same as TST11-31(group), but with pmpcfg(i).A=TOR]" +- 013_store_L0_W0_addr_hit: !Subfeature + name: 013_store_L0_W0_addr_hit + tag: VP_PMP_F015_S032 + next_elt_id: 1 + display_order: 13 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S032_I000 + description: 'reuse of VP_PMP_F011_S032_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S032_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-d\n [Attempting to execute a store, store-conditional, or + AMO instruction which accesses a physical address within a PMP region without + write permissions raises a store access-fault exception]\n\n\nTST15-3x(group)\n\ + \ [same as TST11-3x(group), but with pmpcfg(i).A=TOR]\nTST15-32 (MEDIUM-PRIO)\n\ + \ [same as TST11-32(group), but with pmpcfg(i).A=TOR]" +- 014_store_L0_W1_addr_miss: !Subfeature + name: 014_store_L0_W1_addr_miss + tag: VP_PMP_F015_S033 + next_elt_id: 1 + display_order: 14 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S033_I000 + description: 'reuse of VP_PMP_F011_S033_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S033_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-3x(group)\n [same as TST11-3x(group), but with pmpcfg(i).A=TOR]\n + TST15-33 (MEDIUM-PRIO)\n [same as TST11-33(group), but with pmpcfg(i).A=TOR]" +- 015_store_L1_W1_addr_hit: !Subfeature + name: 015_store_L1_W1_addr_hit + tag: VP_PMP_F015_S034 + next_elt_id: 1 + display_order: 15 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S034_I000 + description: 'reuse of VP_PMP_F011_S034_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S034_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-3x(group)\n [same as TST11-3x(group), but with pmpcfg(i).A=TOR]\n + TST15-34 (LOW-PRIO)\n [same as TST11-34(group), but with pmpcfg(i).A=TOR]" +- 016_store_L1_W0_addr_hit: !Subfeature + name: 016_store_L1_W0_addr_hit + tag: VP_PMP_F015_S035 + next_elt_id: 1 + display_order: 16 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S035_I000 + description: 'reuse of VP_PMP_F011_S035_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S035_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-d\n[Attempting to execute a store, store-conditional, or AMO + instruction which accesses a physical address within a PMP region without + write permissions raises a store access-fault exception]\n\n\nTST15-3x(group)\n\ + \ [same as TST11-3x(group), but with pmpcfg(i).A=TOR]\nTST15-35 (LOW-PRIO)\n\ + \ [same as TST11-35(group), but with pmpcfg(i).A=TOR]" +- 017_store_L1_W1_addr_miss: !Subfeature + name: 017_store_L1_W1_addr_miss + tag: VP_PMP_F015_S036 + next_elt_id: 1 + display_order: 17 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S036_I000 + description: 'reuse of VP_PMP_F011_S036_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S036_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-3x(group)\n [same as TST11-3x(group), but with pmpcfg(i).A=TOR]\n + TST15-36 (LOW-PRIO)\n [same as TST11-36(group), but with pmpcfg(i).A=TOR]" +- 018_load_MPP_L0_R1_addr_hit: !Subfeature + name: 018_load_MPP_L0_R1_addr_hit + tag: VP_PMP_F015_S041 + next_elt_id: 1 + display_order: 18 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S041_I000 + description: 'reuse of VP_PMP_F011_S041_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S041_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-4x(group)\n [same as TST11-4x(group), but with pmpcfg(i).A=TOR]\n + TST15-41 (LOWEST-PRIO)\n [same as TST11-41(group), but with pmpcfg(i).A=TOR]" +- 019_load_MPP_L0_R0_addr_hit: !Subfeature + name: 019_load_MPP_L0_R0_addr_hit + tag: VP_PMP_F015_S042 + next_elt_id: 1 + display_order: 19 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S042_I000 + description: 'reuse of VP_PMP_F011_S042_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S042_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-c\n [Attempting to execute a load or load-reserved instruction + which accesses a physical address within a PMP region without read permissions + raises a load access-fault exception]\n\n\nTST15-4x(group)\n [same as TST11-4x(group), + but with pmpcfg(i).A=TOR]\nTST15-42 (LOWEST-PRIO)\n [same as TST11-42(group), + but with pmpcfg(i).A=TOR]" +- 020_load_MPP_L0_R1_addr_miss: !Subfeature + name: 020_load_MPP_L0_R1_addr_miss + tag: VP_PMP_F015_S043 + next_elt_id: 1 + display_order: 20 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S043_I000 + description: 'reuse of VP_PMP_F011_S043_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S043_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-4x(group)\n [same as TST11-4x(group), but with pmpcfg(i).A=TOR]\n + TST15-43 (LOWEST-PRIO)\n [same as TST11-43(group), but with pmpcfg(i).A=TOR]" +- 021_load_MPP_L1_R1_addr_hit: !Subfeature + name: 021_load_MPP_L1_R1_addr_hit + tag: VP_PMP_F015_S044 + next_elt_id: 1 + display_order: 21 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S044_I000 + description: 'reuse of VP_PMP_F011_S044_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S044_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-4x(group)\n [same as TST11-4x(group), but with pmpcfg(i).A=TOR]\n + TST15-44 (LOWEST-PRIO)\n [same as TST11-44(group), but with pmpcfg(i).A=TOR]" +- 022_load_MPP_L1_R0_addr_hit: !Subfeature + name: 022_load_MPP_L1_R0_addr_hit + tag: VP_PMP_F015_S045 + next_elt_id: 1 + display_order: 22 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S045_I000 + description: 'reuse of VP_PMP_F011_S045_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S045_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-c\n[Attempting to execute a load or load-reserved instruction + which accesses a physical address within a PMP region without read permissions + raises a load access-fault exception]\n\n\nTST15-4x(group)\n [same as TST11-4x(group), + but with pmpcfg(i).A=TOR]\n TST15-45 (LOWEST-PRIO)\n [same as TST11-45(group), + but with pmpcfg(i).A=TOR]" +- 023_load_MPP_L1_R1_addr_miss: !Subfeature + name: 023_load_MPP_L1_R1_addr_miss + tag: VP_PMP_F015_S046 + next_elt_id: 1 + display_order: 23 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S046_I000 + description: 'reuse of VP_PMP_F011_S046_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S046_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-4x(group)\n [same as TST11-4x(group), but with pmpcfg(i).A=TOR]\n + TST15-46 (LOWEST-PRIO)\n [same as TST11-46(group), but with pmpcfg(i).A=TOR]" +- 024_store_MPP_L0_W1_addr_hit: !Subfeature + name: 024_store_MPP_L0_W1_addr_hit + tag: VP_PMP_F015_S051 + next_elt_id: 1 + display_order: 24 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S051_I000 + description: 'reuse of VP_PMP_F011_S051_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S051_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-5x(group)\n [same as TST11-5x(group), but with pmpcfg(i).A=TOR]\n + TST15-51 (LOWEST-PRIO)\n [same as TST11-51(group), but with pmpcfg(i).A=TOR]" +- 025_store_MPP_L0_W0_addr_hit: !Subfeature + name: 025_store_MPP_L0_W0_addr_hit + tag: VP_PMP_F015_S052 + next_elt_id: 1 + display_order: 25 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S052_I000 + description: 'reuse of VP_PMP_F011_S052_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S052_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-d\n [Attempting to execute a store, store-conditional, or + AMO instruction which accesses a physical address within a PMP region without + write permissions raises a store access-fault exception]\n\n\nTST15-5x(group)\n\ + \ [same as TST11-5x(group), but with pmpcfg(i).A=TOR]\nTST15-52 (LOWEST-PRIO)\n\ + \ [same as TST11-52(group), but with pmpcfg(i).A=TOR]" +- 026_store_MPP_L0_W1_addr_miss: !Subfeature + name: 026_store_MPP_L0_W1_addr_miss + tag: VP_PMP_F015_S053 + next_elt_id: 1 + display_order: 26 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S053_I000 + description: 'reuse of VP_PMP_F011_S053_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S053_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-5x(group)\n [same as TST11-5x(group), but with pmpcfg(i).A=TOR]\n + TST15-53 (LOWEST-PRIO)\n [same as TST11-53(group), but with pmpcfg(i).A=TOR]" +- 027_store_MPP_L1_W1_addr_hit: !Subfeature + name: 027_store_MPP_L1_W1_addr_hit + tag: VP_PMP_F015_S054 + next_elt_id: 1 + display_order: 27 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S054_I000 + description: 'reuse of VP_PMP_F011_S054_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S054_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-5x(group)\n [same as TST11-5x(group), but with pmpcfg(i).A=TOR]\n + TST15-54 (LOWEST-PRIO)\n [same as TST11-54(group), but with pmpcfg(i).A=TOR]" +- 028_store_MPP_L1_W0_addr_hit: !Subfeature + name: 028_store_MPP_L1_W0_addr_hit + tag: VP_PMP_F015_S055 + next_elt_id: 1 + display_order: 28 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S055_I000 + description: 'reuse of VP_PMP_F011_S055_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S055_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-d\n[Attempting to execute a store, store-conditional, or AMO + instruction which accesses a physical address within a PMP region without + write permissions raises a store access-fault exception]\n\n\nTST15-5x(group)\n\ + \ [same as TST11-5x(group), but with pmpcfg(i).A=TOR]\nTST15-55 (LOWEST-PRIO)\n\ + \ [same as TST11-55(group), but with pmpcfg(i).A=TOR]" +- 029_store_MPP_L1_W1_addr_miss: !Subfeature + name: 029_store_MPP_L1_W1_addr_miss + tag: VP_PMP_F015_S056 + next_elt_id: 1 + display_order: 29 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S056_I000 + description: 'reuse of VP_PMP_F011_S056_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S056_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] + pmpaddr(0) > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-5x(group)\n [same as TST11-5x(group), but with pmpcfg(i).A=TOR]\n + TST15-56 (LOWEST-PRIO)\n [same as TST11-56(group), but with pmpcfg(i).A=TOR]" +- 030_fetch_L0_X1_addr_forbidden: !Subfeature + name: 030_fetch_L0_X1_addr_forbidden + tag: VP_PMP_F015_S061 + next_elt_id: 1 + display_order: 30 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S061_I000 + description: "reuse of VP_PMP_F011_S011_I000 feature description (Cf. Feature: + \"cfg NA4 access S/U\")\n\n{Page 59 Volume II: RISC-V Privileged Architectures + V20211203}\nIf pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i + matches no addresses\nIf PMP entry 0’s A field is set to TOR, zero is used + for the lower bound, and so it matches any address y < pmpaddr(0)" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S011_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range\n - [for + i=0] pmpaddr(0) = 0: invalid TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)\n\nCHECK UPDATE\n\ + \ - check instruction fetch access-fault exception raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=TOR]\n + TST15-11 (LOW-PRIO)\n [same as TST11-11(group), but with pmpcfg(i).A=TOR]\n + \n\n//TO COMPLETE => FTR06-b\nTST25 = same as TST15+TST16 (groups) with + PMP entry (0) with pmpaddr(0) > 0\nTST26 = same as TST15+TST16 (groups) + with PMP entry (0) with pmpaddr(0) = 0\n [create scenario where PMP entry + pmpcfg(0) with TOR:\n - pmpaddr(0) > 0\n - pmpaddr(0) = 0]\n\n//TO + COMPLETE => FTR06-c\n TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) + and with pmpcfg(i) and pmpcfg(i-1) correct\n [create scenario where PMP + entry pmpcfg(i) with TOR:\n - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry + pmpcfg(i-1) correct]\n [create scenario where PMP entry pmpcfg(0) with + TOR:\n - pmpaddr(0) >= pmpaddr(1/2/3/…)]" +- 031_fetch_L1_X1_addr_forbidden: !Subfeature + name: 031_fetch_L1_X1_addr_forbidden + tag: VP_PMP_F015_S062 + next_elt_id: 1 + display_order: 31 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S062_I000 + description: "reuse of VP_PMP_F011_S014_I000 feature description (Cf. Feature: + \"cfg NA4 access S/U\")\n\n{Page 59 Volume II: RISC-V Privileged Architectures + V20211203}\nIf pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i + matches no addresses\nIf PMP entry 0’s A field is set to TOR, zero is used + for the lower bound, and so it matches any address y < pmpaddr(0)" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S014_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range\n - [for + i=0] pmpaddr(0) = 0: invalid TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)\n\nCHECK UPDATE\n\ + \ - check instruction fetch access-fault exception raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=TOR]\n + TST15-14 (LOW-PRIO)\n [same as TST11-14(group), but with pmpcfg(i).A=TOR]\n + \n\n//TO COMPLETE => FTR06-b\nTST25 = same as TST15+TST16 (groups) with + PMP entry (0) with pmpaddr(0) > 0\nTST26 = same as TST15+TST16 (groups) + with PMP entry (0) with pmpaddr(0) = 0\n [create scenario where PMP entry + pmpcfg(0) with TOR:\n - pmpaddr(0) > 0\n - pmpaddr(0) = 0]\n\n//TO + COMPLETE => FTR06-c\n TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) + and with pmpcfg(i) and pmpcfg(i-1) correct\n [create scenario where PMP + entry pmpcfg(i) with TOR:\n - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry + pmpcfg(i-1) correct]\n [create scenario where PMP entry pmpcfg(0) with + TOR:\n - pmpaddr(0) >= pmpaddr(1/2/3/…)]" +- 032_load_L0_R1_addr_forbidden: !Subfeature + name: 032_load_L0_R1_addr_forbidden + tag: VP_PMP_F015_S063 + next_elt_id: 1 + display_order: 32 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S063_I000 + description: "reuse of VP_PMP_F011_S021_I000 feature description (Cf. Feature: + \"cfg NA4 access S/U\")\n\n{Page 59 Volume II: RISC-V Privileged Architectures + V20211203}\nIf pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i + matches no addresses\nIf PMP entry 0’s A field is set to TOR, zero is used + for the lower bound, and so it matches any address y < pmpaddr(0)" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S021_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range\n - [for + i=0] pmpaddr(0) = 0: invalid TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)\n\nCHECK UPDATE\n\ + \ - check load access-fault exception raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-2x(group)\n [same as TST11-2x(group), but with pmpcfg(i).A=TOR]\n + TST15-21 (HIGH-PRIO)\n [same as TST11-21(group), but with pmpcfg(i).A=TOR]\n + \n\n//TO COMPLETE => FTR06-b\nTST25 = same as TST15+TST16 (groups) with + PMP entry (0) with pmpaddr(0) > 0\nTST26 = same as TST15+TST16 (groups) + with PMP entry (0) with pmpaddr(0) = 0\n [create scenario where PMP entry + pmpcfg(0) with TOR:\n - pmpaddr(0) > 0\n - pmpaddr(0) = 0]\n\n//TO + COMPLETE => FTR06-c\n TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) + and with pmpcfg(i) and pmpcfg(i-1) correct\n [create scenario where PMP + entry pmpcfg(i) with TOR:\n - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry + pmpcfg(i-1) correct]\n [create scenario where PMP entry pmpcfg(0) with + TOR:\n - pmpaddr(0) >= pmpaddr(1/2/3/…)]" +- 033_load_L1_R1_addr_forbidden: !Subfeature + name: 033_load_L1_R1_addr_forbidden + tag: VP_PMP_F015_S064 + next_elt_id: 1 + display_order: 33 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S064_I000 + description: "reuse of VP_PMP_F011_S024_I000 feature description (Cf. Feature: + \"cfg NA4 access S/U\")\n\n{Page 59 Volume II: RISC-V Privileged Architectures + V20211203}\nIf pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i + matches no addresses\nIf PMP entry 0’s A field is set to TOR, zero is used + for the lower bound, and so it matches any address y < pmpaddr(0)" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S024_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range\n - [for + i=0] pmpaddr(0) = 0: invalid TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)\n\nCHECK UPDATE\n\ + \ - check load access-fault exception raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-2x(group)\n [same as TST11-2x(group), but with pmpcfg(i).A=TOR]\n + TST15-24 (LOW-PRIO)\n [same as TST11-24(group), but with pmpcfg(i).A=TOR]\n + \n\n//TO COMPLETE => FTR06-b\nTST25 = same as TST15+TST16 (groups) with + PMP entry (0) with pmpaddr(0) > 0\nTST26 = same as TST15+TST16 (groups) + with PMP entry (0) with pmpaddr(0) = 0\n [create scenario where PMP entry + pmpcfg(0) with TOR:\n - pmpaddr(0) > 0\n - pmpaddr(0) = 0]\n\n//TO + COMPLETE => FTR06-c\n TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) + and with pmpcfg(i) and pmpcfg(i-1) correct\n [create scenario where PMP + entry pmpcfg(i) with TOR:\n - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry + pmpcfg(i-1) correct]\n [create scenario where PMP entry pmpcfg(0) with + TOR:\n - pmpaddr(0) >= pmpaddr(1/2/3/…)]" +- 034_store_L0_W1_addr_forbidden: !Subfeature + name: 034_store_L0_W1_addr_forbidden + tag: VP_PMP_F015_S065 + next_elt_id: 1 + display_order: 34 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S065_I000 + description: "reuse of VP_PMP_F011_S031_I000 feature description (Cf. Feature: + \"cfg NA4 access S/U\")\n\n{Page 59 Volume II: RISC-V Privileged Architectures + V20211203}\nIf pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i + matches no addresses\nIf PMP entry 0’s A field is set to TOR, zero is used + for the lower bound, and so it matches any address y < pmpaddr(0)" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S031_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range\n - [for + i=0] pmpaddr(0) = 0: invalid TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)\n\nCHECK UPDATE\n\ + \ - check store access-fault exception raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-3x(group)\n [same as TST11-3x(group), but with pmpcfg(i).A=TOR]\n + TST15-31 (HIGH-PRIO)\n [same as TST11-31(group), but with pmpcfg(i).A=TOR]\n + \n\n//TO COMPLETE => FTR06-b\nTST25 = same as TST15+TST16 (groups) with + PMP entry (0) with pmpaddr(0) > 0\nTST26 = same as TST15+TST16 (groups) + with PMP entry (0) with pmpaddr(0) = 0\n [create scenario where PMP entry + pmpcfg(0) with TOR:\n - pmpaddr(0) > 0\n - pmpaddr(0) = 0]\n\n//TO + COMPLETE => FTR06-c\n TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) + and with pmpcfg(i) and pmpcfg(i-1) correct\n [create scenario where PMP + entry pmpcfg(i) with TOR:\n - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry + pmpcfg(i-1) correct]\n [create scenario where PMP entry pmpcfg(0) with + TOR:\n - pmpaddr(0) >= pmpaddr(1/2/3/…)]" +- 035_store_L1_W1_addr_forbidden: !Subfeature + name: 035_store_L1_W1_addr_forbidden + tag: VP_PMP_F015_S066 + next_elt_id: 1 + display_order: 35 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F015_S066_I000 + description: "reuse of VP_PMP_F011_S034_I000 feature description (Cf. Feature: + \"cfg NA4 access S/U\")\n\n{Page 59 Volume II: RISC-V Privileged Architectures + V20211203}\nIf pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i + matches no addresses\nIf PMP entry 0’s A field is set to TOR, zero is used + for the lower bound, and so it matches any address y < pmpaddr(0)" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S034_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - + [for i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range\n - [for + i=0] pmpaddr(0) = 0: invalid TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)\n\nCHECK UPDATE\n\ + \ - check store access-fault exception raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST15-3x(group)\n [same as TST11-3x(group), but with pmpcfg(i).A=TOR]\n + TST15-34 (LOW-PRIO)\n [same as TST11-34(group), but with pmpcfg(i).A=TOR]\n + \n\n//TO COMPLETE => FTR06-b\nTST25 = same as TST15+TST16 (groups) with + PMP entry (0) with pmpaddr(0) > 0\nTST26 = same as TST15+TST16 (groups) + with PMP entry (0) with pmpaddr(0) = 0\n [create scenario where PMP entry + pmpcfg(0) with TOR:\n - pmpaddr(0) > 0\n - pmpaddr(0) = 0]\n\n//TO + COMPLETE => FTR06-c\n TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) + and with pmpcfg(i) and pmpcfg(i-1) correct\n [create scenario where PMP + entry pmpcfg(i) with TOR:\n - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry + pmpcfg(i-1) correct]\n [create scenario where PMP entry pmpcfg(0) with + TOR:\n - pmpaddr(0) >= pmpaddr(1/2/3/…)]" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP016.yml b/verif/docs/VerifPlans/PMP/VP_IP016.yml new file mode 100644 index 00000000000..e1902745074 --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP016.yml @@ -0,0 +1,1482 @@ +!Feature +next_elt_id: 36 +name: cfg TOR access M +id: 16 +display_order: 16 +subfeatures: !!omap +- 000_fetch_L0_X1_addr_hit: !Subfeature + name: 000_fetch_L0_X1_addr_hit + tag: VP_PMP_F016_S011 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S011_I000 + description: 'reuse of VP_PMP_F012_S011_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S011_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=TOR]\nTST16-11 (LOW-PRIO)\n\ + \ [same as TST12-11(group), but with pmpcfg(i).A=TOR]" +- 001_fetch_L0_X0_addr_hit: !Subfeature + name: 001_fetch_L0_X0_addr_hit + tag: VP_PMP_F016_S012 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S012_I000 + description: 'reuse of VP_PMP_F012_S012_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S012_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=TOR]\nTST16-12 (LOW-PRIO)\n\ + \ [same as TST12-12(group), but with pmpcfg(i).A=TOR]" +- 002_fetch_L0_X1_addr_miss: !Subfeature + name: 002_fetch_L0_X1_addr_miss + tag: VP_PMP_F016_S013 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S013_I000 + description: 'reuse of VP_PMP_F012_S013_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S013_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=TOR]\nTST16-13 (LOW-PRIO)\n\ + \ [same as TST12-13(group), but with pmpcfg(i).A=TOR]" +- 003_fetch_L1_X1_addr_hit: !Subfeature + name: 003_fetch_L1_X1_addr_hit + tag: VP_PMP_F016_S014 + next_elt_id: 1 + display_order: 3 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S014_I000 + description: 'reuse of VP_PMP_F012_S014_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S014_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST16-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=TOR]\nTST16-14 (HIGH-PRIO)\n\ + \ [same as TST12-14(group), but with pmpcfg(i).A=TOR]" +- 004_fetch_L1_X0_addr_hit: !Subfeature + name: 004_fetch_L1_X0_addr_hit + tag: VP_PMP_F016_S015 + next_elt_id: 1 + display_order: 4 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S015_I000 + description: 'reuse of VP_PMP_F012_S015_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S015_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR04-b\n[Attempting to fetch an instruction from + a PMP region that does not have execute permissions raises an instruction + access-fault exception]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=TOR]\nTST16-15 (MEDIUM-PRIO)\n\ + \ [same as TST12-15(group), but with pmpcfg(i).A=TOR]" +- 005_fetch_L1_X1_addr_miss: !Subfeature + name: 005_fetch_L1_X1_addr_miss + tag: VP_PMP_F016_S016 + next_elt_id: 1 + display_order: 5 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S016_I000 + description: 'reuse of VP_PMP_F012_S016_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S016_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST16-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=TOR]\nTST16-16 (HIGH-PRIO)\n\ + \ [same as TST12-16(group), but with pmpcfg(i).A=TOR]" +- 006_load_L0_R1_addr_hit: !Subfeature + name: 006_load_L0_R1_addr_hit + tag: VP_PMP_F016_S021 + next_elt_id: 1 + display_order: 6 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S021_I000 + description: 'reuse of VP_PMP_F012_S021_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S021_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-2x(group)\n\ + \ [same as TST12-2x(group), but with pmpcfg(i).A=TOR]\nTST16-21 (LOW-PRIO)\n\ + \ [same as TST12-21(group), but with pmpcfg(i).A=TOR]" +- 007_load_L0_R0_addr_hit: !Subfeature + name: 007_load_L0_R0_addr_hit + tag: VP_PMP_F016_S022 + next_elt_id: 1 + display_order: 7 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S022_I000 + description: 'reuse of VP_PMP_F012_S022_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S022_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-2x(group)\n\ + \ [same as TST12-2x(group), but with pmpcfg(i).A=TOR]\nTST16-22 (LOW-PRIO)\n\ + \ [same as TST12-22(group), but with pmpcfg(i).A=TOR]" +- 008_load_L0_R1_addr_miss: !Subfeature + name: 008_load_L0_R1_addr_miss + tag: VP_PMP_F016_S023 + next_elt_id: 1 + display_order: 8 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S023_I000 + description: 'reuse of VP_PMP_F012_S023_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S023_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-2x(group)\n\ + \ [same as TST12-2x(group), but with pmpcfg(i).A=TOR]\nTST16-23 (LOW-PRIO)\n\ + \ [same as TST12-23(group), but with pmpcfg(i).A=TOR]" +- 009_load_L1_R1_addr_hit: !Subfeature + name: 009_load_L1_R1_addr_hit + tag: VP_PMP_F016_S024 + next_elt_id: 1 + display_order: 9 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S024_I000 + description: 'reuse of VP_PMP_F012_S024_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S024_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST16-2x(group)\n\ + \ [same as TST12-2x(group), but with pmpcfg(i).A=TOR]\nTST16-24 (HIGH-PRIO)\n\ + \ [same as TST12-24(group), but with pmpcfg(i).A=TOR]" +- 010_load_L1_R0_addr_hit: !Subfeature + name: 010_load_L1_R0_addr_hit + tag: VP_PMP_F016_S025 + next_elt_id: 1 + display_order: 10 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S025_I000 + description: 'reuse of VP_PMP_F012_S025_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S025_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR04-c\n[Attempting to execute a load or load-reserved + instruction which accesses a physical address within a PMP region without + read permissions raises a load access-fault exception]\n\nFTR02-b1\n[the + lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean + programmed first)]\n \n\nTST16-2x(group)\n [same as TST12-2x(group), but + with pmpcfg(i).A=TOR]\n TST16-25 (MEDIUM-PRIO)\n [same as TST12-25(group), + but with pmpcfg(i).A=TOR]" +- 011_load_L1_R1_addr_miss: !Subfeature + name: 011_load_L1_R1_addr_miss + tag: VP_PMP_F016_S026 + next_elt_id: 1 + display_order: 11 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S026_I000 + description: 'reuse of VP_PMP_F012_S026_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S026_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST16-2x(group)\n\ + \ [same as TST12-2x(group), but with pmpcfg(i).A=TOR]\nTST16-26 (HIGH-PRIO)\n\ + \ [same as TST12-26(group), but with pmpcfg(i).A=TOR]" +- 012_store_L0_W1_addr_hit: !Subfeature + name: 012_store_L0_W1_addr_hit + tag: VP_PMP_F016_S031 + next_elt_id: 1 + display_order: 12 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S031_I000 + description: 'reuse of VP_PMP_F012_S031_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S031_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-3x(group)\n\ + \ [same as TST12-3x(group), but with pmpcfg(i).A=TOR]\nTST16-31 (LOW-PRIO)\n\ + \ [same as TST12-31(group), but with pmpcfg(i).A=TOR]" +- 013_store_L0_W0_addr_hit: !Subfeature + name: 013_store_L0_W0_addr_hit + tag: VP_PMP_F016_S032 + next_elt_id: 1 + display_order: 13 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S032_I000 + description: 'reuse of VP_PMP_F012_S032_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S032_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-3x(group)\n\ + \ [same as TST12-3x(group), but with pmpcfg(i).A=TOR]\nTST16-32 (LOW-PRIO)\n\ + \ [same as TST12-32(group), but with pmpcfg(i).A=TOR]" +- 014_store_L0_W1_addr_miss: !Subfeature + name: 014_store_L0_W1_addr_miss + tag: VP_PMP_F016_S033 + next_elt_id: 1 + display_order: 14 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S033_I000 + description: 'reuse of VP_PMP_F012_S033_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S033_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-3x(group)\n\ + \ [same as TST12-3x(group), but with pmpcfg(i).A=TOR]\nTST16-33 (LOW-PRIO)\n\ + \ [same as TST12-33(group), but with pmpcfg(i).A=TOR]" +- 015_store_L1_W1_addr_hit: !Subfeature + name: 015_store_L1_W1_addr_hit + tag: VP_PMP_F016_S034 + next_elt_id: 1 + display_order: 15 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S034_I000 + description: 'reuse of VP_PMP_F012_S034_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S034_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST16-3x(group)\n\ + \ [same as TST12-3x(group), but with pmpcfg(i).A=TOR]\nTST16-34 (HIGH-PRIO)\n\ + \ [same as TST12-34(group), but with pmpcfg(i).A=TOR]" +- 016_store_L1_W0_addr_hit: !Subfeature + name: 016_store_L1_W0_addr_hit + tag: VP_PMP_F016_S035 + next_elt_id: 1 + display_order: 16 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S035_I000 + description: 'reuse of VP_PMP_F012_S035_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S035_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR04-d\n[Attempting to execute a store, store-conditional, + or AMO instruction which accesses a physical address within a PMP region + without write permissions raises a store access-fault exception]\n\nFTR02-b1\n + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does + it mean programmed first)]\n\n\nTST16-3x(group)\n [same as TST12-3x(group), + but with pmpcfg(i).A=TOR]\nTST16-35 (MEDIUM-PRIO)\n [same as TST12-35(group), + but with pmpcfg(i).A=TOR]" +- 017_store_L1_W1_addr_miss: !Subfeature + name: 017_store_L1_W1_addr_miss + tag: VP_PMP_F016_S036 + next_elt_id: 1 + display_order: 17 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S036_I000 + description: 'reuse of VP_PMP_F012_S036_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S036_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST16-3x(group)\n\ + \ [same as TST12-3x(group), but with pmpcfg(i).A=TOR]\nTST16-36 (HIGH-PRIO)\n\ + \ [same as TST12-36(group), but with pmpcfg(i).A=TOR]" +- 018_load_MPP_L0_R1_addr_hit: !Subfeature + name: 018_load_MPP_L0_R1_addr_hit + tag: VP_PMP_F016_S041 + next_elt_id: 1 + display_order: 18 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S041_I000 + description: 'reuse of VP_PMP_F012_S041_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S041_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-4x(group)\n\ + \ [same as TST12-4x(group), but with pmpcfg(i).A=TOR]\nTST16-41 (LOWEST-PRIO)\n\ + \ [same as TST12-41(group), but with pmpcfg(i).A=TOR]" +- 019_load_MPP_L0_R0_addr_hit: !Subfeature + name: 019_load_MPP_L0_R0_addr_hit + tag: VP_PMP_F016_S042 + next_elt_id: 1 + display_order: 19 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S042_I000 + description: 'reuse of VP_PMP_F012_S042_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S042_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-4x(group)\n\ + \ [same as TST12-4x(group), but with pmpcfg(i).A=TOR]\nTST16-42 (LOWEST-PRIO)\n\ + \ [same as TST12-42(group), but with pmpcfg(i).A=TOR]" +- 020_load_MPP_L0_R1_addr_miss: !Subfeature + name: 020_load_MPP_L0_R1_addr_miss + tag: VP_PMP_F016_S043 + next_elt_id: 1 + display_order: 20 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S043_I000 + description: 'reuse of VP_PMP_F012_S043_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S043_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-4x(group)\n\ + \ [same as TST12-4x(group), but with pmpcfg(i).A=TOR]\nTST16-43 (LOWEST-PRIO)\n\ + \ [same as TST12-43(group), but with pmpcfg(i).A=TOR]" +- 021_load_MPP_L1_R1_addr_hit: !Subfeature + name: 021_load_MPP_L1_R1_addr_hit + tag: VP_PMP_F016_S044 + next_elt_id: 1 + display_order: 21 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S044_I000 + description: 'reuse of VP_PMP_F012_S044_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S044_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST16-4x(group)\n\ + \ [same as TST12-4x(group), but with pmpcfg(i).A=TOR]\nTST16-44 (LOWEST-PRIO)\n\ + \ [same as TST12-44(group), but with pmpcfg(i).A=TOR]" +- 022_load_MPP_L1_R0_addr_hit: !Subfeature + name: 022_load_MPP_L1_R0_addr_hit + tag: VP_PMP_F016_S045 + next_elt_id: 1 + display_order: 22 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S045_I000 + description: 'reuse of VP_PMP_F012_S045_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S045_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR04-c\n[Attempting to execute a load or load-reserved + instruction which accesses a physical address within a PMP region without + read permissions raises a load access-fault exception]\n\nFTR02-b1\n[the + lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean + programmed first)]\n \n\nTST16-4x(group)\n [same as TST12-4x(group), but + with pmpcfg(i).A=TOR]\n TST16-45 (LOWEST-PRIO)\n [same as TST12-45(group), + but with pmpcfg(i).A=TOR]" +- 023_load_MPP_L1_R1_addr_miss: !Subfeature + name: 023_load_MPP_L1_R1_addr_miss + tag: VP_PMP_F016_S046 + next_elt_id: 1 + display_order: 23 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S046_I000 + description: 'reuse of VP_PMP_F012_S046_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S046_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST16-4x(group)\n\ + \ [same as TST12-4x(group), but with pmpcfg(i).A=TOR]\nTST16-46 (LOWEST-PRIO)\n\ + \ [same as TST12-46(group), but with pmpcfg(i).A=TOR]" +- 024_store_MPP_L0_W1_addr_hit: !Subfeature + name: 024_store_MPP_L0_W1_addr_hit + tag: VP_PMP_F016_S051 + next_elt_id: 1 + display_order: 24 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S051_I000 + description: 'reuse of VP_PMP_F012_S051_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S051_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-5x(group)\n\ + \ [same as TST12-5x(group), but with pmpcfg(i).A=TOR]\nTST16-51 (LOWEST-PRIO)\n\ + \ [same as TST12-51(group), but with pmpcfg(i).A=TOR]" +- 025_store_MPP_L0_W0_addr_hit: !Subfeature + name: 025_store_MPP_L0_W0_addr_hit + tag: VP_PMP_F016_S052 + next_elt_id: 1 + display_order: 25 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S052_I000 + description: 'reuse of VP_PMP_F012_S052_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S052_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-5x(group)\n\ + \ [same as TST12-5x(group), but with pmpcfg(i).A=TOR]\nTST16-52 (LOWEST-PRIO)\n\ + \ [same as TST12-52(group), but with pmpcfg(i).A=TOR]" +- 026_store_MPP_L0_W1_addr_miss: !Subfeature + name: 026_store_MPP_L0_W1_addr_miss + tag: VP_PMP_F016_S053 + next_elt_id: 1 + display_order: 26 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S053_I000 + description: 'reuse of VP_PMP_F012_S053_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S053_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-5x(group)\n\ + \ [same as TST12-5x(group), but with pmpcfg(i).A=TOR]\nTST16-53 (LOWEST-PRIO)\n\ + \ [same as TST12-53(group), but with pmpcfg(i).A=TOR]" +- 027_store_MPP_L1_W1_addr_hit: !Subfeature + name: 027_store_MPP_L1_W1_addr_hit + tag: VP_PMP_F016_S054 + next_elt_id: 1 + display_order: 27 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S054_I000 + description: 'reuse of VP_PMP_F012_S054_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S054_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST16-5x(group)\n\ + \ [same as TST12-5x(group), but with pmpcfg(i).A=TOR]\nTST16-54 (LOWEST-PRIO)\n\ + \ [same as TST12-54(group), but with pmpcfg(i).A=TOR]" +- 028_store_MPP_L1_W0_addr_hit: !Subfeature + name: 028_store_MPP_L1_W0_addr_hit + tag: VP_PMP_F016_S055 + next_elt_id: 1 + display_order: 28 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S055_I000 + description: 'reuse of VP_PMP_F012_S055_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S055_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR04-d\n[Attempting to execute a store, store-conditional, + or AMO instruction which accesses a physical address within a PMP region + without write permissions raises a store access-fault exception]\n\nFTR02-b1\n + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does + it mean programmed first)]\n\n\nTST16-5x(group)\n [same as TST12-5x(group), + but with pmpcfg(i).A=TOR]\nTST16-55 (LOWEST-PRIO)\n [same as TST12-55(group), + but with pmpcfg(i).A=TOR]" +- 029_store_MPP_L1_W1_addr_miss: !Subfeature + name: 029_store_MPP_L1_W1_addr_miss + tag: VP_PMP_F016_S056 + next_elt_id: 1 + display_order: 29 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S056_I000 + description: 'reuse of VP_PMP_F012_S056_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S056_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range\n - [for i=0] pmpaddr(0) + > 0: any TOR address range\n - [for j=unused] pmpaddr(j)=random: only + in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST16-5x(group)\n\ + \ [same as TST12-5x(group), but with pmpcfg(i).A=TOR]\nTST16-56 (LOWEST-PRIO)\n\ + \ [same as TST12-56(group), but with pmpcfg(i).A=TOR]" +- 030_fetch_L0_X1_addr_forbidden: !Subfeature + name: 030_fetch_L0_X1_addr_forbidden + tag: VP_PMP_F016_S061 + next_elt_id: 1 + display_order: 30 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S061_I000 + description: "reuse of VP_PMP_F012_S011_I000 feature description (Cf. Feature: + \"cfg NA4 access M\")\n\n{Page 59 Volume II: RISC-V Privileged Architectures + V20211203}\nIf pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i + matches no addresses\nIf PMP entry 0’s A field is set to TOR, zero is used + for the lower bound, and so it matches any address y < pmpaddr(0)" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S011_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range\n - [for i=0] + pmpaddr(0) = 0: invalid TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=TOR]\n TST16-11 (LOW-PRIO)\n\ + \ [same as TST12-11(group), but with pmpcfg(i).A=TOR]\n \n\n//TO COMPLETE + => FTR06-b\nTST25 = same as TST15+TST16 (groups) with PMP entry (0) with + pmpaddr(0) > 0\nTST26 = same as TST15+TST16 (groups) with PMP entry (0) + with pmpaddr(0) = 0\n [create scenario where PMP entry pmpcfg(0) with TOR:\n\ + \ - pmpaddr(0) > 0\n - pmpaddr(0) = 0]\n\n//TO COMPLETE => FTR06-c\n + TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) + and pmpcfg(i-1) correct\n [create scenario where PMP entry pmpcfg(i) with + TOR:\n - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct]\n\ + \ [create scenario where PMP entry pmpcfg(0) with TOR:\n - pmpaddr(0) + >= pmpaddr(1/2/3/…)]" +- 031_fetch_L1_X1_addr_forbidden: !Subfeature + name: 031_fetch_L1_X1_addr_forbidden + tag: VP_PMP_F016_S062 + next_elt_id: 1 + display_order: 31 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S062_I000 + description: "reuse of VP_PMP_F012_S014_I000 feature description (Cf. Feature: + \"cfg NA4 access M\")\n\n{Page 59 Volume II: RISC-V Privileged Architectures + V20211203}\nIf pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i + matches no addresses\nIf PMP entry 0’s A field is set to TOR, zero is used + for the lower bound, and so it matches any address y < pmpaddr(0)" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S014_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range\n - [for i=0] + pmpaddr(0) = 0: invalid TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST16-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=TOR]\nTST16-14 (LOW-PRIO)\n\ + \ [same as TST12-14(group), but with pmpcfg(i).A=TOR]\n\n\n//TO COMPLETE + => FTR06-b\n TST25 = same as TST15+TST16 (groups) with PMP entry (0) with + pmpaddr(0) > 0\nTST26 = same as TST15+TST16 (groups) with PMP entry (0) + with pmpaddr(0) = 0\n [create scenario where PMP entry pmpcfg(0) with TOR:\n\ + \ - pmpaddr(0) > 0\n - pmpaddr(0) = 0]\n\n//TO COMPLETE => FTR06-c\n + TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) + and pmpcfg(i-1) correct\n [create scenario where PMP entry pmpcfg(i) with + TOR:\n - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct]\n\ + \ [create scenario where PMP entry pmpcfg(0) with TOR:\n - pmpaddr(0) + >= pmpaddr(1/2/3/…)]" +- 032_load_L0_R1_addr_forbidden: !Subfeature + name: 032_load_L0_R1_addr_forbidden + tag: VP_PMP_F016_S063 + next_elt_id: 1 + display_order: 32 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S063_I000 + description: "reuse of VP_PMP_F012_S021_I000 feature description (Cf. Feature: + \"cfg NA4 access M\")\n\n{Page 59 Volume II: RISC-V Privileged Architectures + V20211203}\nIf pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i + matches no addresses\nIf PMP entry 0’s A field is set to TOR, zero is used + for the lower bound, and so it matches any address y < pmpaddr(0)" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S021_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range\n - [for i=0] + pmpaddr(0) = 0: invalid TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-2x(group)\n\ + \ [same as TST12-2x(group), but with pmpcfg(i).A=TOR]\n TST16-21 (HIGH-PRIO)\n\ + \ [same as TST12-21(group), but with pmpcfg(i).A=TOR]\n \n\n//TO COMPLETE + => FTR06-b\nTST25 = same as TST15+TST16 (groups) with PMP entry (0) with + pmpaddr(0) > 0\nTST26 = same as TST15+TST16 (groups) with PMP entry (0) + with pmpaddr(0) = 0\n [create scenario where PMP entry pmpcfg(0) with TOR:\n\ + \ - pmpaddr(0) > 0\n - pmpaddr(0) = 0]\n\n//TO COMPLETE => FTR06-c\n + TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) + and pmpcfg(i-1) correct\n [create scenario where PMP entry pmpcfg(i) with + TOR:\n - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct]\n\ + \ [create scenario where PMP entry pmpcfg(0) with TOR:\n - pmpaddr(0) + >= pmpaddr(1/2/3/…)]" +- 033_load_L1_R1_addr_forbidden: !Subfeature + name: 033_load_L1_R1_addr_forbidden + tag: VP_PMP_F016_S064 + next_elt_id: 1 + display_order: 33 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S064_I000 + description: "reuse of VP_PMP_F012_S024_I000 feature description (Cf. Feature: + \"cfg NA4 access M\")\n\n{Page 59 Volume II: RISC-V Privileged Architectures + V20211203}\nIf pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i + matches no addresses\nIf PMP entry 0’s A field is set to TOR, zero is used + for the lower bound, and so it matches any address y < pmpaddr(0)" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S024_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range\n - [for i=0] + pmpaddr(0) = 0: invalid TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST16-2x(group)\n\ + \ [same as TST12-2x(group), but with pmpcfg(i).A=TOR]\nTST16-24 (LOW-PRIO)\n\ + \ [same as TST12-24(group), but with pmpcfg(i).A=TOR]\n\n\n//TO COMPLETE + => FTR06-b\n TST25 = same as TST15+TST16 (groups) with PMP entry (0) with + pmpaddr(0) > 0\nTST26 = same as TST15+TST16 (groups) with PMP entry (0) + with pmpaddr(0) = 0\n [create scenario where PMP entry pmpcfg(0) with TOR:\n\ + \ - pmpaddr(0) > 0\n - pmpaddr(0) = 0]\n\n//TO COMPLETE => FTR06-c\n + TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) + and pmpcfg(i-1) correct\n [create scenario where PMP entry pmpcfg(i) with + TOR:\n - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct]\n\ + \ [create scenario where PMP entry pmpcfg(0) with TOR:\n - pmpaddr(0) + >= pmpaddr(1/2/3/…)]" +- 034_store_L0_W1_addr_forbidden: !Subfeature + name: 034_store_L0_W1_addr_forbidden + tag: VP_PMP_F016_S065 + next_elt_id: 1 + display_order: 34 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S065_I000 + description: "reuse of VP_PMP_F012_S031_I000 feature description (Cf. Feature: + \"cfg NA4 access M\")\n\n{Page 59 Volume II: RISC-V Privileged Architectures + V20211203}\nIf pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i + matches no addresses\nIf PMP entry 0’s A field is set to TOR, zero is used + for the lower bound, and so it matches any address y < pmpaddr(0)" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S031_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range\n - [for i=0] + pmpaddr(0) = 0: invalid TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST16-3x(group)\n\ + \ [same as TST12-3x(group), but with pmpcfg(i).A=TOR]\n TST16-31 (HIGH-PRIO)\n\ + \ [same as TST12-31(group), but with pmpcfg(i).A=TOR]\n \n\n//TO COMPLETE + => FTR06-b\nTST25 = same as TST15+TST16 (groups) with PMP entry (0) with + pmpaddr(0) > 0\nTST26 = same as TST15+TST16 (groups) with PMP entry (0) + with pmpaddr(0) = 0\n [create scenario where PMP entry pmpcfg(0) with TOR:\n\ + \ - pmpaddr(0) > 0\n - pmpaddr(0) = 0]\n\n//TO COMPLETE => FTR06-c\n + TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) + and pmpcfg(i-1) correct\n [create scenario where PMP entry pmpcfg(i) with + TOR:\n - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct]\n\ + \ [create scenario where PMP entry pmpcfg(0) with TOR:\n - pmpaddr(0) + >= pmpaddr(1/2/3/…)]" +- 035_store_L1_W1_addr_forbidden: !Subfeature + name: 035_store_L1_W1_addr_forbidden + tag: VP_PMP_F016_S066 + next_elt_id: 1 + display_order: 35 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F016_S066_I000 + description: "reuse of VP_PMP_F012_S034_I000 feature description (Cf. Feature: + \"cfg NA4 access M\")\n\n{Page 59 Volume II: RISC-V Privileged Architectures + V20211203}\nIf pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i + matches no addresses\nIf PMP entry 0’s A field is set to TOR, zero is used + for the lower bound, and so it matches any address y < pmpaddr(0)" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S034_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=TOR\n - [for + i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range\n - [for i=0] + pmpaddr(0) = 0: invalid TOR address range\n - [for j=unused] pmpaddr(j)=random: + only in single entry configuration case (not in reuse case)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST16-3x(group)\n\ + \ [same as TST12-3x(group), but with pmpcfg(i).A=TOR]\nTST16-34 (LOW-PRIO)\n\ + \ [same as TST12-34(group), but with pmpcfg(i).A=TOR]\n\n\n//TO COMPLETE + => FTR06-b\n TST25 = same as TST15+TST16 (groups) with PMP entry (0) with + pmpaddr(0) > 0\nTST26 = same as TST15+TST16 (groups) with PMP entry (0) + with pmpaddr(0) = 0\n [create scenario where PMP entry pmpcfg(0) with TOR:\n\ + \ - pmpaddr(0) > 0\n - pmpaddr(0) = 0]\n\n//TO COMPLETE => FTR06-c\n + TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) + and pmpcfg(i-1) correct\n [create scenario where PMP entry pmpcfg(i) with + TOR:\n - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct]\n\ + \ [create scenario where PMP entry pmpcfg(0) with TOR:\n - pmpaddr(0) + >= pmpaddr(1/2/3/…)]" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP017.yml b/verif/docs/VerifPlans/PMP/VP_IP017.yml new file mode 100644 index 00000000000..3a3989a734b --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP017.yml @@ -0,0 +1,1153 @@ +!Feature +next_elt_id: 30 +name: cfg OFF access S/U +id: 17 +display_order: 17 +subfeatures: !!omap +- 000_fetch_L0_X1_addr_hit: !Subfeature + name: 000_fetch_L0_X1_addr_hit + tag: VP_PMP_F017_S011 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S011_I000 + description: 'reuse of VP_PMP_F011_S011_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S011_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range\n\nCHECK UPDATE\n - check instruction fetch + access-fault exception raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=OFF]\n + TST17-11 (HIGH-PRIO)\n [same as TST11-11(group), but with pmpcfg(i).A=OFF\n\ + \ - check instruction fetch access-fault exception raised]" +- 001_fetch_L0_X0_addr_hit: !Subfeature + name: 001_fetch_L0_X0_addr_hit + tag: VP_PMP_F017_S012 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S012_I000 + description: 'reuse of VP_PMP_F011_S012_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S012_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-b\n [Attempting to fetch an instruction from a PMP region + that does not have execute permissions raises an instruction access-fault + exception]\n \n\nTST17-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=OFF]\n + TST17-12 (MEDIUM-PRIO)\n [same as TST11-12(group), but with pmpcfg(i).A=OFF]" +- 002_fetch_L0_X1_addr_miss: !Subfeature + name: 002_fetch_L0_X1_addr_miss + tag: VP_PMP_F017_S013 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S013_I000 + description: 'reuse of VP_PMP_F011_S013_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S013_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=OFF]\n + TST17-13 (MEDIUM-PRIO)\n [same as TST11-13(group), but with pmpcfg(i).A=OFF]" +- 003_fetch_L1_X1_addr_hit: !Subfeature + name: 003_fetch_L1_X1_addr_hit + tag: VP_PMP_F017_S014 + next_elt_id: 1 + display_order: 3 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S014_I000 + description: 'reuse of VP_PMP_F011_S014_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S014_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range\n\nCHECK UPDATE\n - check instruction fetch + access-fault exception raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=OFF]\n + TST17-14 (LOW-PRIO)\n [same as TST11-14(group), but with pmpcfg(i).A=OFF\n\ + \ - check instruction fetch access-fault exception raised]" +- 004_fetch_L1_X0_addr_hit: !Subfeature + name: 004_fetch_L1_X0_addr_hit + tag: VP_PMP_F017_S015 + next_elt_id: 1 + display_order: 4 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S015_I000 + description: 'reuse of VP_PMP_F011_S015_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S015_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-b\n[Attempting to fetch an instruction from a PMP region that + does not have execute permissions raises an instruction access-fault exception]\n\ + \n\nTST17-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=OFF]\n + TST17-15 (LOW-PRIO)\n [same as TST11-15(group), but with pmpcfg(i).A=OFF]" +- 005_fetch_L1_X1_addr_miss: !Subfeature + name: 005_fetch_L1_X1_addr_miss + tag: VP_PMP_F017_S016 + next_elt_id: 1 + display_order: 5 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S016_I000 + description: 'reuse of VP_PMP_F011_S016_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S016_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-1x(group)\n [same as TST11-1x(group), but with pmpcfg(i).A=OFF]\n + TST17-16 (LOW-PRIO)\n [same as TST11-16(group), but with pmpcfg(i).A=OFF]" +- 006_load_L0_R1_addr_hit: !Subfeature + name: 006_load_L0_R1_addr_hit + tag: VP_PMP_F017_S021 + next_elt_id: 1 + display_order: 6 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S021_I000 + description: 'reuse of VP_PMP_F011_S021_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S021_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range\n\nCHECK UPDATE\n - check load access-fault + exception raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-2x(group)\n [same as TST11-2x(group), but with pmpcfg(i).A=OFF]\n + TST17-21 (HIGH-PRIO)\n [same as TST11-21(group), but with pmpcfg(i).A=OFF\n\ + \ - check load access-fault exception raised]" +- 007_load_L0_R0_addr_hit: !Subfeature + name: 007_load_L0_R0_addr_hit + tag: VP_PMP_F017_S022 + next_elt_id: 1 + display_order: 7 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S022_I000 + description: 'reuse of VP_PMP_F011_S022_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S022_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-c\n [Attempting to execute a load or load-reserved instruction + which accesses a physical address within a PMP region without read permissions + raises a load access-fault exception]\n\n\nTST17-2x(group)\n [same as TST11-2x(group), + but with pmpcfg(i).A=OFF]\nTST17-22 (MEDIUM-PRIO)\n [same as TST11-22(group), + but with pmpcfg(i).A=OFF]" +- 008_load_L0_R1_addr_miss: !Subfeature + name: 008_load_L0_R1_addr_miss + tag: VP_PMP_F017_S023 + next_elt_id: 1 + display_order: 8 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S023_I000 + description: 'reuse of VP_PMP_F011_S023_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S023_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-2x(group)\n [same as TST11-2x(group), but with pmpcfg(i).A=OFF]\n + TST17-23 (MEDIUM-PRIO)\n [same as TST11-23(group), but with pmpcfg(i).A=OFF]" +- 009_load_L1_R1_addr_hit: !Subfeature + name: 009_load_L1_R1_addr_hit + tag: VP_PMP_F017_S024 + next_elt_id: 1 + display_order: 9 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S024_I000 + description: 'reuse of VP_PMP_F011_S024_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S024_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range\n\nCHECK UPDATE\n - check load access-fault + exception raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-2x(group)\n [same as TST11-2x(group), but with pmpcfg(i).A=OFF]\n + TST17-24 (LOW-PRIO)\n [same as TST11-24(group), but with pmpcfg(i).A=OFF\n\ + \ - check load access-fault exception raised]" +- 010_load_L1_R0_addr_hit: !Subfeature + name: 010_load_L1_R0_addr_hit + tag: VP_PMP_F017_S025 + next_elt_id: 1 + display_order: 10 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S025_I000 + description: 'reuse of VP_PMP_F011_S025_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S025_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-c\n[Attempting to execute a load or load-reserved instruction + which accesses a physical address within a PMP region without read permissions + raises a load access-fault exception]\n\n\nTST17-2x(group)\n [same as TST11-2x(group), + but with pmpcfg(i).A=OFF]\n TST17-25 (LOW-PRIO)\n [same as TST11-25(group), + but with pmpcfg(i).A=OFF]" +- 011_load_L1_R1_addr_miss: !Subfeature + name: 011_load_L1_R1_addr_miss + tag: VP_PMP_F017_S026 + next_elt_id: 1 + display_order: 11 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S026_I000 + description: 'reuse of VP_PMP_F011_S026_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S026_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-2x(group)\n [same as TST11-2x(group), but with pmpcfg(i).A=OFF]\n + TST17-26 (LOW-PRIO)\n [same as TST11-26(group), but with pmpcfg(i).A=OFF]" +- 012_store_L0_W1_addr_hit: !Subfeature + name: 012_store_L0_W1_addr_hit + tag: VP_PMP_F017_S031 + next_elt_id: 1 + display_order: 12 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S031_I000 + description: 'reuse of VP_PMP_F011_S031_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S031_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range\n\nCHECK UPDATE\n - check store access-fault + exception raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-3x(group)\n [same as TST11-3x(group), but with pmpcfg(i).A=OFF]\n + TST17-31 (HIGH-PRIO)\n [same as TST11-31(group), but with pmpcfg(i).A=OFF\n\ + \ - check store access-fault exception raised]" +- 013_store_L0_W0_addr_hit: !Subfeature + name: 013_store_L0_W0_addr_hit + tag: VP_PMP_F017_S032 + next_elt_id: 1 + display_order: 13 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S032_I000 + description: 'reuse of VP_PMP_F011_S032_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S032_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-d\n [Attempting to execute a store, store-conditional, or + AMO instruction which accesses a physical address within a PMP region without + write permissions raises a store access-fault exception]\n\n\nTST17-3x(group)\n\ + \ [same as TST11-3x(group), but with pmpcfg(i).A=OFF]\nTST17-32 (MEDIUM-PRIO)\n\ + \ [same as TST11-32(group), but with pmpcfg(i).A=OFF]" +- 014_store_L0_W1_addr_miss: !Subfeature + name: 014_store_L0_W1_addr_miss + tag: VP_PMP_F017_S033 + next_elt_id: 1 + display_order: 14 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S033_I000 + description: 'reuse of VP_PMP_F011_S033_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S033_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-3x(group)\n [same as TST11-3x(group), but with pmpcfg(i).A=OFF]\n + TST17-33 (MEDIUM-PRIO)\n [same as TST11-33(group), but with pmpcfg(i).A=OFF]" +- 015_store_L1_W1_addr_hit: !Subfeature + name: 015_store_L1_W1_addr_hit + tag: VP_PMP_F017_S034 + next_elt_id: 1 + display_order: 15 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S034_I000 + description: 'reuse of VP_PMP_F011_S034_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S034_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range\n\nCHECK UPDATE\n - check store access-fault + exception raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-3x(group)\n [same as TST11-3x(group), but with pmpcfg(i).A=OFF]\n + TST17-34 (LOW-PRIO)\n [same as TST11-34(group), but with pmpcfg(i).A=OFF\n\ + \ - check store access-fault exception raised]" +- 016_store_L1_W0_addr_hit: !Subfeature + name: 016_store_L1_W0_addr_hit + tag: VP_PMP_F017_S035 + next_elt_id: 1 + display_order: 16 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S035_I000 + description: 'reuse of VP_PMP_F011_S035_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S035_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-d\n[Attempting to execute a store, store-conditional, or AMO + instruction which accesses a physical address within a PMP region without + write permissions raises a store access-fault exception]\n\n\nTST17-3x(group)\n\ + \ [same as TST11-3x(group), but with pmpcfg(i).A=OFF]\nTST17-35 (LOW-PRIO)\n\ + \ [same as TST11-35(group), but with pmpcfg(i).A=OFF]" +- 017_store_L1_W1_addr_miss: !Subfeature + name: 017_store_L1_W1_addr_miss + tag: VP_PMP_F017_S036 + next_elt_id: 1 + display_order: 17 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S036_I000 + description: 'reuse of VP_PMP_F011_S036_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S036_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-3x(group)\n [same as TST11-3x(group), but with pmpcfg(i).A=OFF]\n + TST17-36 (LOW-PRIO)\n [same as TST11-36(group), but with pmpcfg(i).A=OFF]" +- 018_load_MPP_L0_R1_addr_hit: !Subfeature + name: 018_load_MPP_L0_R1_addr_hit + tag: VP_PMP_F017_S041 + next_elt_id: 1 + display_order: 18 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S041_I000 + description: 'reuse of VP_PMP_F011_S041_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S041_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range\n\nCHECK UPDATE\n - check load access-fault + exception raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-4x(group)\n [same as TST11-4x(group), but with pmpcfg(i).A=OFF]\n + TST17-41 (LOWEST-PRIO)\n [same as TST11-41(group), but with pmpcfg(i).A=OFF\n\ + \ - check load access-fault exception raised]" +- 019_load_MPP_L0_R0_addr_hit: !Subfeature + name: 019_load_MPP_L0_R0_addr_hit + tag: VP_PMP_F017_S042 + next_elt_id: 1 + display_order: 19 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S042_I000 + description: 'reuse of VP_PMP_F011_S042_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S042_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-c\n [Attempting to execute a load or load-reserved instruction + which accesses a physical address within a PMP region without read permissions + raises a load access-fault exception]\n\n\nTST17-4x(group)\n [same as TST11-4x(group), + but with pmpcfg(i).A=OFF]\nTST17-42 (LOWEST-PRIO)\n [same as TST11-42(group), + but with pmpcfg(i).A=OFF]" +- 020_load_MPP_L0_R1_addr_miss: !Subfeature + name: 020_load_MPP_L0_R1_addr_miss + tag: VP_PMP_F017_S043 + next_elt_id: 1 + display_order: 20 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S043_I000 + description: 'reuse of VP_PMP_F011_S043_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S043_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-4x(group)\n [same as TST11-4x(group), but with pmpcfg(i).A=OFF]\n + TST17-43 (LOWEST-PRIO)\n [same as TST11-43(group), but with pmpcfg(i).A=OFF]" +- 021_load_MPP_L1_R1_addr_hit: !Subfeature + name: 021_load_MPP_L1_R1_addr_hit + tag: VP_PMP_F017_S044 + next_elt_id: 1 + display_order: 21 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S044_I000 + description: 'reuse of VP_PMP_F011_S044_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S044_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range\n\nCHECK UPDATE\n - check load access-fault + exception raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-4x(group)\n [same as TST11-4x(group), but with pmpcfg(i).A=OFF]\n + TST17-44 (LOWEST-PRIO)\n [same as TST11-44(group), but with pmpcfg(i).A=OFF\n\ + \ - check load access-fault exception raised]" +- 022_load_MPP_L1_R0_addr_hit: !Subfeature + name: 022_load_MPP_L1_R0_addr_hit + tag: VP_PMP_F017_S045 + next_elt_id: 1 + display_order: 22 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S045_I000 + description: 'reuse of VP_PMP_F011_S045_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S045_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-c\n[Attempting to execute a load or load-reserved instruction + which accesses a physical address within a PMP region without read permissions + raises a load access-fault exception]\n\n\nTST17-4x(group)\n [same as TST11-4x(group), + but with pmpcfg(i).A=OFF]\n TST17-45 (LOWEST-PRIO)\n [same as TST11-45(group), + but with pmpcfg(i).A=OFF]" +- 023_load_MPP_L1_R1_addr_miss: !Subfeature + name: 023_load_MPP_L1_R1_addr_miss + tag: VP_PMP_F017_S046 + next_elt_id: 1 + display_order: 23 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S046_I000 + description: 'reuse of VP_PMP_F011_S046_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S046_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-4x(group)\n [same as TST11-4x(group), but with pmpcfg(i).A=OFF]\n + TST17-46 (LOWEST-PRIO)\n [same as TST11-46(group), but with pmpcfg(i).A=OFF]" +- 024_store_MPP_L0_W1_addr_hit: !Subfeature + name: 024_store_MPP_L0_W1_addr_hit + tag: VP_PMP_F017_S051 + next_elt_id: 1 + display_order: 24 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S051_I000 + description: 'reuse of VP_PMP_F011_S051_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S051_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range\n\nCHECK UPDATE\n - check store access-fault + exception raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-5x(group)\n [same as TST11-5x(group), but with pmpcfg(i).A=OFF]\n + TST17-51 (LOWEST-PRIO)\n [same as TST11-51(group), but with pmpcfg(i).A=OFF\n\ + \ - check store access-fault exception raised]" +- 025_store_MPP_L0_W0_addr_hit: !Subfeature + name: 025_store_MPP_L0_W0_addr_hit + tag: VP_PMP_F017_S052 + next_elt_id: 1 + display_order: 25 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S052_I000 + description: 'reuse of VP_PMP_F011_S052_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S052_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-d\n [Attempting to execute a store, store-conditional, or + AMO instruction which accesses a physical address within a PMP region without + write permissions raises a store access-fault exception]\n\n\nTST17-5x(group)\n\ + \ [same as TST11-5x(group), but with pmpcfg(i).A=OFF]\nTST17-52 (LOWEST-PRIO)\n\ + \ [same as TST11-52(group), but with pmpcfg(i).A=OFF]" +- 026_store_MPP_L0_W1_addr_miss: !Subfeature + name: 026_store_MPP_L0_W1_addr_miss + tag: VP_PMP_F017_S053 + next_elt_id: 1 + display_order: 26 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S053_I000 + description: 'reuse of VP_PMP_F011_S053_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S053_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e2-2 (refers to FTR09-d2-2)\n[When the L bit is clear, the R/W/X + permissions apply only to S and U modes]\nFTR09-d2-2 (L=0 refers to FTR08-e2-2)\n + [if the privilege mode of the access is S or U (whatever L), then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-5x(group)\n [same as TST11-5x(group), but with pmpcfg(i).A=OFF]\n + TST17-53 (LOWEST-PRIO)\n [same as TST11-53(group), but with pmpcfg(i).A=OFF]" +- 027_store_MPP_L1_W1_addr_hit: !Subfeature + name: 027_store_MPP_L1_W1_addr_hit + tag: VP_PMP_F017_S054 + next_elt_id: 1 + display_order: 27 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S054_I000 + description: 'reuse of VP_PMP_F011_S054_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S054_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range\n\nCHECK UPDATE\n - check store access-fault + exception raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-5x(group)\n [same as TST11-5x(group), but with pmpcfg(i).A=OFF]\n + TST17-54 (LOWEST-PRIO)\n [same as TST11-54(group), but with pmpcfg(i).A=OFF\n\ + \ - check store access-fault exception raised]" +- 028_store_MPP_L1_W0_addr_hit: !Subfeature + name: 028_store_MPP_L1_W0_addr_hit + tag: VP_PMP_F017_S055 + next_elt_id: 1 + display_order: 28 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S055_I000 + description: 'reuse of VP_PMP_F011_S055_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S055_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\nFTR04-d\n[Attempting to execute a store, store-conditional, or AMO + instruction which accesses a physical address within a PMP region without + write permissions raises a store access-fault exception]\n\n\nTST17-5x(group)\n\ + \ [same as TST11-5x(group), but with pmpcfg(i).A=OFF]\nTST17-55 (LOWEST-PRIO)\n\ + \ [same as TST11-55(group), but with pmpcfg(i).A=OFF]" +- 029_store_MPP_L1_W1_addr_miss: !Subfeature + name: 029_store_MPP_L1_W1_addr_miss + tag: VP_PMP_F017_S056 + next_elt_id: 1 + display_order: 29 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F017_S056_I000 + description: 'reuse of VP_PMP_F011_S056_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F011_S056_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - + pmpaddr(i): NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-d\n[PMP checks are applied to all accesses whose + effective privilege mode is S or U]\n\nFTR02-b1\n[the lowest-numbered PMP + CSRs must be implemented first (QUESTION: does it mean programmed first)]\n + \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n [When the L bit + is set, these permissions are enforced for all privilege modes]\nFTR01-f + (refers to FTR08-e1)\n [PMP checks may additionally apply to M-mode accesses, + in which case the PMP registers themselves are locked, so that even M-mode + software cannot change them until the hart is reset]\n FTR09-d2-1 (refers + to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, then the access + succeeds only if the R, W, or X bit corresponding to the access type is + set]\n\n\nTST17-5x(group)\n [same as TST11-5x(group), but with pmpcfg(i).A=OFF]\n + TST17-56 (LOWEST-PRIO)\n [same as TST11-56(group), but with pmpcfg(i).A=OFF]" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP018.yml b/verif/docs/VerifPlans/PMP/VP_IP018.yml new file mode 100644 index 00000000000..f0183d4188b --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP018.yml @@ -0,0 +1,1129 @@ +!Feature +next_elt_id: 30 +name: cfg OFF access M +id: 18 +display_order: 18 +subfeatures: !!omap +- 000_fetch_L0_X1_addr_hit: !Subfeature + name: 000_fetch_L0_X1_addr_hit + tag: VP_PMP_F018_S011 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S011_I000 + description: 'reuse of VP_PMP_F012_S011_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S011_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST18-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=OFF]\nTST18-11 (LOW-PRIO)\n\ + \ [same as TST12-11(group), but with pmpcfg(i).A=OFF]" +- 001_fetch_L0_X0_addr_hit: !Subfeature + name: 001_fetch_L0_X0_addr_hit + tag: VP_PMP_F018_S012 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S012_I000 + description: 'reuse of VP_PMP_F012_S012_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S012_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST18-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=OFF]\nTST18-12 (LOW-PRIO)\n\ + \ [same as TST12-12(group), but with pmpcfg(i).A=OFF]" +- 002_fetch_L0_X1_addr_miss: !Subfeature + name: 002_fetch_L0_X1_addr_miss + tag: VP_PMP_F018_S013 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S013_I000 + description: 'reuse of VP_PMP_F012_S013_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S013_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST18-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=OFF]\nTST18-13 (LOW-PRIO)\n\ + \ [same as TST12-13(group), but with pmpcfg(i).A=OFF]" +- 003_fetch_L1_X1_addr_hit: !Subfeature + name: 003_fetch_L1_X1_addr_hit + tag: VP_PMP_F018_S014 + next_elt_id: 1 + display_order: 3 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S014_I000 + description: 'reuse of VP_PMP_F012_S014_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S014_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range\n\nCHECK UPDATE\n - check store access-fault exception + raised (TODO: is M mode access prevented by A=OFF)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST18-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=OFF]\nTST18-14 (HIGH-PRIO)\n\ + \ [same as TST12-14(group), but with pmpcfg(i).A=OFF\n - check instruction + fetch access-fault exception raised]" +- 004_fetch_L1_X0_addr_hit: !Subfeature + name: 004_fetch_L1_X0_addr_hit + tag: VP_PMP_F018_S015 + next_elt_id: 1 + display_order: 4 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S015_I000 + description: 'reuse of VP_PMP_F012_S015_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S015_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR04-b\n[Attempting to fetch an instruction from + a PMP region that does not have execute permissions raises an instruction + access-fault exception]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST18-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=OFF]\nTST18-15 (MEDIUM-PRIO)\n\ + \ [same as TST12-15(group), but with pmpcfg(i).A=OFF]" +- 005_fetch_L1_X1_addr_miss: !Subfeature + name: 005_fetch_L1_X1_addr_miss + tag: VP_PMP_F018_S016 + next_elt_id: 1 + display_order: 5 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S016_I000 + description: 'reuse of VP_PMP_F012_S016_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S016_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST18-1x(group)\n\ + \ [same as TST12-1x(group), but with pmpcfg(i).A=OFF]\nTST18-16 (HIGH-PRIO)\n\ + \ [same as TST12-16(group), but with pmpcfg(i).A=OFF]" +- 006_load_L0_R1_addr_hit: !Subfeature + name: 006_load_L0_R1_addr_hit + tag: VP_PMP_F018_S021 + next_elt_id: 1 + display_order: 6 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S021_I000 + description: 'reuse of VP_PMP_F012_S021_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S021_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST18-2x(group)\n\ + \ [same as TST12-2x(group), but with pmpcfg(i).A=OFF]\nTST18-21 (LOW-PRIO)\n\ + \ [same as TST12-21(group), but with pmpcfg(i).A=OFF]" +- 007_load_L0_R0_addr_hit: !Subfeature + name: 007_load_L0_R0_addr_hit + tag: VP_PMP_F018_S022 + next_elt_id: 1 + display_order: 7 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S022_I000 + description: 'reuse of VP_PMP_F012_S022_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S022_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST18-2x(group)\n\ + \ [same as TST12-2x(group), but with pmpcfg(i).A=OFF]\nTST18-22 (LOW-PRIO)\n\ + \ [same as TST12-22(group), but with pmpcfg(i).A=OFF]" +- 008_load_L0_R1_addr_miss: !Subfeature + name: 008_load_L0_R1_addr_miss + tag: VP_PMP_F018_S023 + next_elt_id: 1 + display_order: 8 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S023_I000 + description: 'reuse of VP_PMP_F012_S023_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S023_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST18-2x(group)\n\ + \ [same as TST12-2x(group), but with pmpcfg(i).A=OFF]\nTST18-23 (LOW-PRIO)\n\ + \ [same as TST12-23(group), but with pmpcfg(i).A=OFF]" +- 009_load_L1_R1_addr_hit: !Subfeature + name: 009_load_L1_R1_addr_hit + tag: VP_PMP_F018_S024 + next_elt_id: 1 + display_order: 9 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S024_I000 + description: 'reuse of VP_PMP_F012_S024_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S024_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range\n\nCHECK UPDATE\n - check store access-fault exception + raised (TODO: is M mode access prevented by A=OFF)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST18-2x(group)\n\ + \ [same as TST12-2x(group), but with pmpcfg(i).A=OFF]\nTST18-24 (HIGH-PRIO)\n\ + \ [same as TST12-24(group), but with pmpcfg(i).A=OFF\n - check instruction + fetch access-fault exception raised]" +- 010_load_L1_R0_addr_hit: !Subfeature + name: 010_load_L1_R0_addr_hit + tag: VP_PMP_F018_S025 + next_elt_id: 1 + display_order: 10 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S025_I000 + description: 'reuse of VP_PMP_F012_S025_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S025_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR04-c\n[Attempting to execute a load or load-reserved + instruction which accesses a physical address within a PMP region without + read permissions raises a load access-fault exception]\n\nFTR02-b1\n[the + lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean + programmed first)]\n \n\nTST18-2x(group)\n [same as TST12-2x(group), but + with pmpcfg(i).A=OFF]\n TST18-25 (MEDIUM-PRIO)\n [same as TST12-25(group), + but with pmpcfg(i).A=OFF]" +- 011_load_L1_R1_addr_miss: !Subfeature + name: 011_load_L1_R1_addr_miss + tag: VP_PMP_F018_S026 + next_elt_id: 1 + display_order: 11 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S026_I000 + description: 'reuse of VP_PMP_F012_S026_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S026_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST18-2x(group)\n\ + \ [same as TST12-2x(group), but with pmpcfg(i).A=OFF]\nTST18-26 (HIGH-PRIO)\n\ + \ [same as TST12-26(group), but with pmpcfg(i).A=OFF]" +- 012_store_L0_W1_addr_hit: !Subfeature + name: 012_store_L0_W1_addr_hit + tag: VP_PMP_F018_S031 + next_elt_id: 1 + display_order: 12 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S031_I000 + description: 'reuse of VP_PMP_F012_S031_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S031_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST18-3x(group)\n\ + \ [same as TST12-3x(group), but with pmpcfg(i).A=OFF]\nTST18-31 (LOW-PRIO)\n\ + \ [same as TST12-31(group), but with pmpcfg(i).A=OFF]" +- 013_store_L0_W0_addr_hit: !Subfeature + name: 013_store_L0_W0_addr_hit + tag: VP_PMP_F018_S032 + next_elt_id: 1 + display_order: 13 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S032_I000 + description: 'reuse of VP_PMP_F012_S032_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S032_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST18-3x(group)\n\ + \ [same as TST12-3x(group), but with pmpcfg(i).A=OFF]\nTST18-32 (LOW-PRIO)\n\ + \ [same as TST12-32(group), but with pmpcfg(i).A=OFF]" +- 014_store_L0_W1_addr_miss: !Subfeature + name: 014_store_L0_W1_addr_miss + tag: VP_PMP_F018_S033 + next_elt_id: 1 + display_order: 14 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S033_I000 + description: 'reuse of VP_PMP_F012_S033_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S033_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST18-3x(group)\n\ + \ [same as TST12-3x(group), but with pmpcfg(i).A=OFF]\nTST18-33 (LOW-PRIO)\n\ + \ [same as TST12-33(group), but with pmpcfg(i).A=OFF]" +- 015_store_L1_W1_addr_hit: !Subfeature + name: 015_store_L1_W1_addr_hit + tag: VP_PMP_F018_S034 + next_elt_id: 1 + display_order: 15 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S034_I000 + description: 'reuse of VP_PMP_F012_S034_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S034_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range\n\nCHECK UPDATE\n - check store access-fault exception + raised (TODO: is M mode access prevented by A=OFF)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST18-3x(group)\n\ + \ [same as TST12-3x(group), but with pmpcfg(i).A=OFF]\nTST18-34 (HIGH-PRIO)\n\ + \ [same as TST12-34(group), but with pmpcfg(i).A=OFF\n - check instruction + fetch access-fault exception raised]" +- 016_store_L1_W0_addr_hit: !Subfeature + name: 016_store_L1_W0_addr_hit + tag: VP_PMP_F018_S035 + next_elt_id: 1 + display_order: 16 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S035_I000 + description: 'reuse of VP_PMP_F012_S035_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S035_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR04-d\n[Attempting to execute a store, store-conditional, + or AMO instruction which accesses a physical address within a PMP region + without write permissions raises a store access-fault exception]\n\nFTR02-b1\n + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does + it mean programmed first)]\n\n\nTST18-3x(group)\n [same as TST12-3x(group), + but with pmpcfg(i).A=OFF]\nTST18-35 (MEDIUM-PRIO)\n [same as TST12-35(group), + but with pmpcfg(i).A=OFF]" +- 017_store_L1_W1_addr_miss: !Subfeature + name: 017_store_L1_W1_addr_miss + tag: VP_PMP_F018_S036 + next_elt_id: 1 + display_order: 17 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S036_I000 + description: 'reuse of VP_PMP_F012_S036_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S036_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST18-3x(group)\n\ + \ [same as TST12-3x(group), but with pmpcfg(i).A=OFF]\nTST18-36 (HIGH-PRIO)\n\ + \ [same as TST12-36(group), but with pmpcfg(i).A=OFF]" +- 018_load_MPP_L0_R1_addr_hit: !Subfeature + name: 018_load_MPP_L0_R1_addr_hit + tag: VP_PMP_F018_S041 + next_elt_id: 1 + display_order: 18 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S041_I000 + description: 'reuse of VP_PMP_F012_S041_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S041_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST18-4x(group)\n\ + \ [same as TST12-4x(group), but with pmpcfg(i).A=OFF]\nTST18-41 (LOWEST-PRIO)\n\ + \ [same as TST12-41(group), but with pmpcfg(i).A=OFF]" +- 019_load_MPP_L0_R0_addr_hit: !Subfeature + name: 019_load_MPP_L0_R0_addr_hit + tag: VP_PMP_F018_S042 + next_elt_id: 1 + display_order: 19 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S042_I000 + description: 'reuse of VP_PMP_F012_S042_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S042_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST18-4x(group)\n\ + \ [same as TST12-4x(group), but with pmpcfg(i).A=OFF]\nTST18-42 (LOWEST-PRIO)\n\ + \ [same as TST12-42(group), but with pmpcfg(i).A=OFF]" +- 020_load_MPP_L0_R1_addr_miss: !Subfeature + name: 020_load_MPP_L0_R1_addr_miss + tag: VP_PMP_F018_S043 + next_elt_id: 1 + display_order: 20 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S043_I000 + description: 'reuse of VP_PMP_F012_S043_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S043_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST18-4x(group)\n\ + \ [same as TST12-4x(group), but with pmpcfg(i).A=OFF]\nTST18-43 (LOWEST-PRIO)\n\ + \ [same as TST12-43(group), but with pmpcfg(i).A=OFF]" +- 021_load_MPP_L1_R1_addr_hit: !Subfeature + name: 021_load_MPP_L1_R1_addr_hit + tag: VP_PMP_F018_S044 + next_elt_id: 1 + display_order: 21 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S044_I000 + description: 'reuse of VP_PMP_F012_S044_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S044_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range\n\nCHECK UPDATE\n - check store access-fault exception + raised (TODO: is M mode access prevented by A=OFF)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST18-4x(group)\n\ + \ [same as TST12-4x(group), but with pmpcfg(i).A=OFF]\nTST18-44 (LOWEST-PRIO)\n\ + \ [same as TST12-44(group), but with pmpcfg(i).A=OFF\n - check instruction + fetch access-fault exception raised]" +- 022_load_MPP_L1_R0_addr_hit: !Subfeature + name: 022_load_MPP_L1_R0_addr_hit + tag: VP_PMP_F018_S045 + next_elt_id: 1 + display_order: 22 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S045_I000 + description: 'reuse of VP_PMP_F012_S045_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S045_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR04-c\n[Attempting to execute a load or load-reserved + instruction which accesses a physical address within a PMP region without + read permissions raises a load access-fault exception]\n\nFTR02-b1\n[the + lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean + programmed first)]\n \n\nTST18-4x(group)\n [same as TST12-4x(group), but + with pmpcfg(i).A=OFF]\n TST18-45 (LOWEST-PRIO)\n [same as TST12-45(group), + but with pmpcfg(i).A=OFF]" +- 023_load_MPP_L1_R1_addr_miss: !Subfeature + name: 023_load_MPP_L1_R1_addr_miss + tag: VP_PMP_F018_S046 + next_elt_id: 1 + display_order: 23 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S046_I000 + description: 'reuse of VP_PMP_F012_S046_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S046_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST18-4x(group)\n\ + \ [same as TST12-4x(group), but with pmpcfg(i).A=OFF]\nTST18-46 (LOWEST-PRIO)\n\ + \ [same as TST12-46(group), but with pmpcfg(i).A=OFF]" +- 024_store_MPP_L0_W1_addr_hit: !Subfeature + name: 024_store_MPP_L0_W1_addr_hit + tag: VP_PMP_F018_S051 + next_elt_id: 1 + display_order: 24 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S051_I000 + description: 'reuse of VP_PMP_F012_S051_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S051_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST18-5x(group)\n\ + \ [same as TST12-5x(group), but with pmpcfg(i).A=OFF]\nTST18-51 (LOWEST-PRIO)\n\ + \ [same as TST12-51(group), but with pmpcfg(i).A=OFF]" +- 025_store_MPP_L0_W0_addr_hit: !Subfeature + name: 025_store_MPP_L0_W0_addr_hit + tag: VP_PMP_F018_S052 + next_elt_id: 1 + display_order: 25 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S052_I000 + description: 'reuse of VP_PMP_F012_S052_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S052_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST18-5x(group)\n\ + \ [same as TST12-5x(group), but with pmpcfg(i).A=OFF]\nTST18-52 (LOWEST-PRIO)\n\ + \ [same as TST12-52(group), but with pmpcfg(i).A=OFF]" +- 026_store_MPP_L0_W1_addr_miss: !Subfeature + name: 026_store_MPP_L0_W1_addr_miss + tag: VP_PMP_F018_S053 + next_elt_id: 1 + display_order: 26 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S053_I000 + description: 'reuse of VP_PMP_F012_S053_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S053_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e2-1 (refers to FTR09-d1)\n[When the L bit is clear, any + M-mode access matching the PMP entry will succeed]\nFTR09-d1 (refers to + FTR08-e2-1)\n [If the L bit is clear and the privilege mode of the access + is M, the access succeeds]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must + be implemented first (QUESTION: does it mean programmed first)]\n\n\nTST18-5x(group)\n\ + \ [same as TST12-5x(group), but with pmpcfg(i).A=OFF]\nTST18-53 (LOWEST-PRIO)\n\ + \ [same as TST12-53(group), but with pmpcfg(i).A=OFF]" +- 027_store_MPP_L1_W1_addr_hit: !Subfeature + name: 027_store_MPP_L1_W1_addr_hit + tag: VP_PMP_F018_S054 + next_elt_id: 1 + display_order: 27 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S054_I000 + description: 'reuse of VP_PMP_F012_S054_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S054_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range\n\nCHECK UPDATE\n - check store access-fault exception + raised (TODO: is M mode access prevented by A=OFF)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST18-5x(group)\n\ + \ [same as TST12-5x(group), but with pmpcfg(i).A=OFF]\nTST18-54 (LOWEST-PRIO)\n\ + \ [same as TST12-54(group), but with pmpcfg(i).A=OFF\n - check instruction + fetch access-fault exception raised]" +- 028_store_MPP_L1_W0_addr_hit: !Subfeature + name: 028_store_MPP_L1_W0_addr_hit + tag: VP_PMP_F018_S055 + next_elt_id: 1 + display_order: 28 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S055_I000 + description: 'reuse of VP_PMP_F012_S055_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S055_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR04-d\n[Attempting to execute a store, store-conditional, + or AMO instruction which accesses a physical address within a PMP region + without write permissions raises a store access-fault exception]\n\nFTR02-b1\n + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does + it mean programmed first)]\n\n\nTST18-5x(group)\n [same as TST12-5x(group), + but with pmpcfg(i).A=OFF]\nTST18-55 (LOWEST-PRIO)\n [same as TST12-55(group), + but with pmpcfg(i).A=OFF]" +- 029_store_MPP_L1_W1_addr_miss: !Subfeature + name: 029_store_MPP_L1_W1_addr_miss + tag: VP_PMP_F018_S056 + next_elt_id: 1 + display_order: 29 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F018_S056_I000 + description: 'reuse of VP_PMP_F012_S056_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F012_S056_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - pmpcfg(i): A=OFF\n - pmpaddr(i): + NA4 address range" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nFTR01-f (refers to FTR08-e1)\n[PMP checks may additionally + apply to M-mode accesses, in which case the PMP registers themselves are + locked, so that even M-mode software cannot change them until the hart is + reset]\n \nFTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1)\n[When the + L bit is set, these permissions are enforced for all privilege modes]\n + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f)\n[if the L bit is set, + then the access succeeds only if the R, W, or X bit corresponding to the + access type is set]\n\nFTR02-b1\n[the lowest-numbered PMP CSRs must be implemented + first (QUESTION: does it mean programmed first)]\n\n\nTST18-5x(group)\n\ + \ [same as TST12-5x(group), but with pmpcfg(i).A=OFF]\nTST18-56 (LOWEST-PRIO)\n\ + \ [same as TST12-56(group), but with pmpcfg(i).A=OFF]" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP019.yml b/verif/docs/VerifPlans/PMP/VP_IP019.yml new file mode 100644 index 00000000000..76d9a7ad6c3 --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP019.yml @@ -0,0 +1,525 @@ +!Feature +next_elt_id: 20 +name: cfg NA4 not selectable +id: 19 +display_order: 19 +subfeatures: !!omap +- 000_fetch_L0_X1_addr_hit: !Subfeature + name: 000_fetch_L0_X1_addr_hit + tag: VP_PMP_F019_S011 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S011_I000 + description: 'reuse of VP_PMP_F019_S011_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S011_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)\n\nCHECK UPDATE\n - check instruction fetch access-fault + exception raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 001_fetch_L1_X1_addr_hit: !Subfeature + name: 001_fetch_L1_X1_addr_hit + tag: VP_PMP_F019_S014 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S014_I000 + description: 'reuse of VP_PMP_F019_S014_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S014_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)\n\nCHECK UPDATE\n - check instruction fetch access-fault + exception raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 002_load_L0_R1_addr_hit: !Subfeature + name: 002_load_L0_R1_addr_hit + tag: VP_PMP_F019_S021 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S021_I000 + description: 'reuse of VP_PMP_F019_S021_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S021_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)\n\nCHECK UPDATE\n - check load access-fault exception + raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 003_load_L1_R1_addr_hit: !Subfeature + name: 003_load_L1_R1_addr_hit + tag: VP_PMP_F019_S024 + next_elt_id: 1 + display_order: 3 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S024_I000 + description: 'reuse of VP_PMP_F019_S024_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S024_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)\n\nCHECK UPDATE\n - check load access-fault exception + raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 004_store_L0_W1_addr_hit: !Subfeature + name: 004_store_L0_W1_addr_hit + tag: VP_PMP_F019_S031 + next_elt_id: 1 + display_order: 4 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S031_I000 + description: 'reuse of VP_PMP_F019_S031_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S031_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)\n\nCHECK UPDATE\n - check store access-fault exception + raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 005_store_L1_W1_addr_hit: !Subfeature + name: 005_store_L1_W1_addr_hit + tag: VP_PMP_F019_S034 + next_elt_id: 1 + display_order: 5 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S034_I000 + description: 'reuse of VP_PMP_F019_S034_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S034_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)\n\nCHECK UPDATE\n - check store access-fault exception + raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 006_load_MPP_L0_R1_addr_hit: !Subfeature + name: 006_load_MPP_L0_R1_addr_hit + tag: VP_PMP_F019_S041 + next_elt_id: 1 + display_order: 6 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S041_I000 + description: 'reuse of VP_PMP_F019_S041_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S041_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)\n\nCHECK UPDATE\n - check load access-fault exception + raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 007_load_MPP_L1_R1_addr_hit: !Subfeature + name: 007_load_MPP_L1_R1_addr_hit + tag: VP_PMP_F019_S044 + next_elt_id: 1 + display_order: 7 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S044_I000 + description: 'reuse of VP_PMP_F019_S044_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S044_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)\n\nCHECK UPDATE\n - check load access-fault exception + raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 008_store_MPP_L0_W1_addr_hit: !Subfeature + name: 008_store_MPP_L0_W1_addr_hit + tag: VP_PMP_F019_S051 + next_elt_id: 1 + display_order: 8 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S051_I000 + description: 'reuse of VP_PMP_F019_S051_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S051_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)\n\nCHECK UPDATE\n - check store access-fault exception + raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 009_store_MPP_L1_W1_addr_hit: !Subfeature + name: 009_store_MPP_L1_W1_addr_hit + tag: VP_PMP_F019_S054 + next_elt_id: 1 + display_order: 9 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S054_I000 + description: 'reuse of VP_PMP_F019_S054_I000 feature description (Cf. Feature: + "cfg NA4 access S/U")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S054_I000 verification goals (Cf. Feature: + \"cfg NA4 access S/U\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)\n\nCHECK UPDATE\n - check store access-fault exception + raised" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 010_fetch_L0_X1_addr_hit: !Subfeature + name: 010_fetch_L0_X1_addr_hit + tag: VP_PMP_F019_S011 + next_elt_id: 1 + display_order: 10 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S011_I000 + description: 'reuse of VP_PMP_F019_S011_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S011_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 011_fetch_L1_X1_addr_hit: !Subfeature + name: 011_fetch_L1_X1_addr_hit + tag: VP_PMP_F019_S014 + next_elt_id: 1 + display_order: 11 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S014_I000 + description: 'reuse of VP_PMP_F019_S014_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S014_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)\n\nCHECK UPDATE\n - check store access-fault exception + raised (TODO: is M mode access prevented by A=OFF)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 012_load_L0_R1_addr_hit: !Subfeature + name: 012_load_L0_R1_addr_hit + tag: VP_PMP_F019_S021 + next_elt_id: 1 + display_order: 12 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S021_I000 + description: 'reuse of VP_PMP_F019_S021_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S021_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 013_load_L1_R1_addr_hit: !Subfeature + name: 013_load_L1_R1_addr_hit + tag: VP_PMP_F019_S024 + next_elt_id: 1 + display_order: 13 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S024_I000 + description: 'reuse of VP_PMP_F019_S024_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S024_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)\n\nCHECK UPDATE\n - check store access-fault exception + raised (TODO: is M mode access prevented by A=OFF)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 014_store_L0_W1_addr_hit: !Subfeature + name: 014_store_L0_W1_addr_hit + tag: VP_PMP_F019_S031 + next_elt_id: 1 + display_order: 14 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S031_I000 + description: 'reuse of VP_PMP_F019_S031_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S031_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 015_store_L1_W1_addr_hit: !Subfeature + name: 015_store_L1_W1_addr_hit + tag: VP_PMP_F019_S034 + next_elt_id: 1 + display_order: 15 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S034_I000 + description: 'reuse of VP_PMP_F019_S034_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S034_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)\n\nCHECK UPDATE\n - check store access-fault exception + raised (TODO: is M mode access prevented by A=OFF)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 016_load_MPP_L0_R1_addr_hit: !Subfeature + name: 016_load_MPP_L0_R1_addr_hit + tag: VP_PMP_F019_S041 + next_elt_id: 1 + display_order: 16 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S041_I000 + description: 'reuse of VP_PMP_F019_S041_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S041_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 017_load_MPP_L1_R1_addr_hit: !Subfeature + name: 017_load_MPP_L1_R1_addr_hit + tag: VP_PMP_F019_S044 + next_elt_id: 1 + display_order: 17 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S044_I000 + description: 'reuse of VP_PMP_F019_S044_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S044_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)\n\nCHECK UPDATE\n - check store access-fault exception + raised (TODO: is M mode access prevented by A=OFF)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 018_store_MPP_L0_W1_addr_hit: !Subfeature + name: 018_store_MPP_L0_W1_addr_hit + tag: VP_PMP_F019_S051 + next_elt_id: 1 + display_order: 18 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S051_I000 + description: 'reuse of VP_PMP_F019_S051_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S051_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 019_store_MPP_L1_W1_addr_hit: !Subfeature + name: 019_store_MPP_L1_W1_addr_hit + tag: VP_PMP_F019_S054 + next_elt_id: 1 + display_order: 19 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F019_S054_I000 + description: 'reuse of VP_PMP_F019_S054_I000 feature description (Cf. Feature: + "cfg NA4 access M")' + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "reuse of VP_PMP_F019_S054_I000 verification goals (Cf. Feature: + \"cfg NA4 access M\")\n\nCONFIGURATION\n - check that pmpcfg(i).A=OFF + (by reading back)\n\nCHECK UPDATE\n - check store access-fault exception + raised (TODO: is M mode access prevented by A=OFF)" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP021.yml b/verif/docs/VerifPlans/PMP/VP_IP021.yml new file mode 100644 index 00000000000..67368810213 --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP021.yml @@ -0,0 +1,376 @@ +!Feature +next_elt_id: 6 +name: multi entries NA4 +id: 21 +display_order: 21 +subfeatures: !!omap +- 000_1_entry: !Subfeature + name: 000_1_entry + tag: VP_PMP_F021_S001 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F021_S001_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose a single PMP entry\n\nCONFIGURATION and ACCESS\n - + for each pmp entry, apply any CONFIGURATION+ACCESS scenario above (Cf. Feature: + \"cfg NA4 access S/U/M\")\n - make sure the pmp entries address ranges + are not overlapping/intersecting\n - NB: obviously, pmp entry configurations + with different mstatus.MPRV/MPP values cannot be mixed in same test\n\n\ + CHECK\n - for each pmp entry, we should obtain the expected CHECK result\n\ + \nREUSABILITY\n - if possible, the number of PMP entries (N) is a configurable + parameter\n - so a single test function can be reused" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST21(group)\n [create scenarios where PMP entries + with A=2 (NA4) and with/without matching permissions\n - check only NA4 + defined addresses are matching]\nTST21-1 = extension of (TST11-11, TST11-21, + TST11-31, TST11-41, TST11-51,\n TST11-12, TST11-22, + TST11-32, TST11-42, TST11-52,\n TST11-13, TST11-23, + TST11-33, TST11-43, TST11-53,\n TST11-14, TST11-24, + TST11-34, TST11-44, TST11-54,\n TST11-15, TST11-25, + TST11-35, TST11-45, TST11-55,\n TST11-16, TST11-26, + TST11-36, TST11-46, TST11-56,\n TST12-11, TST12-21, + TST12-31, TST12-41, TST12-51,\n TST12-12, TST12-22, + TST12-32, TST12-42, TST12-52,\n TST12-13, TST12-23, + TST12-33, TST12-43, TST12-53,\n TST12-14, TST12-24, + TST12-34, TST12-44, TST12-54,\n TST12-15, TST12-25, + TST12-35, TST12-45, TST12-55,\n TST12-16, TST12-26, + TST12-36, TST12-46, TST12-56)\n[configure only one (any, but the first one) + PMP entry\n - use A=NA4 for the PMP entry configuration\n - execute the + chosen kind of access\n - should be same result]" +- 001_2_isolated_entries: !Subfeature + name: 001_2_isolated_entries + tag: VP_PMP_F021_S002 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F021_S002_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose any 2 PMP entries\n\nreuse of VP_PMP_F021_S001_I000 feature + description (Cf. Feature: \"multi entries NA4\")" + pfc: 3 + test_type: 4 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST21(group)\n [create scenarios where PMP entries + with A=2 (NA4) and with/without matching permissions\n - check only NA4 + defined addresses are matching]\nTST21-2 = extension of compatible pair + of (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51,\n \ + \ \t\t\t\t\t\t\t\t\t TST11-12, TST11-22, TST11-32, TST11-42, TST11-52,\n\ + \ \t\t\t\t\t\t\t\t\t TST11-13, TST11-23, TST11-33, + TST11-43, TST11-53,\n \t\t\t\t\t\t\t\t\t TST11-14, + TST11-24, TST11-34, TST11-44, TST11-54,\n \t\t\t\t + \t\t\t\t\t TST11-15, TST11-25, TST11-35, TST11-45, TST11-55,\n \ + \ \t\t\t\t \t\t\t\t\t TST11-16, TST11-26, TST11-36, TST11-46, + TST11-56,\n \t\t\t\t\t\t\t\t\t TST12-11, TST12-21, + TST12-31, TST12-41, TST12-51,\n \t\t\t\t\t\t\t\t\t + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52,\n \ + \ \t\t\t\t\t\t\t\t\t TST12-13, TST12-23, TST12-33, TST12-43, TST12-53,\n\ + \ \t\t\t\t\t\t\t\t\t TST12-14, TST12-24, TST12-34, + TST12-44, TST12-54,\n \t\t\t\t\t\t\t\t\t TST12-15, + TST12-25, TST12-35, TST12-45, TST12-55,\n \t\t\t\t + \t\t\t\t\t TST12-16, TST12-26, TST12-36, TST12-46, TST12-56)\n[configure + 2 non-adjacent PMP entries (highest-numbered ones first) (avoid the first + PMP entry)\n - use A=NA4 for each PMP entry configuration\n - execute + the 2 kinds of accesses (if possible to chain due to potential access-fault + exception)\n - should be same 2 results]" +- 002_N_isolated_entries: !Subfeature + name: 002_N_isolated_entries + tag: VP_PMP_F021_S003 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F021_S003_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose any N PMP entries (2>\n\nTST21(group)\n [create scenarios where PMP entries + with A=2 (NA4) and with/without matching permissions\n - check only NA4 + defined addresses are matching]\nTST21-3 = extension of compatible group(N) + of (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51,\n \ + \ \t\t\t\t \t\t\t\t\t\t\t TST11-12, TST11-22, TST11-32, TST11-42, + TST11-52,\n \t\t\t\t\t\t\t\t\t\t\t TST11-13, TST11-23, + TST11-33, TST11-43, TST11-53,\n \t\t\t\t\t\t\t\t\t + \t\t TST11-14, TST11-24, TST11-34, TST11-44, TST11-54,\n \ + \ \t\t\t\t \t\t\t\t\t\t\t TST11-15, TST11-25, TST11-35, TST11-45, + TST11-55,\n \t\t\t\t\t\t\t\t\t\t\t TST11-16, TST11-26, + TST11-36, TST11-46, TST11-56,\n \t\t\t\t\t\t\t\t\t + \t\t TST12-11, TST12-21, TST12-31, TST12-41, TST12-51,\n \ + \ \t\t\t\t \t\t\t\t\t\t\t TST12-12, TST12-22, TST12-32, TST12-42, + TST12-52,\n \t\t\t\t\t\t\t\t\t\t\t TST12-13, TST12-23, + TST12-33, TST12-43, TST12-53,\n \t\t\t\t\t\t\t\t\t + \t\t TST12-14, TST12-24, TST12-34, TST12-44, TST12-54,\n \ + \ \t\t\t\t \t\t\t\t\t\t\t TST12-15, TST12-25, TST12-35, TST12-45, + TST12-55,\n \t\t\t\t\t\t\t\t\t\t\t TST12-16, TST12-26, + TST12-36, TST12-46, TST12-56)\n[configure N PMP entries (highest-numbered + ones first) (as non-adjacent as possible, and avoid the first PMP entry)\n\ + \ - use A=NA4 for each PMP entry configuration\n - execute the N kinds + of accesses (if possible to chain due to potential access-fault exception)\n\ + \ - should be same N results]" +- 003_8_isolated_entries: !Subfeature + name: 003_8_isolated_entries + tag: VP_PMP_F021_S004 + next_elt_id: 1 + display_order: 3 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F021_S004_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose all 8 PMP entries\n\nreuse of VP_PMP_F021_S001_I000 feature + description (Cf. Feature: \"multi entries NA4\")" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST21(group)\n [create scenarios where PMP entries + with A=2 (NA4) and with/without matching permissions\n - check only NA4 + defined addresses are matching]\nTST21-4 = extension of compatible group(8) + of (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51,\n \ + \ \t\t\t\t \t\t\t\t\t\t\t TST11-12, TST11-22, TST11-32, TST11-42, + TST11-52,\n \t\t\t\t\t\t\t\t\t\t\t TST11-13, TST11-23, + TST11-33, TST11-43, TST11-53,\n \t\t\t\t\t\t\t\t\t + \t\t TST11-14, TST11-24, TST11-34, TST11-44, TST11-54,\n \ + \ \t\t\t\t \t\t\t\t\t\t\t TST11-15, TST11-25, TST11-35, TST11-45, + TST11-55,\n \t\t\t\t\t\t\t\t\t\t\t TST11-16, TST11-26, + TST11-36, TST11-46, TST11-56,\n \t\t\t\t\t\t\t\t\t + \t\t TST12-11, TST12-21, TST12-31, TST12-41, TST12-51,\n \ + \ \t\t\t\t \t\t\t\t\t\t\t TST12-12, TST12-22, TST12-32, TST12-42, + TST12-52,\n \t\t\t\t\t\t\t\t\t\t\t TST12-13, TST12-23, + TST12-33, TST12-43, TST12-53,\n \t\t\t\t\t\t\t\t\t + \t\t TST12-14, TST12-24, TST12-34, TST12-44, TST12-54,\n \ + \ \t\t\t\t \t\t\t\t\t\t\t TST12-15, TST12-25, TST12-35, TST12-45, + TST12-55,\n \t\t\t\t\t\t\t\t\t\t\t TST12-16, TST12-26, + TST12-36, TST12-46, TST12-56)\n[configure 8 PMP entries (highest-numbered + ones first)\n - use A=NA4 for each PMP entry configuration\n - execute + the 8 kinds of accesses (if possible to chain due to potential access-fault + exception)\n - should be same 8 results]" +- 004_2_intersecting_entries_fail: !Subfeature + name: 004_2_intersecting_entries_fail + tag: VP_PMP_F021_S005 + next_elt_id: 1 + display_order: 4 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F021_S005_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose any 2 PMP entries\n\nCONFIGURATION and ACCESS (Cf. Feature: + \"cfg NA4 access S/U/M\")\n - for the least-numbered pmp entry, apply + any CONFIGURATION+ACCESS scenario with access-fault\n - for the highest-numbered + pmp entry, apply any CONFIGURATION+ACCESS scenario without access-fault\n\ + \ - make sure the pmp entries address ranges are overlapping/intersecting + (at least at 4 consecutive bytes)\n - for each pmp entry, execute one + access in its associated pmp address region but outside the overlapping/intersecting + address range\n - execute one additional access inside the overlapping/intersecting + address range\n - NB: obviously, pmp entry configurations with different + access-modes (S/U vs. M) cannot be easily mixed in same test\n - NB: + obviously, pmp entry configurations with different mstatus.MPRV/MPP values + cannot be mixed in same test\n\nCHECK\n - for each pmp entry, access + outside the overlapping/intersecting address range should give the expected + CHECK result\n - access inside the overlapping/intersecting address range + should generate the access-type related access-fault\n\nREUSABILITY\n \ + \ - if possible, the number of PMP entries (N) is a configurable parameter\n\ + \ - so a single test function can be reused" + pfc: 3 + test_type: 4 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST51(group) => FTR09-a, FTR09-b and FTR09-c\n [create + scenarios where 2 PMP entries with same pmpaddr\n - one without matching + permissions or with A=OFF\n - one with matching permissions and A=NA4/NAPOT/TOR\n\ + \ - any of them can be the lowest-numbered PMP entry]\nTST51-1\n[configure + 2 PMP entries\n - configure the lowest-numbered PMP entry with (TST11-12, + TST11-22, TST11-32, TST11-42, TST11-52,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST11-15, TST11-25, TST11-35, TST11-45, TST11-55,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST12-12, TST12-22, + TST12-32, TST12-42, TST12-52,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST12-15, TST12-25, TST12-35, TST12-45, TST12-55,\n \ + \ TST13-12, TST13-22, TST13-32, TST13-42, + TST13-52,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST13-15, + TST13-25, TST13-35, TST13-45, TST13-55,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST14-12, TST14-22, TST14-32, TST14-42, TST14-52,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST14-15, TST14-25, + TST14-35, TST14-45, TST14-55,\n \ + \ TST15-12, TST15-22, TST15-32, TST15-42, TST15-52,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST15-15, TST15-25, TST15-35, + TST15-45, TST15-55,\n \t\t\t\t\t\t\t\t\t \t\t\t\t + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST16-15, TST16-25, TST16-35, TST16-45, + TST16-55,\n TST17-12, + TST17-22, TST17-32, TST17-42, TST17-52,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST17-15, TST17-25, TST17-35, TST17-45, TST17-55,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST18-12, TST18-22, + TST18-32, TST18-42, TST18-52,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST18-15, TST18-25, TST18-35, TST18-45, TST18-55)\n - configure + the highest-numbered PMP entry with (TST11-11, TST11-21, TST11-31, TST11-41, + TST11-51,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST11-14, + TST11-24, TST11-34, TST11-44, TST11-54,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST12-11, TST12-21, TST12-31, TST12-41, TST12-51,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST12-14, TST12-24, + TST12-34, TST12-44, TST12-54,\n \ + \ TST13-11, TST13-21, TST13-31, TST13-41, TST13-51,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t\tTST13-14, TST13-24, TST13-34, + TST13-44, TST13-54,\n \t\t\t\t\t\t\t\t\t \t\t\t\t + \tTST14-11, TST14-21, TST14-31, TST14-41, TST14-51,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t\tTST14-14, TST14-24, TST14-34, TST14-44, + TST14-54,\n TST15-11, + TST15-21, TST15-31, TST15-41, TST15-51,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST15-14, TST15-24, TST15-34, TST15-44, TST15-54,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST16-11, TST16-21, + TST16-31, TST16-41, TST16-51,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST16-14, TST16-24, TST16-34, TST16-44, TST16-54)\n - execute + the associated access\n - check associated access-fault exception raised]" +- 005_2_intersecting_entries_succeed: !Subfeature + name: 005_2_intersecting_entries_succeed + tag: VP_PMP_F021_S006 + next_elt_id: 1 + display_order: 5 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F021_S006_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose any 2 PMP entries\n\nCONFIGURATION and ACCESS (Cf. Feature: + \"cfg NA4 access S/U/M\")\n - for the least-numbered pmp entry, apply + any CONFIGURATION+ACCESS scenario without access-fault\n - for the highest-numbered + pmp entry, apply any CONFIGURATION+ACCESS scenario with access-fault\n \ + \ - make sure the pmp entries address ranges are overlapping/intersecting + (at least at 4 consecutive bytes)\n - for each pmp entry, execute one + access in its associated pmp address region but outside the overlapping/intersecting + address range\n - execute one additional access inside the overlapping/intersecting + address range\n - NB: obviously, pmp entry configurations with different + access-modes (S/U vs. M) cannot be easily mixed in same test\n - NB: + obviously, pmp entry configurations with different mstatus.MPRV/MPP values + cannot be mixed in same test\n\nCHECK\n - for each pmp entry, access + outside the overlapping/intersecting address range should give the expected + CHECK result\n - access inside the overlapping/intersecting address range + should not generate any access-fault\n\nREUSABILITY\n - if possible, + the number of PMP entries (N) is a configurable parameter\n - so a single + test function can be reused" + pfc: 3 + test_type: 4 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST51(group) => FTR09-a, FTR09-b and FTR09-c\n [create + scenarios where 2 PMP entries with same pmpaddr\n - one without matching + permissions or with A=OFF\n - one with matching permissions and A=NA4/NAPOT/TOR\n\ + \ - any of them can be the lowest-numbered PMP entry]\nTST51-2\n[configure + 2 PMP entries\n - configure the lowest-numbered PMP entry with (TST11-11, + TST11-21, TST11-31, TST11-41, TST11-51,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST11-14, TST11-24, TST11-34, TST11-44, TST11-54,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST12-11, TST12-21, + TST12-31, TST12-41, TST12-51,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST12-14, TST12-24, TST12-34, TST12-44, TST12-54,\n \ + \ TST13-11, TST13-21, TST13-31, TST13-41, + TST13-51,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST13-14, + TST13-24, TST13-34, TST13-44, TST13-54,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST14-11, TST14-21, TST14-31, TST14-41, TST14-51,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST14-14, TST14-24, + TST14-34, TST14-44, TST14-54,\n \ + \ TST15-11, TST15-21, TST15-31, TST15-41, TST15-51,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST15-14, TST15-24, TST15-34, + TST15-44, TST15-54,\n \t\t\t\t\t\t\t\t\t \t\t\t\t + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST16-14, TST16-24, TST16-34, TST16-44, + TST16-54)\n - configure the highest-numbered PMP entry with (TST11-12, + TST11-22, TST11-32, TST11-42, TST11-52,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST11-15, TST11-25, TST11-35, TST11-45, TST11-55,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST12-12, TST12-22, + TST12-32, TST12-42, TST12-52,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST12-15, TST12-25, TST12-35, TST12-45, TST12-55,\n \ + \ TST13-12, TST13-22, TST13-32, + TST13-42, TST13-52,\n \t\t\t\t\t\t\t\t\t \t\t\t\t\ + \ TST13-15, TST13-25, TST13-35, TST13-45, TST13-55,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST14-12, TST14-22, TST14-32, TST14-42, + TST14-52,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST14-15, + TST14-25, TST14-35, TST14-45, TST14-55,\n \ + \ TST15-12, TST15-22, TST15-32, TST15-42, TST15-52,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST15-15, TST15-25, + TST15-35, TST15-45, TST15-55,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST16-12, TST16-22, TST16-32, TST16-42, TST16-52,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST16-15, TST16-25, TST16-35, + TST16-45, TST16-55,\n \ + \ TST17-12, TST17-22, TST17-32, TST17-42, TST17-52,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST17-15, TST17-25, TST17-35, TST17-45, + TST17-55,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST18-12, + TST18-22, TST18-32, TST18-42, TST18-52,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST18-15, TST18-25, TST18-35, TST18-45, TST18-55)\n\ + \ - execute the associated access\n - check no access-fault exception]" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP022.yml b/verif/docs/VerifPlans/PMP/VP_IP022.yml new file mode 100644 index 00000000000..7412bcc7bfb --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP022.yml @@ -0,0 +1,376 @@ +!Feature +next_elt_id: 6 +name: multi entries NAPOT +id: 22 +display_order: 22 +subfeatures: !!omap +- 000_1_entry: !Subfeature + name: 000_1_entry + tag: VP_PMP_F022_S001 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F022_S001_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose a single PMP entry\n\nCONFIGURATION and ACCESS\n - + for each pmp entry, apply any CONFIGURATION+ACCESS scenario above (Cf. Feature: + \"cfg NAPOT access S/U/M\")\n - make sure the pmp entries address ranges + are not overlapping/intersecting\n - NB: obviously, pmp entry configurations + with different mstatus.MPRV/MPP values cannot be mixed in same test\n\n\ + CHECK\n - for each pmp entry, we should obtain the expected CHECK result\n\ + \nREUSABILITY\n - if possible, the number of PMP entries (N) is a configurable + parameter\n - so a single test function can be reused" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST22(group)\n [create scenarios where PMP entries + with A=3 (NAPOT) and with/without matching permissions\n - check only + NAPOT defined addresses are matching]\nTST22-1 = extension of (TST13-11, + TST13-21, TST13-31, TST13-41, TST13-51,\n TST13-12, + TST13-22, TST13-32, TST13-42, TST13-52,\n TST13-13, + TST13-23, TST13-33, TST13-43, TST13-53,\n TST13-14, + TST13-24, TST13-34, TST13-44, TST13-54,\n TST13-15, + TST13-25, TST13-35, TST13-45, TST13-55,\n TST13-16, + TST13-26, TST13-36, TST13-46, TST13-56,\n TST14-11, + TST14-21, TST14-31, TST14-41, TST14-51,\n TST14-12, + TST14-22, TST14-32, TST14-42, TST14-52,\n TST14-13, + TST14-23, TST14-33, TST14-43, TST14-53,\n TST14-14, + TST14-24, TST14-34, TST14-44, TST14-54,\n TST14-15, + TST14-25, TST14-35, TST14-45, TST14-55,\n TST14-16, + TST14-26, TST14-36, TST14-46, TST14-56)\n[configure only one (any, but the + first one) PMP entry\n - use A=NAPOT for the PMP entry configuration\n\ + \ - execute the chosen kind of access\n - should be same result]" +- 001_2_isolated_entries: !Subfeature + name: 001_2_isolated_entries + tag: VP_PMP_F022_S002 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F022_S002_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose any 2 PMP entries\n\nreuse of VP_PMP_F022_S001_I000 feature + description (Cf. Feature: \"multi entries NAPOT\")" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST22(group)\n [create scenarios where PMP entries + with A=3 (NAPOT) and with/without matching permissions\n - check only + NAPOT defined addresses are matching]\nTST22-2 = extension of compatible + pair of (TST13-11, TST13-21, TST13-31, TST13-41, TST13-51,\n \ + \ \t\t\t\t\t\t\t\t\t TST13-12, TST13-22, TST13-32, TST13-42, + TST13-52,\n \t\t\t\t\t\t\t\t\t TST13-13, TST13-23, + TST13-33, TST13-43, TST13-53,\n \t\t\t\t\t\t\t\t\t + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54,\n \ + \ \t\t\t\t\t\t\t\t\t TST13-15, TST13-25, TST13-35, TST13-45, TST13-55,\n\ + \ \t\t\t\t \t\t\t\t\t TST13-16, TST13-26, TST13-36, + TST13-46, TST13-56,\n \t\t\t\t\t\t\t\t\t TST14-11, + TST14-21, TST14-31, TST14-41, TST14-51,\n \t\t\t\t + \t\t\t\t\t TST14-12, TST14-22, TST14-32, TST14-42, TST14-52,\n \ + \ \t\t\t\t\t\t\t\t\t TST14-13, TST14-23, TST14-33, TST14-43, + TST14-53,\n \t\t\t\t\t\t\t\t\t TST14-14, TST14-24, + TST14-34, TST14-44, TST14-54,\n \t\t\t\t\t\t\t\t\t + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55,\n \ + \ \t\t\t\t\t\t\t\t\t TST14-16, TST14-26, TST14-36, TST14-46, TST14-56)\n + [configure 2 non-adjacent PMP entries (highest-numbered ones first) (avoid + the first PMP entry)\n - use A=NAPOT for each PMP entry configuration\n\ + \ - execute the 2 kinds of accesses (if possible to chain due to potential + access-fault exception)\n - should be same 2 results]" +- 002_N_isolated_entries: !Subfeature + name: 002_N_isolated_entries + tag: VP_PMP_F022_S003 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F022_S003_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose any N PMP entries (2>\n\nTST22(group)\n [create scenarios where PMP entries + with A=3 (NAPOT) and with/without matching permissions\n - check only + NAPOT defined addresses are matching]\nTST22-3 = extension of compatible + group(N) of (TST13-11, TST13-21, TST13-31, TST13-41, TST13-51,\n \ + \ \t\t\t\t \t\t\t\t\t\t\t TST13-12, TST13-22, TST13-32, + TST13-42, TST13-52,\n \t\t\t\t\t\t\t\t\t\t\t TST13-13, + TST13-23, TST13-33, TST13-43, TST13-53,\n \t\t\t\t + \t\t\t\t\t\t\t TST13-14, TST13-24, TST13-34, TST13-44, TST13-54,\n \ + \ \t\t\t\t \t\t\t\t\t\t\t TST13-15, TST13-25, TST13-35, + TST13-45, TST13-55,\n \t\t\t\t\t\t\t\t\t\t\t TST13-16, + TST13-26, TST13-36, TST13-46, TST13-56,\n \t\t\t\t + \t\t\t\t\t\t\t TST14-11, TST14-21, TST14-31, TST14-41, TST14-51,\n \ + \ \t\t\t\t \t\t\t\t\t\t\t TST14-12, TST14-22, TST14-32, + TST14-42, TST14-52,\n \t\t\t\t\t\t\t\t\t\t\t TST14-13, + TST14-23, TST14-33, TST14-43, TST14-53,\n \t\t\t\t + \t\t\t\t\t\t\t TST14-14, TST14-24, TST14-34, TST14-44, TST14-54,\n \ + \ \t\t\t\t \t\t\t\t\t\t\t TST14-15, TST14-25, TST14-35, + TST14-45, TST14-55,\n \t\t\t\t\t\t\t\t\t\t\t TST14-16, + TST14-26, TST14-36, TST14-46, TST14-56)\n[configure N PMP entries (highest-numbered + ones first) (as non-adjacent as possible, and avoid the first PMP entry)\n\ + \ - use A=NAPOT for each PMP entry configuration\n - execute the N kinds + of accesses (if possible to chain due to potential access-fault exception)\n\ + \ - should be same N results]" +- 003_8_isolated_entries: !Subfeature + name: 003_8_isolated_entries + tag: VP_PMP_F022_S004 + next_elt_id: 1 + display_order: 3 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F022_S004_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose all 8 PMP entries\n\nreuse of VP_PMP_F022_S001_I000 feature + description (Cf. Feature: \"multi entries NAPOT\")" + pfc: 3 + test_type: 3 + cov_method: 0 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST22(group)\n [create scenarios where PMP entries + with A=3 (NAPOT) and with/without matching permissions\n - check only + NAPOT defined addresses are matching]\nTST22-4 = extension of compatible + group(8) of (TST13-11, TST13-21, TST13-31, TST13-41, TST13-51,\n \ + \ \t\t\t\t \t\t\t\t\t\t\t TST13-12, TST13-22, TST13-32, + TST13-42, TST13-52,\n \t\t\t\t\t\t\t\t\t\t\t TST13-13, + TST13-23, TST13-33, TST13-43, TST13-53,\n \t\t\t\t + \t\t\t\t\t\t\t TST13-14, TST13-24, TST13-34, TST13-44, TST13-54,\n \ + \ \t\t\t\t \t\t\t\t\t\t\t TST13-15, TST13-25, TST13-35, + TST13-45, TST13-55,\n \t\t\t\t\t\t\t\t\t\t\t TST13-16, + TST13-26, TST13-36, TST13-46, TST13-56,\n \t\t\t\t + \t\t\t\t\t\t\t TST14-11, TST14-21, TST14-31, TST14-41, TST14-51,\n \ + \ \t\t\t\t \t\t\t\t\t\t\t TST14-12, TST14-22, TST14-32, + TST14-42, TST14-52,\n \t\t\t\t\t\t\t\t\t\t\t TST14-13, + TST14-23, TST14-33, TST14-43, TST14-53,\n \t\t\t\t + \t\t\t\t\t\t\t TST14-14, TST14-24, TST14-34, TST14-44, TST14-54,\n \ + \ \t\t\t\t \t\t\t\t\t\t\t TST14-15, TST14-25, TST14-35, + TST14-45, TST14-55,\n \t\t\t\t\t\t\t\t\t\t\t TST14-16, + TST14-26, TST14-36, TST14-46, TST14-56)\n[configure 8 PMP entries (highest-numbered + ones first)\n - use A=NAPOT for each PMP entry configuration\n - execute + the 8 kinds of accesses (if possible to chain due to potential access-fault + exception)\n - should be same 8 results]" +- 004_2_intersecting_entries_fail: !Subfeature + name: 004_2_intersecting_entries_fail + tag: VP_PMP_F022_S005 + next_elt_id: 1 + display_order: 4 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F022_S005_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose any 2 PMP entries\n\nCONFIGURATION and ACCESS (Cf. Feature: + \"cfg NAPOT access S/U/M\")\n - for the least-numbered pmp entry, apply + any CONFIGURATION+ACCESS scenario with access-fault\n - for the highest-numbered + pmp entry, apply any CONFIGURATION+ACCESS scenario without access-fault\n\ + \ - make sure the pmp entries address ranges are overlapping/intersecting + (at least at 4 consecutive bytes)\n - for each pmp entry, execute one + access in its associated pmp address region but outside the overlapping/intersecting + address range\n - execute one additional access inside the overlapping/intersecting + address range\n - NB: obviously, pmp entry configurations with different + access-modes (S/U vs. M) cannot be easily mixed in same test\n - NB: + obviously, pmp entry configurations with different mstatus.MPRV/MPP values + cannot be mixed in same test\n\nCHECK\n - for each pmp entry, access + outside the overlapping/intersecting address range should give the expected + CHECK result\n - access inside the overlapping/intersecting address range + should generate the access-type related access-fault\n\nREUSABILITY\n \ + \ - if possible, the number of PMP entries (N) is a configurable parameter\n\ + \ - so a single test function can be reused" + pfc: 3 + test_type: 4 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST51(group) => FTR09-a, FTR09-b and FTR09-c\n [create + scenarios where 2 PMP entries with same pmpaddr\n - one without matching + permissions or with A=OFF\n - one with matching permissions and A=NA4/NAPOT/TOR\n\ + \ - any of them can be the lowest-numbered PMP entry]\nTST51-1\n[configure + 2 PMP entries\n - configure the lowest-numbered PMP entry with (TST11-12, + TST11-22, TST11-32, TST11-42, TST11-52,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST11-15, TST11-25, TST11-35, TST11-45, TST11-55,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST12-12, TST12-22, + TST12-32, TST12-42, TST12-52,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST12-15, TST12-25, TST12-35, TST12-45, TST12-55,\n \ + \ TST13-12, TST13-22, TST13-32, TST13-42, + TST13-52,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST13-15, + TST13-25, TST13-35, TST13-45, TST13-55,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST14-12, TST14-22, TST14-32, TST14-42, TST14-52,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST14-15, TST14-25, + TST14-35, TST14-45, TST14-55,\n \ + \ TST15-12, TST15-22, TST15-32, TST15-42, TST15-52,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST15-15, TST15-25, TST15-35, + TST15-45, TST15-55,\n \t\t\t\t\t\t\t\t\t \t\t\t\t + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST16-15, TST16-25, TST16-35, TST16-45, + TST16-55,\n TST17-12, + TST17-22, TST17-32, TST17-42, TST17-52,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST17-15, TST17-25, TST17-35, TST17-45, TST17-55,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST18-12, TST18-22, + TST18-32, TST18-42, TST18-52,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST18-15, TST18-25, TST18-35, TST18-45, TST18-55)\n - configure + the highest-numbered PMP entry with (TST11-11, TST11-21, TST11-31, TST11-41, + TST11-51,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST11-14, + TST11-24, TST11-34, TST11-44, TST11-54,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST12-11, TST12-21, TST12-31, TST12-41, TST12-51,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST12-14, TST12-24, + TST12-34, TST12-44, TST12-54,\n \ + \ TST13-11, TST13-21, TST13-31, TST13-41, TST13-51,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t\tTST13-14, TST13-24, TST13-34, + TST13-44, TST13-54,\n \t\t\t\t\t\t\t\t\t \t\t\t\t + \tTST14-11, TST14-21, TST14-31, TST14-41, TST14-51,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t\tTST14-14, TST14-24, TST14-34, TST14-44, + TST14-54,\n TST15-11, + TST15-21, TST15-31, TST15-41, TST15-51,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST15-14, TST15-24, TST15-34, TST15-44, TST15-54,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST16-11, TST16-21, + TST16-31, TST16-41, TST16-51,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST16-14, TST16-24, TST16-34, TST16-44, TST16-54)\n - execute + the associated access\n - check associated access-fault exception raised]" +- 005_2_intersecting_entries_succeed: !Subfeature + name: 005_2_intersecting_entries_succeed + tag: VP_PMP_F022_S006 + next_elt_id: 1 + display_order: 5 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F022_S006_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose any 2 PMP entries\n\nCONFIGURATION and ACCESS (Cf. Feature: + \"cfg NAPOT access S/U/M\")\n - for the least-numbered pmp entry, apply + any CONFIGURATION+ACCESS scenario without access-fault\n - for the highest-numbered + pmp entry, apply any CONFIGURATION+ACCESS scenario with access-fault\n \ + \ - make sure the pmp entries address ranges are overlapping/intersecting + (at least at 4 consecutive bytes)\n - for each pmp entry, execute one + access in its associated pmp address region but outside the overlapping/intersecting + address range\n - execute one additional access inside the overlapping/intersecting + address range\n - NB: obviously, pmp entry configurations with different + access-modes (S/U vs. M) cannot be easily mixed in same test\n - NB: + obviously, pmp entry configurations with different mstatus.MPRV/MPP values + cannot be mixed in same test\n\nCHECK\n - for each pmp entry, access + outside the overlapping/intersecting address range should give the expected + CHECK result\n - access inside the overlapping/intersecting address range + should not generate any access-fault\n\nREUSABILITY\n - if possible, + the number of PMP entries (N) is a configurable parameter\n - so a single + test function can be reused" + pfc: 3 + test_type: 4 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST51(group) => FTR09-a, FTR09-b and FTR09-c\n [create + scenarios where 2 PMP entries with same pmpaddr\n - one without matching + permissions or with A=OFF\n - one with matching permissions and A=NA4/NAPOT/TOR\n\ + \ - any of them can be the lowest-numbered PMP entry]\nTST51-2\n[configure + 2 PMP entries\n - configure the lowest-numbered PMP entry with (TST11-11, + TST11-21, TST11-31, TST11-41, TST11-51,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST11-14, TST11-24, TST11-34, TST11-44, TST11-54,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST12-11, TST12-21, + TST12-31, TST12-41, TST12-51,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST12-14, TST12-24, TST12-34, TST12-44, TST12-54,\n \ + \ TST13-11, TST13-21, TST13-31, TST13-41, + TST13-51,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST13-14, + TST13-24, TST13-34, TST13-44, TST13-54,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST14-11, TST14-21, TST14-31, TST14-41, TST14-51,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST14-14, TST14-24, + TST14-34, TST14-44, TST14-54,\n \ + \ TST15-11, TST15-21, TST15-31, TST15-41, TST15-51,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST15-14, TST15-24, TST15-34, + TST15-44, TST15-54,\n \t\t\t\t\t\t\t\t\t \t\t\t\t + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST16-14, TST16-24, TST16-34, TST16-44, + TST16-54)\n - configure the highest-numbered PMP entry with (TST11-12, + TST11-22, TST11-32, TST11-42, TST11-52,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST11-15, TST11-25, TST11-35, TST11-45, TST11-55,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST12-12, TST12-22, + TST12-32, TST12-42, TST12-52,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST12-15, TST12-25, TST12-35, TST12-45, TST12-55,\n \ + \ TST13-12, TST13-22, TST13-32, + TST13-42, TST13-52,\n \t\t\t\t\t\t\t\t\t \t\t\t\t\ + \ TST13-15, TST13-25, TST13-35, TST13-45, TST13-55,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST14-12, TST14-22, TST14-32, TST14-42, + TST14-52,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST14-15, + TST14-25, TST14-35, TST14-45, TST14-55,\n \ + \ TST15-12, TST15-22, TST15-32, TST15-42, TST15-52,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST15-15, TST15-25, + TST15-35, TST15-45, TST15-55,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST16-12, TST16-22, TST16-32, TST16-42, TST16-52,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST16-15, TST16-25, TST16-35, + TST16-45, TST16-55,\n \ + \ TST17-12, TST17-22, TST17-32, TST17-42, TST17-52,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST17-15, TST17-25, TST17-35, TST17-45, + TST17-55,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST18-12, + TST18-22, TST18-32, TST18-42, TST18-52,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST18-15, TST18-25, TST18-35, TST18-45, TST18-55)\n\ + \ - execute the associated access\n - check no access-fault exception]" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP023.yml b/verif/docs/VerifPlans/PMP/VP_IP023.yml new file mode 100644 index 00000000000..b09fcd938aa --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP023.yml @@ -0,0 +1,378 @@ +!Feature +next_elt_id: 6 +name: multi entries TOR +id: 23 +display_order: 23 +subfeatures: !!omap +- 000_1_entry: !Subfeature + name: 000_1_entry + tag: VP_PMP_F023_S001 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F023_S001_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose a single PMP entry\n\nCONFIGURATION and ACCESS\n - + for each pmp entry, apply any CONFIGURATION+ACCESS scenario above (Cf. Feature: + \"cfg TOR access S/U/M\")\n - make sure the pmp entries address ranges + are not overlapping/intersecting\n - NB: obviously, pmp entry configurations + with different mstatus.MPRV/MPP values cannot be mixed in same test\n\n\ + CHECK\n - for each pmp entry, we should obtain the expected CHECK result\n\ + \nREUSABILITY\n - if possible, the number of PMP entries (N) is a configurable + parameter\n - so a single test function can be reused" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST23(group) => \n [create scenarios where PMP entries + with A=1 (TOR) and with/without matching permissions\n - pmpaddr(i−1) + < pmpaddr(i), pmpcfg(i).A=TOR and pmpcfg(i-1) with/without matching permissions\n\ + \ - check only TOR defined addresses are matching]\nTST23-1 = extension + of (TST15-11, TST15-21, TST15-31, TST15-41, TST15-51,\n \ + \ TST15-12, TST15-22, TST15-32, TST15-42, TST15-52,\n \ + \ TST15-13, TST15-23, TST15-33, TST15-43, TST15-53,\n \ + \ TST15-14, TST15-24, TST15-34, TST15-44, TST15-54,\n \ + \ TST15-15, TST15-25, TST15-35, TST15-45, TST15-55,\n\ + \ TST15-16, TST15-26, TST15-36, TST15-46, TST15-56,\n\ + \ TST16-11, TST16-21, TST16-31, TST16-41, TST16-51,\n\ + \ TST16-12, TST16-22, TST16-32, TST16-42, TST16-52,\n\ + \ TST16-13, TST16-23, TST16-33, TST16-43, TST16-53,\n\ + \ TST16-14, TST16-24, TST16-34, TST16-44, TST16-54,\n\ + \ TST16-15, TST16-25, TST16-35, TST16-45, TST16-55,\n\ + \ TST16-16, TST16-26, TST16-36, TST16-46, TST16-56)\n + [configure only one (any, but the first one) PMP entry\n - execute the + chosen kind of access\n - should be same result]" +- 001_2_isolated_entries: !Subfeature + name: 001_2_isolated_entries + tag: VP_PMP_F023_S002 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F023_S002_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose any 2 PMP entries\n\nreuse of VP_PMP_F023_S001_I000 feature + description (Cf. Feature: \"multi entries TOR\")" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST23(group) => \n [create scenarios where PMP entries + with A=1 (TOR) and with/without matching permissions\n - pmpaddr(i−1) + < pmpaddr(i), pmpcfg(i).A=TOR and pmpcfg(i-1) with/without matching permissions\n\ + \ - check only TOR defined addresses are matching]\nTST23-2 = extension + of compatible pair of (TST15-11, TST15-21, TST15-31, TST15-41, TST15-51,\n\ + \ \t\t\t\t\t\t\t\t\t TST15-12, TST15-22, TST15-32, + TST15-42, TST15-52,\n \t\t\t\t\t\t\t\t\t TST15-13, + TST15-23, TST15-33, TST15-43, TST15-53,\n \t\t\t\t + \t\t\t\t\t TST15-14, TST15-24, TST15-34, TST15-44, TST15-54,\n \ + \ \t\t\t\t\t\t\t\t\t TST15-15, TST15-25, TST15-35, TST15-45, + TST15-55,\n \t\t\t\t\t\t\t\t\t TST15-16, TST15-26, + TST15-36, TST15-46, TST15-56,\n \t\t\t\t\t\t\t\t\t + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51,\n \ + \ \t\t\t\t \t\t\t\t\t TST16-12, TST16-22, TST16-32, TST16-42, TST16-52,\n\ + \ \t\t\t\t\t\t\t\t\t TST16-13, TST16-23, TST16-33, + TST16-43, TST16-53,\n \t\t\t\t\t\t\t\t\t TST16-14, + TST16-24, TST16-34, TST16-44, TST16-54,\n \t\t\t\t + \t\t\t\t\t TST16-15, TST16-25, TST16-35, TST16-45, TST16-55,\n \ + \ \t\t\t\t\t\t\t\t\t TST16-16, TST16-26, TST16-36, TST16-46, + TST16-56)\n [configure 2 non-adjacent PMP entries (highest-numbered ones + first) (avoid the first PMP entry)\n - execute the 2 kinds of accesses + (if possible to chain due to potential access-fault exception)\n - should + be same 2 results]" +- 002_N_isolated_entries: !Subfeature + name: 002_N_isolated_entries + tag: VP_PMP_F023_S003 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F023_S003_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose any N PMP entries (2>\n\nTST23(group) => \n [create scenarios where PMP entries + with A=1 (TOR) and with/without matching permissions\n - pmpaddr(i−1) + < pmpaddr(i), pmpcfg(i).A=TOR and pmpcfg(i-1) with/without matching permissions\n\ + \ - check only TOR defined addresses are matching]\nTST23-3 = extension + of compatible group(N) of (TST15-11, TST15-21, TST15-31, TST15-41, TST15-51,\n\ + \ \t\t\t\t\t\t\t\t\t\t\t TST15-12, TST15-22, TST15-32, + TST15-42, TST15-52,\n \t\t\t\t\t\t\t\t\t\t\t TST15-13, + TST15-23, TST15-33, TST15-43, TST15-53,\n \t\t\t\t + \t\t\t\t\t \t\t TST15-14, TST15-24, TST15-34, TST15-44, TST15-54,\n \ + \ \t\t\t\t\t\t\t\t\t\t\t TST15-15, TST15-25, TST15-35, + TST15-45, TST15-55,\n \t\t\t\t\t\t\t\t\t\t\t TST15-16, + TST15-26, TST15-36, TST15-46, TST15-56,\n \t\t\t\t + \t\t\t\t\t \t\t TST16-11, TST16-21, TST16-31, TST16-41, TST16-51,\n \ + \ \t\t\t\t\t\t\t\t\t\t\t TST16-12, TST16-22, TST16-32, + TST16-42, TST16-52,\n \t\t\t\t\t\t\t\t\t\t\t TST16-13, + TST16-23, TST16-33, TST16-43, TST16-53,\n \t\t\t\t + \t\t\t\t\t \t\t TST16-14, TST16-24, TST16-34, TST16-44, TST16-54,\n \ + \ \t\t\t\t\t\t\t\t\t\t\t TST16-15, TST16-25, TST16-35, + TST16-45, TST16-55,\n \t\t\t\t\t\t\t\t\t\t\t TST16-16, + TST16-26, TST16-36, TST16-46, TST16-56)\n[configure N PMP entries (highest-numbered + ones first) (as non-adjacent as possible, and avoid the first PMP entry)\n\ + \ - execute the N kinds of accesses (if possible to chain due to potential + access-fault exception)\n - should be same N results]" +- 003_8_isolated_entries: !Subfeature + name: 003_8_isolated_entries + tag: VP_PMP_F023_S004 + next_elt_id: 1 + display_order: 3 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F023_S004_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose all 8 PMP entries\n\nreuse of VP_PMP_F023_S001_I000 feature + description (Cf. Feature: \"multi entries TOR\")" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST23(group) => \n [create scenarios where PMP entries + with A=1 (TOR) and with/without matching permissions\n - pmpaddr(i−1) + < pmpaddr(i), pmpcfg(i).A=TOR and pmpcfg(i-1) with/without matching permissions\n\ + \ - check only TOR defined addresses are matching]\nTST23-4 = extension + of compatible group(8) of (TST15-11, TST15-21, TST15-31, TST15-41, TST15-51,\n\ + \ \t\t\t\t\t\t\t\t\t\t\t TST15-12, TST15-22, TST15-32, + TST15-42, TST15-52,\n \t\t\t\t\t\t\t\t\t\t\t TST15-13, + TST15-23, TST15-33, TST15-43, TST15-53,\n \t\t\t\t + \t\t\t\t\t \t\t TST15-14, TST15-24, TST15-34, TST15-44, TST15-54,\n \ + \ \t\t\t\t\t\t\t\t\t\t\t TST15-15, TST15-25, TST15-35, + TST15-45, TST15-55,\n \t\t\t\t\t\t\t\t\t\t\t TST15-16, + TST15-26, TST15-36, TST15-46, TST15-56,\n \t\t\t\t + \t\t\t\t\t \t\t TST16-11, TST16-21, TST16-31, TST16-41, TST16-51,\n \ + \ \t\t\t\t\t\t\t\t\t\t\t TST16-12, TST16-22, TST16-32, + TST16-42, TST16-52,\n \t\t\t\t\t\t\t\t\t\t\t TST16-13, + TST16-23, TST16-33, TST16-43, TST16-53,\n \t\t\t\t + \t\t\t\t\t \t\t TST16-14, TST16-24, TST16-34, TST16-44, TST16-54,\n \ + \ \t\t\t\t\t\t\t\t\t\t\t TST16-15, TST16-25, TST16-35, + TST16-45, TST16-55,\n \t\t\t\t\t\t\t\t\t\t\t TST16-16, + TST16-26, TST16-36, TST16-46, TST16-56)\n[configure 8 PMP entries (highest-numbered + ones first)\n - execute the 8 kinds of accesses (if possible to chain due + to potential access-fault exception)\n - should be same 8 results]" +- 004_2_intersecting_entries_fail: !Subfeature + name: 004_2_intersecting_entries_fail + tag: VP_PMP_F023_S005 + next_elt_id: 1 + display_order: 4 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F023_S005_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose any 2 PMP entries\n\nCONFIGURATION and ACCESS (Cf. Feature: + \"cfg TOR access S/U/M\")\n - for the least-numbered pmp entry, apply + any CONFIGURATION+ACCESS scenario with access-fault\n - for the highest-numbered + pmp entry, apply any CONFIGURATION+ACCESS scenario without access-fault\n\ + \ - make sure the pmp entries address ranges are overlapping/intersecting + (at least at 4 consecutive bytes)\n - for each pmp entry, execute one + access in its associated pmp address region but outside the overlapping/intersecting + address range\n - execute one additional access inside the overlapping/intersecting + address range\n - NB: obviously, pmp entry configurations with different + access-modes (S/U vs. M) cannot be easily mixed in same test\n - NB: + obviously, pmp entry configurations with different mstatus.MPRV/MPP values + cannot be mixed in same test\n\nCHECK\n - for each pmp entry, access + outside the overlapping/intersecting address range should give the expected + CHECK result\n - access inside the overlapping/intersecting address range + should generate the access-type related access-fault\n\nREUSABILITY\n \ + \ - if possible, the number of PMP entries (N) is a configurable parameter\n\ + \ - so a single test function can be reused" + pfc: 3 + test_type: 4 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST51(group) => FTR09-a, FTR09-b and FTR09-c\n [create + scenarios where 2 PMP entries with same pmpaddr\n - one without matching + permissions or with A=OFF\n - one with matching permissions and A=NA4/NAPOT/TOR\n\ + \ - any of them can be the lowest-numbered PMP entry]\nTST51-1\n[configure + 2 PMP entries\n - configure the lowest-numbered PMP entry with (TST11-12, + TST11-22, TST11-32, TST11-42, TST11-52,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST11-15, TST11-25, TST11-35, TST11-45, TST11-55,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST12-12, TST12-22, + TST12-32, TST12-42, TST12-52,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST12-15, TST12-25, TST12-35, TST12-45, TST12-55,\n \ + \ TST13-12, TST13-22, TST13-32, TST13-42, + TST13-52,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST13-15, + TST13-25, TST13-35, TST13-45, TST13-55,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST14-12, TST14-22, TST14-32, TST14-42, TST14-52,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST14-15, TST14-25, + TST14-35, TST14-45, TST14-55,\n \ + \ TST15-12, TST15-22, TST15-32, TST15-42, TST15-52,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST15-15, TST15-25, TST15-35, + TST15-45, TST15-55,\n \t\t\t\t\t\t\t\t\t \t\t\t\t + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST16-15, TST16-25, TST16-35, TST16-45, + TST16-55,\n TST17-12, + TST17-22, TST17-32, TST17-42, TST17-52,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST17-15, TST17-25, TST17-35, TST17-45, TST17-55,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST18-12, TST18-22, + TST18-32, TST18-42, TST18-52,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST18-15, TST18-25, TST18-35, TST18-45, TST18-55)\n - configure + the highest-numbered PMP entry with (TST11-11, TST11-21, TST11-31, TST11-41, + TST11-51,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST11-14, + TST11-24, TST11-34, TST11-44, TST11-54,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST12-11, TST12-21, TST12-31, TST12-41, TST12-51,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST12-14, TST12-24, + TST12-34, TST12-44, TST12-54,\n \ + \ TST13-11, TST13-21, TST13-31, TST13-41, TST13-51,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t\tTST13-14, TST13-24, TST13-34, + TST13-44, TST13-54,\n \t\t\t\t\t\t\t\t\t \t\t\t\t + \tTST14-11, TST14-21, TST14-31, TST14-41, TST14-51,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t\tTST14-14, TST14-24, TST14-34, TST14-44, + TST14-54,\n TST15-11, + TST15-21, TST15-31, TST15-41, TST15-51,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST15-14, TST15-24, TST15-34, TST15-44, TST15-54,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST16-11, TST16-21, + TST16-31, TST16-41, TST16-51,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST16-14, TST16-24, TST16-34, TST16-44, TST16-54)\n - execute + the associated access\n - check associated access-fault exception raised]" +- 005_2_intersecting_entries_succeed: !Subfeature + name: 005_2_intersecting_entries_succeed + tag: VP_PMP_F023_S006 + next_elt_id: 1 + display_order: 5 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F023_S006_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose any 2 PMP entries\n\nCONFIGURATION and ACCESS (Cf. Feature: + \"cfg TOR access S/U/M\")\n - for the least-numbered pmp entry, apply + any CONFIGURATION+ACCESS scenario without access-fault\n - for the highest-numbered + pmp entry, apply any CONFIGURATION+ACCESS scenario with access-fault\n \ + \ - make sure the pmp entries address ranges are overlapping/intersecting + (at least at 4 consecutive bytes)\n - for each pmp entry, execute one + access in its associated pmp address region but outside the overlapping/intersecting + address range\n - execute one additional access inside the overlapping/intersecting + address range\n - NB: obviously, pmp entry configurations with different + access-modes (S/U vs. M) cannot be easily mixed in same test\n - NB: + obviously, pmp entry configurations with different mstatus.MPRV/MPP values + cannot be mixed in same test\n\nCHECK\n - for each pmp entry, access + outside the overlapping/intersecting address range should give the expected + CHECK result\n - access inside the overlapping/intersecting address range + should not generate any access-fault\n\nREUSABILITY\n - if possible, + the number of PMP entries (N) is a configurable parameter\n - so a single + test function can be reused" + pfc: 3 + test_type: 4 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST51(group) => FTR09-a, FTR09-b and FTR09-c\n [create + scenarios where 2 PMP entries with same pmpaddr\n - one without matching + permissions or with A=OFF\n - one with matching permissions and A=NA4/NAPOT/TOR\n\ + \ - any of them can be the lowest-numbered PMP entry]\nTST51-2\n[configure + 2 PMP entries\n - configure the lowest-numbered PMP entry with (TST11-11, + TST11-21, TST11-31, TST11-41, TST11-51,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST11-14, TST11-24, TST11-34, TST11-44, TST11-54,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST12-11, TST12-21, + TST12-31, TST12-41, TST12-51,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST12-14, TST12-24, TST12-34, TST12-44, TST12-54,\n \ + \ TST13-11, TST13-21, TST13-31, TST13-41, + TST13-51,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST13-14, + TST13-24, TST13-34, TST13-44, TST13-54,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST14-11, TST14-21, TST14-31, TST14-41, TST14-51,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST14-14, TST14-24, + TST14-34, TST14-44, TST14-54,\n \ + \ TST15-11, TST15-21, TST15-31, TST15-41, TST15-51,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST15-14, TST15-24, TST15-34, + TST15-44, TST15-54,\n \t\t\t\t\t\t\t\t\t \t\t\t\t + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST16-14, TST16-24, TST16-34, TST16-44, + TST16-54)\n - configure the highest-numbered PMP entry with (TST11-12, + TST11-22, TST11-32, TST11-42, TST11-52,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST11-15, TST11-25, TST11-35, TST11-45, TST11-55,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST12-12, TST12-22, + TST12-32, TST12-42, TST12-52,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST12-15, TST12-25, TST12-35, TST12-45, TST12-55,\n \ + \ TST13-12, TST13-22, TST13-32, + TST13-42, TST13-52,\n \t\t\t\t\t\t\t\t\t \t\t\t\t\ + \ TST13-15, TST13-25, TST13-35, TST13-45, TST13-55,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST14-12, TST14-22, TST14-32, TST14-42, + TST14-52,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST14-15, + TST14-25, TST14-35, TST14-45, TST14-55,\n \ + \ TST15-12, TST15-22, TST15-32, TST15-42, TST15-52,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST15-15, TST15-25, + TST15-35, TST15-45, TST15-55,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST16-12, TST16-22, TST16-32, TST16-42, TST16-52,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST16-15, TST16-25, TST16-35, + TST16-45, TST16-55,\n \ + \ TST17-12, TST17-22, TST17-32, TST17-42, TST17-52,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST17-15, TST17-25, TST17-35, TST17-45, + TST17-55,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST18-12, + TST18-22, TST18-32, TST18-42, TST18-52,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST18-15, TST18-25, TST18-35, TST18-45, TST18-55)\n\ + \ - execute the associated access\n - check no access-fault exception]" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP024.yml b/verif/docs/VerifPlans/PMP/VP_IP024.yml new file mode 100644 index 00000000000..824f2ef61d5 --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP024.yml @@ -0,0 +1,200 @@ +!Feature +next_elt_id: 4 +name: multi entries OFF +id: 24 +display_order: 24 +subfeatures: !!omap +- 000_1_entry: !Subfeature + name: 000_1_entry + tag: VP_PMP_F024_S001 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F024_S001_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose a single PMP entry\n\nCONFIGURATION and ACCESS\n - + for each pmp entry, apply any CONFIGURATION+ACCESS scenario above (Cf. Feature: + \"cfg OFF access S/U/M\")\n - make sure the pmp entries address ranges + are not overlapping/intersecting\n - NB: obviously, pmp entry configurations + with different mstatus.MPRV/MPP values cannot be mixed in same test\n\n\ + CHECK\n - for each pmp entry, we should obtain the expected CHECK result\n\ + \nREUSABILITY\n - if possible, the number of PMP entries (N) is a configurable + parameter\n - so a single test function can be reused" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST24(group) => FTR09-g\n [create scenarios where PMP + entries with A=0 (OFF) and with matching permissions\n - check no address + matching for those PMP entries]\n [create scenarios where all PMP entries + with A=0 (OFF) and with matching permissions\n - check no address matching + for all PMP entries]\n [check S or U mode access fails when all A=OFF with + at least one PMP entry implemented] => FTR09-g\nTST24-1 = extension of (TST17-11, + TST17-21, TST17-31, TST17-41, TST17-51,\n TST17-13, + TST17-23, TST17-33, TST17-43, TST17-53,\n TST17-14, + TST17-24, TST17-34, TST17-44, TST17-54,\n TST17-16, + TST17-26, TST17-36, TST17-46, TST17-56,\n TST18-14, + TST18-24, TST18-34, TST18-44, TST18-54, //TODO: M-mode may not raise an + exception\n TST18-16, TST18-26, TST18-36, TST18-46, + TST18-56) //TODO: M-mode may not raise an exception\n \ + \ //TODO: SHOULD WE ADD (TST18-11, TST18-21, TST18-31, TST18-41, TST18-51,\n\ + \ TST18-13, TST18-23, TST18-33, + TST18-43, TST18-53) ?\n[configure only one (any, but the first one) PMP + entry\n - execute the chosen kind of access\n - check appropriate access-fault + exception raised]" +- 001_2_isolated_entries: !Subfeature + name: 001_2_isolated_entries + tag: VP_PMP_F024_S002 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F024_S002_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose any 2 PMP entries\n\nreuse of VP_PMP_F024_S001_I000 feature + description (Cf. Feature: \"multi entries OFF\")" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST24(group) => FTR09-g\n [create scenarios where PMP + entries with A=0 (OFF) and with matching permissions\n - check no address + matching for those PMP entries]\n [create scenarios where all PMP entries + with A=0 (OFF) and with matching permissions\n - check no address matching + for all PMP entries]\n [check S or U mode access fails when all A=OFF with + at least one PMP entry implemented] => FTR09-g\nTST24-2 = extension of compatible + pair of (TST17-11, TST17-21, TST17-31, TST17-41, TST17-51,\n \ + \ \t\t\t\t\t\t\t\t\t TST17-13, TST17-23, TST17-33, TST17-43, + TST17-53,\n \t\t\t\t\t\t\t\t\t TST17-14, TST17-24, + TST17-34, TST17-44, TST17-54,\n \t\t\t\t\t\t\t\t + \t TST17-16, TST17-26, TST17-36, TST17-46, TST17-56,\n \ + \ \t\t\t\t\t\t\t\t\t TST18-14, TST18-24, TST18-34, TST18-44, TST18-54, + //TODO: M-mode may not raise an exception\n \t\t + \t\t\t\t\t\t\t TST18-16, TST18-26, TST18-36, TST18-46, TST18-56) //TODO: + M-mode may not raise an exception\n //TODO: SHOULD + WE ADD (TST18-11, TST18-21, TST18-31, TST18-41, TST18-51,\n \ + \ TST18-13, TST18-23, TST18-33, TST18-43, + TST18-53) ?\n[configure 2 non-adjacent PMP entries (highest-numbered ones + first) (avoid the first PMP entry)\n - execute the 2 kinds of accesses + (if possible to chain due to access-fault)\n - check 2 appropriate access-fault + exceptions raised]" +- 002_N_isolated_entries: !Subfeature + name: 002_N_isolated_entries + tag: VP_PMP_F024_S003 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F024_S003_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose any N PMP entries (2>\n\nTST24(group) => FTR09-g\n [create scenarios where PMP + entries with A=0 (OFF) and with matching permissions\n - check no address + matching for those PMP entries]\n [create scenarios where all PMP entries + with A=0 (OFF) and with matching permissions\n - check no address matching + for all PMP entries]\n [check S or U mode access fails when all A=OFF with + at least one PMP entry implemented] => FTR09-g\nTST24-3 = extension of compatible + group(N) of (TST17-11, TST17-21, TST17-31, TST17-41, TST17-51,\n \ + \ \t\t\t\t\t\t\t\t\t\t TST17-13, TST17-23, TST17-33, TST17-43, + TST17-53,\n \t\t\t\t\t\t\t\t\t\t TST17-14, TST17-24, + TST17-34, TST17-44, TST17-54,\n \t\t\t\t\t\t\t\t + \t\t TST17-16, TST17-26, TST17-36, TST17-46, TST17-56,\n \ + \ \t\t\t\t\t\t\t\t\t\t TST18-14, TST18-24, TST18-34, TST18-44, + TST18-54, //TODO: M-mode may not raise an exception\n \ + \ \t\t\t\t\t\t\t\t\t\t TST18-16, TST18-26, TST18-36, TST18-46, TST18-56) + //TODO: M-mode may not raise an exception\n //TODO: + SHOULD WE ADD (TST18-11, TST18-21, TST18-31, TST18-41, TST18-51,\n \ + \ TST18-13, TST18-23, TST18-33, + TST18-43, TST18-53) ?\n[configure N PMP entries (highest-numbered ones first) + (as non-adjacent as possible, and avoid the first PMP entry)\n - execute + the N kinds of accesses (if possible to chain due to access-fault)\n - + check N appropriate access-fault exceptions raised]" +- 003_8_isolated_entries: !Subfeature + name: 003_8_isolated_entries + tag: VP_PMP_F024_S004 + next_elt_id: 1 + display_order: 3 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F024_S004_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose all 8 PMP entries\n\nreuse of VP_PMP_F024_S001_I000 feature + description (Cf. Feature: \"multi entries OFF\")" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST24(group) => FTR09-g\n [create scenarios where PMP + entries with A=0 (OFF) and with matching permissions\n - check no address + matching for those PMP entries]\n [create scenarios where all PMP entries + with A=0 (OFF) and with matching permissions\n - check no address matching + for all PMP entries]\n [check S or U mode access fails when all A=OFF with + at least one PMP entry implemented] => FTR09-g\nTST24-4 = extension of compatible + group(8) of (TST17-11, TST17-21, TST17-31, TST17-41, TST17-51,\n \ + \ \t\t\t\t\t\t\t\t\t\t\t TST17-13, TST17-23, TST17-33, TST17-43, + TST17-53,\n \t\t\t\t\t\t\t\t\t\t\t TST17-14, TST17-24, + TST17-34, TST17-44, TST17-54,\n \t\t\t\t\t\t\t\t\t + \t\t TST17-16, TST17-26, TST17-36, TST17-46, TST17-56,\n \ + \ \t\t\t\t\t\t\t\t\t\t\t TST18-14, TST18-24, TST18-34, TST18-44, + TST18-54, //TODO: M-mode may not raise an exception\n \ + \ \t\t\t\t\t\t\t\t\t\t\t TST18-16, TST18-26, TST18-36, TST18-46, TST18-56) + //TODO: M-mode may not raise an exception\n //TODO: + SHOULD WE ADD (TST18-11, TST18-21, TST18-31, TST18-41, TST18-51,\n \ + \ TST18-13, TST18-23, TST18-33, + TST18-43, TST18-53) ?\n[configure 8 PMP entries (highest-numbered ones first)\n\ + \ - execute the 8 kinds of accesses (if possible to chain due to access-fault)\n\ + \ - check 8 appropriate access-fault exceptions raised]" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP025.yml b/verif/docs/VerifPlans/PMP/VP_IP025.yml new file mode 100644 index 00000000000..db3587a8b3b --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP025.yml @@ -0,0 +1,290 @@ +!Feature +next_elt_id: 6 +name: multi entries ALL +id: 25 +display_order: 25 +subfeatures: !!omap +- 000_1_entry: !Subfeature + name: 000_1_entry + tag: VP_PMP_F025_S001 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F025_S001_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose a single PMP entry\n\nCONFIGURATION and ACCESS\n - + for each pmp entry, apply any CONFIGURATION+ACCESS scenario above (Cf. Feature: + \"cfg NA4/NAPOT/TOR/OFF access S/U/M\")\n - make sure the pmp entries + address ranges are not overlapping/intersecting\n - NB: obviously, pmp + entry configurations with different mstatus.MPRV/MPP values cannot be mixed + in same test\n\nCHECK\n - for each pmp entry, we should obtain the expected + CHECK result\n\nREUSABILITY\n - if possible, the number of PMP entries + (N) is a configurable parameter\n - so a single test function can be + reused" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 001_2_isolated_entries: !Subfeature + name: 001_2_isolated_entries + tag: VP_PMP_F025_S002 + next_elt_id: 1 + display_order: 1 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F025_S002_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose any 2 PMP entries\n\nreuse of VP_PMP_F025_S001_I000 feature + description (Cf. Feature: \"multi entries ALL\")" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +- 002_N_isolated_entries: !Subfeature + name: 002_N_isolated_entries + tag: VP_PMP_F025_S003 + next_elt_id: 1 + display_order: 2 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F025_S003_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose any N PMP entries (2>\n\nTST51(group) => FTR09-a, FTR09-b and FTR09-c\n [create + scenarios where 2 PMP entries with same pmpaddr\n - one without matching + permissions or with A=OFF\n - one with matching permissions and A=NA4/NAPOT/TOR\n\ + \ - any of them can be the lowest-numbered PMP entry]\nTST51-1\n[configure + 2 PMP entries\n - configure the lowest-numbered PMP entry with (TST11-12, + TST11-22, TST11-32, TST11-42, TST11-52,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST11-15, TST11-25, TST11-35, TST11-45, TST11-55,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST12-12, TST12-22, + TST12-32, TST12-42, TST12-52,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST12-15, TST12-25, TST12-35, TST12-45, TST12-55,\n \ + \ TST13-12, TST13-22, TST13-32, TST13-42, + TST13-52,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST13-15, + TST13-25, TST13-35, TST13-45, TST13-55,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST14-12, TST14-22, TST14-32, TST14-42, TST14-52,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST14-15, TST14-25, + TST14-35, TST14-45, TST14-55,\n \ + \ TST15-12, TST15-22, TST15-32, TST15-42, TST15-52,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST15-15, TST15-25, TST15-35, + TST15-45, TST15-55,\n \t\t\t\t\t\t\t\t\t \t\t\t\t + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST16-15, TST16-25, TST16-35, TST16-45, + TST16-55,\n TST17-12, + TST17-22, TST17-32, TST17-42, TST17-52,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST17-15, TST17-25, TST17-35, TST17-45, TST17-55,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST18-12, TST18-22, + TST18-32, TST18-42, TST18-52,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST18-15, TST18-25, TST18-35, TST18-45, TST18-55)\n - configure + the highest-numbered PMP entry with (TST11-11, TST11-21, TST11-31, TST11-41, + TST11-51,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST11-14, + TST11-24, TST11-34, TST11-44, TST11-54,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST12-11, TST12-21, TST12-31, TST12-41, TST12-51,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST12-14, TST12-24, + TST12-34, TST12-44, TST12-54,\n \ + \ TST13-11, TST13-21, TST13-31, TST13-41, TST13-51,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t\tTST13-14, TST13-24, TST13-34, + TST13-44, TST13-54,\n \t\t\t\t\t\t\t\t\t \t\t\t\t + \tTST14-11, TST14-21, TST14-31, TST14-41, TST14-51,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t\tTST14-14, TST14-24, TST14-34, TST14-44, + TST14-54,\n TST15-11, + TST15-21, TST15-31, TST15-41, TST15-51,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST15-14, TST15-24, TST15-34, TST15-44, TST15-54,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST16-11, TST16-21, + TST16-31, TST16-41, TST16-51,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST16-14, TST16-24, TST16-34, TST16-44, TST16-54)\n - execute + the associated access\n - check associated access-fault exception raised]" +- 005_2_intersecting_entries_succeed: !Subfeature + name: 005_2_intersecting_entries_succeed + tag: VP_PMP_F025_S006 + next_elt_id: 1 + display_order: 5 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F025_S006_I000 + description: "{Page 57 Section \"3.7.1 Physical Memory Protection CSRs\" Volume + II: RISC-V Privileged Architectures V20211203}\n\nUp to 64 PMP entries are + supported" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "choose any 2 PMP entries\n\nCONFIGURATION and ACCESS (Cf. Feature: + \"cfg NA4/NAPOT/TOR/OFF access S/U/M\")\n - for the least-numbered pmp + entry, apply any CONFIGURATION+ACCESS scenario without access-fault\n \ + \ - for the highest-numbered pmp entry, apply any CONFIGURATION+ACCESS + scenario with access-fault\n - make sure the pmp entries address ranges + are overlapping/intersecting (at least at 4 consecutive bytes)\n - for + each pmp entry, execute one access in its associated pmp address region + but outside the overlapping/intersecting address range\n - execute one + additional access inside the overlapping/intersecting address range\n \ + \ - NB: obviously, pmp entry configurations with different access-modes + (S/U vs. M) cannot be easily mixed in same test\n - NB: obviously, pmp + entry configurations with different mstatus.MPRV/MPP values cannot be mixed + in same test\n\nCHECK\n - for each pmp entry, access outside the overlapping/intersecting + address range should give the expected CHECK result\n - access inside + the overlapping/intersecting address range should not generate any access-fault\n\ + \nREUSABILITY\n - if possible, the number of PMP entries (N) is a configurable + parameter\n - so a single test function can be reused" + pfc: 3 + test_type: 4 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: "<< link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt + files (not up-to-date) : reading below not mandatory but may help for better + understanding >>\n\nTST51(group) => FTR09-a, FTR09-b and FTR09-c\n [create + scenarios where 2 PMP entries with same pmpaddr\n - one without matching + permissions or with A=OFF\n - one with matching permissions and A=NA4/NAPOT/TOR\n\ + \ - any of them can be the lowest-numbered PMP entry]\nTST51-2\n[configure + 2 PMP entries\n - configure the lowest-numbered PMP entry with (TST11-11, + TST11-21, TST11-31, TST11-41, TST11-51,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST11-14, TST11-24, TST11-34, TST11-44, TST11-54,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST12-11, TST12-21, + TST12-31, TST12-41, TST12-51,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST12-14, TST12-24, TST12-34, TST12-44, TST12-54,\n \ + \ TST13-11, TST13-21, TST13-31, TST13-41, + TST13-51,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST13-14, + TST13-24, TST13-34, TST13-44, TST13-54,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST14-11, TST14-21, TST14-31, TST14-41, TST14-51,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST14-14, TST14-24, + TST14-34, TST14-44, TST14-54,\n \ + \ TST15-11, TST15-21, TST15-31, TST15-41, TST15-51,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST15-14, TST15-24, TST15-34, + TST15-44, TST15-54,\n \t\t\t\t\t\t\t\t\t \t\t\t\t + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST16-14, TST16-24, TST16-34, TST16-44, + TST16-54)\n - configure the highest-numbered PMP entry with (TST11-12, + TST11-22, TST11-32, TST11-42, TST11-52,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST11-15, TST11-25, TST11-35, TST11-45, TST11-55,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST12-12, TST12-22, + TST12-32, TST12-42, TST12-52,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST12-15, TST12-25, TST12-35, TST12-45, TST12-55,\n \ + \ TST13-12, TST13-22, TST13-32, + TST13-42, TST13-52,\n \t\t\t\t\t\t\t\t\t \t\t\t\t\ + \ TST13-15, TST13-25, TST13-35, TST13-45, TST13-55,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST14-12, TST14-22, TST14-32, TST14-42, + TST14-52,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST14-15, + TST14-25, TST14-35, TST14-45, TST14-55,\n \ + \ TST15-12, TST15-22, TST15-32, TST15-42, TST15-52,\n\ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST15-15, TST15-25, + TST15-35, TST15-45, TST15-55,\n \t\t\t\t\t\t\t\t\t + \t\t\t\t TST16-12, TST16-22, TST16-32, TST16-42, TST16-52,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST16-15, TST16-25, TST16-35, + TST16-45, TST16-55,\n \ + \ TST17-12, TST17-22, TST17-32, TST17-42, TST17-52,\n \ + \ \t\t\t\t\t\t\t\t\t \t\t\t\t TST17-15, TST17-25, TST17-35, TST17-45, + TST17-55,\n \t\t\t\t\t\t\t\t\t \t\t\t\t TST18-12, + TST18-22, TST18-32, TST18-42, TST18-52,\n \t\t\t\t + \t\t\t\t\t \t\t\t\t TST18-15, TST18-25, TST18-35, TST18-45, TST18-55)\n\ + \ - execute the associated access\n - check no access-fault exception]" +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/VP_IP031.yml b/verif/docs/VerifPlans/PMP/VP_IP031.yml new file mode 100644 index 00000000000..45ff1790a9a --- /dev/null +++ b/verif/docs/VerifPlans/PMP/VP_IP031.yml @@ -0,0 +1,51 @@ +!Feature +next_elt_id: 1 +name: entry reconfiguration +id: 31 +display_order: 31 +subfeatures: !!omap +- 000_reconfigure_N_pmp_entries: !Subfeature + name: 000_reconfigure_N_pmp_entries + tag: VP_PMP_F031_S001 + next_elt_id: 1 + display_order: 0 + items: !!omap + - '000': !VerifItem + name: '000' + tag: VP_PMP_F031_S001_I000 + description: "reuse of feature descriptions (Cf. Feature: \"cfg NA4/NAPOT/TOR/OFF + access S/U/M\")\nreuse of feature descriptions (Cf. Feature: \"CSRs M-mode + only\")\nreuse of feature descriptions (Cf. Feature: \"CSRs locked access\"\ + )\nreuse of feature descriptions (Cf. Feature: \"multi entries NA4/NAPOT/TOR/OFF\"\ + )" + reqt_doc: '' + ref_mode: page + ref_page: '' + ref_section: '' + ref_viewer: firefox + verif_goals: "configure any N PMP entries, possibly some with L=1\n\nCONFIGURATION + and ACCESS\n - for each pmp entry, apply any CONFIGURATION+ACCESS scenario + above (Cf. Feature: \"cfg NA4/NAPOT/TOR/OFF access S/U/M\")\n - make + sure the pmp entries address ranges are not overlapping/intersecting\n \ + \ - NB: obviously, pmp entry configurations with different mstatus.MPRV/MPP + values cannot be mixed in same test\n\nRECONFIGURATION and ACCESS\n - + for each pmp entry with L=0, apply any other CONFIGURATION+ACCESS scenario + above (Cf. Feature: \"cfg NA4/NAPOT/TOR/OFF access S/U/M\")\n - make + sure the pmp entries address ranges are not overlapping/intersecting\n \ + \ - NB: obviously, pmp entry configurations with different mstatus.MPRV/MPP + values cannot be mixed in same test\n\nRESET\n - if there is any pmp + entry with L=1, apply hart reset (or only PMP reset if possible)\n - + and restart with CONFIGURATION and RESET\n\nCHECK\n - for each pmp entry, + we should obtain the expected CHECK result\n\nREUSABILITY\n - if possible, + the number of PMP entries (N) is a configurable parameter\n - so a single + test function can be reused" + pfc: 3 + test_type: 3 + cov_method: 1 + cores: -1 + coverage_loc: '' + comments: '' +vptool_gitrev: '$Id: a8b561f68549658061625891c533e7d45996bc9e $' +io_fmt_gitrev: '$Id: 61ab4e53ca49e21d56c416f0af0fa04d148e8001 $' +config_gitrev: '$Id: 5192fced2cfa10be5e18e827922e31e7489ed987 $' +ymlcfg_gitrev: '$Id: ce5e73bd5e8e0099334cb657afb7a624a99afbda $' diff --git a/verif/docs/VerifPlans/PMP/pmp_verif_plan.txt b/verif/docs/VerifPlans/PMP/pmp_verif_plan.txt new file mode 100644 index 00000000000..ea860b601c0 --- /dev/null +++ b/verif/docs/VerifPlans/PMP/pmp_verif_plan.txt @@ -0,0 +1,1739 @@ +/////////////////////////////////////////////////////////////////////////////////// +INITIAL VERIF PLAN (cv32a6_embedded_copro): list of memory regions +/////////////////////////////////////////////////////////////////////////////////// + + + +Check no LSU Fault/Exception and correct access propagation +- LOAD+STORE allowed ahb_periph regions +- LOAD allowed D-scratchpad +- LOAD+STORE allowed I-scratchpad (preload mode) +- LOAD+STORE allowed D-$ +- LOAD+STORE system memory + +Check no FETCH Fault/Exception and correct access propagation +- FETCH allowed I-$ +- FETCH allowed I-scratchpad (functional mode) +- FETCH system memory + +Check LSU Fault/Exception and NO access propagation +- LOAD+STORE disabled ahb_periph (if enabling/disabling still specified) +- LOAD+STORE forbidden ahb_periph regions (if definable) +- LOAD+STORE disabled D-scratchpad (if enabling/disabling still specified) +- LOAD forbidden D-scratchpad (if definable) +- STORE D-scratchpad (maybe not PMP related, but structurally forbidden) +- LOAD+STORE disabled I-scratchpad (if enabling/disabling still specified) +- LOAD+STORE I-scratchpad (functional mode) (maybe not PMP related, but structurally forbidden) +- LOAD+STORE forbidden I-scratchpad (if definable) +- LOAD+STORE forbidden D-$ (if definable) +- LOAD+STORE I-$ (inexistent path) +- LOAD+STORE unallocated System Memory (inexistent path) + +Check FETCH Fault/Exception and NO access propagation +- FETCH forbidden I-$ (if definable) +- FETCH disabled I-scratchpad (if enabling/disabling still specified) +- FETCH I-scratchpad (preload mode) +- FETCH forbidden I-scratchpad (if definable) +- FETCH D-scratchpad (inexistent path) (not PMP related) +- FETCH ahb_periph (inexistent path) (not PMP related) +- FETCH unallocated System Memory (inexistent path) (not PMP related) + + + +/////////////////////////////////////////////////////////////////////////////////// +ADDITIONAL VERIF PLAN +/////////////////////////////////////////////////////////////////////////////////// + +[we assume there is only 1 hart in cv32a6] + +[we assume MXLEN is always 32bits] + +[we assume XLEN=MXLEN=32, so the PMP address registers are XLEN bits long, so no zero-extension needed] + +[we assume there is no region with hardwired privileges in PMP] + +[we assume the PMP granularity is 4 bytes (G=0)] + +[we assume there are 8 HW implemented PMP entries] + +[we assume no virtual memory is implemented] +[we assume page-based virtual memory is not implemented] + +[we assume the list of all physical memory regions] + - system memory regions + - I-$ + - D-$ + - I-scratchpad (preload mode) + - I-scratchpad (functional mode) + - D-scratchpad + - ahb_periph + +[check the role/definitions of mstatus.MPRV and mstatus.MPP later] //TODO + +[we assume an already written PMP entry (i) can be disabled + - if L=0, by clearing pmpcfg(i) + - if L=1, only by hart reset] + +//////////////////////////// + +TB01 => FTR01-h +[check that all violations are trapped at the processor] +[any time there is an access-fault type, check it matches the access-type] + +//TODO: TB02 +Determine how to use SV to factorize the similar tests + +//////////////////////////// + +TST01 (HIGH-PRIO) => FTR07-b +[determine the PMP granularity 2^(G+2) bytes by writing zero to pmp(0)cfg, then writing all ones to pmpaddr(0), then reading back pmpaddr(0). G is the index G of the least-significant bit set] + +TST02(group) => FTR02-d + [check that all 8 HW implemented PMP entries are writable/readable in M-mode (L=0)] + [check that no HW implemented PMP entry are writable/readable in S or U modes (L=0)] + - random values may be used + - before any configuration (after hart reset), check all pmp(i)cfg and pmpaddr(i) are M-mode read zero +TST02-1 (HIGH-PRIO) +[configure 1 PMP entry ([FTR02-b1]: maybe mandatorily the first one): with L=0, + - if possible, the PMP entry number is a configurable parameter + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes] +TST02-2 (LOW-PRIO) = 2 times reuse/call of TST02-1 +[configure 2 PMP entries ([FTR02-b1]: maybe mandatorily the 2 first ones): both with L=0, + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes] +TST02-3 (LOW-PRIO) = N times reuse/call of TST02-1 +[configure N PMP entries ([FTR02-b1]: maybe mandatorily the N first ones): all with L=0, + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes] +TST02-4 (HIGH-PRIO) = 8 times reuse/call of TST02-1 +[configure 8 PMP entries: all with L=0, + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes] + +TST03(group) => FTR08-a and FTR08-b + [check that HW implemented PMP entries are not writable/readable in M-mode (L=1)] + [check that no HW implemented PMP entry are writable/readable in S or U modes (L=1)] + - before any configuration, check all pmp(i)cfg and pmpaddr(i) are M-mode read zero + - configure PMP entry (i) with L=1 (or 0): pmp(i)cfg and pmpaddr(i) maybe random values + - execute following tests specific checks + - check only hart reset unlocks all => FTR08-b + - check reset values: all pmp(i)cfg and pmpaddr(i) are M-mode read zero +TST03-1 (HIGH-PRIO) +[configure 1 PMP entry ([FTR02-b1]: maybe mandatorily the first one): with L=1, + - if possible, the PMP entry number is a configurable parameter + - if possible, L value is a configurable parameter + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever the SW mode => FTR08-a + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes] +TST03-2 (LOW-PRIO) = 2 times reuse/call of TST02-1 +[configure 2 PMP entries ([FTR02-b1]: maybe mandatorily the 2 first ones): both with L=1, + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever the SW mode => FTR08-a + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes] +TST03-3 (HIGH-PRIO) = 2 times reuse/call of TST02-1 +[configure 2 PMP entries ([FTR02-b1]: maybe mandatorily the 2 first ones): one with L=1 and one with L=0, + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever the SW mode => FTR08-a + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes + - check locked PMP entry (i) has no effect on unlocked PMP entry (j) + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes] +TST03-4 (LOW-PRIO) = N times reuse/call of TST02-1 +[configure N PMP entries ([FTR02-b1]: maybe mandatorily the N first ones): at least one with L=1 and one with L=0, + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever the SW mode => FTR08-a + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes + - check locked PMP entry (i) has no effect on unlocked PMP entry (j) + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes] +TST03-5 (HIGH-PRIO) = 8 times reuse/call of TST02-1 +[configure 8 PMP entries: at least one with L=1 and one with L=0, + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever the SW mode => FTR08-a + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes + - check locked PMP entry (i) has no effect on unlocked PMP entry (j) + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes] + +TST04 => FTR02-b1 and FTR02-b2 + [check if the lowest-numbered PMP CSRs must be programmed first before programming higher-numbered ones] +TST04-1 (LOW-PRIO) extends TST02-1 +[configure any PMP entry, but the first one + - check for configured PMP entry (i), pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for not configured PMP entry (i), pmp(i)cfg and pmpaddr(i) are M-mode read zero] +TST04-2 (HIGH-PRIO) extends TST02-2 +[configure 2 non-adjacent PMP entries (highest-numbered ones first) (avoid the first PMP entry) + - check for configured PMP entry (i), pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for not configured PMP entry (i), pmp(i)cfg and pmpaddr(i) are M-mode read zero] +TST04-3 (LOW-PRIO) extends TST02-3 +[configure N PMP entries (highest-numbered ones first) (as non-adjacent as possible, and avoid the first PMP entry) + - check for configured PMP entry (i), pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for not configured PMP entry (i), pmp(i)cfg and pmpaddr(i) are M-mode read zero] +TST04-4 (HIGH-PRIO) extends TST02-4 +[configure 8 PMP entries (highest-numbered ones first) + - check for configured PMP entry (i), pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only] + +TST05 => FTR01-c and FTR01-c-extended + [check all regions are configurable in M-mode to make sure none is hardwired] + [regions hardwired privileges might only ever be visible in M-mode] +TST05-1 (HIGH-PRIO) extends TST02-4 + - check the written pmp(i)cfg and pmpaddr(i) values can be read exactly the same as written +TST05-2 (LOW-PRIO) extends TST03-5 + - check the written pmp(i)cfg and pmpaddr(i) values can be read exactly the same as written (before hart reset) + +TST06 => FTR04-a +[PMP CSR fields are WARL: PMP entry combinations with R=0 and W=1 are reserved/can’t be read] +[permissions fields could be randomly written; should we try randomization ?] +TST06-1 (HIGH-PRIO) extends TST02-4 + - write totally random values to pmp(i)cfg and pmpaddr(i) + - check all pmp(i)cfg and pmpaddr(i) can be read exactly the same as written except for the reserved combinations with R=0 and W=1 +TST06-2 (LOW-PRIO) extends TST03-5 + - write totally random values to pmp(i)cfg and pmpaddr(i) + - check all pmp(i)cfg and pmpaddr(i) can be read exactly the same as written except for the reserved combinations with R=0 and W=1 (before hart reset) + +//////////////////////////// + +TST10-1 (HIGH-PRIO) => FTR09-e +[check M-mode access succeeds if no PMP entry matches] +TST10-2 (HIGH-PRIO) => FTR09-e-question +[check M-mode access succeeds if no PMP entry defined] + +TST10-3 (HIGH-PRIO) => FTR09-f +[check S or U mode access fails when no PMP entry matching and at least one PMP entry implemented] +TST10-4 (HIGH-PRIO) => FTR09-f-question +[check S or U mode access fails when no PMP entry implemented] + +//////////////////////////// + +TST11-1x(group) => FTR01-d + [PMP check on instruction fetch where effective privilege mode is S or U: + - choose an executable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access instruction fetch in S and U mode] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] +TST11-11 (HIGH-PRIO) +[with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with execute permissions for the PMP region + - fetch an instruction from that region (with exact address-matching) + - check no access-fault exception] +TST11-12 (MEDIUM-PRIO) +[with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry without execute permissions for the PMP region + - fetch an instruction from that region (with exact address-matching) + - check instruction fetch access-fault exception raised => FTR04-b] +TST11-13 (MEDIUM-PRIO) +[with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with execute permissions for the PMP region + - fetch an instruction from outside all PMP defined regions + - check instruction fetch access-fault exception raised] +TST11-14 (LOW-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with execute permissions for the PMP region + - fetch an instruction from that region (with exact address-matching) + - check no access-fault exception] +TST11-15 (LOW-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without execute permissions for the PMP region + - fetch an instruction from that region (with exact address-matching) + - check instruction fetch access-fault exception raised => FTR04-b] +TST11-16 (LOW-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with execute permissions for the PMP region + - fetch an instruction from outside all PMP defined regions + - check instruction fetch access-fault exception raised] + +--------------------------- + +TST11-2x(group) => FTR01-d + [PMP check on load or load-reserved instruction where effective privilege mode is S or U: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in S and U mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] +TST11-21 (HIGH-PRIO) +[with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +TST11-22 (MEDIUM-PRIO) +[with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry without read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check load access-fault exception raised => FTR04-c] +TST11-23 (MEDIUM-PRIO) +[with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from outside all PMP defined regions + - check load access-fault exception raised] +TST11-24 (LOW-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +TST11-25 (LOW-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check load access-fault exception raised => FTR04-c] +TST11-26 (LOW-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from outside all PMP defined regions + - check load access-fault exception raised] + +--------------------------- + +TST11-3x(group) => FTR01-d + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is S or U: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in S and U mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] +TST11-31 (HIGH-PRIO) +[with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +TST11-32 (MEDIUM-PRIO) +[with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry without write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check store access-fault exception raised => FTR04-d] +TST11-33 (MEDIUM-PRIO) +[with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + - check store access-fault exception raised] +TST11-34 (LOW-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +TST11-35 (LOW-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check store access-fault exception raised => FTR04-d] +TST11-36 (LOW-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + - check store access-fault exception raised] + +--------------------------- + +TST11-4x(group) => FTR01-d + [PMP check on load or load-reserved instruction where effective privilege mode is S or U: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] +TST11-41 (LOWEST-PRIO) +[with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +TST11-42 (LOWEST-PRIO) +[with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry without read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check load access-fault exception raised => FTR04-c] +TST11-43 (LOWEST-PRIO) +[with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from outside all PMP defined regions + - check load access-fault exception raised] +TST11-44 (LOWEST-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +TST11-45 (LOWEST-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check load access-fault exception raised => FTR04-c] +TST11-46 (LOWEST-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from outside all PMP defined regions + - check load access-fault exception raised] + +--------------------------- + +TST11-5x(group) => FTR01-d + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is S or U: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] +TST11-51 (LOWEST-PRIO) +[with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +TST11-52 (LOWEST-PRIO) +[with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry without write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check store access-fault exception raised => FTR04-d] +TST11-53 (LOWEST-PRIO) +[with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + - check store access-fault exception raised] +TST11-54 (LOWEST-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +TST11-55 (LOWEST-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check store access-fault exception raised => FTR04-d] +TST11-56 (LOWEST-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + - check store access-fault exception raised] + +//////////////////////////// + +TST12-1x(group) => FTR01-f + [PMP check on instruction fetch where effective privilege mode is M: + - choose an executable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access instruction fetch in M mode] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] +TST12-11 (LOW-PRIO) +[with L=0 => FTR08-e2-1 (refers to FTR09-d1), + - configure the PMP entry with execute permissions for the PMP region + - fetch an instruction from that region (with exact address-matching) + - check no access-fault exception] +TST12-12 (LOW-PRIO) +[with L=0 => FTR08-e2-1 (refers to FTR09-d1), + - configure the PMP entry without execute permissions for the PMP region + - fetch an instruction from that region (with exact address-matching) + - check no access-fault exception] +TST12-13 (LOW-PRIO) +[with L=0 => FTR08-e2-1 (refers to FTR09-d1), + - configure the PMP entry with execute permissions for the PMP region + - fetch an instruction from outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED +TST12-14 (HIGH-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with execute permissions for the PMP region + - fetch an instruction from that region (with exact address-matching) + - check no access-fault exception] +TST12-15 (MEDIUM-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without execute permissions for the PMP region + - fetch an instruction from that region (with exact address-matching) + - check instruction fetch access-fault exception raised => FTR04-b] +TST12-16 (HIGH-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with execute permissions for the PMP region + - fetch an instruction from outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED + +--------------------------- + +TST12-2x(group) => FTR01-f + [PMP check on load or load-reserved instruction where effective privilege mode is M: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in M mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] +TST12-21 (LOW-PRIO) +[with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +TST12-22 (LOW-PRIO) +[with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry without read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +TST12-23 (LOW-PRIO) +[with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED +TST12-24 (HIGH-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +TST12-25 (MEDIUM-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check load access-fault exception raised => FTR04-c] +TST12-26 (HIGH-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED + +--------------------------- + +TST12-3x(group) => FTR01-f + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is M: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in M mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] +TST12-31 (LOW-PRIO) +[with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +TST12-32 (LOW-PRIO) +[with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry without write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +TST12-33 (LOW-PRIO) +[with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED +TST12-34 (HIGH-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +TST12-35 (MEDIUM-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check store access-fault exception raised => FTR04-d] +TST12-36 (HIGH-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED + +--------------------------- + +TST12-4x(group) => FTR01-f + [PMP check on load or load-reserved instruction where effective privilege mode is M: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] +TST12-41 (LOWEST-PRIO) +[with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +TST12-42 (LOWEST-PRIO) +[with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry without read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +TST12-43 (LOWEST-PRIO) +[with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED +TST12-44 (LOWEST-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +TST12-45 (LOWEST-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check load access-fault exception raised => FTR04-c] +TST12-46 (LOWEST-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED + +--------------------------- + +TST12-5x(group) => FTR01-f + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is M: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] +TST12-51 (LOWEST-PRIO) +[with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +TST12-52 (LOWEST-PRIO) +[with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry without write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +TST12-53 (LOWEST-PRIO) +[with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED +TST12-54 (LOWEST-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +TST12-55 (LOWEST-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check store access-fault exception raised => FTR04-d] +TST12-56 (LOWEST-PRIO) +[with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED + +//////////////////////////// +//TODO: complete specificities for A=NAPOT + +TST13-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=NAPOT] +TST13-11 (HIGH-PRIO) + [same as TST11-11(group), but with pmpcfg(i).A=NAPOT] +TST13-12 (MEDIUM-PRIO) + [same as TST11-12(group), but with pmpcfg(i).A=NAPOT] +TST13-13 (MEDIUM-PRIO) + [same as TST11-13(group), but with pmpcfg(i).A=NAPOT] +TST13-14 (LOW-PRIO) + [same as TST11-14(group), but with pmpcfg(i).A=NAPOT] +TST13-15 (LOW-PRIO) + [same as TST11-15(group), but with pmpcfg(i).A=NAPOT] +TST13-16 (LOW-PRIO) + [same as TST11-16(group), but with pmpcfg(i).A=NAPOT] + +--------------------------- + +TST13-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=NAPOT] +TST13-21 (HIGH-PRIO) + [same as TST11-21(group), but with pmpcfg(i).A=NAPOT] +TST13-22 (MEDIUM-PRIO) + [same as TST11-22(group), but with pmpcfg(i).A=NAPOT] +TST13-23 (MEDIUM-PRIO) + [same as TST11-23(group), but with pmpcfg(i).A=NAPOT] +TST13-24 (LOW-PRIO) + [same as TST11-24(group), but with pmpcfg(i).A=NAPOT] +TST13-25 (LOW-PRIO) + [same as TST11-25(group), but with pmpcfg(i).A=NAPOT] +TST13-26 (LOW-PRIO) + [same as TST11-26(group), but with pmpcfg(i).A=NAPOT] + +--------------------------- + +TST13-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=NAPOT] +TST13-31 (HIGH-PRIO) + [same as TST11-31(group), but with pmpcfg(i).A=NAPOT] +TST13-32 (MEDIUM-PRIO) + [same as TST11-32(group), but with pmpcfg(i).A=NAPOT] +TST13-33 (MEDIUM-PRIO) + [same as TST11-33(group), but with pmpcfg(i).A=NAPOT] +TST13-34 (LOW-PRIO) + [same as TST11-34(group), but with pmpcfg(i).A=NAPOT] +TST13-35 (LOW-PRIO) + [same as TST11-35(group), but with pmpcfg(i).A=NAPOT] +TST13-36 (LOW-PRIO) + [same as TST11-36(group), but with pmpcfg(i).A=NAPOT] + +--------------------------- + +TST13-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=NAPOT] +TST13-41 (LOWEST-PRIO) + [same as TST11-41(group), but with pmpcfg(i).A=NAPOT] +TST13-42 (LOWEST-PRIO) + [same as TST11-42(group), but with pmpcfg(i).A=NAPOT] +TST13-43 (LOWEST-PRIO) + [same as TST11-43(group), but with pmpcfg(i).A=NAPOT] +TST13-44 (LOWEST-PRIO) + [same as TST11-44(group), but with pmpcfg(i).A=NAPOT] +TST13-45 (LOWEST-PRIO) + [same as TST11-45(group), but with pmpcfg(i).A=NAPOT] +TST13-46 (LOWEST-PRIO) + [same as TST11-46(group), but with pmpcfg(i).A=NAPOT] + +--------------------------- + +TST13-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=NAPOT] +TST13-51 (LOWEST-PRIO) + [same as TST11-51(group), but with pmpcfg(i).A=NAPOT] +TST13-52 (LOWEST-PRIO) + [same as TST11-52(group), but with pmpcfg(i).A=NAPOT] +TST13-53 (LOWEST-PRIO) + [same as TST11-53(group), but with pmpcfg(i).A=NAPOT] +TST13-54 (LOWEST-PRIO) + [same as TST11-54(group), but with pmpcfg(i).A=NAPOT] +TST13-55 (LOWEST-PRIO) + [same as TST11-55(group), but with pmpcfg(i).A=NAPOT] +TST13-56 (LOWEST-PRIO) + [same as TST11-56(group), but with pmpcfg(i).A=NAPOT] + +//////////////////////////// + +TST14-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=NAPOT] +TST14-11 (LOW-PRIO) + [same as TST12-11(group), but with pmpcfg(i).A=NAPOT] +TST14-12 (LOW-PRIO) + [same as TST12-12(group), but with pmpcfg(i).A=NAPOT] +TST14-13 (LOW-PRIO) + [same as TST12-13(group), but with pmpcfg(i).A=NAPOT] +TST14-14 (HIGH-PRIO) + [same as TST12-14(group), but with pmpcfg(i).A=NAPOT] +TST14-15 (MEDIUM-PRIO) + [same as TST12-15(group), but with pmpcfg(i).A=NAPOT] +TST14-16 (HIGH-PRIO) + [same as TST12-16(group), but with pmpcfg(i).A=NAPOT] + +--------------------------- + +TST14-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=NAPOT] +TST14-21 (LOW-PRIO) + [same as TST12-21(group), but with pmpcfg(i).A=NAPOT] +TST14-22 (LOW-PRIO) + [same as TST12-22(group), but with pmpcfg(i).A=NAPOT] +TST14-23 (LOW-PRIO) + [same as TST12-23(group), but with pmpcfg(i).A=NAPOT] +TST14-24 (HIGH-PRIO) + [same as TST12-24(group), but with pmpcfg(i).A=NAPOT] +TST14-25 (MEDIUM-PRIO) + [same as TST12-25(group), but with pmpcfg(i).A=NAPOT] +TST14-26 (HIGH-PRIO) + [same as TST12-26(group), but with pmpcfg(i).A=NAPOT] + +--------------------------- + +TST14-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=NAPOT] +TST14-31 (LOW-PRIO) + [same as TST12-31(group), but with pmpcfg(i).A=NAPOT] +TST14-32 (LOW-PRIO) + [same as TST12-32(group), but with pmpcfg(i).A=NAPOT] +TST14-33 (LOW-PRIO) + [same as TST12-33(group), but with pmpcfg(i).A=NAPOT] +TST14-34 (HIGH-PRIO) + [same as TST12-34(group), but with pmpcfg(i).A=NAPOT] +TST14-35 (MEDIUM-PRIO) + [same as TST12-35(group), but with pmpcfg(i).A=NAPOT] +TST14-36 (HIGH-PRIO) + [same as TST12-36(group), but with pmpcfg(i).A=NAPOT] + +--------------------------- + +TST14-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=NAPOT] +TST14-41 (LOWEST-PRIO) + [same as TST12-41(group), but with pmpcfg(i).A=NAPOT] +TST14-42 (LOWEST-PRIO) + [same as TST12-42(group), but with pmpcfg(i).A=NAPOT] +TST14-43 (LOWEST-PRIO) + [same as TST12-43(group), but with pmpcfg(i).A=NAPOT] +TST14-44 (LOWEST-PRIO) + [same as TST12-44(group), but with pmpcfg(i).A=NAPOT] +TST14-45 (LOWEST-PRIO) + [same as TST12-45(group), but with pmpcfg(i).A=NAPOT] +TST14-46 (LOWEST-PRIO) + [same as TST12-46(group), but with pmpcfg(i).A=NAPOT] + +--------------------------- + +TST14-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=NAPOT] +TST14-51 (LOWEST-PRIO) + [same as TST12-51(group), but with pmpcfg(i).A=NAPOT] +TST14-52 (LOWEST-PRIO) + [same as TST12-52(group), but with pmpcfg(i).A=NAPOT] +TST14-53 (LOWEST-PRIO) + [same as TST12-53(group), but with pmpcfg(i).A=NAPOT] +TST14-54 (LOWEST-PRIO) + [same as TST12-54(group), but with pmpcfg(i).A=NAPOT] +TST14-55 (LOWEST-PRIO) + [same as TST12-55(group), but with pmpcfg(i).A=NAPOT] +TST14-56 (LOWEST-PRIO) + [same as TST12-56(group), but with pmpcfg(i).A=NAPOT] + +//////////////////////////// +//TODO: complete specificities for A=TOR + +TST15-1x(group) => FTR06-a + [same as TST11-1x(group), but with pmpcfg(i).A=TOR] +TST15-11 (HIGH-PRIO) + [same as TST11-11(group), but with pmpcfg(i).A=TOR] +TST15-12 (MEDIUM-PRIO) + [same as TST11-12(group), but with pmpcfg(i).A=TOR] +TST15-13 (MEDIUM-PRIO) + [same as TST11-13(group), but with pmpcfg(i).A=TOR] +TST15-14 (LOW-PRIO) + [same as TST11-14(group), but with pmpcfg(i).A=TOR] +TST15-15 (LOW-PRIO) + [same as TST11-15(group), but with pmpcfg(i).A=TOR] +TST15-16 (LOW-PRIO) + [same as TST11-16(group), but with pmpcfg(i).A=TOR] + +--------------------------- + +TST15-2x(group) => FTR06-a + [same as TST11-2x(group), but with pmpcfg(i).A=TOR] +TST15-21 (HIGH-PRIO) + [same as TST11-21(group), but with pmpcfg(i).A=TOR] +TST15-22 (MEDIUM-PRIO) + [same as TST11-22(group), but with pmpcfg(i).A=TOR] +TST15-23 (MEDIUM-PRIO) + [same as TST11-23(group), but with pmpcfg(i).A=TOR] +TST15-24 (LOW-PRIO) + [same as TST11-24(group), but with pmpcfg(i).A=TOR] +TST15-25 (LOW-PRIO) + [same as TST11-25(group), but with pmpcfg(i).A=TOR] +TST15-26 (LOW-PRIO) + [same as TST11-26(group), but with pmpcfg(i).A=TOR] + +--------------------------- + +TST15-3x(group) => FTR06-a + [same as TST11-3x(group), but with pmpcfg(i).A=TOR] +TST15-31 (HIGH-PRIO) + [same as TST11-31(group), but with pmpcfg(i).A=TOR] +TST15-32 (MEDIUM-PRIO) + [same as TST11-32(group), but with pmpcfg(i).A=TOR] +TST15-33 (MEDIUM-PRIO) + [same as TST11-33(group), but with pmpcfg(i).A=TOR] +TST15-34 (LOW-PRIO) + [same as TST11-34(group), but with pmpcfg(i).A=TOR] +TST15-35 (LOW-PRIO) + [same as TST11-35(group), but with pmpcfg(i).A=TOR] +TST15-36 (LOW-PRIO) + [same as TST11-36(group), but with pmpcfg(i).A=TOR] + +--------------------------- + +TST15-4x(group) => FTR06-a + [same as TST11-4x(group), but with pmpcfg(i).A=TOR] +TST15-41 (LOWEST-PRIO) + [same as TST11-41(group), but with pmpcfg(i).A=TOR] +TST15-42 (LOWEST-PRIO) + [same as TST11-42(group), but with pmpcfg(i).A=TOR] +TST15-43 (LOWEST-PRIO) + [same as TST11-43(group), but with pmpcfg(i).A=TOR] +TST15-44 (LOWEST-PRIO) + [same as TST11-44(group), but with pmpcfg(i).A=TOR] +TST15-45 (LOWEST-PRIO) + [same as TST11-45(group), but with pmpcfg(i).A=TOR] +TST15-46 (LOWEST-PRIO) + [same as TST11-46(group), but with pmpcfg(i).A=TOR] + +--------------------------- + +TST15-5x(group) => FTR06-a + [same as TST11-5x(group), but with pmpcfg(i).A=TOR] +TST15-51 (LOWEST-PRIO) + [same as TST11-51(group), but with pmpcfg(i).A=TOR] +TST15-52 (LOWEST-PRIO) + [same as TST11-52(group), but with pmpcfg(i).A=TOR] +TST15-53 (LOWEST-PRIO) + [same as TST11-53(group), but with pmpcfg(i).A=TOR] +TST15-54 (LOWEST-PRIO) + [same as TST11-54(group), but with pmpcfg(i).A=TOR] +TST15-55 (LOWEST-PRIO) + [same as TST11-55(group), but with pmpcfg(i).A=TOR] +TST15-56 (LOWEST-PRIO) + [same as TST11-56(group), but with pmpcfg(i).A=TOR] + +//////////////////////////// + +TST16-1x(group) => FTR06-a + [same as TST12-1x(group), but with pmpcfg(i).A=TOR] +TST16-11 (LOW-PRIO) + [same as TST12-11(group), but with pmpcfg(i).A=TOR] +TST16-12 (LOW-PRIO) + [same as TST12-12(group), but with pmpcfg(i).A=TOR] +TST16-13 (LOW-PRIO) + [same as TST12-13(group), but with pmpcfg(i).A=TOR] +TST16-14 (HIGH-PRIO) + [same as TST12-14(group), but with pmpcfg(i).A=TOR] +TST16-15 (MEDIUM-PRIO) + [same as TST12-15(group), but with pmpcfg(i).A=TOR] +TST16-16 (HIGH-PRIO) + [same as TST12-16(group), but with pmpcfg(i).A=TOR] + +--------------------------- + +TST16-2x(group) => FTR06-a + [same as TST12-2x(group), but with pmpcfg(i).A=TOR] +TST16-21 (LOW-PRIO) + [same as TST12-21(group), but with pmpcfg(i).A=TOR] +TST16-22 (LOW-PRIO) + [same as TST12-22(group), but with pmpcfg(i).A=TOR] +TST16-23 (LOW-PRIO) + [same as TST12-23(group), but with pmpcfg(i).A=TOR] +TST16-24 (HIGH-PRIO) + [same as TST12-24(group), but with pmpcfg(i).A=TOR] +TST16-25 (MEDIUM-PRIO) + [same as TST12-25(group), but with pmpcfg(i).A=TOR] +TST16-26 (HIGH-PRIO) + [same as TST12-26(group), but with pmpcfg(i).A=TOR] + +--------------------------- + +TST16-3x(group) => FTR06-a + [same as TST12-3x(group), but with pmpcfg(i).A=TOR] +TST16-31 (LOW-PRIO) + [same as TST12-31(group), but with pmpcfg(i).A=TOR] +TST16-32 (LOW-PRIO) + [same as TST12-32(group), but with pmpcfg(i).A=TOR] +TST16-33 (LOW-PRIO) + [same as TST12-33(group), but with pmpcfg(i).A=TOR] +TST16-34 (HIGH-PRIO) + [same as TST12-34(group), but with pmpcfg(i).A=TOR] +TST16-35 (MEDIUM-PRIO) + [same as TST12-35(group), but with pmpcfg(i).A=TOR] +TST16-36 (HIGH-PRIO) + [same as TST12-36(group), but with pmpcfg(i).A=TOR] + +--------------------------- + +TST16-4x(group) => FTR06-a + [same as TST12-4x(group), but with pmpcfg(i).A=TOR] +TST16-41 (LOWEST-PRIO) + [same as TST12-41(group), but with pmpcfg(i).A=TOR] +TST16-42 (LOWEST-PRIO) + [same as TST12-42(group), but with pmpcfg(i).A=TOR] +TST16-43 (LOWEST-PRIO) + [same as TST12-43(group), but with pmpcfg(i).A=TOR] +TST16-44 (LOWEST-PRIO) + [same as TST12-44(group), but with pmpcfg(i).A=TOR] +TST16-45 (LOWEST-PRIO) + [same as TST12-45(group), but with pmpcfg(i).A=TOR] +TST16-46 (LOWEST-PRIO) + [same as TST12-46(group), but with pmpcfg(i).A=TOR] + +--------------------------- + +TST16-5x(group) => FTR06-a + [same as TST12-5x(group), but with pmpcfg(i).A=TOR] +TST16-51 (LOWEST-PRIO) + [same as TST12-51(group), but with pmpcfg(i).A=TOR] +TST16-52 (LOWEST-PRIO) + [same as TST12-52(group), but with pmpcfg(i).A=TOR] +TST16-53 (LOWEST-PRIO) + [same as TST12-53(group), but with pmpcfg(i).A=TOR] +TST16-54 (LOWEST-PRIO) + [same as TST12-54(group), but with pmpcfg(i).A=TOR] +TST16-55 (LOWEST-PRIO) + [same as TST12-55(group), but with pmpcfg(i).A=TOR] +TST16-56 (LOWEST-PRIO) + [same as TST12-56(group), but with pmpcfg(i).A=TOR] + +//////////////////////////// +//TODO: complete specificities for A=OFF + +TST17-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=OFF] +TST17-11 (HIGH-PRIO) + [same as TST11-11(group), but with pmpcfg(i).A=OFF + - check instruction fetch access-fault exception raised] +TST17-12 (MEDIUM-PRIO) + [same as TST11-12(group), but with pmpcfg(i).A=OFF] +TST17-13 (MEDIUM-PRIO) + [same as TST11-13(group), but with pmpcfg(i).A=OFF] +TST17-14 (LOW-PRIO) + [same as TST11-14(group), but with pmpcfg(i).A=OFF + - check instruction fetch access-fault exception raised] +TST17-15 (LOW-PRIO) + [same as TST11-15(group), but with pmpcfg(i).A=OFF] +TST17-16 (LOW-PRIO) + [same as TST11-16(group), but with pmpcfg(i).A=OFF] + +--------------------------- + +TST17-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=OFF] +TST17-21 (HIGH-PRIO) + [same as TST11-21(group), but with pmpcfg(i).A=OFF + - check load access-fault exception raised] +TST17-22 (MEDIUM-PRIO) + [same as TST11-22(group), but with pmpcfg(i).A=OFF] +TST17-23 (MEDIUM-PRIO) + [same as TST11-23(group), but with pmpcfg(i).A=OFF] +TST17-24 (LOW-PRIO) + [same as TST11-24(group), but with pmpcfg(i).A=OFF + - check load access-fault exception raised] +TST17-25 (LOW-PRIO) + [same as TST11-25(group), but with pmpcfg(i).A=OFF] +TST17-26 (LOW-PRIO) + [same as TST11-26(group), but with pmpcfg(i).A=OFF] + +--------------------------- + +TST17-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=OFF] +TST17-31 (HIGH-PRIO) + [same as TST11-31(group), but with pmpcfg(i).A=OFF + - check store access-fault exception raised] +TST17-32 (MEDIUM-PRIO) + [same as TST11-32(group), but with pmpcfg(i).A=OFF] +TST17-33 (MEDIUM-PRIO) + [same as TST11-33(group), but with pmpcfg(i).A=OFF] +TST17-34 (LOW-PRIO) + [same as TST11-34(group), but with pmpcfg(i).A=OFF + - check store access-fault exception raised] +TST17-35 (LOW-PRIO) + [same as TST11-35(group), but with pmpcfg(i).A=OFF] +TST17-36 (LOW-PRIO) + [same as TST11-36(group), but with pmpcfg(i).A=OFF] + +--------------------------- + +TST17-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=OFF] +TST17-41 (LOWEST-PRIO) + [same as TST11-41(group), but with pmpcfg(i).A=OFF + - check load access-fault exception raised] +TST17-42 (LOWEST-PRIO) + [same as TST11-42(group), but with pmpcfg(i).A=OFF] +TST17-43 (LOWEST-PRIO) + [same as TST11-43(group), but with pmpcfg(i).A=OFF] +TST17-44 (LOWEST-PRIO) + [same as TST11-44(group), but with pmpcfg(i).A=OFF + - check load access-fault exception raised] +TST17-45 (LOWEST-PRIO) + [same as TST11-45(group), but with pmpcfg(i).A=OFF] +TST17-46 (LOWEST-PRIO) + [same as TST11-46(group), but with pmpcfg(i).A=OFF] + +--------------------------- + +TST17-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=OFF] +TST17-51 (LOWEST-PRIO) + [same as TST11-51(group), but with pmpcfg(i).A=OFF + - check store access-fault exception raised] +TST17-52 (LOWEST-PRIO) + [same as TST11-52(group), but with pmpcfg(i).A=OFF] +TST17-53 (LOWEST-PRIO) + [same as TST11-53(group), but with pmpcfg(i).A=OFF] +TST17-54 (LOWEST-PRIO) + [same as TST11-54(group), but with pmpcfg(i).A=OFF + - check store access-fault exception raised] +TST17-55 (LOWEST-PRIO) + [same as TST11-55(group), but with pmpcfg(i).A=OFF] +TST17-56 (LOWEST-PRIO) + [same as TST11-56(group), but with pmpcfg(i).A=OFF] + +//////////////////////////// + +TST18-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=OFF] +TST18-11 (LOW-PRIO) + [same as TST12-11(group), but with pmpcfg(i).A=OFF] +TST18-12 (LOW-PRIO) + [same as TST12-12(group), but with pmpcfg(i).A=OFF] +TST18-13 (LOW-PRIO) + [same as TST12-13(group), but with pmpcfg(i).A=OFF] +TST18-14 (HIGH-PRIO) + [same as TST12-14(group), but with pmpcfg(i).A=OFF + - check instruction fetch access-fault exception raised] +TST18-15 (MEDIUM-PRIO) + [same as TST12-15(group), but with pmpcfg(i).A=OFF] +TST18-16 (HIGH-PRIO) + [same as TST12-16(group), but with pmpcfg(i).A=OFF] + +--------------------------- + +TST18-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=OFF] +TST18-21 (LOW-PRIO) + [same as TST12-21(group), but with pmpcfg(i).A=OFF] +TST18-22 (LOW-PRIO) + [same as TST12-22(group), but with pmpcfg(i).A=OFF] +TST18-23 (LOW-PRIO) + [same as TST12-23(group), but with pmpcfg(i).A=OFF] +TST18-24 (HIGH-PRIO) + [same as TST12-24(group), but with pmpcfg(i).A=OFF + - check instruction fetch access-fault exception raised] +TST18-25 (MEDIUM-PRIO) + [same as TST12-25(group), but with pmpcfg(i).A=OFF] +TST18-26 (HIGH-PRIO) + [same as TST12-26(group), but with pmpcfg(i).A=OFF] + +--------------------------- + +TST18-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=OFF] +TST18-31 (LOW-PRIO) + [same as TST12-31(group), but with pmpcfg(i).A=OFF] +TST18-32 (LOW-PRIO) + [same as TST12-32(group), but with pmpcfg(i).A=OFF] +TST18-33 (LOW-PRIO) + [same as TST12-33(group), but with pmpcfg(i).A=OFF] +TST18-34 (HIGH-PRIO) + [same as TST12-34(group), but with pmpcfg(i).A=OFF + - check instruction fetch access-fault exception raised] +TST18-35 (MEDIUM-PRIO) + [same as TST12-35(group), but with pmpcfg(i).A=OFF] +TST18-36 (HIGH-PRIO) + [same as TST12-36(group), but with pmpcfg(i).A=OFF] + +--------------------------- + +TST18-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=OFF] +TST18-41 (LOWEST-PRIO) + [same as TST12-41(group), but with pmpcfg(i).A=OFF] +TST18-42 (LOWEST-PRIO) + [same as TST12-42(group), but with pmpcfg(i).A=OFF] +TST18-43 (LOWEST-PRIO) + [same as TST12-43(group), but with pmpcfg(i).A=OFF] +TST18-44 (LOWEST-PRIO) + [same as TST12-44(group), but with pmpcfg(i).A=OFF + - check instruction fetch access-fault exception raised] +TST18-45 (LOWEST-PRIO) + [same as TST12-45(group), but with pmpcfg(i).A=OFF] +TST18-46 (LOWEST-PRIO) + [same as TST12-46(group), but with pmpcfg(i).A=OFF] + +--------------------------- + +TST18-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=OFF] +TST18-51 (LOWEST-PRIO) + [same as TST12-51(group), but with pmpcfg(i).A=OFF] +TST18-52 (LOWEST-PRIO) + [same as TST12-52(group), but with pmpcfg(i).A=OFF] +TST18-53 (LOWEST-PRIO) + [same as TST12-53(group), but with pmpcfg(i).A=OFF] +TST18-54 (LOWEST-PRIO) + [same as TST12-54(group), but with pmpcfg(i).A=OFF + - check instruction fetch access-fault exception raised] +TST18-55 (LOWEST-PRIO) + [same as TST12-55(group), but with pmpcfg(i).A=OFF] +TST18-56 (LOWEST-PRIO) + [same as TST12-56(group), but with pmpcfg(i).A=OFF] + +//////////////////////////// + +TST21(group) + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] +TST21-1 = extension of (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-12, TST11-22, TST11-32, TST11-42, TST11-52, + TST11-13, TST11-23, TST11-33, TST11-43, TST11-53, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST11-15, TST11-25, TST11-35, TST11-45, TST11-55, + TST11-16, TST11-26, TST11-36, TST11-46, TST11-56, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52, + TST12-13, TST12-23, TST12-33, TST12-43, TST12-53, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST12-15, TST12-25, TST12-35, TST12-45, TST12-55, + TST12-16, TST12-26, TST12-36, TST12-46, TST12-56) +[configure only one (any, but the first one) PMP entry + - use A=NA4 for the PMP entry configuration + - execute the chosen kind of access + - should be same result] +TST21-2 = extension of compatible pair of (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-12, TST11-22, TST11-32, TST11-42, TST11-52, + TST11-13, TST11-23, TST11-33, TST11-43, TST11-53, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST11-15, TST11-25, TST11-35, TST11-45, TST11-55, + TST11-16, TST11-26, TST11-36, TST11-46, TST11-56, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52, + TST12-13, TST12-23, TST12-33, TST12-43, TST12-53, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST12-15, TST12-25, TST12-35, TST12-45, TST12-55, + TST12-16, TST12-26, TST12-36, TST12-46, TST12-56) +[configure 2 non-adjacent PMP entries (highest-numbered ones first) (avoid the first PMP entry) + - use A=NA4 for each PMP entry configuration + - execute the 2 kinds of accesses (if possible to chain due to potential access-fault exception) + - should be same 2 results] +TST21-3 = extension of compatible group(N) of (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-12, TST11-22, TST11-32, TST11-42, TST11-52, + TST11-13, TST11-23, TST11-33, TST11-43, TST11-53, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST11-15, TST11-25, TST11-35, TST11-45, TST11-55, + TST11-16, TST11-26, TST11-36, TST11-46, TST11-56, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52, + TST12-13, TST12-23, TST12-33, TST12-43, TST12-53, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST12-15, TST12-25, TST12-35, TST12-45, TST12-55, + TST12-16, TST12-26, TST12-36, TST12-46, TST12-56) +[configure N PMP entries (highest-numbered ones first) (as non-adjacent as possible, and avoid the first PMP entry) + - use A=NA4 for each PMP entry configuration + - execute the N kinds of accesses (if possible to chain due to potential access-fault exception) + - should be same N results] +TST21-4 = extension of compatible group(8) of (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-12, TST11-22, TST11-32, TST11-42, TST11-52, + TST11-13, TST11-23, TST11-33, TST11-43, TST11-53, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST11-15, TST11-25, TST11-35, TST11-45, TST11-55, + TST11-16, TST11-26, TST11-36, TST11-46, TST11-56, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52, + TST12-13, TST12-23, TST12-33, TST12-43, TST12-53, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST12-15, TST12-25, TST12-35, TST12-45, TST12-55, + TST12-16, TST12-26, TST12-36, TST12-46, TST12-56) +[configure 8 PMP entries (highest-numbered ones first) + - use A=NA4 for each PMP entry configuration + - execute the 8 kinds of accesses (if possible to chain due to potential access-fault exception) + - should be same 8 results] + +--------------------------- + +TST22(group) + [create scenarios where PMP entries with A=3 (NAPOT) and with/without matching permissions + - check only NAPOT defined addresses are matching] +TST22-1 = extension of (TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-12, TST13-22, TST13-32, TST13-42, TST13-52, + TST13-13, TST13-23, TST13-33, TST13-43, TST13-53, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST13-15, TST13-25, TST13-35, TST13-45, TST13-55, + TST13-16, TST13-26, TST13-36, TST13-46, TST13-56, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-12, TST14-22, TST14-32, TST14-42, TST14-52, + TST14-13, TST14-23, TST14-33, TST14-43, TST14-53, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55, + TST14-16, TST14-26, TST14-36, TST14-46, TST14-56) +[configure only one (any, but the first one) PMP entry + - use A=NAPOT for the PMP entry configuration + - execute the chosen kind of access + - should be same result] +TST22-2 = extension of compatible pair of (TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-12, TST13-22, TST13-32, TST13-42, TST13-52, + TST13-13, TST13-23, TST13-33, TST13-43, TST13-53, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST13-15, TST13-25, TST13-35, TST13-45, TST13-55, + TST13-16, TST13-26, TST13-36, TST13-46, TST13-56, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-12, TST14-22, TST14-32, TST14-42, TST14-52, + TST14-13, TST14-23, TST14-33, TST14-43, TST14-53, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55, + TST14-16, TST14-26, TST14-36, TST14-46, TST14-56) +[configure 2 non-adjacent PMP entries (highest-numbered ones first) (avoid the first PMP entry) + - use A=NAPOT for each PMP entry configuration + - execute the 2 kinds of accesses (if possible to chain due to potential access-fault exception) + - should be same 2 results] +TST22-3 = extension of compatible group(N) of (TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-12, TST13-22, TST13-32, TST13-42, TST13-52, + TST13-13, TST13-23, TST13-33, TST13-43, TST13-53, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST13-15, TST13-25, TST13-35, TST13-45, TST13-55, + TST13-16, TST13-26, TST13-36, TST13-46, TST13-56, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-12, TST14-22, TST14-32, TST14-42, TST14-52, + TST14-13, TST14-23, TST14-33, TST14-43, TST14-53, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55, + TST14-16, TST14-26, TST14-36, TST14-46, TST14-56) +[configure N PMP entries (highest-numbered ones first) (as non-adjacent as possible, and avoid the first PMP entry) + - use A=NAPOT for each PMP entry configuration + - execute the N kinds of accesses (if possible to chain due to potential access-fault exception) + - should be same N results] +TST22-4 = extension of compatible group(8) of (TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-12, TST13-22, TST13-32, TST13-42, TST13-52, + TST13-13, TST13-23, TST13-33, TST13-43, TST13-53, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST13-15, TST13-25, TST13-35, TST13-45, TST13-55, + TST13-16, TST13-26, TST13-36, TST13-46, TST13-56, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-12, TST14-22, TST14-32, TST14-42, TST14-52, + TST14-13, TST14-23, TST14-33, TST14-43, TST14-53, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55, + TST14-16, TST14-26, TST14-36, TST14-46, TST14-56) +[configure 8 PMP entries (highest-numbered ones first) + - use A=NAPOT for each PMP entry configuration + - execute the 8 kinds of accesses (if possible to chain due to potential access-fault exception) + - should be same 8 results] + +--------------------------- + +TST23(group) => + [create scenarios where PMP entries with A=1 (TOR) and with/without matching permissions + - pmpaddr(i−1) < pmpaddr(i), pmpcfg(i).A=TOR and pmpcfg(i-1) with/without matching permissions + - check only TOR defined addresses are matching] +TST23-1 = extension of (TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-12, TST15-22, TST15-32, TST15-42, TST15-52, + TST15-13, TST15-23, TST15-33, TST15-43, TST15-53, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST15-15, TST15-25, TST15-35, TST15-45, TST15-55, + TST15-16, TST15-26, TST15-36, TST15-46, TST15-56, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52, + TST16-13, TST16-23, TST16-33, TST16-43, TST16-53, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54, + TST16-15, TST16-25, TST16-35, TST16-45, TST16-55, + TST16-16, TST16-26, TST16-36, TST16-46, TST16-56) +[configure only one (any, but the first one) PMP entry + - execute the chosen kind of access + - should be same result] +TST23-2 = extension of compatible pair of (TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-12, TST15-22, TST15-32, TST15-42, TST15-52, + TST15-13, TST15-23, TST15-33, TST15-43, TST15-53, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST15-15, TST15-25, TST15-35, TST15-45, TST15-55, + TST15-16, TST15-26, TST15-36, TST15-46, TST15-56, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52, + TST16-13, TST16-23, TST16-33, TST16-43, TST16-53, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54, + TST16-15, TST16-25, TST16-35, TST16-45, TST16-55, + TST16-16, TST16-26, TST16-36, TST16-46, TST16-56) +[configure 2 non-adjacent PMP entries (highest-numbered ones first) (avoid the first PMP entry) + - execute the 2 kinds of accesses (if possible to chain due to potential access-fault exception) + - should be same 2 results] +TST23-3 = extension of compatible group(N) of (TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-12, TST15-22, TST15-32, TST15-42, TST15-52, + TST15-13, TST15-23, TST15-33, TST15-43, TST15-53, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST15-15, TST15-25, TST15-35, TST15-45, TST15-55, + TST15-16, TST15-26, TST15-36, TST15-46, TST15-56, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52, + TST16-13, TST16-23, TST16-33, TST16-43, TST16-53, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54, + TST16-15, TST16-25, TST16-35, TST16-45, TST16-55, + TST16-16, TST16-26, TST16-36, TST16-46, TST16-56) +[configure N PMP entries (highest-numbered ones first) (as non-adjacent as possible, and avoid the first PMP entry) + - execute the N kinds of accesses (if possible to chain due to potential access-fault exception) + - should be same N results] +TST23-4 = extension of compatible group(8) of (TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-12, TST15-22, TST15-32, TST15-42, TST15-52, + TST15-13, TST15-23, TST15-33, TST15-43, TST15-53, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST15-15, TST15-25, TST15-35, TST15-45, TST15-55, + TST15-16, TST15-26, TST15-36, TST15-46, TST15-56, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52, + TST16-13, TST16-23, TST16-33, TST16-43, TST16-53, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54, + TST16-15, TST16-25, TST16-35, TST16-45, TST16-55, + TST16-16, TST16-26, TST16-36, TST16-46, TST16-56) +[configure 8 PMP entries (highest-numbered ones first) + - execute the 8 kinds of accesses (if possible to chain due to potential access-fault exception) + - should be same 8 results] + +--------------------------- + +TST24(group) => FTR09-g + [create scenarios where PMP entries with A=0 (OFF) and with matching permissions + - check no address matching for those PMP entries] + [create scenarios where all PMP entries with A=0 (OFF) and with matching permissions + - check no address matching for all PMP entries] + [check S or U mode access fails when all A=OFF with at least one PMP entry implemented] => FTR09-g +TST24-1 = extension of (TST17-11, TST17-21, TST17-31, TST17-41, TST17-51, + TST17-13, TST17-23, TST17-33, TST17-43, TST17-53, + TST17-14, TST17-24, TST17-34, TST17-44, TST17-54, + TST17-16, TST17-26, TST17-36, TST17-46, TST17-56, + TST18-14, TST18-24, TST18-34, TST18-44, TST18-54, //TODO: M-mode may not raise an exception + TST18-16, TST18-26, TST18-36, TST18-46, TST18-56) //TODO: M-mode may not raise an exception + //TODO: SHOULD WE ADD (TST18-11, TST18-21, TST18-31, TST18-41, TST18-51, + TST18-13, TST18-23, TST18-33, TST18-43, TST18-53) ? +[configure only one (any, but the first one) PMP entry + - execute the chosen kind of access + - check appropriate access-fault exception raised] +TST24-2 = extension of compatible pair of (TST17-11, TST17-21, TST17-31, TST17-41, TST17-51, + TST17-13, TST17-23, TST17-33, TST17-43, TST17-53, + TST17-14, TST17-24, TST17-34, TST17-44, TST17-54, + TST17-16, TST17-26, TST17-36, TST17-46, TST17-56, + TST18-14, TST18-24, TST18-34, TST18-44, TST18-54, //TODO: M-mode may not raise an exception + TST18-16, TST18-26, TST18-36, TST18-46, TST18-56) //TODO: M-mode may not raise an exception + //TODO: SHOULD WE ADD (TST18-11, TST18-21, TST18-31, TST18-41, TST18-51, + TST18-13, TST18-23, TST18-33, TST18-43, TST18-53) ? +[configure 2 non-adjacent PMP entries (highest-numbered ones first) (avoid the first PMP entry) + - execute the 2 kinds of accesses (if possible to chain due to access-fault) + - check 2 appropriate access-fault exceptions raised] +TST24-3 = extension of compatible group(N) of (TST17-11, TST17-21, TST17-31, TST17-41, TST17-51, + TST17-13, TST17-23, TST17-33, TST17-43, TST17-53, + TST17-14, TST17-24, TST17-34, TST17-44, TST17-54, + TST17-16, TST17-26, TST17-36, TST17-46, TST17-56, + TST18-14, TST18-24, TST18-34, TST18-44, TST18-54, //TODO: M-mode may not raise an exception + TST18-16, TST18-26, TST18-36, TST18-46, TST18-56) //TODO: M-mode may not raise an exception + //TODO: SHOULD WE ADD (TST18-11, TST18-21, TST18-31, TST18-41, TST18-51, + TST18-13, TST18-23, TST18-33, TST18-43, TST18-53) ? +[configure N PMP entries (highest-numbered ones first) (as non-adjacent as possible, and avoid the first PMP entry) + - execute the N kinds of accesses (if possible to chain due to access-fault) + - check N appropriate access-fault exceptions raised] +TST24-4 = extension of compatible group(8) of (TST17-11, TST17-21, TST17-31, TST17-41, TST17-51, + TST17-13, TST17-23, TST17-33, TST17-43, TST17-53, + TST17-14, TST17-24, TST17-34, TST17-44, TST17-54, + TST17-16, TST17-26, TST17-36, TST17-46, TST17-56, + TST18-14, TST18-24, TST18-34, TST18-44, TST18-54, //TODO: M-mode may not raise an exception + TST18-16, TST18-26, TST18-36, TST18-46, TST18-56) //TODO: M-mode may not raise an exception + //TODO: SHOULD WE ADD (TST18-11, TST18-21, TST18-31, TST18-41, TST18-51, + TST18-13, TST18-23, TST18-33, TST18-43, TST18-53) ? +[configure 8 PMP entries (highest-numbered ones first) + - execute the 8 kinds of accesses (if possible to chain due to access-fault) + - check 8 appropriate access-fault exceptions raised] + +--------------------------- + +//TO COMPLETE => FTR06-b +TST25 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) > 0 +TST26 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) = 0 + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) > 0 + - pmpaddr(0) = 0] + +//TO COMPLETE => FTR06-c +TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) and pmpcfg(i-1) correct + [create scenario where PMP entry pmpcfg(i) with TOR: + - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct] + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) >= pmpaddr(1/2/3/…)] + +//////////////////////////// + +TST31(group) => FTR08-a and FTR08-b + [create scenario where L=0 for PMP entry (i) + - check pmp(i)cfg and pmpaddr(i) are writable in M-mode only] + [create scenario where L=1 for PMP entry (i) + - check pmp(i)cfg and pmpaddr(i) are effectively locked whatever the mode] + [create scenario where PMP entries are locked L=1 + - check only the hart reset unlocks all PMP entries + - execute following tests specific checks + - check only hart reset unlocks all => FTR08-b + - check reset values: all pmp(i)cfg and pmpaddr(i) are M-mode read zero] +TST31-1 = extension of (TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54) +[configure only one ([FTR02-b1]: maybe mandatorily the 1st) PMP entry: with L=1 + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever the SW mode => FTR08-a] +TST31-2 = extension of compatible pair of (TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54) +[configure 2 PMP entries ([FTR02-b1]: maybe mandatorily the 2 first ones): both with L=1 + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever the SW mode => FTR08-a] +TST31-3 = extension of compatible pair of (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54) +[configure 2 PMP entries ([FTR02-b1]: maybe mandatorily the 2 first ones): one with L=1 and the other with L=0, + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever the SW mode => FTR08-a + - check locked PMP entry (i) has no effect on unlocked PMP entry (j) + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only] +TST31-4 = extension of compatible group(N) of (TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54) +[configure N PMP entries ([FTR02-b1]: maybe mandatorily the N first ones): all with L=1 + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever the SW mode => FTR08-a] +TST31-5 = extension of compatible group(N) of (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54) +[configure N PMP entries ([FTR02-b1]: maybe mandatorily the N first ones): at least one with L=1 and one with L=0, + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever the SW mode => FTR08-a + - check locked PMP entry (i) has no effect on unlocked PMP entry (j) + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only] +TST31-6 = extension of compatible group(8) of (TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54) +[configure 8 PMP entries: all with L=1 + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever the SW mode => FTR08-a] +TST31-7 = extension of compatible group(8) of (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54) +[configure 8 PMP entries: at least one with L=1 and one with L=0, + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever the SW mode => FTR08-a + - check locked PMP entry (i) has no effect on unlocked PMP entry (j) + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only] + +--------------------------- + +TST32(group) => FTR08-a and FTR08-b + [create scenario where pmp(i)cfg.L=1 and pmp(i)cfg.A=NAPOT for PMP entry (i)] +TST32-1 = same as TST31-1 but with extension of (TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54) +TST32-2 = same as TST31-2 but with extension of (TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54) +TST32-3 = same as TST31-3 but with extension of (TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54) +TST32-4 = same as TST31-4 but with extension of (TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54) +TST32-5 = same as TST31-5 but with extension of (TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54) +TST32-6 = same as TST31-6 but with extension of (TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54) +TST32-7 = same as TST31-7 but with extension of (TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54) + +--------------------------- + +TST33(group) => FTR08-a and FTR08-b + [create scenario where pmp(i)cfg.L=1 and pmp(i)cfg.A=TOR for PMP entry (i) + - additionally, check writes to pmpaddr(i-1) are ignored] +TST33-1 = same as TST31-1 but with extension of (TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) +TST33-2 = same as TST31-2 but with extension of (TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) +TST33-3 = same as TST31-3 but with extension of (TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) +TST33-4 = same as TST31-4 but with extension of (TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) +TST33-5 = same as TST31-5 but with extension of (TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) +TST33-6 = same as TST31-6 but with extension of (TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) +TST33-7 = same as TST31-7 but with extension of (TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) + +--------------------------- + +TST34(group) => FTR08-a and FTR08-b + [create scenario where pmp(i)cfg.A=OFF, then pmp(i)cfg.L=1 for PMP entry (i) + - check writes to pmp(i)cfg are ignored] +TST34-1 = same as TST31-1 but with extension of (TST17-14, TST17-24, TST17-34, TST17-44, TST17-54, + TST18-14, TST18-24, TST18-34, TST18-44, TST18-54) +TST34-2 = same as TST31-2 but with extension of (TST17-14, TST17-24, TST17-34, TST17-44, TST17-54, + TST18-14, TST18-24, TST18-34, TST18-44, TST18-54) +TST34-3 = same as TST31-3 but with extension of (TST17-11, TST17-21, TST17-31, TST17-41, TST17-51, + TST17-14, TST17-24, TST17-34, TST17-44, TST17-54, + TST18-11, TST18-21, TST18-31, TST18-41, TST18-51, + TST18-14, TST18-24, TST18-34, TST18-44, TST18-54) +TST34-4 = same as TST31-4 but with extension of (TST17-14, TST17-24, TST17-34, TST17-44, TST17-54, + TST18-14, TST18-24, TST18-34, TST18-44, TST18-54) +TST34-5 = same as TST31-5 but with extension of (TST17-11, TST17-21, TST17-31, TST17-41, TST17-51, + TST17-14, TST17-24, TST17-34, TST17-44, TST17-54, + TST18-11, TST18-21, TST18-31, TST18-41, TST18-51, + TST18-14, TST18-24, TST18-34, TST18-44, TST18-54) +TST34-6 = same as TST31-6 but with extension of (TST17-14, TST17-24, TST17-34, TST17-44, TST17-54, + TST18-14, TST18-24, TST18-34, TST18-44, TST18-54) +TST34-7 = same as TST31-7 but with extension of (TST17-11, TST17-21, TST17-31, TST17-41, TST17-51, + TST17-14, TST17-24, TST17-34, TST17-44, TST17-54, + TST18-11, TST18-21, TST18-31, TST18-41, TST18-51, + TST18-14, TST18-24, TST18-34, TST18-44, TST18-54) + +--------------------------- + +TST39(group) => FTR08-a and FTR08-b + [create scenario where pmp(i)cfg.L=1 and pmp(i)cfg.A=NA4/NAPOT/TOR/OFF for PMP entry (i)] +TST39-1 = same as TST31-1 but with extension of (TST1*-14, TST1*-24, TST1*-34, TST1*-44, TST1*-54) +TST39-2 = same as TST31-2 but with extension of (TST1*-14, TST1*-24, TST1*-34, TST1*-44, TST1*-54) +TST39-3 = same as TST31-3 but with extension of (TST1*-11, TST1*-21, TST1*-31, TST1*-41, TST1*-51, + TST1*-14, TST1*-24, TST1*-34, TST1*-44, TST1*-54) +TST39-4 = same as TST31-4 but with extension of (TST1*-14, TST1*-24, TST1*-34, TST1*-44, TST1*-54) +TST39-5 = same as TST31-5 but with extension of (TST1*-11, TST1*-21, TST1*-31, TST1*-41, TST1*-51, + TST1*-14, TST1*-24, TST1*-34, TST1*-44, TST1*-54) +TST39-6 = same as TST31-6 but with extension of (TST1*-14, TST1*-24, TST1*-34, TST1*-44, TST1*-54) +TST39-7 = same as TST31-7 but with extension of (TST1*-11, TST1*-21, TST1*-31, TST1*-41, TST1*-51, + TST1*-14, TST1*-24, TST1*-34, TST1*-44, TST1*-54) + +//////////////////////////// + +TST42(group) => FTR02-b1 + [check if the lowest-numbered PMP CSRs must be programmed for higher-numbered ones to be taken into account in PMP checks] +TST42-1 = extension of (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) +[configure only one (any, but the first one) PMP entry + - execute the chosen kind of access several times + - check no access-fault exception] +TST42-2 = extension of compatible pair of (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) +[configure 2 non-adjacent PMP entries (highest-numbered ones first) (avoid the first PMP entry) + - execute the 2 kinds of accesses several times + - check no access-fault exception] +TST42-3 = extension of compatible group(N) of (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) +[configure N PMP entries (highest-numbered ones first) (as non-adjacent as possible, and avoid the first PMP entry) + - execute all the kinds of accesses several times + - check no access-fault exception] + +//////////////////////////// + +TST51(group) => FTR09-a, FTR09-b and FTR09-c + [create scenarios where 2 PMP entries with same pmpaddr + - one without matching permissions or with A=OFF + - one with matching permissions and A=NA4/NAPOT/TOR + - any of them can be the lowest-numbered PMP entry] +TST51-1 +[configure 2 PMP entries + - configure the lowest-numbered PMP entry with (TST11-12, TST11-22, TST11-32, TST11-42, TST11-52, + TST11-15, TST11-25, TST11-35, TST11-45, TST11-55, + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52, + TST12-15, TST12-25, TST12-35, TST12-45, TST12-55, + TST13-12, TST13-22, TST13-32, TST13-42, TST13-52, + TST13-15, TST13-25, TST13-35, TST13-45, TST13-55, + TST14-12, TST14-22, TST14-32, TST14-42, TST14-52, + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55, + TST15-12, TST15-22, TST15-32, TST15-42, TST15-52, + TST15-15, TST15-25, TST15-35, TST15-45, TST15-55, + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52, + TST16-15, TST16-25, TST16-35, TST16-45, TST16-55, + TST17-12, TST17-22, TST17-32, TST17-42, TST17-52, + TST17-15, TST17-25, TST17-35, TST17-45, TST17-55, + TST18-12, TST18-22, TST18-32, TST18-42, TST18-52, + TST18-15, TST18-25, TST18-35, TST18-45, TST18-55) + - configure the highest-numbered PMP entry with (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) + - execute the associated access + - check associated access-fault exception raised] +TST51-2 +[configure 2 PMP entries + - configure the lowest-numbered PMP entry with (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) + - configure the highest-numbered PMP entry with (TST11-12, TST11-22, TST11-32, TST11-42, TST11-52, + TST11-15, TST11-25, TST11-35, TST11-45, TST11-55, + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52, + TST12-15, TST12-25, TST12-35, TST12-45, TST12-55, + TST13-12, TST13-22, TST13-32, TST13-42, TST13-52, + TST13-15, TST13-25, TST13-35, TST13-45, TST13-55, + TST14-12, TST14-22, TST14-32, TST14-42, TST14-52, + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55, + TST15-12, TST15-22, TST15-32, TST15-42, TST15-52, + TST15-15, TST15-25, TST15-35, TST15-45, TST15-55, + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52, + TST16-15, TST16-25, TST16-35, TST16-45, TST16-55, + TST17-12, TST17-22, TST17-32, TST17-42, TST17-52, + TST17-15, TST17-25, TST17-35, TST17-45, TST17-55, + TST18-12, TST18-22, TST18-32, TST18-42, TST18-52, + TST18-15, TST18-25, TST18-35, TST18-45, TST18-55) + - execute the associated access + - check no access-fault exception] + +// //IMPOSSIBLE TO IMPLEMENT (4-BYTE GRANULARITY) => FTR09-a +// [implement checks for priority: +// for each access length (1byte, 2bytes, 3bytes or 4bytes) +// for each byte position on the 32bits bus +// for each kind of permissions/mode access settings +// - set a low-numbered any-single-byte-address-matching PMP entry with non-matching permissions/mode settings +// - set a higher-numbered all-bytes-address-matching PMP entry with matching permissions/mode settings +// - set intermediate-numbered not-all-bytes-address-matching PMP entries with matching permissions/mode settings +// - NB: can be randomized +// - check the accesses fail (so reaching the low-numbered any-single-byte-address-matching PMP entry) +// for each access length (1byte, 2bytes, 3bytes or 4bytes) +// for each byte position on the 32bits bus +// for each kind of permissions/mode access settings +// - set a low-numbered all-bytes-address-matching PMP entry with matching permissions/mode settings +// - set a higher-numbered any-single-byte-address-matching PMP entry with non-matching permissions/mode settings +// - set intermediate-numbered not-all-bytes-address-matching PMP entries with non-matching permissions/mode settings +// - NB: can be randomized +// - check the accesses pass (so reaching the low-numbered all-bytes-address-matching PMP entry)] + +// //IMPOSSIBLE TO IMPLEMENT (4-BYTE GRANUARITY) => FTR09-b and FTR09-c +// [check access fails if only part of the access bytes are matching the PMP entry whatever the permissions and the mode] +// for each access length (1byte, 2bytes, 3bytes or 4bytes) +// for each byte position on the 32bits bus +// for each kind of permissions/mode access settings +// - set a low-numbered all-bytes-address-matching PMP entry with non-matching permissions/mode settings +// - set a higher-numbered any-single-byte-address-matching PMP entry with matching permissions/mode settings +// - set intermediate-numbered not-all-bytes-address-matching PMP entries with matching permissions/mode settings +// - NB: can be randomized +// - check the accesses fail] + +//////////////////////////// + +TST61 => FTR10-a +[check multiple-accesses instructions not generating any access-fault exceptions] + +TST62 +[check multiple-accesses instructions generating access-fault exceptions with only one non-matching access] + +TST63 +[check multiple-accesses instructions generating access-fault exceptions with multiple non-matching accesses] + +TST64 +[create scenario where instruction-associated multiple accesses are not mutually atomic] //TODO: UNDERSTAND THE MEANING + +//TST65 => FTR10-c +[create scenario with misaligned loads, stores, and instruction fetches generating multiple accesses for which: + - access-fault exception occurs at 1st, 2nd, … last access + - other accesses succeed] +[if floating-point is enabled, create scenario for floating-point store wider than XLEN bits (e.g. FSD instruction) + + + diff --git a/verif/docs/VerifPlans/PMP/pmp_verif_plan_features.txt b/verif/docs/VerifPlans/PMP/pmp_verif_plan_features.txt new file mode 100644 index 00000000000..520e0d99949 --- /dev/null +++ b/verif/docs/VerifPlans/PMP/pmp_verif_plan_features.txt @@ -0,0 +1,224 @@ + + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +-19-FTR01 + +FTR01-a +[PMP allows physical memory access privileges (read, write, execute) to be specified for each physical memory region] + +FTR01-b +[the standard PMP encoding supports regions as small as four bytes.] + +FTR01-c +[Certain regions’ privileges can be hardwired: so only ever be visible in machine mode but in no lower-privilege layers.] +FTR01-c-extended +[PMP regions hardwired privileges can only be observed in M-mode] + +FTR01-d +[PMP checks are applied to all accesses whose effective privilege mode is S or U] + +FTR01-e +[PMP checks are also applied to page-table accesses for virtual-address translation, for which the effective privilege mode is S] + +FTR01-f (refers to FTR08-e1) +[PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + +FTR01-g1 +[by default (PMP entry not yet configured), S and U modes have no PMP permissions] +FTR01-g2 +[by default (PMP entry not yet configured), M-mode has full permissions.] + +FTR01-h +[PMP violations are always trapped precisely at the processor] + +//////////////////////////// +-21-FTR02 + +FTR02-a +[Up to 64 PMP entries are supported] + +FTR02-b1 +[the lowest-numbered PMP CSRs must be implemented first (does it mean programmed first)] +FTR02-b2 +[All PMP CSR fields are WARL and may be read-only zero (does read-only zero mean not implemented?)] + +FTR02-d +[PMP CSRs are only accessible to M-mode] + +FTR02-e +[2 CSRs, pmpcfg0–pmpcfg1, hold the configurations pmp0cfg–pmp7cfg for the 8 PMP entries] + + +//////////////////////////// +-23-FTR03 + +FTR03-a +[Each PMP address register encodes bits 33–2 of a 34-bit physical address] + +FTR03-b (NOT TOTALLY UNDERSTOOD!!!) +[Not all physical address bits may be implemented, and so the pmpaddr registers are WARL] + +//////////////////////////// +-25-FTR04 + +FTR04-a +[The R, W, and X fields form a collective WARL field for which the combinations with R=0 and W=1 are reserved.] + +FTR04-b +[Attempting to fetch an instruction from a PMP region that does not have execute permissions raises an instruction access-fault exception] + +FTR04-c +[Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + +FTR04-d +[Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + +FTR04-e +[if MXLEN is changed, the contents of the pmp(x)cfg fields are preserved, but appear in the pmpcfg(y) CSR prescribed by the new setting of MXLEN] +FTR04-e-assumption +[we assume MXLEN is always 32bits] + +//////////////////////////// +-27-FTR05 + +FTR05-a +[The A field in a PMP entry’s configuration register encodes the address-matching mode of the associated PMP address register] +[When A=OFF, this PMP entry is disabled and matches no addresses] +[When A=TOR, top boundary of an arbitrary range] +[When A=NA4, naturally aligned four-byte regions] +[When A=NAPOT, naturally aligned power-of-2 regions] +[These modes support four-bytes granularity] + +//////////////////////////// +-28-FTR06 + +FTR06-a +[If PMP entry i’s A field is set to TOR, the entry matches any address y such that pmpaddr(i−1) ≤ y < pmpaddr(i) (irrespective of the value of pmpcfg(i−1))] + +FTR06-b +[If PMP entry 0’s A field is set to TOR, zero is used for the lower bound, and so it matches any address y < pmpaddr(0)] + +FTR06-c +[If pmpaddr(i−1) ≥ pmpaddr(i) and pmpcfg(i).A=TOR, then PMP entry i matches no addresses] + +//////////////////////////// +-30-FTR07 + +FTR07-a +[Although the PMP mechanism supports regions as small as 4 bytes, platforms may specify coarser PMP regions] +[the PMP grain is 2^(G+2) bytes and must be the same across all PMP regions] + +FTR07-b +[Software may determine the PMP granularity by writing zero to pmp(0)cfg, then writing all ones to pmpaddr(0), then reading back pmpaddr(0). If G is the index of the least-significant bit set, the PMP granularity is 2^(G+2) bytes] + +FTR07-c +[If the current XLEN is greater than MXLEN, the PMP address registers are zero-extended from MXLEN to XLEN bits for the purposes of address matching] +FTR07-c-assumption +[we assume XLEN=MXLEN=32 bits] + +//////////////////////////// +-32-FTR08 + +FTR08-a +[The L bit indicates that the PMP entry is locked, i.e., writes to the configuration register and associated address registers are ignored] +[If PMP entry (i) is locked, writes to pmp(i)cfg and pmpaddr(i) are ignored] + +FTR08-b +[Locked PMP entries remain locked until the hart is reset] + +FTR08-c +[if PMP entry (i) is locked and pmp(i)cfg.A is set to TOR, writes to pmpaddr(i-1) are ignored] + +FTR08-d +[Setting the L bit locks the PMP entry even when the A field is set to OFF] + +FTR08-e +[L bit indicates whether the R/W/X permissions are enforced on M-mode accesses] +FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) +[When the L bit is set, these permissions are enforced for all privilege modes] +FTR08-e2-1 (refers to FTR09-d1) +[When the L bit is clear, any M-mode access matching the PMP entry will succeed] +FTR08-e2-2 (refers to FTR09-d2-2) +[When the L bit is clear, the R/W/X permissions apply only to S and U modes] + +//////////////////////////// +-34-FTR09 + +FTR09-a +[PMP entries are statically prioritized] +[The lowest-numbered PMP entry that matches any byte of an access determines whether that access succeeds or fails] + +FTR09-b +[The matching PMP entry must match all bytes of an access, or the access fails, irrespective of the L, R, W, and X bits] + +FTR09-c +[If a PMP entry matches all bytes of an access, then the L, R, W, and X bits determine whether the access succeeds or fails] + +FTR09-d1 (refers to FTR08-e2-1) +[If the L bit is clear and the privilege mode of the access is M, the access succeeds] +FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) +[if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] +FTR09-d2-2 (L=0 refers to FTR08-e2-2) +[if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + +FTR09-e +[If no PMP entry matches an M-mode access, the access succeeds] +FTR09-e-question +[what happens if no PMP entry is implemented ?] + +FTR09-f +[If no PMP entry matches an S-mode or U-mode access, but at least one PMP entry is implemented, the access fails] +FTR09-f-question +[what happens if no PMP entry is implemented ?] + +FTR09-g +[If at least one PMP entry is implemented, but all PMP entries’ A fields are set to OFF, then all S-mode and U-mode memory accesses will fail] +FTR09-g-question (same as FTR09-f-question if 'memory access' is no different matter) +[what happens if no PMP entry is implemented ?] + +question are the pmpaddr(i) aligned to 4bytes ? + - NA4: naturally aligned four-byte regions + - NAPOT: naturally aligned power-of-2 regions + - TOR: + These modes support four-byte granularity + Each PMP address register encodes bits 33–2 of a 34-bit physical address for RV32 + +//////////////////////////// +-36-FTR10 + +FTR10-a +[An access-fault exception is generated if at least one access generated by an instruction fails, though other accesses generated by that instruction may succeed with visible side effects] + +FTR10-b +[instructions that reference virtual memory are decomposed into multiple accesses] +FTR10-b-assumption +[we assume no virtual memory is implemented] +[we assume page-based virtual memory is not implemented] + +FTR10-c +[misaligned loads, stores, and instruction fetches may also be decomposed into multiple accesses, some of which may succeed before an access-fault exception occurs] + +//////////////////////////// +-38-FTR11 +FTR11-assumption +[we assume no virtual memory is implemented] +[we assume page-based virtual memory is not implemented] + +FTR11-a +[instructions that access virtual memory may result in multiple physical-memory accesses, including implicit references to the page tables. The PMP checks apply to all of these accesses] + +FTR11-b +[The effective privilege mode for implicit page-table accesses is S] + +FTR11-c +[The PMP settings for the resulting physical address may be checked (and possibly cached) at any point between the address +translation and the explicit memory access] + +FTR11-d +[when the PMP settings are modified, M-mode software must synchronize the PMP settings with the virtual memory system and any PMP or address-translation caches] + +FTR11-e +[If page-based virtual memory is not implemented, memory accesses check the PMP settings synchronously, so no SFENCE.VMA is needed] + + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/verif/docs/VerifPlans/PMP/runme.sh b/verif/docs/VerifPlans/PMP/runme.sh new file mode 100644 index 00000000000..08508cfb81e --- /dev/null +++ b/verif/docs/VerifPlans/PMP/runme.sh @@ -0,0 +1,34 @@ +############################################################################# +# Copyright (C) 2022 Thales DIS France SAS +# +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0. +# +# Original Author: Zbigniew Chamski (zbigniew.chamski@thalesgroup.com) +############################################################################# +#!/bin/sh + +# Location of project-specific directories +ROOTDIR=`readlink -f $(dirname "${BASH_SOURCE[0]}")` + +# Set up platform location. It can be anywhere but should contain +# a valid `vp_config.py` file in `vptool` directory. +# Here we use the verification tree from the example directory. +export PLATFORM_TOP_DIR="$ROOTDIR" + +# Set the printable name for the project that will be used +# in the human-readable documentation. +export PROJECT_NAME="PMP" + +# Set the alphanumerical identifier of the project that +# will be used to construct file names etc. +export PROJECT_IDENT="PMP" + +# Set the destination directory of Markdown files for this project. +# Since it will be used by VPTOOL, it shall NOT be a relative path. +export MARKDOWN_OUTPUT_DIR=`readlink -f "$ROOTDIR/../source"` + +# Run VPTOOL overriding the default theme from Yaml config with 'winxpblue'. +# FIXME: Introduce a suitably named shell variable that points to the root +# directory of the tool set (TOOL_TOP etc.) +# FORNOW use a hardcoded relative path. +sh $ROOTDIR/../../../core-v-verif/tools/vptool/vptool.sh $* diff --git a/verif/docs/VerifPlans/csr_access/cva6_csr.rst b/verif/docs/VerifPlans/csr_access/cva6_csr.rst index 0d7e8ce2912..cac3081b9af 100644 --- a/verif/docs/VerifPlans/csr_access/cva6_csr.rst +++ b/verif/docs/VerifPlans/csr_access/cva6_csr.rst @@ -540,7 +540,7 @@ The ``sip`` register contains information on pending interrupts. - USIP - - read-write - - A user\-level software interrupt is triggered on the current hart by riting 1 to its user software interrupt\-pending \(USIP\) bit + - A user\-level software interrupt is triggered on the current hart by writing 1 to its user software interrupt\-pending \(USIP\) bit Supervisor Address Translation and Protection Register -------------------------- @@ -1338,7 +1338,7 @@ Address register for Physical Memory Protection. - read-write - Address register for Physical Memory Protection\. -Instuction Cache Register +Instruction Cache Register -------------------------- AddressOffset: 'h700 -------------------------- @@ -2561,7 +2561,7 @@ AddressOffset: 'hF11 -------------------------- Description: -------------------------- -This register provids the JEDEC manufacturer ID of the provider of the core. +This register provides the JEDEC manufacturer ID of the provider of the core. .. list-table:: :widths: 20 20 15 15 40 @@ -2581,7 +2581,7 @@ This register provids the JEDEC manufacturer ID of the provider of the core. - offset - Offset - read-only - - Contain encording for the final byte discarding the parity bit\. + - Contain encoding for the final byte discarding the parity bit\. Machine Architecture ID Register -------------------------- diff --git a/verif/docs/VerifPlans/csr_embedded_access/VP_IP001.yml b/verif/docs/VerifPlans/csr_embedded_access/VP_IP001.yml index 908ccaafdfa..6d8b277cfc4 100644 --- a/verif/docs/VerifPlans/csr_embedded_access/VP_IP001.yml +++ b/verif/docs/VerifPlans/csr_embedded_access/VP_IP001.yml @@ -47,7 +47,7 @@ subfeatures: !!omap description: 'Check the correctness of RISCV CVA6 Read-Only CSRs by writing CSRs in a random order values: Inverted reset, 0xaaaaaaaa, 0x555555, random values. Then confirm that write into RO CSRs generates illegal exception. - Finaly read back the CSR and check register value has not changed and matchs + Finally read back the CSR and check register value has not changed and matches reference model.' reqt_doc: https://docs.openhwgroup.org/projects/cva6-user-manual/01_cva6_user/CV32A6_Control_Status_Registers.html diff --git a/verif/docs/VerifPlans/csr_embedded_access/cva6_embedded_csr.rst b/verif/docs/VerifPlans/csr_embedded_access/cva6_embedded_csr.rst index 29ee70b5ce3..a0066ff8786 100644 --- a/verif/docs/VerifPlans/csr_embedded_access/cva6_embedded_csr.rst +++ b/verif/docs/VerifPlans/csr_embedded_access/cva6_embedded_csr.rst @@ -85,7 +85,7 @@ The ``mstatus`` register keeps track of and controls the hart’s current operat - Indicates whether machine interrupts were enabled prior to trapping into machine mode\. ``Enumerated Values``( "Disabled" :0)( "Enabled" :1)'\n' * - 6 - UBE - - User mode bit endianess + - User mode bit endianness - read-write,WARL - UBE controls whether explicit load and store memory accesses made from U\-mode are little\-endian or big\-endian\.``Legal Values``:0\. ``Enumerated Values``( "Little-endian" :0)( "Big-endian" :1)'\n' * - 5 @@ -193,7 +193,7 @@ This register contains machine interrupt enable bits. - USIE - - read-write,WARL - - enable U\-mode software interrrupts\.``Legal Values:``0\. + - enable U\-mode software interrupts\.``Legal Values:``0\. Machine Trap Vector Register -------------------------- @@ -3239,7 +3239,7 @@ AddressOffset: 'hF11 -------------------------- Description: -------------------------- -This register provids the JEDEC manufacturer ID of the provider of the core. +This register provides the JEDEC manufacturer ID of the provider of the core. .. list-table:: :widths: 20 20 15 15 40 @@ -3259,7 +3259,7 @@ This register provids the JEDEC manufacturer ID of the provider of the core. - offset - Offset - read-only - - Contain encording for the final byte discarding the parity bit\. + - Contain encoding for the final byte discarding the parity bit\. Machine Architecture ID Register -------------------------- diff --git a/verif/docs/VerifPlans/csr_embedded_access/dvplan_csr-embedded-access.md b/verif/docs/VerifPlans/csr_embedded_access/dvplan_csr-embedded-access.md index 343fffcaa05..4e29721fea6 100644 --- a/verif/docs/VerifPlans/csr_embedded_access/dvplan_csr-embedded-access.md +++ b/verif/docs/VerifPlans/csr_embedded_access/dvplan_csr-embedded-access.md @@ -137,7 +137,7 @@ Jean-Roch Coulon - Thales * **Requirement location:** https://docs.openhwgroup.org/projects/cva6-user-manual/01_cva6_user/CV32A6_Control_Status_Registers.html * **Feature Description** - Check the correctness of RISCV CVA6 Read-Only CSRs by writing CSRs in a random order values: Inverted reset, 0xaaaaaaaa, 0x555555, random values. Then confirm that write into RO CSRs generates illegal exception. Finaly read back the CSR and check register value has not changed and matchs reference model. + Check the correctness of RISCV CVA6 Read-Only CSRs by writing CSRs in a random order values: Inverted reset, 0xaaaaaaaa, 0x555555, random values. Then confirm that write into RO CSRs generates illegal exception. Finally read back the CSR and check register value has not changed and matches reference model. * **Verification Goals** 1.Attempt to write a RO CSR. @@ -159,7 +159,7 @@ Jean-Roch Coulon - Thales * **Requirement location:** https://docs.openhwgroup.org/projects/cva6-user-manual/01_cva6_user/CV32A6_Control_Status_Registers.html * **Feature Description** - Check the correctness of RISCV CVA6 all CSR addresses write and read operations by writing random value to CSR address from 0 to 0xFFF in a random order. Then confirm that write into unmapped addresses generates illegal exception. Finaly read the CSRs in a random order and check that it also generates illegal exception in unmapped addresses. + Check the correctness of RISCV CVA6 all CSR addresses write and read operations by writing random value to CSR address from 0 to 0xFFF in a random order. Then confirm that write into unmapped addresses generates illegal exception. Finally read the CSRs in a random order and check that it also generates illegal exception in unmapped addresses. * **Verification Goals** 1.Write and read all CSR addresses. diff --git a/verif/docs/VerifPlans/source/dvplan_CVXIF.md b/verif/docs/VerifPlans/source/dvplan_CVXIF.md index ba6de7ee0fd..1c67cde5710 100644 --- a/verif/docs/VerifPlans/source/dvplan_CVXIF.md +++ b/verif/docs/VerifPlans/source/dvplan_CVXIF.md @@ -192,7 +192,7 @@ *(none)* -### Sub-feature: 006_issue uniquness +### Sub-feature: 006_issue uniqueness #### Item: 000 @@ -283,7 +283,7 @@ *(none)* -### Sub-feature: 001_commit transaction uniquness +### Sub-feature: 001_commit transaction uniqueness #### Item: 000 @@ -392,7 +392,7 @@ *(none)* -### Sub-feature: 002_result transaction uniquness +### Sub-feature: 002_result transaction uniqueness #### Item: 000 diff --git a/verif/docs/VerifPlans/source/dvplan_FENCEI.md b/verif/docs/VerifPlans/source/dvplan_FENCEI.md index 2f77ee43e26..395788e4f04 100644 --- a/verif/docs/VerifPlans/source/dvplan_FENCEI.md +++ b/verif/docs/VerifPlans/source/dvplan_FENCEI.md @@ -80,7 +80,7 @@ https://riscv.org/wp-content/uploads/2019/12/riscv-spec-20191213.pdf After a fence.i instruction has been executed, all preceding store instructions shall have their effects visible to the instruction fetch of the instructions that are to be executed after the fence.i instruction. * **Verification Goals** - Let the instruction right before a fence.i write a different instruction to the address following the fence.i, then observe that the written instruction is executed instead of the original one and that no side-effects (csr updates or otherwise) occur (can possibly mix 16bit/32bit instructions to force a noticable difference). + Let the instruction right before a fence.i write a different instruction to the address following the fence.i, then observe that the written instruction is executed instead of the original one and that no side-effects (csr updates or otherwise) occur (can possibly mix 16bit/32bit instructions to force a noticeable difference). * **Pass/Fail Criteria:** Self-Check * **Test Type:** Directed SelfChk * **Coverage Method:** Testcase @@ -259,7 +259,7 @@ https://riscv.org/wp-content/uploads/2019/12/riscv-spec-20191213.pdf *(none)* -### Sub-feature: 007_AckWithold +### Sub-feature: 007_AckWithhold #### Item: 000 @@ -269,7 +269,7 @@ https://riscv.org/wp-content/uploads/2019/12/riscv-spec-20191213.pdf If req is high, but ack never comes, then the core keeps on stalling and the fence.i is blocked from completing. * **Verification Goals** - Upon a req, try witholding ack for a long time and see that the fence.i can be stalled arbitrarily long (should have covers for ack delays of at least {[0:5]}). + Upon a req, try withholding ack for a long time and see that the fence.i can be stalled arbitrarily long (should have covers for ack delays of at least {[0:5]}). * **Pass/Fail Criteria:** Assertion * **Test Type:** ENV Capability * **Coverage Method:** Functional Coverage @@ -308,7 +308,7 @@ https://riscv.org/wp-content/uploads/2019/12/riscv-spec-20191213.pdf * **Requirement location:** CVA6 User Manual; https://cva6.readthedocs.io/en/latest/01_cva6_user/RISCV_Instructions.html#rv32zifencei-instruction-fetch-fence * **Feature Description** - If the fence.i ends up not retiring because it was preceeded by a taken branch or a jump, then the fencei_flush_req_o shall not go high + If the fence.i ends up not retiring because it was preceded by a taken branch or a jump, then the fencei_flush_req_o shall not go high * **Verification Goals** Take a branch or do a jump to skip a fence.i, and ensure that fencei_flush_req_o doesn't go high. @@ -354,7 +354,7 @@ https://riscv.org/wp-content/uploads/2019/12/riscv-spec-20191213.pdf * **Requirement location:** CVA6 User Manual; https://cva6.readthedocs.io/en/latest/01_cva6_user/RISCV_Instructions.html#rv32zifencei-instruction-fetch-fenceThis is a pointer to the source Requirements document of the Features in question. The pointer should state the version of the target document. It is free-form, so it can also indicate the specific section/page/paragraph. * **Feature Description** - Any store instruction that is successfully executed before a fence.i will fully complete and have its effect visible (this is not about syncronization with instruction fetch, but rather seeing that the stores are not aborted). + Any store instruction that is successfully executed before a fence.i will fully complete and have its effect visible (this is not about synchronization with instruction fetch, but rather seeing that the stores are not aborted). * **Verification Goals** Check that all stores (either to next pc or other places) preceding a fence.i will complete on the bus (excluding exceptions/interrupts/etc) and be readable afterwards (particularly, ensure that the write buffer isn't just purged). @@ -375,7 +375,7 @@ https://riscv.org/wp-content/uploads/2019/12/riscv-spec-20191213.pdf * **Requirement location:** CVA6 User Manual; https://cva6.readthedocs.io/en/latest/01_cva6_user/RISCV_Instructions.html#rv32zifencei-instruction-fetch-fence * **Feature Description** - Any store instruction that is successfully executed before a fence.i will fully complete and have its effect visible (this is not about syncronization with instruction fetch, but rather seeing that the stores are not aborted). + Any store instruction that is successfully executed before a fence.i will fully complete and have its effect visible (this is not about synchronization with instruction fetch, but rather seeing that the stores are not aborted). * **Verification Goals** Check that all stores (either to next pc or other places) preceding a fence.i will complete on the bus (excluding exceptions/interrupts/etc) and be readable afterwards (particularly, ensure that the write buffer isn't just purged). @@ -398,7 +398,7 @@ https://riscv.org/wp-content/uploads/2019/12/riscv-spec-20191213.pdf * **Requirement location:** CVA6 User Manual; https://cva6.readthedocs.io/en/latest/01_cva6_user/RISCV_Instructions.html#rv32zifencei-instruction-fetch-fence * **Feature Description** - When fence.i is executed, then any prefetched instructions shall be flushed; meaning that pipeline stages are flushed, prefetcher is flushed, write buffer is flushed, and data_req_o is eventually supressed. + When fence.i is executed, then any prefetched instructions shall be flushed; meaning that pipeline stages are flushed, prefetcher is flushed, write buffer is flushed, and data_req_o is eventually suppressed. * **Verification Goals** Check that a fence.i will cause flushing of the pipeline, prefetcher, write buffer, and data_req_o. diff --git a/verif/docs/VerifPlans/source/dvplan_FRONTEND.md b/verif/docs/VerifPlans/source/dvplan_FRONTEND.md index 0910860f260..ab90d885427 100644 --- a/verif/docs/VerifPlans/source/dvplan_FRONTEND.md +++ b/verif/docs/VerifPlans/source/dvplan_FRONTEND.md @@ -53,7 +53,7 @@ * **Requirement location:** FRONTEND sub-system/functionality/PC generation stage/Branch Predict * **Feature Description** - If instruction is a RET and RAS (Return Address Stack) returns a valid address and RET has already been consummed by instruction queue. Else RET is considered as a control flow instruction but next PC is not predicted. A mispredict wil be generated. + If instruction is a RET and RAS (Return Address Stack) returns a valid address and RET has already been consumed by instruction queue. Else RET is considered as a control flow instruction but next PC is not predicted. A mispredict wil be generated. * **Verification Goals** Execute test with RET instructions. Functional cov: RET is executed and RAS output is not valid. @@ -225,7 +225,7 @@ The Branch History table is a two-bit saturation counter that takes the virtual address of the current fetched instruction by the CACHE. It states whether the current branch request should be taken or not. The two bit counter is updated by the successive execution of the current instructions as shown in the following figure. * **Verification Goals** - Execute a serie of taken and not taken branch to check the saturation mechanism + Execute a series of taken and not taken branch to check the saturation mechanism * **Pass/Fail Criteria:** NDY (Not Defined Yet) * **Test Type:** NDY (Not Defined Yet) * **Coverage Method:** NDY (Not Defined Yet) diff --git a/verif/docs/VerifPlans/source/dvplan_ISA_RV32.md b/verif/docs/VerifPlans/source/dvplan_ISA_RV32.md index 5e625de9c01..6df0dbd7947 100644 --- a/verif/docs/VerifPlans/source/dvplan_ISA_RV32.md +++ b/verif/docs/VerifPlans/source/dvplan_ISA_RV32.md @@ -517,7 +517,7 @@ isacov.rv32i_sltiu_cg.cp_immi_toggle slli rd, rs, imm[4:0] rd = rs << imm[4:0] - Zeros are shirfted into lower bits + Zeros are shifted into lower bits * **Verification Goals** Register operands: @@ -544,7 +544,7 @@ isacov.rv32i_slli_cg.cp_rd_rs1_hazard slli rd, rs, imm[4:0] rd = rs << imm[4:0] - Zeros are shirfted into lower bits + Zeros are shifted into lower bits * **Verification Goals** Input operands: @@ -573,7 +573,7 @@ isacov.rv32i_slli_cg.cp_rs1_toggle slli rd, rs, imm[4:0] rd = rs << imm[4:0] - Zeros are shirfted into lower bits + Zeros are shifted into lower bits * **Verification Goals** Output result: @@ -600,7 +600,7 @@ isacov.rv32i_slli_cg.cp_rd_toggle srli rd, rs, imm[4:0] rd = rs >> imm[4:0] - Zeros are shirfted into upper bits + Zeros are shifted into upper bits * **Verification Goals** Register operands: @@ -627,7 +627,7 @@ isacov.rv32i_srli_cg.cp_rd_rs1_hazard srli rd, rs, imm[4:0] rd = rs >> imm[4:0] - Zeros are shirfted into upper bits + Zeros are shifted into upper bits * **Verification Goals** Input operands: @@ -656,7 +656,7 @@ isacov.rv32i_srli_cg.cp_rs1_toggle srli rd, rs, imm[4:0] rd = rs >> imm[4:0] - Zeros are shirfted into upper bits + Zeros are shifted into upper bits * **Verification Goals** Output result: @@ -739,7 +739,7 @@ isacov.rv32i_srai_cg.cp_rs1_toggle srli rd, rs, imm[4:0] rd = rs >> imm[4:0] - Zeros are shirfted into upper bits + Zeros are shifted into upper bits * **Verification Goals** Output result: @@ -1550,7 +1550,7 @@ isacov.rv32i_sltu_cg.cp_rs2_toggle sll rd, rs1, rs2 rd = rs1 << rs2[4:0] - Zeros are shirfted into lower bits + Zeros are shifted into lower bits * **Verification Goals** Register operands: @@ -1581,7 +1581,7 @@ isacov.rv32i_sll_cg.cp_rd_rs2_hazard sll rd, rs1, rs2 rd = rs1 << rs2[4:0] - Zeros are shirfted into lower bits + Zeros are shifted into lower bits * **Verification Goals** Input operands: @@ -1610,7 +1610,7 @@ isacov.rv32i_sll_cg.cp_rs1_toggle sll rd, rs1, rs2 rd = rs1 << rs2[4:0] - Zeros are shirfted into lower bits + Zeros are shifted into lower bits * **Verification Goals** Output result: @@ -1639,7 +1639,7 @@ isacov.rv32i_sll_cg.cp_rd_toggle srl rd, rs1, rs2 rd = rs1 >> rs2[4:0] - Zeros are shirfted into upper bits + Zeros are shifted into upper bits * **Verification Goals** Register operands: @@ -1670,7 +1670,7 @@ isacov.rv32i_srl_cg.cp_rd_rs2_hazard srl rd, rs1, rs2 rd = rs1 >> rs2[4:0] - Zeros are shirfted into upper bits + Zeros are shifted into upper bits * **Verification Goals** Input operands: @@ -1699,7 +1699,7 @@ isacov.rv32i_srl_cg.cp_rs1_toggle srl rd, rs1, rs2 rd = rs1 >> rs2[4:0] - Zeros are shirfted into upper bits + Zeros are shifted into upper bits * **Verification Goals** Output result: @@ -1786,7 +1786,7 @@ isacov.rv32i_sra_cg.cp_rs1_toggle sra rd, rs1, rs2 rd = rs1 >> rs2[4:0] - Zeros are shirfted into upper bits + Zeros are shifted into upper bits * **Verification Goals** Output result: @@ -3946,7 +3946,7 @@ isacov.rv32m_remu_cg.cp_rd_toggle Exception: - Misaligned address (non-32-bit aligned) will always cause exceptio + Misaligned address (non-32-bit aligned) will always cause exception * **Pass/Fail Criteria:** Check RM * **Test Type:** Constrained Random * **Coverage Method:** Functional Coverage @@ -7054,7 +7054,7 @@ isacov.rv32m_remu_cg.cp_rd_toggle * **Requirement location:** ./RISCV_Instructions.rst * **Feature Description** - All suported instructions for the core are executed + All supported instructions for the core are executed * **Verification Goals** Instruction is executed @@ -7073,7 +7073,7 @@ isacov.rv32m_remu_cg.cp_rd_toggle * **Requirement location:** ./RISCV_Instructions.rst * **Feature Description** - All suported instructions for the core are executed + All supported instructions for the core are executed * **Verification Goals** All back-to-back supported instruction sequences are executed @@ -7178,7 +7178,7 @@ isacov.rv32m_remu_cg.cp_rd_toggle CSR writes from the program are executed in conjunction with all instruction groups * **Verification Goals** - Each instruction group is executed after each supported CSR is written with a Zicsri write instructio + Each instruction group is executed after each supported CSR is written with a Zicsri write instruction * **Pass/Fail Criteria:** NDY (Not Defined Yet) * **Test Type:** NDY (Not Defined Yet) * **Coverage Method:** NDY (Not Defined Yet) diff --git a/verif/docs/VerifPlans/source/dvplan_MMU_SV32.md b/verif/docs/VerifPlans/source/dvplan_MMU_SV32.md index 55cd6efa671..a2b5d014001 100644 --- a/verif/docs/VerifPlans/source/dvplan_MMU_SV32.md +++ b/verif/docs/VerifPlans/source/dvplan_MMU_SV32.md @@ -12,8 +12,8 @@ If PTE has valid and non-reserved RWX permissions, but the translated Physical address (pte.ppn of leaf PTE + offset) does not have (r,w,x) PMP permissions, then accessing the translated Physical address would raise access fault exception. When satp.mode=sv32, and PTE has valid and non-reserved RWX permissions then test the following in supervisor and user privilege mode for level1 and level0 PTE. - - Remove read PMP permission of translated Physical Address in pmpcfg and test the read acces. - - Remvoe write PMP permission of translated Physical Address in pmpcfg and test the write access. + - Remove read PMP permission of translated Physical Address in pmpcfg and test the read access. + - Remove write PMP permission of translated Physical Address in pmpcfg and test the write access. - Remove execute PMP permission of translated Physical Address in pmpcfg and test the execute access. * **Verification Goals** @@ -42,8 +42,8 @@ If PTE does not have (r,w,x) PMP permissions, then accessing it would raise access fault exception of the corresponding access type. When satp.mode=sv32, then test the following in supervisor and user privilege mode for level0 and level1 PTE. - - Remove read PMP permission of PTE address in pmpcfg and test the read acces. - - Remvoe write PMP permission of PTE address in pmpcfg and test the write access. + - Remove read PMP permission of PTE address in pmpcfg and test the read access. + - Remove write PMP permission of PTE address in pmpcfg and test the write access. - Remove execute PMP permission of PTE address in pmpcfg and test the execute access. * **Verification Goals** @@ -67,16 +67,16 @@ #### Item: 000 -* **Requirement location:** ISA Volume II: Privilege Architecture Version 20211203, Chpter 5.3.2 +* **Requirement location:** ISA Volume II: Privilege Architecture Version 20211203, Chapter 5.3.2 * **Feature Description** If PTE does not have Valid (pte.V=0) permission, then accessing it would raise page fault exception of the corresponding access type. When satp.mode=sv32 and PTE has (r,w,x) PMP permissions, then test the following in supervisor and user privilege mode for level0 and level1 PTE. - - Set PTE.V = 0 and test the read acces. + - Set PTE.V = 0 and test the read access. - Set PTE.V = 0 and test the write access. - Set PTE.V = 0 and test the execute access. - * For testing at level0, set all the pte perimssions at level1 to 0 except pte.v, so that level1 points to level0. + * For testing at level0, set all the pte permissions at level1 to 0 except pte.v, so that level1 points to level0. * Set pte.U=0 when test in Supervisor mode and Set pte.U=1 when testing in user mode * **Verification Goals** @@ -105,11 +105,11 @@ If PTE has reserved RWX encodings (pte.w=1 & pte.r=0), then accessing it would raise page fault exception of the corresponding access type. When satp.mode=sv32, PTE has (r,w,x) PMP permissions, and pte.v=1, then test the following in supervisor and user privilege mode for level0 and level1 PTE. - - Set pte.w=1 & pte.r=0 and test the read acces. + - Set pte.w=1 & pte.r=0 and test the read access. - Set pte.w=1 & pte.r=0 and test the write access. - Set pte.w=1 & pte.r=0 and test the execute access. - * For testing at level0, set all the pte perimssions at level1 to 0 except pte.v, so that level1 points to level0. + * For testing at level0, set all the pte permissions at level1 to 0 except pte.v, so that level1 points to level0. * Set pte.U=0 when test in Supervisor mode and Set pte.U=1 when testing in user mode * **Verification Goals** @@ -138,11 +138,11 @@ If PTE at level0 has non-leaf RWX permissions (pte.x=0 & pte.r=0), then accessing it would raise page fault exception of the corresponding access type. When satp.mode=sv32, PTE has (r,w,x) PMP permissions, and pte.v=1, then test the following in supervisor and user privilege mode for level0 PTE. - - Set pte.x=0 & pte.r=0 & pte.w=0 and test the read acces. + - Set pte.x=0 & pte.r=0 & pte.w=0 and test the read access. - Set pte.x=0 & pte.r=0 & pte.w=0 and test the write access. - Set pte.x=0 & pte.r=0 & pte.w=0 and test the execute access. - * For testing at level0, set all the pte perimssions at level1 to 0 except pte.v, so that level1 points to level0. + * For testing at level0, set all the pte permissions at level1 to 0 except pte.v, so that level1 points to level0. * Set pte.U=0 when test in Supervisor mode and Set pte.U=1 when testing in user mode * **Verification Goals** @@ -175,7 +175,7 @@ - Test the write access for both pte.w=1 and for pte.w=0 - Test the execute access for both pte.x=1 and for pte.x=0 - * For testing at level0, set all the pte perimssions at level1 to 0 except pte.v, so that level1 points to level0. + * For testing at level0, set all the pte permissions at level1 to 0 except pte.v, so that level1 points to level0. * **Verification Goals** RWX access should be successful if the corresponding permissions are granted in the PTE. Check that load, store and execute works without any page fault. @@ -204,11 +204,11 @@ If PTE belongs to supervisor mode i.e. its U permission bit is clear (pte.u = 0), then accessing that PTE in user mode would raise page fault exception of the corresponding access type. When satp.mode=sv32, PTE has (r,w,x) PMP permissions, PTE has non-reserved RWX encoding, and pte.v=1, then test the following user privilege mode for level0 and level1 PTE. - - Set pte.u=0 and test the read acces. + - Set pte.u=0 and test the read access. - Set pte.u=0 and test the write access. - Set pte.u=0 and test the execute access. - * For testing at level0, set all the pte perimssions at level1 to 0 except pte.v, so that level1 points to level0. + * For testing at level0, set all the pte permissions at level1 to 0 except pte.v, so that level1 points to level0. * **Verification Goals** Page fault exception should be raised according to {x,r,w} access type. Check that: @@ -233,11 +233,11 @@ If PTE belongs to user mode i.e. its U permission bit is set (pte.u = 1) and m/sstatus.SUM = 0, then accessing that PTE in supervisor mode would raise page fault exception of the corresponding access type. When satp.mode=sv32, PTE has (r,w,x) PMP permissions, PTE has non-reserved RWX encoding, and pte.v=1, then test the following in supervisor mode for level 0 and level 1 PTE. - - Set pte.u=1 & s/mstatus.SUM = 0 and test the read acces. + - Set pte.u=1 & s/mstatus.SUM = 0 and test the read access. - Set pte.u=1 & s/mstatus.SUM = 0 and test the write access. - Set pte.u=1 & s/mstatus.SUM = 0 and test the execute access. - * For testing at level0, set all the pte perimssions at level1 to 0 except pte.v, so that level1 points to level0. + * For testing at level0, set all the pte permissions at level1 to 0 except pte.v, so that level1 points to level0. * **Verification Goals** Page fault exception should be raised according to {x,r,w} access type. Check that: @@ -265,14 +265,14 @@ If PTE belongs to user mode i.e. its U permission bit is set (pte.u = 1) and m/sstatus.SUM = 1, then RW access to that PTE in supervisor mode would be successful but eXecute access would raise instruction page fault exception in s-mode. When satp.mode=sv32, PTE has (r,w,x) PMP permissions, PTE has non-reserved RWX encoding, and pte.v=1, then test the following in supervisor mode for level0 and level1 PTE. - - Set pte.r=1 & pte.u=1 & s/mstatus.SUM = 1 and test the read acces. + - Set pte.r=1 & pte.u=1 & s/mstatus.SUM = 1 and test the read access. - Set pte.w=1 & pte.u=1 & s/mstatus.SUM = 1 and test the write access. - Set pte.x=1 & pte.u=1 & s/mstatus.SUM = 1 and test the execute access. - * For testing at level0, set all the pte perimssions at level1 to 0 except pte.v, so that level1 points to level0. + * For testing at level0, set all the pte permissions at level1 to 0 except pte.v, so that level1 points to level0. * **Verification Goals** - Read and Write access to the PTE should be successful. So, check that the load and store works without page fault and expected data is stored to and loaded from the memory, repectively. + Read and Write access to the PTE should be successful. So, check that the load and store works without page fault and expected data is stored to and loaded from the memory, respectively. Execute access should raise instruction page fault. Check that: - m/scause must contain the exception number of instruction instruction access fault. @@ -300,7 +300,7 @@ - Test the write access for both pte.w=1 and for pte.w=0 - Test the execute access for both pte.x=1 and for pte.x=0 - * For testing at level0, set all the pte perimssions at level1 to 0 except pte.v, so that level1 points to level0. + * For testing at level0, set all the pte permissions at level1 to 0 except pte.v, so that level1 points to level0. * **Verification Goals** RWX access should be successful if the corresponding permissions are granted in the PTE. Check that load, store and execute works without any page fault. @@ -330,9 +330,9 @@ If PTE has only execute permission (pte.x = 1) and s/mstatus.MXR=0, then read access on that PTE should raise load page fault exception. When satp.mode=sv32, PTE has (r,w,x) PMP permissions, and pte.v=1, then test the following in supervisor and user privilege mode for level0 and level1 PTE. - - Set pte.r=0 & pte.w=0 & pte.x=1 & s/mstatus.MXR=0 and test the read acces. + - Set pte.r=0 & pte.w=0 & pte.x=1 & s/mstatus.MXR=0 and test the read access. - * For testing at level0, set all the pte perimssions at level1 to 0 except pte.v, so that level1 points to level0. + * For testing at level0, set all the pte permissions at level1 to 0 except pte.v, so that level1 points to level0. * Set pte.U=0 when test in Supervisor mode and Set pte.U=1 when testing in user mode * **Verification Goals** @@ -358,9 +358,9 @@ If PTE has only execute permission (pte.x = 1) and s/mstatus.MXR=1, then read access on that PTE should be successful without having explicit read permission (pte.r=0). When satp.mode=sv32, PTE has (r,w,x) PMP permissions, and pte.v=1, then test the following in supervisor and user privilege mode for level0 and level1 PTE. - - Set pte.r=0 & pte.w=0 & pte.x=1 & s/mstatus.MXR=1 and test the read acces. + - Set pte.r=0 & pte.w=0 & pte.x=1 & s/mstatus.MXR=1 and test the read access. - * For testing at level0, set all the pte perimssions at level1 to 0 except pte.v, so that level1 points to level0. + * For testing at level0, set all the pte permissions at level1 to 0 except pte.v, so that level1 points to level0. * Set pte.U=0 when test in Supervisor mode and Set pte.U=1 when testing in user mode * **Verification Goals** @@ -404,12 +404,12 @@ * **Feature Description** If implementation does not sets the pte.A on accessing the PTE, and PTE has pte.A=0, then accessing it would raise page fault exception of the corresponding access type. - When satp.mode=sv32, PTE has (r,w,x) PMP permissions, and pte.v=1, then test the following in supervisor and user privilege mode for level0 and level1 PTE. Execute sfence.vma before accessign the PTE. - - Set pte.r=1 & pte.a=0 and test the read acces. + When satp.mode=sv32, PTE has (r,w,x) PMP permissions, and pte.v=1, then test the following in supervisor and user privilege mode for level0 and level1 PTE. Execute sfence.vma before accessing the PTE. + - Set pte.r=1 & pte.a=0 and test the read access. - Set pte.w=1 & pte.a=0 and test the write access. - Set pte.x=1 & pte.a=0 and test the execute access. - * For testing at level0, set all the pte perimssions at level1 to 0 except pte.v, so that level1 points to level0. + * For testing at level0, set all the pte permissions at level1 to 0 except pte.v, so that level1 points to level0. * Set pte.U=0 when test in Supervisor mode and Set pte.U=1 when testing in user mode. * **Verification Goals** @@ -437,10 +437,10 @@ * **Feature Description** If implementation does not sets the pte.D when PTE is written, and PTE has pte.D=0, then attempting to store on that PTE would raise Store/AMO page fault exception. - When satp.mode=sv32, PTE has (r,w,x) PMP permissions, pte.a=1 and pte.v=1, then test the following in supervisor and user privilege mode for level0 and level1 PTE. Execute sfence.vma before accessign the PTE. + When satp.mode=sv32, PTE has (r,w,x) PMP permissions, pte.a=1 and pte.v=1, then test the following in supervisor and user privilege mode for level0 and level1 PTE. Execute sfence.vma before accessing the PTE. - Set pte.w=1 & pte.d=0 and test the write access. - * For testing at level0, set all the pte perimssions at level1 to 0 except pte.v, so that level1 points to level0. + * For testing at level0, set all the pte permissions at level1 to 0 except pte.v, so that level1 points to level0. * Set pte.U=0 when test in Supervisor mode and Set pte.U=1 when testing in user mode. * **Verification Goals** @@ -563,10 +563,10 @@ * **Requirement location:** ISA Volume II: Privilege Architecture Version 20211203, Chapter 5.1.11 * **Feature Description** - Selecting MODE=Bare the remaining feild should be zero. Other encoding for remaining feild in satp is reserved + Selecting MODE=Bare the remaining field should be zero. Other encoding for remaining field in satp is reserved * **Verification Goals** - Show wirting {zero, non-zero} value to satp when mode=bare the behaviour follows the design implemention + Show writing {zero, non-zero} value to satp when mode=bare the behaviour follows the design implementation * **Pass/Fail Criteria:** Check RM * **Test Type:** RISC-V Arch-test * **Coverage Method:** Testcase diff --git a/verif/docs/VerifPlans/source/dvplan_PMP.md b/verif/docs/VerifPlans/source/dvplan_PMP.md new file mode 100644 index 00000000000..184e3882799 --- /dev/null +++ b/verif/docs/VerifPlans/source/dvplan_PMP.md @@ -0,0 +1,16607 @@ +# Module: PMP + +## Feature: TRISTAN Restrictions + +### Sub-feature: 000_general + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + + the verif plan is written for 32bits architecture only +* **Verification Goals** + + +* **Pass/Fail Criteria:** NDY (Not Defined Yet) +* **Test Type:** NDY (Not Defined Yet) +* **Coverage Method:** NDY (Not Defined Yet) +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F000_S000_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 001_number of harts + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + + there is only 1 hart in cv32a6 +* **Verification Goals** + + +* **Pass/Fail Criteria:** NDY (Not Defined Yet) +* **Test Type:** NDY (Not Defined Yet) +* **Coverage Method:** NDY (Not Defined Yet) +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F000_S001_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 002_mxlen + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + + MXLEN is always 32bits +* **Verification Goals** + + +* **Pass/Fail Criteria:** NDY (Not Defined Yet) +* **Test Type:** NDY (Not Defined Yet) +* **Coverage Method:** NDY (Not Defined Yet) +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F000_S002_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 003_xlen + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + + XLEN=MXLEN=32, so the PMP address registers are XLEN bits long, so no zero-extension needed +* **Verification Goals** + + +* **Pass/Fail Criteria:** NDY (Not Defined Yet) +* **Test Type:** NDY (Not Defined Yet) +* **Coverage Method:** NDY (Not Defined Yet) +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F000_S003_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 004_granularity + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + + PMP granularity is 8 bytes (G=1), but the verif plan is written to take G=0 into account (NA4) +* **Verification Goals** + + +* **Pass/Fail Criteria:** NDY (Not Defined Yet) +* **Test Type:** NDY (Not Defined Yet) +* **Coverage Method:** NDY (Not Defined Yet) +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F000_S004_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 005_number of pmp entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + + there are 8 HW implemented PMP entries +* **Verification Goals** + + +* **Pass/Fail Criteria:** NDY (Not Defined Yet) +* **Test Type:** NDY (Not Defined Yet) +* **Coverage Method:** NDY (Not Defined Yet) +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F000_S005_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 006_hardwired regions + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + + none of the 8 PMP entries is hardwired privileges +* **Verification Goals** + + +* **Pass/Fail Criteria:** NDY (Not Defined Yet) +* **Test Type:** NDY (Not Defined Yet) +* **Coverage Method:** NDY (Not Defined Yet) +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F000_S006_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 007_virtual memory + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + + no virtual memory is implemented + as a consequence no page-based virtual memory is implemented +* **Verification Goals** + + +* **Pass/Fail Criteria:** NDY (Not Defined Yet) +* **Test Type:** NDY (Not Defined Yet) +* **Coverage Method:** NDY (Not Defined Yet) +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F000_S007_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 008_physical memory regions + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + + the list of all physical memory regions + - system memory regions + - I-$ + - D-$ + - I-scratchpad (preload mode) + - I-scratchpad (functional mode) + - D-scratchpad + - ahb_periph +* **Verification Goals** + + +* **Pass/Fail Criteria:** NDY (Not Defined Yet) +* **Test Type:** NDY (Not Defined Yet) +* **Coverage Method:** NDY (Not Defined Yet) +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F000_S008_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 009_pmp entry disabling + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + + we assume an already written PMP entry (i) can be disabled + - if L=0, by clearing pmpcfg(i) + - if L=1, only by hart reset +* **Verification Goals** + + +* **Pass/Fail Criteria:** NDY (Not Defined Yet) +* **Test Type:** NDY (Not Defined Yet) +* **Coverage Method:** NDY (Not Defined Yet) +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F000_S009_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 010_access-faults (violations) + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + + The testbench/testcases architecture ensures that: + - any time there is an access-fault type, we check it matches the related access-type + - all violations are trapped at the processor + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP violations are always trapped precisely at the processor +* **Verification Goals** + + +* **Pass/Fail Criteria:** NDY (Not Defined Yet) +* **Test Type:** NDY (Not Defined Yet) +* **Coverage Method:** NDY (Not Defined Yet) +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F000_S010_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 011_testcases modularity + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + + The verif plan is written assuming there is a way (like SystemVerilog interaction): + - to factorize the testcases in code blocks (in particular configuration code block and access code block) + - to randomize the code blocks data and addresses + - to randomize the sequence of code blocks +* **Verification Goals** + + +* **Pass/Fail Criteria:** NDY (Not Defined Yet) +* **Test Type:** NDY (Not Defined Yet) +* **Coverage Method:** NDY (Not Defined Yet) +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F000_S011_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 012_access types + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + at the time of writing, + the verif plan makes no distinction between load and load-reserved instructions. they are gathered in the same access type, subtleties unknown + the verif plan makes no distinction between store, store-conditional, and AMO instructions. they are gathered in the same access type, subtleties unknown +* **Verification Goals** + + +* **Pass/Fail Criteria:** NDY (Not Defined Yet) +* **Test Type:** NDY (Not Defined Yet) +* **Coverage Method:** NDY (Not Defined Yet) +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F000_S012_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 013_multiple accesses instructions + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + + we assume there is no added value to test multiple accesses instructions +* **Verification Goals** + + +* **Pass/Fail Criteria:** NDY (Not Defined Yet) +* **Test Type:** NDY (Not Defined Yet) +* **Coverage Method:** NDY (Not Defined Yet) +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F000_S013_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 014_misaligned instructions + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + + we assume that instructions are mandatorily aligned +* **Verification Goals** + + +* **Pass/Fail Criteria:** NDY (Not Defined Yet) +* **Test Type:** NDY (Not Defined Yet) +* **Coverage Method:** NDY (Not Defined Yet) +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F000_S014_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +## Feature: PMP granularity + +### Sub-feature: 000_granularity_check + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 59 Volume II: RISC-V Privileged Architectures V20211203} + + Software may determine the PMP granularity by writing zero to pmp0cfg, then writing all ones to pmpaddr0, then reading back pmpaddr0. + If G is the index of the least-significant bit set, the PMP granularity is 2G+2 bytes. +* **Verification Goals** + + determine the PMP granularity 2^(G+2) bytes by writing zero to pmp(0)cfg, then writing all ones to pmpaddr(0), then reading back pmpaddr(0). G is the index G of the least-significant bit set +* **Pass/Fail Criteria:** Other +* **Test Type:** Directed Non-SelfChk +* **Coverage Method:** Testcase +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F001_S000_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR07-b + Software may determine the PMP granularity by writing zero to pmp0cfg, then writing all ones to pmpaddr0, then reading back pmpaddr0. + If G is the index of the least-significant bit set, the PMP granularity is 2G+2 bytes. + + + TST01 (HIGH-PRIO) => FTR07-b + [determine the PMP granularity 2^(G+2) bytes by writing zero to pmp(0)cfg, then writing all ones to pmpaddr(0), then reading back pmpaddr(0). G is the index G of the least-significant bit set] +## Feature: CSRs M-mode only + +### Sub-feature: 000_configure_1_pmp_entry + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Section 3.7.1 Page 57 Volume II: RISC-V Privileged Architectures V20211203} + + PMP CSRs are only accessible to M-mode +* **Verification Goals** + + configure 1 PMP entry (i) (the 1st one), + - check for each PMP entry (i) reset value (read zero) by reading in M mode + - check for each PMP entry (i) that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes + - check for each PMP entry (i) that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for each PMP entry (i) that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F002_S001_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST02(group) => FTR02-d + [check that all 8 HW implemented PMP entries are writable/readable in M-mode (L=0)] + [check that no HW implemented PMP entry are writable/readable in S or U modes (L=0)] + - random values may be used + - before any configuration (after hart reset), check all pmp(i)cfg and pmpaddr(i) are M-mode read zero + + TST02-1 (HIGH-PRIO) + [configure 1 PMP entry ([FTR02-b1]: maybe mandatorily the first one): with L=0, + - if possible, the PMP entry number is a configurable parameter + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes] +### Sub-feature: 001_configure_2_pmp_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Section 3.7.1 Page 57 Volume II: RISC-V Privileged Architectures V20211203} + + PMP CSRs are only accessible to M-mode +* **Verification Goals** + + configure 2 PMP entries (the 2 first ones in incrementing order), + - reuse of VP_PMP_F002_S001_I000 sequence +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F002_S002_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST02(group) => FTR02-d + [check that all 8 HW implemented PMP entries are writable/readable in M-mode (L=0)] + [check that no HW implemented PMP entry are writable/readable in S or U modes (L=0)] + - random values may be used + - before any configuration (after hart reset), check all pmp(i)cfg and pmpaddr(i) are M-mode read zero + + TST02-2 (LOW-PRIO) = 2 times reuse/call of TST02-1 + [configure 2 PMP entries ([FTR02-b1]: maybe mandatorily the 2 first ones): both with L=0, + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes] +### Sub-feature: 002_configure_N_pmp_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Section 3.7.1 Page 57 Volume II: RISC-V Privileged Architectures V20211203} + + PMP CSRs are only accessible to M-mode +* **Verification Goals** + + configure N PMP entries (the N first ones in incrementing order), + - reuse of VP_PMP_F002_S001_I000 sequence +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F002_S003_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST02(group) => FTR02-d + [check that all 8 HW implemented PMP entries are writable/readable in M-mode (L=0)] + [check that no HW implemented PMP entry are writable/readable in S or U modes (L=0)] + - random values may be used + - before any configuration (after hart reset), check all pmp(i)cfg and pmpaddr(i) are M-mode read zero + + TST02-3 (LOW-PRIO) = N times reuse/call of TST02-1 + [configure N PMP entries ([FTR02-b1]: maybe mandatorily the N first ones): all with L=0, + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes] +### Sub-feature: 003_configure_8_pmp_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Section 3.7.1 Page 57 Volume II: RISC-V Privileged Architectures V20211203} + + PMP CSRs are only accessible to M-mode +* **Verification Goals** + + configure all 8 PMP entries (in incrementing order), + - reuse of VP_PMP_F002_S001_I000 sequence +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F002_S004_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST02(group) => FTR02-d + [check that all 8 HW implemented PMP entries are writable/readable in M-mode (L=0)] + [check that no HW implemented PMP entry are writable/readable in S or U modes (L=0)] + - random values may be used + - before any configuration (after hart reset), check all pmp(i)cfg and pmpaddr(i) are M-mode read zero + + TST02-4 (HIGH-PRIO) = 8 times reuse/call of TST02-1 + [configure 8 PMP entries: all with L=0, + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes] +## Feature: CSRs locked access + +### Sub-feature: 000_configure_1_pmp_entry + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + + The L bit indicates that the PMP entry is locked, i.e., writes to the configuration register and associated address registers are ignored + If PMP entry (i) is locked, writes to pmp(i)cfg and pmpaddr(i) are ignored + Locked PMP entries remain locked until the hart is reset + + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + + Setting the L bit locks the PMP entry even when the A field is set to OFF + + Additionally, if PMP entry (i) is locked and pmp(i)cfg.A is set to TOR, writes to pmpaddr(i-1) are ignored +* **Verification Goals** + + configure 1 PMP entry (the 1st one) with L=1, + - write PMP entry (i) with L=1 in M-mode + - A is random, should also be tried with A=OFF when L=1 (to cover feature above) + - check PMP entry (i) written value in M-mode + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked (M-mode check only) + - also check for PMP entry (i) where L=1 and pmp(i)cfg.A=TOR that pmpaddr(i-1) is effectively locked + - apply hart reset + - check for PMP entry (i) reset value (read zero) by reading in M mode + - write PMP entry (i) in M-mode + - check PMP entry (i) written value in M-mode + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, (L) value is a configurable parameter + - so the same sub-functions are reused with varying (i) and (L) parameters +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F003_S001_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST03(group) => FTR08-a and FTR08-b + [check that HW implemented PMP entries are not writable/readable in M-mode (L=1)] + [check that no HW implemented PMP entry are writable/readable in S or U modes (L=1)] + - before any configuration, check all pmp(i)cfg and pmpaddr(i) are M-mode read zero + - configure PMP entry (i) with L=1 (or 0): pmp(i)cfg and pmpaddr(i) maybe random values + - execute following tests specific checks + - check only hart reset unlocks all => FTR08-b + - check reset values: all pmp(i)cfg and pmpaddr(i) are M-mode read zero + + TST03-1 (HIGH-PRIO) + [configure 1 PMP entry ([FTR02-b1]: maybe mandatorily the first one): with L=1, + - if possible, the PMP entry number is a configurable parameter + - if possible, L value is a configurable parameter + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever the SW mode => FTR08-a + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes] +### Sub-feature: 001_configure_2_pmp_entries_L1 + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + + The L bit indicates that the PMP entry is locked, i.e., writes to the configuration register and associated address registers are ignored + If PMP entry (i) is locked, writes to pmp(i)cfg and pmpaddr(i) are ignored + Locked PMP entries remain locked until the hart is reset + + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + + Setting the L bit locks the PMP entry even when the A field is set to OFF + + Additionally, if PMP entry (i) is locked and pmp(i)cfg.A is set to TOR, writes to pmpaddr(i-1) are ignored +* **Verification Goals** + + configure 2 PMP entries (the 2 first ones in incrementing order) with L=1, + - reuse of VP_PMP_F003_S001_I000 sequence +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F003_S002_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST03(group) => FTR08-a and FTR08-b + [check that HW implemented PMP entries are not writable/readable in M-mode (L=1)] + [check that no HW implemented PMP entry are writable/readable in S or U modes (L=1)] + - before any configuration, check all pmp(i)cfg and pmpaddr(i) are M-mode read zero + - configure PMP entry (i) with L=1 (or 0): pmp(i)cfg and pmpaddr(i) maybe random values + - execute following tests specific checks + - check only hart reset unlocks all => FTR08-b + - check reset values: all pmp(i)cfg and pmpaddr(i) are M-mode read zero + + TST03-2 (LOW-PRIO) = 2 times reuse/call of TST02-1 + [configure 2 PMP entries ([FTR02-b1]: maybe mandatorily the 2 first ones): both with L=1, + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever the SW mode => FTR08-a + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes] +### Sub-feature: 002_configure_2_pmp_entries_L0_L1 + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + + The L bit indicates that the PMP entry is locked, i.e., writes to the configuration register and associated address registers are ignored + If PMP entry (i) is locked, writes to pmp(i)cfg and pmpaddr(i) are ignored + Locked PMP entries remain locked until the hart is reset + + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + + Setting the L bit locks the PMP entry even when the A field is set to OFF + + Additionally, if PMP entry (i) is locked and pmp(i)cfg.A is set to TOR, writes to pmpaddr(i-1) are ignored +* **Verification Goals** + + configure 2 PMP entries (the 2 first ones in incrementing order) at least one with L=1 and one with L=0, + - write PMP entry (i) with L=0/1 in M-mode + - A is random, should also be tried with A=OFF when L=1 (to cover feature above) + - check PMP entry (i) written value in M-mode + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable in M mode (read back the written value in M mode) + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked (M-mode check only) + - also check for PMP entry (i) where L=1 and pmp(i)cfg.A=TOR that pmpaddr(i-1) is effectively locked + - apply hart reset + - check for PMP entry (i) reset value (read zero) by reading in M mode + - write PMP entry (i) in M-mode + - check PMP entry (i) written value in M-mode + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, (L) value is a configurable parameter + - so the same sub-functions are reused with varying (i) and (L) parameters +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F003_S003_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST03(group) => FTR08-a and FTR08-b + [check that HW implemented PMP entries are not writable/readable in M-mode (L=1)] + [check that no HW implemented PMP entry are writable/readable in S or U modes (L=1)] + - before any configuration, check all pmp(i)cfg and pmpaddr(i) are M-mode read zero + - configure PMP entry (i) with L=1 (or 0): pmp(i)cfg and pmpaddr(i) maybe random values + - execute following tests specific checks + - check only hart reset unlocks all => FTR08-b + - check reset values: all pmp(i)cfg and pmpaddr(i) are M-mode read zero + + TST03-3 (HIGH-PRIO) = 2 times reuse/call of TST02-1 + [configure 2 PMP entries ([FTR02-b1]: maybe mandatorily the 2 first ones): one with L=1 and one with L=0, + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever the SW mode => FTR08-a + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes + - check locked PMP entry (i) has no effect on unlocked PMP entry (j) + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes] +### Sub-feature: 003_configure_N_pmp_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + + The L bit indicates that the PMP entry is locked, i.e., writes to the configuration register and associated address registers are ignored + If PMP entry (i) is locked, writes to pmp(i)cfg and pmpaddr(i) are ignored + Locked PMP entries remain locked until the hart is reset + + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + + Setting the L bit locks the PMP entry even when the A field is set to OFF + + Additionally, if PMP entry (i) is locked and pmp(i)cfg.A is set to TOR, writes to pmpaddr(i-1) are ignored +* **Verification Goals** + + configure N PMP entries (the N first ones in incrementing order) at least one with L=1 and one with L=0, + - reuse of VP_PMP_F003_S003_I000 sequence +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F003_S004_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST03(group) => FTR08-a and FTR08-b + [check that HW implemented PMP entries are not writable/readable in M-mode (L=1)] + [check that no HW implemented PMP entry are writable/readable in S or U modes (L=1)] + - before any configuration, check all pmp(i)cfg and pmpaddr(i) are M-mode read zero + - configure PMP entry (i) with L=1 (or 0): pmp(i)cfg and pmpaddr(i) maybe random values + - execute following tests specific checks + - check only hart reset unlocks all => FTR08-b + - check reset values: all pmp(i)cfg and pmpaddr(i) are M-mode read zero + + TST03-4 (LOW-PRIO) = N times reuse/call of TST02-1 + [configure N PMP entries ([FTR02-b1]: maybe mandatorily the N first ones): at least one with L=1 and one with L=0, + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever the SW mode => FTR08-a + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes + - check locked PMP entry (i) has no effect on unlocked PMP entry (j) + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes] +### Sub-feature: 004_configure_8_pmp_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + + The L bit indicates that the PMP entry is locked, i.e., writes to the configuration register and associated address registers are ignored + If PMP entry (i) is locked, writes to pmp(i)cfg and pmpaddr(i) are ignored + Locked PMP entries remain locked until the hart is reset + + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + + Setting the L bit locks the PMP entry even when the A field is set to OFF + + Additionally, if PMP entry (i) is locked and pmp(i)cfg.A is set to TOR, writes to pmpaddr(i-1) are ignored +* **Verification Goals** + + configure all 8 PMP entries (in incrementing order) at least one with L=1 and one with L=0, + - reuse of VP_PMP_F003_S003_I000 sequence +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F003_S005_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST03(group) => FTR08-a and FTR08-b + [check that HW implemented PMP entries are not writable/readable in M-mode (L=1)] + [check that no HW implemented PMP entry are writable/readable in S or U modes (L=1)] + - before any configuration, check all pmp(i)cfg and pmpaddr(i) are M-mode read zero + - configure PMP entry (i) with L=1 (or 0): pmp(i)cfg and pmpaddr(i) maybe random values + - execute following tests specific checks + - check only hart reset unlocks all => FTR08-b + - check reset values: all pmp(i)cfg and pmpaddr(i) are M-mode read zero + + TST03-5 (HIGH-PRIO) = 8 times reuse/call of TST02-1 + [configure 8 PMP entries: at least one with L=1 and one with L=0, + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are effectively locked whatever the SW mode => FTR08-a + - check for PMP entry (i) where L=1 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes + - check locked PMP entry (i) has no effect on unlocked PMP entry (j) + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for PMP entry (i) where L=0 that pmp(i)cfg and pmpaddr(i) are not writable/readable in S or U modes] +## Feature: CSRs programming order + +### Sub-feature: 000_configure_1_pmp_entry + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Section 3.7.1 Page 57 Volume II: RISC-V Privileged Architectures V20211203} + + the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first) + All PMP CSR fields are WARL and may be read-only zero (QUESTION: does read-only zero mean not implemented?) +* **Verification Goals** + + configure any PMP entry (i), but the first one + - reuse of VP_PMP_F003_S003_I000 sequence (Feature: "CSRs locked access") +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F004_S001_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST04 => FTR02-b1 and FTR02-b2 + [check if the lowest-numbered PMP CSRs must be programmed first before programming higher-numbered ones] + + TST04-1 (LOW-PRIO) extends TST02-1 + [configure any PMP entry, but the first one + - check for configured PMP entry (i), pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for not configured PMP entry (i), pmp(i)cfg and pmpaddr(i) are M-mode read zero] +### Sub-feature: 001_configure_2_pmp_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Section 3.7.1 Page 57 Volume II: RISC-V Privileged Architectures V20211203} + + the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first) + All PMP CSR fields are WARL and may be read-only zero (QUESTION: does read-only zero mean not implemented?) +* **Verification Goals** + + configure 2 non-adjacent PMP entries (highest-numbered ones first) (avoid the first PMP entry) + - reuse of VP_PMP_F003_S003_I000 sequence (Feature: "CSRs locked access") +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F004_S002_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST04 => FTR02-b1 and FTR02-b2 + [check if the lowest-numbered PMP CSRs must be programmed first before programming higher-numbered ones] + + TST04-2 (HIGH-PRIO) extends TST02-2 + [configure 2 non-adjacent PMP entries (highest-numbered ones first) (avoid the first PMP entry) + - check for configured PMP entry (i), pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for not configured PMP entry (i), pmp(i)cfg and pmpaddr(i) are M-mode read zero] +### Sub-feature: 002_configure_N_pmp_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Section 3.7.1 Page 57 Volume II: RISC-V Privileged Architectures V20211203} + + the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first) + All PMP CSR fields are WARL and may be read-only zero (QUESTION: does read-only zero mean not implemented?) +* **Verification Goals** + + configure N PMP entries (highest-numbered ones first) (as non-adjacent as possible, and avoid the first PMP entry) + - reuse of VP_PMP_F003_S003_I000 sequence (Feature: "CSRs locked access") +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F004_S003_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST04 => FTR02-b1 and FTR02-b2 + [check if the lowest-numbered PMP CSRs must be programmed first before programming higher-numbered ones] + + TST04-3 (LOW-PRIO) extends TST02-3 + [configure N PMP entries (highest-numbered ones first) (as non-adjacent as possible, and avoid the first PMP entry) + - check for configured PMP entry (i), pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only + - check for not configured PMP entry (i), pmp(i)cfg and pmpaddr(i) are M-mode read zero] +### Sub-feature: 003_configure_8_pmp_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Section 3.7.1 Page 57 Volume II: RISC-V Privileged Architectures V20211203} + + the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first) + All PMP CSR fields are WARL and may be read-only zero (QUESTION: does read-only zero mean not implemented?) +* **Verification Goals** + + configure all 8 PMP entries (highest-numbered ones first) + - reuse of VP_PMP_F003_S003_I000 sequence (Feature: "CSRs locked access") +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F004_S004_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST04 => FTR02-b1 and FTR02-b2 + [check if the lowest-numbered PMP CSRs must be programmed first before programming higher-numbered ones] + + TST04-4 (HIGH-PRIO) extends TST02-4 + [configure 8 PMP entries (highest-numbered ones first) + - check for configured PMP entry (i), pmp(i)cfg and pmpaddr(i) are writable/readable in M-mode only] +## Feature: CSRs Hardwired regions + +### Sub-feature: 000_access with L=0 + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + Certain regions’ privileges can be hardwired: so only ever be visible in machine mode but in no lower-privilege layers. + + {Section 3.7.1 Page 57 Volume II: RISC-V Privileged Architectures V20211203} + Implementations may implement zero, 16, or 64 PMP CSRs + + {https://docs.openhwgroup.org/projects/cva6-user-manual/01_cva6_user/PMP.html} + A maximum of 16 PMP entries are supported. + All PMP CSRs are always implemented, but CSRs (or bitfields of CSRs) related to PMP entries with number CVA6Cfg.NrPMPEntries and above are hardwired to zero. + + TRISTAN + 8 PMP entries are implemented +* **Verification Goals** + + configure the first 8 PMP entries with L=0 + - for each PMP entry (i), check several times that pmp(i)cfg and pmpaddr(i) can be written and can be read back exactly the same (in M-mode) + + for the last 8 PMP entries, check that pmp(i)cfg and pmpaddr(i) always read zero after being written (in M-mode with L=0) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F005_S001_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST05 => FTR01-c and FTR01-c-extended + [check all regions are configurable in M-mode to make sure none is hardwired] + [regions hardwired privileges might only ever be visible in M-mode] + + TST05-1 (HIGH-PRIO) extends TST02-4 + - check the written pmp(i)cfg and pmpaddr(i) values can be read exactly the same as written +### Sub-feature: 001_access with L=1 + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + Certain regions’ privileges can be hardwired: so only ever be visible in machine mode but in no lower-privilege layers. + + {Section 3.7.1 Page 57 Volume II: RISC-V Privileged Architectures V20211203} + Implementations may implement zero, 16, or 64 PMP CSRs + + {https://docs.openhwgroup.org/projects/cva6-user-manual/01_cva6_user/PMP.html} + A maximum of 16 PMP entries are supported. + All PMP CSRs are always implemented, but CSRs (or bitfields of CSRs) related to PMP entries with number CVA6Cfg.NrPMPEntries and above are hardwired to zero. + + TRISTAN + 8 PMP entries are implemented +* **Verification Goals** + + configure the first 8 PMP entries with L=1 + - for each PMP entry (i), check once that pmp(i)cfg and pmpaddr(i) can be written and can be read back exactly the same (in M-mode) + - apply hart reset + - for each PMP entry (i), check once that pmp(i)cfg and pmpaddr(i) can be written and can be read back exactly the same (in M-mode) + + for the last 8 PMP entries, check that pmp(i)cfg and pmpaddr(i) always read zero after being written (in M-mode with L=1) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F005_S002_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST05 => FTR01-c and FTR01-c-extended + [check all regions are configurable in M-mode to make sure none is hardwired] + [regions hardwired privileges might only ever be visible in M-mode] + + TST05-2 (LOW-PRIO) extends TST03-5 + - check the written pmp(i)cfg and pmpaddr(i) values can be read exactly the same as written (before hart reset) +## Feature: CSRs reserved values + +### Sub-feature: 000_access with L=0 + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 58 Volume II: RISC-V Privileged Architectures V20211203} + + The R, W, and X fields form a collective WARL field for which the combinations with R=0 and W=1 are reserved. +* **Verification Goals** + + repeat following sequence several times on some PMP entries + - write totally random values to pmp(i)cfg and pmpaddr(i), but with L=0 + - check all pmp(i)cfg and pmpaddr(i) can be read back exactly the same as written except: + - except with the reserved combinations [R=0 and W=1] + - except with A=NA4 which must not be selectable as G>0 +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F006_S001_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST06 => FTR04-a + [PMP CSR fields are WARL: PMP entry combinations with R=0 and W=1 are reserved/can’t be read] + [permissions fields could be randomly written; should we try randomization ?] + + TST06-1 (HIGH-PRIO) extends TST02-4 + - write totally random values to pmp(i)cfg and pmpaddr(i) + - check all pmp(i)cfg and pmpaddr(i) can be read exactly the same as written except for the reserved combinations with R=0 and W=1 +### Sub-feature: 001_access with L=1 + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 58 Volume II: RISC-V Privileged Architectures V20211203} + + The R, W, and X fields form a collective WARL field for which the combinations with R=0 and W=1 are reserved. +* **Verification Goals** + + repeat following sequence several times on some PMP entries + - write totally random values to pmp(i)cfg and pmpaddr(i), but with L=1 + - check all pmp(i)cfg and pmpaddr(i) can be read back exactly the same as written: + - except with the reserved combinations [R=0 and W=1] + - except with A=NA4 which must not be selectable as G>0 + - apply hart reset +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F006_S002_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST06 => FTR04-a + [PMP CSR fields are WARL: PMP entry combinations with R=0 and W=1 are reserved/can’t be read] + [permissions fields could be randomly written; should we try randomization ?] + + TST06-2 (LOW-PRIO) extends TST03-5 + - write totally random values to pmp(i)cfg and pmpaddr(i) + - check all pmp(i)cfg and pmpaddr(i) can be read exactly the same as written except for the reserved combinations with R=0 and W=1 (before hart reset) +## Feature: no cfg matching/defined + +### Sub-feature: 000_no matching entry - M mode access + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + + If no PMP entry matches an M-mode access, the access succeeds +* **Verification Goals** + + check M-mode access succeeds if no PMP entry matches +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F010_S001_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR09-e + [If no PMP entry matches an M-mode access, the access succeeds] + + TST10-1 (HIGH-PRIO) => FTR09-e + [check M-mode access succeeds if no PMP entry matches] +### Sub-feature: 001_no defined entry - M mode access + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + + If no PMP entry matches an M-mode access, the access succeeds + QUESTION: what happens if no PMP entry is implemented ? + ASSUMPTION: access succeeds +* **Verification Goals** + + check M-mode access succeeds if no PMP entry defined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F010_S002_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR09-e-question + [what happens if no PMP entry is implemented ?] + + TST10-2 (HIGH-PRIO) => FTR09-e-question + [check M-mode access succeeds if no PMP entry defined] +### Sub-feature: 002_no matching entry - S/U mode access + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + + If no PMP entry matches an S-mode or U-mode access, but at least one PMP entry is implemented, the access fails +* **Verification Goals** + + check S or U mode access fails when no PMP entry matching and at least one PMP entry implemented +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F010_S003_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR09-f + [If no PMP entry matches an S-mode or U-mode access, but at least one PMP entry is implemented, the access fails] + + TST10-3 (HIGH-PRIO) => FTR09-f + [check S or U mode access fails when no PMP entry matching and at least one PMP entry implemented] +### Sub-feature: 003_no defined entry - S/U mode access + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + + If no PMP entry matches an S-mode or U-mode access, but at least one PMP entry is implemented, the access fails + QUESTION: what happens if no PMP entry is implemented ? + ASSUMPTION: access fails +* **Verification Goals** + + check S or U mode access fails when no PMP entry implemented +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F010_S004_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR09-f-question + [what happens if no PMP entry is implemented ?] + + TST10-4 (HIGH-PRIO) => FTR09-f-question + [check S or U mode access fails when no PMP entry implemented] +## Feature: cfg NA4 access S/U (G=0) + +### Sub-feature: 000_fetch_L0_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, the R/W/X permissions apply only to S and U modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + S or U mode single access instruction fetch inside defined NA4 address range with execute permissions and with L=0 + - choose an executable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, X=1, L=0, R/W:random, with reserve on R=0 & W=1 + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - fetch an instruction from that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S011_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + TST11-1x(group) => FTR01-d + [PMP check on instruction fetch where effective privilege mode is S or U: + - choose an executable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access instruction fetch in S and U mode] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-11 (HIGH-PRIO) + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with execute permissions for the PMP region + - fetch an instruction from that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 001_fetch_L0_X0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, the R/W/X permissions apply only to S and U modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 58 Volume II: RISC-V Privileged Architectures V20211203} + Attempting to fetch an instruction from a PMP region that does not have execute permissions raises an instruction access-fault exception +* **Verification Goals** + + S or U mode single access instruction fetch inside defined NA4 address range without execute permissions and with L=0 + - choose an executable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, X=0, L=0, R/W:random, with reserve on R=0 & W=1 + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - fetch an instruction from that region (with exact address-matching) + + CHECK + - check instruction fetch access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S012_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-b + [Attempting to fetch an instruction from a PMP region that does not have execute permissions raises an instruction access-fault exception] + + TST11-1x(group) => FTR01-d + [PMP check on instruction fetch where effective privilege mode is S or U: + - choose an executable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access instruction fetch in S and U mode] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-12 (MEDIUM-PRIO) + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry without execute permissions for the PMP region + - fetch an instruction from that region (with exact address-matching) + - check instruction fetch access-fault exception raised => FTR04-b] +### Sub-feature: 002_fetch_L0_X1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, the R/W/X permissions apply only to S and U modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + S or U mode single access instruction fetch from outside defined NA4 address range with execute permissions and with L=0 + - choose an executable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, X=1, L=0, R/W:random, with reserve on R=0 & W=1 + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - fetch an instruction from outside all PMP defined regions + + CHECK + - check instruction fetch access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S013_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + TST11-1x(group) => FTR01-d + [PMP check on instruction fetch where effective privilege mode is S or U: + - choose an executable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access instruction fetch in S and U mode] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-13 (MEDIUM-PRIO) + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with execute permissions for the PMP region + - fetch an instruction from outside all PMP defined regions + - check instruction fetch access-fault exception raised] +### Sub-feature: 003_fetch_L1_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + Locked PMP entries remain locked until the hart is reset +* **Verification Goals** + + S or U mode single access instruction fetch inside defined NA4 address range with execute permissions and with L=1 + - choose an executable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, X=1, L=1, R/W:random, with reserve on R=0 & W=1 + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - fetch an instruction from that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S014_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + FTR08-b + [Locked PMP entries remain locked until the hart is reset] + + + TST11-1x(group) => FTR01-d + [PMP check on instruction fetch where effective privilege mode is S or U: + - choose an executable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access instruction fetch in S and U mode] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-14 (LOW-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with execute permissions for the PMP region + - fetch an instruction from that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 004_fetch_L1_X0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + Locked PMP entries remain locked until the hart is reset + + {Page 58 Volume II: RISC-V Privileged Architectures V20211203} + Attempting to fetch an instruction from a PMP region that does not have execute permissions raises an instruction access-fault exception +* **Verification Goals** + + S or U mode single access instruction fetch inside defined NA4 address range without execute permissions and with L=1 + - choose an executable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, X=0, L=1, R/W:random, with reserve on R=0 & W=1 + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - fetch an instruction from that region (with exact address-matching) + + CHECK + - check instruction fetch access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S015_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + FTR08-b + [Locked PMP entries remain locked until the hart is reset] + + FTR04-b + [Attempting to fetch an instruction from a PMP region that does not have execute permissions raises an instruction access-fault exception] + + TST11-1x(group) => FTR01-d + [PMP check on instruction fetch where effective privilege mode is S or U: + - choose an executable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access instruction fetch in S and U mode] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-15 (LOW-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without execute permissions for the PMP region + - fetch an instruction from that region (with exact address-matching) + - check instruction fetch access-fault exception raised => FTR04-b] +### Sub-feature: 005_fetch_L1_X1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + Locked PMP entries remain locked until the hart is reset +* **Verification Goals** + + S or U mode single access instruction fetch from outside defined NA4 address range with execute permissions and with L=1 + - choose an executable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, X=1, L=1, R/W:random, with reserve on R=0 & W=1 + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - fetch an instruction from outside all PMP defined regions + + CHECK + - check instruction fetch access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S016_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + FTR08-b + [Locked PMP entries remain locked until the hart is reset] + + TST11-1x(group) => FTR01-d + [PMP check on instruction fetch where effective privilege mode is S or U: + - choose an executable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access instruction fetch in S and U mode] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-16 (LOW-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with execute permissions for the PMP region + - fetch an instruction from outside all PMP defined regions + - check instruction fetch access-fault exception raised] +### Sub-feature: 006_load_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, the R/W/X permissions apply only to S and U modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + S or U mode single access load or load-reserved instruction inside defined NA4 address range with read permissions and with L=0 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=1, L=0, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a load or load-reserved instruction from that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S021_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + TST11-2x(group) => FTR01-d + [PMP check on load or load-reserved instruction where effective privilege mode is S or U: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in S and U mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-21 (HIGH-PRIO) + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 007_load_L0_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, the R/W/X permissions apply only to S and U modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 58 Volume II: RISC-V Privileged Architectures V20211203} + Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception +* **Verification Goals** + + S or U mode single access load or load-reserved instruction inside defined NA4 address range without read permissions and with L=0 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=0, L=0, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a load or load-reserved instruction from that region (with exact address-matching) + + CHECK + - check load access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S022_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + TST11-2x(group) => FTR01-d + [PMP check on load or load-reserved instruction where effective privilege mode is S or U: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in S and U mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-22 (MEDIUM-PRIO) + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry without read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check load access-fault exception raised => FTR04-c] +### Sub-feature: 008_load_L0_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, the R/W/X permissions apply only to S and U modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + S or U mode single access load or load-reserved instruction from outside defined NA4 address range with read permissions and with L=0 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=1, L=0, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a load or load-reserved instruction from outside all PMP defined regions + + CHECK + - check load access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S023_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + TST11-2x(group) => FTR01-d + [PMP check on load or load-reserved instruction where effective privilege mode is S or U: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in S and U mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-23 (MEDIUM-PRIO) + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from outside all PMP defined regions + - check load access-fault exception raised] +### Sub-feature: 009_load_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + Locked PMP entries remain locked until the hart is reset +* **Verification Goals** + + S or U mode single access load or load-reserved instruction inside defined NA4 address range with read permissions and with L=1 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=1, L=1, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a load or load-reserved instruction from that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S024_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + FTR08-b + [Locked PMP entries remain locked until the hart is reset] + + TST11-2x(group) => FTR01-d + [PMP check on load or load-reserved instruction where effective privilege mode is S or U: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in S and U mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-24 (LOW-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 010_load_L1_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + Locked PMP entries remain locked until the hart is reset + + {Page 58 Volume II: RISC-V Privileged Architectures V20211203} + Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception +* **Verification Goals** + + S or U mode single access load or load-reserved instruction inside defined NA4 address range without read permissions and with L=1 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=0, L=1, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a load or load-reserved instruction from that region (with exact address-matching) + + CHECK + - check load access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S025_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + FTR08-b + [Locked PMP entries remain locked until the hart is reset] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + TST11-2x(group) => FTR01-d + [PMP check on load or load-reserved instruction where effective privilege mode is S or U: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in S and U mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-25 (LOW-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check load access-fault exception raised => FTR04-c] +### Sub-feature: 011_load_L1_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + Locked PMP entries remain locked until the hart is reset +* **Verification Goals** + + S or U mode single access load or load-reserved instruction from outside defined NA4 address range with read permissions and with L=1 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=1, L=1, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a load or load-reserved instruction from outside all PMP defined regions + + CHECK + - check load access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S026_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + FTR08-b + [Locked PMP entries remain locked until the hart is reset] + + TST11-2x(group) => FTR01-d + [PMP check on load or load-reserved instruction where effective privilege mode is S or U: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in S and U mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-26 (LOW-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from outside all PMP defined regions + - check load access-fault exception raised] +### Sub-feature: 012_store_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, the R/W/X permissions apply only to S and U modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + S or U mode single access store, store-conditional, or AMO instruction inside defined NA4 address range with write permissions and with L=0 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=1, L=0, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S031_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + TST11-3x(group) => FTR01-d + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is S or U: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in S and U mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-31 (HIGH-PRIO) + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 013_store_L0_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, the R/W/X permissions apply only to S and U modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 58 Volume II: RISC-V Privileged Architectures V20211203} + Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception +* **Verification Goals** + + S or U mode single access store, store-conditional, or AMO instruction inside defined NA4 address range without write permissions and with L=0 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=0, L=0, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + + CHECK + - check store access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S032_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + TST11-3x(group) => FTR01-d + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is S or U: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in S and U mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-32 (MEDIUM-PRIO) + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry without write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check store access-fault exception raised => FTR04-d] +### Sub-feature: 014_store_L0_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, the R/W/X permissions apply only to S and U modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + S or U mode single access store, store-conditional, or AMO instruction from outside defined NA4 address range with write permissions and with L=0 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=1, L=0, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + + CHECK + - check store access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S033_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + TST11-3x(group) => FTR01-d + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is S or U: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in S and U mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-33 (MEDIUM-PRIO) + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + - check store access-fault exception raised] +### Sub-feature: 015_store_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + Locked PMP entries remain locked until the hart is reset +* **Verification Goals** + + S or U mode single access store, store-conditional, or AMO instruction inside defined NA4 address range with write permissions and with L=1 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=1, L=1, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S034_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + FTR08-b + [Locked PMP entries remain locked until the hart is reset] + + TST11-3x(group) => FTR01-d + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is S or U: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in S and U mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-34 (LOW-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 016_store_L1_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + Locked PMP entries remain locked until the hart is reset + + {Page 58 Volume II: RISC-V Privileged Architectures V20211203} + Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception +* **Verification Goals** + + S or U mode single access store, store-conditional, or AMO instruction inside defined NA4 address range without write permissions and with L=1 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=0, L=1, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + + CHECK + - check store access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S035_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + FTR08-b + [Locked PMP entries remain locked until the hart is reset] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + TST11-3x(group) => FTR01-d + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is S or U: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in S and U mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-35 (LOW-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check store access-fault exception raised => FTR04-d] +### Sub-feature: 017_store_L1_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + Locked PMP entries remain locked until the hart is reset +* **Verification Goals** + + S or U mode single access store, store-conditional, or AMO instruction from outside defined NA4 address range with write permissions and with L=1 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=1, L=1, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + + CHECK + - check store access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S036_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + FTR08-b + [Locked PMP entries remain locked until the hart is reset] + + TST11-3x(group) => FTR01-d + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is S or U: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in S and U mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-36 (LOW-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + - check store access-fault exception raised] +### Sub-feature: 018_load_MPP_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, the R/W/X permissions apply only to S and U modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + S or U mode single access load or load-reserved instruction inside defined NA4 address range with read permissions and with L=0 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=1, L=0, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains S or U + + ACCESS + - execute a load or load-reserved instruction from that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S041_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + TST11-4x(group) => FTR01-d + [PMP check on load or load-reserved instruction where effective privilege mode is S or U: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-41 (LOWEST-PRIO) + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 019_load_MPP_L0_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, the R/W/X permissions apply only to S and U modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 58 Volume II: RISC-V Privileged Architectures V20211203} + Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception +* **Verification Goals** + + S or U mode single access load or load-reserved instruction inside defined NA4 address range without read permissions and with L=0 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=0, L=0, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains S or U + + ACCESS + - execute a load or load-reserved instruction from that region (with exact address-matching) + + CHECK + - check load access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S042_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + TST11-4x(group) => FTR01-d + [PMP check on load or load-reserved instruction where effective privilege mode is S or U: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-42 (LOWEST-PRIO) + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry without read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check load access-fault exception raised => FTR04-c] +### Sub-feature: 020_load_MPP_L0_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, the R/W/X permissions apply only to S and U modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + S or U mode single access load or load-reserved instruction from outside defined NA4 address range with read permissions and with L=0 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=1, L=0, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains S or U + + ACCESS + - execute a load or load-reserved instruction from outside all PMP defined regions + + CHECK + - check load access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S043_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + TST11-4x(group) => FTR01-d + [PMP check on load or load-reserved instruction where effective privilege mode is S or U: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-43 (LOWEST-PRIO) + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from outside all PMP defined regions + - check load access-fault exception raised] +### Sub-feature: 021_load_MPP_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + Locked PMP entries remain locked until the hart is reset +* **Verification Goals** + + S or U mode single access load or load-reserved instruction inside defined NA4 address range with read permissions and with L=1 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=1, L=1, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains S or U + + ACCESS + - execute a load or load-reserved instruction from that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S044_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + FTR08-b + [Locked PMP entries remain locked until the hart is reset] + + TST11-4x(group) => FTR01-d + [PMP check on load or load-reserved instruction where effective privilege mode is S or U: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-44 (LOWEST-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 022_load_MPP_L1_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + Locked PMP entries remain locked until the hart is reset + + {Page 58 Volume II: RISC-V Privileged Architectures V20211203} + Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception +* **Verification Goals** + + S or U mode single access load or load-reserved instruction inside defined NA4 address range without read permissions and with L=1 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=0, L=1, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains S or U + + ACCESS + - execute a load or load-reserved instruction from that region (with exact address-matching) + + CHECK + - check load access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S045_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + FTR08-b + [Locked PMP entries remain locked until the hart is reset] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + TST11-4x(group) => FTR01-d + [PMP check on load or load-reserved instruction where effective privilege mode is S or U: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-45 (LOWEST-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check load access-fault exception raised => FTR04-c] +### Sub-feature: 023_load_MPP_L1_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + Locked PMP entries remain locked until the hart is reset +* **Verification Goals** + + S or U mode single access load or load-reserved instruction from outside defined NA4 address range with read permissions and with L=1 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=1, L=1, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains S or U + + ACCESS + - execute a load or load-reserved instruction from outside all PMP defined regions + + CHECK + - check load access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S046_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + FTR08-b + [Locked PMP entries remain locked until the hart is reset] + + TST11-4x(group) => FTR01-d + [PMP check on load or load-reserved instruction where effective privilege mode is S or U: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-46 (LOWEST-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from outside all PMP defined regions + - check load access-fault exception raised] +### Sub-feature: 024_store_MPP_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, the R/W/X permissions apply only to S and U modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + S or U mode single access store, store-conditional, or AMO instruction inside defined NA4 address range with write permissions and with L=0 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=1, L=0, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains S or U + + ACCESS + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S051_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + TST11-5x(group) => FTR01-d + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is S or U: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-51 (LOWEST-PRIO) + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 025_store_MPP_L0_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, the R/W/X permissions apply only to S and U modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 58 Volume II: RISC-V Privileged Architectures V20211203} + Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception +* **Verification Goals** + + S or U mode single access store, store-conditional, or AMO instruction inside defined NA4 address range without write permissions and with L=0 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=0, L=0, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains S or U + + ACCESS + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + + CHECK + - check store access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S052_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + TST11-5x(group) => FTR01-d + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is S or U: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-52 (LOWEST-PRIO) + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry without write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check store access-fault exception raised => FTR04-d] +### Sub-feature: 026_store_MPP_L0_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, the R/W/X permissions apply only to S and U modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + S or U mode single access store, store-conditional, or AMO instruction from outside defined NA4 address range with write permissions and with L=0 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=1, L=0, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains S or U + + ACCESS + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + + CHECK + - check store access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S053_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + TST11-5x(group) => FTR01-d + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is S or U: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-53 (LOWEST-PRIO) + [with L=0 => FTR08-e2-2 (refers to FTR09-d2-2), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + - check store access-fault exception raised] +### Sub-feature: 027_store_MPP_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + Locked PMP entries remain locked until the hart is reset +* **Verification Goals** + + S or U mode single access store, store-conditional, or AMO instruction inside defined NA4 address range with write permissions and with L=1 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=1, L=1, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains S or U + + ACCESS + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S054_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + FTR08-b + [Locked PMP entries remain locked until the hart is reset] + + TST11-5x(group) => FTR01-d + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is S or U: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-54 (LOWEST-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 028_store_MPP_L1_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + Locked PMP entries remain locked until the hart is reset + + {Page 58 Volume II: RISC-V Privileged Architectures V20211203} + Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception +* **Verification Goals** + + S or U mode single access store, store-conditional, or AMO instruction inside defined NA4 address range without write permissions and with L=1 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=0, L=1, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains S or U + + ACCESS + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + + CHECK + - check store access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S055_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + FTR08-b + [Locked PMP entries remain locked until the hart is reset] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + TST11-5x(group) => FTR01-d + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is S or U: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-55 (LOWEST-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check store access-fault exception raised => FTR04-d] +### Sub-feature: 029_store_MPP_L1_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks are applied to all accesses whose effective privilege mode is S or U + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + Locked PMP entries remain locked until the hart is reset +* **Verification Goals** + + S or U mode single access store, store-conditional, or AMO instruction from outside defined NA4 address range with write permissions and with L=1 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=1, L=1, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains S or U + + ACCESS + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + + CHECK + - check store access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F011_S056_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + FTR08-b + [Locked PMP entries remain locked until the hart is reset] + + TST11-5x(group) => FTR01-d + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is S or U: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains S or U] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST11-56 (LOWEST-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + - check store access-fault exception raised] +## Feature: cfg NA4 access M (G=0) + +### Sub-feature: 000_fetch_L0_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, any M-mode access matching the PMP entry will succeed + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + If the L bit is clear and the privilege mode of the access is M, the access succeeds +* **Verification Goals** + + M mode single access instruction fetch inside defined NA4 address range with execute permissions and with L=0 + - choose an executable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, X=1, L=0, R/W:random, with reserve on R=0 & W=1 + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - fetch an instruction from that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S011_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-1x(group) => FTR01-f + [PMP check on instruction fetch where effective privilege mode is M: + - choose an executable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access instruction fetch in M mode] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-11 (LOW-PRIO) + [with L=0 => FTR08-e2-1 (refers to FTR09-d1), + - configure the PMP entry with execute permissions for the PMP region + - fetch an instruction from that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 001_fetch_L0_X0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, any M-mode access matching the PMP entry will succeed + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + If the L bit is clear and the privilege mode of the access is M, the access succeeds +* **Verification Goals** + + M mode single access instruction fetch inside defined NA4 address range without execute permissions and with L=0 + - choose an executable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, X=0, L=0, R/W:random, with reserve on R=0 & W=1 + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - fetch an instruction from that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S012_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-1x(group) => FTR01-f + [PMP check on instruction fetch where effective privilege mode is M: + - choose an executable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access instruction fetch in M mode] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-12 (LOW-PRIO) + [with L=0 => FTR08-e2-1 (refers to FTR09-d1), + - configure the PMP entry without execute permissions for the PMP region + - fetch an instruction from that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 002_fetch_L0_X1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, any M-mode access matching the PMP entry will succeed + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + If the L bit is clear and the privilege mode of the access is M, the access succeeds +* **Verification Goals** + + M mode single access instruction fetch from outside defined NA4 address range with execute permissions and with L=0 + - choose an executable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, X=1, L=0, R/W:random, with reserve on R=0 & W=1 + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - fetch an instruction from outside all PMP defined regions + + CHECK + - check no access-fault exception (Feature: "no cfg matching") + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S013_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-1x(group) => FTR01-f + [PMP check on instruction fetch where effective privilege mode is M: + - choose an executable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access instruction fetch in M mode] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-13 (LOW-PRIO) + [with L=0 => FTR08-e2-1 (refers to FTR09-d1), + - configure the PMP entry with execute permissions for the PMP region + - fetch an instruction from outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED +### Sub-feature: 003_fetch_L1_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + M mode single access instruction fetch inside defined NA4 address range with execute permissions and with L=1 + - choose an executable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, X=1, L=1, R/W:random, with reserve on R=0 & W=1 + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - fetch an instruction from that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S014_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-1x(group) => FTR01-f + [PMP check on instruction fetch where effective privilege mode is M: + - choose an executable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access instruction fetch in M mode] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-14 (HIGH-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with execute permissions for the PMP region + - fetch an instruction from that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 004_fetch_L1_X0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 58 Volume II: RISC-V Privileged Architectures V20211203} + Attempting to fetch an instruction from a PMP region that does not have execute permissions raises an instruction access-fault exception +* **Verification Goals** + + M mode single access instruction fetch inside defined NA4 address range without execute permissions and with L=1 + - choose an executable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, X=0, L=1, R/W:random, with reserve on R=0 & W=1 + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - fetch an instruction from that region (with exact address-matching) + + CHECK + - check instruction fetch access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S015_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-b + [Attempting to fetch an instruction from a PMP region that does not have execute permissions raises an instruction access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-1x(group) => FTR01-f + [PMP check on instruction fetch where effective privilege mode is M: + - choose an executable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access instruction fetch in M mode] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-15 (MEDIUM-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without execute permissions for the PMP region + - fetch an instruction from that region (with exact address-matching) + - check instruction fetch access-fault exception raised => FTR04-b] +### Sub-feature: 005_fetch_L1_X1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + M mode single access instruction fetch from outside defined NA4 address range with execute permissions and with L=1 + - choose an executable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, X=1, L=1, R/W:random, with reserve on R=0 & W=1 + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - fetch an instruction from outside all PMP defined regions + + CHECK + - check no access-fault exception (Feature: "no cfg matching") + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S016_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-1x(group) => FTR01-f + [PMP check on instruction fetch where effective privilege mode is M: + - choose an executable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access instruction fetch in M mode] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-16 (HIGH-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with execute permissions for the PMP region + - fetch an instruction from outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED +### Sub-feature: 006_load_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, any M-mode access matching the PMP entry will succeed + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + If the L bit is clear and the privilege mode of the access is M, the access succeeds +* **Verification Goals** + + M mode single access load or load-reserved instruction inside defined NA4 address range with read permissions and with L=0 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=1, L=0, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a load or load-reserved instruction from that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S021_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-2x(group) => FTR01-f + [PMP check on load or load-reserved instruction where effective privilege mode is M: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in M mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-21 (LOW-PRIO) + [with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 007_load_L0_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, any M-mode access matching the PMP entry will succeed + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + If the L bit is clear and the privilege mode of the access is M, the access succeeds +* **Verification Goals** + + M mode single access load or load-reserved instruction inside defined NA4 address range without read permissions and with L=0 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=0, L=0, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a load or load-reserved instruction from that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S022_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-2x(group) => FTR01-f + [PMP check on load or load-reserved instruction where effective privilege mode is M: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in M mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-22 (LOW-PRIO) + [with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry without read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 008_load_L0_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, any M-mode access matching the PMP entry will succeed + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + If the L bit is clear and the privilege mode of the access is M, the access succeeds +* **Verification Goals** + + M mode single access load or load-reserved instruction from outside defined NA4 address range with read permissions and with L=0 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=1, L=0, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a load or load-reserved instruction from outside all PMP defined regions + + CHECK + - check no access-fault exception (Feature: "no cfg matching") + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S023_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-2x(group) => FTR01-f + [PMP check on load or load-reserved instruction where effective privilege mode is M: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in M mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-23 (LOW-PRIO) + [with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED +### Sub-feature: 009_load_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + M mode single access load or load-reserved instruction inside defined NA4 address range with read permissions and with L=1 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=1, L=1, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a load or load-reserved instruction from that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S024_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-2x(group) => FTR01-f + [PMP check on load or load-reserved instruction where effective privilege mode is M: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in M mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-24 (HIGH-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 010_load_L1_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 58 Volume II: RISC-V Privileged Architectures V20211203} + Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception +* **Verification Goals** + + M mode single access load or load-reserved instruction inside defined NA4 address range without read permissions and with L=1 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=0, L=1, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a load or load-reserved instruction from that region (with exact address-matching) + + CHECK + - check load access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S025_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-2x(group) => FTR01-f + [PMP check on load or load-reserved instruction where effective privilege mode is M: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in M mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-25 (MEDIUM-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check load access-fault exception raised => FTR04-c] +### Sub-feature: 011_load_L1_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + M mode single access load or load-reserved instruction from outside defined NA4 address range with read permissions and with L=1 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=1, L=1, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a load or load-reserved instruction from outside all PMP defined regions + + CHECK + - check no access-fault exception (Feature: "no cfg matching") + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S026_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-2x(group) => FTR01-f + [PMP check on load or load-reserved instruction where effective privilege mode is M: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in M mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-26 (HIGH-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED +### Sub-feature: 012_store_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, any M-mode access matching the PMP entry will succeed + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + If the L bit is clear and the privilege mode of the access is M, the access succeeds +* **Verification Goals** + + M mode single access store, store-conditional, or AMO instruction inside defined NA4 address range with write permissions and with L=0 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=1, L=0, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S031_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-3x(group) => FTR01-f + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is M: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in M mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-31 (LOW-PRIO) + [with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 013_store_L0_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, any M-mode access matching the PMP entry will succeed + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + If the L bit is clear and the privilege mode of the access is M, the access succeeds +* **Verification Goals** + + M mode single access store, store-conditional, or AMO instruction inside defined NA4 address range without write permissions and with L=0 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=0, L=0, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S032_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-3x(group) => FTR01-f + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is M: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in M mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-32 (LOW-PRIO) + [with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry without write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 014_store_L0_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, any M-mode access matching the PMP entry will succeed + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + If the L bit is clear and the privilege mode of the access is M, the access succeeds +* **Verification Goals** + + M mode single access store, store-conditional, or AMO instruction from outside defined NA4 address range with write permissions and with L=0 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=1, L=0, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + + CHECK + - check no access-fault exception (Feature: "no cfg matching") + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S033_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-3x(group) => FTR01-f + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is M: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in M mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-33 (LOW-PRIO) + [with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED +### Sub-feature: 015_store_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + M mode single access store, store-conditional, or AMO instruction inside defined NA4 address range with write permissions and with L=1 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=1, L=1, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S034_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-3x(group) => FTR01-f + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is M: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in M mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-34 (HIGH-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 016_store_L1_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 58 Volume II: RISC-V Privileged Architectures V20211203} + Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception +* **Verification Goals** + + M mode single access store, store-conditional, or AMO instruction inside defined NA4 address range without write permissions and with L=1 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=0, L=1, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + + CHECK + - check store access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S035_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-3x(group) => FTR01-f + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is M: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in M mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-35 (MEDIUM-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check store access-fault exception raised => FTR04-d] +### Sub-feature: 017_store_L1_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + M mode single access store, store-conditional, or AMO instruction from outside defined NA4 address range with write permissions and with L=1 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=1, L=1, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=0 + + ACCESS + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + + CHECK + - check no access-fault exception (Feature: "no cfg matching") + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S036_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-3x(group) => FTR01-f + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is M: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in M mode when the bit mstatus.MPRV=0] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-36 (HIGH-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED +### Sub-feature: 018_load_MPP_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, any M-mode access matching the PMP entry will succeed + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + If the L bit is clear and the privilege mode of the access is M, the access succeeds +* **Verification Goals** + + M mode single access load or load-reserved instruction inside defined NA4 address range with read permissions and with L=0 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=1, L=0, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE) + + ACCESS + - execute a load or load-reserved instruction from that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S041_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-4x(group) => FTR01-f + [PMP check on load or load-reserved instruction where effective privilege mode is M: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-41 (LOWEST-PRIO) + [with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 019_load_MPP_L0_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, any M-mode access matching the PMP entry will succeed + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + If the L bit is clear and the privilege mode of the access is M, the access succeeds +* **Verification Goals** + + M mode single access load or load-reserved instruction inside defined NA4 address range without read permissions and with L=0 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=0, L=0, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE) + + ACCESS + - execute a load or load-reserved instruction from that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S042_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-4x(group) => FTR01-f + [PMP check on load or load-reserved instruction where effective privilege mode is M: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-42 (LOWEST-PRIO) + [with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry without read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 020_load_MPP_L0_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, any M-mode access matching the PMP entry will succeed + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + If the L bit is clear and the privilege mode of the access is M, the access succeeds +* **Verification Goals** + + M mode single access load or load-reserved instruction from outside defined NA4 address range with read permissions and with L=0 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=1, L=0, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE) + + ACCESS + - execute a load or load-reserved instruction from outside all PMP defined regions + + CHECK + - check no access-fault exception (Feature: "no cfg matching") + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S043_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-4x(group) => FTR01-f + [PMP check on load or load-reserved instruction where effective privilege mode is M: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-43 (LOWEST-PRIO) + [with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED +### Sub-feature: 021_load_MPP_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + M mode single access load or load-reserved instruction inside defined NA4 address range with read permissions and with L=1 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=1, L=1, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE) + + ACCESS + - execute a load or load-reserved instruction from that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S044_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-4x(group) => FTR01-f + [PMP check on load or load-reserved instruction where effective privilege mode is M: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-44 (LOWEST-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 022_load_MPP_L1_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 58 Volume II: RISC-V Privileged Architectures V20211203} + Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception +* **Verification Goals** + + M mode single access load or load-reserved instruction inside defined NA4 address range without read permissions and with L=1 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=0, L=1, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE) + + ACCESS + - execute a load or load-reserved instruction from that region (with exact address-matching) + + CHECK + - check load access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S045_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-4x(group) => FTR01-f + [PMP check on load or load-reserved instruction where effective privilege mode is M: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-45 (LOWEST-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without read permissions for the PMP region + - execute a load or load-reserved instruction from that region (with exact address-matching) + - check load access-fault exception raised => FTR04-c] +### Sub-feature: 023_load_MPP_L1_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + M mode single access load or load-reserved instruction from outside defined NA4 address range with read permissions and with L=1 + - choose a readable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, R=1, L=1, X/W:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE) + + ACCESS + - execute a load or load-reserved instruction from outside all PMP defined regions + + CHECK + - check no access-fault exception (Feature: "no cfg matching") + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S046_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-4x(group) => FTR01-f + [PMP check on load or load-reserved instruction where effective privilege mode is M: + - choose a data readable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data load in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-46 (LOWEST-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with read permissions for the PMP region + - execute a load or load-reserved instruction from outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED +### Sub-feature: 024_store_MPP_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, any M-mode access matching the PMP entry will succeed + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + If the L bit is clear and the privilege mode of the access is M, the access succeeds +* **Verification Goals** + + M mode single access store, store-conditional, or AMO instruction inside defined NA4 address range with write permissions and with L=0 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=1, L=0, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE) + + ACCESS + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S051_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-5x(group) => FTR01-f + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is M: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-51 (LOWEST-PRIO) + [with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 025_store_MPP_L0_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, any M-mode access matching the PMP entry will succeed + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + If the L bit is clear and the privilege mode of the access is M, the access succeeds +* **Verification Goals** + + M mode single access store, store-conditional, or AMO instruction inside defined NA4 address range without write permissions and with L=0 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=0, L=0, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE) + + ACCESS + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S052_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-5x(group) => FTR01-f + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is M: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-52 (LOWEST-PRIO) + [with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry without write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 026_store_MPP_L0_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is clear, any M-mode access matching the PMP entry will succeed + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + If the L bit is clear and the privilege mode of the access is M, the access succeeds +* **Verification Goals** + + M mode single access store, store-conditional, or AMO instruction from outside defined NA4 address range with write permissions and with L=0 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=1, L=0, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE) + + ACCESS + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + + CHECK + - check no access-fault exception (Feature: "no cfg matching") + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S053_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-5x(group) => FTR01-f + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is M: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-53 (LOWEST-PRIO) + [with L=0 => FTR08-e2-1 (refers to FTR09-d1) + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED +### Sub-feature: 027_store_MPP_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + M mode single access store, store-conditional, or AMO instruction inside defined NA4 address range with write permissions and with L=1 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=1, L=1, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE) + + ACCESS + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + + CHECK + - check no access-fault exception + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S054_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-5x(group) => FTR01-f + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is M: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-54 (LOWEST-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check no access-fault exception] +### Sub-feature: 028_store_MPP_L1_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set + + {Page 58 Volume II: RISC-V Privileged Architectures V20211203} + Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception +* **Verification Goals** + + M mode single access store, store-conditional, or AMO instruction inside defined NA4 address range without write permissions and with L=1 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=0, L=1, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE) + + ACCESS + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + + CHECK + - check store access-fault exception raised + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S055_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-5x(group) => FTR01-f + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is M: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-55 (LOWEST-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry without write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to that region (with exact address-matching) + - check store access-fault exception raised => FTR04-d] +### Sub-feature: 029_store_MPP_L1_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 56 Volume II: RISC-V Privileged Architectures V20211203} + PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset + + {Page 60 Section "Locking and Privilege Mode" Volume II: RISC-V Privileged Architectures V20211203} + When the L bit is set, these permissions are enforced for all privilege modes + + {Page 60 Section "Priority and Matching Logic" Volume II: RISC-V Privileged Architectures V20211203} + if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set +* **Verification Goals** + + M mode single access store, store-conditional, or AMO instruction from outside defined NA4 address range with write permissions and with L=1 + - choose a data writable pmp region and address range + - choose only one PMP entry (i) + + CONFIGURATION + - pmpcfg(i): A=NA4, W=1, L=1, X/R:random + - pmpaddr(i): NA4 address range + - mstatus.MPRV=1 and mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE) + + ACCESS + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + + CHECK + - check no access-fault exception (Feature: "no cfg matching") + + REUSABILITY + - if possible, the PMP entry number (i) is a configurable parameter + - if possible, the PMP entry lock (L) is a configurable parameter + - if possible, the PMP entry permissions (R,W,X) are configurable parameters + - if possible, the PMP entry address-matching mode (A) is a configurable parameter + - if possible, the PMP entry address range (pmpaddr) is a configurable parameter + - if possible, the PMP entry associated access address is a configurable parameter + - so a single CONFIGURATION function and a single ACCESS function can be reused and combined +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F012_S056_I000 +* **Link to Coverage:** +* **Comments** + + <> + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + TST12-5x(group) => FTR01-f + [PMP check on store, store-conditional, or AMO instruction where effective privilege mode is M: + - choose a data writable pmp region and address range + - choose only one PMP entry (i) ([FTR02-b1]: maybe mandatorily the 1st one) + - if possible, the PMP entry number is a configurable parameter + - choose pmpcfg(i).A=NA4 + - single access data store in any mode when the bit mstatus.MPRV=1 and the mstatus.MPP contains M (TODO: CHECK IF MAKING SENSE)] + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST12-56 (LOWEST-PRIO) + [with L=1 => FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1), + - configure the PMP entry with write permissions for the PMP region + - execute a store, store-conditional, or AMO instruction to outside all PMP defined regions + - check no access-fault exception] //TODO: CHECK IF M-MODE ALLOWED +## Feature: cfg NAPOT access S/U + +### Sub-feature: 000_fetch_L0_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S011_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S011_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S011_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=NAPOT] + TST13-11 (HIGH-PRIO) + [same as TST11-11(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 001_fetch_L0_X0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S012_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S012_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S012_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-b + [Attempting to fetch an instruction from a PMP region that does not have execute permissions raises an instruction access-fault exception] + + + TST13-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=NAPOT] + TST13-12 (MEDIUM-PRIO) + [same as TST11-12(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 002_fetch_L0_X1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S013_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S013_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S013_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=NAPOT] + TST13-13 (MEDIUM-PRIO) + [same as TST11-13(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 003_fetch_L1_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S014_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S014_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S014_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=NAPOT] + TST13-14 (LOW-PRIO) + [same as TST11-14(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 004_fetch_L1_X0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S015_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S015_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S015_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-b + [Attempting to fetch an instruction from a PMP region that does not have execute permissions raises an instruction access-fault exception] + + + TST13-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=NAPOT] + TST13-15 (LOW-PRIO) + [same as TST11-15(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 005_fetch_L1_X1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S016_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S016_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S016_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=NAPOT] + TST13-16 (LOW-PRIO) + [same as TST11-16(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 006_load_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S021_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S021_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S021_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=NAPOT] + TST13-21 (HIGH-PRIO) + [same as TST11-21(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 007_load_L0_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S022_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S022_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S022_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + + TST13-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=NAPOT] + TST13-22 (MEDIUM-PRIO) + [same as TST11-22(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 008_load_L0_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S023_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S023_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S023_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=NAPOT] + TST13-23 (MEDIUM-PRIO) + [same as TST11-23(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 009_load_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S024_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S024_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S024_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=NAPOT] + TST13-24 (LOW-PRIO) + [same as TST11-24(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 010_load_L1_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S025_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S025_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S025_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + + TST13-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=NAPOT] + TST13-25 (LOW-PRIO) + [same as TST11-25(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 011_load_L1_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S026_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S026_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S026_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=NAPOT] + TST13-26 (LOW-PRIO) + [same as TST11-26(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 012_store_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S031_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S031_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S031_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=NAPOT] + TST13-31 (HIGH-PRIO) + [same as TST11-31(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 013_store_L0_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S032_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S032_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S032_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + + TST13-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=NAPOT] + TST13-32 (MEDIUM-PRIO) + [same as TST11-32(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 014_store_L0_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S033_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S033_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S033_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=NAPOT] + TST13-33 (MEDIUM-PRIO) + [same as TST11-33(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 015_store_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S034_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S034_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S034_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=NAPOT] + TST13-34 (LOW-PRIO) + [same as TST11-34(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 016_store_L1_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S035_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S035_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S035_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + + TST13-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=NAPOT] + TST13-35 (LOW-PRIO) + [same as TST11-35(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 017_store_L1_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S036_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S036_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S036_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=NAPOT] + TST13-36 (LOW-PRIO) + [same as TST11-36(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 018_load_MPP_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S041_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S041_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S041_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=NAPOT] + TST13-41 (LOWEST-PRIO) + [same as TST11-41(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 019_load_MPP_L0_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S042_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S042_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S042_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + + TST13-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=NAPOT] + TST13-42 (LOWEST-PRIO) + [same as TST11-42(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 020_load_MPP_L0_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S043_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S043_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S043_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=NAPOT] + TST13-43 (LOWEST-PRIO) + [same as TST11-43(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 021_load_MPP_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S044_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S044_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S044_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=NAPOT] + TST13-44 (LOWEST-PRIO) + [same as TST11-44(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 022_load_MPP_L1_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S045_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S045_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S045_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + + TST13-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=NAPOT] + TST13-45 (LOWEST-PRIO) + [same as TST11-45(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 023_load_MPP_L1_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S046_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S046_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S046_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=NAPOT] + TST13-46 (LOWEST-PRIO) + [same as TST11-46(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 024_store_MPP_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S051_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S051_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S051_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=NAPOT] + TST13-51 (LOWEST-PRIO) + [same as TST11-51(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 025_store_MPP_L0_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S052_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S052_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S052_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + + TST13-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=NAPOT] + TST13-52 (LOWEST-PRIO) + [same as TST11-52(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 026_store_MPP_L0_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S053_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S053_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S053_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=NAPOT] + TST13-53 (LOWEST-PRIO) + [same as TST11-53(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 027_store_MPP_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S054_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S054_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S054_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=NAPOT] + TST13-54 (LOWEST-PRIO) + [same as TST11-54(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 028_store_MPP_L1_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S055_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S055_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S055_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + + TST13-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=NAPOT] + TST13-55 (LOWEST-PRIO) + [same as TST11-55(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 029_store_MPP_L1_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S056_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S056_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F013_S056_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST13-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=NAPOT] + TST13-56 (LOWEST-PRIO) + [same as TST11-56(group), but with pmpcfg(i).A=NAPOT] +## Feature: cfg NAPOT access M + +### Sub-feature: 000_fetch_L0_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S011_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S011_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S011_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=NAPOT] + TST14-11 (LOW-PRIO) + [same as TST12-11(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 001_fetch_L0_X0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S012_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S012_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S012_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=NAPOT] + TST14-12 (LOW-PRIO) + [same as TST12-12(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 002_fetch_L0_X1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S013_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S013_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S013_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=NAPOT] + TST14-13 (LOW-PRIO) + [same as TST12-13(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 003_fetch_L1_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S014_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S014_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S014_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=NAPOT] + TST14-14 (HIGH-PRIO) + [same as TST12-14(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 004_fetch_L1_X0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S015_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S015_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S015_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-b + [Attempting to fetch an instruction from a PMP region that does not have execute permissions raises an instruction access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=NAPOT] + TST14-15 (MEDIUM-PRIO) + [same as TST12-15(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 005_fetch_L1_X1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S016_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S016_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S016_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=NAPOT] + TST14-16 (HIGH-PRIO) + [same as TST12-16(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 006_load_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S021_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S021_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S021_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=NAPOT] + TST14-21 (LOW-PRIO) + [same as TST12-21(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 007_load_L0_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S022_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S022_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S022_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=NAPOT] + TST14-22 (LOW-PRIO) + [same as TST12-22(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 008_load_L0_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S023_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S023_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S023_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=NAPOT] + TST14-23 (LOW-PRIO) + [same as TST12-23(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 009_load_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S024_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S024_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S024_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=NAPOT] + TST14-24 (HIGH-PRIO) + [same as TST12-24(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 010_load_L1_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S025_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S025_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S025_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=NAPOT] + TST14-25 (MEDIUM-PRIO) + [same as TST12-25(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 011_load_L1_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S026_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S026_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S026_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=NAPOT] + TST14-26 (HIGH-PRIO) + [same as TST12-26(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 012_store_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S031_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S031_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S031_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=NAPOT] + TST14-31 (LOW-PRIO) + [same as TST12-31(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 013_store_L0_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S032_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S032_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S032_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=NAPOT] + TST14-32 (LOW-PRIO) + [same as TST12-32(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 014_store_L0_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S033_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S033_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S033_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=NAPOT] + TST14-33 (LOW-PRIO) + [same as TST12-33(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 015_store_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S034_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S034_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S034_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=NAPOT] + TST14-34 (HIGH-PRIO) + [same as TST12-34(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 016_store_L1_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S035_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S035_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S035_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=NAPOT] + TST14-35 (MEDIUM-PRIO) + [same as TST12-35(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 017_store_L1_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S036_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S036_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S036_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=NAPOT] + TST14-36 (HIGH-PRIO) + [same as TST12-36(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 018_load_MPP_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S041_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S041_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S041_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=NAPOT] + TST14-41 (LOWEST-PRIO) + [same as TST12-41(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 019_load_MPP_L0_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S042_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S042_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S042_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=NAPOT] + TST14-42 (LOWEST-PRIO) + [same as TST12-42(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 020_load_MPP_L0_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S043_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S043_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S043_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=NAPOT] + TST14-43 (LOWEST-PRIO) + [same as TST12-43(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 021_load_MPP_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S044_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S044_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S044_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=NAPOT] + TST14-44 (LOWEST-PRIO) + [same as TST12-44(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 022_load_MPP_L1_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S045_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S045_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S045_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=NAPOT] + TST14-45 (LOWEST-PRIO) + [same as TST12-45(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 023_load_MPP_L1_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S046_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S046_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S046_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=NAPOT] + TST14-46 (LOWEST-PRIO) + [same as TST12-46(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 024_store_MPP_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S051_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S051_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S051_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=NAPOT] + TST14-51 (LOWEST-PRIO) + [same as TST12-51(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 025_store_MPP_L0_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S052_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S052_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S052_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=NAPOT] + TST14-52 (LOWEST-PRIO) + [same as TST12-52(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 026_store_MPP_L0_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S053_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S053_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S053_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=NAPOT] + TST14-53 (LOWEST-PRIO) + [same as TST12-53(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 027_store_MPP_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S054_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S054_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S054_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=NAPOT] + TST14-54 (LOWEST-PRIO) + [same as TST12-54(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 028_store_MPP_L1_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S055_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S055_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S055_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=NAPOT] + TST14-55 (LOWEST-PRIO) + [same as TST12-55(group), but with pmpcfg(i).A=NAPOT] +### Sub-feature: 029_store_MPP_L1_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S056_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S056_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=NAPOT + - pmpaddr(i): any NAPOT address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F014_S056_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST14-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=NAPOT] + TST14-56 (LOWEST-PRIO) + [same as TST12-56(group), but with pmpcfg(i).A=NAPOT] +## Feature: cfg TOR access S/U + +### Sub-feature: 000_fetch_L0_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S011_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S011_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S011_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=TOR] + TST15-11 (HIGH-PRIO) + [same as TST11-11(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 001_fetch_L0_X0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S012_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S012_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S012_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-b + [Attempting to fetch an instruction from a PMP region that does not have execute permissions raises an instruction access-fault exception] + + + TST15-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=TOR] + TST15-12 (MEDIUM-PRIO) + [same as TST11-12(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 002_fetch_L0_X1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S013_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S013_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S013_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=TOR] + TST15-13 (MEDIUM-PRIO) + [same as TST11-13(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 003_fetch_L1_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S014_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S014_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S014_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=TOR] + TST15-14 (LOW-PRIO) + [same as TST11-14(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 004_fetch_L1_X0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S015_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S015_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S015_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-b + [Attempting to fetch an instruction from a PMP region that does not have execute permissions raises an instruction access-fault exception] + + + TST15-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=TOR] + TST15-15 (LOW-PRIO) + [same as TST11-15(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 005_fetch_L1_X1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S016_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S016_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S016_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=TOR] + TST15-16 (LOW-PRIO) + [same as TST11-16(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 006_load_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S021_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S021_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S021_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=TOR] + TST15-21 (HIGH-PRIO) + [same as TST11-21(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 007_load_L0_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S022_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S022_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S022_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + + TST15-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=TOR] + TST15-22 (MEDIUM-PRIO) + [same as TST11-22(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 008_load_L0_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S023_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S023_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S023_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=TOR] + TST15-23 (MEDIUM-PRIO) + [same as TST11-23(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 009_load_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S024_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S024_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S024_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=TOR] + TST15-24 (LOW-PRIO) + [same as TST11-24(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 010_load_L1_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S025_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S025_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S025_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + + TST15-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=TOR] + TST15-25 (LOW-PRIO) + [same as TST11-25(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 011_load_L1_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S026_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S026_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S026_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=TOR] + TST15-26 (LOW-PRIO) + [same as TST11-26(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 012_store_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S031_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S031_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S031_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=TOR] + TST15-31 (HIGH-PRIO) + [same as TST11-31(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 013_store_L0_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S032_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S032_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S032_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + + TST15-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=TOR] + TST15-32 (MEDIUM-PRIO) + [same as TST11-32(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 014_store_L0_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S033_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S033_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S033_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=TOR] + TST15-33 (MEDIUM-PRIO) + [same as TST11-33(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 015_store_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S034_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S034_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S034_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=TOR] + TST15-34 (LOW-PRIO) + [same as TST11-34(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 016_store_L1_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S035_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S035_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S035_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + + TST15-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=TOR] + TST15-35 (LOW-PRIO) + [same as TST11-35(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 017_store_L1_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S036_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S036_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S036_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=TOR] + TST15-36 (LOW-PRIO) + [same as TST11-36(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 018_load_MPP_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S041_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S041_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S041_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=TOR] + TST15-41 (LOWEST-PRIO) + [same as TST11-41(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 019_load_MPP_L0_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S042_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S042_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S042_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + + TST15-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=TOR] + TST15-42 (LOWEST-PRIO) + [same as TST11-42(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 020_load_MPP_L0_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S043_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S043_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S043_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=TOR] + TST15-43 (LOWEST-PRIO) + [same as TST11-43(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 021_load_MPP_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S044_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S044_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S044_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=TOR] + TST15-44 (LOWEST-PRIO) + [same as TST11-44(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 022_load_MPP_L1_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S045_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S045_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S045_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + + TST15-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=TOR] + TST15-45 (LOWEST-PRIO) + [same as TST11-45(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 023_load_MPP_L1_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S046_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S046_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S046_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=TOR] + TST15-46 (LOWEST-PRIO) + [same as TST11-46(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 024_store_MPP_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S051_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S051_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S051_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=TOR] + TST15-51 (LOWEST-PRIO) + [same as TST11-51(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 025_store_MPP_L0_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S052_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S052_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S052_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + + TST15-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=TOR] + TST15-52 (LOWEST-PRIO) + [same as TST11-52(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 026_store_MPP_L0_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S053_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S053_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S053_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=TOR] + TST15-53 (LOWEST-PRIO) + [same as TST11-53(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 027_store_MPP_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S054_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S054_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S054_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=TOR] + TST15-54 (LOWEST-PRIO) + [same as TST11-54(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 028_store_MPP_L1_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S055_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S055_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S055_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + + TST15-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=TOR] + TST15-55 (LOWEST-PRIO) + [same as TST11-55(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 029_store_MPP_L1_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S056_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S056_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S056_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=TOR] + TST15-56 (LOWEST-PRIO) + [same as TST11-56(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 030_fetch_L0_X1_addr_forbidden + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S011_I000 feature description (Cf. Feature: "cfg NA4 access S/U") + + {Page 59 Volume II: RISC-V Privileged Architectures V20211203} + If pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i matches no addresses + If PMP entry 0’s A field is set to TOR, zero is used for the lower bound, and so it matches any address y < pmpaddr(0) +* **Verification Goals** + + reuse of VP_PMP_F011_S011_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range + - [for i=0] pmpaddr(0) = 0: invalid TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) + + CHECK UPDATE + - check instruction fetch access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S061_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=TOR] + TST15-11 (LOW-PRIO) + [same as TST11-11(group), but with pmpcfg(i).A=TOR] + + + //TO COMPLETE => FTR06-b + TST25 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) > 0 + TST26 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) = 0 + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) > 0 + - pmpaddr(0) = 0] + + //TO COMPLETE => FTR06-c + TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) and pmpcfg(i-1) correct + [create scenario where PMP entry pmpcfg(i) with TOR: + - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct] + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) >= pmpaddr(1/2/3/…)] +### Sub-feature: 031_fetch_L1_X1_addr_forbidden + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S014_I000 feature description (Cf. Feature: "cfg NA4 access S/U") + + {Page 59 Volume II: RISC-V Privileged Architectures V20211203} + If pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i matches no addresses + If PMP entry 0’s A field is set to TOR, zero is used for the lower bound, and so it matches any address y < pmpaddr(0) +* **Verification Goals** + + reuse of VP_PMP_F011_S014_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range + - [for i=0] pmpaddr(0) = 0: invalid TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) + + CHECK UPDATE + - check instruction fetch access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S062_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=TOR] + TST15-14 (LOW-PRIO) + [same as TST11-14(group), but with pmpcfg(i).A=TOR] + + + //TO COMPLETE => FTR06-b + TST25 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) > 0 + TST26 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) = 0 + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) > 0 + - pmpaddr(0) = 0] + + //TO COMPLETE => FTR06-c + TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) and pmpcfg(i-1) correct + [create scenario where PMP entry pmpcfg(i) with TOR: + - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct] + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) >= pmpaddr(1/2/3/…)] +### Sub-feature: 032_load_L0_R1_addr_forbidden + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S021_I000 feature description (Cf. Feature: "cfg NA4 access S/U") + + {Page 59 Volume II: RISC-V Privileged Architectures V20211203} + If pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i matches no addresses + If PMP entry 0’s A field is set to TOR, zero is used for the lower bound, and so it matches any address y < pmpaddr(0) +* **Verification Goals** + + reuse of VP_PMP_F011_S021_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range + - [for i=0] pmpaddr(0) = 0: invalid TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) + + CHECK UPDATE + - check load access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S063_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=TOR] + TST15-21 (HIGH-PRIO) + [same as TST11-21(group), but with pmpcfg(i).A=TOR] + + + //TO COMPLETE => FTR06-b + TST25 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) > 0 + TST26 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) = 0 + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) > 0 + - pmpaddr(0) = 0] + + //TO COMPLETE => FTR06-c + TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) and pmpcfg(i-1) correct + [create scenario where PMP entry pmpcfg(i) with TOR: + - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct] + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) >= pmpaddr(1/2/3/…)] +### Sub-feature: 033_load_L1_R1_addr_forbidden + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S024_I000 feature description (Cf. Feature: "cfg NA4 access S/U") + + {Page 59 Volume II: RISC-V Privileged Architectures V20211203} + If pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i matches no addresses + If PMP entry 0’s A field is set to TOR, zero is used for the lower bound, and so it matches any address y < pmpaddr(0) +* **Verification Goals** + + reuse of VP_PMP_F011_S024_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range + - [for i=0] pmpaddr(0) = 0: invalid TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) + + CHECK UPDATE + - check load access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S064_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=TOR] + TST15-24 (LOW-PRIO) + [same as TST11-24(group), but with pmpcfg(i).A=TOR] + + + //TO COMPLETE => FTR06-b + TST25 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) > 0 + TST26 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) = 0 + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) > 0 + - pmpaddr(0) = 0] + + //TO COMPLETE => FTR06-c + TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) and pmpcfg(i-1) correct + [create scenario where PMP entry pmpcfg(i) with TOR: + - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct] + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) >= pmpaddr(1/2/3/…)] +### Sub-feature: 034_store_L0_W1_addr_forbidden + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S031_I000 feature description (Cf. Feature: "cfg NA4 access S/U") + + {Page 59 Volume II: RISC-V Privileged Architectures V20211203} + If pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i matches no addresses + If PMP entry 0’s A field is set to TOR, zero is used for the lower bound, and so it matches any address y < pmpaddr(0) +* **Verification Goals** + + reuse of VP_PMP_F011_S031_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range + - [for i=0] pmpaddr(0) = 0: invalid TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) + + CHECK UPDATE + - check store access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S065_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=TOR] + TST15-31 (HIGH-PRIO) + [same as TST11-31(group), but with pmpcfg(i).A=TOR] + + + //TO COMPLETE => FTR06-b + TST25 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) > 0 + TST26 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) = 0 + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) > 0 + - pmpaddr(0) = 0] + + //TO COMPLETE => FTR06-c + TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) and pmpcfg(i-1) correct + [create scenario where PMP entry pmpcfg(i) with TOR: + - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct] + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) >= pmpaddr(1/2/3/…)] +### Sub-feature: 035_store_L1_W1_addr_forbidden + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S034_I000 feature description (Cf. Feature: "cfg NA4 access S/U") + + {Page 59 Volume II: RISC-V Privileged Architectures V20211203} + If pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i matches no addresses + If PMP entry 0’s A field is set to TOR, zero is used for the lower bound, and so it matches any address y < pmpaddr(0) +* **Verification Goals** + + reuse of VP_PMP_F011_S034_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range + - [for i=0] pmpaddr(0) = 0: invalid TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) + + CHECK UPDATE + - check store access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F015_S066_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST15-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=TOR] + TST15-34 (LOW-PRIO) + [same as TST11-34(group), but with pmpcfg(i).A=TOR] + + + //TO COMPLETE => FTR06-b + TST25 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) > 0 + TST26 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) = 0 + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) > 0 + - pmpaddr(0) = 0] + + //TO COMPLETE => FTR06-c + TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) and pmpcfg(i-1) correct + [create scenario where PMP entry pmpcfg(i) with TOR: + - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct] + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) >= pmpaddr(1/2/3/…)] +## Feature: cfg TOR access M + +### Sub-feature: 000_fetch_L0_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S011_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S011_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S011_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=TOR] + TST16-11 (LOW-PRIO) + [same as TST12-11(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 001_fetch_L0_X0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S012_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S012_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S012_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=TOR] + TST16-12 (LOW-PRIO) + [same as TST12-12(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 002_fetch_L0_X1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S013_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S013_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S013_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=TOR] + TST16-13 (LOW-PRIO) + [same as TST12-13(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 003_fetch_L1_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S014_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S014_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S014_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=TOR] + TST16-14 (HIGH-PRIO) + [same as TST12-14(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 004_fetch_L1_X0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S015_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S015_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S015_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-b + [Attempting to fetch an instruction from a PMP region that does not have execute permissions raises an instruction access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=TOR] + TST16-15 (MEDIUM-PRIO) + [same as TST12-15(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 005_fetch_L1_X1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S016_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S016_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S016_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=TOR] + TST16-16 (HIGH-PRIO) + [same as TST12-16(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 006_load_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S021_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S021_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S021_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=TOR] + TST16-21 (LOW-PRIO) + [same as TST12-21(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 007_load_L0_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S022_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S022_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S022_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=TOR] + TST16-22 (LOW-PRIO) + [same as TST12-22(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 008_load_L0_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S023_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S023_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S023_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=TOR] + TST16-23 (LOW-PRIO) + [same as TST12-23(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 009_load_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S024_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S024_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S024_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=TOR] + TST16-24 (HIGH-PRIO) + [same as TST12-24(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 010_load_L1_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S025_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S025_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S025_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=TOR] + TST16-25 (MEDIUM-PRIO) + [same as TST12-25(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 011_load_L1_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S026_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S026_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S026_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=TOR] + TST16-26 (HIGH-PRIO) + [same as TST12-26(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 012_store_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S031_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S031_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S031_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=TOR] + TST16-31 (LOW-PRIO) + [same as TST12-31(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 013_store_L0_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S032_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S032_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S032_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=TOR] + TST16-32 (LOW-PRIO) + [same as TST12-32(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 014_store_L0_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S033_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S033_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S033_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=TOR] + TST16-33 (LOW-PRIO) + [same as TST12-33(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 015_store_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S034_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S034_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S034_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=TOR] + TST16-34 (HIGH-PRIO) + [same as TST12-34(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 016_store_L1_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S035_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S035_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S035_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=TOR] + TST16-35 (MEDIUM-PRIO) + [same as TST12-35(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 017_store_L1_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S036_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S036_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S036_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=TOR] + TST16-36 (HIGH-PRIO) + [same as TST12-36(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 018_load_MPP_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S041_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S041_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S041_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=TOR] + TST16-41 (LOWEST-PRIO) + [same as TST12-41(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 019_load_MPP_L0_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S042_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S042_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S042_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=TOR] + TST16-42 (LOWEST-PRIO) + [same as TST12-42(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 020_load_MPP_L0_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S043_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S043_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S043_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=TOR] + TST16-43 (LOWEST-PRIO) + [same as TST12-43(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 021_load_MPP_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S044_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S044_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S044_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=TOR] + TST16-44 (LOWEST-PRIO) + [same as TST12-44(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 022_load_MPP_L1_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S045_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S045_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S045_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=TOR] + TST16-45 (LOWEST-PRIO) + [same as TST12-45(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 023_load_MPP_L1_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S046_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S046_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S046_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=TOR] + TST16-46 (LOWEST-PRIO) + [same as TST12-46(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 024_store_MPP_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S051_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S051_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S051_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=TOR] + TST16-51 (LOWEST-PRIO) + [same as TST12-51(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 025_store_MPP_L0_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S052_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S052_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S052_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=TOR] + TST16-52 (LOWEST-PRIO) + [same as TST12-52(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 026_store_MPP_L0_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S053_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S053_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S053_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=TOR] + TST16-53 (LOWEST-PRIO) + [same as TST12-53(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 027_store_MPP_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S054_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S054_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S054_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=TOR] + TST16-54 (LOWEST-PRIO) + [same as TST12-54(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 028_store_MPP_L1_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S055_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S055_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S055_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=TOR] + TST16-55 (LOWEST-PRIO) + [same as TST12-55(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 029_store_MPP_L1_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S056_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S056_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i) > pmpaddr(i-1): any TOR address range + - [for i=0] pmpaddr(0) > 0: any TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S056_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=TOR] + TST16-56 (LOWEST-PRIO) + [same as TST12-56(group), but with pmpcfg(i).A=TOR] +### Sub-feature: 030_fetch_L0_X1_addr_forbidden + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S011_I000 feature description (Cf. Feature: "cfg NA4 access M") + + {Page 59 Volume II: RISC-V Privileged Architectures V20211203} + If pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i matches no addresses + If PMP entry 0’s A field is set to TOR, zero is used for the lower bound, and so it matches any address y < pmpaddr(0) +* **Verification Goals** + + reuse of VP_PMP_F012_S011_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range + - [for i=0] pmpaddr(0) = 0: invalid TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S061_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=TOR] + TST16-11 (LOW-PRIO) + [same as TST12-11(group), but with pmpcfg(i).A=TOR] + + + //TO COMPLETE => FTR06-b + TST25 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) > 0 + TST26 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) = 0 + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) > 0 + - pmpaddr(0) = 0] + + //TO COMPLETE => FTR06-c + TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) and pmpcfg(i-1) correct + [create scenario where PMP entry pmpcfg(i) with TOR: + - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct] + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) >= pmpaddr(1/2/3/…)] +### Sub-feature: 031_fetch_L1_X1_addr_forbidden + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S014_I000 feature description (Cf. Feature: "cfg NA4 access M") + + {Page 59 Volume II: RISC-V Privileged Architectures V20211203} + If pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i matches no addresses + If PMP entry 0’s A field is set to TOR, zero is used for the lower bound, and so it matches any address y < pmpaddr(0) +* **Verification Goals** + + reuse of VP_PMP_F012_S014_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range + - [for i=0] pmpaddr(0) = 0: invalid TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S062_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=TOR] + TST16-14 (LOW-PRIO) + [same as TST12-14(group), but with pmpcfg(i).A=TOR] + + + //TO COMPLETE => FTR06-b + TST25 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) > 0 + TST26 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) = 0 + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) > 0 + - pmpaddr(0) = 0] + + //TO COMPLETE => FTR06-c + TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) and pmpcfg(i-1) correct + [create scenario where PMP entry pmpcfg(i) with TOR: + - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct] + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) >= pmpaddr(1/2/3/…)] +### Sub-feature: 032_load_L0_R1_addr_forbidden + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S021_I000 feature description (Cf. Feature: "cfg NA4 access M") + + {Page 59 Volume II: RISC-V Privileged Architectures V20211203} + If pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i matches no addresses + If PMP entry 0’s A field is set to TOR, zero is used for the lower bound, and so it matches any address y < pmpaddr(0) +* **Verification Goals** + + reuse of VP_PMP_F012_S021_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range + - [for i=0] pmpaddr(0) = 0: invalid TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S063_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=TOR] + TST16-21 (HIGH-PRIO) + [same as TST12-21(group), but with pmpcfg(i).A=TOR] + + + //TO COMPLETE => FTR06-b + TST25 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) > 0 + TST26 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) = 0 + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) > 0 + - pmpaddr(0) = 0] + + //TO COMPLETE => FTR06-c + TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) and pmpcfg(i-1) correct + [create scenario where PMP entry pmpcfg(i) with TOR: + - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct] + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) >= pmpaddr(1/2/3/…)] +### Sub-feature: 033_load_L1_R1_addr_forbidden + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S024_I000 feature description (Cf. Feature: "cfg NA4 access M") + + {Page 59 Volume II: RISC-V Privileged Architectures V20211203} + If pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i matches no addresses + If PMP entry 0’s A field is set to TOR, zero is used for the lower bound, and so it matches any address y < pmpaddr(0) +* **Verification Goals** + + reuse of VP_PMP_F012_S024_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range + - [for i=0] pmpaddr(0) = 0: invalid TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S064_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=TOR] + TST16-24 (LOW-PRIO) + [same as TST12-24(group), but with pmpcfg(i).A=TOR] + + + //TO COMPLETE => FTR06-b + TST25 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) > 0 + TST26 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) = 0 + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) > 0 + - pmpaddr(0) = 0] + + //TO COMPLETE => FTR06-c + TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) and pmpcfg(i-1) correct + [create scenario where PMP entry pmpcfg(i) with TOR: + - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct] + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) >= pmpaddr(1/2/3/…)] +### Sub-feature: 034_store_L0_W1_addr_forbidden + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S031_I000 feature description (Cf. Feature: "cfg NA4 access M") + + {Page 59 Volume II: RISC-V Privileged Architectures V20211203} + If pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i matches no addresses + If PMP entry 0’s A field is set to TOR, zero is used for the lower bound, and so it matches any address y < pmpaddr(0) +* **Verification Goals** + + reuse of VP_PMP_F012_S031_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range + - [for i=0] pmpaddr(0) = 0: invalid TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S065_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=TOR] + TST16-31 (HIGH-PRIO) + [same as TST12-31(group), but with pmpcfg(i).A=TOR] + + + //TO COMPLETE => FTR06-b + TST25 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) > 0 + TST26 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) = 0 + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) > 0 + - pmpaddr(0) = 0] + + //TO COMPLETE => FTR06-c + TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) and pmpcfg(i-1) correct + [create scenario where PMP entry pmpcfg(i) with TOR: + - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct] + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) >= pmpaddr(1/2/3/…)] +### Sub-feature: 035_store_L1_W1_addr_forbidden + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S034_I000 feature description (Cf. Feature: "cfg NA4 access M") + + {Page 59 Volume II: RISC-V Privileged Architectures V20211203} + If pmpaddri−1 ≥ pmpaddri and pmpcfgi.A=TOR, then PMP entry i matches no addresses + If PMP entry 0’s A field is set to TOR, zero is used for the lower bound, and so it matches any address y < pmpaddr(0) +* **Verification Goals** + + reuse of VP_PMP_F012_S034_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=TOR + - [for i>0] pmpaddr(i-1) > pmpaddr(i): invalid TOR address range + - [for i=0] pmpaddr(0) = 0: invalid TOR address range + - [for j=unused] pmpaddr(j)=random: only in single entry configuration case (not in reuse case) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F016_S066_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST16-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=TOR] + TST16-34 (LOW-PRIO) + [same as TST12-34(group), but with pmpcfg(i).A=TOR] + + + //TO COMPLETE => FTR06-b + TST25 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) > 0 + TST26 = same as TST15+TST16 (groups) with PMP entry (0) with pmpaddr(0) = 0 + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) > 0 + - pmpaddr(0) = 0] + + //TO COMPLETE => FTR06-c + TST27 = same as TST23-2 but with pmpaddr(i) ≤ pmpaddr(i-1) and with pmpcfg(i) and pmpcfg(i-1) correct + [create scenario where PMP entry pmpcfg(i) with TOR: + - pmpaddr(i) ≤ pmpaddr(i-1) and PMP entry pmpcfg(i-1) correct] + [create scenario where PMP entry pmpcfg(0) with TOR: + - pmpaddr(0) >= pmpaddr(1/2/3/…)] +## Feature: cfg OFF access S/U + +### Sub-feature: 000_fetch_L0_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S011_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S011_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range + + CHECK UPDATE + - check instruction fetch access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S011_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=OFF] + TST17-11 (HIGH-PRIO) + [same as TST11-11(group), but with pmpcfg(i).A=OFF + - check instruction fetch access-fault exception raised] +### Sub-feature: 001_fetch_L0_X0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S012_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S012_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S012_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-b + [Attempting to fetch an instruction from a PMP region that does not have execute permissions raises an instruction access-fault exception] + + + TST17-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=OFF] + TST17-12 (MEDIUM-PRIO) + [same as TST11-12(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 002_fetch_L0_X1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S013_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S013_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S013_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=OFF] + TST17-13 (MEDIUM-PRIO) + [same as TST11-13(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 003_fetch_L1_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S014_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S014_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range + + CHECK UPDATE + - check instruction fetch access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S014_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=OFF] + TST17-14 (LOW-PRIO) + [same as TST11-14(group), but with pmpcfg(i).A=OFF + - check instruction fetch access-fault exception raised] +### Sub-feature: 004_fetch_L1_X0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S015_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S015_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S015_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-b + [Attempting to fetch an instruction from a PMP region that does not have execute permissions raises an instruction access-fault exception] + + + TST17-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=OFF] + TST17-15 (LOW-PRIO) + [same as TST11-15(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 005_fetch_L1_X1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S016_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S016_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S016_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-1x(group) + [same as TST11-1x(group), but with pmpcfg(i).A=OFF] + TST17-16 (LOW-PRIO) + [same as TST11-16(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 006_load_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S021_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S021_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range + + CHECK UPDATE + - check load access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S021_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=OFF] + TST17-21 (HIGH-PRIO) + [same as TST11-21(group), but with pmpcfg(i).A=OFF + - check load access-fault exception raised] +### Sub-feature: 007_load_L0_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S022_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S022_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S022_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + + TST17-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=OFF] + TST17-22 (MEDIUM-PRIO) + [same as TST11-22(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 008_load_L0_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S023_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S023_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S023_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=OFF] + TST17-23 (MEDIUM-PRIO) + [same as TST11-23(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 009_load_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S024_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S024_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range + + CHECK UPDATE + - check load access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S024_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=OFF] + TST17-24 (LOW-PRIO) + [same as TST11-24(group), but with pmpcfg(i).A=OFF + - check load access-fault exception raised] +### Sub-feature: 010_load_L1_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S025_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S025_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S025_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + + TST17-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=OFF] + TST17-25 (LOW-PRIO) + [same as TST11-25(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 011_load_L1_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S026_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S026_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S026_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-2x(group) + [same as TST11-2x(group), but with pmpcfg(i).A=OFF] + TST17-26 (LOW-PRIO) + [same as TST11-26(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 012_store_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S031_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S031_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range + + CHECK UPDATE + - check store access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S031_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=OFF] + TST17-31 (HIGH-PRIO) + [same as TST11-31(group), but with pmpcfg(i).A=OFF + - check store access-fault exception raised] +### Sub-feature: 013_store_L0_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S032_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S032_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S032_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + + TST17-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=OFF] + TST17-32 (MEDIUM-PRIO) + [same as TST11-32(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 014_store_L0_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S033_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S033_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S033_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=OFF] + TST17-33 (MEDIUM-PRIO) + [same as TST11-33(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 015_store_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S034_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S034_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range + + CHECK UPDATE + - check store access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S034_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=OFF] + TST17-34 (LOW-PRIO) + [same as TST11-34(group), but with pmpcfg(i).A=OFF + - check store access-fault exception raised] +### Sub-feature: 016_store_L1_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S035_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S035_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S035_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + + TST17-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=OFF] + TST17-35 (LOW-PRIO) + [same as TST11-35(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 017_store_L1_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S036_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S036_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S036_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-3x(group) + [same as TST11-3x(group), but with pmpcfg(i).A=OFF] + TST17-36 (LOW-PRIO) + [same as TST11-36(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 018_load_MPP_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S041_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S041_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range + + CHECK UPDATE + - check load access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S041_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=OFF] + TST17-41 (LOWEST-PRIO) + [same as TST11-41(group), but with pmpcfg(i).A=OFF + - check load access-fault exception raised] +### Sub-feature: 019_load_MPP_L0_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S042_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S042_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S042_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + + TST17-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=OFF] + TST17-42 (LOWEST-PRIO) + [same as TST11-42(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 020_load_MPP_L0_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S043_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S043_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S043_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=OFF] + TST17-43 (LOWEST-PRIO) + [same as TST11-43(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 021_load_MPP_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S044_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S044_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range + + CHECK UPDATE + - check load access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S044_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=OFF] + TST17-44 (LOWEST-PRIO) + [same as TST11-44(group), but with pmpcfg(i).A=OFF + - check load access-fault exception raised] +### Sub-feature: 022_load_MPP_L1_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S045_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S045_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S045_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + + TST17-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=OFF] + TST17-45 (LOWEST-PRIO) + [same as TST11-45(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 023_load_MPP_L1_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S046_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S046_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S046_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-4x(group) + [same as TST11-4x(group), but with pmpcfg(i).A=OFF] + TST17-46 (LOWEST-PRIO) + [same as TST11-46(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 024_store_MPP_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S051_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S051_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range + + CHECK UPDATE + - check store access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S051_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=OFF] + TST17-51 (LOWEST-PRIO) + [same as TST11-51(group), but with pmpcfg(i).A=OFF + - check store access-fault exception raised] +### Sub-feature: 025_store_MPP_L0_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S052_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S052_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S052_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + + TST17-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=OFF] + TST17-52 (LOWEST-PRIO) + [same as TST11-52(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 026_store_MPP_L0_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S053_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S053_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S053_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e2-2 (refers to FTR09-d2-2) + [When the L bit is clear, the R/W/X permissions apply only to S and U modes] + FTR09-d2-2 (L=0 refers to FTR08-e2-2) + [if the privilege mode of the access is S or U (whatever L), then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=OFF] + TST17-53 (LOWEST-PRIO) + [same as TST11-53(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 027_store_MPP_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S054_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S054_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range + + CHECK UPDATE + - check store access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S054_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=OFF] + TST17-54 (LOWEST-PRIO) + [same as TST11-54(group), but with pmpcfg(i).A=OFF + - check store access-fault exception raised] +### Sub-feature: 028_store_MPP_L1_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S055_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S055_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S055_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + + TST17-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=OFF] + TST17-55 (LOWEST-PRIO) + [same as TST11-55(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 029_store_MPP_L1_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F011_S056_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F011_S056_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F017_S056_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-d + [PMP checks are applied to all accesses whose effective privilege mode is S or U] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + + TST17-5x(group) + [same as TST11-5x(group), but with pmpcfg(i).A=OFF] + TST17-56 (LOWEST-PRIO) + [same as TST11-56(group), but with pmpcfg(i).A=OFF] +## Feature: cfg OFF access M + +### Sub-feature: 000_fetch_L0_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S011_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S011_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S011_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=OFF] + TST18-11 (LOW-PRIO) + [same as TST12-11(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 001_fetch_L0_X0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S012_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S012_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S012_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=OFF] + TST18-12 (LOW-PRIO) + [same as TST12-12(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 002_fetch_L0_X1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S013_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S013_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S013_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=OFF] + TST18-13 (LOW-PRIO) + [same as TST12-13(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 003_fetch_L1_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S014_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S014_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range + + CHECK UPDATE + - check store access-fault exception raised (TODO: is M mode access prevented by A=OFF) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S014_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=OFF] + TST18-14 (HIGH-PRIO) + [same as TST12-14(group), but with pmpcfg(i).A=OFF + - check instruction fetch access-fault exception raised] +### Sub-feature: 004_fetch_L1_X0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S015_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S015_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S015_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-b + [Attempting to fetch an instruction from a PMP region that does not have execute permissions raises an instruction access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=OFF] + TST18-15 (MEDIUM-PRIO) + [same as TST12-15(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 005_fetch_L1_X1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S016_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S016_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S016_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-1x(group) + [same as TST12-1x(group), but with pmpcfg(i).A=OFF] + TST18-16 (HIGH-PRIO) + [same as TST12-16(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 006_load_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S021_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S021_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S021_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=OFF] + TST18-21 (LOW-PRIO) + [same as TST12-21(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 007_load_L0_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S022_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S022_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S022_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=OFF] + TST18-22 (LOW-PRIO) + [same as TST12-22(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 008_load_L0_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S023_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S023_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S023_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=OFF] + TST18-23 (LOW-PRIO) + [same as TST12-23(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 009_load_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S024_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S024_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range + + CHECK UPDATE + - check store access-fault exception raised (TODO: is M mode access prevented by A=OFF) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S024_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=OFF] + TST18-24 (HIGH-PRIO) + [same as TST12-24(group), but with pmpcfg(i).A=OFF + - check instruction fetch access-fault exception raised] +### Sub-feature: 010_load_L1_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S025_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S025_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S025_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=OFF] + TST18-25 (MEDIUM-PRIO) + [same as TST12-25(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 011_load_L1_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S026_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S026_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S026_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-2x(group) + [same as TST12-2x(group), but with pmpcfg(i).A=OFF] + TST18-26 (HIGH-PRIO) + [same as TST12-26(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 012_store_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S031_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S031_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S031_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=OFF] + TST18-31 (LOW-PRIO) + [same as TST12-31(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 013_store_L0_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S032_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S032_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S032_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=OFF] + TST18-32 (LOW-PRIO) + [same as TST12-32(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 014_store_L0_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S033_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S033_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S033_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=OFF] + TST18-33 (LOW-PRIO) + [same as TST12-33(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 015_store_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S034_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S034_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range + + CHECK UPDATE + - check store access-fault exception raised (TODO: is M mode access prevented by A=OFF) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S034_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=OFF] + TST18-34 (HIGH-PRIO) + [same as TST12-34(group), but with pmpcfg(i).A=OFF + - check instruction fetch access-fault exception raised] +### Sub-feature: 016_store_L1_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S035_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S035_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S035_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=OFF] + TST18-35 (MEDIUM-PRIO) + [same as TST12-35(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 017_store_L1_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S036_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S036_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S036_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-3x(group) + [same as TST12-3x(group), but with pmpcfg(i).A=OFF] + TST18-36 (HIGH-PRIO) + [same as TST12-36(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 018_load_MPP_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S041_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S041_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S041_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=OFF] + TST18-41 (LOWEST-PRIO) + [same as TST12-41(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 019_load_MPP_L0_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S042_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S042_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S042_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=OFF] + TST18-42 (LOWEST-PRIO) + [same as TST12-42(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 020_load_MPP_L0_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S043_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S043_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S043_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=OFF] + TST18-43 (LOWEST-PRIO) + [same as TST12-43(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 021_load_MPP_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S044_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S044_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range + + CHECK UPDATE + - check store access-fault exception raised (TODO: is M mode access prevented by A=OFF) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S044_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=OFF] + TST18-44 (LOWEST-PRIO) + [same as TST12-44(group), but with pmpcfg(i).A=OFF + - check instruction fetch access-fault exception raised] +### Sub-feature: 022_load_MPP_L1_R0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S045_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S045_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S045_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-c + [Attempting to execute a load or load-reserved instruction which accesses a physical address within a PMP region without read permissions raises a load access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=OFF] + TST18-45 (LOWEST-PRIO) + [same as TST12-45(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 023_load_MPP_L1_R1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S046_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S046_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S046_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-4x(group) + [same as TST12-4x(group), but with pmpcfg(i).A=OFF] + TST18-46 (LOWEST-PRIO) + [same as TST12-46(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 024_store_MPP_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S051_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S051_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S051_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=OFF] + TST18-51 (LOWEST-PRIO) + [same as TST12-51(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 025_store_MPP_L0_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S052_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S052_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S052_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=OFF] + TST18-52 (LOWEST-PRIO) + [same as TST12-52(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 026_store_MPP_L0_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S053_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S053_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S053_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e2-1 (refers to FTR09-d1) + [When the L bit is clear, any M-mode access matching the PMP entry will succeed] + FTR09-d1 (refers to FTR08-e2-1) + [If the L bit is clear and the privilege mode of the access is M, the access succeeds] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=OFF] + TST18-53 (LOWEST-PRIO) + [same as TST12-53(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 027_store_MPP_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S054_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S054_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range + + CHECK UPDATE + - check store access-fault exception raised (TODO: is M mode access prevented by A=OFF) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S054_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=OFF] + TST18-54 (LOWEST-PRIO) + [same as TST12-54(group), but with pmpcfg(i).A=OFF + - check instruction fetch access-fault exception raised] +### Sub-feature: 028_store_MPP_L1_W0_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S055_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S055_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S055_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR04-d + [Attempting to execute a store, store-conditional, or AMO instruction which accesses a physical address within a PMP region without write permissions raises a store access-fault exception] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=OFF] + TST18-55 (LOWEST-PRIO) + [same as TST12-55(group), but with pmpcfg(i).A=OFF] +### Sub-feature: 029_store_MPP_L1_W1_addr_miss + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F012_S056_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F012_S056_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - pmpcfg(i): A=OFF + - pmpaddr(i): NA4 address range +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F018_S056_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + FTR01-f (refers to FTR08-e1) + [PMP checks may additionally apply to M-mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them until the hart is reset] + + FTR08-e1 (refers to FTR01-f) (refers to FTR09-d2-1) + [When the L bit is set, these permissions are enforced for all privilege modes] + FTR09-d2-1 (refers to FTR08-e1) (refers to FTR01-f) + [if the L bit is set, then the access succeeds only if the R, W, or X bit corresponding to the access type is set] + + FTR02-b1 + [the lowest-numbered PMP CSRs must be implemented first (QUESTION: does it mean programmed first)] + + + TST18-5x(group) + [same as TST12-5x(group), but with pmpcfg(i).A=OFF] + TST18-56 (LOWEST-PRIO) + [same as TST12-56(group), but with pmpcfg(i).A=OFF] +## Feature: cfg NA4 not selectable + +### Sub-feature: 000_fetch_L0_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S011_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F019_S011_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) + + CHECK UPDATE + - check instruction fetch access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S011_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 001_fetch_L1_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S014_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F019_S014_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) + + CHECK UPDATE + - check instruction fetch access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S014_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 002_load_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S021_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F019_S021_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) + + CHECK UPDATE + - check load access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S021_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 003_load_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S024_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F019_S024_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) + + CHECK UPDATE + - check load access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S024_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 004_store_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S031_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F019_S031_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) + + CHECK UPDATE + - check store access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S031_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 005_store_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S034_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F019_S034_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) + + CHECK UPDATE + - check store access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S034_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 006_load_MPP_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S041_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F019_S041_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) + + CHECK UPDATE + - check load access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S041_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 007_load_MPP_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S044_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F019_S044_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) + + CHECK UPDATE + - check load access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S044_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 008_store_MPP_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S051_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F019_S051_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) + + CHECK UPDATE + - check store access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S051_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 009_store_MPP_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S054_I000 feature description (Cf. Feature: "cfg NA4 access S/U") +* **Verification Goals** + + reuse of VP_PMP_F019_S054_I000 verification goals (Cf. Feature: "cfg NA4 access S/U") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) + + CHECK UPDATE + - check store access-fault exception raised +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S054_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 010_fetch_L0_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S011_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F019_S011_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S011_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 011_fetch_L1_X1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S014_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F019_S014_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) + + CHECK UPDATE + - check store access-fault exception raised (TODO: is M mode access prevented by A=OFF) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S014_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 012_load_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S021_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F019_S021_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S021_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 013_load_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S024_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F019_S024_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) + + CHECK UPDATE + - check store access-fault exception raised (TODO: is M mode access prevented by A=OFF) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S024_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 014_store_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S031_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F019_S031_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S031_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 015_store_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S034_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F019_S034_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) + + CHECK UPDATE + - check store access-fault exception raised (TODO: is M mode access prevented by A=OFF) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S034_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 016_load_MPP_L0_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S041_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F019_S041_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S041_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 017_load_MPP_L1_R1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S044_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F019_S044_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) + + CHECK UPDATE + - check store access-fault exception raised (TODO: is M mode access prevented by A=OFF) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S044_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 018_store_MPP_L0_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S051_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F019_S051_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S051_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 019_store_MPP_L1_W1_addr_hit + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of VP_PMP_F019_S054_I000 feature description (Cf. Feature: "cfg NA4 access M") +* **Verification Goals** + + reuse of VP_PMP_F019_S054_I000 verification goals (Cf. Feature: "cfg NA4 access M") + + CONFIGURATION + - check that pmpcfg(i).A=OFF (by reading back) + + CHECK UPDATE + - check store access-fault exception raised (TODO: is M mode access prevented by A=OFF) +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F019_S054_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +## Feature: multi entries NA4 + +### Sub-feature: 000_1_entry + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose a single PMP entry + + CONFIGURATION and ACCESS + - for each pmp entry, apply any CONFIGURATION+ACCESS scenario above (Cf. Feature: "cfg NA4 access S/U/M") + - make sure the pmp entries address ranges are not overlapping/intersecting + - NB: obviously, pmp entry configurations with different mstatus.MPRV/MPP values cannot be mixed in same test + + CHECK + - for each pmp entry, we should obtain the expected CHECK result + + REUSABILITY + - if possible, the number of PMP entries (N) is a configurable parameter + - so a single test function can be reused +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F021_S001_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST21(group) + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST21-1 = extension of (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-12, TST11-22, TST11-32, TST11-42, TST11-52, + TST11-13, TST11-23, TST11-33, TST11-43, TST11-53, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST11-15, TST11-25, TST11-35, TST11-45, TST11-55, + TST11-16, TST11-26, TST11-36, TST11-46, TST11-56, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52, + TST12-13, TST12-23, TST12-33, TST12-43, TST12-53, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST12-15, TST12-25, TST12-35, TST12-45, TST12-55, + TST12-16, TST12-26, TST12-36, TST12-46, TST12-56) + [configure only one (any, but the first one) PMP entry + - use A=NA4 for the PMP entry configuration + - execute the chosen kind of access + - should be same result] +### Sub-feature: 001_2_isolated_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose any 2 PMP entries + + reuse of VP_PMP_F021_S001_I000 feature description (Cf. Feature: "multi entries NA4") +* **Pass/Fail Criteria:** Check RM +* **Test Type:** ENV Capability +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F021_S002_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST21(group) + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST21-2 = extension of compatible pair of (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-12, TST11-22, TST11-32, TST11-42, TST11-52, + TST11-13, TST11-23, TST11-33, TST11-43, TST11-53, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST11-15, TST11-25, TST11-35, TST11-45, TST11-55, + TST11-16, TST11-26, TST11-36, TST11-46, TST11-56, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52, + TST12-13, TST12-23, TST12-33, TST12-43, TST12-53, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST12-15, TST12-25, TST12-35, TST12-45, TST12-55, + TST12-16, TST12-26, TST12-36, TST12-46, TST12-56) + [configure 2 non-adjacent PMP entries (highest-numbered ones first) (avoid the first PMP entry) + - use A=NA4 for each PMP entry configuration + - execute the 2 kinds of accesses (if possible to chain due to potential access-fault exception) + - should be same 2 results] +### Sub-feature: 002_N_isolated_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose any N PMP entries (2> + + TST21(group) + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST21-3 = extension of compatible group(N) of (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-12, TST11-22, TST11-32, TST11-42, TST11-52, + TST11-13, TST11-23, TST11-33, TST11-43, TST11-53, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST11-15, TST11-25, TST11-35, TST11-45, TST11-55, + TST11-16, TST11-26, TST11-36, TST11-46, TST11-56, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52, + TST12-13, TST12-23, TST12-33, TST12-43, TST12-53, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST12-15, TST12-25, TST12-35, TST12-45, TST12-55, + TST12-16, TST12-26, TST12-36, TST12-46, TST12-56) + [configure N PMP entries (highest-numbered ones first) (as non-adjacent as possible, and avoid the first PMP entry) + - use A=NA4 for each PMP entry configuration + - execute the N kinds of accesses (if possible to chain due to potential access-fault exception) + - should be same N results] +### Sub-feature: 003_8_isolated_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose all 8 PMP entries + + reuse of VP_PMP_F021_S001_I000 feature description (Cf. Feature: "multi entries NA4") +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F021_S004_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST21(group) + [create scenarios where PMP entries with A=2 (NA4) and with/without matching permissions + - check only NA4 defined addresses are matching] + TST21-4 = extension of compatible group(8) of (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-12, TST11-22, TST11-32, TST11-42, TST11-52, + TST11-13, TST11-23, TST11-33, TST11-43, TST11-53, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST11-15, TST11-25, TST11-35, TST11-45, TST11-55, + TST11-16, TST11-26, TST11-36, TST11-46, TST11-56, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52, + TST12-13, TST12-23, TST12-33, TST12-43, TST12-53, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST12-15, TST12-25, TST12-35, TST12-45, TST12-55, + TST12-16, TST12-26, TST12-36, TST12-46, TST12-56) + [configure 8 PMP entries (highest-numbered ones first) + - use A=NA4 for each PMP entry configuration + - execute the 8 kinds of accesses (if possible to chain due to potential access-fault exception) + - should be same 8 results] +### Sub-feature: 004_2_intersecting_entries_fail + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose any 2 PMP entries + + CONFIGURATION and ACCESS (Cf. Feature: "cfg NA4 access S/U/M") + - for the least-numbered pmp entry, apply any CONFIGURATION+ACCESS scenario with access-fault + - for the highest-numbered pmp entry, apply any CONFIGURATION+ACCESS scenario without access-fault + - make sure the pmp entries address ranges are overlapping/intersecting (at least at 4 consecutive bytes) + - for each pmp entry, execute one access in its associated pmp address region but outside the overlapping/intersecting address range + - execute one additional access inside the overlapping/intersecting address range + - NB: obviously, pmp entry configurations with different access-modes (S/U vs. M) cannot be easily mixed in same test + - NB: obviously, pmp entry configurations with different mstatus.MPRV/MPP values cannot be mixed in same test + + CHECK + - for each pmp entry, access outside the overlapping/intersecting address range should give the expected CHECK result + - access inside the overlapping/intersecting address range should generate the access-type related access-fault + + REUSABILITY + - if possible, the number of PMP entries (N) is a configurable parameter + - so a single test function can be reused +* **Pass/Fail Criteria:** Check RM +* **Test Type:** ENV Capability +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F021_S005_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST51(group) => FTR09-a, FTR09-b and FTR09-c + [create scenarios where 2 PMP entries with same pmpaddr + - one without matching permissions or with A=OFF + - one with matching permissions and A=NA4/NAPOT/TOR + - any of them can be the lowest-numbered PMP entry] + TST51-1 + [configure 2 PMP entries + - configure the lowest-numbered PMP entry with (TST11-12, TST11-22, TST11-32, TST11-42, TST11-52, + TST11-15, TST11-25, TST11-35, TST11-45, TST11-55, + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52, + TST12-15, TST12-25, TST12-35, TST12-45, TST12-55, + TST13-12, TST13-22, TST13-32, TST13-42, TST13-52, + TST13-15, TST13-25, TST13-35, TST13-45, TST13-55, + TST14-12, TST14-22, TST14-32, TST14-42, TST14-52, + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55, + TST15-12, TST15-22, TST15-32, TST15-42, TST15-52, + TST15-15, TST15-25, TST15-35, TST15-45, TST15-55, + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52, + TST16-15, TST16-25, TST16-35, TST16-45, TST16-55, + TST17-12, TST17-22, TST17-32, TST17-42, TST17-52, + TST17-15, TST17-25, TST17-35, TST17-45, TST17-55, + TST18-12, TST18-22, TST18-32, TST18-42, TST18-52, + TST18-15, TST18-25, TST18-35, TST18-45, TST18-55) + - configure the highest-numbered PMP entry with (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) + - execute the associated access + - check associated access-fault exception raised] +### Sub-feature: 005_2_intersecting_entries_succeed + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose any 2 PMP entries + + CONFIGURATION and ACCESS (Cf. Feature: "cfg NA4 access S/U/M") + - for the least-numbered pmp entry, apply any CONFIGURATION+ACCESS scenario without access-fault + - for the highest-numbered pmp entry, apply any CONFIGURATION+ACCESS scenario with access-fault + - make sure the pmp entries address ranges are overlapping/intersecting (at least at 4 consecutive bytes) + - for each pmp entry, execute one access in its associated pmp address region but outside the overlapping/intersecting address range + - execute one additional access inside the overlapping/intersecting address range + - NB: obviously, pmp entry configurations with different access-modes (S/U vs. M) cannot be easily mixed in same test + - NB: obviously, pmp entry configurations with different mstatus.MPRV/MPP values cannot be mixed in same test + + CHECK + - for each pmp entry, access outside the overlapping/intersecting address range should give the expected CHECK result + - access inside the overlapping/intersecting address range should not generate any access-fault + + REUSABILITY + - if possible, the number of PMP entries (N) is a configurable parameter + - so a single test function can be reused +* **Pass/Fail Criteria:** Check RM +* **Test Type:** ENV Capability +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F021_S006_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST51(group) => FTR09-a, FTR09-b and FTR09-c + [create scenarios where 2 PMP entries with same pmpaddr + - one without matching permissions or with A=OFF + - one with matching permissions and A=NA4/NAPOT/TOR + - any of them can be the lowest-numbered PMP entry] + TST51-2 + [configure 2 PMP entries + - configure the lowest-numbered PMP entry with (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) + - configure the highest-numbered PMP entry with (TST11-12, TST11-22, TST11-32, TST11-42, TST11-52, + TST11-15, TST11-25, TST11-35, TST11-45, TST11-55, + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52, + TST12-15, TST12-25, TST12-35, TST12-45, TST12-55, + TST13-12, TST13-22, TST13-32, TST13-42, TST13-52, + TST13-15, TST13-25, TST13-35, TST13-45, TST13-55, + TST14-12, TST14-22, TST14-32, TST14-42, TST14-52, + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55, + TST15-12, TST15-22, TST15-32, TST15-42, TST15-52, + TST15-15, TST15-25, TST15-35, TST15-45, TST15-55, + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52, + TST16-15, TST16-25, TST16-35, TST16-45, TST16-55, + TST17-12, TST17-22, TST17-32, TST17-42, TST17-52, + TST17-15, TST17-25, TST17-35, TST17-45, TST17-55, + TST18-12, TST18-22, TST18-32, TST18-42, TST18-52, + TST18-15, TST18-25, TST18-35, TST18-45, TST18-55) + - execute the associated access + - check no access-fault exception] +## Feature: multi entries NAPOT + +### Sub-feature: 000_1_entry + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose a single PMP entry + + CONFIGURATION and ACCESS + - for each pmp entry, apply any CONFIGURATION+ACCESS scenario above (Cf. Feature: "cfg NAPOT access S/U/M") + - make sure the pmp entries address ranges are not overlapping/intersecting + - NB: obviously, pmp entry configurations with different mstatus.MPRV/MPP values cannot be mixed in same test + + CHECK + - for each pmp entry, we should obtain the expected CHECK result + + REUSABILITY + - if possible, the number of PMP entries (N) is a configurable parameter + - so a single test function can be reused +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F022_S001_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST22(group) + [create scenarios where PMP entries with A=3 (NAPOT) and with/without matching permissions + - check only NAPOT defined addresses are matching] + TST22-1 = extension of (TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-12, TST13-22, TST13-32, TST13-42, TST13-52, + TST13-13, TST13-23, TST13-33, TST13-43, TST13-53, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST13-15, TST13-25, TST13-35, TST13-45, TST13-55, + TST13-16, TST13-26, TST13-36, TST13-46, TST13-56, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-12, TST14-22, TST14-32, TST14-42, TST14-52, + TST14-13, TST14-23, TST14-33, TST14-43, TST14-53, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55, + TST14-16, TST14-26, TST14-36, TST14-46, TST14-56) + [configure only one (any, but the first one) PMP entry + - use A=NAPOT for the PMP entry configuration + - execute the chosen kind of access + - should be same result] +### Sub-feature: 001_2_isolated_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose any 2 PMP entries + + reuse of VP_PMP_F022_S001_I000 feature description (Cf. Feature: "multi entries NAPOT") +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F022_S002_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST22(group) + [create scenarios where PMP entries with A=3 (NAPOT) and with/without matching permissions + - check only NAPOT defined addresses are matching] + TST22-2 = extension of compatible pair of (TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-12, TST13-22, TST13-32, TST13-42, TST13-52, + TST13-13, TST13-23, TST13-33, TST13-43, TST13-53, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST13-15, TST13-25, TST13-35, TST13-45, TST13-55, + TST13-16, TST13-26, TST13-36, TST13-46, TST13-56, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-12, TST14-22, TST14-32, TST14-42, TST14-52, + TST14-13, TST14-23, TST14-33, TST14-43, TST14-53, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55, + TST14-16, TST14-26, TST14-36, TST14-46, TST14-56) + [configure 2 non-adjacent PMP entries (highest-numbered ones first) (avoid the first PMP entry) + - use A=NAPOT for each PMP entry configuration + - execute the 2 kinds of accesses (if possible to chain due to potential access-fault exception) + - should be same 2 results] +### Sub-feature: 002_N_isolated_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose any N PMP entries (2> + + TST22(group) + [create scenarios where PMP entries with A=3 (NAPOT) and with/without matching permissions + - check only NAPOT defined addresses are matching] + TST22-3 = extension of compatible group(N) of (TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-12, TST13-22, TST13-32, TST13-42, TST13-52, + TST13-13, TST13-23, TST13-33, TST13-43, TST13-53, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST13-15, TST13-25, TST13-35, TST13-45, TST13-55, + TST13-16, TST13-26, TST13-36, TST13-46, TST13-56, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-12, TST14-22, TST14-32, TST14-42, TST14-52, + TST14-13, TST14-23, TST14-33, TST14-43, TST14-53, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55, + TST14-16, TST14-26, TST14-36, TST14-46, TST14-56) + [configure N PMP entries (highest-numbered ones first) (as non-adjacent as possible, and avoid the first PMP entry) + - use A=NAPOT for each PMP entry configuration + - execute the N kinds of accesses (if possible to chain due to potential access-fault exception) + - should be same N results] +### Sub-feature: 003_8_isolated_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose all 8 PMP entries + + reuse of VP_PMP_F022_S001_I000 feature description (Cf. Feature: "multi entries NAPOT") +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Testcase +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F022_S004_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST22(group) + [create scenarios where PMP entries with A=3 (NAPOT) and with/without matching permissions + - check only NAPOT defined addresses are matching] + TST22-4 = extension of compatible group(8) of (TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-12, TST13-22, TST13-32, TST13-42, TST13-52, + TST13-13, TST13-23, TST13-33, TST13-43, TST13-53, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST13-15, TST13-25, TST13-35, TST13-45, TST13-55, + TST13-16, TST13-26, TST13-36, TST13-46, TST13-56, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-12, TST14-22, TST14-32, TST14-42, TST14-52, + TST14-13, TST14-23, TST14-33, TST14-43, TST14-53, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55, + TST14-16, TST14-26, TST14-36, TST14-46, TST14-56) + [configure 8 PMP entries (highest-numbered ones first) + - use A=NAPOT for each PMP entry configuration + - execute the 8 kinds of accesses (if possible to chain due to potential access-fault exception) + - should be same 8 results] +### Sub-feature: 004_2_intersecting_entries_fail + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose any 2 PMP entries + + CONFIGURATION and ACCESS (Cf. Feature: "cfg NAPOT access S/U/M") + - for the least-numbered pmp entry, apply any CONFIGURATION+ACCESS scenario with access-fault + - for the highest-numbered pmp entry, apply any CONFIGURATION+ACCESS scenario without access-fault + - make sure the pmp entries address ranges are overlapping/intersecting (at least at 4 consecutive bytes) + - for each pmp entry, execute one access in its associated pmp address region but outside the overlapping/intersecting address range + - execute one additional access inside the overlapping/intersecting address range + - NB: obviously, pmp entry configurations with different access-modes (S/U vs. M) cannot be easily mixed in same test + - NB: obviously, pmp entry configurations with different mstatus.MPRV/MPP values cannot be mixed in same test + + CHECK + - for each pmp entry, access outside the overlapping/intersecting address range should give the expected CHECK result + - access inside the overlapping/intersecting address range should generate the access-type related access-fault + + REUSABILITY + - if possible, the number of PMP entries (N) is a configurable parameter + - so a single test function can be reused +* **Pass/Fail Criteria:** Check RM +* **Test Type:** ENV Capability +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F022_S005_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST51(group) => FTR09-a, FTR09-b and FTR09-c + [create scenarios where 2 PMP entries with same pmpaddr + - one without matching permissions or with A=OFF + - one with matching permissions and A=NA4/NAPOT/TOR + - any of them can be the lowest-numbered PMP entry] + TST51-1 + [configure 2 PMP entries + - configure the lowest-numbered PMP entry with (TST11-12, TST11-22, TST11-32, TST11-42, TST11-52, + TST11-15, TST11-25, TST11-35, TST11-45, TST11-55, + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52, + TST12-15, TST12-25, TST12-35, TST12-45, TST12-55, + TST13-12, TST13-22, TST13-32, TST13-42, TST13-52, + TST13-15, TST13-25, TST13-35, TST13-45, TST13-55, + TST14-12, TST14-22, TST14-32, TST14-42, TST14-52, + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55, + TST15-12, TST15-22, TST15-32, TST15-42, TST15-52, + TST15-15, TST15-25, TST15-35, TST15-45, TST15-55, + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52, + TST16-15, TST16-25, TST16-35, TST16-45, TST16-55, + TST17-12, TST17-22, TST17-32, TST17-42, TST17-52, + TST17-15, TST17-25, TST17-35, TST17-45, TST17-55, + TST18-12, TST18-22, TST18-32, TST18-42, TST18-52, + TST18-15, TST18-25, TST18-35, TST18-45, TST18-55) + - configure the highest-numbered PMP entry with (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) + - execute the associated access + - check associated access-fault exception raised] +### Sub-feature: 005_2_intersecting_entries_succeed + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose any 2 PMP entries + + CONFIGURATION and ACCESS (Cf. Feature: "cfg NAPOT access S/U/M") + - for the least-numbered pmp entry, apply any CONFIGURATION+ACCESS scenario without access-fault + - for the highest-numbered pmp entry, apply any CONFIGURATION+ACCESS scenario with access-fault + - make sure the pmp entries address ranges are overlapping/intersecting (at least at 4 consecutive bytes) + - for each pmp entry, execute one access in its associated pmp address region but outside the overlapping/intersecting address range + - execute one additional access inside the overlapping/intersecting address range + - NB: obviously, pmp entry configurations with different access-modes (S/U vs. M) cannot be easily mixed in same test + - NB: obviously, pmp entry configurations with different mstatus.MPRV/MPP values cannot be mixed in same test + + CHECK + - for each pmp entry, access outside the overlapping/intersecting address range should give the expected CHECK result + - access inside the overlapping/intersecting address range should not generate any access-fault + + REUSABILITY + - if possible, the number of PMP entries (N) is a configurable parameter + - so a single test function can be reused +* **Pass/Fail Criteria:** Check RM +* **Test Type:** ENV Capability +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F022_S006_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST51(group) => FTR09-a, FTR09-b and FTR09-c + [create scenarios where 2 PMP entries with same pmpaddr + - one without matching permissions or with A=OFF + - one with matching permissions and A=NA4/NAPOT/TOR + - any of them can be the lowest-numbered PMP entry] + TST51-2 + [configure 2 PMP entries + - configure the lowest-numbered PMP entry with (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) + - configure the highest-numbered PMP entry with (TST11-12, TST11-22, TST11-32, TST11-42, TST11-52, + TST11-15, TST11-25, TST11-35, TST11-45, TST11-55, + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52, + TST12-15, TST12-25, TST12-35, TST12-45, TST12-55, + TST13-12, TST13-22, TST13-32, TST13-42, TST13-52, + TST13-15, TST13-25, TST13-35, TST13-45, TST13-55, + TST14-12, TST14-22, TST14-32, TST14-42, TST14-52, + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55, + TST15-12, TST15-22, TST15-32, TST15-42, TST15-52, + TST15-15, TST15-25, TST15-35, TST15-45, TST15-55, + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52, + TST16-15, TST16-25, TST16-35, TST16-45, TST16-55, + TST17-12, TST17-22, TST17-32, TST17-42, TST17-52, + TST17-15, TST17-25, TST17-35, TST17-45, TST17-55, + TST18-12, TST18-22, TST18-32, TST18-42, TST18-52, + TST18-15, TST18-25, TST18-35, TST18-45, TST18-55) + - execute the associated access + - check no access-fault exception] +## Feature: multi entries TOR + +### Sub-feature: 000_1_entry + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose a single PMP entry + + CONFIGURATION and ACCESS + - for each pmp entry, apply any CONFIGURATION+ACCESS scenario above (Cf. Feature: "cfg TOR access S/U/M") + - make sure the pmp entries address ranges are not overlapping/intersecting + - NB: obviously, pmp entry configurations with different mstatus.MPRV/MPP values cannot be mixed in same test + + CHECK + - for each pmp entry, we should obtain the expected CHECK result + + REUSABILITY + - if possible, the number of PMP entries (N) is a configurable parameter + - so a single test function can be reused +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F023_S001_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST23(group) => + [create scenarios where PMP entries with A=1 (TOR) and with/without matching permissions + - pmpaddr(i−1) < pmpaddr(i), pmpcfg(i).A=TOR and pmpcfg(i-1) with/without matching permissions + - check only TOR defined addresses are matching] + TST23-1 = extension of (TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-12, TST15-22, TST15-32, TST15-42, TST15-52, + TST15-13, TST15-23, TST15-33, TST15-43, TST15-53, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST15-15, TST15-25, TST15-35, TST15-45, TST15-55, + TST15-16, TST15-26, TST15-36, TST15-46, TST15-56, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52, + TST16-13, TST16-23, TST16-33, TST16-43, TST16-53, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54, + TST16-15, TST16-25, TST16-35, TST16-45, TST16-55, + TST16-16, TST16-26, TST16-36, TST16-46, TST16-56) + [configure only one (any, but the first one) PMP entry + - execute the chosen kind of access + - should be same result] +### Sub-feature: 001_2_isolated_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose any 2 PMP entries + + reuse of VP_PMP_F023_S001_I000 feature description (Cf. Feature: "multi entries TOR") +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F023_S002_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST23(group) => + [create scenarios where PMP entries with A=1 (TOR) and with/without matching permissions + - pmpaddr(i−1) < pmpaddr(i), pmpcfg(i).A=TOR and pmpcfg(i-1) with/without matching permissions + - check only TOR defined addresses are matching] + TST23-2 = extension of compatible pair of (TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-12, TST15-22, TST15-32, TST15-42, TST15-52, + TST15-13, TST15-23, TST15-33, TST15-43, TST15-53, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST15-15, TST15-25, TST15-35, TST15-45, TST15-55, + TST15-16, TST15-26, TST15-36, TST15-46, TST15-56, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52, + TST16-13, TST16-23, TST16-33, TST16-43, TST16-53, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54, + TST16-15, TST16-25, TST16-35, TST16-45, TST16-55, + TST16-16, TST16-26, TST16-36, TST16-46, TST16-56) + [configure 2 non-adjacent PMP entries (highest-numbered ones first) (avoid the first PMP entry) + - execute the 2 kinds of accesses (if possible to chain due to potential access-fault exception) + - should be same 2 results] +### Sub-feature: 002_N_isolated_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose any N PMP entries (2> + + TST23(group) => + [create scenarios where PMP entries with A=1 (TOR) and with/without matching permissions + - pmpaddr(i−1) < pmpaddr(i), pmpcfg(i).A=TOR and pmpcfg(i-1) with/without matching permissions + - check only TOR defined addresses are matching] + TST23-3 = extension of compatible group(N) of (TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-12, TST15-22, TST15-32, TST15-42, TST15-52, + TST15-13, TST15-23, TST15-33, TST15-43, TST15-53, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST15-15, TST15-25, TST15-35, TST15-45, TST15-55, + TST15-16, TST15-26, TST15-36, TST15-46, TST15-56, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52, + TST16-13, TST16-23, TST16-33, TST16-43, TST16-53, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54, + TST16-15, TST16-25, TST16-35, TST16-45, TST16-55, + TST16-16, TST16-26, TST16-36, TST16-46, TST16-56) + [configure N PMP entries (highest-numbered ones first) (as non-adjacent as possible, and avoid the first PMP entry) + - execute the N kinds of accesses (if possible to chain due to potential access-fault exception) + - should be same N results] +### Sub-feature: 003_8_isolated_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose all 8 PMP entries + + reuse of VP_PMP_F023_S001_I000 feature description (Cf. Feature: "multi entries TOR") +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F023_S004_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST23(group) => + [create scenarios where PMP entries with A=1 (TOR) and with/without matching permissions + - pmpaddr(i−1) < pmpaddr(i), pmpcfg(i).A=TOR and pmpcfg(i-1) with/without matching permissions + - check only TOR defined addresses are matching] + TST23-4 = extension of compatible group(8) of (TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-12, TST15-22, TST15-32, TST15-42, TST15-52, + TST15-13, TST15-23, TST15-33, TST15-43, TST15-53, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST15-15, TST15-25, TST15-35, TST15-45, TST15-55, + TST15-16, TST15-26, TST15-36, TST15-46, TST15-56, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52, + TST16-13, TST16-23, TST16-33, TST16-43, TST16-53, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54, + TST16-15, TST16-25, TST16-35, TST16-45, TST16-55, + TST16-16, TST16-26, TST16-36, TST16-46, TST16-56) + [configure 8 PMP entries (highest-numbered ones first) + - execute the 8 kinds of accesses (if possible to chain due to potential access-fault exception) + - should be same 8 results] +### Sub-feature: 004_2_intersecting_entries_fail + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose any 2 PMP entries + + CONFIGURATION and ACCESS (Cf. Feature: "cfg TOR access S/U/M") + - for the least-numbered pmp entry, apply any CONFIGURATION+ACCESS scenario with access-fault + - for the highest-numbered pmp entry, apply any CONFIGURATION+ACCESS scenario without access-fault + - make sure the pmp entries address ranges are overlapping/intersecting (at least at 4 consecutive bytes) + - for each pmp entry, execute one access in its associated pmp address region but outside the overlapping/intersecting address range + - execute one additional access inside the overlapping/intersecting address range + - NB: obviously, pmp entry configurations with different access-modes (S/U vs. M) cannot be easily mixed in same test + - NB: obviously, pmp entry configurations with different mstatus.MPRV/MPP values cannot be mixed in same test + + CHECK + - for each pmp entry, access outside the overlapping/intersecting address range should give the expected CHECK result + - access inside the overlapping/intersecting address range should generate the access-type related access-fault + + REUSABILITY + - if possible, the number of PMP entries (N) is a configurable parameter + - so a single test function can be reused +* **Pass/Fail Criteria:** Check RM +* **Test Type:** ENV Capability +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F023_S005_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST51(group) => FTR09-a, FTR09-b and FTR09-c + [create scenarios where 2 PMP entries with same pmpaddr + - one without matching permissions or with A=OFF + - one with matching permissions and A=NA4/NAPOT/TOR + - any of them can be the lowest-numbered PMP entry] + TST51-1 + [configure 2 PMP entries + - configure the lowest-numbered PMP entry with (TST11-12, TST11-22, TST11-32, TST11-42, TST11-52, + TST11-15, TST11-25, TST11-35, TST11-45, TST11-55, + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52, + TST12-15, TST12-25, TST12-35, TST12-45, TST12-55, + TST13-12, TST13-22, TST13-32, TST13-42, TST13-52, + TST13-15, TST13-25, TST13-35, TST13-45, TST13-55, + TST14-12, TST14-22, TST14-32, TST14-42, TST14-52, + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55, + TST15-12, TST15-22, TST15-32, TST15-42, TST15-52, + TST15-15, TST15-25, TST15-35, TST15-45, TST15-55, + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52, + TST16-15, TST16-25, TST16-35, TST16-45, TST16-55, + TST17-12, TST17-22, TST17-32, TST17-42, TST17-52, + TST17-15, TST17-25, TST17-35, TST17-45, TST17-55, + TST18-12, TST18-22, TST18-32, TST18-42, TST18-52, + TST18-15, TST18-25, TST18-35, TST18-45, TST18-55) + - configure the highest-numbered PMP entry with (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) + - execute the associated access + - check associated access-fault exception raised] +### Sub-feature: 005_2_intersecting_entries_succeed + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose any 2 PMP entries + + CONFIGURATION and ACCESS (Cf. Feature: "cfg TOR access S/U/M") + - for the least-numbered pmp entry, apply any CONFIGURATION+ACCESS scenario without access-fault + - for the highest-numbered pmp entry, apply any CONFIGURATION+ACCESS scenario with access-fault + - make sure the pmp entries address ranges are overlapping/intersecting (at least at 4 consecutive bytes) + - for each pmp entry, execute one access in its associated pmp address region but outside the overlapping/intersecting address range + - execute one additional access inside the overlapping/intersecting address range + - NB: obviously, pmp entry configurations with different access-modes (S/U vs. M) cannot be easily mixed in same test + - NB: obviously, pmp entry configurations with different mstatus.MPRV/MPP values cannot be mixed in same test + + CHECK + - for each pmp entry, access outside the overlapping/intersecting address range should give the expected CHECK result + - access inside the overlapping/intersecting address range should not generate any access-fault + + REUSABILITY + - if possible, the number of PMP entries (N) is a configurable parameter + - so a single test function can be reused +* **Pass/Fail Criteria:** Check RM +* **Test Type:** ENV Capability +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F023_S006_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST51(group) => FTR09-a, FTR09-b and FTR09-c + [create scenarios where 2 PMP entries with same pmpaddr + - one without matching permissions or with A=OFF + - one with matching permissions and A=NA4/NAPOT/TOR + - any of them can be the lowest-numbered PMP entry] + TST51-2 + [configure 2 PMP entries + - configure the lowest-numbered PMP entry with (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) + - configure the highest-numbered PMP entry with (TST11-12, TST11-22, TST11-32, TST11-42, TST11-52, + TST11-15, TST11-25, TST11-35, TST11-45, TST11-55, + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52, + TST12-15, TST12-25, TST12-35, TST12-45, TST12-55, + TST13-12, TST13-22, TST13-32, TST13-42, TST13-52, + TST13-15, TST13-25, TST13-35, TST13-45, TST13-55, + TST14-12, TST14-22, TST14-32, TST14-42, TST14-52, + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55, + TST15-12, TST15-22, TST15-32, TST15-42, TST15-52, + TST15-15, TST15-25, TST15-35, TST15-45, TST15-55, + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52, + TST16-15, TST16-25, TST16-35, TST16-45, TST16-55, + TST17-12, TST17-22, TST17-32, TST17-42, TST17-52, + TST17-15, TST17-25, TST17-35, TST17-45, TST17-55, + TST18-12, TST18-22, TST18-32, TST18-42, TST18-52, + TST18-15, TST18-25, TST18-35, TST18-45, TST18-55) + - execute the associated access + - check no access-fault exception] +## Feature: multi entries OFF + +### Sub-feature: 000_1_entry + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose a single PMP entry + + CONFIGURATION and ACCESS + - for each pmp entry, apply any CONFIGURATION+ACCESS scenario above (Cf. Feature: "cfg OFF access S/U/M") + - make sure the pmp entries address ranges are not overlapping/intersecting + - NB: obviously, pmp entry configurations with different mstatus.MPRV/MPP values cannot be mixed in same test + + CHECK + - for each pmp entry, we should obtain the expected CHECK result + + REUSABILITY + - if possible, the number of PMP entries (N) is a configurable parameter + - so a single test function can be reused +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F024_S001_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST24(group) => FTR09-g + [create scenarios where PMP entries with A=0 (OFF) and with matching permissions + - check no address matching for those PMP entries] + [create scenarios where all PMP entries with A=0 (OFF) and with matching permissions + - check no address matching for all PMP entries] + [check S or U mode access fails when all A=OFF with at least one PMP entry implemented] => FTR09-g + TST24-1 = extension of (TST17-11, TST17-21, TST17-31, TST17-41, TST17-51, + TST17-13, TST17-23, TST17-33, TST17-43, TST17-53, + TST17-14, TST17-24, TST17-34, TST17-44, TST17-54, + TST17-16, TST17-26, TST17-36, TST17-46, TST17-56, + TST18-14, TST18-24, TST18-34, TST18-44, TST18-54, //TODO: M-mode may not raise an exception + TST18-16, TST18-26, TST18-36, TST18-46, TST18-56) //TODO: M-mode may not raise an exception + //TODO: SHOULD WE ADD (TST18-11, TST18-21, TST18-31, TST18-41, TST18-51, + TST18-13, TST18-23, TST18-33, TST18-43, TST18-53) ? + [configure only one (any, but the first one) PMP entry + - execute the chosen kind of access + - check appropriate access-fault exception raised] +### Sub-feature: 001_2_isolated_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose any 2 PMP entries + + reuse of VP_PMP_F024_S001_I000 feature description (Cf. Feature: "multi entries OFF") +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F024_S002_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST24(group) => FTR09-g + [create scenarios where PMP entries with A=0 (OFF) and with matching permissions + - check no address matching for those PMP entries] + [create scenarios where all PMP entries with A=0 (OFF) and with matching permissions + - check no address matching for all PMP entries] + [check S or U mode access fails when all A=OFF with at least one PMP entry implemented] => FTR09-g + TST24-2 = extension of compatible pair of (TST17-11, TST17-21, TST17-31, TST17-41, TST17-51, + TST17-13, TST17-23, TST17-33, TST17-43, TST17-53, + TST17-14, TST17-24, TST17-34, TST17-44, TST17-54, + TST17-16, TST17-26, TST17-36, TST17-46, TST17-56, + TST18-14, TST18-24, TST18-34, TST18-44, TST18-54, //TODO: M-mode may not raise an exception + TST18-16, TST18-26, TST18-36, TST18-46, TST18-56) //TODO: M-mode may not raise an exception + //TODO: SHOULD WE ADD (TST18-11, TST18-21, TST18-31, TST18-41, TST18-51, + TST18-13, TST18-23, TST18-33, TST18-43, TST18-53) ? + [configure 2 non-adjacent PMP entries (highest-numbered ones first) (avoid the first PMP entry) + - execute the 2 kinds of accesses (if possible to chain due to access-fault) + - check 2 appropriate access-fault exceptions raised] +### Sub-feature: 002_N_isolated_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose any N PMP entries (2> + + TST24(group) => FTR09-g + [create scenarios where PMP entries with A=0 (OFF) and with matching permissions + - check no address matching for those PMP entries] + [create scenarios where all PMP entries with A=0 (OFF) and with matching permissions + - check no address matching for all PMP entries] + [check S or U mode access fails when all A=OFF with at least one PMP entry implemented] => FTR09-g + TST24-3 = extension of compatible group(N) of (TST17-11, TST17-21, TST17-31, TST17-41, TST17-51, + TST17-13, TST17-23, TST17-33, TST17-43, TST17-53, + TST17-14, TST17-24, TST17-34, TST17-44, TST17-54, + TST17-16, TST17-26, TST17-36, TST17-46, TST17-56, + TST18-14, TST18-24, TST18-34, TST18-44, TST18-54, //TODO: M-mode may not raise an exception + TST18-16, TST18-26, TST18-36, TST18-46, TST18-56) //TODO: M-mode may not raise an exception + //TODO: SHOULD WE ADD (TST18-11, TST18-21, TST18-31, TST18-41, TST18-51, + TST18-13, TST18-23, TST18-33, TST18-43, TST18-53) ? + [configure N PMP entries (highest-numbered ones first) (as non-adjacent as possible, and avoid the first PMP entry) + - execute the N kinds of accesses (if possible to chain due to access-fault) + - check N appropriate access-fault exceptions raised] +### Sub-feature: 003_8_isolated_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose all 8 PMP entries + + reuse of VP_PMP_F024_S001_I000 feature description (Cf. Feature: "multi entries OFF") +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F024_S004_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST24(group) => FTR09-g + [create scenarios where PMP entries with A=0 (OFF) and with matching permissions + - check no address matching for those PMP entries] + [create scenarios where all PMP entries with A=0 (OFF) and with matching permissions + - check no address matching for all PMP entries] + [check S or U mode access fails when all A=OFF with at least one PMP entry implemented] => FTR09-g + TST24-4 = extension of compatible group(8) of (TST17-11, TST17-21, TST17-31, TST17-41, TST17-51, + TST17-13, TST17-23, TST17-33, TST17-43, TST17-53, + TST17-14, TST17-24, TST17-34, TST17-44, TST17-54, + TST17-16, TST17-26, TST17-36, TST17-46, TST17-56, + TST18-14, TST18-24, TST18-34, TST18-44, TST18-54, //TODO: M-mode may not raise an exception + TST18-16, TST18-26, TST18-36, TST18-46, TST18-56) //TODO: M-mode may not raise an exception + //TODO: SHOULD WE ADD (TST18-11, TST18-21, TST18-31, TST18-41, TST18-51, + TST18-13, TST18-23, TST18-33, TST18-43, TST18-53) ? + [configure 8 PMP entries (highest-numbered ones first) + - execute the 8 kinds of accesses (if possible to chain due to access-fault) + - check 8 appropriate access-fault exceptions raised] +## Feature: multi entries ALL + +### Sub-feature: 000_1_entry + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose a single PMP entry + + CONFIGURATION and ACCESS + - for each pmp entry, apply any CONFIGURATION+ACCESS scenario above (Cf. Feature: "cfg NA4/NAPOT/TOR/OFF access S/U/M") + - make sure the pmp entries address ranges are not overlapping/intersecting + - NB: obviously, pmp entry configurations with different mstatus.MPRV/MPP values cannot be mixed in same test + + CHECK + - for each pmp entry, we should obtain the expected CHECK result + + REUSABILITY + - if possible, the number of PMP entries (N) is a configurable parameter + - so a single test function can be reused +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F025_S001_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 001_2_isolated_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose any 2 PMP entries + + reuse of VP_PMP_F025_S001_I000 feature description (Cf. Feature: "multi entries ALL") +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F025_S002_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + +### Sub-feature: 002_N_isolated_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose any N PMP entries (2> + + TST51(group) => FTR09-a, FTR09-b and FTR09-c + [create scenarios where 2 PMP entries with same pmpaddr + - one without matching permissions or with A=OFF + - one with matching permissions and A=NA4/NAPOT/TOR + - any of them can be the lowest-numbered PMP entry] + TST51-1 + [configure 2 PMP entries + - configure the lowest-numbered PMP entry with (TST11-12, TST11-22, TST11-32, TST11-42, TST11-52, + TST11-15, TST11-25, TST11-35, TST11-45, TST11-55, + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52, + TST12-15, TST12-25, TST12-35, TST12-45, TST12-55, + TST13-12, TST13-22, TST13-32, TST13-42, TST13-52, + TST13-15, TST13-25, TST13-35, TST13-45, TST13-55, + TST14-12, TST14-22, TST14-32, TST14-42, TST14-52, + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55, + TST15-12, TST15-22, TST15-32, TST15-42, TST15-52, + TST15-15, TST15-25, TST15-35, TST15-45, TST15-55, + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52, + TST16-15, TST16-25, TST16-35, TST16-45, TST16-55, + TST17-12, TST17-22, TST17-32, TST17-42, TST17-52, + TST17-15, TST17-25, TST17-35, TST17-45, TST17-55, + TST18-12, TST18-22, TST18-32, TST18-42, TST18-52, + TST18-15, TST18-25, TST18-35, TST18-45, TST18-55) + - configure the highest-numbered PMP entry with (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) + - execute the associated access + - check associated access-fault exception raised] +### Sub-feature: 005_2_intersecting_entries_succeed + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + {Page 57 Section "3.7.1 Physical Memory Protection CSRs" Volume II: RISC-V Privileged Architectures V20211203} + + Up to 64 PMP entries are supported +* **Verification Goals** + + choose any 2 PMP entries + + CONFIGURATION and ACCESS (Cf. Feature: "cfg NA4/NAPOT/TOR/OFF access S/U/M") + - for the least-numbered pmp entry, apply any CONFIGURATION+ACCESS scenario without access-fault + - for the highest-numbered pmp entry, apply any CONFIGURATION+ACCESS scenario with access-fault + - make sure the pmp entries address ranges are overlapping/intersecting (at least at 4 consecutive bytes) + - for each pmp entry, execute one access in its associated pmp address region but outside the overlapping/intersecting address range + - execute one additional access inside the overlapping/intersecting address range + - NB: obviously, pmp entry configurations with different access-modes (S/U vs. M) cannot be easily mixed in same test + - NB: obviously, pmp entry configurations with different mstatus.MPRV/MPP values cannot be mixed in same test + + CHECK + - for each pmp entry, access outside the overlapping/intersecting address range should give the expected CHECK result + - access inside the overlapping/intersecting address range should not generate any access-fault + + REUSABILITY + - if possible, the number of PMP entries (N) is a configurable parameter + - so a single test function can be reused +* **Pass/Fail Criteria:** Check RM +* **Test Type:** ENV Capability +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F025_S006_I000 +* **Link to Coverage:** +* **Comments** + + << link to the old pmp_verif_plan.txt and pmp_verif_plan_features.txt files (not up-to-date) : reading below not mandatory but may help for better understanding >> + + TST51(group) => FTR09-a, FTR09-b and FTR09-c + [create scenarios where 2 PMP entries with same pmpaddr + - one without matching permissions or with A=OFF + - one with matching permissions and A=NA4/NAPOT/TOR + - any of them can be the lowest-numbered PMP entry] + TST51-2 + [configure 2 PMP entries + - configure the lowest-numbered PMP entry with (TST11-11, TST11-21, TST11-31, TST11-41, TST11-51, + TST11-14, TST11-24, TST11-34, TST11-44, TST11-54, + TST12-11, TST12-21, TST12-31, TST12-41, TST12-51, + TST12-14, TST12-24, TST12-34, TST12-44, TST12-54, + TST13-11, TST13-21, TST13-31, TST13-41, TST13-51, + TST13-14, TST13-24, TST13-34, TST13-44, TST13-54, + TST14-11, TST14-21, TST14-31, TST14-41, TST14-51, + TST14-14, TST14-24, TST14-34, TST14-44, TST14-54, + TST15-11, TST15-21, TST15-31, TST15-41, TST15-51, + TST15-14, TST15-24, TST15-34, TST15-44, TST15-54, + TST16-11, TST16-21, TST16-31, TST16-41, TST16-51, + TST16-14, TST16-24, TST16-34, TST16-44, TST16-54) + - configure the highest-numbered PMP entry with (TST11-12, TST11-22, TST11-32, TST11-42, TST11-52, + TST11-15, TST11-25, TST11-35, TST11-45, TST11-55, + TST12-12, TST12-22, TST12-32, TST12-42, TST12-52, + TST12-15, TST12-25, TST12-35, TST12-45, TST12-55, + TST13-12, TST13-22, TST13-32, TST13-42, TST13-52, + TST13-15, TST13-25, TST13-35, TST13-45, TST13-55, + TST14-12, TST14-22, TST14-32, TST14-42, TST14-52, + TST14-15, TST14-25, TST14-35, TST14-45, TST14-55, + TST15-12, TST15-22, TST15-32, TST15-42, TST15-52, + TST15-15, TST15-25, TST15-35, TST15-45, TST15-55, + TST16-12, TST16-22, TST16-32, TST16-42, TST16-52, + TST16-15, TST16-25, TST16-35, TST16-45, TST16-55, + TST17-12, TST17-22, TST17-32, TST17-42, TST17-52, + TST17-15, TST17-25, TST17-35, TST17-45, TST17-55, + TST18-12, TST18-22, TST18-32, TST18-42, TST18-52, + TST18-15, TST18-25, TST18-35, TST18-45, TST18-55) + - execute the associated access + - check no access-fault exception] +## Feature: entry reconfiguration + +### Sub-feature: 000_reconfigure_N_pmp_entries + +#### Item: 000 + +* **Requirement location:** +* **Feature Description** + + reuse of feature descriptions (Cf. Feature: "cfg NA4/NAPOT/TOR/OFF access S/U/M") + reuse of feature descriptions (Cf. Feature: "CSRs M-mode only") + reuse of feature descriptions (Cf. Feature: "CSRs locked access") + reuse of feature descriptions (Cf. Feature: "multi entries NA4/NAPOT/TOR/OFF") +* **Verification Goals** + + configure any N PMP entries, possibly some with L=1 + + CONFIGURATION and ACCESS + - for each pmp entry, apply any CONFIGURATION+ACCESS scenario above (Cf. Feature: "cfg NA4/NAPOT/TOR/OFF access S/U/M") + - make sure the pmp entries address ranges are not overlapping/intersecting + - NB: obviously, pmp entry configurations with different mstatus.MPRV/MPP values cannot be mixed in same test + + RECONFIGURATION and ACCESS + - for each pmp entry with L=0, apply any other CONFIGURATION+ACCESS scenario above (Cf. Feature: "cfg NA4/NAPOT/TOR/OFF access S/U/M") + - make sure the pmp entries address ranges are not overlapping/intersecting + - NB: obviously, pmp entry configurations with different mstatus.MPRV/MPP values cannot be mixed in same test + + RESET + - if there is any pmp entry with L=1, apply hart reset (or only PMP reset if possible) + - and restart with CONFIGURATION and RESET + + CHECK + - for each pmp entry, we should obtain the expected CHECK result + + REUSABILITY + - if possible, the number of PMP entries (N) is a configurable parameter + - so a single test function can be reused +* **Pass/Fail Criteria:** Check RM +* **Test Type:** Constrained Random +* **Coverage Method:** Functional Coverage +* **Applicable Cores:** CV32E40P, CV32E40S, CV32E40X, CV32A6_v0.1.0, CV32A6-step2, CV64A6-step3 +* **Unique verification tag:** VP_PMP_F031_S001_I000 +* **Link to Coverage:** +* **Comments** + + *(none)* + diff --git a/verif/docs/VerifPlans/source/dvplan_csr-embedded-access.md b/verif/docs/VerifPlans/source/dvplan_csr-embedded-access.md index cd1339333b6..ec022800363 100644 --- a/verif/docs/VerifPlans/source/dvplan_csr-embedded-access.md +++ b/verif/docs/VerifPlans/source/dvplan_csr-embedded-access.md @@ -55,7 +55,7 @@ * **Requirement location:** https://docs.openhwgroup.org/projects/cva6-user-manual/01_cva6_user/CV32A6_Control_Status_Registers.html * **Feature Description** - Check the correctness of RISCV CVA6 Read-Only CSRs by writing CSRs in a random order values: Inverted reset, 0xaaaaaaaa, 0x555555, random values. Then confirm that write into RO CSRs generates illegal exception. Finaly read back the CSR and check register value has not changed and matchs reference model. + Check the correctness of RISCV CVA6 Read-Only CSRs by writing CSRs in a random order values: Inverted reset, 0xaaaaaaaa, 0x555555, random values. Then confirm that write into RO CSRs generates illegal exception. Finally read back the CSR and check register value has not changed and matches reference model. * **Verification Goals** 1.Attempt to write a RO CSR. diff --git a/verif/env/corev-dv/cva6_asm_program_gen.sv b/verif/env/corev-dv/cva6_asm_program_gen.sv index d3a6f9a673c..dd9482178dd 100644 --- a/verif/env/corev-dv/cva6_asm_program_gen.sv +++ b/verif/env/corev-dv/cva6_asm_program_gen.sv @@ -159,7 +159,7 @@ class cva6_asm_program_gen_c extends riscv_asm_program_gen; // Generate the interrupt and trap handler for different privileged mode. // The trap handler checks the xCAUSE to determine the type of the exception and jumps to - // corresponding exeception handling routine. + // corresponding exception handling routine. virtual function void gen_trap_handler_section(int hart, string mode, privileged_reg_t cause, privileged_reg_t tvec, diff --git a/verif/env/corev-dv/cva6_illegal_instr.sv b/verif/env/corev-dv/cva6_illegal_instr.sv index 49d108e4513..8163a3da9d0 100644 --- a/verif/env/corev-dv/cva6_illegal_instr.sv +++ b/verif/env/corev-dv/cva6_illegal_instr.sv @@ -27,7 +27,7 @@ class cva6_illegal_instr_c extends riscv_illegal_instr; `uvm_object_utils(cva6_illegal_instr_c) `uvm_object_new - //Overriding the riscv_illegal_instr to ovveride this constraint, and disable kReservedC* constraint + //Overriding the riscv_illegal_instr to override this constraint, and disable kReservedC* constraint constraint reserved_compressed_instr_c { solve exception before reserved_c; solve exception before opcode; diff --git a/verif/env/corev-dv/cva6_instr_base_test.sv b/verif/env/corev-dv/cva6_instr_base_test.sv index 2c32c1ede7f..da6ef5b4ebb 100644 --- a/verif/env/corev-dv/cva6_instr_base_test.sv +++ b/verif/env/corev-dv/cva6_instr_base_test.sv @@ -43,7 +43,7 @@ class cva6_instr_base_test_c extends riscv_instr_base_test; `uvm_info("CVA6_DV", $sformatf("Overriding ..."), UVM_LOW) uvm_factory::get().set_type_override_by_type(riscv_asm_program_gen::get_type(), cva6_asm_program_gen_c::get_type()); - `uvm_info("CVA6_DV", $sformatf("Overrid done "), UVM_LOW) + `uvm_info("CVA6_DV", $sformatf("Override done "), UVM_LOW) endfunction virtual function void override_gen_config(); diff --git a/verif/env/corev-dv/cva6_instr_hazard_test.sv b/verif/env/corev-dv/cva6_instr_hazard_test.sv index 2652dbf5e97..19ea5de0ce0 100644 --- a/verif/env/corev-dv/cva6_instr_hazard_test.sv +++ b/verif/env/corev-dv/cva6_instr_hazard_test.sv @@ -41,7 +41,7 @@ class cva6_instr_hazard_test_c extends riscv_instr_base_test; `uvm_info("CVA6_DV", $sformatf("Overriding ..."), UVM_LOW) uvm_factory::get().set_type_override_by_type(riscv_asm_program_gen::get_type(), cva6_asm_program_gen_c::get_type()); - `uvm_info("CVA6_DV", $sformatf("Overrid done "), UVM_LOW) + `uvm_info("CVA6_DV", $sformatf("Override done "), UVM_LOW) endfunction virtual function void override_gen_config(); diff --git a/verif/env/corev-dv/cva6_unsupported_instr.sv b/verif/env/corev-dv/cva6_unsupported_instr.sv index fabd89fd662..8e075d62b0b 100644 --- a/verif/env/corev-dv/cva6_unsupported_instr.sv +++ b/verif/env/corev-dv/cva6_unsupported_instr.sv @@ -268,6 +268,15 @@ class cva6_unsupported_instr_c extends uvm_object; instr_bin[6:2] == 5'b0; instr_bin[12] == 1'b0; } + if (c_msb == 3'b101) { + if (instr_bin[12]) { + !(instr_bin[11:8] inside {4'b1000, 4'b1010, 4'b1100, 4'b1110}); + } + else { + instr_bin[11:10] != 2'b11; + !(instr_bin[6:5] inside {2'b01, 2'b11}); + } + } } } } @@ -291,7 +300,10 @@ class cva6_unsupported_instr_c extends uvm_object; c_op inside {2'b00, 2'b01}; c_msb == 3'b100; if (c_op == 2'b00) { - !(instr_bin[12:10] inside {3'b000, 3'b001, 3'b010, 3'b011}); + !(instr_bin[12:10] inside {3'b000, 3'b001, 3'b010}); + if (instr_bin[12:10] == 3'b011) { + instr_bin[6] == 1'b1; + } } if (c_op == 2'b01) { instr_bin[12:10] == 3'b111; diff --git a/verif/env/corev-dv/simulator.yaml b/verif/env/corev-dv/simulator.yaml index 6aafabf62cf..0cb6d01f93e 100644 --- a/verif/env/corev-dv/simulator.yaml +++ b/verif/env/corev-dv/simulator.yaml @@ -15,7 +15,7 @@ # # SPDX-License-Identifier: Apache-2.0 -###### This file is based on /cva6-simuator.yaml +###### This file is based on /cva6-simulator.yaml - tool: xrun compile: @@ -61,3 +61,28 @@ cov_opts: > -cm_dir /test.vdb -cm_log /dev/null -cm_name test__ +- tool: questa + compile: + cmd: + - "vlog -64 + +incdir+$QUESTASIM_HOME/verilog_src/uvm-1.2/src + +incdir+ + +incdir+ + +acc + $QUESTASIM_HOME/verilog_src/uvm-1.2/src/uvm_pkg.sv + -f /../env/corev-dv/cva6-files.f + -sv + -mfcu -cuname design_cuname + +define+UVM_REGEX_NO_DPI + -writetoplevels /top.list + -l /compile.log " + - "vopt -64 -debug + +designfile -f /top.list + -l /optimize.log + -o design_opt" + sim: + cmd: > + vsim -64 -c -do /dv/questa_sim.tcl design_opt -sv_seed -sv_lib $QUESTASIM_HOME/uvm-1.2/linux_x86_64/uvm_dpi + cov_opts: > + -do "coverage save -onexit /cov.ucdb;" + diff --git a/verif/env/corev-dv/target/rv32imac/riscv_core_setting.sv b/verif/env/corev-dv/target/rv32imac/riscv_core_setting.sv index f5772bf4c59..0d7040322b3 100644 --- a/verif/env/corev-dv/target/rv32imac/riscv_core_setting.sv +++ b/verif/env/corev-dv/target/rv32imac/riscv_core_setting.sv @@ -80,7 +80,7 @@ parameter int SELEN = 8; // Maximum size of a single vector element (encoded in vsew format) parameter int VELEN = int'($ln(ELEN)/$ln(2)) - 3; -// Maxium LMUL supported by the core +// Maximum LMUL supported by the core parameter int MAX_LMUL = 8; // ---------------------------------------------------------------------------- @@ -91,10 +91,10 @@ parameter int MAX_LMUL = 8; parameter int NUM_HARTS = 1; // ---------------------------------------------------------------------------- -// Previleged CSR implementation +// Privileged CSR implementation // ---------------------------------------------------------------------------- -// Implemented previlieged CSR list +// Implemented privileged CSR list `ifdef DSIM privileged_reg_t implemented_csr[] = { `else diff --git a/verif/env/corev-dv/target/rv32imcb/riscv_core_setting.sv b/verif/env/corev-dv/target/rv32imcb/riscv_core_setting.sv index 8a665b928bc..10dfab13652 100644 --- a/verif/env/corev-dv/target/rv32imcb/riscv_core_setting.sv +++ b/verif/env/corev-dv/target/rv32imcb/riscv_core_setting.sv @@ -87,7 +87,7 @@ parameter int SELEN = 8; // Maximum size of a single vector element (encoded in vsew format) parameter int VELEN = int'($ln(ELEN)/$ln(2)) - 3; -// Maxium LMUL supported by the core +// Maximum LMUL supported by the core parameter int MAX_LMUL = 8; // ---------------------------------------------------------------------------- @@ -98,10 +98,10 @@ parameter int MAX_LMUL = 8; parameter int NUM_HARTS = 1; // ---------------------------------------------------------------------------- -// Previleged CSR implementation +// Privileged CSR implementation // ---------------------------------------------------------------------------- -// Implemented previlieged CSR list +// Implemented privileged CSR list `ifdef DSIM privileged_reg_t implemented_csr[] = { `else diff --git a/verif/env/corev-dv/target/rv64gc/riscv_core_setting.sv b/verif/env/corev-dv/target/rv64gc/riscv_core_setting.sv index 386c675712d..adc2caed3c5 100644 --- a/verif/env/corev-dv/target/rv64gc/riscv_core_setting.sv +++ b/verif/env/corev-dv/target/rv64gc/riscv_core_setting.sv @@ -64,10 +64,10 @@ parameter int SLEN = 64; parameter int NUM_HARTS = 1; // ---------------------------------------------------------------------------- -// Previleged CSR implementation +// Privileged CSR implementation // ---------------------------------------------------------------------------- -// Implemented previlieged CSR list +// Implemented privileged CSR list `ifdef DSIM privileged_reg_t implemented_csr[] = { `else diff --git a/verif/env/corev-dv/target/rv64imafdc/riscv_core_setting.sv b/verif/env/corev-dv/target/rv64imafdc/riscv_core_setting.sv new file mode 100644 index 00000000000..732c7213146 --- /dev/null +++ b/verif/env/corev-dv/target/rv64imafdc/riscv_core_setting.sv @@ -0,0 +1,188 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * 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. + */ + +//----------------------------------------------------------------------------- +// Processor feature configuration +//----------------------------------------------------------------------------- +// XLEN +parameter int XLEN = 64; + +// Parameter for SATP mode, set to BARE if address translation is not supported +parameter satp_mode_t SATP_MODE = SV39; + +// Supported Privileged mode +privileged_mode_t supported_privileged_mode[] = {USER_MODE, SUPERVISOR_MODE, MACHINE_MODE}; + +// Unsupported instructions +riscv_instr_name_t unsupported_instr[]; + +// ISA supported by the processor +riscv_instr_group_t supported_isa[$] = {RV32I, RV32M, RV64I, RV64M, RV32C, RV64C, RV32A, RV64A, + RV32F, RV64F, RV32D, RV64D}; +// Interrupt mode support +mtvec_mode_t supported_interrupt_mode[$] = {DIRECT, VECTORED}; + +// The number of interrupt vectors to be generated, only used if VECTORED interrupt mode is +// supported +int max_interrupt_vector_num = 16; + +// Physical memory protection support +bit support_pmp = 0; + +// Enhanced physical memory protection support +bit support_epmp = 0; + +// Debug mode support +bit support_debug_mode = 0; + +// Support delegate trap to user mode +bit support_umode_trap = 0; + +// Support sfence.vma instruction +bit support_sfence = 1; + +// Support unaligned load/store +bit support_unaligned_load_store = 1'b1; + +// GPR setting +parameter int NUM_FLOAT_GPR = 32; +parameter int NUM_GPR = 32; +parameter int NUM_VEC_GPR = 32; + +// ---------------------------------------------------------------------------- +// Vector extension configuration +// ---------------------------------------------------------------------------- + +// Parameter for vector extension +parameter int VECTOR_EXTENSION_ENABLE = 0; + +parameter int VLEN = 512; + +// Maximum size of a single vector element +parameter int ELEN = 32; + +// Minimum size of a sub-element, which must be at most 8-bits. +parameter int SELEN = 8; + +// Maximum size of a single vector element (encoded in vsew format) +parameter int VELEN = int'($ln(ELEN)/$ln(2)) - 3; + +// Maximum LMUL supported by the core +parameter int MAX_LMUL = 8; + +// ---------------------------------------------------------------------------- +// Multi-harts configuration +// ---------------------------------------------------------------------------- + +// Number of harts +parameter int NUM_HARTS = 1; + +// ---------------------------------------------------------------------------- +// Privileged CSR implementation +// ---------------------------------------------------------------------------- + +// Implemented privileged CSR list +`ifdef DSIM +privileged_reg_t implemented_csr[] = { +`else +const privileged_reg_t implemented_csr[] = { +`endif + // User mode CSR + USTATUS, // User status + UIE, // User interrupt-enable register + UTVEC, // User trap-handler base address + USCRATCH, // Scratch register for user trap handlers + UEPC, // User exception program counter + UCAUSE, // User trap cause + UTVAL, // User bad address or instruction + UIP, // User interrupt pending + // Supervisor mode CSR + SSTATUS, // Supervisor status + SEDELEG, // Supervisor exception delegation register + SIDELEG, // Supervisor interrupt delegation register + SIE, // Supervisor interrupt-enable register + STVEC, // Supervisor trap-handler base address + SCOUNTEREN, // Supervisor counter enable + SSCRATCH, // Scratch register for supervisor trap handlers + SEPC, // Supervisor exception program counter + SCAUSE, // Supervisor trap cause + STVAL, // Supervisor bad address or instruction + SIP, // Supervisor interrupt pending + SATP, // Supervisor address translation and protection + // Machine mode mode CSR + MVENDORID, // Vendor ID + MARCHID, // Architecture ID + MIMPID, // Implementation ID + MHARTID, // Hardware thread ID + MSTATUS, // Machine status + MISA, // ISA and extensions + MEDELEG, // Machine exception delegation register + MIDELEG, // Machine interrupt delegation register + MIE, // Machine interrupt-enable register + MTVEC, // Machine trap-handler base address + MCOUNTEREN, // Machine counter enable + MSCRATCH, // Scratch register for machine trap handlers + MEPC, // Machine exception program counter + MCAUSE, // Machine trap cause + MTVAL, // Machine bad address or instruction + MIP, // Machine interrupt pending + // Floating point CSR + FCSR // Floating point control and status +}; + +// Implementation-specific custom CSRs +bit [11:0] custom_csr[] = { +}; + +// ---------------------------------------------------------------------------- +// Supported interrupt/exception setting, used for functional coverage +// ---------------------------------------------------------------------------- + +`ifdef DSIM +interrupt_cause_t implemented_interrupt[] = { +`else +const interrupt_cause_t implemented_interrupt[] = { +`endif + U_SOFTWARE_INTR, + S_SOFTWARE_INTR, + M_SOFTWARE_INTR, + U_TIMER_INTR, + S_TIMER_INTR, + M_TIMER_INTR, + U_EXTERNAL_INTR, + S_EXTERNAL_INTR, + M_EXTERNAL_INTR +}; + +`ifdef DSIM +exception_cause_t implemented_exception[] = { +`else +const exception_cause_t implemented_exception[] = { +`endif + INSTRUCTION_ACCESS_FAULT, + ILLEGAL_INSTRUCTION, + BREAKPOINT, + LOAD_ADDRESS_MISALIGNED, + LOAD_ACCESS_FAULT, + STORE_AMO_ADDRESS_MISALIGNED, + STORE_AMO_ACCESS_FAULT, + ECALL_UMODE, + ECALL_SMODE, + ECALL_MMODE, + INSTRUCTION_PAGE_FAULT, + LOAD_PAGE_FAULT, + STORE_AMO_PAGE_FAULT +}; diff --git a/verif/env/uvme/cov/uvme_axi_covg.sv b/verif/env/uvme/cov/uvme_axi_covg.sv index 3e853656665..f4abd9cf0d6 100644 --- a/verif/env/uvme/cov/uvme_axi_covg.sv +++ b/verif/env/uvme/cov/uvme_axi_covg.sv @@ -13,7 +13,7 @@ /* * Covergroups - * Decalred at package-level to enable mutliple instances per monitor class (e.g. read/write) + * Declared at package-level to enable multiple instances per monitor class (e.g. read/write) */ covergroup cg_axi_w_channel(string name) diff --git a/verif/env/uvme/cov/uvme_axi_ext_covg.sv b/verif/env/uvme/cov/uvme_axi_ext_covg.sv index 12d8facb050..ff8f17eb6fc 100644 --- a/verif/env/uvme/cov/uvme_axi_ext_covg.sv +++ b/verif/env/uvme/cov/uvme_axi_ext_covg.sv @@ -13,7 +13,7 @@ /* * Covergroups - * Decalred at package-level to enable mutliple instances per monitor class (e.g. read/write) + * Declared at package-level to enable multiple instances per monitor class (e.g. read/write) */ covergroup cg_axi_aw_order(string name) diff --git a/verif/env/uvme/cov/uvme_cvxif_covg.sv b/verif/env/uvme/cov/uvme_cvxif_covg.sv index 58c13b71e8b..53ea6b94fdd 100644 --- a/verif/env/uvme/cov/uvme_cvxif_covg.sv +++ b/verif/env/uvme/cov/uvme_cvxif_covg.sv @@ -102,7 +102,7 @@ covergroup cg_cus_add_instr( `CVXIF_CP_BITWISE(cp_rs1_toggle, req_item.issue_req.rs[0], 1) `CVXIF_CP_BITWISE(cp_rs2_toggle, req_item.issue_req.rs[1], 1) - `CVXIF_CP_BITWISE(cp_rs3_toggle, req_item.issue_req.rs[2], rs3_valid) //TODO : fix need more filtring + `CVXIF_CP_BITWISE(cp_rs3_toggle, req_item.issue_req.rs[2], rs3_valid) //TODO : fix need more filtering endgroup: cg_cus_add_instr diff --git a/verif/env/uvme/cov/uvme_exception_covg.sv b/verif/env/uvme/cov/uvme_exception_covg.sv index a91e730ef6b..a2466b69bae 100644 --- a/verif/env/uvme/cov/uvme_exception_covg.sv +++ b/verif/env/uvme/cov/uvme_exception_covg.sv @@ -34,7 +34,6 @@ covergroup cg_exception( option.per_instance = 1; option.name = name; -`ifndef QUESTA cp_exception: coverpoint instr.cause { bins BREAKPOINT = {3} iff (instr.trap); @@ -155,7 +154,6 @@ covergroup cg_exception( ignore_bins IGN_EXC = !binsof(cp_exception) intersect{6}; ignore_bins IGN_ADD = binsof(cp_add_mem) intersect{0}; } -`endif endgroup : cg_exception diff --git a/verif/env/uvme/cov/uvme_illegal_instr_covg.sv b/verif/env/uvme/cov/uvme_illegal_instr_covg.sv index e71c9c91326..dc3df6bcd48 100644 --- a/verif/env/uvme/cov/uvme_illegal_instr_covg.sv +++ b/verif/env/uvme/cov/uvme_illegal_instr_covg.sv @@ -150,7 +150,7 @@ class uvme_illegal_instr_cov_model_c extends uvm_component; `uvm_component_utils(uvme_illegal_instr_cov_model_c) - //Covergroup of Illegal instrcution + //Covergroup of Illegal instruction cg_illegal_i illegal_i_cg; cg_illegal_m illegal_m_cg; cg_illegal_zicsr illegal_zicsr_cg; diff --git a/verif/env/uvme/cvxif_vseq/custom_instructions_cvxif_1_0_0.rst b/verif/env/uvme/cvxif_vseq/custom_instructions_cvxif_1_0_0.rst index 406dd501420..375225dad0b 100644 --- a/verif/env/uvme/cvxif_vseq/custom_instructions_cvxif_1_0_0.rst +++ b/verif/env/uvme/cvxif_vseq/custom_instructions_cvxif_1_0_0.rst @@ -36,7 +36,7 @@ Except for 4 of them using opcode `MADD, MSUB, NMADD, NMSUB` **Description**: add register rs1 to rs1, and store the result in rd. Any rs2 value can be given. It should be ignored by CPU. - Exists to check that register depedencies is well implemented in CPU. + Exists to check that register dependencies is well implemented in CPU. **Pseudocode**: x[rd] = x[rs1] + x[rs1] diff --git a/verif/env/uvme/uvma_cva6_core_cntrl_agent.sv b/verif/env/uvme/uvma_cva6_core_cntrl_agent.sv index fa09076983e..ce7b1dc6e1e 100644 --- a/verif/env/uvme/uvma_cva6_core_cntrl_agent.sv +++ b/verif/env/uvme/uvma_cva6_core_cntrl_agent.sv @@ -47,7 +47,7 @@ class uvma_cva6_core_cntrl_agent_c extends uvma_core_cntrl_agent_c; extern virtual function void retrieve_vif(); /** - * Spawn active sequnces + * Spawn active sequences */ extern virtual task run_phase(uvm_phase phase); diff --git a/verif/env/uvme/uvma_cva6_core_cntrl_drv.sv b/verif/env/uvme/uvma_cva6_core_cntrl_drv.sv index 48a98c828a3..fe1636c011e 100644 --- a/verif/env/uvme/uvma_cva6_core_cntrl_drv.sv +++ b/verif/env/uvme/uvma_cva6_core_cntrl_drv.sv @@ -19,7 +19,7 @@ `define __UVMA_CVA6_CORE_CNTRL_DRV_SV__ /** - * Component driving bootstrap pins and other misecllaneous I/O for cva6 core + * Component driving bootstrap pins and other miscellaneous I/O for cva6 core */ class uvma_cva6_core_cntrl_drv_c extends uvma_core_cntrl_drv_c; diff --git a/verif/env/uvme/uvma_interrupt/cov/uvma_interrupt_cov_model.sv b/verif/env/uvme/uvma_interrupt/cov/uvma_interrupt_cov_model.sv index d9dfabe3621..731190b743b 100644 --- a/verif/env/uvme/uvma_interrupt/cov/uvma_interrupt_cov_model.sv +++ b/verif/env/uvme/uvma_interrupt/cov/uvma_interrupt_cov_model.sv @@ -21,7 +21,14 @@ covergroup cg_interrupt( option.name = name; cp_interrupt_req : coverpoint req_item.interrupt_vector { - bins INTERRUPTS[] = {[0:$]} with (item inside {[0:(2**(num_irq_supported))-1]}); + // FIXME: Tanuj Khandelwal + // Questa is crashing on this CG + // Hence it has been changed a little to make it pass + `ifndef QUESTA + bins INTERRUPTS[] = {[0:$]} with (item inside {[0:((2**(num_irq_supported))-1)]}); + `else + bins INTERRUPTS[] = {[0:((2**(num_irq_supported))-1)]}; + `endif } endgroup: cg_interrupt diff --git a/verif/env/uvme/uvma_interrupt/uvma_interrupt_cfg.sv b/verif/env/uvme/uvma_interrupt/uvma_interrupt_cfg.sv index fa1673d6465..598d4475dd9 100644 --- a/verif/env/uvme/uvma_interrupt/uvma_interrupt_cfg.sv +++ b/verif/env/uvme/uvma_interrupt/uvma_interrupt_cfg.sv @@ -30,7 +30,7 @@ class uvma_interrupt_cfg_c extends uvm_object; // Interrupt memory ack rand bit [XLEN-1:0] irq_addr; - // enbale/disable clear mechanism + // enable/disable clear mechanism rand bit enable_clear_irq; // Number of cycle before Timeout if the agent failed to write into irq_add diff --git a/verif/env/uvme/uvma_interrupt/uvma_interrupt_mon.sv b/verif/env/uvme/uvma_interrupt/uvma_interrupt_mon.sv index 6663accf23a..252925ca5dc 100644 --- a/verif/env/uvme/uvma_interrupt/uvma_interrupt_mon.sv +++ b/verif/env/uvme/uvma_interrupt/uvma_interrupt_mon.sv @@ -64,7 +64,7 @@ class uvma_interrupt_mon_c extends uvm_monitor; endclass : uvma_interrupt_mon_c -function uvma_interrupt_mon_c::new(string name = "uvma_interrupt_mon", uvm_component parent); +function uvma_interrupt_mon_c::new(string name = "uvma_interrupt_mon", uvm_component parent = null); super.new(name, parent); endfunction diff --git a/verif/env/uvme/uvma_interrupt/uvma_interrupt_pkg.sv b/verif/env/uvme/uvma_interrupt/uvma_interrupt_pkg.sv index 0a08d68af42..7870031e6d1 100644 --- a/verif/env/uvme/uvma_interrupt/uvma_interrupt_pkg.sv +++ b/verif/env/uvme/uvma_interrupt/uvma_interrupt_pkg.sv @@ -17,6 +17,7 @@ `include "uvml_hrtbt_macros.sv" `include "uvma_interrupt_macros.sv" +`include "uvma_axi_macros.sv" /** * Encapsulates all the types needed for an UVM agent capable of driving and/or * monitoring Clock & Reset. diff --git a/verif/env/uvme/uvme_cva6_sb.sv b/verif/env/uvme/uvme_cva6_sb.sv index cf15c8f53d6..a0606869b56 100644 --- a/verif/env/uvme/uvme_cva6_sb.sv +++ b/verif/env/uvme/uvme_cva6_sb.sv @@ -323,7 +323,7 @@ endfunction : check_mepc function bit [XLEN:0] uvme_cva6_sb_c::check_mcycle_h(uvma_isacov_instr_c instr, uvma_isacov_instr_c instr_prev, int cycle_count); // Check mcycle value after a CSR read - if (instr_prev == null) return; + if (instr_prev == null) return 0; write_in_mcycle = (instr_prev.is_csr_write() && instr_prev.csr_val == 12'hb00) ? 1 : 0; if (cfg.xlen == 32) begin diff --git a/verif/regress/Instr_tracing_test.sh b/verif/regress/Instr_tracing_test.sh new file mode 100755 index 00000000000..e4a0078b485 --- /dev/null +++ b/verif/regress/Instr_tracing_test.sh @@ -0,0 +1,127 @@ +#!/bin/bash + +# Copyright 2025 Thales DIS design services SAS +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Author: Maxime Colson - Thales + +# Usage ./compare_iti_trace.sh +# Exit 0 if iti traces match, 1 otherwise. + +exit_error() { + echo "$1" >&2 + exit ${2:-1} +} + +clean_file_preserve_header() { + local input_f="$1" + local output_f="$2" + local start_skip="$3" + local end_skip="$4" + + local total_lines lines_to_keep + total_lines=$(wc -l < "$input_f") + lines_to_keep=$((total_lines - start_skip - end_skip)) + + if [ "$lines_to_keep" -le 0 ]; then + exit_error "Error: not enought lines in $input_f" + fi + + { + head -n1 "$input_f" + tail -n "+$((start_skip + 1))" "$input_f" | head -n "$lines_to_keep" + } | sed $'s/\r$//'> "$output_f" +} + +if [ "$#" -ne 1 ]; then + exit_error "Usage: $0 " 2 +fi + +exe="$1" +base=$(basename "$exe" .o) +mkdir verif/sim/Instr_tracing_artifact +workdir="$(realpath verif/sim/Instr_tracing_artifact)" + + +if ! bash verif/regress/iti_test.sh "$exe"; then + exit_error "Error: iti_test.sh failed" +fi + +if [ ! -f verif/sim/iti.traces ]; then + exit_error "Error: iti.traces does not exist" +fi +if [ ! -f verif/sim/encaps.traces ]; then + exit_error "Error: encaps.traces does not exist" +fi + +cp verif/sim/iti.traces "$workdir/iti.trace" +cp verif/sim/encaps.traces "$workdir/encaps.trace" + +rm verif/sim/iti.traces +rm verif/sim/encaps.traces + +cd "$workdir" +git clone https://github.com/riscv-non-isa/riscv-trace-spec.git +cd riscv-trace-spec +git checkout dca761264721068c4576eebd206e2c8b0b9d58b6 +cd referenceFlow +bash scripts/build.sh + +tmp_riscv="$workdir/riscv-trace-spec/referenceFlow/tests/test_files/$base.riscv" +cd ../../.. +cp "$exe" "$tmp_riscv" +cd Instr_tracing_artifact/riscv-trace-spec/referenceFlow +if ! ./scripts/run_regression.sh -t itype3_debug --annotate --debug $tmp_riscv; then + exit_error "Error: run_regression failed" +fi + +reg_dir=$(ls -td ./regression_* 2>/dev/null | head -n1) +if [ -z "$reg_dir" ]; then + exit_error "Error: Folder regression does not exist" +fi + +iti_out="$reg_dir/itype3_debug/$base.encoder_input" +if [ ! -f "$iti_out" ]; then + exit_error "Error: $iti_out does not exist" +fi +encod_out="$reg_dir/itype3_debug/$base.te_inst" +if [ ! -f "$iti_out" ]; then + exit_error "Error: $encod_out does not exist" +fi + +cp "$iti_out" "$workdir/iti_reg.trace" +cp "$encod_out" "$workdir/encod_reg.trace" + +clean_file_preserve_header "$workdir/iti_reg.trace" "$workdir/iti_reg_cleaned.trace" 6 2 +clean_file_preserve_header "$workdir/iti.trace" "$workdir/iti_cleaned.trace" 7 0 + +if diff -q "$workdir/iti_reg_cleaned.trace" "$workdir/iti_cleaned.trace" > /dev/null; then + echo "SUCESS: Same ITI Traces" +else + diff -u "$workdir/iti_reg_cleaned.trace" "$workdir/iti_cleaned.trace" + exit_error "FAILED: ITI traces do not match" +fi + +decapsuler_path="$workdir/../../../corev_apu/instr_tracing/Decapsuler" + +if ! make -C "$decapsuler_path"; then + exit_error "Error: Compilation of Decapsuler failed" +fi + +if ! "$decapsuler_path/Decapsuler" "$workdir/encaps.trace"; then + exit_error "Error: Decapsulation failed" +fi + +clean_file_preserve_header "$workdir/encod_reg.trace" "$workdir/encod_reg_cleaned.trace" 3 2 +clean_file_preserve_header "$workdir/encaps.csv" "$workdir/encaps_cleaned.trace" 3 0 + +if diff -q "$workdir/encod_reg_cleaned.trace" "$workdir/encaps_cleaned.trace" > /dev/null; then + echo "SUCESS: Same Encoder Packets" +else + python3 "$decapsuler_path/diff_color.py" "$workdir/encaps.csv" "$workdir/encod_reg.trace" + exit_error "FAILED: Encoder Packets do not match" +fi \ No newline at end of file diff --git a/verif/regress/coremark.sh b/verif/regress/coremark.sh index 23038dbf3db..cabcc585aee 100644 --- a/verif/regress/coremark.sh +++ b/verif/regress/coremark.sh @@ -76,7 +76,7 @@ cflags_opt=( cflags=( "${cflags_opt[@]}" "-DCOMPILER_FLAGS='\"${cflags_opt[*]}\"'" - -DITERATIONS=4 + -DITERATIONS=1 -DPERFORMANCE_RUN -DSKIP_TIME_CHECK -I../tests/custom/env diff --git a/verif/regress/cv32a6_tests.sh b/verif/regress/cv32a6_tests.sh index 0af6cc0231d..28f3b284d31 100644 --- a/verif/regress/cv32a6_tests.sh +++ b/verif/regress/cv32a6_tests.sh @@ -46,6 +46,10 @@ cd verif/sim/ errors=0 +# Regression for #3535: Zcmp macro expansion must wait for issue acknowledgement. +make -C ../tb/macro_decoder_unit +[[ $? > 0 ]] && ((errors++)) + # 32-bit configurations without MMU riscv_tests_list=( rv32ui-p-add @@ -63,6 +67,38 @@ python3 cva6.py --target ${DV_TARGET} --iss=$DV_SIMULATORS --iss_yaml=cva6.yaml --gcc_opts="-static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -g ../tests/custom/common/syscalls.c ../tests/custom/common/crt.S -lgcc -I../tests/custom/env -I../tests/custom/common" $DV_OPTS [[ $? > 0 ]] && ((errors++)) +# Regression for #3464: cm.mva01s permits equal compact-register operands. +if [ "$DV_TARGET" = "cv32a60x" ]; then + # Rebuild for the generated hwconfig because the preceding tests use + # the default cv32a60x configuration, where RVZCMP is disabled. + make -C ../.. clean + + env -u SPIKE_TANDEM python3 cva6.py \ + --testlist=../tests/testlist_issues.yaml \ + --test zcmp-mva01s-equal-regs-rv32 \ + --iss_yaml cva6.yaml \ + --target hwconfig \ + --hwconfig_opts="cv32a60x *RVZCMP=1" \ + --iss=veri-testharness \ + --linker="../../config/gen_from_riscv_config/cv32a60x/linker/link.ld" \ + $DV_OPTS + [[ $? > 0 ]] && ((errors++)) +fi + +# Regression for #3465: reserved Zcmp rlist values must trap as illegal. +if [ "$DV_TARGET" = "cv32a60x" ]; then + python3 cva6.py \ + --testlist=../tests/testlist_issues.yaml \ + --test zcmp-reserved-rlist-rv32 \ + --iss_yaml cva6.yaml \ + --target hwconfig \ + --hwconfig_opts="cv32a60x *RVZCMP=1" \ + --iss=$DV_SIMULATORS \ + --linker="../../config/gen_from_riscv_config/cv32a60x/linker/link.ld" \ + $DV_OPTS + [[ $? > 0 ]] && ((errors++)) +fi + make -C ../.. clean make clean_all diff --git a/verif/regress/cv64a6_imafdc_tests.sh b/verif/regress/cv64a6_imafdc_tests.sh index e5164f40e6f..edd3001156e 100644 --- a/verif/regress/cv64a6_imafdc_tests.sh +++ b/verif/regress/cv64a6_imafdc_tests.sh @@ -66,6 +66,18 @@ python3 cva6.py --target ${DV_TARGET} --iss=$DV_SIMULATORS --iss_yaml=cva6.yaml --gcc_opts="-static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -g ../tests/custom/common/syscalls.c ../tests/custom/common/crt.S -I../tests/custom/env -I../tests/custom/common -T ../../config/gen_from_riscv_config/linker/link.ld" $DV_OPTS [[ $? > 0 ]] && ((errors++)) +# Regression for #3342: pmpaddr bit 0 must not affect either TOR boundary +# when the PMP grain is eight bytes. Run the DUT alone because the default +# CV64 Spike configuration does not describe CVA6's PMP granularity. +env -u SPIKE_TANDEM python3 cva6.py \ + --testlist=../tests/testlist_issues.yaml \ + --test pmp-tor-grain-rv64 \ + --iss_yaml cva6.yaml \ + --target ${DV_TARGET} \ + --iss=veri-testharness \ + $DV_OPTS +[[ $? > 0 ]] && ((errors++)) + make -C ../.. clean make clean_all diff --git a/verif/regress/install-pk.sh b/verif/regress/install-pk.sh new file mode 100755 index 00000000000..8788d0427f4 --- /dev/null +++ b/verif/regress/install-pk.sh @@ -0,0 +1,107 @@ +#!/bin/bash +# Copyright 2025 Isaar AHMAD +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Original Author: Isaar AHMAD +# +# ============================================================================== +# This script installs RISCV proxy kernel at ${ROOT_PROJECT}/tools/pk, +# where ROOT_PROJECT is base of the CVA6 repository. +# ============================================================================== +set -e # Exit immediately if a command fails + +PK_ARCH=$1 +PK_MABI=$2 +PK_REPO="https://github.com/riscv-software-src/riscv-pk.git" +PK_BRANCH="master" +PK_COMMIT_HASH="e5563d1044bd6790325c4602c49f89e1182fa91a" + +if ! [ -n "$RISCV" ]; then + echo "Error: RISCV variable undefined" + return 1 +fi + +PATH=$RISCV/bin:$PATH +# Customise this to a fast local disk +ROOT_PROJECT=$(readlink -f $(dirname "${BASH_SOURCE[0]}")/../../) + +if [ -z "$NUM_JOBS" ]; then + NUM_JOBS=1 +fi + +# Unset historical variable PK_ROOT as it collides with the build process. +if [ -n "$PK_ROOT" ]; then + unset PK_ROOT +fi + +echo "[install-pk.sh] Entry values:" +echo " PK_BUILD_DIR='$PK_BUILD_DIR'" +echo " PK_INSTALL_DIR='$PK_INSTALL_DIR'" + +# If not set, define the installation location of pk to the local path +# +# /tools/pk +# +# Continuous Integration may need to override this particular variable +# to use a preinstalled build of Verilator. +if [ -z "$PK_INSTALL_DIR" ]; then + export PK_INSTALL_DIR="$ROOT_PROJECT/tools/pk" + echo "Setting PK_INSTALL_DIR to '$PK_INSTALL_DIR'..." +fi + +# Define the default src+build location of pk in case it needs to be (re)built. +# No need to force this location in Continuous Integration scripts. +if [ -z "$PK_BUILD_DIR" ]; then + export PK_BUILD_DIR="$PK_INSTALL_DIR/build-pk" + echo "Setting PK_BUILD_DIR to '$PK_BUILD_DIR'..." +fi + +# Clean previous installation directory to ensure a fresh install +echo "Cleaning old installation directory: $PK_INSTALL_DIR" +rm -rf "$PK_INSTALL_DIR" + +# Build and install pk only if the final binary is not present. +# Note: The script now always rebuilds due to the rm -rf above. +if [ ! -f "$PK_INSTALL_DIR/riscv-none-elf/bin/pk" ]; then + echo "Building pk in '$PK_BUILD_DIR'..." + echo "pk will be installed in '$PK_INSTALL_DIR'" + echo "PK_REPO=$PK_REPO" + echo "PK_COMMIT_HASH=$PK_COMMIT_HASH" + echo "NUM_JOBS=$NUM_JOBS" + + mkdir -p "$PK_BUILD_DIR" + pushd "$PK_BUILD_DIR" + # Fetch repository only if the ".git" directory does not exist. + # Do not remove the content arbitrarily if ".git" does not exist in order + # to preserve user content - let git fail instead. + if [ ! -d ".git" ]; then + echo "Cloning full repository from ${PK_REPO}..." + git clone "${PK_REPO}" . + else + echo "Repository already exists. Fetching updates..." + git fetch origin + fi + + echo "Checking out commit: ${PK_COMMIT_HASH}" + git checkout "${PK_COMMIT_HASH}" + + # Proceed with the build + mkdir -p build + pushd build + ../configure --prefix="$PK_INSTALL_DIR" --host=riscv-none-elf --with-arch="$PK_ARCH" + make -j${NUM_JOBS} + make install + popd # build + popd # $PK_BUILD_DIR +else + echo "pk already installed in '$PK_INSTALL_DIR'." +fi + +# Add pk bin directory to PATH if not already present. +echo "$PATH" | grep -q "$PK_INSTALL_DIR/bin:" || \ + export PATH="$PK_INSTALL_DIR/bin:$PATH" + +echo "Successfully configured RISC-V Proxy Kernel." diff --git a/verif/regress/install-riscv-tests.sh b/verif/regress/install-riscv-tests.sh index 2023d29e791..27fbc5245fa 100755 --- a/verif/regress/install-riscv-tests.sh +++ b/verif/regress/install-riscv-tests.sh @@ -8,7 +8,7 @@ # Original Author: Jean-Roch COULON - Thales if ! [ -n "$TESTS_REPO" ]; then - TESTS_REPO="https://github.com/riscv/riscv-tests.git" + TESTS_REPO="https://github.com/riscv-software-src/riscv-tests.git" TESTS_BRANCH="master" TESTS_HASH="f92842f91644092960ac7946a61ec2895e543cec" fi diff --git a/verif/regress/install-spike.sh b/verif/regress/install-spike.sh index e240f64bdbb..b6389575146 100755 --- a/verif/regress/install-spike.sh +++ b/verif/regress/install-spike.sh @@ -43,7 +43,10 @@ if ! [ -f "$SPIKE_INSTALL_DIR/bin/spike" ]; then cd build WITH_BOOST="" if [[ ! -z "$BOOST_INSTALL_DIR" ]]; then - WITH_BOOST="--with-boost=${BOOST_INSTALL_DIR}" + WITH_BOOST="${WITH_BOOST} --with-boost=${BOOST_INSTALL_DIR}" + fi + if [[ ! -z "$BOOST_LIBDIR" ]]; then + WITH_BOOST="${WITH_BOOST} --with-boost-libdir=${BOOST_LIBDIR}" fi if [ ! -f config.log ]; then ../configure --prefix="$SPIKE_INSTALL_DIR" ${WITH_BOOST} diff --git a/verif/regress/issue-tests.sh b/verif/regress/issue-tests.sh index 01209c36174..37aaaf07fe0 100644 --- a/verif/regress/issue-tests.sh +++ b/verif/regress/issue-tests.sh @@ -33,4 +33,57 @@ python3 cva6.py --testlist=../tests/testlist_issues.yaml --test compressed-fpreg make clean make -C verif/sim clean_all + +# Check the complete eight-bit Zcmt JVT index with a directed assembly test. +python3 cva6.py \ + --testlist=../tests/testlist_issues.yaml \ + --test zcmt-jvt-index-rv32 \ + --iss_yaml cva6.yaml \ + --target hwconfig \ + --hwconfig_opts="cv32a60x *RVZCMT=1" \ + --iss=veri-testharness \ + --linker="../../config/gen_from_riscv_config/cv32a60x/linker/link.ld" + +zcmt_status=$? +if [ "$zcmt_status" -ne 0 ]; then + echo "Error: Zcmt JVT index assembly regression failed" + cd ../.. + return "$zcmt_status" 2>/dev/null || exit "$zcmt_status" +fi + + +# Check that cm.jt clears bit 0 of the loaded JVT target. +python3 cva6.py \ + --testlist=../tests/testlist_issues.yaml \ + --test zcmt-jt-target-lsb-rv32 \ + --iss_yaml cva6.yaml \ + --target hwconfig \ + --hwconfig_opts="cv32a60x *RVZCMT=1" \ + --iss=veri-testharness \ + --linker="../../config/gen_from_riscv_config/cv32a60x/linker/link.ld" + +zcmt_jt_lsb_status=$? +if [ "$zcmt_jt_lsb_status" -ne 0 ]; then + echo "Error: Zcmt cm.jt target LSB regression failed" + cd ../.. + return "$zcmt_jt_lsb_status" 2>/dev/null || exit "$zcmt_jt_lsb_status" +fi + +# Check that cm.jalt clears bit 0 of the loaded JVT target. +python3 cva6.py \ + --testlist=../tests/testlist_issues.yaml \ + --test zcmt-jalt-target-lsb-rv32 \ + --iss_yaml cva6.yaml \ + --target hwconfig \ + --hwconfig_opts="cv32a60x *RVZCMT=1" \ + --iss=veri-testharness \ + --linker="../../config/gen_from_riscv_config/cv32a60x/linker/link.ld" + +zcmt_jalt_lsb_status=$? +if [ "$zcmt_jalt_lsb_status" -ne 0 ]; then + echo "Error: Zcmt cm.jalt target LSB regression failed" + cd ../.. + return "$zcmt_jalt_lsb_status" 2>/dev/null || exit "$zcmt_jalt_lsb_status" +fi + cd - diff --git a/verif/regress/iti_test.sh b/verif/regress/iti_test.sh new file mode 100644 index 00000000000..1b914d202a0 --- /dev/null +++ b/verif/regress/iti_test.sh @@ -0,0 +1,56 @@ +# Copyright 2025 Thales DIS design services SAS +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Author: Maxime Colson - Thales + +if [ "$#" -eq 1 ]; then + ELF_ARG="$1" +elif [ "$#" -gt 1 ]; then + echo "Usage: $0 " + exit 1 +else + ELF_ARG="../tests/custom/ITI/test_iti_asm.o" +fi +# where are the tools +if ! [ -n "$RISCV" ]; then + echo "Error: RISCV variable undefined" + return +fi + +if ! [ -n "$DV_SIMULATORS" ]; then + DV_SIMULATORS=vcs-testharness +fi + +# install the required tools +if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then + source ./verif/regress/install-verilator.sh +fi +source ./verif/regress/install-spike.sh + +# setup sim env +source ./verif/sim/setup-env.sh + +echo "$SPIKE_INSTALL_DIR$" + +if ! [ -n "$UVM_VERBOSITY" ]; then + export UVM_VERBOSITY=UVM_NONE +fi + +export DV_OPTS="$DV_OPTS --issrun_opts=+debug_disable=1+UVM_VERBOSITY=$UVM_VERBOSITY" + +CC_OPTS="-static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -g ../tests/custom/common/syscalls.c ../tests/custom/common/crt.S ../tests/custom/ITI/iti_asm.S -I../tests/custom/env -I../tests/custom/common -lgcc" + +cd verif/sim/ + +make -C ../.. clean +make clean_all +python3 cva6.py --elf_tests "$ELF_ARG" --target cv32a60x --iss_yaml cva6.yaml --iss=$DV_SIMULATORS --linker=../../config/gen_from_riscv_config/cv32a60x/linker/link.ld $DV_OPTS +#python3 cva6.py --c_tests ../tests/custom/ITI/test_iti_asm.c --iss_yaml cva6.yaml --target cv32a60x --iss=$DV_SIMULATORS --linker=../../config/gen_from_riscv_config/cv32a65x/linker/link.ld --gcc_opts="$CC_OPTS" $DV_OPTS +make -C ../.. clean +make clean_all + +cd - diff --git a/verif/regress/pmp_cv32a65x_tests.sh b/verif/regress/pmp_cv32a65x_tests.sh new file mode 100644 index 00000000000..5e65fb70075 --- /dev/null +++ b/verif/regress/pmp_cv32a65x_tests.sh @@ -0,0 +1,41 @@ +##----------------------------------------------------------------------------- +## Copyright 2024 Robert Bosch GmbH +## +## SPDX-License-Identifier: SHL-0.51 +## +## Original Author: Konstantinos Leventos - Robert Bosch France SAS +##----------------------------------------------------------------------------- + +# Where the tools are +if ! [ -n "$RISCV" ]; then + echo "Error: RISCV variable undefined" + return +fi + +# Install the required tools +source ./verif/regress/install-spike.sh + +# Setup sim env +source ./verif/sim/setup-env.sh + +if ! [ -n "$DV_SIMULATORS" ]; then + DV_SIMULATORS=vcs-uvm +fi + +if ! [ -n "$UVM_VERBOSITY" ]; then + UVM_VERBOSITY=UVM_NONE +fi + +export DV_OPTS="$DV_OPTS --issrun_opts=+debug_disable=1+UVM_VERBOSITY=$UVM_VERBOSITY" + +export DV_TARGET=cv32a65x + +make clean +cd verif/sim/ +make clean_all + +python3 cva6.py --testlist=../tests/testlist_pmp-$DV_TARGET.yaml --target $DV_TARGET --iss_yaml=cva6.yaml --iss=$DV_SIMULATORS $DV_OPTS --linker=../../config/gen_from_riscv_config/cv32a60x/linker/link.ld + +make clean_all +cd - +make clean diff --git a/verif/regress/pmp_lsu_transaction.sh b/verif/regress/pmp_lsu_transaction.sh new file mode 100644 index 00000000000..428570bd5bb --- /dev/null +++ b/verif/regress/pmp_lsu_transaction.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +# Copyright 2026 OpenHW Group +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 + +set -eo pipefail + +if [[ -z "${RISCV:-}" ]]; then + echo "Error: RISCV variable undefined" >&2 + exit 1 +fi + +source verif/sim/setup-env.sh +set -u + +# These are self-checking architectural tests. Do not enable Spike tandem +# execution because the OpenHW RV64 Spike target does not describe these PMP +# regions. +unset SPIKE_TANDEM + +readonly standard_target="${DV_TARGET:-cv64a6_imafdc_sv39}" +readonly linker="../../config/gen_from_riscv_config/linker/link.ld" +readonly testlist="../tests/testlist_issues.yaml" +readonly no_mmu_options="${standard_target}"\ +" +CVA6ConfigDcacheFlushOnFence=0"\ +" +CVA6ConfigDcacheFlushOnFenceI=0"\ +" +CVA6ConfigDcacheInvalidateOnFlush=0"\ +" *MmuPresent=0" + +cd verif/sim + +run_test() { + local test_name="$1" + local target="$2" + shift 2 + + python3 cva6.py \ + --testlist="${testlist}" \ + --test="${test_name}" \ + --target="${target}" \ + --iss_yaml=cva6.yaml \ + --iss=veri-testharness \ + --linker="${linker}" \ + --issrun_opts=+debug_disable=1 \ + "$@" +} + +# Discard a model left by a previous run with a different configuration. +make -C ../.. clean + +run_test pmp-lsu-transaction-rv64 "${standard_target}" +run_test pmp-amo-access-fault-rv64 "${standard_target}" + +# The generated model does not track configuration variables as dependencies, +# so discard it before switching to the no-MMU configuration. +make -C ../.. clean + +run_test pmp-lsu-transaction-no-mmu-rv64 hwconfig \ + --hwconfig_opts="${no_mmu_options}" + +# HLVX carries its execute-permission requirement with the response too. +make -C ../.. clean +run_test pmp-hlvx-access-fault-rv64 cv64a6_imafdch_sv39 + +make -C ../.. clean +run_test pmp-hlvx-access-fault-rv64 hwconfig \ + --hwconfig_opts="cv64a6_imafdch_sv39 +CVA6ConfigDcacheFlushOnFence=0 +CVA6ConfigDcacheFlushOnFenceI=0 +CVA6ConfigDcacheInvalidateOnFlush=0 *MmuPresent=0" diff --git a/verif/regress/smoke-tests-cv64a6_imafdc_sv39.sh b/verif/regress/smoke-tests-cv64a6_imafdc_sv39.sh index d60ce010d24..311a9644247 100644 --- a/verif/regress/smoke-tests-cv64a6_imafdc_sv39.sh +++ b/verif/regress/smoke-tests-cv64a6_imafdc_sv39.sh @@ -13,6 +13,10 @@ if ! [ -n "$RISCV" ]; then return fi +if ! [ -n "$TARGET" ]; then + TARGET=cv64a6_imafdc_sv39 +fi + if ! [ -n "$DV_SIMULATORS" ]; then DV_SIMULATORS=vcs-testharness,spike fi @@ -46,12 +50,13 @@ cd verif/sim/ make -C ../.. clean make clean_all -python3 cva6.py --testlist=../tests/testlist_riscv-compliance-cv64a6_imafdc_sv39.yaml --test rv32i-I-ADD-01 --iss_yaml cva6.yaml --target cv64a6_imafdc_sv39 --iss=$DV_SIMULATORS $DV_OPTS -python3 cva6.py --testlist=../tests/testlist_riscv-tests-cv64a6_imafdc_sv39-v.yaml --test rv64ui-v-add --iss_yaml cva6.yaml --target cv64a6_imafdc_sv39 --iss=$DV_SIMULATORS $DV_OPTS -python3 cva6.py --testlist=../tests/testlist_riscv-tests-cv64a6_imafdc_sv39-p.yaml --test rv64ui-p-add --iss_yaml cva6.yaml --target cv64a6_imafdc_sv39 --iss=$DV_SIMULATORS $DV_OPTS -python3 cva6.py --testlist=../tests/testlist_riscv-arch-test-cv64a6_imafdc_sv39.yaml --test rv64i_m-add-01 --iss_yaml cva6.yaml --target cv64a6_imafdc_sv39 --iss=$DV_SIMULATORS $DV_OPTS --linker=../../config/gen_from_riscv_config/linker/link.ld -python3 cva6.py --testlist=../tests/testlist_custom.yaml --test custom_test_template --iss_yaml cva6.yaml --target cv64a6_imafdc_sv39 --iss=$DV_SIMULATORS $DV_OPTS -python3 cva6.py --c_tests ../tests/custom/hello_world/hello_world.c --iss_yaml cva6.yaml --target cv64a6_imafdc_sv39 --iss=$DV_SIMULATORS --gcc_opts="$CC_OPTS -nostdlib -lgcc" $DV_OPTS --linker=../../config/gen_from_riscv_config/linker/link.ld +python3 cva6.py --testlist=../tests/testlist_riscv-compliance-cv64a6_imafdc_sv39.yaml --test rv32i-I-ADD-01 --iss_yaml cva6.yaml --target ${TARGET} --iss=$DV_SIMULATORS $DV_OPTS +python3 cva6.py --testlist=../tests/testlist_riscv-tests-cv64a6_imafdc_sv39-v.yaml --test rv64ui-v-add --iss_yaml cva6.yaml --target ${TARGET} --iss=$DV_SIMULATORS $DV_OPTS +python3 cva6.py --testlist=../tests/testlist_riscv-tests-cv64a6_imafdc_sv39-p.yaml --test rv64ui-p-add --iss_yaml cva6.yaml --target ${TARGET} --iss=$DV_SIMULATORS $DV_OPTS +python3 cva6.py --testlist=../tests/testlist_riscv-tests-cv64a6_imafdc_sv39-p.yaml --test rv64si-p-noncanonical --iss_yaml cva6.yaml --target ${TARGET} --iss=$DV_SIMULATORS $DV_OPTS +python3 cva6.py --testlist=../tests/testlist_riscv-arch-test-cv64a6_imafdc_sv39.yaml --test rv64i_m-add-01 --iss_yaml cva6.yaml --target ${TARGET} --iss=$DV_SIMULATORS $DV_OPTS --linker=../../config/gen_from_riscv_config/linker/link.ld +python3 cva6.py --testlist=../tests/testlist_custom.yaml --test custom_test_template --iss_yaml cva6.yaml --target ${TARGET} --iss=$DV_SIMULATORS $DV_OPTS +python3 cva6.py --c_tests ../tests/custom/hello_world/hello_world.c --iss_yaml cva6.yaml --target ${TARGET} --iss=$DV_SIMULATORS --gcc_opts="$CC_OPTS -nostdlib -lgcc" $DV_OPTS --linker=../../config/gen_from_riscv_config/linker/link.ld make -C ../.. clean make clean_all diff --git a/verif/regress/triggers-tests-cv32a60x.sh b/verif/regress/triggers-tests-cv32a60x.sh new file mode 100644 index 00000000000..01d35348636 --- /dev/null +++ b/verif/regress/triggers-tests-cv32a60x.sh @@ -0,0 +1,58 @@ +# Copyright 2021 Thales DIS design services SAS +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Original Author: Mounsaf YOUSFI - Thales + +# where are the tools +if ! [ -n "$RISCV" ]; then + echo "Error: RISCV variable undefined" + return +fi + +if ! [ -n "$DV_SIMULATORS" ]; then + DV_SIMULATORS=vcs-testharness,spike +fi + +# install the required tools +if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then + source ./verif/regress/install-verilator.sh +fi +source ./verif/regress/install-spike.sh + +# setup sim env +source ./verif/sim/setup-env.sh + +echo "$SPIKE_INSTALL_DIR$" + +if ! [ -n "$UVM_VERBOSITY" ]; then + export UVM_VERBOSITY=UVM_NONE +fi + +export DV_OPTS="$DV_OPTS --issrun_opts=+enable_interrupt+tb_performance_mode+debug_disable=1+UVM_VERBOSITY=$UVM_VERBOSITY" + +CC_OPTS="-static \ + -mcmodel=medany \ + -fvisibility=hidden \ + -nostartfiles \ + -g \ + -O0 \ + ../tests/custom/common/syscalls.c \ + ../tests/custom/common/crt.S \ + -I../tests/custom/env \ + -I../tests/custom/common" + +DV_HWCONFIG_OPTS="cv32a60x Sdtrig=1 SdtrigMcontrol6=1 SdtrigMcontrol6ExecAddr=1 SdtrigMcontrol6ExecData=1 SdtrigMcontrol6Store=1 SdtrigMcontrol6LoadAddr=1 SdtrigMcontrol6LoadData=1 SdtrigIcount=1 SdtrigEtrigger=1 SdtrigItrigger=1 SdtrigNrTriggers=4 SdtrigTriggerChaining=1 SdtrigSupportedActions=2'b01 SdtrigSupportedMatch=10'b11_1111_1111 SdtrigSupportTextra=0" + +cd verif/sim/ + +make -C ../.. clean +make clean_all +python3 cva6.py --target hwconfig --hwconfig_opts="$DV_HWCONFIG_OPTS" --asm_tests=../tests/custom/trigger_tests/trigger_main.S --iss_yaml cva6.yaml --iss=$DV_SIMULATORS --linker=../../config/gen_from_riscv_config/cv32a60x/linker/link.ld --gcc_opts="$CC_OPTS" $DV_OPTS --sv_seed 1 +make -C ../.. clean +make clean_all + +cd - diff --git a/verif/regress/triggers-tests-cv32a65x.sh b/verif/regress/triggers-tests-cv32a65x.sh new file mode 100644 index 00000000000..9d03a026901 --- /dev/null +++ b/verif/regress/triggers-tests-cv32a65x.sh @@ -0,0 +1,58 @@ +# Copyright 2021 Thales DIS design services SAS +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Original Author: Mounsaf YOUSFI - Thales + +# where are the tools +if ! [ -n "$RISCV" ]; then + echo "Error: RISCV variable undefined" + return +fi + +if ! [ -n "$DV_SIMULATORS" ]; then + DV_SIMULATORS=vcs-testharness,spike +fi + +# install the required tools +if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then + source ./verif/regress/install-verilator.sh +fi +source ./verif/regress/install-spike.sh + +# setup sim env +source ./verif/sim/setup-env.sh + +echo "$SPIKE_INSTALL_DIR$" + +if ! [ -n "$UVM_VERBOSITY" ]; then + export UVM_VERBOSITY=UVM_NONE +fi + +export DV_OPTS="$DV_OPTS --issrun_opts=+enable_interrupt+tb_performance_mode+debug_disable=1+UVM_VERBOSITY=$UVM_VERBOSITY" + +CC_OPTS="-static \ + -mcmodel=medany \ + -fvisibility=hidden \ + -nostartfiles \ + -g \ + -O0 \ + ../tests/custom/common/syscalls.c \ + ../tests/custom/common/crt.S \ + -I../tests/custom/env \ + -I../tests/custom/common" + +DV_HWCONFIG_OPTS="cv32a65x Sdtrig=1 SdtrigMcontrol6=1 SdtrigMcontrol6ExecAddr=1 SdtrigMcontrol6ExecData=1 SdtrigMcontrol6Store=1 SdtrigMcontrol6LoadAddr=1 SdtrigMcontrol6LoadData=1 SdtrigIcount=1 SdtrigEtrigger=1 SdtrigItrigger=1 SdtrigNrTriggers=4 SdtrigTriggerChaining=1 SdtrigSupportedActions=2'b01 SdtrigSupportedMatch=10'b11_1111_1111 SdtrigSupportTextra=0" + +cd verif/sim/ + +make -C ../.. clean +make clean_all +python3 cva6.py --target hwconfig --hwconfig_opts="$DV_HWCONFIG_OPTS" --asm_tests=../tests/custom/trigger_tests/trigger_main.S --iss_yaml cva6.yaml --iss=$DV_SIMULATORS --linker=../../config/gen_from_riscv_config/cv32a60x/linker/link.ld --gcc_opts="$CC_OPTS" $DV_OPTS --sv_seed 1 +make -C ../.. clean +make clean_all + +cd - diff --git a/verif/regress/veri-testharness-pk-tests.sh b/verif/regress/veri-testharness-pk-tests.sh new file mode 100644 index 00000000000..8973a5401e0 --- /dev/null +++ b/verif/regress/veri-testharness-pk-tests.sh @@ -0,0 +1,129 @@ +#!/bin/bash +# Copyright 2025 Isaar AHMAD +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Original Author: Isaar AHMAD +# +# ============================================================================== +# This script demonstrates how to simulate the CVA6 core using Verilator and the +# RISC-V Proxy Kernel (PK), using the DV_SIMULATOR "veri-testharness-pk". +# It runs two hello world simulations, one for a 64-bit target, and one for a +# 32-bit target. Both simulations are run in separate subshell(s) to isolate +# environment changes and directory moves. +# +# Usage (from the base of the repository): +# bash verif/regress/veri-testharness-pk-tests.sh +# +# ============================================================================== +# Exit immediately if a command exits with a non-zero status. +set -e + +# where are the tools +if ! [ -n "$RISCV" ]; then + echo "Error: The RISCV environment variable is not defined." + return +fi + +# Set the NUM_JOBS variable to increase the number of parallel make jobs +# export NUM_JOBS= + +# Global simulation settings, common to all runs. +export DV_SIMULATORS="veri-testharness-pk" +TIMEOUT_WALLCLOCK="800" +TIMEOUT_TICKS="5000000" + +# ============================================================================== +# Core simulation function +# This function wraps the entire process for running a single CVA6 +# simulation. It is parameterized to handle different target configurations. +# +# Args: +# $1: Target architecture (DV_TARGET) +# $2: Proxy kernel architecture (PK_ARCH) +# $3: Proxy kernel ABI (PK_MABI) +# ============================================================================== +run_cva6_simulation() { + # Use local variables to avoid polluting the global scope. + local DV_TARGET=$1 + local PK_ARCH=$2 + local PK_MABI=$3 + + # Run the logic in a subshell to isolate environment changes. + ( + # Exit this subshell immediately if a command fails. + set -e + + # Export the configuration specific to this simulation run. + export DV_TARGET + export PK_ARCH + export PK_MABI + + echo "--------------------------------------------------------" + echo "[ CVA6 ] Target: ${DV_TARGET}" + echo "[ CVA6 ] PK Arch: ${PK_ARCH}" + echo "[ CVA6 ] PK MABI: ${PK_MABI}" + echo "--------------------------------------------------------" + + # Install verilator if required by the simulator choice. + if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then + source ./verif/regress/install-verilator.sh + fi + + # Install RISC-V Proxy Kernel for the specified architecture. + # The log file is named after the target to prevent overwrites. + if [[ "$DV_SIMULATORS" == *"veri-testharness-pk"* ]]; then + local pk_log_file="./verif/sim/pk-install-${DV_TARGET}.log" + echo "[ riscv-pk ] Installing RISC-V proxy kernel for ${DV_TARGET}..." + source ./verif/regress/install-pk.sh ${PK_ARCH} ${PK_MABI} > ${pk_log_file} 2>&1 + echo "[ riscv-pk ] Installation logs available at: $(pwd)/${pk_log_file}" + echo "[ riscv-pk ] PK_INSTALL_DIR is ${PK_INSTALL_DIR}" + fi + + # Set up the simulation environment. navigate to simulation directory. + source ./verif/sim/setup-env.sh + cd ./verif/sim + + # GCC options (customize if needed). + local CC_OPTS="" + + echo "[ CVA6 ] Starting pytohn simulation script..." + # Execute the main simulation command. + python3 cva6.py \ + --target "$DV_TARGET" \ + --iss="$DV_SIMULATORS" \ + --iss_yaml=cva6.yaml \ + --iss_timeout="$TIMEOUT_WALLCLOCK" \ + --c_tests ../tests/custom/hello_world/hello_world.c \ + --gcc_opts="$CC_OPTS" \ + --issrun_opts="+time_out=$TIMEOUT_TICKS" + ) +} + +# ============================================================================== +# Main Execution +# This block calls run_simulation_cva6 twice - once for each simulation run. +# ============================================================================== +export DV_TARGET1="cv64a6_imafdc_sv39" +export PK_ARCH1="rv64gc_zba_zbb_zbs_zbc_zbkb_zbkx_zkne_zknd_zknh" +export PK_MABI1="lp64d" + +export DV_TARGET2="cv32a6_imac_sv32" +export PK_ARCH2="rv32imac_zbkb_zbkx_zkne_zknd_zknh_zicsr_zifencei" +export PK_MABI2="ilp32" + +COLOR_GREEN='\033[0;32m' +COLOR_NONE='\033[0m' # No Color +# --- Simulation 1: cv64a6_imafdc_sv39 +echo -e "${COLOR_GREEN} ============== Starting simualtion 1: ${DV_TARGET1} ====================== ${COLOR_NONE}" +run_cva6_simulation ${DV_TARGET1} ${PK_ARCH1} ${PK_MABI1} +echo -e "${COLOR_GREEN} ============== Finished simulation 1: ${DV_TARGET1} ====================== ${COLOR_NONE}" + +# --- Simulation 2: cv32a6_imac_sv32 --- +echo -e "${COLOR_GREEN} ============== Starting simualtion 2: ${DV_TARGET2} ====================== ${COLOR_NONE}" +run_cva6_simulation ${DV_TARGET2} ${PK_ARCH2} ${PK_MABI2} +echo -e "${COLOR_GREEN} ============== Finished simulation 2: ${DV_TARGET2} ====================== ${COLOR_NONE}" + +echo "All simulations finished successfully." diff --git a/verif/sim/Makefile b/verif/sim/Makefile index 1a71754c0f2..05efa32b57f 100644 --- a/verif/sim/Makefile +++ b/verif/sim/Makefile @@ -350,8 +350,7 @@ questa_uvm_comp: -suppress vlog-2745 -suppress vlog-8386 \ -suppress vlog-8607 \ +define+UNSUPPORTED_WITH+ \ - +define+QUESTA+ \ - $(cov-comp-opt) $(isscomp_opts) + +define+QUESTA vopt -work $(VSIM_WORK_DIR) \ -64 +acc uvmt_cva6_tb -o uvmt_cva6_tb_opt @@ -359,6 +358,7 @@ questa_uvm_run: @echo "[QUESTA] Running Model" vsim -64 \ $(COMMON_RUN_UVM_FLAGS) \ + $(COMMON_RUN_ARGS) \ -sv_lib $(QUESTASIM_HOME)/uvm-1.2/linux_x86_64/uvm_dpi \ -c -do "run -all; " \ -work $(VSIM_WORK_DIR) -t 1ns \ @@ -366,13 +366,14 @@ questa_uvm_run: -suppress 3829 -suppress vsim-8386\ +permissive \ -sv_seed 0 \ - $(cov-run-opt) $(issrun_opts) \ + -noautoldlibpath \ +define+UNSUPPORTED_WITH+ \ + $(issrun_opts) \ uvmt_cva6_tb_opt + $(tool_path)/spike-dasm --isa=$(variant) < ./trace_rvfi_hart_00.dasm > $(log) + grep $(isspostrun_opts) ./trace_rvfi_hart_00.dasm # TODO: Add support for waveform collection. - #$(tool_path)/spike-dasm --isa=$(variant) < $(path_var)/trace_rvfi_hart_00.dasm > $(log) - #grep $(isspostrun_opts) $(path_var)/trace_rvfi_hart_00.dasm questa-uvm: make questa_uvm_comp @@ -411,6 +412,22 @@ vcs-testharness: $(tool_path)/spike-dasm --isa=$(variant) < ./trace_rvfi_hart_00.dasm > $(log) grep $(isspostrun_opts) ./trace_rvfi_hart_00.dasm +veri-testharness-pk: + rm -rf $(path_var)/work-ver + @echo "Trace compact value $(TRACE_COMPACT)" + make -C $(path_var) verilate verilator="verilator --no-timing" target=$(target) defines=$(subst +define+,,$(isscomp_opts)) + $(path_var)/work-ver/Variane_testharness $(if $(TRACE_COMPACT), -f verilator.fst) $(if $(TRACE_FAST), -v verilator.vcd) \ + $(PK_INSTALL_DIR)/riscv-none-elf/bin/pk $(elf) \ + +tohost_addr=$(shell $$RISCV/bin/$(CV_SW_PREFIX)nm -B $(PK_INSTALL_DIR)/riscv-none-elf/bin/pk | grep -w tohost | cut -d' ' -f1) \ + $(issrun_opts) + # If present, move default waveform files to log directory. + # Keep track of target in waveform file name. + [ ! -f verilator.fst ] || mv verilator.fst `dirname $(log)`/`basename $(log) .log`.fst + [ ! -f verilator.vcd ] || mv verilator.vcd `dirname $(log)`/`basename $(log) .log`.vcd + # Generate disassembled log. + $(tool_path)/spike-dasm --isa=$(variant) < ./trace_rvfi_hart_00.dasm > $(log) + grep $(isspostrun_opts) ./trace_rvfi_hart_00.dasm + veri-testharness: make -C $(path_var) verilate verilator="verilator --no-timing" target=$(target) defines=$(subst +define+,,$(isscomp_opts)) $(path_var)/work-ver/Variane_testharness $(if $(TRACE_COMPACT), -f verilator.fst) $(if $(TRACE_FAST), -v verilator.vcd) $(elf) $(issrun_opts) \ @@ -452,6 +469,7 @@ clean_all: vcs_clean_all rm -f trace*.log rm -f trace*.dasm rm -f *.vpd *.fsdb *.vcd *.fst + rm -f *.trace help: @echo "Shell environment:" diff --git a/verif/sim/cva6.py b/verif/sim/cva6.py index 4c5075ec89e..8e678f53f89 100644 --- a/verif/sim/cva6.py +++ b/verif/sim/cva6.py @@ -508,13 +508,20 @@ def run_test(test, iss_yaml, isa, target, mabi, gcc_opts, iss_opts, output_dir, if test_type != "o": # gcc compilation logging.info("Compiling test: %s" % test_path) - cmd = ("%s %s \ - -I%s/dv/user_extension \ - -T%s %s -o %s " % \ - (get_env_var("RISCV_CC", debug_cmd = debug_cmd), test_path, cwd, - linker, gcc_opts, elf)) - cmd += (" -march=%s" % isa) - cmd += (" -mabi=%s" % mabi) + if "veri-testharness-pk" not in iss_list: + + cmd = ("%s %s \ + -I%s/dv/user_extension \ + -T%s %s -o %s " % \ + (get_env_var("RISCV_CC", debug_cmd = debug_cmd), test_path, cwd, + linker, gcc_opts, elf)) + else: # veri-testharness with proxy kernel enabled. + cmd= ("%s %s %s -o %s " % (get_env_var("RISCV_CC", debug_cmd = debug_cmd), test_path, gcc_opts, elf)) + if not re.search(r"(?:^|\s)-march=", cmd): + cmd += (" -march=%s" % isa) + if not re.search(r"(?:^|\s)-mabi=", cmd): + cmd += (" -mabi=%s" % mabi) + logging.info("Compilation cmd: %s" % cmd) run_cmd(cmd, debug_cmd = debug_cmd) log_list = [] # ISS simulation @@ -884,12 +891,12 @@ def load_config(args, cwd): if base in ("cv64a6_imafdch_sv39", "cv64a6_imafdch_sv39_wb"): args.mabi = "lp64d" args.isa = "rv64gch_zba_zbb_zbs_zbc" - elif base in ("cv64a6_imafdc_sv39_wb"): + elif base in ("cv64a6_imafdc_sv39_wb",): args.mabi = "lp64d" args.isa = "rv64gc_zba_zbb_zbs_zbc" elif base in ("cv64a6_imafdc_sv39", "cv64a6_imafdc_sv39_hpdcache", "cv64a6_imafdc_sv39_hpdcache_wb"): args.mabi = "lp64d" - args.isa = "rv64gc_zba_zbb_zbs_zbc_zbkb" + args.isa = "rv64gc_zba_zbb_zbs_zbc_zbkb_zbkx_zkne_zknd_zknh" elif base == "cv32a60x": args.mabi = "ilp32" args.isa = "rv32imc_zba_zbb_zbs_zbc" @@ -906,7 +913,7 @@ def load_config(args, cwd): args.isa = "rv32imac" elif base == "cv32a6_imac_sv32": args.mabi = "ilp32" - args.isa = "rv32imac_zbkb" + args.isa = "rv32imac_zbkb_zbkx_zkne_zknd_zknh" elif base == "cv32a6_imafc_sv32": args.mabi = "ilp32f" args.isa = "rv32imafc" @@ -1025,7 +1032,8 @@ def check_spike_version(): logging.info(f"Spike Version: {user_spike_stderr_string}") - if user_spike_stderr_string != spike_version: + n = min(len(user_spike_stderr_string), len(spike_version)) + if user_spike_stderr_string[:n] != spike_version[:n]: incorrect_version_exit("Spike", user_spike_stderr_string, spike_version) diff --git a/verif/sim/cva6.yaml b/verif/sim/cva6.yaml index 6011296027a..5286f2494d8 100644 --- a/verif/sim/cva6.yaml +++ b/verif/sim/cva6.yaml @@ -30,6 +30,16 @@ cmd: > make veri-testharness target= variant= elf= path_var= tool_path= isscomp_opts= issrun_opts= isspostrun_opts= log= +############################################################################### +# Verilator with RISCV proxy kernel support +############################################################################### +- iss: veri-testharness-pk + path_var: RTL_PATH + tool_path: SPIKE_PATH + tb_path: TB_PATH + cmd: > + make veri-testharness-pk target= variant= elf= path_var= tool_path= isscomp_opts= issrun_opts= isspostrun_opts= log= + ############################################################################### # Synopsys VCS specific commands, variables ############################################################################### diff --git a/verif/sim/dv b/verif/sim/dv index f0c570d1123..7e54b678ab7 160000 --- a/verif/sim/dv +++ b/verif/sim/dv @@ -1 +1 @@ -Subproject commit f0c570d11236f94f9c5449870223a5ac717cc580 +Subproject commit 7e54b678ab7499040336255550cdbd99ae887431 diff --git a/verif/tb/core/Flist.cva6_tb b/verif/tb/core/Flist.cva6_tb index a7dbd115911..4ec7dae6131 100644 --- a/verif/tb/core/Flist.cva6_tb +++ b/verif/tb/core/Flist.cva6_tb @@ -20,7 +20,7 @@ // // Manifest for the CVA6 TB. // - This is a CORE-ONLY testbench. -// - Relevent simulation scripts/Makefiles must set the shell ENV variable +// - Relevant simulation scripts/Makefiles must set the shell ENV variable // CVA6_TB_DIR as required. // /////////////////////////////////////////////////////////////////////////////// diff --git a/verif/tb/core/README.md b/verif/tb/core/README.md index eb3c4f63b12..de3edcac3ec 100644 --- a/verif/tb/core/README.md +++ b/verif/tb/core/README.md @@ -1,5 +1,5 @@ ## Experimental Stand-alone testbench for the CVA6 -This do-nothing TB supports experiments with the CVA6 to develop a standalone testbenech for the CVA6. +This do-nothing TB supports experiments with the CVA6 to develop a standalone testbench for the CVA6. It uses a "core-only" manifest file `Flist.cva6`. ### Current status: diff --git a/verif/tb/core/bootrom/Makefile b/verif/tb/core/bootrom/Makefile index 86708317c8d..2d44fea2bca 100644 --- a/verif/tb/core/bootrom/Makefile +++ b/verif/tb/core/bootrom/Makefile @@ -1,7 +1,7 @@ ############################################################################### # $@ is the file being generated. -# $< is first prerequiste. -# $^ is all prerequistes. +# $< is first prerequisite. +# $^ is all prerequisites. # $* is file_name (w/o extension) of target DTB ?= cva6.dtb diff --git a/verif/tb/core/cva6_tb_verilator.cpp b/verif/tb/core/cva6_tb_verilator.cpp index b0ebe688a22..e1ac95dae66 100644 --- a/verif/tb/core/cva6_tb_verilator.cpp +++ b/verif/tb/core/cva6_tb_verilator.cpp @@ -20,7 +20,7 @@ ******************************************************************************* * * Verilator top for the CVA6 "core_only" testbench. - * Genrates clock, reset and optionally dumps waves. + * Generates clock, reset and optionally dumps waves. * ******************************************************************************* */ diff --git a/verif/tb/csr_unit/Makefile b/verif/tb/csr_unit/Makefile new file mode 100644 index 00000000000..8aee7b55c5b --- /dev/null +++ b/verif/tb/csr_unit/Makefile @@ -0,0 +1,19 @@ +ROOT := ../../.. +BUILD := .build/mstatus_wpri_test + +SOURCES := \ + $(ROOT)/core/include/config_pkg.sv \ + $(ROOT)/core/include/cv64a6_imafdc_sv39_config_pkg.sv \ + $(ROOT)/core/include/build_config_pkg.sv \ + $(ROOT)/core/include/riscv_pkg.sv \ + $(ROOT)/core/include/ariane_pkg.sv \ + $(ROOT)/core/include/triggers_pkg.sv \ + $(ROOT)/core/trigger_module.sv \ + $(ROOT)/core/csr_regfile.sv \ + mstatus_wpri_test.sv + +.PHONY: mstatus_wpri_test +mstatus_wpri_test: + mkdir -p .build + verilator --binary --assert --timing -Wno-fatal -Wno-PINMISSING -Wno-WIDTHTRUNC -Wno-WIDTHEXPAND -Wno-MULTIDRIVEN -I$(ROOT)/core/include --top-module mstatus_wpri_test --Mdir $(BUILD) $(SOURCES) + $(BUILD)/Vmstatus_wpri_test diff --git a/verif/tb/csr_unit/mstatus_wpri_test.sv b/verif/tb/csr_unit/mstatus_wpri_test.sv new file mode 100644 index 00000000000..079132ef8a3 --- /dev/null +++ b/verif/tb/csr_unit/mstatus_wpri_test.sv @@ -0,0 +1,107 @@ +`include "rvfi_types.svh" + +module mstatus_wpri_test; + import ariane_pkg::*; + + localparam config_pkg::cva6_cfg_t CVA6Cfg = build_config_pkg::build_config( + cva6_config_pkg::cva6_cfg + ); + + typedef struct packed { + logic [CVA6Cfg.XLEN-1:0] cause; + logic [CVA6Cfg.XLEN-1:0] tval; + logic [CVA6Cfg.GPLEN-1:0] tval2; + logic [31:0] tinst; + logic gva; + logic valid; + logic timing; + } exception_t; + + typedef struct packed { + logic [CVA6Cfg.VLEN-1:0] predict_address; + } branchpredict_t; + + typedef struct packed { + logic [CVA6Cfg.VLEN-1:0] pc; + fu_t fu; + branchpredict_t bp; + logic is_compressed; + } scoreboard_entry_t; + + typedef struct packed { + logic [CVA6Cfg.XLEN-7:0] base; + logic [5:0] mode; + } jvt_t; + + typedef struct packed { + logic [CVA6Cfg.XLEN-1:0] mie; + logic [CVA6Cfg.XLEN-1:0] mip; + logic [CVA6Cfg.XLEN-1:0] mideleg; + logic [CVA6Cfg.XLEN-1:0] hideleg; + logic sie; + logic global_enable; + } irq_ctrl_t; + + typedef `RVFI_PROBES_CSR_T(CVA6Cfg) rvfi_probes_csr_t; + + logic clk_i; + logic rst_ni; + scoreboard_entry_t commit_instr_i; + logic [CVA6Cfg.NrCommitPorts-1:0] commit_ack_i; + exception_t ex_i; + fu_op csr_op_i; + logic [11:0] csr_addr_i; + logic [CVA6Cfg.XLEN-1:0] csr_wdata_i; + logic [CVA6Cfg.XLEN-1:0] csr_rdata_o; + exception_t csr_exception_o; + + always #1 clk_i = ~clk_i; + + csr_regfile #( + .CVA6Cfg(CVA6Cfg), + .exception_t(exception_t), + .jvt_t(jvt_t), + .irq_ctrl_t(irq_ctrl_t), + .scoreboard_entry_t(scoreboard_entry_t), + .rvfi_probes_csr_t(rvfi_probes_csr_t) + ) dut ( + .clk_i, + .rst_ni, + .commit_instr_i, + .commit_ack_i, + .ex_i, + .csr_op_i, + .csr_addr_i, + .csr_wdata_i, + .csr_rdata_o, + .csr_exception_o + ); + + initial begin + clk_i = 1'b0; + rst_ni = 1'b0; + commit_instr_i = '0; + commit_ack_i = '0; + ex_i = '0; + csr_op_i = CSR_READ; + csr_addr_i = riscv::CSR_MSTATUS; + csr_wdata_i = '0; + + #3; + rst_ni = 1'b1; + @(negedge clk_i); + + csr_op_i = CSR_WRITE; + csr_wdata_i = (64'(1) << 62) | (64'(1) << 50) | (64'(1) << 38); + @(negedge clk_i); + + csr_op_i = CSR_READ; + #1; + + assert (!csr_exception_o.valid) else $fatal(1, "mstatus access failed"); + assert ((csr_rdata_o & csr_wdata_i) == '0) else $fatal(1, "reserved mstatus bits are writable"); + + $display("PASS: reserved mstatus bits stay zero"); + $finish; + end +endmodule diff --git a/verif/tb/decoder_unit/Makefile b/verif/tb/decoder_unit/Makefile new file mode 100644 index 00000000000..7d6a0903108 --- /dev/null +++ b/verif/tb/decoder_unit/Makefile @@ -0,0 +1,26 @@ +ROOT := ../../.. +BUILD := .build/zicbom_permissions_test + +SOURCES := \ + $(ROOT)/core/include/config_pkg.sv \ + $(ROOT)/core/include/cv64a6_imafdch_sv39_config_pkg.sv \ + $(ROOT)/core/include/build_config_pkg.sv \ + $(ROOT)/core/include/riscv_pkg.sv \ + $(ROOT)/core/include/ariane_pkg.sv \ + $(ROOT)/core/decoder.sv \ + zicbom_permissions_test.sv + +.PHONY: zicbom_permissions_test +zicbom_permissions_test: + mkdir -p .build + verilator --binary --assert --timing \ + -Wno-fatal \ + -Wno-PINMISSING \ + -Wno-UNOPTFLAT \ + -Wno-WIDTHTRUNC \ + -Wno-WIDTHEXPAND \ + -I$(ROOT)/core/include \ + --top-module zicbom_permissions_test \ + --Mdir $(BUILD) \ + $(SOURCES) + $(BUILD)/Vzicbom_permissions_test diff --git a/verif/tb/decoder_unit/zicbom_permissions_test.sv b/verif/tb/decoder_unit/zicbom_permissions_test.sv new file mode 100644 index 00000000000..3d5c29148ed --- /dev/null +++ b/verif/tb/decoder_unit/zicbom_permissions_test.sv @@ -0,0 +1,352 @@ +module zicbom_permissions_test; + import ariane_pkg::*; + + function automatic config_pkg::cva6_cfg_t make_test_cfg(); + config_pkg::cva6_user_cfg_t cfg; + cfg = cva6_config_pkg::cva6_cfg; + + // The stock H configuration has RVH enabled but Zicbom disabled. + // Enable Zicbom locally for this decoder regression. + cfg.RVZiCbom = 1'b1; + + // Disable CV-X-IF so decoder-generated illegal instructions directly + // become architectural exceptions in this standalone test. + cfg.CvxifEn = 1'b0; + + return build_config_pkg::build_config(cfg); + endfunction + + localparam config_pkg::cva6_cfg_t CVA6Cfg = make_test_cfg(); + + typedef struct packed { + cf_t cf; + logic [CVA6Cfg.VLEN-1:0] predict_address; + } branchpredict_sbe_t; + + typedef struct packed { + logic [CVA6Cfg.XLEN-1:0] cause; + logic [CVA6Cfg.XLEN-1:0] tval; + logic [CVA6Cfg.GPLEN-1:0] tval2; + logic [31:0] tinst; + logic gva; + logic valid; + logic timing; + } exception_t; + + typedef struct packed { + logic [CVA6Cfg.VLEN-1:0] pc; + logic [CVA6Cfg.TRANS_ID_BITS-1:0] trans_id; + fu_t fu; + fu_op op; + logic [REG_ADDR_SIZE-1:0] rs1; + logic [REG_ADDR_SIZE-1:0] rs2; + logic [REG_ADDR_SIZE-1:0] rd; + logic [CVA6Cfg.XLEN-1:0] result; + logic valid; + logic use_imm; + logic use_zimm; + logic use_pc; + exception_t ex; + branchpredict_sbe_t bp; + logic is_compressed; + logic is_macro_instr; + logic is_last_macro_instr; + logic is_double_rd_macro_instr; + logic vfp; + logic is_zcmt; + } scoreboard_entry_t; + + typedef struct packed { + logic [CVA6Cfg.XLEN-1:0] mie; + logic [CVA6Cfg.XLEN-1:0] mip; + logic [CVA6Cfg.XLEN-1:0] mideleg; + logic [CVA6Cfg.XLEN-1:0] hideleg; + logic sie; + logic global_enable; + } irq_ctrl_t; + + typedef struct packed { + logic [CVA6Cfg.XLEN-1:0] S_SW; + logic [CVA6Cfg.XLEN-1:0] VS_SW; + logic [CVA6Cfg.XLEN-1:0] M_SW; + logic [CVA6Cfg.XLEN-1:0] S_TIMER; + logic [CVA6Cfg.XLEN-1:0] VS_TIMER; + logic [CVA6Cfg.XLEN-1:0] M_TIMER; + logic [CVA6Cfg.XLEN-1:0] S_EXT; + logic [CVA6Cfg.XLEN-1:0] VS_EXT; + logic [CVA6Cfg.XLEN-1:0] M_EXT; + logic [CVA6Cfg.XLEN-1:0] HS_EXT; + } interrupts_t; + + localparam interrupts_t INTERRUPTS = '0; + + localparam logic [31:0] CBO_INVAL_INSN = 32'h0000_200f; + localparam logic [31:0] CBO_CLEAN_INSN = 32'h0010_200f; + localparam logic [31:0] CBO_FLUSH_INSN = 32'h0020_200f; + + logic debug_req_i; + logic [CVA6Cfg.VLEN-1:0] pc_i; + logic is_compressed_i; + logic [15:0] compressed_instr_i; + logic is_illegal_i; + logic [31:0] instruction_i; + logic is_macro_instr_i; + logic is_last_macro_instr_i; + logic is_double_rd_macro_instr_i; + logic is_zcmt_i; + logic [CVA6Cfg.XLEN-1:0] jump_address_i; + branchpredict_sbe_t branch_predict_i; + exception_t ex_i; + logic [1:0] irq_i; + irq_ctrl_t irq_ctrl_i; + riscv::priv_lvl_t priv_lvl_i; + logic v_i; + logic debug_mode_i; + riscv::xs_t fs_i; + riscv::xs_t vfs_i; + logic [2:0] frm_i; + riscv::xs_t vs_i; + logic tvm_i; + logic tw_i; + logic vtw_i; + logic tsr_i; + logic hu_i; + + riscv::cbie_t mcbie_i; + riscv::cbie_t scbie_i; + riscv::cbie_t hcbie_i; + + logic mcbcfe_i; + logic scbcfe_i; + logic hcbcfe_i; + + scoreboard_entry_t instruction_o; + logic [31:0] orig_instr_o; + logic is_control_flow_instr_o; + logic [CVA6Cfg.XLEN-1:0] sdtrig_decoder_action_i; + + integer errors; + + decoder #( + .CVA6Cfg(CVA6Cfg), + .branchpredict_sbe_t(branchpredict_sbe_t), + .exception_t(exception_t), + .irq_ctrl_t(irq_ctrl_t), + .scoreboard_entry_t(scoreboard_entry_t), + .interrupts_t(interrupts_t), + .INTERRUPTS(INTERRUPTS) + ) dut ( + .debug_req_i, + .pc_i, + .is_compressed_i, + .compressed_instr_i, + .is_illegal_i, + .instruction_i, + .is_macro_instr_i, + .is_last_macro_instr_i, + .is_double_rd_macro_instr_i, + .is_zcmt_i, + .jump_address_i, + .branch_predict_i, + .ex_i, + .irq_i, + .irq_ctrl_i, + .priv_lvl_i, + .v_i, + .debug_mode_i, + .fs_i, + .vfs_i, + .frm_i, + .vs_i, + .tvm_i, + .tw_i, + .vtw_i, + .tsr_i, + .hu_i, + .mcbie_i, + .scbie_i, + .hcbie_i, + .mcbcfe_i, + .scbcfe_i, + .hcbcfe_i, + .instruction_o, + .orig_instr_o, + .is_control_flow_instr_o, + .sdtrig_decoder_action_i + ); + + task automatic run_case(input string name, input logic [31:0] instr_word, + input riscv::priv_lvl_t priv, input logic v, input logic hu, + input riscv::cbie_t mcbie, input riscv::cbie_t scbie, + input riscv::cbie_t hcbie, input logic mcbcfe, input logic scbcfe, + input logic hcbcfe, input logic expected_trap, + input logic [CVA6Cfg.XLEN-1:0] expected_cause, input fu_op expected_op); + begin + instruction_i = instr_word; + priv_lvl_i = priv; + v_i = v; + hu_i = hu; + + mcbie_i = mcbie; + scbie_i = scbie; + hcbie_i = hcbie; + + mcbcfe_i = mcbcfe; + scbcfe_i = scbcfe; + hcbcfe_i = hcbcfe; + + #1; + + if (instruction_o.ex.valid !== expected_trap) begin + $display("FAIL: %s: trap valid=%0b expected=%0b", name, instruction_o.ex.valid, + expected_trap); + errors = errors + 1; + end else if (expected_trap && instruction_o.ex.cause !== expected_cause) begin + $display("FAIL: %s: cause=%0d expected=%0d", name, instruction_o.ex.cause, expected_cause); + errors = errors + 1; + end else if (!expected_trap && instruction_o.op !== expected_op) begin + $display("FAIL: %s: op=%0d expected=%0d", name, instruction_o.op, expected_op); + errors = errors + 1; + end else begin + $display("PASS: %s", name); + end + end + endtask + + initial begin + errors = 0; + + debug_req_i = 1'b0; + pc_i = '0; + is_compressed_i = 1'b0; + compressed_instr_i = '0; + is_illegal_i = 1'b0; + instruction_i = '0; + is_macro_instr_i = 1'b0; + is_last_macro_instr_i = 1'b0; + is_double_rd_macro_instr_i = 1'b0; + is_zcmt_i = 1'b0; + jump_address_i = '0; + branch_predict_i = '0; + ex_i = '0; + irq_i = '0; + irq_ctrl_i = '0; + priv_lvl_i = riscv::PRIV_LVL_M; + v_i = 1'b0; + debug_mode_i = 1'b0; + fs_i = riscv::Off; + vfs_i = riscv::Off; + frm_i = '0; + vs_i = riscv::Off; + tvm_i = 1'b0; + tw_i = 1'b0; + vtw_i = 1'b0; + tsr_i = 1'b0; + hu_i = 1'b0; + mcbie_i = riscv::CBIE_INVAL; + scbie_i = riscv::CBIE_INVAL; + hcbie_i = riscv::CBIE_INVAL; + mcbcfe_i = 1'b1; + scbcfe_i = 1'b1; + hcbcfe_i = 1'b1; + sdtrig_decoder_action_i = '0; + + #1; + + // HU must not turn ordinary host U-mode into VU. + run_case("host U ignores HU for INVAL", CBO_INVAL_INSN, riscv::PRIV_LVL_U, 1'b0, 1'b1, + riscv::CBIE_INVAL, riscv::CBIE_INVAL, riscv::CBIE_INVAL, 1'b1, 1'b1, 1'b1, 1'b0, '0, + ariane_pkg::CBO_INVAL); + + // VU + senvcfg.CBIE=00 -> virtual-instruction. + run_case("VU sCBIE illegal is virtual", CBO_INVAL_INSN, riscv::PRIV_LVL_U, 1'b1, 1'b0, + riscv::CBIE_INVAL, riscv::CBIE_ILLEGAL, riscv::CBIE_INVAL, 1'b1, 1'b1, 1'b1, 1'b1, + riscv::VIRTUAL_INSTRUCTION, ariane_pkg::CBO_INVAL); + + // VS + henvcfg.CBIE=00 -> virtual-instruction. + run_case("VS hCBIE illegal is virtual", CBO_INVAL_INSN, riscv::PRIV_LVL_S, 1'b1, 1'b0, + riscv::CBIE_INVAL, riscv::CBIE_INVAL, riscv::CBIE_ILLEGAL, 1'b1, 1'b1, 1'b1, 1'b1, + riscv::VIRTUAL_INSTRUCTION, ariane_pkg::CBO_INVAL); + + // VU + henvcfg.CBIE=00 -> virtual-instruction. + run_case("VU hCBIE illegal is virtual", CBO_INVAL_INSN, riscv::PRIV_LVL_U, 1'b1, 1'b0, + riscv::CBIE_INVAL, riscv::CBIE_INVAL, riscv::CBIE_ILLEGAL, 1'b1, 1'b1, 1'b1, 1'b1, + riscv::VIRTUAL_INSTRUCTION, ariane_pkg::CBO_INVAL); + + // henvcfg does not govern HS execution. + run_case("HS ignores hCBIE", CBO_INVAL_INSN, riscv::PRIV_LVL_S, 1'b0, 1'b0, riscv::CBIE_INVAL, + riscv::CBIE_INVAL, riscv::CBIE_ILLEGAL, 1'b1, 1'b1, 1'b1, 1'b0, '0, + ariane_pkg::CBO_INVAL); + + // VS henvcfg.CBIE=01 performs a flush. + run_case("VS hCBIE flush", CBO_INVAL_INSN, riscv::PRIV_LVL_S, 1'b1, 1'b0, riscv::CBIE_INVAL, + riscv::CBIE_INVAL, riscv::CBIE_FLUSH, 1'b1, 1'b1, 1'b1, 1'b0, '0, + ariane_pkg::CBO_FLUSH); + + // VU senvcfg.CBIE=01 performs a flush. + run_case("VU sCBIE flush", CBO_INVAL_INSN, riscv::PRIV_LVL_U, 1'b1, 1'b0, riscv::CBIE_INVAL, + riscv::CBIE_FLUSH, riscv::CBIE_INVAL, 1'b1, 1'b1, 1'b1, 1'b0, '0, + ariane_pkg::CBO_FLUSH); + + // VU henvcfg.CBIE=01 performs a flush. + run_case("VU hCBIE flush", CBO_INVAL_INSN, riscv::PRIV_LVL_U, 1'b1, 1'b0, riscv::CBIE_INVAL, + riscv::CBIE_INVAL, riscv::CBIE_FLUSH, 1'b1, 1'b1, 1'b1, 1'b0, '0, + ariane_pkg::CBO_FLUSH); + + // VS CBO.CLEAN with henvcfg.CBCFE=0 -> virtual-instruction. + run_case("VS CLEAN hCBCFE disabled", CBO_CLEAN_INSN, riscv::PRIV_LVL_S, 1'b1, 1'b0, + riscv::CBIE_INVAL, riscv::CBIE_INVAL, riscv::CBIE_INVAL, 1'b1, 1'b1, 1'b0, 1'b1, + riscv::VIRTUAL_INSTRUCTION, ariane_pkg::CBO_CLEAN); + + // VU requires both henvcfg.CBCFE and senvcfg.CBCFE. + run_case("VU FLUSH hCBCFE disabled", CBO_FLUSH_INSN, riscv::PRIV_LVL_U, 1'b1, 1'b0, + riscv::CBIE_INVAL, riscv::CBIE_INVAL, riscv::CBIE_INVAL, 1'b1, 1'b1, 1'b0, 1'b1, + riscv::VIRTUAL_INSTRUCTION, ariane_pkg::CBO_FLUSH); + + run_case("VU FLUSH sCBCFE disabled", CBO_FLUSH_INSN, riscv::PRIV_LVL_U, 1'b1, 1'b0, + riscv::CBIE_INVAL, riscv::CBIE_INVAL, riscv::CBIE_INVAL, 1'b1, 1'b0, 1'b1, 1'b1, + riscv::VIRTUAL_INSTRUCTION, ariane_pkg::CBO_FLUSH); + + // Ordinary host U still gets cause 2 from senvcfg.CBCFE. + run_case("host U CLEAN sCBCFE disabled", CBO_CLEAN_INSN, riscv::PRIV_LVL_U, 1'b0, 1'b0, + riscv::CBIE_INVAL, riscv::CBIE_INVAL, riscv::CBIE_INVAL, 1'b1, 1'b0, 1'b1, 1'b1, + riscv::ILLEGAL_INSTR, ariane_pkg::CBO_CLEAN); + + // An INVAL converted to FLUSH by CBIE must not be rejected by CBCFE. + run_case("S INVAL-as-FLUSH ignores mCBCFE", CBO_INVAL_INSN, riscv::PRIV_LVL_S, 1'b0, 1'b0, + riscv::CBIE_FLUSH, riscv::CBIE_INVAL, riscv::CBIE_INVAL, 1'b0, 1'b1, 1'b1, 1'b0, '0, + ariane_pkg::CBO_FLUSH); + + run_case("U INVAL-as-FLUSH ignores sCBCFE", CBO_INVAL_INSN, riscv::PRIV_LVL_U, 1'b0, 1'b0, + riscv::CBIE_INVAL, riscv::CBIE_FLUSH, riscv::CBIE_INVAL, 1'b1, 1'b0, 1'b1, 1'b0, '0, + ariane_pkg::CBO_FLUSH); + + // Genuine FLUSH remains governed by CBCFE. + run_case("S genuine FLUSH obeys mCBCFE", CBO_FLUSH_INSN, riscv::PRIV_LVL_S, 1'b0, 1'b0, + riscv::CBIE_INVAL, riscv::CBIE_INVAL, riscv::CBIE_INVAL, 1'b0, 1'b1, 1'b1, 1'b1, + riscv::ILLEGAL_INSTR, ariane_pkg::CBO_FLUSH); + + run_case("U genuine FLUSH obeys sCBCFE", CBO_FLUSH_INSN, riscv::PRIV_LVL_U, 1'b0, 1'b0, + riscv::CBIE_INVAL, riscv::CBIE_INVAL, riscv::CBIE_INVAL, 1'b1, 1'b0, 1'b1, 1'b1, + riscv::ILLEGAL_INSTR, ariane_pkg::CBO_FLUSH); + + // menvcfg checks have higher priority and still produce cause 2 + // even while V=1. + run_case("guest mCBIE illegal remains illegal", CBO_INVAL_INSN, riscv::PRIV_LVL_S, 1'b1, 1'b0, + riscv::CBIE_ILLEGAL, riscv::CBIE_INVAL, riscv::CBIE_INVAL, 1'b1, 1'b1, 1'b1, 1'b1, + riscv::ILLEGAL_INSTR, ariane_pkg::CBO_INVAL); + + // HU must likewise not make host U subject to henvcfg.CBCFE. + run_case("host U ignores HU for CBCFE", CBO_CLEAN_INSN, riscv::PRIV_LVL_U, 1'b0, 1'b1, + riscv::CBIE_INVAL, riscv::CBIE_INVAL, riscv::CBIE_INVAL, 1'b1, 1'b1, 1'b0, 1'b0, '0, + ariane_pkg::CBO_CLEAN); + + if (errors != 0) begin + $fatal(1, "FAIL: %0d Zicbom permission checks failed", errors); + end + + $display("PASS: all Zicbom permission checks passed"); + $finish; + end + +endmodule diff --git a/verif/tb/macro_decoder_unit/Makefile b/verif/tb/macro_decoder_unit/Makefile new file mode 100644 index 00000000000..173fbdaac9f --- /dev/null +++ b/verif/tb/macro_decoder_unit/Makefile @@ -0,0 +1,33 @@ +ROOT := ../../.. +BUILD := .build/macro_decoder_issue_ack_test + +SOURCES := \ + $(ROOT)/core/include/config_pkg.sv \ + $(ROOT)/core/include/cv32a6_imac_sv32_config_pkg.sv \ + $(ROOT)/core/include/build_config_pkg.sv \ + $(ROOT)/core/include/riscv_pkg.sv \ + $(ROOT)/core/macro_decoder.sv \ + macro_decoder_issue_ack_test.sv + +.PHONY: all macro_decoder_issue_ack_test clean + +all: macro_decoder_issue_ack_test + +macro_decoder_issue_ack_test: + mkdir -p .build + verilator \ + --binary \ + --assert \ + --timing \ + -Wno-fatal \ + -Wno-PINMISSING \ + -Wno-WIDTHTRUNC \ + -Wno-WIDTHEXPAND \ + -I$(ROOT)/core/include \ + --top-module macro_decoder_issue_ack_test \ + --Mdir $(BUILD) \ + $(SOURCES) + $(BUILD)/Vmacro_decoder_issue_ack_test + +clean: + rm -rf .build diff --git a/verif/tb/macro_decoder_unit/macro_decoder_issue_ack_test.sv b/verif/tb/macro_decoder_unit/macro_decoder_issue_ack_test.sv new file mode 100644 index 00000000000..0307a302b1d --- /dev/null +++ b/verif/tb/macro_decoder_unit/macro_decoder_issue_ack_test.sv @@ -0,0 +1,166 @@ +module macro_decoder_issue_ack_test; + + localparam config_pkg::cva6_cfg_t CVA6Cfg = build_config_pkg::build_config( + cva6_config_pkg::cva6_cfg + ); + + // macro_decoder FSM encoding. + localparam logic [2:0] ST_IDLE = 3'd0; + localparam logic [2:0] ST_PUSH_ADDI = 3'd2; + localparam logic [2:0] ST_POPRETZ_1 = 3'd3; + localparam logic [2:0] ST_MOVE = 3'd4; + localparam logic [2:0] ST_PUSH_POP_INSTR_2 = 3'd5; + + logic clk_i; + logic rst_ni; + logic [31:0] instr_i; + logic is_macro_instr_i; + logic illegal_instr_i; + logic is_compressed_i; + logic issue_ack_i; + + logic [31:0] instr_o; + logic illegal_instr_o; + logic is_compressed_o; + logic fetch_stall_o; + logic is_last_macro_instr_o; + logic is_double_rd_macro_instr_o; + + always #5 clk_i = ~clk_i; + + macro_decoder #( + .CVA6Cfg(CVA6Cfg) + ) dut ( + .instr_i, + .clk_i, + .rst_ni, + .is_macro_instr_i, + .illegal_instr_i, + .is_compressed_i, + .issue_ack_i, + .instr_o, + .illegal_instr_o, + .is_compressed_o, + .fetch_stall_o, + .is_last_macro_instr_o, + .is_double_rd_macro_instr_o + ); + + task automatic reset_dut; + begin + is_macro_instr_i = 1'b0; + illegal_instr_i = 1'b0; + is_compressed_i = 1'b1; + issue_ack_i = 1'b0; + instr_i = '0; + + rst_ni = 1'b0; + repeat (2) @(posedge clk_i); + + // Deassert reset away from the active clock edge. + @(negedge clk_i); + rst_ni = 1'b1; + #1; + + assert (dut.state_q == ST_IDLE) + else $fatal(1, "decoder did not reset to IDLE"); + end + endtask + + task automatic check_stalled_first_uop( + input logic [15:0] encoding, input logic [2:0] expected_next_state, input string test_name); + logic [31:0] first_uop; + + begin + reset_dut(); + + // Drive the macro between clock edges and explicitly hold the + // issue acknowledgement low. + instr_i = {16'h0000, encoding}; + is_macro_instr_i = 1'b1; + issue_ack_i = 1'b0; + + // Allow combinational decoder outputs to settle before sampling. + #1; + + assert (!illegal_instr_o) + else $fatal(1, "%s decoded as illegal", test_name); + + assert (dut.state_q == ST_IDLE) + else $fatal(1, "%s did not start in IDLE", test_name); + + assert (fetch_stall_o) + else $fatal(1, "%s did not stall instruction fetch", test_name); + + first_uop = instr_o; + + // Cross exactly one active clock edge with issue_ack_i low. + @(posedge clk_i); + @(negedge clk_i); + #1; + + assert (dut.state_q == ST_IDLE) + else $fatal(1, "%s left IDLE without issue_ack_i (state=%0d)", test_name, dut.state_q); + + assert (instr_o === first_uop) + else $fatal(1, "%s changed the first micro-op while issue_ack_i was low", test_name); + + // Acknowledge the first micro-op well before the next positive edge. + issue_ack_i = 1'b1; + #1; + + // Cross exactly one active edge and sample before another active edge. + @(posedge clk_i); + @(negedge clk_i); + #1; + + assert (dut.state_q == expected_next_state) + else + $fatal( + 1, + "%s did not advance after issue_ack_i (state=%0d expected=%0d)", + test_name, + dut.state_q, + expected_next_state + ); + + $display("PASS: %s", test_name); + end + endtask + + initial begin + clk_i = 1'b0; + rst_ni = 1'b0; + instr_i = '0; + is_macro_instr_i = 1'b0; + illegal_instr_i = 1'b0; + is_compressed_i = 1'b1; + issue_ack_i = 1'b0; + + // Encodings generated with GNU binutils Zcmp support. + // + // Each of these instructions has a special transition directly + // from IDLE which must occur only after issue_ack_i is asserted. + + check_stalled_first_uop(16'hacaa, ST_MOVE, "cm.mvsa01"); + + check_stalled_first_uop(16'hacea, ST_MOVE, "cm.mva01s"); + + check_stalled_first_uop(16'hb842, ST_PUSH_ADDI, "cm.push {ra}, -16"); + + check_stalled_first_uop(16'hba42, ST_PUSH_ADDI, "cm.pop {ra}, 16"); + + check_stalled_first_uop(16'hbe42, ST_PUSH_ADDI, "cm.popret {ra}, 16"); + + check_stalled_first_uop(16'hbc42, ST_POPRETZ_1, "cm.popretz {ra}, 16"); + + check_stalled_first_uop(16'hb8f2, ST_PUSH_POP_INSTR_2, "cm.push {ra, s0-s11}, -64"); + + check_stalled_first_uop(16'hbaf2, ST_PUSH_POP_INSTR_2, "cm.pop {ra, s0-s11}, 64"); + + $display("PASS: macro decoder holds every affected first micro-op until issue_ack_i"); + + $finish; + end + +endmodule diff --git a/verif/tb/unit/Makefile b/verif/tb/unit/Makefile new file mode 100644 index 00000000000..93f5dd22cb5 --- /dev/null +++ b/verif/tb/unit/Makefile @@ -0,0 +1,48 @@ +VERILATOR ?= verilator +ROOT := ../../.. +BUILD_ROOT ?= .build +TESTS := $(patsubst %.sv,%,$(notdir $(wildcard *_test.sv))) + +.PHONY: all clean $(TESTS) + +RV64_CFG := $(ROOT)/core/include/cv64a6_imafdc_sv39_config_pkg.sv +RV32_CFG := $(ROOT)/core/include/cv32a6_imac_sv32_config_pkg.sv + +# Build and run test $(1) with the configuration package $(3), in the build directory $(1)_$(2) +define run_xlen_test + mkdir -p $(BUILD_ROOT) + $(VERILATOR) --binary --assert --timing -Wno-fatal -Wno-WIDTHTRUNC -Wno-WIDTHEXPAND -Wno-MULTIDRIVEN --top-module $(1) --Mdir $(BUILD_ROOT)/$(1)_$(2) $(ROOT)/core/include/config_pkg.sv $(3) $(ROOT)/core/include/build_config_pkg.sv $(ROOT)/core/include/riscv_pkg.sv $(ROOT)/core/include/ariane_pkg.sv $(ROOT)/core/include/triggers_pkg.sv $(ROOT)/core/trigger_module.sv $(1).sv + $(BUILD_ROOT)/$(1)_$(2)/V$(1) +endef + +all: $(TESTS) + +trigger_loadaddr_test: + mkdir -p $(BUILD_ROOT) + $(VERILATOR) --binary --assert --timing -Wno-fatal -Wno-WIDTHTRUNC -Wno-WIDTHEXPAND -Wno-MULTIDRIVEN --top-module $@ --Mdir $(BUILD_ROOT)/$@ $(ROOT)/core/include/config_pkg.sv $(ROOT)/core/include/cv64a6_imafdc_sv39_config_pkg.sv $(ROOT)/core/include/build_config_pkg.sv $(ROOT)/core/include/riscv_pkg.sv $(ROOT)/core/include/ariane_pkg.sv $(ROOT)/core/include/triggers_pkg.sv $(ROOT)/core/trigger_module.sv $@.sv + $(BUILD_ROOT)/$@/V$@ + +trigger_dmode_test: + mkdir -p $(BUILD_ROOT) + $(VERILATOR) --binary --assert --timing -Wno-fatal -Wno-WIDTHTRUNC -Wno-WIDTHEXPAND -Wno-MULTIDRIVEN --top-module $@ --Mdir $(BUILD_ROOT)/$@ $(ROOT)/core/include/config_pkg.sv $(ROOT)/core/include/cv64a6_imafdc_sv39_config_pkg.sv $(ROOT)/core/include/build_config_pkg.sv $(ROOT)/core/include/riscv_pkg.sv $(ROOT)/core/include/ariane_pkg.sv $(ROOT)/core/include/triggers_pkg.sv $(ROOT)/core/trigger_module.sv $@.sv + $(BUILD_ROOT)/$@/V$@ + +trigger_napot_test: + mkdir -p $(BUILD_ROOT) + $(VERILATOR) --binary --assert --timing --top-module $@ --Mdir $(BUILD_ROOT)/$@ $(ROOT)/core/include/triggers_pkg.sv $@.sv + $(BUILD_ROOT)/$@/V$@ + +trigger_tdata1_test: + $(call run_xlen_test,$@,rv64,$(RV64_CFG)) + $(call run_xlen_test,$@,rv32,$(RV32_CFG)) + +trigger_xtrigger_test: + $(call run_xlen_test,$@,rv64,$(RV64_CFG)) + $(call run_xlen_test,$@,rv32,$(RV32_CFG)) + +trigger_icount_test: + $(call run_xlen_test,$@,rv64,$(RV64_CFG)) + $(call run_xlen_test,$@,rv32,$(RV32_CFG)) + +clean: + rm -rf $(BUILD_ROOT) diff --git a/verif/tb/unit/trigger_dmode_test.sv b/verif/tb/unit/trigger_dmode_test.sv new file mode 100644 index 00000000000..9cc288f885d --- /dev/null +++ b/verif/tb/unit/trigger_dmode_test.sv @@ -0,0 +1,133 @@ +module trigger_dmode_test; + typedef struct packed { + logic valid; + logic [63:0] cause; + } exception_t; + + function automatic config_pkg::cva6_cfg_t test_config(); + config_pkg::cva6_cfg_t cfg; + cfg = build_config_pkg::build_config(cva6_config_pkg::cva6_cfg); + cfg.Sdtrig = 1; + cfg.SdtrigMcontrol6 = 1; + cfg.SdtrigNrTriggers = 2; + cfg.SdtrigSupportedActions = 2'b11; + cfg.SdtrigSupportedMatch = 10'b11_1111_1111; + return cfg; + endfunction + + localparam config_pkg::cva6_cfg_t TestCfg = test_config(); + + logic clk = 0; + logic rst_n = 0; + logic debug_mode; + logic [63:0] tdata1_i; + logic [63:0] tdata2_i; + logic tdata1_we; + logic tdata2_we; + logic [63:0] tdata1_o; + logic [63:0] tdata2_o; + + always #1 clk = !clk; + + trigger_module #( + .CVA6Cfg(TestCfg), + .exception_t(exception_t) + ) dut ( + .clk_i(clk), + .rst_ni(rst_n), + .commit_ack_i('0), + .ex_i('0), + .priv_lvl_i(riscv::PRIV_LVL_M), + .debug_mode_i(debug_mode), + .mret_i(1'b0), + .sret_i(1'b0), + .mstatus_mie_i(1'b1), + .mstatus_sie_i(1'b1), + .medeleg_breakpoint_i(1'b0), + .sdtrig_lsu_inputs_vaddr_i('0), + .sdtrig_lsu_inputs_data_i('0), + .sdtrig_lsu_inputs_fu_i(1'b0), + .sdtrig_lsu_inputs_op_i(ariane_pkg::ADD), + .sdtrig_lsu_inputs_valid_i(1'b0), + .sdtrig_load_data_i('0), + .sdtrig_load_valid_i(1'b0), + .scontext_i('0), + .tdata1_i(tdata1_i), + .tdata2_i(tdata2_i), + .tdata3_i('0), + .tselect_i('0), + .tselect_we(1'b0), + .tdata1_we(tdata1_we), + .tdata2_we(tdata2_we), + .tdata3_we(1'b0), + .tselect_o(), + .tdata1_o(tdata1_o), + .tdata2_o(tdata2_o), + .tdata3_o(), + .flush_o(), + .mepc_i('0), + .mcause_i('0), + .mtval_i('0), + .etrigger_context_saved_valid_o(), + .etrigger_context_mepc_o(), + .etrigger_context_mcause_o(), + .etrigger_context_mtval_o(), + .fetch_sdtrig_pc_i('0), + .fetch_sdtrig_instr_i('0), + .sdtrig_decoder_action_o(), + .sdtrig_load_stall_o(), + .sdtrig_load_cancel_o(), + .sdtrig_load_action_o(), + .sdtrig_store_stall_o(), + .sdtrig_store_action_o(), + .sdtrig_commit_std_exception_valid_o(), + .sdtrig_commit_icount_valid_o(), + .sdtrig_commit_action_o(), + .sdtrig_commit_icount_nr_instr_o() + ); + + task automatic write_tdata1(input logic [63:0] value); + tdata1_i = value; + tdata1_we = 1; + @(posedge clk); + #1; + tdata1_we = 0; + endtask + + task automatic write_tdata2(input logic [63:0] value); + tdata2_i = value; + tdata2_we = 1; + @(posedge clk); + #1; + tdata2_we = 0; + endtask + + initial begin + debug_mode = 0; + tdata1_i = 0; + tdata2_i = 0; + tdata1_we = 0; + tdata2_we = 0; + repeat (2) @(posedge clk); + rst_n = 1; + + write_tdata1(64'h6800_0000_0000_0004); + assert (!tdata1_o[59]); + assert (tdata1_o[2]); + + debug_mode = 1; + write_tdata1(64'h6800_0000_0000_0004); + assert (tdata1_o[59]); + write_tdata2(64'h55); + assert (tdata2_o == 64'h55); + + debug_mode = 0; + write_tdata1(64'h6000_0000_0000_0000); + assert (tdata1_o[59]); + assert (tdata1_o[2]); + write_tdata2(64'hAA); + assert (tdata2_o == 64'h55); + + $finish; + end +endmodule diff --git a/verif/tb/unit/trigger_icount_test.sv b/verif/tb/unit/trigger_icount_test.sv new file mode 100644 index 00000000000..157b2b6362f --- /dev/null +++ b/verif/tb/unit/trigger_icount_test.sv @@ -0,0 +1,279 @@ +module trigger_icount_test; + timeunit 1ns; timeprecision 1ps; + localparam int unsigned XLEN = cva6_config_pkg::CVA6ConfigXlen; + + typedef struct packed { + logic valid; + logic [XLEN-1:0] cause; + } exception_t; + + function automatic config_pkg::cva6_cfg_t test_config(); + config_pkg::cva6_cfg_t cfg; + cfg = build_config_pkg::build_config(cva6_config_pkg::cva6_cfg); + cfg.Sdtrig = 1; + cfg.SdtrigIcount = 1; + cfg.SdtrigNrTriggers = 4; + cfg.SdtrigSupportedActions = 2'b11; + return cfg; + endfunction + + localparam config_pkg::cva6_cfg_t TestCfg = test_config(); + localparam int unsigned NrW = $clog2(TestCfg.NrCommitPorts); + + logic clk = 0; + logic rst_n = 0; + logic debug_mode; + riscv::priv_lvl_t priv_lvl; + exception_t ex; + logic mret; + logic [TestCfg.NrCommitPorts-1:0] commit_ack; + logic [XLEN-1:0] tdata1_i; + logic tdata1_we; + logic [XLEN-1:0] tdata1_o; + logic icount_valid; + logic [NrW-1:0] icount_nr; + logic [XLEN-1:0] icount_action; + + always #1 clk = !clk; + + trigger_module #( + .CVA6Cfg(TestCfg), + .exception_t(exception_t) + ) dut ( + .clk_i(clk), + .rst_ni(rst_n), + .commit_ack_i(commit_ack), + .ex_i(ex), + .priv_lvl_i(priv_lvl), + .debug_mode_i(debug_mode), + .mret_i(mret), + .sret_i(1'b0), + .mstatus_mie_i(1'b1), + .mstatus_sie_i(1'b1), + .medeleg_breakpoint_i(1'b0), + .sdtrig_lsu_inputs_vaddr_i('0), + .sdtrig_lsu_inputs_data_i('0), + .sdtrig_lsu_inputs_fu_i(1'b0), + .sdtrig_lsu_inputs_op_i(ariane_pkg::ADD), + .sdtrig_lsu_inputs_valid_i(1'b0), + .sdtrig_load_data_i('0), + .sdtrig_load_valid_i(1'b0), + .scontext_i('0), + .tdata1_i(tdata1_i), + .tdata2_i('0), + .tdata3_i('0), + .tselect_i('0), + .tselect_we(1'b0), + .tdata1_we(tdata1_we), + .tdata2_we(1'b0), + .tdata3_we(1'b0), + .tselect_o(), + .tdata1_o(tdata1_o), + .tdata2_o(), + .tdata3_o(), + .flush_o(), + .mepc_i('0), + .mcause_i('0), + .mtval_i('0), + .etrigger_context_saved_valid_o(), + .etrigger_context_mepc_o(), + .etrigger_context_mcause_o(), + .etrigger_context_mtval_o(), + .fetch_sdtrig_pc_i('0), + .fetch_sdtrig_instr_i('0), + .sdtrig_decoder_action_o(), + .sdtrig_load_stall_o(), + .sdtrig_load_cancel_o(), + .sdtrig_load_action_o(), + .sdtrig_store_stall_o(), + .sdtrig_store_action_o(), + .sdtrig_commit_std_exception_valid_o(), + .sdtrig_commit_icount_valid_o(icount_valid), + .sdtrig_commit_action_o(icount_action), + .sdtrig_commit_icount_nr_instr_o(icount_nr) + ); + + localparam logic [XLEN-1:0] ICOUNT = XLEN'(3) << (XLEN - 4); + localparam logic [XLEN-1:0] ICOUNT_M = XLEN'(32'h200); + localparam logic [XLEN-1:0] ICOUNT_U = XLEN'(32'h40); + localparam logic [XLEN-1:0] PENDING = XLEN'(32'h100); + localparam logic [XLEN-1:0] HIT = XLEN'(32'h100_0000); + + function automatic logic [XLEN-1:0] count(input int c); + return XLEN'(c) << 10; + endfunction + + // The commit stage takes the trigger action in this cycle + function automatic logic fire_now(); + return icount_valid && icount_nr == '0; + endfunction + + task automatic write_tdata1(input logic [XLEN-1:0] value); + tdata1_i = value; + tdata1_we = 1; + @(posedge clk); + #0.1; + tdata1_we = 0; + // The write flushes the pipeline: nothing retires in the next cycle + @(posedge clk); + #0.1; + endtask + + // n instructions retire in one cycle + task automatic retire(input int n); + commit_ack = '0; + for (int p = 0; p < n; p++) commit_ack[p] = 1'b1; + @(posedge clk); + #0.1; + commit_ack = '0; + endtask + + // A trap with this cause is taken + task automatic take_trap(input logic [XLEN-1:0] cause); + ex.valid = 1; + ex.cause = cause; + @(posedge clk); + #0.1; + ex = '0; + endtask + + function automatic int read_count(); + return int'((tdata1_o >> 10) & XLEN'(14'h3fff)); + endfunction + + // The trigger action is taken: the commit stage raises the exception + task automatic take_fire(); + assert (fire_now()) else $fatal(1, "no fire to take"); + ex.valid = 1; + ex.cause = icount_action; + @(posedge clk); + #0.1; + ex = '0; + // The handler returns + mret = 1; + @(posedge clk); + #0.1; + mret = 0; + endtask + + task automatic check_no_fire(input int n, input string what); + repeat (n) begin + @(posedge clk); + #0.1; + assert (!fire_now()) else $fatal(1, "%s", what); + end + endtask + + initial begin + debug_mode = 0; + priv_lvl = riscv::PRIV_LVL_M; + ex = '0; + mret = 0; + commit_ack = '0; + tdata1_i = '0; + tdata1_we = 0; + repeat (2) @(posedge clk); + #0.1; + rst_n = 1; + + // count=0: the trigger does not fire + write_tdata1(ICOUNT | count(0) | ICOUNT_M); + repeat (4) retire(1); + check_no_fire(4, "count=0 fires"); + assert (!(tdata1_o & PENDING)) else $fatal(1, "count=0 sets pending"); + + // count=1: one instruction at a time retires. After one instruction, the + // trigger fires on the next instruction. The request stays until it is taken. + write_tdata1(ICOUNT | count(1) | ICOUNT_M); + @(posedge clk); + #0.1; + if (TestCfg.NrCommitPorts > 1) + assert (icount_valid && icount_nr == NrW'(1)) else $fatal(1, "count=1 does not limit commit"); + assert (!fire_now()) else $fatal(1, "count=1 fires before an instruction retires"); + retire(1); + @(posedge clk); + #0.1; + repeat (5) begin + assert (fire_now()) else $fatal(1, "pending trigger does not request the fire"); + assert (icount_action == riscv::BREAKPOINT) else $fatal(1, "fire action %0d", icount_action); + @(posedge clk); + #0.1; + end + take_fire(); + check_no_fire(4, "trigger fires twice"); + assert ((tdata1_o & (PENDING | HIT)) == HIT) else $fatal(1, "fire reads %h", tdata1_o); + + // pending is kept in a mode where the trigger is not enabled, and in Debug Mode. + // The trigger fires when the hart is back in an enabled mode. + priv_lvl = riscv::PRIV_LVL_U; + write_tdata1(ICOUNT | count(1) | ICOUNT_U); + retire(1); + priv_lvl = riscv::PRIV_LVL_M; + check_no_fire(4, "trigger fires in a mode that is not enabled"); + debug_mode = 1; + check_no_fire(4, "trigger fires in Debug Mode"); + debug_mode = 0; + assert (tdata1_o & PENDING) else $fatal(1, "pending is lost"); + priv_lvl = riscv::PRIV_LVL_U; + @(posedge clk); + #0.1; + take_fire(); + check_no_fire(4, "trigger fires twice"); + + $display("PASS: icount fires on the next instruction in an enabled mode (XLEN=%0d)", XLEN); + + // The instructions that retire in a mode where the trigger is not enabled, + // or in Debug Mode, do not decrement count + write_tdata1(ICOUNT | count(3) | ICOUNT_U); + priv_lvl = riscv::PRIV_LVL_M; + repeat (4) retire(1); + take_trap(XLEN'(11)); + debug_mode = 1; + repeat (2) retire(1); + debug_mode = 0; + assert (read_count() == 3) else $fatal(1, "count %0d after M-mode instructions", read_count()); + + // One U-mode instruction and the trap from U-mode match. The M-mode handler + // does not match. The trigger fires on the next U-mode instruction. + write_tdata1(ICOUNT | count(2) | ICOUNT_U); + priv_lvl = riscv::PRIV_LVL_U; + retire(1); + assert (read_count() == 1) else $fatal(1, "count %0d after one U-mode instruction", read_count()); + take_trap(XLEN'(8)); + priv_lvl = riscv::PRIV_LVL_M; + assert (tdata1_o & PENDING) else $fatal(1, "the trap from U-mode does not match"); + repeat (3) retire(1); + check_no_fire(2, "trigger fires in the M-mode handler"); + priv_lvl = riscv::PRIV_LVL_U; + @(posedge clk); + #0.1; + take_fire(); + + // A trap does not stop the count. The trap and the instructions of the + // handler match when the trigger is enabled in the mode of the handler. + priv_lvl = riscv::PRIV_LVL_M; + write_tdata1(ICOUNT | count(3) | ICOUNT_M); + take_trap(XLEN'(11)); + retire(1); + assert (read_count() == 1) else $fatal(1, "count %0d in the handler", read_count()); + retire(1); + @(posedge clk); + #0.1; + assert (fire_now()) else $fatal(1, "trigger does not fire in the handler"); + ex.valid = 1; + ex.cause = icount_action; + @(posedge clk); + #0.1; + ex = '0; + + // Two instructions that retire in one cycle are two matches + if (TestCfg.NrCommitPorts > 1) begin + write_tdata1(ICOUNT | count(4) | ICOUNT_M); + retire(2); + assert (read_count() == 2) else $fatal(1, "count %0d after two instructions", read_count()); + end + + $display("PASS: icount matches only in the enabled modes (XLEN=%0d)", XLEN); + $finish; + end +endmodule diff --git a/verif/tb/unit/trigger_loadaddr_test.sv b/verif/tb/unit/trigger_loadaddr_test.sv new file mode 100644 index 00000000000..7407f229c13 --- /dev/null +++ b/verif/tb/unit/trigger_loadaddr_test.sv @@ -0,0 +1,160 @@ +module trigger_loadaddr_test; + function automatic config_pkg::cva6_cfg_t test_config(); + config_pkg::cva6_cfg_t cfg; + cfg = build_config_pkg::build_config(cva6_config_pkg::cva6_cfg); + cfg.Sdtrig = 1; + cfg.SdtrigMcontrol6 = 1; + cfg.SdtrigMcontrol6LoadAddr = 1; + cfg.SdtrigNrTriggers = 2; + cfg.SdtrigSupportedActions = 2'b11; + cfg.SdtrigSupportedMatch = 10'b11_1111_1111; + return cfg; + endfunction + + localparam config_pkg::cva6_cfg_t TestCfg = test_config(); + + typedef struct packed { + logic valid; + logic [63:0] cause; + logic [63:0] tval; + logic [63:0] tval2; + logic [31:0] tinst; + logic gva; + logic timing; + } exception_t; + + logic clk = 0; + logic rst_n = 0; + logic [63:0] tdata1_i = 0; + logic [63:0] tdata2_i = 0; + logic [63:0] tselect_i = 0; + logic tdata1_we = 0; + logic tdata2_we = 0; + logic tselect_we = 0; + logic [63:0] tdata1_o; + logic lsu_valid = 0; + logic [63:0] lsu_vaddr = 0; + logic trigger_cancel; + logic [63:0] trigger_action; + + always #1 clk = !clk; + + trigger_module #( + .CVA6Cfg(TestCfg), + .exception_t(exception_t) + ) dut ( + .clk_i(clk), + .rst_ni(rst_n), + .commit_ack_i('0), + .ex_i('0), + .priv_lvl_i(riscv::PRIV_LVL_M), + .debug_mode_i(1'b0), + .mret_i(1'b0), + .sret_i(1'b0), + .mstatus_mie_i(1'b1), + .mstatus_sie_i(1'b1), + .medeleg_breakpoint_i(1'b0), + .sdtrig_lsu_inputs_vaddr_i(lsu_vaddr), + .sdtrig_lsu_inputs_data_i('0), + .sdtrig_lsu_inputs_fu_i(1'b0), + .sdtrig_lsu_inputs_op_i(ariane_pkg::ADD), + .sdtrig_lsu_inputs_valid_i(lsu_valid), + .sdtrig_load_data_i('0), + .sdtrig_load_valid_i(1'b0), + .scontext_i('0), + .tdata1_i(tdata1_i), + .tdata2_i(tdata2_i), + .tdata3_i('0), + .tselect_i(tselect_i), + .tselect_we(tselect_we), + .tdata1_we(tdata1_we), + .tdata2_we(tdata2_we), + .tdata3_we(1'b0), + .tselect_o(), + .tdata1_o(tdata1_o), + .tdata2_o(), + .tdata3_o(), + .flush_o(), + .mepc_i('0), + .mcause_i('0), + .mtval_i('0), + .etrigger_context_saved_valid_o(), + .etrigger_context_mepc_o(), + .etrigger_context_mcause_o(), + .etrigger_context_mtval_o(), + .fetch_sdtrig_pc_i('0), + .fetch_sdtrig_instr_i('0), + .sdtrig_decoder_action_o(), + .sdtrig_load_stall_o(), + .sdtrig_load_cancel_o(trigger_cancel), + .sdtrig_load_action_o(trigger_action), + .sdtrig_store_stall_o(), + .sdtrig_store_action_o(), + .sdtrig_commit_std_exception_valid_o(), + .sdtrig_commit_icount_valid_o(), + .sdtrig_commit_action_o(), + .sdtrig_commit_icount_nr_instr_o() + ); + + task automatic write_tdata1(input logic [63:0] value); + tdata1_i = value; + tdata1_we = 1; + @(posedge clk); + #1; + tdata1_we = 0; + endtask + + task automatic write_tselect(input logic [63:0] value); + tselect_i = value; + tselect_we = 1; + @(posedge clk); + #1; + tselect_we = 0; + endtask + + task automatic write_tdata2(input logic [63:0] value); + tdata2_i = value; + tdata2_we = 1; + @(posedge clk); + #1; + tdata2_we = 0; + endtask + + initial begin + repeat (2) @(posedge clk); + rst_n = 1; + + write_tselect(0); + write_tdata2(64'h1234); + write_tdata1(64'h6000_0000_0000_0041); + write_tselect(1); + write_tdata2(64'h5678); + write_tdata1(64'h6000_0000_0000_1041); + + lsu_vaddr = 64'h1234; + lsu_valid = 1; + @(posedge clk); + #1; + + assert (trigger_cancel) + else $fatal(1, "LoadAddr match did not produce cancel"); + assert (trigger_action == riscv::BREAKPOINT) + else $fatal(1, "cancel used an unrelated trigger action"); + + lsu_valid = 0; + @(posedge clk); + #1; + assert (!trigger_cancel) + else $fatal(1, "cancel pulse did not clear"); + + write_tselect(0); + assert (tdata1_o[22]) + else $fatal(1, "matching trigger did not record hit0"); + write_tselect(1); + assert (!tdata1_o[22]) + else $fatal(1, "unmatched trigger recorded hit0"); + + $display("PASS: LoadAddr cancel retains its trigger"); + $finish; + end +endmodule diff --git a/verif/tb/unit/trigger_napot_test.sv b/verif/tb/unit/trigger_napot_test.sv new file mode 100644 index 00000000000..f80c2d74f2c --- /dev/null +++ b/verif/tb/unit/trigger_napot_test.sv @@ -0,0 +1,12 @@ +module trigger_napot_test; + import triggers_pkg::*; + + initial begin + assert (napot_match32(32'h0000_0017, 32'h0000_0010)); + assert (napot_match32(32'h0000_0017, 32'h0000_001f)); + assert (!napot_match32(32'h0000_0017, 32'h0000_0020)); + assert (napot_match64(64'h0000_0000_8000_1007, 64'h0000_0000_8000_100f)); + assert (!napot_match64(64'h0000_0000_8000_1007, 64'h0000_0000_8000_1010)); + $finish; + end +endmodule diff --git a/verif/tb/unit/trigger_tdata1_test.sv b/verif/tb/unit/trigger_tdata1_test.sv new file mode 100644 index 00000000000..d015f8d1d93 --- /dev/null +++ b/verif/tb/unit/trigger_tdata1_test.sv @@ -0,0 +1,245 @@ +module trigger_tdata1_test; + timeunit 1ns; timeprecision 1ps; + localparam int unsigned XLEN = cva6_config_pkg::CVA6ConfigXlen; + + typedef struct packed { + logic valid; + logic [XLEN-1:0] cause; + } exception_t; + + function automatic config_pkg::cva6_cfg_t test_config(); + config_pkg::cva6_cfg_t cfg; + cfg = build_config_pkg::build_config(cva6_config_pkg::cva6_cfg); + cfg.Sdtrig = 1; + cfg.SdtrigMcontrol6 = 1; + cfg.SdtrigMcontrol6ExecAddr = 1; + cfg.SdtrigIcount = 1; + cfg.SdtrigEtrigger = 1; + cfg.SdtrigItrigger = 1; + cfg.SdtrigNrTriggers = 4; + cfg.SdtrigSupportedActions = 2'b11; + cfg.SdtrigSupportedMatch = 10'b11_1111_1111; + return cfg; + endfunction + + localparam config_pkg::cva6_cfg_t TestCfg = test_config(); + + logic clk = 0; + logic rst_n = 0; + logic debug_mode; + logic [XLEN-1:0] tdata1_i, tdata2_i, tselect_i; + logic tdata1_we, tdata2_we, tselect_we; + logic [XLEN-1:0] tdata1_o; + logic flush; + logic [TestCfg.NrIssuePorts-1:0][TestCfg.VLEN-1:0] fetch_pc; + logic [XLEN-1:0] decoder_action[TestCfg.NrIssuePorts]; + + always #1 clk = !clk; + + trigger_module #( + .CVA6Cfg(TestCfg), + .exception_t(exception_t) + ) dut ( + .clk_i(clk), + .rst_ni(rst_n), + .commit_ack_i('0), + .ex_i('0), + .priv_lvl_i(riscv::PRIV_LVL_M), + .debug_mode_i(debug_mode), + .mret_i(1'b0), + .sret_i(1'b0), + .mstatus_mie_i(1'b1), + .mstatus_sie_i(1'b1), + .medeleg_breakpoint_i(1'b0), + .sdtrig_lsu_inputs_vaddr_i('0), + .sdtrig_lsu_inputs_data_i('0), + .sdtrig_lsu_inputs_fu_i(1'b0), + .sdtrig_lsu_inputs_op_i(ariane_pkg::ADD), + .sdtrig_lsu_inputs_valid_i(1'b0), + .sdtrig_load_data_i('0), + .sdtrig_load_valid_i(1'b0), + .scontext_i('0), + .tdata1_i(tdata1_i), + .tdata2_i(tdata2_i), + .tdata3_i('0), + .tselect_i(tselect_i), + .tselect_we(tselect_we), + .tdata1_we(tdata1_we), + .tdata2_we(tdata2_we), + .tdata3_we(1'b0), + .tselect_o(), + .tdata1_o(tdata1_o), + .tdata2_o(), + .tdata3_o(), + .flush_o(flush), + .mepc_i('0), + .mcause_i('0), + .mtval_i('0), + .etrigger_context_saved_valid_o(), + .etrigger_context_mepc_o(), + .etrigger_context_mcause_o(), + .etrigger_context_mtval_o(), + .fetch_sdtrig_pc_i(fetch_pc), + .fetch_sdtrig_instr_i('0), + .sdtrig_decoder_action_o(decoder_action), + .sdtrig_load_stall_o(), + .sdtrig_load_cancel_o(), + .sdtrig_load_action_o(), + .sdtrig_store_stall_o(), + .sdtrig_store_action_o(), + .sdtrig_commit_std_exception_valid_o(), + .sdtrig_commit_icount_valid_o(), + .sdtrig_commit_action_o(), + .sdtrig_commit_icount_nr_instr_o() + ); + + function automatic logic [XLEN-1:0] tdata1_type(input logic [3:0] t); + return XLEN'(t) << (XLEN - 4); + endfunction + + localparam logic [XLEN-1:0] DMODE = XLEN'(1) << (XLEN - 5); + localparam logic [XLEN-1:0] DISABLED = XLEN'(15) << (XLEN - 4); + + // Write tdata1. Return the value of flush_o in the write cycle. + task automatic write_tdata1(input logic [XLEN-1:0] value, output logic flushed); + tdata1_i = value; + tdata1_we = 1; + #0.5; + flushed = flush; + @(posedge clk); + #0.1; + tdata1_we = 0; + endtask + + task automatic write_tdata2(input logic [XLEN-1:0] value); + tdata2_i = value; + tdata2_we = 1; + @(posedge clk); + #0.1; + tdata2_we = 0; + endtask + + task automatic write_tselect(input logic [XLEN-1:0] value); + tselect_i = value; + tselect_we = 1; + @(posedge clk); + #0.1; + tselect_we = 0; + endtask + + logic flushed; + + initial begin + debug_mode = 0; + tdata1_i = '0; + tdata2_i = '0; + tselect_i = '0; + tdata1_we = 0; + tdata2_we = 0; + tselect_we = 0; + fetch_pc = '0; + repeat (2) @(posedge clk); + #0.1; + rst_n = 1; + + // After reset, every trigger is disabled (type 15), not "no trigger" (type 0) + for (int i = 0; i < 4; i++) begin + write_tselect(XLEN'(i)); + assert (tdata1_o == DISABLED) + else $fatal(1, "trigger %0d reads %h after reset", i, tdata1_o); + end + write_tselect('0); + + // An execute trigger on 0x80000000 matches the fetched PC + write_tdata2(XLEN'(64'h8000_0000)); + write_tdata1(tdata1_type(4'd6) | XLEN'(32'h44), flushed); + fetch_pc[0] = TestCfg.VLEN'(64'h8000_0000); + #0.5; + assert (decoder_action[0] == riscv::BREAKPOINT) + else $fatal(1, "execute trigger does not match"); + + // A write of 0 disables the trigger: type 15, no match, pipeline flush + write_tdata1('0, flushed); + assert (flushed) else $fatal(1, "a write of 0 does not flush"); + assert (tdata1_o == DISABLED) else $fatal(1, "a write of 0 reads %h", tdata1_o); + #0.5; + assert (decoder_action[0] == '0) else $fatal(1, "disabled trigger still matches"); + + // A write of type 15 reads back as type 15 + write_tdata1(tdata1_type(4'd6) | XLEN'(32'h44), flushed); + write_tdata1(DISABLED | XLEN'(32'h44), flushed); + assert (tdata1_o == DISABLED) else $fatal(1, "a write of type 15 reads %h", tdata1_o); + #0.5; + assert (decoder_action[0] == '0) else $fatal(1, "type 15 trigger matches"); + + // A write of a type that is not supported (2) disables the trigger + write_tdata1(tdata1_type(4'd2) | XLEN'(32'h44), flushed); + assert (tdata1_o == DISABLED) else $fatal(1, "a write of type 2 reads %h", tdata1_o); + + // A write of 0 from Debug Mode keeps dmode=0. A write of type 15 with + // dmode=1 from Debug Mode keeps dmode=1. + debug_mode = 1; + write_tdata1(DISABLED | DMODE, flushed); + assert (tdata1_o == (DISABLED | DMODE)) + else $fatal(1, "type 15 with dmode reads %h", tdata1_o); + // dmode=1 blocks the writes from M-mode + debug_mode = 0; + write_tdata1(tdata1_type(4'd6) | XLEN'(32'h44), flushed); + assert (tdata1_o == (DISABLED | DMODE)) else $fatal(1, "dmode=1 trigger written from M-mode"); + debug_mode = 1; + write_tdata1('0, flushed); + assert (tdata1_o == DISABLED) else $fatal(1, "a write of 0 from Debug Mode reads %h", tdata1_o); + debug_mode = 0; + + // A write from M-mode cannot set dmode. Thus action=1 becomes action=0. + // mcontrol6: action is bits 15:12. icount, etrigger, itrigger: bits 5:0. + write_tdata1(tdata1_type(4'd6) | DMODE | XLEN'(32'h1044), flushed); + assert (tdata1_o == (tdata1_type(4'd6) | XLEN'(32'h44))) + else $fatal(1, "mcontrol6 dmode=1 action=1 from M-mode reads %h", tdata1_o); + #0.5; + assert (decoder_action[0] == riscv::BREAKPOINT) + else $fatal(1, "legalized mcontrol6 does not give a breakpoint"); + write_tdata1(tdata1_type(4'd6) | XLEN'(32'h1044), flushed); + assert (tdata1_o == (tdata1_type(4'd6) | XLEN'(32'h44))) + else $fatal(1, "mcontrol6 dmode=0 action=1 reads %h", tdata1_o); + write_tdata1(tdata1_type(4'd3) | DMODE | XLEN'(32'h1641), flushed); + assert (tdata1_o == (tdata1_type(4'd3) | XLEN'(32'h1640))) + else $fatal(1, "icount action=1 from M-mode reads %h", tdata1_o); + write_tdata1(tdata1_type(4'd5) | XLEN'(32'h241), flushed); + assert (tdata1_o == (tdata1_type(4'd5) | XLEN'(32'h240))) + else $fatal(1, "etrigger action=1 from M-mode reads %h", tdata1_o); + write_tdata1(tdata1_type(4'd4) | XLEN'(32'h241), flushed); + assert (tdata1_o == (tdata1_type(4'd4) | XLEN'(32'h240))) + else $fatal(1, "itrigger action=1 from M-mode reads %h", tdata1_o); + // An action that is not supported (5) becomes 0 + write_tdata1(tdata1_type(4'd5) | XLEN'(32'h245), flushed); + assert (tdata1_o == (tdata1_type(4'd5) | XLEN'(32'h240))) + else $fatal(1, "etrigger action=5 reads %h", tdata1_o); + + // From Debug Mode, dmode=1 keeps action=1. dmode=0 gives action=0. + debug_mode = 1; + write_tdata1(tdata1_type(4'd6) | XLEN'(32'h1044), flushed); + assert (tdata1_o == (tdata1_type(4'd6) | XLEN'(32'h44))) + else $fatal(1, "mcontrol6 dmode=0 action=1 from Debug Mode reads %h", tdata1_o); + write_tdata1(tdata1_type(4'd3) | DMODE | XLEN'(32'h1641), flushed); + assert (tdata1_o == (tdata1_type(4'd3) | DMODE | XLEN'(32'h1641))) + else $fatal(1, "icount dmode=1 action=1 from Debug Mode reads %h", tdata1_o); + write_tdata1(tdata1_type(4'd6) | DMODE | XLEN'(32'h1044), flushed); + assert (tdata1_o == (tdata1_type(4'd6) | DMODE | XLEN'(32'h1044))) + else $fatal(1, "mcontrol6 dmode=1 action=1 from Debug Mode reads %h", tdata1_o); + // A trigger with action=1 requests Debug Mode with the trigger cause, + // not with the cause of a halt request. + debug_mode = 0; + #0.5; + assert (decoder_action[0] == riscv::DEBUG_TRIGGER) + else $fatal(1, "action=1 trigger gives cause %0d", decoder_action[0]); + debug_mode = 1; + write_tdata1('0, flushed); + debug_mode = 0; + + $display("PASS: tdata1 write of 0 disables the trigger (XLEN=%0d)", XLEN); + $display("PASS: tdata1 never holds dmode=0 with action=1 (XLEN=%0d)", XLEN); + $display("PASS: an action=1 trigger requests Debug Mode with the trigger cause (XLEN=%0d)", XLEN); + $finish; + end +endmodule diff --git a/verif/tb/unit/trigger_xtrigger_test.sv b/verif/tb/unit/trigger_xtrigger_test.sv new file mode 100644 index 00000000000..38d8ee8fe49 --- /dev/null +++ b/verif/tb/unit/trigger_xtrigger_test.sv @@ -0,0 +1,287 @@ +module trigger_xtrigger_test; + timeunit 1ns; timeprecision 1ps; + localparam int unsigned XLEN = cva6_config_pkg::CVA6ConfigXlen; + + typedef struct packed { + logic valid; + logic [XLEN-1:0] cause; + } exception_t; + + function automatic config_pkg::cva6_cfg_t test_config(); + config_pkg::cva6_cfg_t cfg; + cfg = build_config_pkg::build_config(cva6_config_pkg::cva6_cfg); + cfg.Sdtrig = 1; + cfg.SdtrigEtrigger = 1; + cfg.SdtrigItrigger = 1; + cfg.SdtrigNrTriggers = 4; + cfg.SdtrigSupportedActions = 2'b11; + return cfg; + endfunction + + localparam config_pkg::cva6_cfg_t TestCfg = test_config(); + + logic clk = 0; + logic rst_n = 0; + logic debug_mode; + riscv::priv_lvl_t priv_lvl; + exception_t ex; + logic mret; + logic [TestCfg.NrCommitPorts-1:0] commit_ack; + logic [XLEN-1:0] tdata1_i, tdata2_i, tselect_i; + logic tdata1_we, tdata2_we, tselect_we; + logic [XLEN-1:0] tdata1_o; + logic fire; + logic [XLEN-1:0] fire_action; + + always #1 clk = !clk; + + trigger_module #( + .CVA6Cfg(TestCfg), + .exception_t(exception_t) + ) dut ( + .clk_i(clk), + .rst_ni(rst_n), + .commit_ack_i(commit_ack), + .ex_i(ex), + .priv_lvl_i(priv_lvl), + .debug_mode_i(debug_mode), + .mret_i(mret), + .sret_i(1'b0), + .mstatus_mie_i(1'b1), + .mstatus_sie_i(1'b1), + .medeleg_breakpoint_i(1'b0), + .sdtrig_lsu_inputs_vaddr_i('0), + .sdtrig_lsu_inputs_data_i('0), + .sdtrig_lsu_inputs_fu_i(1'b0), + .sdtrig_lsu_inputs_op_i(ariane_pkg::ADD), + .sdtrig_lsu_inputs_valid_i(1'b0), + .sdtrig_load_data_i('0), + .sdtrig_load_valid_i(1'b0), + .scontext_i('0), + .tdata1_i(tdata1_i), + .tdata2_i(tdata2_i), + .tdata3_i('0), + .tselect_i(tselect_i), + .tselect_we(tselect_we), + .tdata1_we(tdata1_we), + .tdata2_we(tdata2_we), + .tdata3_we(1'b0), + .tselect_o(), + .tdata1_o(tdata1_o), + .tdata2_o(), + .tdata3_o(), + .flush_o(), + .mepc_i('0), + .mcause_i('0), + .mtval_i('0), + .etrigger_context_saved_valid_o(), + .etrigger_context_mepc_o(), + .etrigger_context_mcause_o(), + .etrigger_context_mtval_o(), + .fetch_sdtrig_pc_i('0), + .fetch_sdtrig_instr_i('0), + .sdtrig_decoder_action_o(), + .sdtrig_load_stall_o(), + .sdtrig_load_cancel_o(), + .sdtrig_load_action_o(), + .sdtrig_store_stall_o(), + .sdtrig_store_action_o(), + .sdtrig_commit_std_exception_valid_o(fire), + .sdtrig_commit_icount_valid_o(), + .sdtrig_commit_action_o(fire_action), + .sdtrig_commit_icount_nr_instr_o() + ); + + function automatic logic [XLEN-1:0] tdata1_type(input logic [3:0] t); + return XLEN'(t) << (XLEN - 4); + endfunction + + localparam logic [XLEN-1:0] DMODE = XLEN'(1) << (XLEN - 5); + localparam logic [XLEN-1:0] INTERRUPT = XLEN'(1) << (XLEN - 1); + localparam logic [XLEN-1:0] XTRIG_M = XLEN'(32'h200); + + task automatic write_csr(input int csr, input logic [XLEN-1:0] value); + case (csr) + 0: begin tselect_i = value; tselect_we = 1; end + 1: begin tdata1_i = value; tdata1_we = 1; end + 2: begin tdata2_i = value; tdata2_we = 1; end + default: ; + endcase + @(posedge clk); + #0.1; + tselect_we = 0; + tdata1_we = 0; + tdata2_we = 0; + endtask + + // A trap with this cause is taken in one cycle + task automatic take_trap(input logic [XLEN-1:0] cause); + ex.valid = 1; + ex.cause = cause; + @(posedge clk); + #0.1; + ex = '0; + endtask + + // The trigger module does not request a fire in the next n cycles + task automatic check_no_fire(input int n, input string what); + repeat (n) begin + @(posedge clk); + #0.1; + assert (!fire) else $fatal(1, "%s", what); + end + endtask + + // The trigger module requests a fire with this action in the next n cycles + task automatic check_fire(input int n, input logic [XLEN-1:0] action, input string what); + logic seen = 0; + repeat (n) begin + @(posedge clk); + #0.1; + if (fire) begin + seen = 1; + assert (fire_action == action) + else $fatal(1, "%s: action %0d, expected %0d", what, fire_action, action); + end + end + assert (seen) else $fatal(1, "%s: no fire", what); + endtask + + // The breakpoint (or the Debug Mode entry) of the fire is taken + task automatic take_fire(input logic [XLEN-1:0] cause); + wait (fire); + take_trap(cause); + check_no_fire(4, "fire is not cleared"); + endtask + + initial begin + debug_mode = 0; + priv_lvl = riscv::PRIV_LVL_M; + ex = '0; + mret = 0; + commit_ack = '0; + tdata1_i = '0; + tdata2_i = '0; + tselect_i = '0; + tdata1_we = 0; + tdata2_we = 0; + tselect_we = 0; + repeat (2) @(posedge clk); + #0.1; + rst_n = 1; + + // etrigger on exception code 0. No trap: ex_i.cause is 0, ex_i.valid is 0. + write_csr(0, 0); + write_csr(2, XLEN'(1)); + write_csr(1, tdata1_type(4'd5) | XTRIG_M); + check_no_fire(8, "etrigger fires with no trap"); + + // etrigger on exception code 7. An interrupt with code 7 does not match. + write_csr(2, XLEN'(1) << 7); + take_trap(INTERRUPT | XLEN'(7)); + check_no_fire(8, "etrigger fires on an interrupt"); + + // A Debug Mode entry is not a trap + write_csr(2, XLEN'(1) << 24); + take_trap(riscv::DEBUG_REQUEST); + check_no_fire(8, "etrigger fires on a halt request"); + + // An exception with code 7 matches. The trigger fires with a breakpoint. + write_csr(2, XLEN'(1) << 7); + take_trap(XLEN'(7)); + check_fire(3, riscv::BREAKPOINT, "etrigger on exception 7"); + take_fire(riscv::BREAKPOINT); + mret = 1; + @(posedge clk); + #0.1; + mret = 0; + + // An exception from S-mode matches a trigger with s=1 + priv_lvl = riscv::PRIV_LVL_S; + write_csr(1, tdata1_type(4'd5) | XLEN'(32'h80)); + take_trap(XLEN'(7)); + check_fire(3, riscv::BREAKPOINT, "etrigger on an exception from S-mode"); + take_fire(riscv::BREAKPOINT); + priv_lvl = riscv::PRIV_LVL_M; + mret = 1; + @(posedge clk); + #0.1; + mret = 0; + + // An exception with code 2 is not selected + write_csr(1, tdata1_type(4'd5) | XTRIG_M); + take_trap(XLEN'(2)); + check_no_fire(8, "etrigger fires on a code that is not selected"); + + // An exception from a mode that is not enabled does not match + priv_lvl = riscv::PRIV_LVL_U; + take_trap(XLEN'(7)); + check_no_fire(8, "etrigger fires on a trap from a mode that is not enabled"); + priv_lvl = riscv::PRIV_LVL_M; + + // Trigger 0 is an etrigger on code 7, trigger 1 an etrigger on code 2. + // Exception 7 fires trigger 0 only. Trigger 1 does not record a hit. + write_csr(1, tdata1_type(4'd5) | XTRIG_M); + write_csr(2, XLEN'(1) << 7); + write_csr(0, 1); + write_csr(1, tdata1_type(4'd5) | XTRIG_M); + write_csr(2, XLEN'(1) << 2); + take_trap(XLEN'(7)); + check_fire(3, riscv::BREAKPOINT, "etrigger 0 on exception 7"); + take_fire(riscv::BREAKPOINT); + assert (tdata1_o[XLEN-6] == 1'b0) else $fatal(1, "etrigger 1 fired on exception 7"); + write_csr(0, 0); + assert (tdata1_o[XLEN-6] == 1'b1) else $fatal(1, "etrigger 0 did not record a hit"); + mret = 1; + @(posedge clk); + #0.1; + mret = 0; + + $display("PASS: etrigger fires only on a selected exception (XLEN=%0d)", XLEN); + + // itrigger on interrupt 7: it fires after the trap, before the first + // instruction of the handler. It does not wait for an mret. + write_csr(1, tdata1_type(4'd4) | XTRIG_M); + write_csr(2, XLEN'(1) << 7); + take_trap(INTERRUPT | XLEN'(7)); + check_fire(3, riscv::BREAKPOINT, "itrigger on interrupt 7"); + take_fire(riscv::BREAKPOINT); + mret = 1; + @(posedge clk); + #0.1; + mret = 0; + + // An exception with code 7 does not match an itrigger + write_csr(1, tdata1_type(4'd4) | XTRIG_M); + take_trap(XLEN'(7)); + check_no_fire(8, "itrigger fires on an exception"); + + // An interrupt taken from S-mode matches an itrigger with s=1 + priv_lvl = riscv::PRIV_LVL_S; + write_csr(1, tdata1_type(4'd4) | XLEN'(32'h80)); + take_trap(INTERRUPT | XLEN'(7)); + check_fire(3, riscv::BREAKPOINT, "itrigger on an interrupt from S-mode"); + take_fire(riscv::BREAKPOINT); + priv_lvl = riscv::PRIV_LVL_M; + mret = 1; + @(posedge clk); + #0.1; + mret = 0; + + // Trigger 0 is an itrigger, trigger 1 is an etrigger, both on code 7. + // An interrupt fires only the itrigger. The etrigger does not record a hit. + write_csr(1, tdata1_type(4'd4) | XTRIG_M); + write_csr(0, 1); + write_csr(1, tdata1_type(4'd5) | XTRIG_M); + write_csr(2, XLEN'(1) << 7); + take_trap(INTERRUPT | XLEN'(7)); + check_fire(3, riscv::BREAKPOINT, "itrigger with an etrigger on the same code"); + take_fire(riscv::BREAKPOINT); + assert (tdata1_o[XLEN-6] == 1'b0) else $fatal(1, "etrigger fired on an interrupt"); + write_csr(0, 0); + assert (tdata1_o[XLEN-6] == 1'b1) else $fatal(1, "itrigger did not record a hit"); + + $display("PASS: itrigger fires before the first instruction of the handler (XLEN=%0d)", XLEN); + $finish; + end +endmodule diff --git a/verif/tb/uvmt/cva6_tb_wrapper.sv b/verif/tb/uvmt/cva6_tb_wrapper.sv index 708267b960e..09b3b8c034e 100644 --- a/verif/tb/uvmt/cva6_tb_wrapper.sv +++ b/verif/tb/uvmt/cva6_tb_wrapper.sv @@ -34,10 +34,13 @@ import uvm_pkg::*; `ifndef DPI_FESVR_SPIKE_UTILS `define DPI_FESVR_SPIKE_UTILS +`ifndef READ_ELF_T +`define READ_ELF_T import "DPI-C" function void read_elf(input string filename); import "DPI-C" function byte read_symbol(input string symbol_name, inout longint unsigned address); import "DPI-C" function byte get_section(output longint address, output longint len); -import "DPI-C" context function read_section_sv(input longint address, inout byte buffer[]); +import "DPI-C" context function void read_section_sv(input longint address, inout byte buffer[]); +`endif `endif module cva6_tb_wrapper import uvmt_cva6_pkg::*; #( @@ -48,6 +51,7 @@ module cva6_tb_wrapper import uvmt_cva6_pkg::*; #( parameter type rvfi_probes_instr_t = logic, parameter type rvfi_probes_csr_t = logic, parameter type rvfi_probes_t = logic, + parameter type rvfi_to_iti_t = logic, // CVXIF Types localparam type readregflags_t = `READREGFLAGS_T(CVA6Cfg), localparam type writeregflags_t = `WRITEREGFLAGS_T(CVA6Cfg), @@ -55,12 +59,12 @@ module cva6_tb_wrapper import uvmt_cva6_pkg::*; #( localparam type hartid_t = `HARTID_T(CVA6Cfg), localparam type x_compressed_req_t = `X_COMPRESSED_REQ_T(CVA6Cfg, hartid_t), localparam type x_compressed_resp_t = `X_COMPRESSED_RESP_T(CVA6Cfg), - localparam type x_issue_req_t = `X_ISSUE_REQ_T(CVA6Cfg, hartit_t, id_t), + localparam type x_issue_req_t = `X_ISSUE_REQ_T(CVA6Cfg, hartid_t, id_t), localparam type x_issue_resp_t = `X_ISSUE_RESP_T(CVA6Cfg, writeregflags_t, readregflags_t), localparam type x_register_t = `X_REGISTER_T(CVA6Cfg, hartid_t, id_t, readregflags_t), localparam type x_commit_t = `X_COMMIT_T(CVA6Cfg, hartid_t, id_t), localparam type x_result_t = `X_RESULT_T(CVA6Cfg, hartid_t, id_t, writeregflags_t), - localparam type cvxif_req_t = `CVXIF_REQ_T(CVA6Cfg, x_compressed_req_t, x_issue_req_t, x_register_req_t, x_commit_t), + localparam type cvxif_req_t = `CVXIF_REQ_T(CVA6Cfg, x_compressed_req_t, x_issue_req_t, x_register_t, x_commit_t), localparam type cvxif_resp_t = `CVXIF_RESP_T(CVA6Cfg, x_compressed_resp_t, x_issue_resp_t, x_result_t), // parameter int unsigned AXI_USER_EN = 0, @@ -88,6 +92,7 @@ module cva6_tb_wrapper import uvmt_cva6_pkg::*; #( rvfi_instr_t [CVA6Cfg.NrCommitPorts-1:0] rvfi_instr; rvfi_probes_t rvfi_probes; + rvfi_to_iti_t rvfi_to_iti; rvfi_csr_t rvfi_csr; assign rvfi_o = rvfi_instr; assign rvfi_csr_o = rvfi_csr; @@ -126,12 +131,14 @@ module cva6_tb_wrapper import uvmt_cva6_pkg::*; #( .rvfi_csr_t(rvfi_csr_t), .rvfi_probes_instr_t(rvfi_probes_instr_t), .rvfi_probes_csr_t(rvfi_probes_csr_t), - .rvfi_probes_t(rvfi_probes_t) + .rvfi_probes_t(rvfi_probes_t), + .rvfi_to_iti_t(rvfi_to_iti_t) ) i_cva6_rvfi ( .clk_i (clk_i), .rst_ni (rst_ni), .rvfi_probes_i(rvfi_probes), .rvfi_instr_o(rvfi_instr), + .rvfi_to_iti_o (rvfi_to_iti), .rvfi_csr_o(rvfi_csr) ); diff --git a/verif/tb/uvmt/uvmt_axi_assert.sv b/verif/tb/uvmt/uvmt_axi_assert.sv index 06097c2e069..319d6e4eaad 100644 --- a/verif/tb/uvmt/uvmt_axi_assert.sv +++ b/verif/tb/uvmt/uvmt_axi_assert.sv @@ -18,7 +18,7 @@ module uvmt_axi_assert#(int HPDCache=2) uvma_axi_ar_assert axi_ar_assert(.axi_assert(axi_assert_if)); - uvma_axi_w_assert axi_w_assert(.axi_assert(axi_assert_if)); + uvma_axi_w_assert #(.CHECK_STROBE(1)) axi_w_assert(.axi_assert(axi_assert_if)); uvma_axi_r_assert axi_r_assert(.axi_assert(axi_assert_if)); diff --git a/verif/tb/uvmt/uvmt_cva6_dut_wrap.sv b/verif/tb/uvmt/uvmt_cva6_dut_wrap.sv index e82e80652aa..5a9f023e269 100644 --- a/verif/tb/uvmt/uvmt_cva6_dut_wrap.sv +++ b/verif/tb/uvmt/uvmt_cva6_dut_wrap.sv @@ -22,6 +22,7 @@ module uvmt_cva6_dut_wrap # ( parameter type rvfi_probes_instr_t = logic, parameter type rvfi_probes_csr_t = logic, parameter type rvfi_probes_t = logic, + parameter type rvfi_to_iti_t = logic, // parameter int unsigned AXI_USER_EN = 0, parameter int unsigned NUM_WORDS = 2**25 @@ -52,6 +53,7 @@ module uvmt_cva6_dut_wrap # ( .rvfi_probes_instr_t(rvfi_probes_instr_t), .rvfi_probes_csr_t ( rvfi_probes_csr_t ), .rvfi_probes_t ( rvfi_probes_t ), + .rvfi_to_iti_t ( rvfi_to_iti_t ), // .AXI_USER_EN (AXI_USER_EN), .NUM_WORDS (NUM_WORDS) diff --git a/verif/tb/uvmt/uvmt_cva6_pkg.sv b/verif/tb/uvmt/uvmt_cva6_pkg.sv index 9641dfc41c4..1a2c14caa8c 100644 --- a/verif/tb/uvmt/uvmt_cva6_pkg.sv +++ b/verif/tb/uvmt/uvmt_cva6_pkg.sv @@ -59,9 +59,9 @@ package uvmt_cva6_pkg; // Base test case `include "uvmt_cva6_test_cfg.sv" `include "uvmt_cva6_base_test.sv" // all testcases should extend from this testcase - //`include "uvmt_cva6_smoke_test.sv" // smoke test has multile XMRs that are illegal according to the LRM + //`include "uvmt_cva6_smoke_test.sv" // smoke test has multiple XMRs that are illegal according to the LRM - // Compilance tests + // Compliance tests `include "uvmt_cva6_firmware_test.sv" endpackage : uvmt_cva6_pkg diff --git a/verif/tb/uvmt/uvmt_cva6_tb.sv b/verif/tb/uvmt/uvmt_cva6_tb.sv index 0bde61c74a3..ce05745c9fd 100644 --- a/verif/tb/uvmt/uvmt_cva6_tb.sv +++ b/verif/tb/uvmt/uvmt_cva6_tb.sv @@ -41,6 +41,7 @@ module uvmt_cva6_tb; localparam type rvfi_instr_t = `RVFI_INSTR_T(CVA6Cfg); localparam type rvfi_csr_elmt_t = `RVFI_CSR_ELMT_T(CVA6Cfg); localparam type rvfi_csr_t = `RVFI_CSR_T(CVA6Cfg, rvfi_csr_elmt_t); + localparam type rvfi_to_iti_t = `RVFI_TO_ITI_T(CVA6Cfg); // RVFI PROBES localparam type rvfi_probes_instr_t = `RVFI_PROBES_INSTR_T(CVA6Cfg); @@ -120,6 +121,7 @@ module uvmt_cva6_tb; .rvfi_probes_instr_t(rvfi_probes_instr_t ), .rvfi_probes_csr_t ( rvfi_probes_csr_t ), .rvfi_probes_t ( rvfi_probes_t ), + .rvfi_to_iti_t ( rvfi_to_iti_t ), // .AXI_USER_EN (CVA6Cfg.AXI_USER_EN), .NUM_WORDS (NUM_WORDS) diff --git a/verif/tests/custom/CSR/csr_access_tests/readme.md b/verif/tests/custom/CSR/csr_access_tests/readme.md index e3b22ca98f0..f63526c5f1a 100644 --- a/verif/tests/custom/CSR/csr_access_tests/readme.md +++ b/verif/tests/custom/CSR/csr_access_tests/readme.md @@ -2,8 +2,8 @@ Highlights: This directory includes test programs for the RISCV CVA6 CSR Access, which are divided into Machine read-write, Machine read-only, Supervisor read-write, and Machine Mode counter CSR tests. -1.Each CSR access has been verified in all priviliged modes(M,S and U). +1.Each CSR access has been verified in all privilege modes(M,S and U). -2.The behavior of counter CSRs has been verified in all priviliged modes (M,S and U). +2.The behavior of counter CSRs has been verified in all privilege modes (M,S and U). 3.Checked the behavior of the RISC-V Machine mode counter CSRs when it reaches to maximum value. diff --git a/verif/tests/custom/CSR/csr_access_yaml/cv32a6_m_rw_csr_test.yaml b/verif/tests/custom/CSR/csr_access_yaml/cv32a6_m_rw_csr_test.yaml index 0dac6a3bdef..9964660f295 100644 --- a/verif/tests/custom/CSR/csr_access_yaml/cv32a6_m_rw_csr_test.yaml +++ b/verif/tests/custom/CSR/csr_access_yaml/cv32a6_m_rw_csr_test.yaml @@ -72,7 +72,7 @@ lsb: 15 - field_name: FS description: > - use to reduce the cost of context save and restore by setting and tracking the current state + use to reduce the cost of context save and restore by setting and tracking the current state type: RW reset_val: 0 msb: 14 @@ -492,7 +492,7 @@ lsb: 1 - field_name: USIE description: > - enable U-mode software interrrupts + enable U-mode software interrupts type: R reset_val: 0 msb: 0 @@ -716,7 +716,7 @@ lsb: 1 - field_name: USIE description: > - enable U-mode software interrrupts + enable U-mode software interrupts type: R reset_val: 0 msb: 0 diff --git a/verif/tests/custom/CSR/csr_access_yaml/cv32a6_s_rw_csr_test.yaml b/verif/tests/custom/CSR/csr_access_yaml/cv32a6_s_rw_csr_test.yaml index c6d4cd7e96e..3e4a7806b78 100644 --- a/verif/tests/custom/CSR/csr_access_yaml/cv32a6_s_rw_csr_test.yaml +++ b/verif/tests/custom/CSR/csr_access_yaml/cv32a6_s_rw_csr_test.yaml @@ -51,7 +51,7 @@ lsb: 15 - field_name: FS description: > - Floationd point State + Floating point State type: RW reset_val: 0 msb: 14 @@ -79,7 +79,7 @@ lsb: 6 - field_name: SPIE description: > - The SPIE bit indicates whether supervisor interrupts were enabled prior to trappin into supervisor mode. + The SPIE bit indicates whether supervisor interrupts were enabled prior to trapping into supervisor mode. type: RW reset_val: 0 msb: 5 @@ -248,7 +248,7 @@ - csr: CSR_SSCRATCH description: > - Scartch Register for supervisor trap handlers + Scratch Register for supervisor trap handlers address: 0x140 privilege_mode: S rv32: @@ -373,7 +373,7 @@ lsb: 1 - field_name: USIP description: > - A user-level software interrupt is triggered on the current hart by riting 1 to its user software interrupt-pending (USIP) bit + A user-level software interrupt is triggered on the current hart by writing 1 to its user software interrupt-pending (USIP) bit type: R reset_val: 0 msb: 0 diff --git a/verif/tests/custom/ITI/iti_asm.S b/verif/tests/custom/ITI/iti_asm.S new file mode 100644 index 00000000000..de4e8674f3c --- /dev/null +++ b/verif/tests/custom/ITI/iti_asm.S @@ -0,0 +1,35 @@ +// Copyright (c) 2025 Thales DIS design services SAS +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +// Author: Maxime Colson - Thales +// Date: 20/03/2025 +// Contributors: +// Darshak Sheladiya, SYSGO GmbH +// Umberto Laghi, UNIBO + +.section .text +.align 1 +.align 4 +.global branch_test +.type branch_test, @function + + +branch_test: + li x12,10 + loop: + bne x13,x13, branch_test + bne x13,x13, branch_test + bne x13,x13, branch_test + bne x13,x13, branch_test + la x11, branch_test + lw x10, 0(x11) + bne x13,x13, branch_test + bne x13,x13, branch_test + bne x13,x13, branch_test + bne x13,x13, branch_test + bne x13,x13, branch_test + bne x13,x13, branch_test + addi x12,x12, -1 + bne x12, x0, loop + + + jalr x0,0(ra) diff --git a/verif/tests/custom/ITI/test_iti_asm.c b/verif/tests/custom/ITI/test_iti_asm.c new file mode 100644 index 00000000000..bbb506395ef --- /dev/null +++ b/verif/tests/custom/ITI/test_iti_asm.c @@ -0,0 +1,16 @@ +// Copyright (c) 2025 Thales DIS design services SAS +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +// Author: Maxime Colson - Thales +// Date: 20/03/2025 +// Contributors: +// Darshak Sheladiya, SYSGO GmbH +// Umberto Laghi, UNIBO + +//This test will be improved by taking into account other scenarios + +void branch_test(); + +int main(int argc, char* arg[]) { + branch_test(); + return 0; +} diff --git a/verif/tests/custom/ITI/test_iti_asm.o b/verif/tests/custom/ITI/test_iti_asm.o new file mode 100755 index 00000000000..3aeb07aa9ae Binary files /dev/null and b/verif/tests/custom/ITI/test_iti_asm.o differ diff --git a/verif/tests/custom/Zcmp/cm_mva01s_equal_regs_test.S b/verif/tests/custom/Zcmp/cm_mva01s_equal_regs_test.S new file mode 100644 index 00000000000..ee076ccc5b1 --- /dev/null +++ b/verif/tests/custom/Zcmp/cm_mva01s_equal_regs_test.S @@ -0,0 +1,33 @@ +#include "riscv_test.h" + +RVTEST_RV32U +RVTEST_CODE_BEGIN + + li s1, 9 + .2byte 0xace6 # cm.mva01s s1, s1 + + bne a0, s1, failure + bne a1, s1, failure + + j success +failure: + li x1, 1 + slli x1, x1, 1 + addi x1, x1, 1 + sw x1, tohost, t5 + self_loop_2: j self_loop_2 + +success: + li x1, 0 + slli x1, x1, 1 + addi x1, x1, 1 + sw x1, tohost, t5 + self_loop: j self_loop + +RVTEST_CODE_END + +.data + +RVTEST_DATA_BEGIN + +RVTEST_DATA_END diff --git a/verif/tests/custom/Zcmp/cm_reserved_rlist_test.S b/verif/tests/custom/Zcmp/cm_reserved_rlist_test.S new file mode 100644 index 00000000000..b64a7546fef --- /dev/null +++ b/verif/tests/custom/Zcmp/cm_reserved_rlist_test.S @@ -0,0 +1,72 @@ +#include "riscv_test.h" + +RVTEST_RV32U +RVTEST_CODE_BEGIN + + # Count the number of expected illegal-instruction traps. + li s0, 0 + + # Zcmp reserves rlist values 0 through 3 for the + # cm.push/cm.pop/cm.popretz/cm.popret instruction families. + # + # rlist occupies bits [7:4]. + # spimm is kept at zero because this test targets rlist legality. + + # cm.push, rlist = 0..3 + .2byte 0xb802 + .2byte 0xb812 + .2byte 0xb822 + .2byte 0xb832 + + # cm.pop, rlist = 0..3 + .2byte 0xba02 + .2byte 0xba12 + .2byte 0xba22 + .2byte 0xba32 + + # cm.popretz, rlist = 0..3 + .2byte 0xbc02 + .2byte 0xbc12 + .2byte 0xbc22 + .2byte 0xbc32 + + # cm.popret, rlist = 0..3 + .2byte 0xbe02 + .2byte 0xbe12 + .2byte 0xbe22 + .2byte 0xbe32 + + # Every reserved instruction above must have trapped. + li t0, 16 + bne s0, t0, failure + + RVTEST_PASS + +failure: + li TESTNUM, 1 + RVTEST_FAIL + +mtvec_handler: + # Only illegal-instruction exceptions are expected. + csrr t0, mcause + li t1, CAUSE_ILLEGAL_INSTRUCTION + bne t0, t1, failure + + # Record this expected trap. + addi s0, s0, 1 + + # Every injected instruction is a 16-bit compressed instruction. + # Advance mepc so execution continues at the following encoding. + csrr t0, mepc + addi t0, t0, 2 + csrw mepc, t0 + + mret + +RVTEST_CODE_END + +.data + +RVTEST_DATA_BEGIN + +RVTEST_DATA_END diff --git a/verif/tests/custom/common/syscalls.c b/verif/tests/custom/common/syscalls.c index e19e3cd5bc8..045f35c4d1b 100644 --- a/verif/tests/custom/common/syscalls.c +++ b/verif/tests/custom/common/syscalls.c @@ -15,6 +15,8 @@ extern volatile uint64_t tohost; extern volatile uint64_t fromhost; +register void *thread_pointer asm("tp"); + // tohost is 64 bits wide, irrespective of XLEN. The structure expected in Spike is: // - tohost[63:56] == device (syscall: 0) // - tohost[55:48] == command (syscall: 0) @@ -134,7 +136,6 @@ int __attribute__((weak)) main(int argc, char** argv) static void init_tls() { - register void* thread_pointer asm("tp"); extern char _tdata_begin, _tdata_end, _tbss_end; size_t tdata_size = &_tdata_end - &_tdata_begin; memcpy(thread_pointer, &_tdata_begin, tdata_size); diff --git a/verif/tests/custom/coremark/coremark_main.c b/verif/tests/custom/coremark/coremark_main.c index 5ae1331fa67..d2ba3dd6204 100644 --- a/verif/tests/custom/coremark/coremark_main.c +++ b/verif/tests/custom/coremark/coremark_main.c @@ -281,6 +281,7 @@ for (i = 0; i < MULTITHREAD; i++) divisor = 1; results[0].iterations *= 1 + 10 / divisor; } + iterate(&results[0]); /* perform actual benchmark */ start_time(); #if (MULTITHREAD > 1) diff --git a/verif/tests/custom/coremark/uart.h b/verif/tests/custom/coremark/uart.h index 6505c6bb0e5..03045ec20b9 100644 --- a/verif/tests/custom/coremark/uart.h +++ b/verif/tests/custom/coremark/uart.h @@ -16,7 +16,7 @@ #define UART_DLAB_LSB UART_BASE + 0 #define UART_DLAB_MSB UART_BASE + 4 -void init_uart(); +void init_uart(uint32_t freq, uint32_t baud); void print_uart(const char* str); diff --git a/verif/tests/custom/dcache_csr_test/dcache_csr_test.c b/verif/tests/custom/dcache_csr_test/dcache_csr_test.c new file mode 100644 index 00000000000..be5b4752018 --- /dev/null +++ b/verif/tests/custom/dcache_csr_test/dcache_csr_test.c @@ -0,0 +1,118 @@ +// vim: ts=4 : sts=4 : sw=4 : et +/* +** Copyright 2026 Inria, Universite Grenoble-Alpes +** +** Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** https://solderpad.org/licenses/ +** +** Unless required by applicable law or agreed to in writing, software +** 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. +*/ +/* +** Author: Cesar Fuguet - Inria, Univ. Grenoble-Alpes +**/ +#include +#include + +static const unsigned int TEST_TIMEOUT = 10000; + +/* DCACHE CSR + * XLEN-1 XLEN-2 XLEN-3 .. 28 27 .. 24 23 .. 20 + * ----------------------------------------------------------------------- + * eccPresent | eccScrubberPresent | RESERVED | dirCorErr | dirUncErr + * ----------------------------------------------------------------------- + * + * 19 .. 16 15 .. 12 11 .. 8 7 .. 2 1 0 + * ----------------------------------------------------------------------- + * datCorErr | datUncErr | scrubCycles | scrubPeriod | scrubEn | cacheEn + * ----------------------------------------------------------------------- + */ +static const unsigned int CSR_DCACHE = 0x7c1u; + +#define __csr_rw(opcode, val) ({ \ + register uintptr_t ret; \ + asm volatile( \ + #opcode " %[rd], %[rs1], %[rs2]\n" \ + : [rd]"=r"(ret) \ + : [rs1]"i"(CSR_DCACHE), [rs2]"r"(val) \ + : "memory"); \ + ret; \ + }) + +static inline uintptr_t csr_dcache_read_wr(uintptr_t val) +{ + return __csr_rw(csrrw, val); +} + +static inline uintptr_t csr_dcache_read_set(uintptr_t mask) +{ + return __csr_rw(csrrs, mask); +} + +static inline uintptr_t csr_dcache_read_clr(uintptr_t mask) +{ + return __csr_rw(csrrc, mask); +} + + +static int testScrubPeriod(int period, int max_cycles) +{ + // program scrubEn and scrubPeriod (clear then set) + csr_dcache_read_clr(0x7f << 1); + csr_dcache_read_clr(0xf << 8); // clear scrubCycles counter + csr_dcache_read_set((period << 2) | 0x2); + + // wait for a given number of scrub cycles + int ret = 1; + for (int i = 0; i < TEST_TIMEOUT; i++) { + uintptr_t scrubCycles; + uintptr_t tmp = csr_dcache_read_set(0); + scrubCycles = (tmp >> 8) & 0xf; + if (scrubCycles >= max_cycles) { + ret = 0; + break; + } + } + csr_dcache_read_clr(0x2); // disable scrubber + return ret; +} + +int main(int argc, char* arg[]) +{ + int scrubPeriod; // Power of two value (2**N) -> 32 if period=5 + const int xlen = sizeof(uintptr_t) * 8; + uintptr_t tmp; + int ret = 0; + + printf("[BEG] Test DCACHE CSR\n"); + tmp = csr_dcache_read_set(0); + + // check that eccPresent bit is set + if (((tmp >> (xlen - 1)) & 0x1) == 0) { + printf("[WARNING] DCACHE ECC not supported\n"); + goto exitTest; + } + + // check that eccScrubberPresent bit is set + if (((tmp >> (xlen - 2)) & 0x1) == 0) { + printf("[WARNING] DCACHE Scrubbing mechanism not supported\n"); + goto exitTest; + } + + // start tests + printf("Enabling scrubbing (period=%d)\n", scrubPeriod); + ret = testScrubPeriod(5/*32*/, 3); + if (ret > 0) goto exitTest; + ret = testScrubPeriod(4/*16*/, 5); + +exitTest: + if (ret > 0) printf("[FAILURE] Test DCACHE CSR\n"); + else printf("[SUCCESS] Test DCACHE CSR\n"); + return ret; +} diff --git a/verif/tests/custom/debug_test/debug_test.c b/verif/tests/custom/debug_test/debug_test.c index 5111d735c41..084072d32c1 100644 --- a/verif/tests/custom/debug_test/debug_test.c +++ b/verif/tests/custom/debug_test/debug_test.c @@ -495,7 +495,7 @@ int main(int argc, char *argv[]) glb_expect_irq_entry = 1; glb_hart_status = 20; DEBUG_REQ_CONTROL_REG = debug_req_control.bits; - // 170 halts on first instuction in interrupt handler + // 170 halts on first instruction in interrupt handler // 175 gives same timing for interrupt and debug_req_i mm_ram_assert_irq(0x40000000, 175+20); diff --git a/verif/tests/custom/dhrystone/dhrystone_main.c b/verif/tests/custom/dhrystone/dhrystone_main.c index 9c7bcf544ff..038a7d4f0a0 100644 --- a/verif/tests/custom/dhrystone/dhrystone_main.c +++ b/verif/tests/custom/dhrystone/dhrystone_main.c @@ -28,7 +28,7 @@ char Ch_1_Glob, int Arr_1_Glob [50]; int Arr_2_Glob [50] [50]; -Enumeration Func_1 (); +Enumeration Func_1 (Capital_Letter, Capital_Letter); /* forward declaration necessary since Enumeration may not simply be int */ #ifndef REG diff --git a/verif/tests/custom/hgatp_warl/hgatp_mode_warl.S b/verif/tests/custom/hgatp_warl/hgatp_mode_warl.S new file mode 100644 index 00000000000..3596e2bf836 --- /dev/null +++ b/verif/tests/custom/hgatp_warl/hgatp_mode_warl.S @@ -0,0 +1,55 @@ +#include "riscv_test.h" +#include "test_macros.h" + +.option arch, +h + +#define CSR_HGATP 0x680 +#define HGATP_MODE_SV39X4 8 +#define HGATP_MODE_UNSUPPORTED 1 + +RVTEST_RV64M +RVTEST_CODE_BEGIN + + li TESTNUM, 1 + + # Install an initial legal value: + # MODE = Sv39x4 + # PPN = 0x100 + li t0, HGATP_MODE_SV39X4 + slli t0, t0, 60 + ori t0, t0, 0x100 + + csrw CSR_HGATP, t0 + csrr t1, CSR_HGATP + + bne t1, t0, fail + + li TESTNUM, 2 + + # Write an unsupported MODE with a different PPN. + # MODE must be legalized, but PPN must still update. + li t2, HGATP_MODE_UNSUPPORTED + slli t2, t2, 60 + ori t2, t2, 0x200 + + csrw CSR_HGATP, t2 + csrr t3, CSR_HGATP + + # Expected: + # MODE remains Sv39x4 + # PPN changes to 0x200 + li t4, HGATP_MODE_SV39X4 + slli t4, t4, 60 + ori t4, t4, 0x200 + + bne t3, t4, fail + + j pass + + TEST_PASSFAIL + +RVTEST_CODE_END + +RVTEST_DATA_BEGIN + TEST_DATA +RVTEST_DATA_END diff --git a/verif/tests/custom/hlvx_gstage/hlvx_gstage_repro.S b/verif/tests/custom/hlvx_gstage/hlvx_gstage_repro.S new file mode 100644 index 00000000000..3dd80950c44 --- /dev/null +++ b/verif/tests/custom/hlvx_gstage/hlvx_gstage_repro.S @@ -0,0 +1,252 @@ +# See LICENSE for license details. + +#***************************************************************************** +# hlvx_gstage_repro.S +#----------------------------------------------------------------------------- +# +# Reproducer for the HLVX permission rule being applied to the G-stage check +# on a VS-stage page-table read (core/cva6_mmu/cva6_ptw.sv, data-path +# permission test). +# +# During a two-stage walk, when the PTW is at G_INTERMED_STAGE it is +# G-stage-translating the guest physical address of a VS-stage page table. +# That access is an IMPLICIT LOAD, so it requires pte.r and must NOT require +# pte.x. The data-path permission test applies hlvx_inst_i unconditionally, +# which switches the pte.r term off and makes pte.x mandatory, so an HLVX +# access faults on any G-stage mapping of guest page-table memory that is +# R=1, X=0. The instruction path just above already carries the stage +# condition. +# +# Mapping under test: +# G-stage : identity 4 KiB leaves over [DRAM_BASE, DRAM_BASE + 2 MiB), +# V R W X U A D everywhere, EXCEPT the three pages holding +# vs_root / vs_l1 / vs_l0, which are V R W U A D (X=0). +# That is the normal W^X hypervisor mapping: guest page tables +# are data, not code. +# VS-stage : GVA 0x1000 -> GPA target_page, V R W X A D (U=0, SPVP=1). +# +# The target page is executable at BOTH stages, so HLVX is legal here. The +# only non-executable pages in the whole setup are the guest's own page +# tables, which no correct implementation should require to be executable. +# +# probe 1 (control) : hlv.d t1, (0x1000) -- uses the pte.r term, must pass +# hfence.vvma / hfence.gvma / sfence.vma -- force a FRESH walk +# probe 2 : hlvx.hu t2, (0x1000) -- same address, same tables +# +# GSTAGE_PT_EXEC variant: identical program with PTE_X added to the G-stage +# leaves that map vs_root / vs_l1 / vs_l0. It must pass on unmodified RTL, +# which isolates the X bit on the guest page tables as the only variable. +# +# tohost = 21 (TESTNUM 21) is the defect: probe 2 took a LOAD_GUEST_PAGE_FAULT. +# Any other trap reports its own mcause as tohost. +# + +#include "riscv_test.h" +#include "test_macros.h" + +.option arch, +h + +#define CSR_HSTATUS 0x600 +#define CSR_VSSTATUS 0x200 +#define CSR_VSATP 0x280 +#define CSR_HEDELEG 0x602 +#define CSR_HGATP 0x680 + +#define HGATP_MODE_SV39X4 8 +#define HSTATUS_SPVP (1 << 8) +#define CAUSE_LOAD_GUEST_PAGE_FAULT 21 + +#define GVA_TARGET 0x1000 +#define TARGET_VALUE 0x00c0ffee0badf00d + +/* Ordinary G-stage leaf: identity, executable. */ +#define G_LEAF (PTE_V | PTE_R | PTE_W | PTE_X | PTE_U | PTE_A | PTE_D) + +/* G-stage leaf for the pages that HOLD the VS-stage page tables. */ +#ifdef GSTAGE_PT_EXEC +# define G_LEAF_PT (PTE_V | PTE_R | PTE_W | PTE_X | PTE_U | PTE_A | PTE_D) +#else +# define G_LEAF_PT (PTE_V | PTE_R | PTE_W | PTE_U | PTE_A | PTE_D) +#endif + +/* VS-stage leaf: readable AND executable, so HLVX is legal at the VS stage. */ +#define VS_LEAF (PTE_V | PTE_R | PTE_W | PTE_X | PTE_A | PTE_D) + +/* Map the 4 KiB page holding \sym in g_l0 with G_LEAF_PT (X=0 by default). */ +.macro GMAP_PT sym + la t0, \sym + srli t1, t0, 12 /* PPN of the page holding the table */ + slli t2, t1, 10 + li t3, G_LEAF_PT + or t2, t2, t3 /* the PTE */ + li t3, (DRAM_BASE >> 12) + sub t1, t1, t3 /* page index within the mapped 2 MiB */ + slli t1, t1, 3 + la t3, g_l0 + add t1, t3, t1 + sd t2, 0(t1) +.endm + +/* tmp0 = PTE pointing at \sym's page, with permission bits \perm. */ +.macro PTE_FOR sym, perm + la t0, \sym + srli t0, t0, 12 + slli t0, t0, 10 + li t1, \perm + or t0, t0, t1 +.endm + +RVTEST_RV64M +RVTEST_CODE_BEGIN + + csrw CSR_HEDELEG, zero + csrw medeleg, zero + + # ------------------------------------------------------------------ + # G-stage l0: identity 4 KiB leaves over [DRAM_BASE, DRAM_BASE + 2 MiB). + # Everything the guest touches is inside this window. + # ------------------------------------------------------------------ + la a4, g_l0 + li a5, DRAM_BASE + li a6, 0 +1: + slli t0, a6, 12 + add t0, t0, a5 /* physical address of this page */ + srli t1, t0, 12 + slli t1, t1, 10 + li t2, G_LEAF + or t1, t1, t2 + slli t2, a6, 3 + add t2, a4, t2 + sd t1, 0(t2) + addi a6, a6, 1 + li t0, 512 + blt a6, t0, 1b + + # ------------------------------------------------------------------ + # The three pages holding the VS-stage tables are DATA: X=0. + # This is the only thing the control variant changes. + # ------------------------------------------------------------------ + GMAP_PT vs_root + GMAP_PT vs_l1 + GMAP_PT vs_l0 + + # ---- G-stage upper levels: g_root[GPA[40:30]] -> g_l1[GPA[29:21]] -> g_l0 + PTE_FOR g_l0, PTE_V + la t2, g_l1 + li t3, ((DRAM_BASE >> 21) & 0x1ff) + slli t3, t3, 3 + add t2, t2, t3 + sd t0, 0(t2) + + PTE_FOR g_l1, PTE_V + la t2, g_root + li t3, (DRAM_BASE >> 30) /* Sv39x4 root index, 2048 entries */ + slli t3, t3, 3 + add t2, t2, t3 + sd t0, 0(t2) + + # ---- VS-stage (Sv39): GVA_TARGET -> target_page. VPN2 = VPN1 = 0. + PTE_FOR vs_l1, PTE_V + la t2, vs_root + sd t0, (((GVA_TARGET >> 30) & 0x1ff) * 8)(t2) + + PTE_FOR vs_l0, PTE_V + la t2, vs_l1 + sd t0, (((GVA_TARGET >> 21) & 0x1ff) * 8)(t2) + + /* GPA == PA here, because the G-stage window is an identity map. */ + PTE_FOR target_page, VS_LEAF + la t2, vs_l0 + sd t0, (((GVA_TARGET >> 12) & 0x1ff) * 8)(t2) + + # ---- turn translation on + la t0, g_root + srli t0, t0, 12 + li t1, HGATP_MODE_SV39X4 + slli t1, t1, 60 + or t0, t0, t1 + csrw CSR_HGATP, t0 + + la t0, vs_root + srli t0, t0, 12 + li t1, SATP_MODE_SV39 + slli t1, t1, 60 + or t0, t0, t1 + csrw CSR_VSATP, t0 + + li t0, HSTATUS_SPVP /* HLV/HLVX run at effective privilege S */ + csrw CSR_HSTATUS, t0 + csrw CSR_VSSTATUS, zero /* vsstatus.MXR = 0 */ + li t0, SSTATUS_MXR + csrc sstatus, t0 /* sstatus.MXR = 0 */ + sfence.vma + hfence.gvma + hfence.vvma + + # ================================================================== + # probe 1 (control): ordinary guest load. Uses the pte.r term at every + # stage, so it is unaffected by the defect. Any trap here is a setup + # problem, not a result. + # ================================================================== + li TESTNUM, 1 + li a0, GVA_TARGET + hlv.d t1, (a0) + li t0, TARGET_VALUE + bne t1, t0, fail + + # Force a fresh walk: no DTLB or G-stage entry may survive into probe 2. + hfence.vvma + hfence.gvma + sfence.vma + + # ================================================================== + # probe 2: same address, same tables, HLVX. The target page is + # executable at both stages, so this must retire. + # ================================================================== + li TESTNUM, 2 + li t2, 0 + hlvx.hu t2, (a0) + li t0, (TARGET_VALUE & 0xffff) + bne t2, t0, fail + j pass + + TEST_PASSFAIL + + .align 2 + .global mtvec_handler +mtvec_handler: + csrr t5, mcause + li t6, 2 + bne TESTNUM, t6, 1f + li t6, CAUSE_LOAD_GUEST_PAGE_FAULT + bne t5, t6, 1f + li TESTNUM, 21 /* THE DEFECT: HLVX faulted on the */ + j fail /* G-stage read of a VS page table */ +1: + mv TESTNUM, t5 /* anything else: report the cause */ + j fail + +RVTEST_CODE_END + + .data +RVTEST_DATA_BEGIN + TEST_DATA + +.align 12 +vs_root: .fill 512, 8, 0 +.align 12 +vs_l1: .fill 512, 8, 0 +.align 12 +vs_l0: .fill 512, 8, 0 +.align 14 +g_root: .fill 2048, 8, 0 /* 16 KiB Sv39x4 root */ +.align 12 +g_l1: .fill 512, 8, 0 +.align 12 +g_l0: .fill 512, 8, 0 +.align 12 +target_page: + .dword TARGET_VALUE + .fill 511, 8, 0 +RVTEST_DATA_END diff --git a/verif/tests/custom/issues/decoder-zip-unzip-rv64.S b/verif/tests/custom/issues/decoder-zip-unzip-rv64.S new file mode 100644 index 00000000000..da3a7a2526f --- /dev/null +++ b/verif/tests/custom/issues/decoder-zip-unzip-rv64.S @@ -0,0 +1,35 @@ +# SUCCESS(a0=0) iff BOTH zip (0x08f31293) and unzip (0x08f35293) trap with +# mcause==2 on RV64. FAIL if either retires (bug) or wrong cause. + .section .text + .align 2 + .option norvc + .globl main +main: + la t0, th + csrw mtvec, t0 + csrw medeleg, zero + li s1, 0 # 0 = expecting zip trap, 1 = expecting unzip trap + .word 0x08f31293 # zip x5,x6 + li a0, 10 # retired -> bug + j fin +phase1: + li s1, 1 + .word 0x08f35293 # unzip x5,x6 + li a0, 11 # retired -> bug + j fin + .align 2 +th: + csrr t0, mcause + li t1, 2 + bne t0, t1, wc + bnez s1, pass_all # unzip trapped correctly -> done + la t1, phase1 + csrw mepc, t1 + mret +pass_all: + li a0, 0 + j fin +wc: + ori a0, t0, 0x40 +fin: + jal exit diff --git a/verif/tests/custom/issues/fcvt-rv64-only-rv32.S b/verif/tests/custom/issues/fcvt-rv64-only-rv32.S new file mode 100644 index 00000000000..289f5b8882e --- /dev/null +++ b/verif/tests/custom/issues/fcvt-rv64-only-rv32.S @@ -0,0 +1,97 @@ +# Copyright 2026 +# +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 + +.section .text + +.globl main +main: + la t0, trap_count + sw zero, 0(t0) + + # Legal RV32 F conversions. These must not trap. + # + # fcvt.w.s x0, f0 + .word 0xc0000053 + + # fcvt.wu.s x0, f0 + .word 0xc0100053 + + # fcvt.s.w f0, x0 + .word 0xd0000053 + + # fcvt.s.wu f0, x0 + .word 0xd0100053 + + # RV64-only conversions. Each must raise an + # illegal-instruction exception when XLEN=32. + # +rv64_only_begin: + # fcvt.l.s x0, f0 + .word 0xc0200053 + + # fcvt.lu.s x0, f0 + .word 0xc0300053 + + # fcvt.s.l f0, x0 + .word 0xd0200053 + + # fcvt.s.lu f0, x0 + .word 0xd0300053 + + # Exactly the four RV64-only instructions above + # must have trapped. + la t0, trap_count + lw t1, 0(t0) + li t2, 4 + bne t1, t2, failure + + li a0, 0 + ret + +failure: + li a0, 1 + ret + + +.globl handle_trap +handle_trap: + # crt.S passes: + # a0 = mcause + # a1 = mepc + # + # Only illegal-instruction exceptions are expected. + li t0, 2 + bne a0, t0, unexpected_trap + + la t0, trap_count + lw t1, 0(t0) + + # Reject extra traps and traps from any other instruction. + li t2, 4 + bgeu t1, t2, unexpected_trap + + # The four expected instructions occupy consecutive 4-byte slots. + la t2, rv64_only_begin + slli t3, t1, 2 + add t2, t2, t3 + bne a1, t2, unexpected_trap + + addi t1, t1, 1 + sw t1, 0(t0) + + # Skip the injected 32-bit instruction. + addi a0, a1, 4 + ret + +unexpected_trap: + # Resume at the failure path. + la a0, failure + ret + + +.section .data +.align 2 + +trap_count: + .word 0 diff --git a/verif/tests/custom/issues/htval-mtval2-warl-rv64.S b/verif/tests/custom/issues/htval-mtval2-warl-rv64.S new file mode 100644 index 00000000000..c3f519cad64 --- /dev/null +++ b/verif/tests/custom/issues/htval-mtval2-warl-rv64.S @@ -0,0 +1,65 @@ +# Copyright 2026 Keerthivasan +# +# Licensed under the Solderpad Hardware Licence, Version 2.0. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# +# Regression test for CVA6 issue #3537. +# +# On RV64 Sv39x4, guest physical addresses are 41 bits. htval and +# mtval2 store the guest physical address shifted right by two, so +# only bits [38:0] of these CSRs are meaningful. + + .section .text + .align 2 + + .equ CSR_MTVAL2, 0x34b + .equ CSR_HTVAL, 0x643 + + .equ SHIFTED_GPA_MASK_SV39X4, 0x0000007fffffffff + + .globl main + +main: + li t0, -1 + li t2, SHIFTED_GPA_MASK_SV39X4 + + # htval must legalize values outside the implemented shifted-GPA width. + csrw CSR_HTVAL, t0 + csrr t1, CSR_HTVAL + bne t1, t2, fail_htval + + # mtval2 must follow the same WARL behavior. + csrw CSR_MTVAL2, t0 + csrr t1, CSR_MTVAL2 + bne t1, t2, fail_mtval2 + + # Both WARL registers must be capable of holding zero. + csrw CSR_HTVAL, zero + csrr t1, CSR_HTVAL + bnez t1, fail_htval_zero + + csrw CSR_MTVAL2, zero + csrr t1, CSR_MTVAL2 + bnez t1, fail_mtval2_zero + +pass: + li a0, 0 + j finish + +fail_htval: + li a0, 1 + j finish + +fail_mtval2: + li a0, 2 + j finish + +fail_htval_zero: + li a0, 3 + j finish + +fail_mtval2_zero: + li a0, 4 + +finish: + jal exit diff --git a/verif/tests/custom/issues/i3317_reg_write.S b/verif/tests/custom/issues/i3317_reg_write.S new file mode 100644 index 00000000000..762ecc513da --- /dev/null +++ b/verif/tests/custom/issues/i3317_reg_write.S @@ -0,0 +1,27 @@ + .section .text + .align 2 + .option norvc + .globl main +main: + csrr t0, mideleg + li t1, 0x444 + and t2, t0, t1 + bne t2, t1, fail # RO-1 bits (2,6,10) are set after reset + csrw mideleg, zero + csrr t0, mideleg + and t2, t0, t1 + bne t2, t1, fail # RO-1 bits (2,6,10) survive a zero write + li t3, 0x200 # SEIP delegation (bit 9) - a real writable mideleg bit + csrw mideleg, t3 + csrr t0, mideleg + and t2, t0, t3 + bne t2, t3, fail # writable bit takes + li t1, 0x444 + and t2, t0, t1 + bne t2, t1, fail # RO-1 bits still set alongside + li a0, 0 + j fin +fail: + li a0, 1 +fin: + jal exit diff --git a/verif/tests/custom/issues/load-misaligned-warning.S b/verif/tests/custom/issues/load-misaligned-warning.S new file mode 100644 index 00000000000..ff1aa18b128 --- /dev/null +++ b/verif/tests/custom/issues/load-misaligned-warning.S @@ -0,0 +1,72 @@ +.section .text + +.globl main +main: + la t0, data_buf + + # Word load at byte offset 5. + # This is architecturally misaligned and also triggers addr_offset0. + addi t1, t0, 5 + lw t2, 0(t1) + + # Unsigned word load at the same offset. + addi t1, t0, 5 + lwu t2, 0(t1) + + # Halfword load at byte offset 7. + # This is architecturally misaligned and also triggers addr_offset1. + addi t1, t0, 7 + lh t2, 0(t1) + + # Unsigned halfword load at the same offset. + addi t1, t0, 7 + lhu t2, 0(t1) + + # All four loads must have trapped. + la t0, trap_count + lw t1, 0(t0) + li t2, 4 + bne t1, t2, fail + + li a0, 0 + ret + +fail: + li a0, 1 + ret + + +.globl handle_trap +handle_trap: + # crt.S passes: + # a0 = mcause + # a1 = mepc + # and expects the return value in a0 to be the resume PC. + + li t0, 4 + bne a0, t0, unexpected_trap + + la t0, trap_count + lw t1, 0(t0) + addi t1, t1, 1 + sw t1, 0(t0) + + # All faulting loads in this test are 32-bit instructions. + addi a0, a1, 4 + ret + +unexpected_trap: + li a0, 2 + j _exit + + +.section .data +.align 3 + +data_buf: + .dword 0x1122334455667788 + .dword 0x99aabbccddeeff00 + +.align 2 +trap_count: + .word 0 diff --git a/verif/tests/custom/issues/misaligned-branch-rvc-disabled.S b/verif/tests/custom/issues/misaligned-branch-rvc-disabled.S new file mode 100644 index 00000000000..b3468732460 --- /dev/null +++ b/verif/tests/custom/issues/misaligned-branch-rvc-disabled.S @@ -0,0 +1,28 @@ + .option norvc + .globl main + +main: + .balign 4 +branch_site: + beq zero, zero, misaligned_target + j fail + + .2byte 0 +misaligned_target: + j fail # Reaching here means the expected trap did not occur + + .2byte 0 + .globl handle_trap +handle_trap: + bnez a0, fail # mcause must be 0: instruction-address-misaligned + j pass + +.balign 4 +fail: + li a0, 1 + call exit + +.balign 4 +pass: + li a0, 0 + call exit diff --git a/verif/tests/custom/issues/mret-mpv-rv64.S b/verif/tests/custom/issues/mret-mpv-rv64.S new file mode 100644 index 00000000000..3fc0fd9f9ea --- /dev/null +++ b/verif/tests/custom/issues/mret-mpv-rv64.S @@ -0,0 +1,116 @@ +# Copyright 2026 Keerthivasan +# +# Licensed under the Solderpad Hardware Licence, Version 2.0. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# +# Regression test for CVA6 issue #3313. +# +# When MRET returns to M-mode, virtualization mode V must remain zero, +# regardless of the value previously stored in mstatus.MPV. +# +# V is internal architectural state and cannot be read directly. +# A subsequent trap to M-mode saves V into mstatus.MPV, allowing the +# post-MRET V state to be checked. + + .section .text + .align 2 + + .equ MSTATUS_MPP_MASK, 0x0000000000001800 + .equ MSTATUS_MPP_M, 0x0000000000001800 + .equ MSTATUS_MPV, 0x0000008000000000 + + .equ CAUSE_ECALL_M, 11 + + .globl main + +main: + # Send all exceptions used by this test to M-mode. + la t0, trap_handler + csrw mtvec, t0 + + csrw medeleg, zero + csrw mideleg, zero + csrw hedeleg, zero + csrw hideleg, zero + + # Configure MRET to return to M-mode. + li t0, MSTATUS_MPP_MASK + csrc mstatus, t0 + + li t0, MSTATUS_MPP_M + csrs mstatus, t0 + + # Deliberately set MPV before MRET. + # + # The Hypervisor specification requires MRET to ignore MPV when + # MPP=M and to keep virtualization mode V equal to zero. + li t0, MSTATUS_MPV + csrc mstatus, t0 + csrs mstatus, t0 + + # Confirm that MPV was writable so the test exercises the intended case. + csrr t0, mstatus + li t1, MSTATUS_MPV + and t2, t0, t1 + beqz t2, fail_2 + + la t0, m_entry + csrw mepc, t0 + mret + +m_entry: + # Trap entry saves the current V state into mstatus.MPV. + ecall + + # ECALL must trap. + li a0, 1 + j finish + + .align 2 +trap_handler: + csrr t0, mstatus + + # Main regression check. + # + # On the buggy RTL, MRET copies MPV=1 into V even though MPP=M. + # Trap entry then saves that incorrect V=1 value back into MPV. + li t1, MSTATUS_MPV + and t2, t0, t1 + bnez t2, fail_8 + + # The trap must originate from M-mode. + li t1, MSTATUS_MPP_MASK + and t2, t0, t1 + li t3, MSTATUS_MPP_M + bne t2, t3, fail_9 + + # ECALL from M-mode must report exception cause 11. + csrr t0, mcause + li t1, CAUSE_ECALL_M + bne t0, t1, fail_3 + +pass: + li a0, 0 + j finish + +fail_2: + # MPV was unavailable or not writable. + li a0, 2 + j finish + +fail_3: + # Unexpected trap cause. + li a0, 3 + j finish + +fail_8: + # Issue #3313 reproduced: V remained set after MRET to M-mode. + li a0, 8 + j finish + +fail_9: + # Trap did not originate from M-mode. + li a0, 9 + +finish: + jal exit diff --git a/verif/tests/custom/issues/pmp-misalign-priority-over-access-fault.S b/verif/tests/custom/issues/pmp-misalign-priority-over-access-fault.S new file mode 100644 index 00000000000..0454ae24a3e --- /dev/null +++ b/verif/tests/custom/issues/pmp-misalign-priority-over-access-fault.S @@ -0,0 +1,41 @@ + .section .text + .align 2 + .option norvc + .globl main +main: + la t0, th + csrw mtvec, t0 + csrw medeleg, zero + csrw vsatp, zero + li s4, 0 + li a2, 0x80100003 + li a3, 0x1122334455667788 + hsv.d a3, (a2) + li a0, 10 + j fin +phase1: + li s4, 1 + hlv.d a4, (a2) + li a0, 11 + j fin + .align 2 +th: + csrr t0, mcause + csrr t1, mepc + addi t1, t1, 4 + csrw mepc, t1 + bnez s4, 1f + li t2, 6 + bne t0, t2, bad + la t1, phase1 + csrw mepc, t1 + mret +1: + li t2, 4 + bne t0, t2, bad + li a0, 0 + j fin +bad: + ori a0, t0, 0x40 +fin: + jal exit diff --git a/verif/tests/custom/issues/pmp-tor-grain-rv64.S b/verif/tests/custom/issues/pmp-tor-grain-rv64.S new file mode 100644 index 00000000000..26cf28b6d82 --- /dev/null +++ b/verif/tests/custom/issues/pmp-tor-grain-rv64.S @@ -0,0 +1,191 @@ +# Regression test for CVA6 issue #3342. +# +# CVA6 implements an eight-byte PMP grain (G=1), so pmpaddr[0] must not +# affect either boundary of a TOR region. Check a denied partial boundary, +# an allowed complete doubleword, and a lower boundary shared by two entries. + +#include "encoding.h" + + .equ MSTATUS_MPP_S, (PRV_S << 11) + .equ CAUSE_LOAD_ACCESS_FAULT, 5 + .equ PMP_RWX_TOR, (PMP_TOR | PMP_R | PMP_W | PMP_X) + .equ PMP_X_TOR, (PMP_TOR | PMP_X) + .equ PMP_RW_TOR, (PMP_TOR | PMP_R | PMP_W) + .equ SECRET, 0x89abcdef01234567 + + # Keep this complete test in the first load segment. This makes the PMP + # regression independent of ELF segment preloading in the test harness. + .section .text.init, "ax", @progbits + .align 2 + .globl main + +main: + la t0, trap_handler + csrw mtvec, t0 + csrw medeleg, zero + csrw mideleg, zero + csrw satp, zero + sfence.vma + + li t0, 1 + csrw mscratch, t0 + j setup_partial_top + +# Phase 1: pmpaddr0 contains (target + 4) >> 2. Its low bit must be ignored, +# so the effective top is target and an S-mode load at target must fault. +setup_partial_top: + csrw pmpcfg0, zero + + la t0, target + addi t0, t0, 4 + srli t0, t0, PMP_SHIFT + csrw pmpaddr0, t0 + + la t0, target_end + srli t0, t0, PMP_SHIFT + csrw pmpaddr1, t0 + + li t0, (PMP_TOR << 8) | PMP_RWX_TOR + csrw pmpcfg0, t0 + fence + + la t0, probe_partial_top + j enter_s_mode + +probe_partial_top: + li a0, 11 + la t0, target + ld t1, 0(t0) + ecall + +# Phase 2: moving the effective top to target + 8 must allow the complete, +# naturally aligned doubleword. +setup_complete_top: + csrw pmpcfg0, zero + + la t0, target + addi t0, t0, 8 + srli t0, t0, PMP_SHIFT + csrw pmpaddr0, t0 + csrw pmpaddr1, t0 + + li t0, (PMP_TOR << 8) | PMP_RWX_TOR + csrw pmpcfg0, t0 + fence + + la t0, probe_complete_top + j enter_s_mode + +probe_complete_top: + li a0, 21 + la t0, target + ld t1, 0(t0) + li t2, SECRET + bne t1, t2, report_complete_top + li a0, 0 +report_complete_top: + ecall + +# Phase 3: the same raw pmpaddr0 value is the top of an execute-only entry +# and the bottom of a read/write entry. Both uses must ignore bit 0, making +# target readable through entry 1 rather than denied by entry 0. +setup_shared_boundary: + csrw pmpcfg0, zero + + la t0, target + addi t0, t0, 4 + srli t0, t0, PMP_SHIFT + csrw pmpaddr0, t0 + + la t0, target_end + srli t0, t0, PMP_SHIFT + csrw pmpaddr1, t0 + + li t0, (PMP_RW_TOR << 8) | PMP_X_TOR + csrw pmpcfg0, t0 + fence + + la t0, probe_shared_boundary + j enter_s_mode + +probe_shared_boundary: + li a0, 31 + la t0, target + ld t1, 0(t0) + li t2, SECRET + bne t1, t2, report_shared_boundary + li a0, 0 +report_shared_boundary: + ecall + +enter_s_mode: + li t1, MSTATUS_MPP + csrc mstatus, t1 + li t1, MSTATUS_MPP_S + csrs mstatus, t1 + csrw mepc, t0 + mret + + .align 2 +trap_handler: + csrr t0, mscratch + li t1, 1 + beq t0, t1, handle_partial_top + li t1, 2 + beq t0, t1, handle_complete_top + li t1, 3 + beq t0, t1, handle_shared_boundary + li a0, 40 + j finish + +handle_partial_top: + csrr t0, mcause + li t1, CAUSE_LOAD_ACCESS_FAULT + bne t0, t1, finish + + li t0, 2 + csrw mscratch, t0 + j setup_complete_top + +handle_complete_top: + csrr t0, mcause + li t1, CAUSE_SUPERVISOR_ECALL + bne t0, t1, fail_complete_top + bnez a0, finish + + li t0, 3 + csrw mscratch, t0 + j setup_shared_boundary + +fail_complete_top: + li a0, 22 + j finish + +handle_shared_boundary: + csrr t0, mcause + li t1, CAUSE_SUPERVISOR_ECALL + bne t0, t1, fail_shared_boundary + bnez a0, finish + li a0, 0 + j finish + +fail_shared_boundary: + li a0, 32 + +finish: + csrw pmpcfg0, zero + fence + + # Encode a0 using the RISC-V test convention and terminate through tohost. + slli a0, a0, 1 + ori a0, a0, 1 + la t0, tohost + sd a0, 0(t0) +1: + j 1b + + .align 3 +target: + .dword SECRET +target_end: + .dword 0 diff --git a/verif/tests/custom/issues/vsmode_counterh_cause.S b/verif/tests/custom/issues/vsmode_counterh_cause.S new file mode 100644 index 00000000000..1a885160ec6 --- /dev/null +++ b/verif/tests/custom/issues/vsmode_counterh_cause.S @@ -0,0 +1,79 @@ +# vsmode_counterh_cause.S +# Directed test for openhwgroup/cva6#3466: +# "RV64+H: high-half counter CSR access from VS-mode reports cause 22 +# instead of cause 2" +# +# Per spec, on RV64 (XLEN=64) an access to a high-half counter CSR (cycleh, +# instreth, hpmcounterNh) is always illegal (cause 2), regardless of mode or +# counter-enable bits -- high-half CSRs only exist on RV32. CVA6 currently +# gates cycleh/instreth using the same counter-enable privilege logic as the +# low CSRs, with no RV64 guard, so from VS-mode with mcounteren enabled but +# hcounteren disabled, the access instead raises a virtual-instruction +# exception (cause 22) via virtual_privilege_violation. +# +# This test: from M-mode, enables mcounteren bit0 (cycle/cycleh), leaves +# hcounteren bit0 clear (default), enters VS-mode via mret (mstatus.MPP=S, mstatus.MPV=1), +# and executes a cycleh read. The resulting trap (delivered +# to M-mode, no H-delegation configured) must report mcause=2, not 22. + +#include "riscv_test.h" +#include "test_macros.h" + +RVTEST_RV64M +RVTEST_CODE_BEGIN + + .align 2 + .option norvc + + li TESTNUM, 2 + + la t0, mtvec_handler + csrw mtvec, t0 + + # enable mcounteren bit0 (cycle/cycleh gating) -- leaves hcounteren bit0 + # clear (its reset value), so accessing from V=1,S-mode should hit the + # virtual_privilege_violation path in the buggy RTL. + li t0, 1 + csrs mcounteren, t0 + + # mstatus.MPP = S (2'b01, bits [12:11]) and mstatus.MPV = 1 (bit 39) -- + # MRET (unlike SRET, which uses hstatus.SPV) uses mstatus.MPV to decide + # the new virtualization mode, so it lands in VS-mode (S-mode, V=1). + csrr t0, mstatus + li t1, ~(3 << 11) + and t0, t0, t1 + li t1, (1 << 11) + or t0, t0, t1 + li t1, 1 + slli t1, t1, 39 + or t0, t0, t1 + csrw mstatus, t0 + + la t0, vs_mode_entry + csrw mepc, t0 + mret + +vs_mode_entry: + csrr t0, 0xC80 # cycleh -- must trap, cause must be 2 + + # should never retire past the csrr above + j fail + + TEST_PASSFAIL + + .align 8 + .global mtvec_handler +mtvec_handler: + csrr t0, mcause + li t1, 2 + beq t0, t1, 1f + j fail +1: + j pass + +RVTEST_CODE_END + + .data +RVTEST_DATA_BEGIN + TEST_DATA +RVTEST_DATA_END diff --git a/verif/tests/custom/issues/xret-mprv-clear-rv64.S b/verif/tests/custom/issues/xret-mprv-clear-rv64.S new file mode 100644 index 00000000000..561eb2f5c76 --- /dev/null +++ b/verif/tests/custom/issues/xret-mprv-clear-rv64.S @@ -0,0 +1,228 @@ +# Copyright 2026 Keerthivasan +# +# Licensed under the Solderpad Hardware Licence, Version 2.0. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# +# Regression test for CVA6 issue #3294. +# +# MRET and SRET must clear mstatus.MPRV when returning to a +# privilege mode below M-mode, independently of RVH. + + .section .text + .align 2 + + .equ MSTATUS_SPP, 0x00000100 + .equ MSTATUS_MPP_MASK, 0x00001800 + .equ MSTATUS_MPP_S, 0x00000800 + .equ MSTATUS_MPP_M, 0x00001800 + .equ MSTATUS_MPRV, 0x00020000 + + .equ CAUSE_ECALL_U, 8 + .equ CAUSE_ECALL_S, 9 + + .globl main + +main: + # Route the ECALLs used by this test to M-mode. + la t0, trap_handler + csrw mtvec, t0 + csrw medeleg, zero + csrw mideleg, zero + + # Run the lower-privilege portions of this regression in Bare mode. + # The test exercises xRET privilege state, not virtual-memory setup. + csrw satp, zero + sfence.vma + + # Permit S/U-mode execution of the test image. + # + # PMP entry 0 is configured as a TOR region from address zero to the + # highest representable physical address, with read/write/execute + # permissions enabled. The target implements PMP and otherwise resets + # all entries with address matching disabled. + li t0, -1 + csrw pmpaddr0, t0 + li t0, 0x0f + csrw pmpcfg0, t0 + fence + + # ------------------------------------------------------------------ + # Phase 0: MRET from M-mode to M-mode. + # + # MPRV must be preserved when MRET returns to M-mode. + # ------------------------------------------------------------------ + li t0, MSTATUS_MPRV + csrs mstatus, t0 + + li t0, MSTATUS_MPP_MASK + csrc mstatus, t0 + + li t0, MSTATUS_MPP_M + csrs mstatus, t0 + + # Verify MPRV is set before MRET. + csrr t0, mstatus + li t1, MSTATUS_MPRV + and t2, t0, t1 + beqz t2, fail_mprv_write_mret + + la t0, mret_m_entry + csrw mepc, t0 + mret + +mret_m_entry: + # MRET to M-mode must preserve MPRV. + csrr t0, mstatus + li t1, MSTATUS_MPRV + and t2, t0, t1 + beqz t2, fail_mret_mprv_preserve + + # ------------------------------------------------------------------ + # Phase 1: MRET from M-mode to S-mode. + # ------------------------------------------------------------------ + li s0, 1 + + # Configure MPRV=1 and MPP=S. + li t0, MSTATUS_MPRV + csrc mstatus, t0 + + li t0, MSTATUS_MPP_MASK + csrc mstatus, t0 + + li t0, MSTATUS_MPRV + csrs mstatus, t0 + + li t0, MSTATUS_MPP_S + csrs mstatus, t0 + + # Ensure MPRV was actually writable. + csrr t0, mstatus + li t1, MSTATUS_MPRV + and t2, t0, t1 + beqz t2, fail_mprv_write_mret + + # MRET must clear MPRV because the target privilege is S-mode. + la t0, mret_s_entry + csrw mepc, t0 + mret + +mret_s_entry: + # Return to M-mode so the trap handler can inspect mstatus.MPRV. + ecall + + # ECALL must not return here. + li a0, 7 + j finish + + # ------------------------------------------------------------------ + # Phase 2: SRET from M-mode to U-mode. + # ------------------------------------------------------------------ +sret_setup: + li s0, 2 + + # Set MPRV=1 again. + li t0, MSTATUS_MPRV + csrs mstatus, t0 + + # Configure SRET to return to U-mode by clearing SPP. + li t0, MSTATUS_SPP + csrc mstatus, t0 + + # Ensure MPRV is set before SRET. + csrr t0, mstatus + li t1, MSTATUS_MPRV + and t2, t0, t1 + beqz t2, fail_mprv_write_sret + + la t0, sret_u_entry + csrw sepc, t0 + sret + +sret_u_entry: + # Return to M-mode so the trap handler can inspect MPRV. + ecall + + # ECALL must not return here. + li a0, 8 + j finish + + .align 2 +trap_handler: + li t0, 1 + beq s0, t0, check_mret + + li t0, 2 + beq s0, t0, check_sret + + li a0, 9 + j finish + +check_mret: + # ECALL must have originated from S-mode. + csrr t0, mcause + li t1, CAUSE_ECALL_S + bne t0, t1, fail_mret_cause + + # Main MRET regression check. + csrr t0, mstatus + li t1, MSTATUS_MPRV + and t2, t0, t1 + bnez t2, fail_mret_mprv + + # Return from this M-mode trap to M-mode and start the SRET phase. + la t0, sret_setup + csrw mepc, t0 + + li t0, MSTATUS_MPP_MASK + csrc mstatus, t0 + + li t0, MSTATUS_MPP_M + csrs mstatus, t0 + + mret + +check_sret: + # ECALL must have originated from U-mode. + csrr t0, mcause + li t1, CAUSE_ECALL_U + bne t0, t1, fail_sret_cause + + # Main SRET regression check. + csrr t0, mstatus + li t1, MSTATUS_MPRV + and t2, t0, t1 + bnez t2, fail_sret_mprv + +pass: + li a0, 0 + j finish + +fail_mprv_write_mret: + li a0, 1 + j finish + +fail_mret_cause: + li a0, 2 + j finish + +fail_mret_mprv: + li a0, 3 + j finish + +fail_mprv_write_sret: + li a0, 4 + j finish + +fail_sret_cause: + li a0, 5 + j finish + +fail_sret_mprv: + li a0, 6 + j finish + +fail_mret_mprv_preserve: + li a0, 10 + +finish: + jal exit diff --git a/verif/tests/custom/lsu/false_4k_alias.S b/verif/tests/custom/lsu/false_4k_alias.S new file mode 100644 index 00000000000..d9fa6077dd5 --- /dev/null +++ b/verif/tests/custom/lsu/false_4k_alias.S @@ -0,0 +1,39 @@ +# Copyright 2026 Srinidhi-Magesh +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 + +# Check that a conservative 4 KiB alias never forwards data from another page. + + .globl main +main: + la t0, page_a + la t1, page_b + + # page_a + 0x18 and page_b + 0x18 intentionally have identical [11:3] + # address bits, but page_a and page_b are distinct 4 KiB-aligned pages. + li t2, 0x13579bdf + sw t2, 0x18(t1) + fence rw, rw + + # Keep the store and load adjacent so the older store can still be pending. + li a2, 0x55667788 + sw a2, 0x18(t0) + lw a3, 0x18(t1) + bne a3, t2, fail + +pass: + li a0, 0 + jal exit + +fail: + li a0, 1 + jal exit + + .section .data,"aw",@progbits + .balign 4096 +page_a: + .space 4096 +page_b: + .space 4096 diff --git a/verif/tests/custom/pmp/amo_access_fault_test.S b/verif/tests/custom/pmp/amo_access_fault_test.S new file mode 100644 index 00000000000..5f2ec45d6f6 --- /dev/null +++ b/verif/tests/custom/pmp/amo_access_fault_test.S @@ -0,0 +1,100 @@ +// Copyright 2026 OpenHW Group +// +// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 + + .equ STORE_AMO_ACCESS_FAULT, 7 + .equ AMO_RESULT_SENTINEL, 0x5a5a5a5a5a5a5a5a + + .section .text + .globl main +main: + // Entry 0 is a locked four-KiB NAPOT region with no permissions. Entry 1 + // covers the remaining address space so that the load adjacent to the AMO + // is allowed. + la t0, target_no_access + srli t0, t0, 2 + ori t0, t0, 0x1ff + csrw pmpaddr0, t0 + li t0, -1 + csrw pmpaddr1, t0 + li t0, 0x00001f98 + csrw pmpcfg0, t0 + + la t0, trap_count + sw zero, 0(t0) + + // A PMP-denied AMO must report a store/AMO access fault, not a load + // access fault. Keep an allowed load immediately behind it to expose + // request/response access-type and tval misalignment. + la t0, target_no_access + call set_expected_tval + li t1, 1 + li t3, AMO_RESULT_SENTINEL + la t2, allowed_data + .option push + .option norvc + amoadd.d t3, t1, (t0) + ld t4, 0(t2) + .option pop + li t0, 1 + call check_trap_count + li t0, AMO_RESULT_SENTINEL + bne t3, t0, fail + +pass: + li a0, 0 + tail exit + +fail: + li a0, 1 + tail exit + +set_expected_tval: + la t1, expected_tval + sd t0, 0(t1) + ret + +check_trap_count: + la t1, trap_count + lw t1, 0(t1) + bne t0, t1, fail + ret + + .globl handle_trap +handle_trap: + li t0, STORE_AMO_ACCESS_FAULT + bne a0, t0, trap_fail + + csrr t0, mtval + la t1, expected_tval + ld t1, 0(t1) + bne t0, t1, trap_fail + + la t0, trap_count + lw t1, 0(t0) + addi t1, t1, 1 + sw t1, 0(t0) + + // crt.S writes the returned address to mepc before executing mret. + addi a0, a1, 4 + ret + +trap_fail: + li a0, 1 + tail exit + + .section .data, "aw", @progbits + .align 3 +expected_tval: + .dword 0 +trap_count: + .word 0 + .align 3 +allowed_data: + .dword 0 + + .balign 4096 +target_no_access: + .dword 0 diff --git a/verif/tests/custom/pmp/decreasing_entries_test.S b/verif/tests/custom/pmp/decreasing_entries_test.S new file mode 100644 index 00000000000..9ad2c3dc7c8 --- /dev/null +++ b/verif/tests/custom/pmp/decreasing_entries_test.S @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright 2024 Robert Bosch GmbH +# +# SPDX-License-Identifier: SHL-0.51 +# +# Original Author: Konstantinos LEVENTOS - Robert Bosch France SAS +# ------------------------------------------------------------------------------ +# decreasing_entries_test.S (TST04-4) +# ------------------------------------------------------------------------------ + + .text + .globl main +main: + + # Configure PMP using decreasing entries of TOR. + + # From 0xB000_0000 to 0xC000_0000 Read-Write-Execute. + li t0, 0x30000000 + csrw pmpaddr7, t0 + + # From 0xA000_0000 to 0xB000_0000 Read-Write-Execute. + li t0, 0x2c000000 + csrw pmpaddr6, t0 + + # From 0x9000_0000 to 0xA000_0000 Read-Write-Execute. + li t0, 0x28000000 + csrw pmpaddr5, t0 + + # From 0x8000_0000 to 0x9000_0000 Read-Write-Execute. + li t0, 0x24000000 + csrw pmpaddr4, t0 + + # From 0x0002_0000 to 0x8000_0000 no Permissions. + li t0, 0x20000000 + csrw pmpaddr3, t0 + + # From 0x0001_0000 to 0x0002_0000 only Execute. + li t0, 0x00008000 + csrw pmpaddr2, t0 + + # From 0x0000_1000 to 0x0001_0000 no Permissions. + li t0, 0x00004000 + csrw pmpaddr1, t0 + + # From 0x0000_0000 to 0x0000_1000 only Execute. + li t0, 0x00000400 + csrw pmpaddr0, t0 + + + # Addr 4-7 configs, written in cfg1, with LOCK OFF, and TOR. + li t0, 0x0f0f0f0f + csrw pmpcfg1, t0 + + # Addr 0-3 configs, written in cfg0, with LOCK OFF, and TOR. + li t0, 0x080c080c + csrw pmpcfg0, t0 + + + # Do the READ-WRITE test. + + # Check 1 read-write test, at 0x8800_0000. + li t1, 0x88000000 + li t2, 0xEFFACED1 + sw t2, 0(t1) + lw t3, 0(t1) + bne t2, t3, fail + + # Check 2 read-write test, at 0x9800_0000. + li t1, 0x98000000 + li t2, 0xACCEDED2 + sw t2, 0(t1) + lw t3, 0(t1) + bne t2, t3, fail + + # Check 3 read-write test, at 0xA800_0000. + li t1, 0xA8000000 + li t2, 0xDEFACED3 + sw t2, 0(t1) + lw t3, 0(t1) + bne t2, t3, fail + + # Check 4 read-write test, at 0xB800_0000. + li t1, 0xB8000000 + li t2, 0xDEC0DED4 + sw t2, 0(t1) + lw t3, 0(t1) + bne t2, t3, fail + + +pass: + # Success post-processing + li a0, 0x0; + jal exit; + +fail: + # Failure post-processing + li a0, 0x1; + jal exit; diff --git a/verif/tests/custom/pmp/defined_matches_test.S b/verif/tests/custom/pmp/defined_matches_test.S new file mode 100644 index 00000000000..2df2a845122 --- /dev/null +++ b/verif/tests/custom/pmp/defined_matches_test.S @@ -0,0 +1,48 @@ +# ------------------------------------------------------------------------------ +# Copyright 2024 Robert Bosch GmbH +# +# SPDX-License-Identifier: SHL-0.51 +# +# Original Author: Konstantinos LEVENTOS - Robert Bosch France SAS +# ------------------------------------------------------------------------------ +# defined_matches_test.S (TST10-1, TST10-2) +# ------------------------------------------------------------------------------ + + .text + .globl main +main: + + # Check a Memory Access succeeds if no PMP entry is defined. + li t1, 0x90000000 + li t2, 0xC0D1F1ED + sw t2, 0(t1) + lw t3, 0(t1) + bne t2, t3, fail + + # Set up a PMP entry using NAPOT, from 0x8000_0000 to 0xA0000_0000, Read-Write-Execute. + li t0, 0x0000001f + csrw pmpcfg0, t0 + csrr t1, pmpcfg0 + bne t0, t1, fail + li t0, 0x23ffffff + csrw pmpaddr0, t0 + csrr t1, pmpaddr0 + bne t0, t1, fail + + # Check a memory access succeeds if no PMP entry matches. + li t1, 0xB0000000 + li t2, 0xCA5CADED + sw t2, 0(t1) + lw t3, 0(t1) + bne t2, t3, fail + + +pass: + # Success post-processing + li a0, 0x0; + jal exit; + +fail: + # Failure post-processing + li a0, 0x1; + jal exit; diff --git a/verif/tests/custom/pmp/double_entries_test.S b/verif/tests/custom/pmp/double_entries_test.S new file mode 100644 index 00000000000..a7e7ef988da --- /dev/null +++ b/verif/tests/custom/pmp/double_entries_test.S @@ -0,0 +1,72 @@ +# ------------------------------------------------------------------------------ +# Copyright 2024 Robert Bosch GmbH +# +# SPDX-License-Identifier: SHL-0.51 +# +# Original Author: Konstantinos LEVENTOS - Robert Bosch France SAS +# ------------------------------------------------------------------------------ +# double_entries_test.S (TST04-2) +# ------------------------------------------------------------------------------ + + .text + .globl main +main: + + # Set up PMP using NAPOT, from 0xB000_0000 to 0xC000_0000, Read-Write. + li t0, 0x001b0000 + csrw pmpcfg1, t0 + csrr t1, pmpcfg1 + bne t0, t1, fail + li t0, 0x2dffffff + csrw pmpaddr6, t0 + csrr t1, pmpaddr6 + bne t0, t1, fail + + # Set up PMP using NAPOT, from 0x8000_0000 to 0x9000_0000, Read-Write. + li t0, 0x001b0000 + csrw pmpcfg0, t0 + csrr t1, pmpcfg0 + bne t0, t1, fail + li t0, 0x21ffffff + csrw pmpaddr2, t0 + csrr t1, pmpaddr2 + bne t0, t1, fail + + # Read-Write check in 0xB800_0000. + li t1, 0xB8000000 + li t2, 0xC0D1F1ED + sw t2, 0(t1) + lw t3, 0(t1) + bne t2, t3, fail + + # Read-Write check in 0x8800_0000. + li t1, 0x88000000 + li t2, 0xCA5CADED + sw t2, 0(t1) + lw t3, 0(t1) + bne t2, t3, fail + + # Check that all other addr / cfg are zero. + csrr t0, pmpaddr0 + bne t0, zero, fail + csrr t0, pmpaddr1 + bne t0, zero, fail + csrr t0, pmpaddr3 + bne t0, zero, fail + csrr t0, pmpaddr4 + bne t0, zero, fail + csrr t0, pmpaddr5 + bne t0, zero, fail + csrr t0, pmpaddr7 + bne t0, zero, fail + + +pass: + # Success post-processing + li a0, 0x0; + jal exit; + +fail: + # Failure post-processing + li a0, 0x1; + jal exit; diff --git a/verif/tests/custom/pmp/exact_csrr_test.S b/verif/tests/custom/pmp/exact_csrr_test.S new file mode 100644 index 00000000000..965d9f2e889 --- /dev/null +++ b/verif/tests/custom/pmp/exact_csrr_test.S @@ -0,0 +1,106 @@ +# ------------------------------------------------------------------------------ +# Copyright 2024 Robert Bosch GmbH +# +# SPDX-License-Identifier: SHL-0.51 +# +# Original Author: Konstantinos LEVENTOS - Robert Bosch France SAS +# ------------------------------------------------------------------------------ +# exact_csrr_test.S (TST05-1) +# ------------------------------------------------------------------------------ + + .text + .globl main +main: + + # Write in addresses and check what is written. + + # Checking PMP ADDR 0 + li t0, 0xFACADE00 + csrw pmpaddr0, t0 + csrr t1, pmpaddr0 + bne t0, t1, fail + csrw pmpaddr0, zero + + # Checking PMP ADDR 1 + li t0, 0xFACADE02 + csrw pmpaddr1, t0 + csrr t1, pmpaddr1 + bne t0, t1, fail + csrw pmpaddr1, zero + + # Checking PMP ADDR 2 + li t0, 0xFACADE04 + csrw pmpaddr2, t0 + csrr t1, pmpaddr2 + bne t0, t1, fail + csrw pmpaddr2, zero + + # Checking PMP ADDR 3 + li t0, 0xFACADE06 + csrw pmpaddr3, t0 + csrr t1, pmpaddr3 + bne t0, t1, fail + csrw pmpaddr3, zero + + # Checking PMP ADDR 4 + li t0, 0xFACADE08 + csrw pmpaddr4, t0 + csrr t1, pmpaddr4 + bne t0, t1, fail + csrw pmpaddr4, zero + + # Checking PMP ADDR 5 + li t0, 0xFACADE0A + csrw pmpaddr5, t0 + csrr t1, pmpaddr5 + bne t0, t1, fail + csrw pmpaddr5, zero + + # Checking PMP ADDR 6 + li t0, 0xFACADE0C + csrw pmpaddr6, t0 + csrr t1, pmpaddr6 + bne t0, t1, fail + csrw pmpaddr6, zero + + # Checking PMP ADDR 7 + li t0, 0xFACADE0E + csrw pmpaddr7, t0 + csrr t1, pmpaddr7 + bne t0, t1, fail + csrw pmpaddr7, zero + + # Checking PMP ADDR 63 boundary + li t0, 0xFACADE7E + csrw pmpaddr63, t0 + csrr t1, pmpaddr63 + bnez t1, fail + csrw pmpaddr63, zero + + + # Write in configurations and check what is written, except for the reserved combinations with R=0 and W=1. + + # Checking PMP CFG 0 + li t0, 0x01030304 + csrw pmpcfg0, t0 + csrr t1, pmpcfg0 + bne t0, t1, fail + csrw pmpcfg0, zero + + # Checking PMP CFG 1 + li t0, 0x04050507 + csrw pmpcfg1, t0 + csrr t1, pmpcfg1 + bne t0, t1, fail + csrw pmpcfg1, zero + + +pass: + # Success post-processing + li a0, 0x0; + jal exit; + +fail: + # Failure post-processing + li a0, 0x1; + jal exit; diff --git a/verif/tests/custom/pmp/granularity_test.S b/verif/tests/custom/pmp/granularity_test.S new file mode 100644 index 00000000000..e341d0c8ad4 --- /dev/null +++ b/verif/tests/custom/pmp/granularity_test.S @@ -0,0 +1,44 @@ +# ------------------------------------------------------------------------------ +# Copyright 2024 Robert Bosch GmbH +# +# SPDX-License-Identifier: SHL-0.51 +# +# Original Author: Konstantinos LEVENTOS - Robert Bosch France SAS +# ------------------------------------------------------------------------------ +# granularity_test.S (TST01) +# ------------------------------------------------------------------------------ + + .text + .globl main +main: + + # Configure PMP to find its granularity. + + # Write all zeroes in cfg0. + li t0, 0 + csrw pmpcfg0, t0 + + # Write all ones in addr0. + li t1, -1 + csrw pmpaddr0, t1 + + # Read the value back. + csrr t2, pmpaddr0 + + # Check for granularity 8 = 2^(1+2) <=> G = 1. + # As per: https://docs.openhwgroup.org/projects/cva6-user-manual/01_cva6_user/PMP.html + # Which states: The PMP grain is 2**G+2. Only a PMP granularity of 8 bytes (G=1) is supported in CVA6. + # And from the RISC-V Spec: G is the index of the least-significant bit set, the PMP granularity is 2^(G+2) bytes. + li t3, 0xFFFFFFFE + bne t2, t3, fail + + +pass: + # Success post-processing + li a0, 0x0; + jal exit; + +fail: + # Failure post-processing + li a0, 0x1; + jal exit; diff --git a/verif/tests/custom/pmp/hlvx_access_fault_test.S b/verif/tests/custom/pmp/hlvx_access_fault_test.S new file mode 100644 index 00000000000..84e125c71ed --- /dev/null +++ b/verif/tests/custom/pmp/hlvx_access_fault_test.S @@ -0,0 +1,116 @@ +// Copyright 2026 OpenHW Group +// +// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 + + .equ LOAD_ACCESS_FAULT, 5 + .equ HLVX_RESULT_SENTINEL, 0x5a5a5a5a5a5a5a5a + + .option arch, +h + .section .text + .globl main +main: + // Entry 0 is a locked, read-only four-KiB NAPOT region. Entry 1 + // allows all other accesses. HLVX must require execute permission even + // with address translation disabled and the instruction running in M-mode. + la t0, target_read_only + srli t0, t0, 2 + ori t0, t0, 0x1ff + csrw pmpaddr0, t0 + li t0, -1 + csrw pmpaddr1, t0 + li t0, 0x00001f99 + csrw pmpcfg0, t0 + + la t0, trap_count + sw zero, 0(t0) + + // Ordinary loads from the read-only region must still succeed when an + // executable HLVX request follows immediately. This checks that a later + // request cannot impose execute permission on the earlier response. + la t0, target_read_only + la t2, allowed_data + .option push + .option norvc + ld t3, 0(t0) + hlvx.hu t4, (t2) + .option pop + li t0, 0x1234 + bne t3, t0, fail + li t0, 0x5678 + bne t4, t0, fail + li t0, 0 + call check_trap_count + + // A denied HLVX must fault with its own tval and leave its destination + // unchanged, even when the next request is an ordinary allowed load. + la t0, target_read_only + call set_expected_tval + li t3, HLVX_RESULT_SENTINEL + la t2, allowed_data + .option push + .option norvc + hlvx.hu t3, (t0) + ld t4, 0(t2) + .option pop + li t0, 1 + call check_trap_count + li t0, HLVX_RESULT_SENTINEL + bne t3, t0, fail + +pass: + li a0, 0 + tail exit + +fail: + li a0, 1 + tail exit + +set_expected_tval: + la t1, expected_tval + sd t0, 0(t1) + ret + +check_trap_count: + la t1, trap_count + lw t1, 0(t1) + bne t0, t1, fail + ret + + .globl handle_trap +handle_trap: + li t0, LOAD_ACCESS_FAULT + bne a0, t0, trap_fail + + csrr t0, mtval + la t1, expected_tval + ld t1, 0(t1) + bne t0, t1, trap_fail + + la t0, trap_count + lw t1, 0(t0) + addi t1, t1, 1 + sw t1, 0(t0) + + // crt.S writes the returned address to mepc before executing mret. + addi a0, a1, 4 + ret + +trap_fail: + li a0, 1 + tail exit + + .section .data, "aw", @progbits + .align 3 +expected_tval: + .dword 0 +trap_count: + .word 0 + .align 3 +allowed_data: + .dword 0x5678 + + .balign 4096 +target_read_only: + .dword 0x1234 diff --git a/verif/tests/custom/pmp/locked_outside_napot_test.S b/verif/tests/custom/pmp/locked_outside_napot_test.S new file mode 100644 index 00000000000..cc653b1cff2 --- /dev/null +++ b/verif/tests/custom/pmp/locked_outside_napot_test.S @@ -0,0 +1,45 @@ +# ------------------------------------------------------------------------------ +# Copyright 2024 Robert Bosch GmbH +# +# SPDX-License-Identifier: SHL-0.51 +# +# Original Author: Konstantinos LEVENTOS - Robert Bosch France SAS +# ------------------------------------------------------------------------------ +# locked_outside_napot_test.S (TST14-26, TST14-36) +# ------------------------------------------------------------------------------ + + .text + .globl main +main: + + # Set up PMP using NAPOT, from 0x8000_0000 to 0xB000_0000. + li t2, 0x25ffffff + csrw pmpaddr0, t2 + + # Configure it with LOCK ON, Read-Write-Execute. + li t0, 0x0000009f + csrw pmpcfg0, t0 + csrr t1, pmpcfg0 + bne t0, t1, fail + + # Check pmpaddr after switching to NAPOT (and lock) + csrr t0, pmpaddr0 + bne t0, t2, fail + + # Check a memory access succeeds when outside the LOCKED entry. + li t1, 0xB8000000 + li t2, 0xC0D1F1ED + sw t2, 0(t1) + lw t3, 0(t1) + bne t2, t3, fail + + +pass: + # Success post-processing + li a0, 0x0; + jal exit; + +fail: + # Failure post-processing + li a0, 0x1; + jal exit; diff --git a/verif/tests/custom/pmp/locked_outside_tor_test.S b/verif/tests/custom/pmp/locked_outside_tor_test.S new file mode 100644 index 00000000000..6db06b95661 --- /dev/null +++ b/verif/tests/custom/pmp/locked_outside_tor_test.S @@ -0,0 +1,61 @@ +# ------------------------------------------------------------------------------ +# Copyright 2024 Robert Bosch GmbH +# +# SPDX-License-Identifier: SHL-0.51 +# +# Original Author: Konstantinos LEVENTOS - Robert Bosch France SAS +# ------------------------------------------------------------------------------ +# locked_outside_tor_test.S (TST16-26, TST16-36) +# ------------------------------------------------------------------------------ + + .text + .globl main +main: + + # From 0x0000_0000 to 0x0000_1000 only Execute. + li t0, 0x00000400 + csrw pmpaddr0, t0 + + # From 0x0000_1000 to 0x0001_0000 no Permissions. + li t0, 0x00004000 + csrw pmpaddr1, t0 + + # From 0x0001_0000 to 0x0002_0000 only Execute. + li t0, 0x00008000 + csrw pmpaddr2, t0 + + # From 0x0002_0000 to 0x8000_0000 no Permissions. + li t0, 0x20000000 + csrw pmpaddr3, t0 + + # From 0x8000_0000 to 0xB000_0000 Read-Write-Execute. + li t0, 0x2C000000 + csrw pmpaddr4, t0 + + # Configure the TOR areas with LOCK ON. + li t0, 0x888c888c + csrw pmpcfg0, t0 + csrr t1, pmpcfg0 + bne t0, t1, fail + li t0, 0x0000008f + csrw pmpcfg1, t0 + csrr t1, pmpcfg1 + bne t0, t1, fail + + # Check a memory access succeeds when outside the LOCKED entry. + li t1, 0xB8000000 + li t2, 0xC0D1F1ED + sw t2, 0(t1) + lw t3, 0(t1) + bne t2, t3, fail + + +pass: + # Success post-processing + li a0, 0x0; + jal exit; + +fail: + # Failure post-processing + li a0, 0x1; + jal exit; diff --git a/verif/tests/custom/pmp/lsu_napot_test.S b/verif/tests/custom/pmp/lsu_napot_test.S new file mode 100644 index 00000000000..9a7c97fb4e9 --- /dev/null +++ b/verif/tests/custom/pmp/lsu_napot_test.S @@ -0,0 +1,111 @@ +# ------------------------------------------------------------------------------ +# Copyright 2024 Robert Bosch GmbH +# +# SPDX-License-Identifier: SHL-0.51 +# +# Original Author: Konstantinos LEVENTOS - Robert Bosch France SAS +# ------------------------------------------------------------------------------ +# lsu_napot_test.S (TST14-11, TST14-21, TST14-31) +# ------------------------------------------------------------------------------ + + .text + .globl main +main: + + # Configure PMP using NAPOT. + + # From 0x0000_0000 to 0x0000_1000 only Execute. + li t0, 0x000001ff + csrw pmpaddr0, t0 + + # From 0x0001_0000 to 0x0002_0000 only Execute. + li t0, 0x00005fff + csrw pmpaddr1, t0 + + # From 0x8000_0000 to 0xC000_0000 Read-Write-Execute. + li t0, 0x27ffffff + csrw pmpaddr2, t0 + + + # Addr 0-2 configs, written in cfg0, with LOCK OFF, and NAPOT. + li t0, 0x001f1c1c + csrw pmpcfg0, t0 + csrr t1, pmpcfg0 + bne t0, t1, fail + + + # Do the READ-WRITE test. + + # Check 1 read-write test, at 0x8000_0000. + li t1, 0x80000000 + li t2, 0xEFFACED1 + sw t2, 0(t1) + lw t3, 0(t1) + bne t2, t3, fail + + # Check 2 read-write test, at 0x9000_0000. + li t1, 0x90000000 + li t2, 0xACCEDED2 + sw t2, 0(t1) + lw t3, 0(t1) + bne t2, t3, fail + + # Check 3 read-write test, at 0xA000_0000. + li t1, 0xA0000000 + li t2, 0xDEFACED3 + sw t2, 0(t1) + lw t3, 0(t1) + bne t2, t3, fail + + # Check 4 read-write test, at 0xB000_0000. + li t1, 0xB0000000 + li t2, 0xDEC0DED4 + sw t2, 0(t1) + lw t3, 0(t1) + bne t2, t3, fail + + + # Do the EXEC "RET" test. + + # Exec test 1, at 0x0000_0800. + li t0, 0x00000800 + li t1, 0x8082 + sw t1, 0(t0) + lw t2, 0(t0) + bne t1, t2, fail + jalr t0 + + # Exec test 2, at 0x0001_8000. + li t0, 0x00018000 + li t1, 0x8082 + sw t1, 0(t0) + lw t2, 0(t0) + bne t1, t2, fail + jalr t0 + + # Exec test 3, at 0x9800_0000. + li t0, 0x98000000 + li t1, 0x8082 + sw t1, 0(t0) + lw t2, 0(t0) + bne t1, t2, fail + jalr t0 + + # Exec test 4, at 0xA800_0000. + li t0, 0xA8000000 + li t1, 0x8082 + sw t1, 0(t0) + lw t2, 0(t0) + bne t1, t2, fail + jalr t0 + + +pass: + # Success post-processing + li a0, 0x0; + jal exit; + +fail: + # Failure post-processing + li a0, 0x1; + jal exit; diff --git a/verif/tests/custom/pmp/lsu_pipeline_store_no_mmu_test.S b/verif/tests/custom/pmp/lsu_pipeline_store_no_mmu_test.S new file mode 100644 index 00000000000..1fba672ce1a --- /dev/null +++ b/verif/tests/custom/pmp/lsu_pipeline_store_no_mmu_test.S @@ -0,0 +1,8 @@ +// Copyright 2026 OpenHW Group +// +// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 + +#define PMP_NO_MMU +#include "lsu_pipeline_store_test.S" diff --git a/verif/tests/custom/pmp/lsu_pipeline_store_test.S b/verif/tests/custom/pmp/lsu_pipeline_store_test.S new file mode 100644 index 00000000000..f6ee2ed8453 --- /dev/null +++ b/verif/tests/custom/pmp/lsu_pipeline_store_test.S @@ -0,0 +1,183 @@ +// Copyright 2026 OpenHW Group +// +// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 + + .equ STORE_ACCESS_FAULT, 7 + .equ MSTATUS_MPP, 0x00001800 + .equ MSTATUS_MPRV, 0x00020000 + .equ MSTATUS_MPP_S, 0x00000800 + .equ SATP_MODE_SV39, 0x8000000000000000 + + .equ DENIED_PADDR, 0x90000000 + .equ ALLOWED_PADDR, 0x80000000 + .equ DENIED_VADDR, 0x50000000 + .equ ALLOWED_VADDR, 0x40000000 + .equ INITIAL_VALUE, 0x13579bdf + .equ STORE_VALUE, 0x2468ace0 + + .section .text + .globl main +main: + // Initialize the location before locking its PMP entry. + li t1, DENIED_PADDR + li t2, INITIAL_VALUE + sw t2, 0(t1) + + // Entry 0 allows [0, 0x90000000), entry 1 makes + // [0x90000000, 0x90001000) locked and read-only, and entry 2 allows the + // remainder through 0xc0000000. The surrounding entries allow S-mode + // page-table walks and the load paired with each denied store. + li t0, 0x24000000 + csrw pmpaddr0, t0 + li t0, 0x24000400 + csrw pmpaddr1, t0 + li t0, 0x30000000 + csrw pmpaddr2, t0 + li t0, 0x000f890f + csrw pmpcfg0, t0 + + la t0, trap_count + sw zero, 0(t0) + +#ifdef PMP_NO_MMU + // Exercise the no-MMU response path. + li t0, DENIED_PADDR + call set_expected_tval + li t1, DENIED_PADDR + li t2, STORE_VALUE + li t4, ALLOWED_PADDR + .option push + .option norvc + sw t2, 0(t1) + lw t3, 0(t4) + .option pop + li t0, 1 + call check_result +#else + // Install a one-GiB Sv39 leaf mapping [0x40000000, 0x80000000) to + // [0x80000000, 0xc0000000). DENIED_VADDR therefore translates to the + // PMP-protected DENIED_PADDR. + la t0, root_page_table + srli t0, t0, 12 + li t1, SATP_MODE_SV39 + or t0, t0, t1 + csrw satp, t0 + + // Flush the DTLB so that the denied store itself takes the miss/PTW path. + sfence.vma + li t0, DENIED_VADDR + call set_expected_tval + call enable_s_data_translation + li t1, DENIED_VADDR + li t2, STORE_VALUE + li t4, ALLOWED_VADDR + .option push + .option norvc + sw t2, 0(t1) + lw t3, 0(t4) + .option pop + call disable_data_translation + li t0, 1 + call check_result + + // Refill the DTLB with an allowed read, then repeat the adjacent + // denied-store/allowed-load sequence on the hit path. + sfence.vma + li t0, DENIED_VADDR + call set_expected_tval + call enable_s_data_translation + li t1, DENIED_VADDR + lw t3, 0(t1) + li t2, STORE_VALUE + li t4, ALLOWED_VADDR + .option push + .option norvc + sw t2, 0(t1) + lw t3, 0(t4) + .option pop + call disable_data_translation + li t0, 2 + call check_result +#endif + +pass: + li a0, 0 + tail exit + +fail: + li a0, 1 + tail exit + +set_expected_tval: + la t1, expected_tval + sd t0, 0(t1) + ret + +enable_s_data_translation: + li t0, MSTATUS_MPP | MSTATUS_MPRV + csrc mstatus, t0 + li t0, MSTATUS_MPP_S | MSTATUS_MPRV + csrs mstatus, t0 + ret + +disable_data_translation: + li t0, MSTATUS_MPRV + csrc mstatus, t0 + ret + +check_result: + la t1, trap_count + lw t1, 0(t1) + bne t0, t1, fail + li t1, DENIED_PADDR + lw t1, 0(t1) + li t2, INITIAL_VALUE + bne t1, t2, fail + ret + + .globl handle_trap +handle_trap: + li t0, MSTATUS_MPRV + csrc mstatus, t0 + + li t0, STORE_ACCESS_FAULT + bne a0, t0, trap_fail + + csrr t0, mtval + la t1, expected_tval + ld t1, 0(t1) + bne t0, t1, trap_fail + + la t0, trap_count + lw t1, 0(t0) + addi t1, t1, 1 + sw t1, 0(t0) + + // crt.S writes the returned address to mepc before executing mret. + addi a0, a1, 4 + ret + +trap_fail: + li a0, 1 + tail exit + + .section .data + .align 3 +expected_tval: + .dword 0 +trap_count: + .word 0 + +#ifndef PMP_NO_MMU + // Sv39 root entry 1 is a one-GiB leaf with PPN 0x80000 and V/R/W/X/A/D. + .section .page_table, "aw", @progbits + .balign 4096 +root_page_table: + .dword 0 + .dword 0x00000000200000cf + .rept 510 + .dword 0 + .endr +#endif diff --git a/verif/tests/custom/pmp/lsu_tor_test.S b/verif/tests/custom/pmp/lsu_tor_test.S new file mode 100644 index 00000000000..7989e662394 --- /dev/null +++ b/verif/tests/custom/pmp/lsu_tor_test.S @@ -0,0 +1,125 @@ +# ------------------------------------------------------------------------------ +# Copyright 2024 Robert Bosch GmbH +# +# SPDX-License-Identifier: SHL-0.51 +# +# Original Author: Konstantinos LEVENTOS - Robert Bosch France SAS +# ------------------------------------------------------------------------------ +# lsu_tor_test.S (TST16-11, TST16-21, TST16-31) +# ------------------------------------------------------------------------------ + + .text + .globl main +main: + + # Configure PMP using TOR. + + # From 0x0000_0000 to 0x0000_1000 only Execute. + li t0, 0x00000400 + csrw pmpaddr0, t0 + + # From 0x0000_1000 to 0x0001_0000 no Permissions. + li t0, 0x00004000 + csrw pmpaddr1, t0 + + # From 0x0001_0000 to 0x0002_0000 only Execute. + li t0, 0x00008000 + csrw pmpaddr2, t0 + + # From 0x0002_0000 to 0x8000_0000 no Permissions. + li t0, 0x20000000 + csrw pmpaddr3, t0 + + # From 0x8000_0000 to 0xC000_0000 Read-Write-Execute. + li t0, 0x30000000 + csrw pmpaddr4, t0 + + + # Addr 0-3 configs, written in cfg0, with LOCK OFF, and TOR. + li t0, 0x080c080c + csrw pmpcfg0, t0 + csrr t1, pmpcfg0 + bne t0, t1, fail + + # Addr 4 config, written in cfg1, with LOCK OFF, and TOR. + li t0, 0x0000000f + csrw pmpcfg1, t0 + csrr t1, pmpcfg1 + bne t0, t1, fail + + + # Do the READ-WRITE test. + + # Check 1 read-write test, at 0x8000_0000. + li t1, 0x80000000 + li t2, 0xEFFACED1 + sw t2, 0(t1) + lw t3, 0(t1) + bne t2, t3, fail + + # Check 2 read-write test, at 0x9000_0000. + li t1, 0x90000000 + li t2, 0xACCEDED2 + sw t2, 0(t1) + lw t3, 0(t1) + bne t2, t3, fail + + # Check 3 read-write test, at 0xA000_0000. + li t1, 0xA0000000 + li t2, 0xDEFACED3 + sw t2, 0(t1) + lw t3, 0(t1) + bne t2, t3, fail + + # Check 4 read-write test, at 0xB000_0000. + li t1, 0xB0000000 + li t2, 0xDEC0DED4 + sw t2, 0(t1) + lw t3, 0(t1) + bne t2, t3, fail + + + # Do the EXEC "RET" test. + + # Exec test 1, at 0x0000_0800. + li t0, 0xA0000800 + li t1, 0x8082 + sw t1, 0(t0) + lw t2, 0(t0) + bne t1, t2, fail + jalr t0 + + # Exec test 2, at 0x0001_8000. + li t0, 0xB0018000 + li t1, 0x8082 + sw t1, 0(t0) + lw t2, 0(t0) + bne t1, t2, fail + jalr t0 + + # Exec test 3, at 0x9800_0000. + li t0, 0x98000000 + li t1, 0x8082 + sw t1, 0(t0) + lw t2, 0(t0) + bne t1, t2, fail + jalr t0 + + # Exec test 4, at 0xA800_0000. + li t0, 0xA8000000 + li t1, 0x8082 + sw t1, 0(t0) + lw t2, 0(t0) + bne t1, t2, fail + jalr t0 + + +pass: + # Success post-processing + li a0, 0x0; + jal exit; + +fail: + # Failure post-processing + li a0, 0x1; + jal exit; diff --git a/verif/tests/custom/sv32/vm_access_bit_level_0.S b/verif/tests/custom/sv32/vm_access_bit_level_0.S index 33b23aee17c..5cf565c6884 100644 --- a/verif/tests/custom/sv32/vm_access_bit_level_0.S +++ b/verif/tests/custom/sv32/vm_access_bit_level_0.S @@ -8,7 +8,7 @@ # and PTE has pte.A=0, then accessing it would raise page fault # exception of the corresponding access type. # -# - Set pte.r=1 & pte.a=0 and test the read acces. +# - Set pte.r=1 & pte.a=0 and test the read access. # - Set pte.w=1 & pte.a=0 and test the write access. # - Set pte.x=1 & pte.a=0 and test the execute access. # diff --git a/verif/tests/custom/sv32/vm_access_bit_level_1.S b/verif/tests/custom/sv32/vm_access_bit_level_1.S index 048b0276454..64a4e6b7ab7 100644 --- a/verif/tests/custom/sv32/vm_access_bit_level_1.S +++ b/verif/tests/custom/sv32/vm_access_bit_level_1.S @@ -8,7 +8,7 @@ # and PTE has pte.A=0, then accessing it would raise page fault # exception of the corresponding access type. # -# - Set pte.r=1 & pte.a=0 and test the read acces. +# - Set pte.r=1 & pte.a=0 and test the read access. # - Set pte.w=1 & pte.a=0 and test the write access. # - Set pte.x=1 & pte.a=0 and test the execute access. # diff --git a/verif/tests/custom/sv32/vm_mxr_clear_level_0.S b/verif/tests/custom/sv32/vm_mxr_clear_level_0.S index d78caff8abc..76656534e7e 100644 --- a/verif/tests/custom/sv32/vm_mxr_clear_level_0.S +++ b/verif/tests/custom/sv32/vm_mxr_clear_level_0.S @@ -8,7 +8,7 @@ # then read access on that PTE should raise load page fault exception. # # - Set pte.r=0 & pte.w=0 & pte.x=1 & s/mstatus.MXR=0 and test the -# read acces. +# read access. # #======================================================================= diff --git a/verif/tests/custom/sv32/vm_mxr_clear_level_1.S b/verif/tests/custom/sv32/vm_mxr_clear_level_1.S index 93a41ab5bd0..da50e8d223d 100644 --- a/verif/tests/custom/sv32/vm_mxr_clear_level_1.S +++ b/verif/tests/custom/sv32/vm_mxr_clear_level_1.S @@ -8,7 +8,7 @@ # then read access on that PTE should raise load page fault exception. # # - Set pte.r=0 & pte.w=0 & pte.x=1 & s/mstatus.MXR=0 and test the -# read acces. +# read access. # #======================================================================= diff --git a/verif/tests/custom/sv32/vm_pmp_check_level_0.S b/verif/tests/custom/sv32/vm_pmp_check_level_0.S index 84de67468e4..f8311f0f59c 100644 --- a/verif/tests/custom/sv32/vm_pmp_check_level_0.S +++ b/verif/tests/custom/sv32/vm_pmp_check_level_0.S @@ -10,7 +10,7 @@ # raise access fault exception. # # - Remove read PMP permission of translated Physical Address in pmpcfg -# and test the read acces. +# and test the read access. # - Remvoe write PMP permission of translated Physical Address in pmpcfg # and test the write access. # - Remove execute PMP permission of translated Physical Address in diff --git a/verif/tests/custom/sv32/vm_pmp_check_level_1.S b/verif/tests/custom/sv32/vm_pmp_check_level_1.S index 5ff2915e03f..9c55281047c 100644 --- a/verif/tests/custom/sv32/vm_pmp_check_level_1.S +++ b/verif/tests/custom/sv32/vm_pmp_check_level_1.S @@ -10,7 +10,7 @@ # raise access fault exception. # # - Remove read PMP permission of translated Physical Address in pmpcfg -# and test the read acces. +# and test the read access. # - Remvoe write PMP permission of translated Physical Address in pmpcfg # and test the write access. # - Remove execute PMP permission of translated Physical Address in diff --git a/verif/tests/custom/sv32/vm_sum_clear_level_0.S b/verif/tests/custom/sv32/vm_sum_clear_level_0.S index 9d5e87cb830..8b7c109e288 100644 --- a/verif/tests/custom/sv32/vm_sum_clear_level_0.S +++ b/verif/tests/custom/sv32/vm_sum_clear_level_0.S @@ -8,7 +8,7 @@ # supervisor mode would raise page fault exception of the # corresponding access type. # -# - Set pte.u=1 & s/mstatus.SUM = 0 and test the read acces. +# - Set pte.u=1 & s/mstatus.SUM = 0 and test the read access. # - Set pte.u=1 & s/mstatus.SUM = 0 and test the write access. # - Set pte.u=1 & s/mstatus.SUM = 0 and test the execute access. # diff --git a/verif/tests/custom/sv32/vm_sum_clear_level_1.S b/verif/tests/custom/sv32/vm_sum_clear_level_1.S index 5ffde1f9c33..3ff1061de69 100644 --- a/verif/tests/custom/sv32/vm_sum_clear_level_1.S +++ b/verif/tests/custom/sv32/vm_sum_clear_level_1.S @@ -8,7 +8,7 @@ # supervisor mode would raise page fault exception of the # corresponding access type. # -# - Set pte.u=1 & s/mstatus.SUM = 0 and test the read acces. +# - Set pte.u=1 & s/mstatus.SUM = 0 and test the read access. # - Set pte.u=1 & s/mstatus.SUM = 0 and test the write access. # - Set pte.u=1 & s/mstatus.SUM = 0 and test the execute access. # diff --git a/verif/tests/custom/sv32/vm_sum_set_level_0.S b/verif/tests/custom/sv32/vm_sum_set_level_0.S index 4b30fe81818..e782b36e7d0 100644 --- a/verif/tests/custom/sv32/vm_sum_set_level_0.S +++ b/verif/tests/custom/sv32/vm_sum_set_level_0.S @@ -11,7 +11,7 @@ # When satp.mode=sv32, PTE has (r,w,x) PMP permissions, PTE has non-reserved RWX # encoding, and pte.v=1, then test the following in supervisor mode for level0 PTE. # -# - Set pte.r=1 & pte.u=1 & s/mstatus.SUM = 1 and test the read acces. +# - Set pte.r=1 & pte.u=1 & s/mstatus.SUM = 1 and test the read access. # - Set pte.w=1 & pte.u=1 & s/mstatus.SUM = 1 and test the write access. # - Set pte.x=1 & pte.u=1 & s/mstatus.SUM = 1 and test the execute access. # diff --git a/verif/tests/custom/sv32/vm_sum_set_level_1.S b/verif/tests/custom/sv32/vm_sum_set_level_1.S index e28100643a5..f565d310b4e 100644 --- a/verif/tests/custom/sv32/vm_sum_set_level_1.S +++ b/verif/tests/custom/sv32/vm_sum_set_level_1.S @@ -11,7 +11,7 @@ # When satp.mode=sv32, PTE has (r,w,x) PMP permissions, PTE has non-reserved RWX # encoding, and pte.v=1, then test the following in supervisor mode for level1 PTE. # -# - Set pte.r=1 & pte.u=1 & s/mstatus.SUM = 1 and test the read acces. +# - Set pte.r=1 & pte.u=1 & s/mstatus.SUM = 1 and test the read access. # - Set pte.w=1 & pte.u=1 & s/mstatus.SUM = 1 and test the write access. # - Set pte.x=1 & pte.u=1 & s/mstatus.SUM = 1 and test the execute access. # diff --git a/verif/tests/custom/sv39/noncanonical.S b/verif/tests/custom/sv39/noncanonical.S new file mode 100644 index 00000000000..1c100a8ea01 --- /dev/null +++ b/verif/tests/custom/sv39/noncanonical.S @@ -0,0 +1,141 @@ +# See LICENSE for license details. + +#***************************************************************************** +# noncanonical.S +#----------------------------------------------------------------------------- +# +# Test that non-canonical SV39 virtual addresses generate page-fault +# exceptions. In SV39, bits [63:39] of a virtual address must all equal +# bit [38]. When they do not, the hardware must raise: +# +# - LOAD_PAGE_FAULT (mcause 13) for loads, +# - STORE_PAGE_FAULT (mcause 15) for stores, +# - FETCH_PAGE_FAULT (mcause 12) for instruction fetches. +# +# See: https://github.com/openhwgroup/cva6/issues/371 +# + +#include "riscv_test.h" +#include "test_macros.h" + +#if (DRAM_BASE >> 30 << 30) != DRAM_BASE +# error This test requires DRAM_BASE be SV39 superpage-aligned +#endif + +RVTEST_RV64M +RVTEST_CODE_BEGIN + + # ------------------------------------------------------------------ + # Set up SV39 with a 1 GiB identity-mapped superpage at DRAM_BASE. + # The page table entry has full permissions so that only the + # non-canonical address check can cause a fault. + # ------------------------------------------------------------------ + li a0, (SATP_MODE & ~(SATP_MODE<<1)) * SATP_MODE_SV39 + la a1, page_table_1 + srl a1, a1, RISCV_PGSHIFT + or a1, a1, a0 + csrw satp, a1 + sfence.vma + + # Build a non-canonical virtual address: 0x0000_0080_0000_0000. + # Bit 39 = 1, bit 38 = 0 -> bits [63:39] != bit [38]. + li s1, 1 + slli s1, s1, 39 + + # ================================================================== + # Test 2 -- Load from non-canonical address (expect LOAD_PAGE_FAULT) + # ================================================================== + li TESTNUM, 2 + + # Enable S-mode address translation for loads/stores while staying + # in M-mode, by setting MPRV=1 and MPP=S. + li t0, MSTATUS_MPP | MSTATUS_MPRV + csrc mstatus, t0 + li t0, ((MSTATUS_MPP & ~(MSTATUS_MPP<<1)) * PRV_S) | MSTATUS_MPRV + csrs mstatus, t0 + + lb t0, 0(s1) + j fail # should not be reached + + # ================================================================== + # Test 3 -- Store to non-canonical address (expect STORE_PAGE_FAULT) + # ================================================================== +test_3: + li TESTNUM, 3 + + sb t0, 0(s1) + j fail # should not be reached + + # ================================================================== + # Test 4 -- Fetch from non-canonical address (expect FETCH_PAGE_FAULT) + # ================================================================== +test_4: + li TESTNUM, 4 + + # Clear MPRV so subsequent instructions use M-mode for data access. + li t0, MSTATUS_MPRV + csrc mstatus, t0 + + # Prepare to enter S-mode via mret: set MPP = S. + li t0, MSTATUS_MPP + csrc mstatus, t0 + li t0, (MSTATUS_MPP & ~(MSTATUS_MPP<<1)) * PRV_S + csrs mstatus, t0 + + # Set the return address to the non-canonical address and mret. + # The CPU will attempt an instruction fetch from s1 in S-mode + # with SV39 translation active, triggering FETCH_PAGE_FAULT. + csrw mepc, s1 + mret + # (control never reaches here -- the fetch itself faults) + + TEST_PASSFAIL + + # ------------------------------------------------------------------ + # M-mode trap handler + # ------------------------------------------------------------------ + .align 2 + .global mtvec_handler +mtvec_handler: + csrr t0, mcause + + # --- Test 2: expect LOAD_PAGE_FAULT --- + li t1, 2 + bne TESTNUM, t1, 1f + li t1, CAUSE_LOAD_PAGE_FAULT + bne t0, t1, fail + + # Re-establish MPRV + MPP=S for the store test and jump to test_3. + li t0, MSTATUS_MPP | MSTATUS_MPRV + csrc mstatus, t0 + li t0, ((MSTATUS_MPP & ~(MSTATUS_MPP<<1)) * PRV_S) | MSTATUS_MPRV + csrs mstatus, t0 + j test_3 + +1: + # --- Test 3: expect STORE_PAGE_FAULT --- + li t1, 3 + bne TESTNUM, t1, 1f + li t1, CAUSE_STORE_PAGE_FAULT + bne t0, t1, fail + j test_4 + +1: + # --- Test 4: expect FETCH_PAGE_FAULT --- + li t1, 4 + bne TESTNUM, t1, fail + li t1, CAUSE_FETCH_PAGE_FAULT + bne t0, t1, fail + j pass + +RVTEST_CODE_END + + .data +RVTEST_DATA_BEGIN + + TEST_DATA + +.align 12 +page_table_1: .dword (DRAM_BASE/RISCV_PGSIZE << PTE_PPN_SHIFT) | PTE_V | PTE_U | PTE_R | PTE_W | PTE_X | PTE_A | PTE_D + +RVTEST_DATA_END diff --git a/verif/tests/custom/trigger_tests/etrigger_test.S b/verif/tests/custom/trigger_tests/etrigger_test.S new file mode 100644 index 00000000000..0ec024f84f5 --- /dev/null +++ b/verif/tests/custom/trigger_tests/etrigger_test.S @@ -0,0 +1,51 @@ +.section .text +.globl _start +_start: + la t0, trap_handler + csrw mtvec, t0 + + li t1, 0x8 + csrs mstatus, t1 + + li x2, 1 + csrw tselect, x2 + + li x3, 0x00000008 # match value for ebreak loaded here + csrw tdata2, x3 + + li x4, 0x50000201 # match exception value with tdata2 and enter debug mode + csrw tdata1, x4 + + # dummy instructions + csrr x5, tdata1 + nop + nop + nop + ebreak // match here + nop + nop + nop + nop + nop + +exit: + li a1, 1 + la t2, tohost + sw a1, 0(t2) + j exit + +trap_handler: + csrr t3, mcause + csrr t4, mepc + + addi t4, t4, 4 + csrw mepc, t4 + + mret + +.data +.align 4 +.global tohost +tohost: .word 0 +.global fromhost +fromhost: .word 0 diff --git a/verif/tests/custom/trigger_tests/icount_break_test.S b/verif/tests/custom/trigger_tests/icount_break_test.S new file mode 100644 index 00000000000..fffb64cc635 --- /dev/null +++ b/verif/tests/custom/trigger_tests/icount_break_test.S @@ -0,0 +1,63 @@ +.text +.globl _start +_start: + # Ensure DebugEn is disabled when using action 0 i.e. breakpoint action + la t0, trap_handler + csrw mtvec, t0 + + li t1, 0x8 + csrs mstatus, t1 + + li x2, 0 + csrw tselect, x2 + + + li x2, 0x30003e00 # count 15 instructions and go into breakpoint exception + nop + nop + nop + csrw tdata1, x2 + + # dummy instructions to count + csrr x7, tdata1 + csrr x7, tdata1 + csrr x7, tdata1 + csrr x7, tdata1 + li x3, 1 + nop + nop + nop + li x4, 2 + nop + nop + nop + li x5, 3 + nop + nop + nop + li x2, 0 + nop + li x2, 1 + li x2, 2 + +exit: + li a1, 1 + la t2, tohost + sw a1, 0(t2) + j exit + +trap_handler: + csrr t3, mcause + csrr t4, mepc + + addi t4, t4, 4 + csrw mepc, t4 + + mret + +.data +.align 4 +.global tohost +tohost: .word 0 +.global fromhost +fromhost: .word 0 diff --git a/verif/tests/custom/trigger_tests/icount_debug_test.S b/verif/tests/custom/trigger_tests/icount_debug_test.S new file mode 100644 index 00000000000..65ac846ffc6 --- /dev/null +++ b/verif/tests/custom/trigger_tests/icount_debug_test.S @@ -0,0 +1,47 @@ +.text +.globl _start +_start: + li x2, 0 + csrw tselect, x2 + + + li x2, 0x30003e01 # count 15 instructions and enter debug mode + nop + nop + nop + csrw tdata1, x2 + + # dummy instructions to count + csrr x7, tdata1 + csrr x7, tdata1 + csrr x7, tdata1 + csrr x7, tdata1 + li x3, 1 + nop + nop + nop + li x4, 2 + nop + nop + nop + li x5, 3 + nop + nop + nop + li x2, 0 + nop + li x2, 1 + li x2, 2 + +exit: + li a1, 1 + la t2, tohost + sw a1, 0(t2) + j exit + +.data +.align 4 +.global tohost +tohost: .word 0 +.global fromhost +fromhost: .word 0 diff --git a/verif/tests/custom/trigger_tests/itrigger_test.S b/verif/tests/custom/trigger_tests/itrigger_test.S new file mode 100644 index 00000000000..ad3813eb8e6 --- /dev/null +++ b/verif/tests/custom/trigger_tests/itrigger_test.S @@ -0,0 +1,58 @@ +.section .text +.globl _start +_start: + # For emulating a software interrupt + la t0, trap_handler + csrw mtvec, t0 + + li t1, 0x8 + csrs mie, t1 + csrs mstatus, t1 + + # Trigger setup + li x2, 1 + csrw tselect, x2 + + li x3, 0x00000008 # match on software interrupt + csrw tdata2, x3 + + li x4, 0x40000201 # match on software interrupt and enter debug mode + csrw tdata1, x4 + csrr x5, tdata1 + + # For emulating a software interrupt + li t2, 0x02000000 # msip (clint) base address + li t3, 1 + sw t3, 0(t2) + fence + wfi + nop + nop + nop + nop + nop + nop + +exit: + li a1, 1 + la t2, tohost + sw a1, 0(t2) + j exit + +trap_handler: + # For emulating a software interrupt + csrr a0, mcause + csrr a1, mepc + + li t0, 0x02000000 + sw zero, 0(t0) # clear MSIP (for software interrupt) + fence + + mret + +.data +.align 4 +.global tohost +tohost: .word 0 +.global fromhost +fromhost: .word 0 diff --git a/verif/tests/custom/trigger_tests/mcontrol6_tests.S b/verif/tests/custom/trigger_tests/mcontrol6_tests.S new file mode 100644 index 00000000000..fd71722e35e --- /dev/null +++ b/verif/tests/custom/trigger_tests/mcontrol6_tests.S @@ -0,0 +1,85 @@ +.text +.globl _start +_start: + # Mcontrol6 trigger only supports action = 1 i.e. enter debug mode + li x2, 0 + csrw tselect, x2 + + li x5, 0x80003000 ## test address for matching + li x6, 0x12345678 ## test data for matching + + li x3, 0x12345678 # match value loaded here + csrw tdata2, x3 + + ## Trigger Configuration + ## Test 1): store with data match + li x4, 0x60201042 + csrw tdata1, x4 + nop + nop + nop + nop + sw x6, 0(x5) + + ##Test 2): load with data match + # li x4, 0x60201041 + # csrw tdata1, x4 + # nop + # nop + # nop + # nop + # nop + # lw x7, 0(x5) + + ## Test 3): store with address match + # li x4, 0x60001042 + # csrw tdata1, x4 + # sw x6, 4(x5) + # nop + # nop + # nop + + ## Test 4): load with address match + # li x4, 0x60001041 + # csrw tdata1, x4 + # lw x7, 4(x5) + # nop + # nop + # nop + + ## Test 5): execute with instruction match + # li x4, 0x60201044 + # csrw tdata1, x4 + # add x8, x2, x3 + # nop + # nop + + # # Test 6): execute with address match + # li x4, 0x60001044 + # csrw tdata1, x4 + # csrr x7, tdata1 + # nop + # nop + # nop + # nop + # nop + # nop + + nop + nop + nop + nop + nop + +exit: + li x1, 1 + la t0, tohost + sw x1, 0(t0) + j exit + +.data +.align 4 +.global tohost +tohost: .word 0 +.global fromhost +fromhost: .word 0 \ No newline at end of file diff --git a/verif/tests/custom/trigger_tests/sdtrig_action_legal.S b/verif/tests/custom/trigger_tests/sdtrig_action_legal.S new file mode 100644 index 00000000000..bb6eb1f784a --- /dev/null +++ b/verif/tests/custom/trigger_tests/sdtrig_action_legal.S @@ -0,0 +1,76 @@ +// Copyright 2026 10x Engineers +// +// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +// You may obtain a copy of the License at https://solderpad.org/licenses/ +// +// Issue #3622: tdata1 never holds dmode=0 with action=1. +// A write from M-mode cannot set dmode. Thus action=1 becomes action=0. + +#include "sdtrig_test.h" + +#define WRITE_READ_CHECK(wval, rval, n) \ + li t0, wval; \ + csrw tdata1, t0; \ + csrr t1, tdata1; \ + li t2, rval; \ + CHECK_EQ(t1, t2, n) + + .option norvc + .section .text.init + .global _start +_start: + la t0, trap_handler + csrw mtvec, t0 + // MIE=1 lets a breakpoint fire in M-mode on harts that use the MIE + // reentrancy rule. No interrupt is enabled in mie. + csrsi mstatus, MSTATUS_MIE + csrw tselect, zero + + // 1. mcontrol6 with dmode=1 and action=1 + WRITE_READ_CHECK(TDATA1_TYPE(TYPE_MCONTROL6) | TDATA1_DMODE | MC6_ACTION(1) | MC6_M | MC6_EXECUTE, + TDATA1_TYPE(TYPE_MCONTROL6) | MC6_M | MC6_EXECUTE, 1) + // 2. mcontrol6 with dmode=0 and action=1 + WRITE_READ_CHECK(TDATA1_TYPE(TYPE_MCONTROL6) | MC6_ACTION(1) | MC6_M | MC6_EXECUTE, + TDATA1_TYPE(TYPE_MCONTROL6) | MC6_M | MC6_EXECUTE, 2) + // 3. icount with dmode=1 and action=1 + WRITE_READ_CHECK(TDATA1_TYPE(TYPE_ICOUNT) | TDATA1_DMODE | ICOUNT_COUNT(5) | ICOUNT_U | ACTION(1), + TDATA1_TYPE(TYPE_ICOUNT) | ICOUNT_COUNT(5) | ICOUNT_U, 3) + // 4. etrigger with dmode=0 and action=1 + WRITE_READ_CHECK(TDATA1_TYPE(TYPE_ETRIGGER) | XTRIG_U | ACTION(1), + TDATA1_TYPE(TYPE_ETRIGGER) | XTRIG_U, 4) + // 5. itrigger with dmode=1 and action=1 + WRITE_READ_CHECK(TDATA1_TYPE(TYPE_ITRIGGER) | TDATA1_DMODE | XTRIG_U | ACTION(1), + TDATA1_TYPE(TYPE_ITRIGGER) | XTRIG_U, 5) + + // 6. An execute trigger written with action=1 from M-mode gives a + // breakpoint exception on "target". It does not enter Debug Mode. + la t0, target + csrw tdata2, t0 + li t0, TDATA1_TYPE(TYPE_MCONTROL6) | MC6_ACTION(1) | MC6_M | MC6_EXECUTE + csrw tdata1, t0 + li s0, 0 +target: + nop + // The trap handler sets s0 to 1. + li t2, 1 + CHECK_EQ(s0, t2, 6) + j test_pass + + .align 4 +trap_handler: + // Disable the trigger, then do the checks of the trap. + csrw tdata1, zero + csrr t1, mcause + li t2, CAUSE_BREAKPOINT + CHECK_EQ(t1, t2, 7) + csrr t1, mepc + la t2, target + CHECK_EQ(t1, t2, 8) + li s0, 1 + mret + +TEST_PASS_FAIL + +TEST_DATA diff --git a/verif/tests/custom/trigger_tests/sdtrig_etrigger.S b/verif/tests/custom/trigger_tests/sdtrig_etrigger.S new file mode 100644 index 00000000000..ca03d464009 --- /dev/null +++ b/verif/tests/custom/trigger_tests/sdtrig_etrigger.S @@ -0,0 +1,139 @@ +// Copyright 2026 10x Engineers +// +// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +// You may obtain a copy of the License at https://solderpad.org/licenses/ +// +// Issue #3620: an etrigger fires only after an exception trap. +// It does not fire when no trap occurs. It does not fire on an interrupt. + +#include "sdtrig_test.h" + + .option norvc + .section .text.init + .global _start +_start: + la t0, m_handler + csrw mtvec, t0 + la t0, s_handler + csrw stvec, t0 + csrw medeleg, zero + csrw mideleg, zero + csrw satp, zero + PMP_ALLOW_ALL + li s1, 0 // number of M-mode traps + + // 1. Exception code 0 is selected. No trap occurs. The trigger does not fire. + csrw tselect, zero + li t0, 1 + csrw tdata2, t0 + li t0, TDATA1_TYPE(TYPE_ETRIGGER) | XTRIG_M + csrw tdata1, t0 + .rept 20 + nop + .endr + CHECK_EQ(s1, zero, 1) + + // 2. Exception code 7 is selected. A machine timer interrupt (code 7) + // occurs. The trigger does not fire. + li t0, 1 << 7 + csrw tdata2, t0 + li t0, CLINT_MTIMECMP + sw zero, 0(t0) + sw zero, 4(t0) + li t0, MIP_MTIP + csrw mie, t0 + csrsi mstatus, MSTATUS_MIE + li t3, 200 +1: + addi t3, t3, -1 + bnez t3, 1b + csrci mstatus, MSTATUS_MIE + csrw mie, zero + // One trap only: the interrupt. + li t2, 1 + CHECK_EQ(s1, t2, 2) + li t2, MCAUSE_INT | 7 + CHECK_EQ(s2, t2, 3) + + // 3. Exception code 2 is selected for U-mode. An illegal instruction in + // U-mode traps to S-mode. The trigger fires just before the first + // instruction of the S-mode handler. The breakpoint goes to M-mode. + li s1, 0 + li s3, 0 // 0: part 3, 1: part 4 + li t0, 1 << CAUSE_ILLEGAL + csrw tdata2, t0 + li t0, TDATA1_TYPE(TYPE_ETRIGGER) | XTRIG_U + csrw tdata1, t0 + li t0, 1 << CAUSE_ILLEGAL + csrw medeleg, t0 + li t0, MSTATUS_MPP_MASK + csrc mstatus, t0 + la t0, u_code + csrw mepc, t0 + mret + +u_code: + .word 0 // illegal instruction + li a0, 4 + j test_fail + +s_code: + .word 0 // illegal instruction + li a0, 11 + j test_fail + + .align 4 +s_handler: + li a0, 5 + j test_fail + + .align 4 +m_handler: + addi s1, s1, 1 + csrr s2, mcause + bltz s2, m_interrupt + csrw tdata1, zero + li t2, CAUSE_BREAKPOINT + CHECK_EQ(s2, t2, 6) + csrr t1, mepc + la t2, s_handler + CHECK_EQ(t1, t2, 7) + csrr t1, mtval + CHECK_EQ(t1, zero, 10) + csrr t1, scause + li t2, CAUSE_ILLEGAL + CHECK_EQ(t1, t2, 8) + csrr t1, sepc + la t2, u_code + beqz s3, 1f + la t2, s_code +1: + CHECK_EQ(t1, t2, 9) + bnez s3, test_pass + + // 4. Exception code 2 is selected for S-mode. An illegal instruction in + // S-mode traps to S-mode. The trigger fires just before the first + // instruction of the S-mode handler. The breakpoint goes to M-mode. + li s3, 1 + li t0, TDATA1_TYPE(TYPE_ETRIGGER) | XTRIG_S + csrw tdata1, t0 + li t0, MSTATUS_MPP_MASK + csrc mstatus, t0 + li t0, MSTATUS_MPP_S + csrs mstatus, t0 + la t0, s_code + csrw mepc, t0 + mret + +m_interrupt: + li t0, CLINT_MTIMECMP + li t1, -1 + sw t1, 0(t0) + sw t1, 4(t0) + mret + +TEST_PASS_FAIL + +TEST_DATA diff --git a/verif/tests/custom/trigger_tests/sdtrig_icount_fire.S b/verif/tests/custom/trigger_tests/sdtrig_icount_fire.S new file mode 100644 index 00000000000..3399bc030c3 --- /dev/null +++ b/verif/tests/custom/trigger_tests/sdtrig_icount_fire.S @@ -0,0 +1,89 @@ +// Copyright 2026 10x Engineers +// +// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +// You may obtain a copy of the License at https://solderpad.org/licenses/ +// +// Issue #3647: icount fires on the next instruction to execute. mepc holds +// the address of this instruction. A trigger with count=0 does not fire. + +#include "sdtrig_test.h" + + .option norvc + .section .text.init + .global _start +_start: + la t0, m_handler + csrw mtvec, t0 + // MIE=1 lets a breakpoint fire in M-mode on harts that use the MIE + // reentrancy rule. No interrupt is enabled in mie. + csrsi mstatus, MSTATUS_MIE + li s0, 0x80 + csrw tselect, zero + li s1, 0 // test phase + la s5, scratch + + // 1. count=0. The trigger does not fire. + li t0, TDATA1_TYPE(TYPE_ICOUNT) | ICOUNT_COUNT(0) | ICOUNT_M + csrw tdata1, t0 + .rept 20 + nop + .endr + csrw tdata1, zero + + // 2. count=1. The write to tdata1 does not count. The csrr counts. + // The trigger fires before the store. + li s1, 2 + li t0, TDATA1_TYPE(TYPE_ICOUNT) | ICOUNT_COUNT(1) | ICOUNT_M + csrw tdata1, t0 + csrr t1, mstatus +p2_fire: + SREG t1, 0(s5) + li a0, 1 + j test_fail + +phase3: + // 3. count=2. The trigger fires before the second addi. + li s1, 3 + li t0, TDATA1_TYPE(TYPE_ICOUNT) | ICOUNT_COUNT(2) | ICOUNT_M + csrw tdata1, t0 + csrr t1, mstatus + addi s4, s4, 1 +p3_fire: + addi s4, s4, 1 + li a0, 2 + j test_fail + + .align 4 +m_handler: + csrr s2, mcause + csrr s3, mepc + csrr s6, mtval + csrw tdata1, zero + li t2, CAUSE_BREAKPOINT + CHECK_EQ(s2, t2, 3) + CHECK_EQ(s6, zero, 4) + li t2, 2 + bne s1, t2, m_phase3 + la t2, p2_fire + CHECK_EQ(s3, t2, 5) + la t0, phase3 + csrw mepc, t0 + mret + +m_phase3: + li t2, 3 + CHECK_EQ(s1, t2, 6) + la t2, p3_fire + CHECK_EQ(s3, t2, 7) + j test_pass + +TEST_PASS_FAIL + + .data + .align 3 +scratch: + .dword 0 + +TEST_DATA diff --git a/verif/tests/custom/trigger_tests/sdtrig_icount_modes.S b/verif/tests/custom/trigger_tests/sdtrig_icount_modes.S new file mode 100644 index 00000000000..9f538124ea5 --- /dev/null +++ b/verif/tests/custom/trigger_tests/sdtrig_icount_modes.S @@ -0,0 +1,149 @@ +// Copyright 2026 10x Engineers +// +// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +// You may obtain a copy of the License at https://solderpad.org/licenses/ +// +// Issue #3619: icount counts only the instructions and the traps of the +// privilege modes where the trigger is enabled. + +#include "sdtrig_test.h" + + .option norvc + .section .text.init + .global _start +_start: + la t0, m_handler + csrw mtvec, t0 + csrw medeleg, zero + csrw mideleg, zero + csrw satp, zero + PMP_ALLOW_ALL + li s1, 0 // test phase + csrw tselect, zero + + // 1. count=3, u=1. The M-mode instructions and the mret do not count. + // The trigger fires before the fourth U-mode instruction. + li t0, MSTATUS_MPP_MASK + csrc mstatus, t0 + la t0, u1_code + csrw mepc, t0 + li t0, TDATA1_TYPE(TYPE_ICOUNT) | ICOUNT_COUNT(3) | ICOUNT_U + csrw tdata1, t0 + addi x0, x0, 1 + addi x0, x0, 1 + addi x0, x0, 1 + mret +u1_code: + addi s4, s4, 1 + addi s4, s4, 1 + addi s4, s4, 1 +u1_fire: + addi s4, s4, 1 + li a0, 1 + j test_fail + +phase2: + // 2. count=2, u=1. One U-mode instruction and the ecall trap from U-mode + // count. The M-mode handler does not count. The trigger fires before + // the next U-mode instruction. + li s1, 2 + li t0, MSTATUS_MPP_MASK + csrc mstatus, t0 + la t0, u2_code + csrw mepc, t0 + li t0, TDATA1_TYPE(TYPE_ICOUNT) | ICOUNT_COUNT(2) | ICOUNT_U + csrw tdata1, t0 + mret +u2_code: + addi s4, s4, 1 + ecall +u2_fire: + addi s4, s4, 1 + li a0, 2 + j test_fail + +phase3: + // 3. count=3, s=1. An illegal instruction in S-mode traps to S-mode. The + // trap and the instructions of the S-mode handler count. The trigger + // fires before the third instruction of the handler. The breakpoint goes + // to M-mode. + li s1, 3 + la t0, s_handler + csrw stvec, t0 + li t0, 1 << CAUSE_ILLEGAL + csrw medeleg, t0 + li t0, TDATA1_TYPE(TYPE_ICOUNT) | ICOUNT_COUNT(3) | ICOUNT_S + csrw tdata1, t0 + li t0, MSTATUS_MPP_MASK + csrc mstatus, t0 + li t0, MSTATUS_MPP_S + csrs mstatus, t0 + la t0, s3_code + csrw mepc, t0 + mret +s3_code: + .word 0 // illegal instruction + li a0, 3 + j test_fail + + .align 4 +s_handler: + csrr s2, scause + csrr s3, sepc +s_handler_3: + li a0, 10 // the trigger did not fire in the handler + j test_fail + + .align 4 +m_handler: + csrr s2, mcause + csrr s3, mepc + li t2, 3 + beq s1, t2, m_phase3 + li t2, CAUSE_ECALL_U + beq s2, t2, m_ecall_u + csrw tdata1, zero + li t2, CAUSE_BREAKPOINT + CHECK_EQ(s2, t2, 4) + csrr t1, mtval + CHECK_EQ(t1, zero, 5) + bnez s1, m_phase2 + + // Phase 1 + la t2, u1_fire + CHECK_EQ(s3, t2, 6) + li t0, MSTATUS_MPP_MASK + csrs mstatus, t0 + la t0, phase2 + csrw mepc, t0 + mret + +m_ecall_u: + // Phase 2: the ecall. Go back to U-mode after the ecall. + addi s3, s3, 4 + csrw mepc, s3 + mret + +m_phase2: + la t2, u2_fire + CHECK_EQ(s3, t2, 7) + li t0, MSTATUS_MPP_MASK + csrs mstatus, t0 + la t0, phase3 + csrw mepc, t0 + mret + +m_phase3: + // The trigger fires before s_handler_3 + csrw tdata1, zero + li t2, CAUSE_BREAKPOINT + CHECK_EQ(s2, t2, 8) + la t2, s_handler_3 + CHECK_EQ(s3, t2, 9) + j test_pass + +TEST_PASS_FAIL + +TEST_DATA diff --git a/verif/tests/custom/trigger_tests/sdtrig_itrigger.S b/verif/tests/custom/trigger_tests/sdtrig_itrigger.S new file mode 100644 index 00000000000..35a5a309286 --- /dev/null +++ b/verif/tests/custom/trigger_tests/sdtrig_itrigger.S @@ -0,0 +1,100 @@ +// Copyright 2026 10x Engineers +// +// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +// You may obtain a copy of the License at https://solderpad.org/licenses/ +// +// Issue #3646: an itrigger fires after the interrupt trap, just before the +// first instruction of the trap handler. The breakpoint writes 0 to tval. + +#include "sdtrig_test.h" + + .option norvc + .section .text.init + .global _start +_start: + la t0, m_handler + csrw mtvec, t0 + la t0, s_handler + csrw stvec, t0 + csrw medeleg, zero + csrw satp, zero + PMP_ALLOW_ALL + li s1, 0 // test phase + + // 1. Interrupt 1 (supervisor software) is selected for U-mode. The + // interrupt is delegated to S-mode. The trigger fires just before the + // first instruction of the S-mode handler. The breakpoint goes to M-mode. + csrw tselect, zero + li t0, 1 << 1 + csrw tdata2, t0 + li t0, TDATA1_TYPE(TYPE_ITRIGGER) | XTRIG_U + csrw tdata1, t0 + li t0, MIP_SSIP + csrw mideleg, t0 + csrw mie, t0 + csrs mip, t0 + li t0, MSTATUS_MPP_MASK + csrc mstatus, t0 + la t0, u_code + csrw mepc, t0 + mret + +u_code: + nop + li a0, 1 + j test_fail + +s_code: + nop + li a0, 9 + j test_fail + + .align 4 +s_handler: + li a0, 2 + j test_fail + + .align 4 +m_handler: + csrr s2, mcause + csrr s3, mepc + csrr s4, mtval + csrw tdata1, zero + li t2, CAUSE_BREAKPOINT + CHECK_EQ(s2, t2, 4) + CHECK_EQ(s4, zero, 5) + + // Phase 1 and 1b: the breakpoint is on the first instruction of the S-mode handler. + la t2, s_handler + CHECK_EQ(s3, t2, 6) + csrr t1, scause + li t2, MCAUSE_INT | 1 + CHECK_EQ(t1, t2, 7) + bnez s1, 1f + + // 1b. The same interrupt is taken from S-mode to S-mode. The trigger with + // s=1 fires just before the first instruction of the S-mode handler. + li s1, 1 + li t0, TDATA1_TYPE(TYPE_ITRIGGER) | XTRIG_S + csrw tdata1, t0 + li t0, MSTATUS_MPP_MASK + csrc mstatus, t0 + li t0, MSTATUS_MPP_S | MSTATUS_SIE + csrs mstatus, t0 + la t0, s_code + csrw mepc, t0 + mret + +1: + li t0, MSTATUS_SIE + csrc mstatus, t0 + li t0, MIP_SSIP + csrc mip, t0 + csrw mie, zero + j test_pass + +TEST_PASS_FAIL + +TEST_DATA diff --git a/verif/tests/custom/trigger_tests/sdtrig_tdata1_disable.S b/verif/tests/custom/trigger_tests/sdtrig_tdata1_disable.S new file mode 100644 index 00000000000..0abe2377b48 --- /dev/null +++ b/verif/tests/custom/trigger_tests/sdtrig_tdata1_disable.S @@ -0,0 +1,78 @@ +// Copyright 2026 10x Engineers +// +// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +// You may obtain a copy of the License at https://solderpad.org/licenses/ +// +// Issue #3618: a write of 0 to tdata1 disables the trigger. +// A trigger that exists never reads back as type 0 ("no trigger"). + +#include "sdtrig_test.h" + + .option norvc + .section .text.init + .global _start +_start: + la t0, trap_handler + csrw mtvec, t0 + + // 1. After reset, the type of trigger 0 to 3 is not 0. + li s0, 0 + li s1, 4 +1: + csrw tselect, s0 + csrr t1, tselect + CHECK_EQ(t1, s0, 1) + csrr t1, tdata1 + srli t1, t1, XLEN - 4 + li a0, 2 + beqz t1, test_fail + addi s0, s0, 1 + bne s0, s1, 1b + + // 2. Arm an execute trigger on "target", then write 0 to tdata1. + csrw tselect, zero + la t0, target + csrw tdata2, t0 + li t0, TDATA1_TYPE(TYPE_MCONTROL6) | MC6_M | MC6_EXECUTE + csrw tdata1, t0 + csrw tdata1, zero + + // 3. The trigger reads back as disabled (type 15). + csrr t1, tdata1 + li t2, TDATA1_TYPE(TYPE_DISABLED) + CHECK_EQ(t1, t2, 3) + + // 4. The trigger does not fire on "target". + la t0, target + jr t0 + .align 3 +target: + nop + + // 5. A write of type 15 reads back as type 15. + li t0, TDATA1_TYPE(TYPE_DISABLED) + csrw tdata1, t0 + csrr t1, tdata1 + CHECK_EQ(t1, t0, 5) + + // 6. A write of type 2 (not supported) does not give type 0. + li t0, TDATA1_TYPE(2) | MC6_M | MC6_EXECUTE + csrw tdata1, t0 + csrr t1, tdata1 + srli t1, t1, XLEN - 4 + li a0, 6 + beqz t1, test_fail + + j test_pass + + .align 4 +trap_handler: + // A trap is a fail. Code 7 gives the trap. + li a0, 7 + j test_fail + +TEST_PASS_FAIL + +TEST_DATA diff --git a/verif/tests/custom/trigger_tests/sdtrig_test.h b/verif/tests/custom/trigger_tests/sdtrig_test.h new file mode 100644 index 00000000000..7b9c810a21e --- /dev/null +++ b/verif/tests/custom/trigger_tests/sdtrig_test.h @@ -0,0 +1,112 @@ +// Copyright 2026 10x Engineers +// +// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +// You may obtain a copy of the License at https://solderpad.org/licenses/ +// +// Common definitions for the Sdtrig tests. The tests are the same for RV32 +// and RV64. A test writes 1 to tohost when it passes. When check N fails, it +// writes (N << 1) | 1 to tohost. + +#ifndef SDTRIG_TEST_H +#define SDTRIG_TEST_H + +#if __riscv_xlen == 64 +#define XLEN 64 +#define SREG sd +#define LREG ld +#else +#define XLEN 32 +#define SREG sw +#define LREG lw +#endif + +#define CSR_TSELECT 0x7a0 +#define CSR_TDATA1 0x7a1 +#define CSR_TDATA2 0x7a2 + +// tdata1 fields common to all types +#define TDATA1_TYPE(t) ((t) << (XLEN - 4)) +#define TDATA1_DMODE (1 << (XLEN - 5)) +#define TYPE_ICOUNT 3 +#define TYPE_ITRIGGER 4 +#define TYPE_ETRIGGER 5 +#define TYPE_MCONTROL6 6 +#define TYPE_DISABLED 15 + +// mcontrol6 +#define MC6_ACTION(a) ((a) << 12) +#define MC6_M (1 << 6) +#define MC6_S (1 << 4) +#define MC6_U (1 << 3) +#define MC6_EXECUTE (1 << 2) + +// icount +#define ICOUNT_COUNT(c) ((c) << 10) +#define ICOUNT_M (1 << 9) +#define ICOUNT_S (1 << 7) +#define ICOUNT_U (1 << 6) + +// itrigger and etrigger +#define XTRIG_M (1 << 9) +#define XTRIG_S (1 << 7) +#define XTRIG_U (1 << 6) + +// action field of icount, itrigger and etrigger +#define ACTION(a) (a) + +#define MSTATUS_MIE (1 << 3) +#define MSTATUS_SIE (1 << 1) +#define MSTATUS_SPP (1 << 8) +#define MSTATUS_MPP_MASK (3 << 11) +#define MSTATUS_MPP_S (1 << 11) +#define MIP_SSIP (1 << 1) +#define MIP_MTIP (1 << 7) +#define MCAUSE_INT (1 << (XLEN - 1)) + +#define CAUSE_ILLEGAL 2 +#define CAUSE_BREAKPOINT 3 +#define CAUSE_ECALL_U 8 +#define CAUSE_ECALL_M 11 + +#define CLINT_MTIMECMP 0x02004000 +#define CLINT_MTIME 0x0200bff8 + +// Check a condition. When it is not true, stop the test with code n. +#define CHECK_EQ(r1, r2, n) \ + li a0, n; \ + bne r1, r2, test_fail + +// Give all of the address space to S-mode and U-mode with one PMP entry. +#define PMP_ALLOW_ALL \ + li t0, -1; \ + csrw pmpaddr0, t0; \ + li t0, 0x1f; \ + csrw pmpcfg0, t0 + +// Write the result to tohost. The test stops here. +#define TEST_PASS_FAIL \ +test_pass: \ + li a0, 1; \ + j test_end; \ +test_fail: \ + slli a0, a0, 1; \ + ori a0, a0, 1; \ +test_end: \ + la t0, tohost; \ + sw a0, 0(t0); \ + sw zero, 4(t0); \ +1: \ + j 1b + +#define TEST_DATA \ + .section .tohost, "aw", @progbits; \ + .align 6; \ + .global tohost; \ +tohost: .dword 0; \ + .align 6; \ + .global fromhost; \ +fromhost: .dword 0 + +#endif diff --git a/verif/tests/custom/trigger_tests/trigger_csrs_access.S b/verif/tests/custom/trigger_tests/trigger_csrs_access.S new file mode 100644 index 00000000000..a22738cc7dd --- /dev/null +++ b/verif/tests/custom/trigger_tests/trigger_csrs_access.S @@ -0,0 +1,37 @@ +.text +.globl _start +_start: + ## TM CSRs read write test. Since the fields are WARL, written data may not match read data. + # Check CSR TSELECT + li x2, 2 + csrw tselect, x2 + + # Check CSR TDATA2 + li x4, 0x00000008 + csrw tdata2, x4 + + # Check CSR TDATA1 + li x5, 0x50000201 + csrw tdata1, x5 + + # Check CSR TDATA3 + li x8, 0x50021090 + csrw tdata3, x8 + + csrr x3, tselect + csrr x6, tdata2 + csrr x7, tdata1 + csrr x9, tdata3 + +exit: + li a1, 1 + la t2, tohost + sw a1, 0(t2) + j exit + +.data +.align 4 +.global tohost +tohost: .word 0 +.global fromhost +fromhost: .word 0 diff --git a/verif/tests/custom/trigger_tests/trigger_main.S b/verif/tests/custom/trigger_tests/trigger_main.S new file mode 100644 index 00000000000..1e9a0c59df1 --- /dev/null +++ b/verif/tests/custom/trigger_tests/trigger_main.S @@ -0,0 +1,355 @@ +# Copyright 2022 Thales DIS design services SAS +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https://solderpad.org/licenses/ +# +# Original Author: Mounsaf YOUSFI (mounsaf.yousfi@thalesgroup.fr) + +#***************************************************************************** +# mcontrol6 trigger test for all trigger types +#----------------------------------------------------------------------------- + +.data +load_array: .word 0xBEEFBEEF, 0xBEEEBEEE, 0xBEEFDEAD +store_array: .word 0x00000000, 0x00000000, 0x00000000 + + .globl main +main: + #Load custom trap_handler in trap vector + la t0, trap_handler + csrw mtvec, t0 + + ############### + # FIRST BATCH # + ############### + + #Trigger 0 configuration : TRIGGER ON PC EXECUTION + li x2, 0 + csrw tselect, x2 + #compare value encoding : here it's the PC we want to trigger on + la x3, trig0 + csrw tdata2, x3 + #tdata1 encoding + li x4, 0x60000044 //or : 0x60001044 for debug mode + csrw tdata1, x4 +trig0: + j fail + j fail + j fail + j fail +handler_return0: + # Trigger 1 configuration : TRIGGER ON INSTRUCTION + li x2, 1 + csrw tselect, x2 + #compare value encoding : here it's the instruction we want to trigger on + li x3, 0xFFFF4104 //uses masked low match type + csrw tdata2, x3 + #tdata1 encoding + li x4, 0x60200244 + csrw tdata1, x4 + + # Trigger 2 : TRIGGER ON STORE DATA + li x2, 2 + csrw tselect, x2 + li x3, 0xBEEFBEEF //Data to match + csrw tdata2, x3 + li x4, 0x60200042 //Config for store with data match + csrw tdata1, x4 + + + # Trigger 3 : TRIGGER ON LOAD DATA + li x2, 3 + csrw tselect, x2 + li x3, 0xBEEEBEEE //Data to match + csrw tdata2, x3 + li x4, 0x60200041 //Config for load with data match + csrw tdata1, x4 + + #Random useless instruction + li x5, 0xDEADDEAD + #If the triggers were effectively raised and the trap handler correctly handled every one of them, + #we should never jump to fail + beq x5, x5, trig1 #introduce some challenge for speculation handling units + j fail + +trig1: + lw x9, 0(x10) +handler_return1: + beq x4, x5, fail + li x6, 0xBEEFBEEF + la x5, store_array +trig2: + sw x6, 0(x5) + lw x6, 0(x5) + j fail +handler_return2: + bne x6, x5, resume_test + j fail +resume_test: + li x6, 0xBEEEBEEE + addi x9, x9, 4 + sw x6, 0(x9) + la x1, store_array + lw x3, 0(x1) + lw x3, 0(x1) + lw x3, 0(x1) + lw x3, 0(x1)//flood with loads to see if we don't infinite loop on break generation logic(tests if load unit is stalled) + lw x3, 0(x1) + lw x3, 0(x8) +trig3: + lw x6, 0(x9) +instruction_on_which_breakpoint_is_generated: + # addi x13, x13, 2 + sw x6, 0(x9) + lw x3, 0(x1) + lw x3, 0(x1) + addi x6, x6, -1 + j fail + +second_batch: + + ############### + # 2ND BATCH # + ############### + #Trigger 4 configuration : TRIGGER ON STORE ADDR + li x2, 0 + csrw tselect, x2 + la x3, store_array //Address to match + addi x3, x3, 8 + csrw tdata2, x3 + li x4, 0x60000042 //Config for store with address match + csrw tdata1, x4 + + #Trigger 5 configuration : TRIGGER ON LOAD ADDR + li x2, 1 + csrw tselect, x2 + la x3, load_array //Address to match + addi x3, x3, 8 + csrw tdata2, x3 + li x4, 0x60000041 //Config for load with address match + csrw tdata1, x4 + + la x3, store_array //Address to match + li x6, 0x11110000 +trig4: + sw x6, 8(x3) + j fail +handler_return4: + lw x6, 8(x3) + la x5, load_array + addi x5, x5, 8 + li x6, 0 +trig5: + lw x6, 0(x5) + +trigger_chain_test: + sw x6, 0(x5) + + # Trigger 0 CHAIN + li x2, 0 + csrw tselect, x2 + la x5, 0x0002a303 + csrw tdata2, x5 + li x4, 0x60200844 + csrw tdata1, x4 + + + # Trigger 1 CHAIN + li x2, 2 + csrw tselect, x2 + la x5, 0xBEEFBEEF + csrw tdata2, x5 + li x4, 0x60200841 + csrw tdata1, x4 + + # Trigger 2 CHAIN + li x2, 1 + csrw tselect, x2 + #compare value encoding (address to match) + la x5, load_array + csrw tdata2, x5 + li x4, 0x60000041 + csrw tdata1, x4 + + la x5, load_array +trig6: + lw x6, 0(x5) + j fail + +icountplusetrigger: + li x2, 1 + csrw tselect, x2 + li x3, 0x00000008 # Icount will gen break (ex cause 3) + csrw tdata2, x3 + li x4, 0x50000200 # match exception value with tdata2 and another break + csrw tdata1, x4 + + li x2, 0 + csrw tselect, x2 + li x2, 0x30003e00 # count 15 instructions break : ICOUNT + csrw tdata1, x2 +icount: + j icount + +itrigger: + # Trigger setup + li x2, 1 + csrw tselect, x2 + + li x3, 0xFFFFFFFF # match on software interrupt + csrw tdata2, x3 + + li x4, 0x40000200 # match on software interrupt and gen break + csrw tdata1, x4 + csrr x5, tdata1 + + li a1, 0xFFFFFFFF + csrw mie, a1 + csrr a2, mie + li a1, 0x8 + csrw mstatus, a1 +it_trigg: + j fail + +.align 4 +trap_handler: + csrr a0, mcause + csrr a1, mepc + + la a2, 0x80000000 + srli a0, a0, 28 + slli a0, a0, 28 //4 MSBs isolation + bne a2, a0, skipDisableInt //checks if its an interrupt that caused trap handling if yes, disable them, if not, skip disabling + li a1, 0x0 + csrw mie, a1 + csrr a2, mie + li a1, 0x0 + csrw mstatus, a1 +skipDisableInt: + csrr a0, mcause + la a2, icount + beq a2, a1, default_ret_plus_offset + li t3, 3 + bne a0, t3, default_ret #if we arent in trap handler for a breakpoint exception, resume execution + la a2, trap_handler + bne a2, a1, disable_trigger0 + li a3, 1 + csrw tselect, a3 + li a4, 0x00000000 + csrw tdata1, a4 + beq a2, a1, default_ret #we are here because of etrigger so icount worked, disable both and go to itrigger test +disable_trigger0: + la a2, trig0 + bne a1, a2, disable_trigger1 //if pc != trig address, it means we aren't here for this trigger (i could keep only this if and remove the prior one) + li a3, 0 //else + csrw tselect, a3 //select trigger 0 + li a4, 0x00000000 + csrw tdata1, a4 //disable trigger 0 + li a4, 0 //wipe compare value + csrw tdata2, a4 + la a3, handler_return0 + csrw mepc, a3 + beq a1, a2, default_ret //resume +disable_trigger1: + la a2, trig1 + bne a1, a2, disable_trigger2 + li a3, 1 + csrw tselect, a3 + li a4, 0x00000000 + csrw tdata1, a4 + csrr a4, tdata1 //disable trigger 1 + li a4, 0 + csrw tdata2, a4 + la a3, handler_return1 + csrw mepc, a3 + beq a1, a2, default_ret +disable_trigger2: + la a2, trig2 + bne a1, a2, disable_trigger3 + li a3, 2 + csrw tselect, a3 + li a4, 0x00000000 + csrw tdata1, a4 //disable trigger 2 + la a3, handler_return2 + csrw mepc, a3 + beq a1, a2, default_ret +disable_trigger3: + la a2, instruction_on_which_breakpoint_is_generated + bne a1, a2, disable_trigger4 + li a3, 3 + csrw tselect, a3 + li a4, 0x00000000 + csrw tdata1, a4 //disable trigger 3 + la a3, second_batch + csrw mepc, a3 + beq a1, a2, default_ret #if load is complete and then trigger happened then jump to second batch of triggers +disable_trigger4: + la a2, trig4 + bne a1, a2, disable_trigger5 + li a3, 0 + csrw tselect, a3 + li a4, 0x00000000 + csrw tdata1, a4 //disable trigger 4 + la a3, handler_return4 + csrw mepc, a3 + beq a1, a2, default_ret +disable_trigger5: + la a2, trig5 + bne a1, a2, disable_trigger6 + li a3, 1 + csrw tselect, a3 + li a4, 0x00000000 + csrw tdata1, a4 //disable trigger 4 + la a3, trigger_chain_test + csrw mepc, a3 + beq a1, a2, default_ret +disable_trigger6: + la a2, trig6 + bne a1, a2, disable_trigger7 + li a3, 0 + csrw tselect, a3 + li a4, 0x00000000 + csrw tdata1, a4 //disable chain + li a3, 1 + csrw tselect, a3 + li a4, 0x00000000 + csrw tdata1, a4 //disable chain + li a3, 2 + csrw tselect, a3 + li a4, 0x00000000 + csrw tdata1, a4 //disable chain + la a3, icountplusetrigger + csrw mepc, a3 + beq a1, a2, default_ret +disable_trigger7: + la a2, it_trigg + bne a1, a2, default_ret + la a3, pass + csrw mepc, a3 + beq a1, a2, default_ret + + j fail #if none of those condition is met, jump to fail + +default_ret: + mret + +default_ret_plus_offset: + la a2, itrigger + csrw mepc, a2 + mret + +pass: + li x1, 0 + slli x1, x1, 1 + addi x1, x1, 1 + sw x1, tohost, x30 + self_loop: j self_loop + +fail: + li x1, 1 + slli x1, x1, 1 + addi x1, x1, 1 + sw x1, tohost, x30 + self_loop_2: j self_loop_2 \ No newline at end of file diff --git a/verif/tests/custom/zcmt/cm_jalt_long.S b/verif/tests/custom/zcmt/cm_jalt_long.S index 51f0e3f0021..4a293ac53c0 100644 --- a/verif/tests/custom/zcmt/cm_jalt_long.S +++ b/verif/tests/custom/zcmt/cm_jalt_long.S @@ -1,59 +1,76 @@ .globl _start _start: - la t0, trap_handler - csrw mtvec, t0 + la t0, trap_handler + csrw mtvec, t0 - la a1, target1 + # Configure the Jump Vector Table. la t0, __jvt_base$ - sw a1, 128(t0) //cm.jalt entry start from index >=32 - - csrw jvt, t0 + # JVT CSR = 0x017. + # Use the numeric CSR address because the bundled assembler does not + # recognize the Zcmt CSR name. + csrw 0x017, t0 fence.i - # Perform jump using the index from JVT - cm.jalt 32 - li t1, 1 - addi x20,x20, 9 - j write_tohost + # cm.jalt 64 + # + # The bundled GNU assembler does not recognize the Zcmt mnemonic, so emit + # the architecturally defined 16-bit encoding directly. + # + # index = instruction[9:2] = 64 + # encoding = 0xa102 + .2byte 0xa102 + + # cm.jalt must not fall through. + j fail +target1: + j pass + +trap_handler: + j fail -exit: +pass: + # RISC-V test convention: tohost = 1 means success. + li x1, 1 j write_tohost +fail: + # An odd value greater than one represents failure. + li x1, 3 + write_tohost: - li x1, 1 - la t0, tohost - sw x1, 0(t0) - j write_tohost + la t0, tohost + sw x1, 0(t0) +1: + j 1b -# Jump Vector Table (JVT) Section -# Create a separate section for the JVT -.section .riscv.jvt, "ax" -.align 6 # Align the JVT on a 64-byte boundary (6 = 2^6 = 64) +# Jump Vector Table. +# +# Entry 0 deliberately points to the failure path. +# Entry 64 deliberately points to target1. +# +# With the buggy six-bit index calculation: +# index 64 aliases index 0 -> fail +# +# With the correct eight-bit calculation: +# index 64 -> target1 -> pass +.section .riscv.jvt, "a", @progbits +.align 6 __jvt_base$: - .word 0x80000054 - .word 0x80000800 - .word 0x80000802 - .word 0x80000804 - -# Target Addresses (Where cm.jalt will jump) -.align 20 -target1: - li x2, 99 - lui t0, %hi(write_tohost) # Load upper 20 bits of target address into t0 - addi t0, t0, %lo(write_tohost) # Add the lower 12 bits to t0 - jalr x0, 0(t0) - - - -trap_handler: - lui t0, %hi(write_tohost) # Load upper 20 bits of target address into t0 - addi t0, t0, %lo(write_tohost) # Add the lower 12 bits to t0 - jalr x0, 0(t0) + .word fail + .space 252 + .word target1 +.section .data +.align 6 +.global tohost +tohost: + .dword 0 -.align 6; .global tohost; tohost: .dword 0; -.align 6; .global fromhost; fromhost: .dword 0; \ No newline at end of file +.align 6 +.global fromhost +fromhost: + .dword 0 diff --git a/verif/tests/custom/zcmt/cm_jalt_target_lsb.S b/verif/tests/custom/zcmt/cm_jalt_target_lsb.S new file mode 100644 index 00000000000..ea507dff344 --- /dev/null +++ b/verif/tests/custom/zcmt/cm_jalt_target_lsb.S @@ -0,0 +1,78 @@ +.globl _start +_start: + la t0, trap_handler + csrw mtvec, t0 + + # Configure the Jump Vector Table. + la t0, __jvt_base$ + + # JVT CSR = 0x017. + # Use the numeric CSR address so this test does not depend on + # assembler support for the Zcmt CSR name. + csrw 0x017, t0 + + fence.i + + # JVT entry 64 contains cm_jalt_target + 1. cm.jalt must clear bit 0 + # before using the loaded value as the jump target. + # + # cm.jalt 64 encoding = 0xa102 + li s0, 0 + .2byte 0xa102 + +after_cm_jalt: + # The target must have executed and returned here. + beqz s0, fail + j pass + +.balign 2 +cm_jalt_target: + # Verify that the architectural PC has bit 0 cleared. + auipc t1, 0 + andi t1, t1, 1 + bnez t1, fail + + li s0, 1 + + # cm.jalt links to the instruction following the compressed jump. + ret + +.balign 4 +trap_handler: + j fail + +pass: + # RISC-V test convention: tohost = 1 means success. + li x1, 1 + j write_tohost + +fail: + # An odd value greater than one represents failure. + li x1, 3 + +write_tohost: + la t0, tohost + sw x1, 0(t0) + +1: + j 1b + +.section .riscv.jvt, "a", @progbits +.align 6 +__jvt_base$: + # Entries 0 through 63 are unused by this test. + .space 256 + + # Entry 64. + .word cm_jalt_target + 1 + +.section .data +.align 6 +.global tohost +tohost: + .dword 0 + +.align 6 +.global fromhost +fromhost: + .dword 0 diff --git a/verif/tests/custom/zcmt/cm_jt_target_lsb.S b/verif/tests/custom/zcmt/cm_jt_target_lsb.S new file mode 100644 index 00000000000..d1cfa898079 --- /dev/null +++ b/verif/tests/custom/zcmt/cm_jt_target_lsb.S @@ -0,0 +1,68 @@ +.globl _start +_start: + la t0, trap_handler + csrw mtvec, t0 + + # Configure the Jump Vector Table. + la t0, __jvt_base$ + + # JVT CSR = 0x017. + # Use the numeric CSR address so this test does not depend on + # assembler support for the Zcmt CSR name. + csrw 0x017, t0 + + fence.i + + # JVT entry 0 contains cm_jt_target + 1. cm.jt must clear bit 0 + # before using the loaded value as the jump target. + # + # cm.jt 0 encoding = 0xa002 + .2byte 0xa002 + + # cm.jt must not fall through. + j fail + +.balign 2 +cm_jt_target: + # Verify that the architectural PC has bit 0 cleared. + auipc t1, 0 + andi t1, t1, 1 + bnez t1, fail + + j pass + +.balign 4 +trap_handler: + j fail + +pass: + # RISC-V test convention: tohost = 1 means success. + li x1, 1 + j write_tohost + +fail: + # An odd value greater than one represents failure. + li x1, 3 + +write_tohost: + la t0, tohost + sw x1, 0(t0) + +1: + j 1b + +.section .riscv.jvt, "a", @progbits +.align 6 +__jvt_base$: + .word cm_jt_target + 1 + +.section .data +.align 6 +.global tohost +tohost: + .dword 0 + +.align 6 +.global fromhost +fromhost: + .dword 0 diff --git a/verif/tests/testlist_custom.yaml b/verif/tests/testlist_custom.yaml index 7f3c125cbc2..b90b48a5f5f 100644 --- a/verif/tests/testlist_custom.yaml +++ b/verif/tests/testlist_custom.yaml @@ -41,3 +41,7 @@ testlist: <<: *common_test_config asm_tests: /custom/hello_world/custom_test_template.S + - test: false_4k_alias + iterations: 1 + <<: *common_test_config + asm_tests: /custom/lsu/false_4k_alias.S diff --git a/verif/tests/testlist_hgatp_warl.yaml b/verif/tests/testlist_hgatp_warl.yaml new file mode 100644 index 00000000000..1594cfead77 --- /dev/null +++ b/verif/tests/testlist_hgatp_warl.yaml @@ -0,0 +1,8 @@ +# Regression for unsupported hgatp.MODE WARL handling. + +testlist: + - test: rv64h-p-hgatp-mode-warl + iterations: 1 + path_var: TESTS_PATH + gcc_opts: "-static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -I/riscv-tests/isa/macros/scalar/ -I/riscv-tests/env/p/ -I/riscv-tests/riscv-target/spike/" + asm_tests: /custom/hgatp_warl/hgatp_mode_warl.S diff --git a/verif/tests/testlist_hlvx_gstage.yaml b/verif/tests/testlist_hlvx_gstage.yaml new file mode 100644 index 00000000000..5adcf020d71 --- /dev/null +++ b/verif/tests/testlist_hlvx_gstage.yaml @@ -0,0 +1,14 @@ +# Testlist for the HLVX / G-stage page-table-read reproducer (cv64a6_imafdch_sv39). + +testlist: + - test: rv64h-p-hlvx-gstage + iterations: 1 + path_var: TESTS_PATH + gcc_opts: "-static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -I/riscv-tests/isa/macros/scalar/ -I/riscv-tests/env/p/ -I/riscv-tests/riscv-target/spike/" + asm_tests: /custom/hlvx_gstage/hlvx_gstage_repro.S + + - test: rv64h-p-hlvx-gstage-ctrl + iterations: 1 + path_var: TESTS_PATH + gcc_opts: "-DGSTAGE_PT_EXEC -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -I/riscv-tests/isa/macros/scalar/ -I/riscv-tests/env/p/ -I/riscv-tests/riscv-target/spike/" + asm_tests: /custom/hlvx_gstage/hlvx_gstage_repro.S diff --git a/verif/tests/testlist_issues.yaml b/verif/tests/testlist_issues.yaml index 92913456ce9..1538b41fe67 100644 --- a/verif/tests/testlist_issues.yaml +++ b/verif/tests/testlist_issues.yaml @@ -34,7 +34,51 @@ common_test_config: &common_test_config path_var: TESTS_PATH gcc_opts: "-static -misa-spec=2.2 -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles ../tests/custom/common/syscalls.c ../tests/custom/common/crt.S -I../tests/custom/env -I../tests/custom/common -T ../../config/gen_from_riscv_config/linker/link.ld -lgcc" +pmp_test_config: &pmp_test_config + <<: *common_test_config + iterations: 1 + gcc_opts: >- + -static + -misa-spec=2.2 + -mcmodel=medany + -fvisibility=hidden + -nostdlib + -nostartfiles + ../tests/custom/common/syscalls.c + ../tests/custom/common/crt.S + -I../tests/custom/env + -I../tests/custom/common + -lgcc + testlist: + - test: pmp-lsu-transaction-rv64 + description: > + Check that PMP uses the access type and virtual address belonging to the + MMU response on DTLB-miss and DTLB-hit store transactions. + <<: *pmp_test_config + asm_tests: /custom/pmp/lsu_pipeline_store_test.S + + - test: pmp-lsu-transaction-no-mmu-rv64 + description: > + Check that the no-MMU LSU response keeps PMP address, access type, and + valid metadata aligned. + <<: *pmp_test_config + asm_tests: /custom/pmp/lsu_pipeline_store_no_mmu_test.S + + - test: pmp-amo-access-fault-rv64 + description: > + Check that a PMP-denied AMO reports a store/AMO access fault with the + matching tval and does not update its destination register. + <<: *pmp_test_config + asm_tests: /custom/pmp/amo_access_fault_test.S + + - test: pmp-hlvx-access-fault-rv64 + description: > + Check that HLVX execute permission and fault metadata belong to the + response transaction when ordinary loads and HLVX requests are adjacent. + <<: *pmp_test_config + asm_tests: /custom/pmp/hlvx_access_fault_test.S + - test: compressed-fpreg-commits-rv64 <<: *common_test_config iterations: 1 @@ -45,3 +89,152 @@ testlist: iterations: 1 asm_tests: /custom/issues/compressed-fpreg-commits-rv32.S + - test: misaligned-branch-rvc-disabled + <<: *common_test_config + iterations: 1 + gen_opts: +disable_compressed_instr=1 + gcc_opts: "-static -misa-spec=2.2 -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles ../tests/custom/common/syscalls.c ../tests/custom/common/crt.S -I../tests/custom/env -I../tests/custom/common -T ../../config/gen_from_riscv_config/linker/link.ld -lgcc -march=rv32im_zba_zbb_zbs_zbc_zicsr_zifencei -mabi=ilp32" + asm_tests: /custom/issues/misaligned-branch-rvc-disabled.S + - test: mret-mpv-rv64 + <<: *common_test_config + iterations: 1 + asm_tests: /custom/issues/mret-mpv-rv64.S + + - test: pmp-tor-grain-rv64 + <<: *common_test_config + description: > + Check that pmpaddr bit 0 does not affect either TOR boundary when the + PMP grain is eight bytes. + iterations: 1 + asm_tests: /custom/issues/pmp-tor-grain-rv64.S + + - test: zcmt-jvt-index-rv32 + description: > + Check that cm.jalt uses the complete eight-bit JVT table index. + iterations: 1 + path_var: TESTS_PATH + asm_tests: /custom/zcmt/cm_jalt_long.S + gcc_opts: >- + -static + -mcmodel=medany + -fvisibility=hidden + -nostdlib + -nostartfiles + + - test: decoder-zip-unzip-rv64 + <<: *common_test_config + iterations: 1 + asm_tests: /custom/issues/decoder-zip-unzip-rv64.S + + - test: pmp-misalign-priority-over-access-fault + description: > + Misaligned hsv.d/hlv.d to a PMP-denied paddr must report + address-misaligned (mcause 6/4), not access-fault (5/7). + iterations: 1 + path_var: TESTS_PATH + asm_tests: /custom/issues/pmp-misalign-priority-over-access-fault.S + gcc_opts: >- + -static -misa-spec=2.2 -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles + /custom/common/crt.S + -I/custom/env -I/custom/common + -T ../../config/gen_from_riscv_config/linker/link.ld -lgcc -march=rv64gh + - test: vsmode-counterh-cause + description: > + RV64+H: a high-half counter CSR access from VS-mode must raise + illegal-instruction (mcause=2), not virtual-instruction (mcause=22). + iterations: 1 + path_var: TESTS_PATH + asm_tests: /custom/issues/vsmode_counterh_cause.S + gcc_opts: >- + -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles + -I/riscv-tests/isa/macros/scalar/ + -I/riscv-tests/env/p/ + -march=rv64gh + + - test: zcmp-mva01s-equal-regs-rv32 + description: > + Check that cm.mva01s accepts equal r1s' and r2s' encodings. + iterations: 1 + path_var: TESTS_PATH + asm_tests: /custom/Zcmp/cm_mva01s_equal_regs_test.S + gcc_opts: >- + -static + -mcmodel=medany + -fvisibility=hidden + -nostdlib + -nostartfiles + -I../tests/custom/env + + - test: zcmt-jt-target-lsb-rv32 + description: > + Check that cm.jt clears bit 0 of the loaded JVT target. + iterations: 1 + path_var: TESTS_PATH + asm_tests: /custom/zcmt/cm_jt_target_lsb.S + gcc_opts: >- + -static + -mcmodel=medany + -fvisibility=hidden + -nostdlib + -nostartfiles + + - test: zcmt-jalt-target-lsb-rv32 + description: > + Check that cm.jalt clears bit 0 of the loaded JVT target. + iterations: 1 + path_var: TESTS_PATH + asm_tests: /custom/zcmt/cm_jalt_target_lsb.S + gcc_opts: >- + -static + -mcmodel=medany + -fvisibility=hidden + -nostdlib + -nostartfiles + + - test: load-misaligned-warning + <<: *common_test_config + description: > + Check that misaligned word and halfword loads raise load-address- + misaligned exceptions without terminating simulation in load_unit + offset assertions. + iterations: 1 + asm_tests: /custom/issues/load-misaligned-warning.S + + - test: zcmp-reserved-rlist-rv32 + description: > + Check that reserved Zcmp push/pop rlist values 0 through 3 + raise illegal-instruction exceptions. + iterations: 1 + path_var: TESTS_PATH + asm_tests: /custom/Zcmp/cm_reserved_rlist_test.S + gcc_opts: >- + -static + -mcmodel=medany + -fvisibility=hidden + -nostdlib + -nostartfiles + -I../tests/custom/env + + - test: fcvt-rv64-only-rv32 + <<: *common_test_config + description: > + Check that RV64-only FCVT L/LU conversions raise + illegal-instruction exceptions on RV32. + iterations: 1 + asm_tests: /custom/issues/fcvt-rv64-only-rv32.S + + - test: htval-mtval2-warl-rv64 + <<: *common_test_config + description: > + Check that RV64 Sv39x4 htval and mtval2 retain only the implemented + 2-bit-shifted guest-physical-address bits. + iterations: 1 + asm_tests: /custom/issues/htval-mtval2-warl-rv64.S + - test: xret-mprv-clear-rv64 + <<: *common_test_config + description: > + Check xRET mstatus.MPRV handling in an RVH-disabled configuration, + including MRET preservation when returning to M-mode and clearing + when MRET or SRET returns below M-mode. + iterations: 1 + asm_tests: /custom/issues/xret-mprv-clear-rv64.S diff --git a/verif/tests/testlist_pmp-cv32a65x.yaml b/verif/tests/testlist_pmp-cv32a65x.yaml new file mode 100644 index 00000000000..fa3da4cdd5a --- /dev/null +++ b/verif/tests/testlist_pmp-cv32a65x.yaml @@ -0,0 +1,77 @@ +# Copyright 2025 Thales CDI +# +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +# You may obtain a copy of the License at https:#solderpad.org/licenses/ +# +# Original Author: Valentin Thomazic (valentin.thomazic@thalesgroup.com) + +# ================================================================================ +# Regression test list format +# -------------------------------------------------------------------------------- +# testlist : Assembly test list +# test : Assembly test name +# description : Description of this test +# gen_opts : Instruction generator options +# iterations : Number of iterations of this test +# no_iss : Enable/disable ISS simulator (Optional) +# gen_test : Test name used by the instruction generator +# asm_tests : Path to directed, hand-coded assembly test file or directory +# rtl_test : RTL simulation test name +# cmp_opts : Compile options passed to the instruction generator +# sim_opts : Simulation options passed to the instruction generator +# no_post_compare : Enable/disable comparison of trace log and ISS log (Optional) +# compare_opts : Options for the RTL & ISS trace comparison +# gcc_opts : gcc compile options +# -------------------------------------------------------------------------------- + +common_test_config: &common_test_config + path_var: TESTS_PATH + gcc_opts: "-static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles ../tests/custom/common/syscalls.c ../tests/custom/common/crt.S -I../tests/custom/env -I../tests/custom/common -lgcc" + +testlist: + - test: decreasing_entries_test + <<: *common_test_config + iterations: 1 + asm_tests: /custom/pmp/decreasing_entries_test.S + + - test: defined_matches + <<: *common_test_config + iterations: 0 + asm_tests: /custom/pmp/defined_matches.S + + - test: double_entries_test + <<: *common_test_config + iterations: 0 + asm_tests: /custom/pmp/double_entries_test.S + + - test: exact_csrr_test + <<: *common_test_config + iterations: 1 + asm_tests: /custom/pmp/exact_csrr_test.S + + - test: granularity_test + <<: *common_test_config + iterations: 1 + asm_tests: /custom/pmp/granularity_test.S + + - test: locked_outside_napot_test + <<: *common_test_config + iterations: 0 + asm_tests: /custom/pmp/locked_outside_napot_test.S + + - test: locked_outside_tor_test + <<: *common_test_config + iterations: 1 + asm_tests: /custom/pmp/locked_outside_tor_test.S + + - test: lsu_napot_test + <<: *common_test_config + iterations: 0 + asm_tests: /custom/pmp/lsu_napot_test.S + + - test: lsu_tor_test + <<: *common_test_config + iterations: 1 + asm_tests: /custom/pmp/lsu_tor_test.S diff --git a/verif/tests/testlist_riscv-arch-test-cv32a60x.yaml b/verif/tests/testlist_riscv-arch-test-cv32a60x.yaml index 94dc5f79416..2744949d774 100644 --- a/verif/tests/testlist_riscv-arch-test-cv32a60x.yaml +++ b/verif/tests/testlist_riscv-arch-test-cv32a60x.yaml @@ -262,15 +262,15 @@ testlist: iterations: 1 asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/I/src/lhu-align-01.S - - test: rv32im-lui-01 + - test: rv32im-lw-align-01 <<: *common_test_config iterations: 1 - asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/I/src/lui-01.S + asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/I/src/lw-align-01.S - - test: rv32im-lw-align-01 + - test: rv32im-lui-01 <<: *common_test_config iterations: 1 - asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/I/src/lw-align-01.S + asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/I/src/lui-01.S - test: rv32im-or-01 <<: *common_test_config @@ -292,6 +292,11 @@ testlist: iterations: 1 asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/I/src/sh-align-01.S + - test: rv32im-sw-align-01 + <<: *common_test_config + iterations: 1 + asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/I/src/sw-align-01.S + - test: rv32im-sll-01 <<: *common_test_config iterations: 1 @@ -347,11 +352,6 @@ testlist: iterations: 1 asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/I/src/sub-01.S - - test: rv32im-sw-align-01 - <<: *common_test_config - iterations: 1 - asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/I/src/sw-align-01.S - - test: rv32im-xor-01 <<: *common_test_config iterations: 1 @@ -562,49 +562,4 @@ testlist: <<: *common_test_config iterations: 1 asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/B/src/zext.h_32-01.S - - ##A - - test: rv32im-amoadd.w-01 - <<: *common_test_config - iterations: 1 - asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/A/src/amoadd.w-01.S - - - test: rv32im-amoand.w-01 - <<: *common_test_config - iterations: 1 - asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/A/src/amoand.w-01.S - - - test: rv32im-amomax.w-01 - <<: *common_test_config - iterations: 1 - asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/A/src/amomax.w-01.S - - - test: rv32im-amomaxu.w-01 - <<: *common_test_config - iterations: 1 - asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/A/src/amomaxu.w-01.S - - - test: rv32im-amomin.w-01 - <<: *common_test_config - iterations: 1 - asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/A/src/amomin.w-01.S - - - test: rv32im-amominu.w-01 - <<: *common_test_config - iterations: 1 - asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/A/src/amominu.w-01.S - - - test: rv32im-amoor.w-01 - <<: *common_test_config - iterations: 1 - asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/A/src/amoor.w-01.S - - - test: rv32im-amoswap.w-01 - <<: *common_test_config - iterations: 1 - asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/A/src/amoswap.w-01.S - - - test: rv32im-amoxor.w-01 - <<: *common_test_config - iterations: 1 - asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/A/src/amoxor.w-01.S + ## NOTE: rv32i_m/A (Atomic/AMO) tests intentionally excluded - cv32a60x has RVA=0 diff --git a/verif/tests/testlist_riscv-arch-test-cv32a65x.yaml b/verif/tests/testlist_riscv-arch-test-cv32a65x.yaml index 21e2b91430d..14967eff082 100644 --- a/verif/tests/testlist_riscv-arch-test-cv32a65x.yaml +++ b/verif/tests/testlist_riscv-arch-test-cv32a65x.yaml @@ -262,15 +262,15 @@ testlist: <<: *common_test_config asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/I/src/lhu-align-01.S - - test: rv32im-lui-01 + - test: rv32im-lw-align-01 iterations: 1 <<: *common_test_config - asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/I/src/lui-01.S + asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/I/src/lw-align-01.S - - test: rv32im-lw-align-01 + - test: rv32im-lui-01 iterations: 1 <<: *common_test_config - asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/I/src/lw-align-01.S + asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/I/src/lui-01.S - test: rv32im-or-01 iterations: 1 @@ -292,6 +292,11 @@ testlist: <<: *common_test_config asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/I/src/sh-align-01.S + - test: rv32im-sw-align-01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/I/src/sw-align-01.S + - test: rv32im-sll-01 iterations: 1 <<: *common_test_config @@ -347,11 +352,6 @@ testlist: <<: *common_test_config asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/I/src/sub-01.S - - test: rv32im-sw-align-01 - iterations: 1 - <<: *common_test_config - asm_tests: /riscv-arch-test/riscv-test-suite/rv32i_m/I/src/sw-align-01.S - - test: rv32im-xor-01 iterations: 1 <<: *common_test_config diff --git a/verif/tests/testlist_riscv-arch-test-cv64a6_imafdc_sv39.yaml b/verif/tests/testlist_riscv-arch-test-cv64a6_imafdc_sv39.yaml index 1550d1f22c6..2a3ba79e062 100644 --- a/verif/tests/testlist_riscv-arch-test-cv64a6_imafdc_sv39.yaml +++ b/verif/tests/testlist_riscv-arch-test-cv64a6_imafdc_sv39.yaml @@ -133,11 +133,6 @@ testlist: <<: *common_test_config asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/I/src/lbu-align-01.S - - test: rv64i_m-ld-align01 - iterations: 1 - <<: *common_test_config - asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/I/src/ld-align-01.S - - test: rv64i_m-lh-align01 iterations: 1 <<: *common_test_config @@ -148,20 +143,20 @@ testlist: <<: *common_test_config asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/I/src/lhu-align-01.S - - test: rv64i_m-lui + - test: rv64i_m-lw-align01 iterations: 1 <<: *common_test_config - asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/I/src/lui-01.S + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/I/src/lw-align-01.S - - test: rv64i_m-lw-align01 + - test: rv64i_m-ld-align01 iterations: 1 <<: *common_test_config - asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/I/src/lw-align-01.S + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/I/src/ld-align-01.S - - test: rv64i_m-lb-align01 + - test: rv64i_m-lui iterations: 1 <<: *common_test_config - asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/I/src/lb-align-01.S + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/I/src/lui-01.S - test: rv64i_m-or iterations: 1 @@ -178,11 +173,6 @@ testlist: <<: *common_test_config asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/I/src/sb-align-01.S - - test: rv64i_m-sd-align01 - iterations: 1 - <<: *common_test_config - asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/I/src/sd-align-01.S - - test: rv64i_m-sh-align01 iterations: 1 <<: *common_test_config @@ -193,6 +183,11 @@ testlist: <<: *common_test_config asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/I/src/sw-align-01.S + - test: rv64i_m-sd-align01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/I/src/sd-align-01.S + - test: rv64i_m-sll iterations: 1 <<: *common_test_config @@ -968,6 +963,7 @@ testlist: <<: *common_test_config asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/A/src/amoxor.w-01.S + #K - test: rv64im-pack-01 <<: *common_test_config iterations: 1 @@ -987,3 +983,168 @@ testlist: <<: *common_test_config iterations: 1 asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/brev8-01.S + + - test: rv64i_m-xperm8-01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/xperm8-01.S + + - test: rv64i_m-xperm4-01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/xperm4-01.S + + - test: rv64i_m-aes64es-01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/aes64es-01.S + + - test: rv64i_m-aes64esm-01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/aes64esm-01.S + + - test: rv64i_m-aes64ks2-01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/aes64ks2-01.S + + - test: rv64i_m-aes64ks1i-01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/aes64ks1i-01.S + + - test: rv64i_m-aes64ds-01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/aes64ds-01.S + + - test: rv64i_m-aes64dsm-01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/aes64dsm-01.S + + - test: rv64i_m-aes64im-01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/aes64im-01.S + + - test: rv64i_m-sha256sig0-01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha256sig0-01.S + + - test: rv64i_m-sha256sig0-rwp1 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha256sig0-rwp1.S + + - test: rv64i_m-sha256sig0-rwp2 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha256sig0-rwp2.S + + - test: rv64i_m-sha256sig1-01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha256sig1-01.S + + - test: rv64i_m-sha256sig1-rwp1 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha256sig1-rwp1.S + + - test: rv64i_m-sha256sig1-rwp2 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha256sig1-rwp2.S + + - test: rv64i_m-sha256sum0-01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha256sum0-01.S + + - test: rv64i_m-sha256sum0-rwp1 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha256sum0-rwp1.S + + - test: rv64i_m-sha256sum0-rwp2 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha256sum0-rwp2.S + + - test: rv64i_m-sha256sum1-01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha256sum1-01.S + + - test: rv64i_m-sha256sum1-rwp1 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha256sum1-rwp1.S + + - test: rv64i_m-sha256sum1-rwp2 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha256sum1-rwp2.S + + - test: rv64i_m-sha512sig0-01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha512sig0-01.S + + - test: rv64i_m-sha512sig0-rwp1 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha512sig0-rwp1.S + + - test: rv64i_m-sha512sig0-rwp2 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha512sig0-rwp2.S + + - test: rv64i_m-sha512sig1-01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha512sig1-01.S + + - test: rv64i_m-sha512sig1-rwp1 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha512sig1-rwp1.S + + - test: rv64i_m-sha512sig1-rwp2 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha512sig1-rwp2.S + + - test: rv64i_m-sha512sum0-01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha512sum0-01.S + + - test: rv64i_m-sha512sum0-rwp1 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha512sum0-rwp1.S + + - test: rv64i_m-sha512sum0-rwp2 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha512sum0-rwp2.S + + - test: rv64i_m-sha512sum1-01 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha512sum1-01.S + + - test: rv64i_m-sha512sum1-rwp1 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha512sum1-rwp1.S + + - test: rv64i_m-sha512sum1-rwp2 + iterations: 1 + <<: *common_test_config + asm_tests: /riscv-arch-test/riscv-test-suite/rv64i_m/K/src/sha512sum1-rwp2.S diff --git a/verif/tests/testlist_riscv-compliance-cv32a60x.yaml b/verif/tests/testlist_riscv-compliance-cv32a60x.yaml index 918be9d58c9..08e1cbe0cf8 100644 --- a/verif/tests/testlist_riscv-compliance-cv32a60x.yaml +++ b/verif/tests/testlist_riscv-compliance-cv32a60x.yaml @@ -355,7 +355,7 @@ testlist: - test: rv32mi-ma_addr <<: *common_test_config - iterations: 1 + iterations: 0 # spike needs to be configured with tval_en=1; cv32a60x has TvalEn=0 asm_tests: /riscv-compliance/riscv-test-suite/rv32mi/src/ma_addr.S - test: rv32mi-mcsr @@ -410,7 +410,7 @@ testlist: - test: rv32i-I-MISALIGN_LDST-01 <<: *common_test_config - iterations: 1 + iterations: 0 # spike needs to be configured with tval_en=1; cv32a60x has TvalEn=0 asm_tests: /riscv-compliance/riscv-test-suite/rv32i/src/I-MISALIGN_LDST-01.S - test: rv32i-I-ECALL-01 @@ -625,22 +625,22 @@ testlist: - test: rv32si-sbreak <<: *common_test_config - iterations: 1 + iterations: 0 # needs supervisor mode; cv32a60x has RVS=0 asm_tests: /riscv-compliance/riscv-test-suite/rv32si/src/sbreak.S - test: rv32si-scall <<: *common_test_config - iterations: 1 + iterations: 0 # needs supervisor mode; cv32a60x has RVS=0 asm_tests: /riscv-compliance/riscv-test-suite/rv32si/src/scall.S - test: rv32si-ma_fetch <<: *common_test_config - iterations: 1 + iterations: 0 # needs supervisor mode; cv32a60x has RVS=0 asm_tests: /riscv-compliance/riscv-test-suite/rv32si/src/ma_fetch.S - test: rv32si-wfi <<: *common_test_config - iterations: 1 + iterations: 0 # needs supervisor mode; cv32a60x has RVS=0 asm_tests: /riscv-compliance/riscv-test-suite/rv32si/src/wfi.S - test: rv32si-dirty @@ -650,7 +650,7 @@ testlist: - test: rv32si-csr <<: *common_test_config - iterations: 1 + iterations: 0 # needs supervisor mode; cv32a60x has RVS=0 asm_tests: /riscv-compliance/riscv-test-suite/rv32si/src/csr.S - test: rv32imc-C-LW diff --git a/verif/tests/testlist_riscv-tests-cv32a60x-p.yaml b/verif/tests/testlist_riscv-tests-cv32a60x-p.yaml index bdafab5f59d..2a0a0f5d4ff 100644 --- a/verif/tests/testlist_riscv-tests-cv32a60x-p.yaml +++ b/verif/tests/testlist_riscv-tests-cv32a60x-p.yaml @@ -255,7 +255,7 @@ testlist: asm_tests: /riscv-tests/isa/rv32mi/illegal.S - test: rv32mi-p-ma_addr - iterations: 1 + iterations: 0 # cv32a60x has TvalEn=0; spike needs tval_en=1 for misaligned addr test <<: *common_test_config asm_tests: /riscv-tests/isa/rv32mi/ma_addr.S @@ -280,27 +280,27 @@ testlist: asm_tests: /riscv-tests/isa/rv32mi/shamt.S - test: rv32si-p-csr - iterations: 1 + iterations: 0 # needs supervisor mode; cv32a60x has RVS=0 (M-only) <<: *common_test_config asm_tests: /riscv-tests/isa/rv32si/csr.S - test: rv32si-p-ma_fetch - iterations: 1 + iterations: 0 # needs supervisor mode; cv32a60x has RVS=0 (M-only) <<: *common_test_config asm_tests: /riscv-tests/isa/rv32si/ma_fetch.S - test: rv32si-p-scall - iterations: 1 + iterations: 0 # needs supervisor mode; cv32a60x has RVS=0 (M-only) <<: *common_test_config asm_tests: /riscv-tests/isa/rv32si/scall.S - test: rv32si-p-wfi - iterations: 1 + iterations: 0 # needs supervisor mode; cv32a60x has RVS=0 (M-only) <<: *common_test_config asm_tests: /riscv-tests/isa/rv32si/wfi.S - test: rv32si-p-sbreak - iterations: 1 + iterations: 0 # needs supervisor mode; cv32a60x has RVS=0 (M-only) <<: *common_test_config asm_tests: /riscv-tests/isa/rv32si/sbreak.S diff --git a/verif/tests/testlist_riscv-tests-cv64a6_imafdc_sv39-p.yaml b/verif/tests/testlist_riscv-tests-cv64a6_imafdc_sv39-p.yaml index 258abb433af..acef5044861 100644 --- a/verif/tests/testlist_riscv-tests-cv64a6_imafdc_sv39-p.yaml +++ b/verif/tests/testlist_riscv-tests-cv64a6_imafdc_sv39-p.yaml @@ -349,6 +349,11 @@ testlist: <<: *common_test_config asm_tests: /riscv-tests/isa/rv64si/dirty.S + - test: rv64si-p-noncanonical + iterations: 1 + <<: *common_test_config + asm_tests: /custom/sv39/noncanonical.S + - test: rv64si-p-ma_fetch iterations: 1 <<: *common_test_config diff --git a/verif/tests/testlist_sdtrig-tests-cv32a60x.yaml b/verif/tests/testlist_sdtrig-tests-cv32a60x.yaml new file mode 100644 index 00000000000..1a42fb0d650 --- /dev/null +++ b/verif/tests/testlist_sdtrig-tests-cv32a60x.yaml @@ -0,0 +1,43 @@ +# Copyright Thales DIS SAS +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# 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. + +# ================================================================================ +# Regression test list format +# -------------------------------------------------------------------------------- +# testlist : Assembly test list +# test : Assembly test name +# description : Description of this test +# gen_opts : Instruction generator options +# iterations : Number of iterations of this test +# no_iss : Enable/disable ISS simulator (Optional) +# gen_test : Test name used by the instruction generator +# asm_tests : Path to directed, hand-coded assembly test file or directory +# rtl_test : RTL simulation test name +# cmp_opts : Compile options passed to the instruction generator +# sim_opts : Simulation options passed to the instruction generator +# no_post_compare : Enable/disable comparison of trace log and ISS log (Optional) +# compare_opts : Options for the RTL & ISS trace comparison +# gcc_opts : gcc compile options +# -------------------------------------------------------------------------------- +# + +common_test_config: &common_test_config + path_var: TESTS_PATH + gcc_opts: "-static -mcmodel=medany -fvisibility=hidden -nostartfiles -g /custom/common/syscalls.c /custom/common/crt.S -I/custom/env -I/tests/custom/common " + +testlist: + - test: asic + iterations: 1 + <<: *common_test_config + asm_tests: /custom/trigger_tests/mcontrol6Asic.S \ No newline at end of file diff --git a/verif/tests/testlist_sdtrig-tests-cv32a65x.yaml b/verif/tests/testlist_sdtrig-tests-cv32a65x.yaml new file mode 100644 index 00000000000..5d8cef675d2 --- /dev/null +++ b/verif/tests/testlist_sdtrig-tests-cv32a65x.yaml @@ -0,0 +1,43 @@ +# Copyright Thales DIS SAS +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# 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. + +# ================================================================================ +# Regression test list format +# -------------------------------------------------------------------------------- +# testlist : Assembly test list +# test : Assembly test name +# description : Description of this test +# gen_opts : Instruction generator options +# iterations : Number of iterations of this test +# no_iss : Enable/disable ISS simulator (Optional) +# gen_test : Test name used by the instruction generator +# asm_tests : Path to directed, hand-coded assembly test file or directory +# rtl_test : RTL simulation test name +# cmp_opts : Compile options passed to the instruction generator +# sim_opts : Simulation options passed to the instruction generator +# no_post_compare : Enable/disable comparison of trace log and ISS log (Optional) +# compare_opts : Options for the RTL & ISS trace comparison +# gcc_opts : gcc compile options +# -------------------------------------------------------------------------------- +# + +common_test_config: &common_test_config + path_var: TESTS_PATH + gcc_opts: "-static -mcmodel=medany -fvisibility=hidden -nostartfiles -g /custom/common/syscalls.c /custom/common/crt.S -I/custom/env -I/tests/custom/common " + +testlist: + - test: complete + iterations: 1 + <<: *common_test_config + asm_tests: /custom/trigger_tests/mcontrol6complete.S \ No newline at end of file diff --git a/verif/tests/unit/csr_wfi/README.md b/verif/tests/unit/csr_wfi/README.md new file mode 100644 index 00000000000..37129cda523 --- /dev/null +++ b/verif/tests/unit/csr_wfi/README.md @@ -0,0 +1,63 @@ +# CSR WFI single-step regression + +This test instantiates the real `core/csr_regfile.sv` to reproduce CVA6 issue +#3497. It uses the `cv32a6_imac_sv32` configuration and a second instance of +that configuration with `DebugEn=0`. It does not force internal DUT state. + +The driver supplies decoded CSR operations, commit acknowledgements, and +exceptions at the CSR boundary. Debug entry is requested through the normal +CSR inputs; `dcsr` is programmed through CSR accesses, preserving its other +fields and selecting machine privilege, and execution resumes through `DRET`. + +Checks cover: + +- Stepped WFI with no interrupts or debug request, for both `stepie` values. +- Debug-entry redirect, single-step cause, saved privilege, and exact `DPC=PC+4`. +- No WFI halt immediately after debug re-entry or on following clocks. +- Continued debug CSR accesses and ordinary WFI after single-step is disabled. +- WFI in Debug Mode, with single-step clear and set. +- Ordinary WFI stall and wake through an enabled pending software interrupt, + `irq_i[1]`, and a debug request, including the debug-disabled case. +- Exception suppression of the WFI wait state and reset state. + +This is a CSR unit regression. It does not execute instructions through the +decoder/pipeline, execute the Debug ROM, validate trigger priority, run the +VCS/UVM debug suite, or claim coverage of other configurations. The minimal +scoreboard type includes the fields consumed by this module with triggers +disabled; the driver checks that the selected configuration disables triggers. + +## Requirements + +Use a Verilator 5 installation supporting `--binary --timing`, GNU Make, and +a C++20 compiler. The `core/cvfpu` submodule must be initialized for its package. +No RISC-V compiler, Spike libraries, or VCS license is needed. + +## Run + +From the repository root: + +```bash +bash verif/tests/unit/csr_wfi/run.sh /tmp/cva6-csr-wfi +``` + +The runner accepts an optional second argument selecting a different CSR RTL +file. `VERILATOR` may select an alternative Verilator executable. All generated +files go into the selected build directory, and compilation uses one job. + +To prove failure before the patch and success after it, supply an unpatched +baseline commit compatible with the remaining source tree: + +```bash +bash verif/tests/unit/csr_wfi/compare.sh \ + /tmp/cva6-3497-regression 40ac92ccc09534fb0c6b139a613f65868af9f499 +``` + +The comparator obtains only the baseline CSR file with `git show`; it never +replaces the working-tree RTL. It requires the baseline to fail at the specific +issue-3497 assertion, then requires the working-tree test to exit successfully +with the final pass marker. A compile failure cannot count as a reproduction. +Logs are `before.log` and `after.log` in the specified build directory. Keep +this directory outside the repository and retain it for review. + +On a machine with limited memory, run the comparator inside a systemd scope +with suitable memory limits, as with the main Verilator build. diff --git a/verif/tests/unit/csr_wfi/compare.sh b/verif/tests/unit/csr_wfi/compare.sh new file mode 100644 index 00000000000..1ebf8dead92 --- /dev/null +++ b/verif/tests/unit/csr_wfi/compare.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +set -euo pipefail +script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd) +repo_dir=$(cd -- "$script_dir/../../../.." && pwd) +if [[ $# -ne 2 ]]; then + printf 'Usage: bash %s BUILD_DIRECTORY BASELINE_GIT_REF\n' "$0" >&2 + exit 2 +fi +mkdir -p -- "$1" +build_dir=$(cd -- "$1" && pwd) +baseline_ref=$2 +baseline_dir=$(mktemp -d "$build_dir/baseline-source.XXXXXX") +git -C "$repo_dir" show "$baseline_ref:core/csr_regfile.sv" > "$baseline_dir/csr_regfile.sv" +printf 'Baseline commit: %s\n' "$(git -C "$repo_dir" rev-parse "$baseline_ref^{commit}")" +printf 'Build logs: %s\n' "$build_dir" +printf 'Building and running the pre-fix CSR module (one build job)...\n' +if bash "$script_dir/run.sh" "$build_dir/before" "$baseline_dir/csr_regfile.sv" \ + > "$build_dir/before.log" 2>&1; then + printf 'FAIL: baseline unexpectedly passed; reproduction was not established.\n' >&2 + exit 1 +else + before_status=$? +fi +if ! grep -Fq 'ISSUE3497: stepped WFI leaked halt into Debug Mode' "$build_dir/before.log"; then + tail -n 40 "$build_dir/before.log" >&2 + printf 'FAIL: baseline failed for another reason (exit %s).\n' "$before_status" >&2 + exit 1 +fi +printf 'PASS: original RTL reproduced issue #3497 (exit %s).\n' "$before_status" +printf 'Building and running the working-tree CSR module (one build job)...\n' +if bash "$script_dir/run.sh" "$build_dir/after" "$repo_dir/core/csr_regfile.sv" \ + > "$build_dir/after.log" 2>&1; then + if ! grep -Fxq 'PASS: CVA6 CSR WFI regression' "$build_dir/after.log"; then + printf 'FAIL: simulator exited without the final pass marker.\n' >&2 + exit 1 + fi +else + after_status=$? + tail -n 40 "$build_dir/after.log" >&2 + printf 'FAIL: working-tree test exited with status %s.\n' "$after_status" >&2 + exit 1 +fi +grep '^PASS' "$build_dir/after.log" +printf 'PASS: before/after CSR WFI regression comparison\n' diff --git a/verif/tests/unit/csr_wfi/csr_wfi_tb.sv b/verif/tests/unit/csr_wfi/csr_wfi_tb.sv new file mode 100644 index 00000000000..27ff03fc198 --- /dev/null +++ b/verif/tests/unit/csr_wfi/csr_wfi_tb.sv @@ -0,0 +1,312 @@ +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +// CSR-level regression for CVA6 issue #3497. No forced DUT state or UVM. +`include "rvfi_types.svh" + +module csr_wfi_case #( + parameter bit DebugEn = 1'b1 +) ( + output bit done_o +); + import ariane_pkg::*; + timeunit 1ns; timeprecision 1ps; + + function automatic config_pkg::cva6_cfg_t test_config(); + config_pkg::cva6_cfg_t cfg; + cfg = build_config_pkg::build_config(cva6_config_pkg::cva6_cfg); + cfg.DebugEn = DebugEn; + return cfg; + endfunction + localparam config_pkg::cva6_cfg_t Cfg = test_config(); + typedef logic [Cfg.XLEN-1:0] xlen_t; + typedef struct packed { + xlen_t cause; + xlen_t tval; + logic [Cfg.GPLEN-1:0] tval2; + logic [31:0] tinst; + logic gva; + logic valid; + logic timing; + } exception_t; + // Only the scoreboard fields consumed by csr_regfile (triggers disabled). + typedef struct packed { + logic [Cfg.VLEN-1:0] pc; + fu_t fu; + struct packed {logic [Cfg.VLEN-1:0] predict_address;} bp; + logic is_compressed; + } commit_t; + typedef struct packed { + logic [Cfg.XLEN-7:0] base; + logic [5:0] mode; + } jvt_t; + typedef struct packed { + xlen_t mie, mip, mideleg, hideleg; + logic sie, global_enable; + } irq_ctrl_t; + typedef `RVFI_PROBES_CSR_T(Cfg) rvfi_csr_t; + + bit clk = 0; + bit rst_n = 0; + fu_op op; + logic [11:0] addr; + xlen_t wdata, rdata; + logic [Cfg.VLEN-1:0] pc; + logic [Cfg.NrCommitPorts-1:0] ack; + commit_t instruction; + exception_t exception_in, exception_out; + logic [1:0] irq; + logic ipi, debug_req; + logic halt, debug_mode, single_step, set_debug_pc, eret; + riscv::priv_lvl_t privilege; + + csr_regfile #( + .CVA6Cfg(Cfg), + .exception_t(exception_t), + .jvt_t(jvt_t), + .irq_ctrl_t(irq_ctrl_t), + .scoreboard_entry_t(commit_t), + .rvfi_probes_csr_t(rvfi_csr_t) + ) dut ( + .clk_i(clk), + .rst_ni(rst_n), + .time_irq_i(1'b0), + .halt_csr_o(halt), + .commit_instr_i(instruction), + .commit_ack_i(ack), + .boot_addr_i(Cfg.VLEN'('h80000000)), + .hart_id_i('0), + .ex_i(exception_in), + .csr_op_i(op), + .csr_addr_i(addr), + .csr_wdata_i(wdata), + .csr_rdata_o(rdata), + .dirty_fp_state_i(1'b0), + .csr_write_fflags_i(1'b0), + .dirty_v_state_i(1'b0), + .pc_i(pc), + .csr_exception_o(exception_out), + .eret_o(eret), + .priv_lvl_o(privilege), + .acc_fflags_ex_i('0), + .acc_fflags_ex_valid_i(1'b0), + .csr_hs_ld_st_inst_i(1'b0), + .irq_i(irq), + .ipi_i(ipi), + .debug_req_i(debug_req), + .set_debug_pc_o(set_debug_pc), + .debug_mode_o(debug_mode), + .single_step_o(single_step), + .perf_data_i('0), + .sdtrig_lsu_inputs_vaddr_i('0), + .sdtrig_lsu_inputs_data_i('0), + .sdtrig_lsu_inputs_fu_i(1'b0), + .sdtrig_lsu_inputs_valid_i(1'b0), + .sdtrig_load_data_i('0), + .sdtrig_load_valid_i(1'b0), + .fetch_sdtrig_pc_i('0), + .fetch_sdtrig_instr_i('0) + ); + + task automatic check(input bit condition, input string message); + if (!condition) $fatal(1, "FAIL DebugEn=%0d: %s", DebugEn, message); + endtask + + task automatic tick(); + #5ns; + clk = 1; + #5ns; + clk = 0; + #1ns; + endtask + + task automatic idle(); + op = ADD; + addr = '0; + wdata = '0; + pc = '0; + ack = '0; + instruction = '0; + exception_in = '0; + #1ns; + endtask + + task automatic reset_dut(); + rst_n = 0; + irq = '0; + ipi = 0; + debug_req = 0; + idle(); + tick(); + rst_n = 1; + tick(); + check(!halt && !debug_mode && !single_step, "reset state"); + endtask + + task automatic write_csr(input logic [11:0] address, input xlen_t value); + check(!halt, "CSR write attempted while halted"); + op = CSR_WRITE; + addr = address; + wdata = value; + ack[0] = 1; + #1ns; + check(!exception_out.valid, "unexpected CSR write exception"); + tick(); + idle(); + endtask + + task automatic read_csr(input logic [11:0] address, output xlen_t value); + check(!halt, "CSR read attempted while halted"); + op = CSR_READ; + addr = address; + #1ns; + check(!exception_out.valid, "unexpected CSR read exception"); + value = rdata; + idle(); + endtask + + task automatic enter_debug(); + debug_req = 1; + exception_in.valid = 1; + exception_in.cause = riscv::DEBUG_REQUEST; + pc = Cfg.VLEN'('h80000020); + #1ns; + check(set_debug_pc, "debug-request redirect"); + tick(); + debug_req = 0; + idle(); + check(debug_mode && !halt, "debug-request entry"); + endtask + + task automatic configure_step(input bit step_enable, input bit stepie); + xlen_t dcsr; + read_csr(riscv::CSR_DCSR, dcsr); + dcsr[2] = step_enable; + dcsr[11] = stepie; + dcsr[1:0] = riscv::PRIV_LVL_M; + write_csr(riscv::CSR_DCSR, dcsr); + check(single_step == step_enable, "step CSR programming"); + endtask + + task automatic resume_mmode(); + op = DRET; + ack[0] = 1; + #1ns; + check(eret, "DRET return indication"); + tick(); + idle(); + check(!debug_mode && !halt && privilege == riscv::PRIV_LVL_M, + "DRET must resume running in M mode"); + endtask + + task automatic commit_wfi(input xlen_t address); + check(!halt, "WFI issued while already halted"); + op = WFI; + pc = Cfg.VLEN'(address); + instruction.pc = Cfg.VLEN'(address); + instruction.fu = CSR; + instruction.is_compressed = 0; + ack[0] = 1; + #1ns; + if (DebugEn && single_step && !debug_mode) + check(set_debug_pc, "stepped WFI must request debug redirect"); + tick(); + idle(); + endtask + + task automatic normal_wfi_tests(); + reset_dut(); + write_csr(riscv::CSR_MIE, xlen_t'(1 << 3)); + commit_wfi(xlen_t'('h80000040)); + repeat (3) begin + check(halt && !debug_mode, "ordinary WFI must wait"); + tick(); + end + // mip is registered; allow its update and the following wake clock. + ipi = 1; + repeat (2) tick(); + check(!halt, "enabled pending interrupt must wake WFI"); + + reset_dut(); + commit_wfi(xlen_t'('h80000040)); + irq[1] = 1; + tick(); + check(!halt, "irq_i[1] must wake WFI"); + + reset_dut(); + commit_wfi(xlen_t'('h80000040)); + debug_req = 1; + tick(); + check(halt == !DebugEn, "debug-request wake must respect DebugEn"); + + reset_dut(); + // Exercise the CSR module's exception guard without retirement. + op = WFI; + exception_in.valid = 1; + exception_in.cause = riscv::ILLEGAL_INSTR; + tick(); + idle(); + check(!halt, "exceptional WFI must not set the wait state"); + $display("PASS ordinary WFI/wake/exception DebugEn=%0d", DebugEn); + endtask + + task automatic stepped_wfi_test(input bit stepie); + xlen_t value; + reset_dut(); + enter_debug(); + // WFI must remain non-stalling in Debug Mode with step clear or set. + commit_wfi(xlen_t'('h80000024)); + check(debug_mode && !halt, "WFI in Debug Mode with step=0"); + configure_step(1, stepie); + commit_wfi(xlen_t'('h80000028)); + check(debug_mode && !halt, "WFI in Debug Mode with step=1"); + resume_mmode(); + check(irq == 0 && !ipi && !debug_req, "no wake event may mask the bug"); + commit_wfi(xlen_t'('h80000040)); + check(debug_mode, "stepped WFI must re-enter Debug Mode"); + check(!halt, "ISSUE3497: stepped WFI leaked halt into Debug Mode"); + read_csr(riscv::CSR_DCSR, value); + check(value[8:6] == CauseSingleStep, "single-step debug cause"); + check(value[1:0] == riscv::PRIV_LVL_M, "single-step saved privilege"); + read_csr(riscv::CSR_DPC, value); + check(value == xlen_t'('h80000044), "DPC must equal WFI PC + 4"); + repeat (4) begin + tick(); + check(debug_mode && !halt, "no delayed WFI halt in Debug Mode"); + end + // Demonstrate continued CSR access; this does not execute a Debug ROM. + write_csr(riscv::CSR_DSCRATCH0, xlen_t'('h13579bdf)); + read_csr(riscv::CSR_DSCRATCH0, value); + check(value == xlen_t'('h13579bdf), "debug CSR access after stepped WFI"); + configure_step(0, stepie); + resume_mmode(); + commit_wfi(xlen_t'('h80000044)); + check(halt && !debug_mode, "clearing step must restore ordinary WFI"); + $display("PASS stepped WFI stepie=%0d", stepie); + endtask + + initial begin + done_o = 0; + check(!Cfg.Sdtrig, "test requires a configuration with triggers disabled"); + normal_wfi_tests(); + if (DebugEn) begin + stepped_wfi_test(0); + stepped_wfi_test(1); + end + done_o = 1; + end +endmodule + +module csr_wfi_tb; + timeunit 1ns; timeprecision 1ps; + wire debug_done, no_debug_done; + csr_wfi_case #(.DebugEn(1)) debug_case (.done_o(debug_done)); + csr_wfi_case #(.DebugEn(0)) no_debug_case (.done_o(no_debug_done)); + initial begin + wait (debug_done && no_debug_done); + $display("PASS: CVA6 CSR WFI regression"); + $finish; + end + initial begin + #100us; + $fatal(1, "FAIL: CSR WFI regression timeout"); + end +endmodule diff --git a/verif/tests/unit/csr_wfi/run.sh b/verif/tests/unit/csr_wfi/run.sh new file mode 100644 index 00000000000..16e8486ec1e --- /dev/null +++ b/verif/tests/unit/csr_wfi/run.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 +set -euo pipefail +# The expected pre-fix assertion must not leave a core dump. +ulimit -c 0 +script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd) +repo_dir=$(cd -- "$script_dir/../../../.." && pwd) +build_dir=${1:-$(mktemp -d "${TMPDIR:-/tmp}/cva6-csr-wfi.XXXXXX")} +csr_source=${2:-"$repo_dir/core/csr_regfile.sv"} +mkdir -p -- "$build_dir" +build_dir=$(cd -- "$build_dir" && pwd) +csr_source=$(realpath -- "$csr_source") +verilator_bin=${VERILATOR:-verilator} +"$verilator_bin" --binary --timing --assert -j 1 -CFLAGS "-std=c++20" \ + --top-module csr_wfi_tb --Mdir "$build_dir" \ + -Wno-fatal -Wno-PINMISSING -Wno-TIMESCALEMOD \ + -I"$repo_dir/core/include" \ + "$repo_dir/core/include/config_pkg.sv" \ + "$repo_dir/core/include/cv32a6_imac_sv32_config_pkg.sv" \ + "$repo_dir/core/include/riscv_pkg.sv" \ + "$repo_dir/core/cvfpu/src/fpnew_pkg.sv" \ + "$repo_dir/core/include/ariane_pkg.sv" \ + "$repo_dir/core/include/build_config_pkg.sv" \ + "$csr_source" "$script_dir/csr_wfi_tb.sv" +"$build_dir/Vcsr_wfi_tb" diff --git a/verif/tests/uvmt/base-tests/uvmt_cva6_base_test.sv b/verif/tests/uvmt/base-tests/uvmt_cva6_base_test.sv index ffcac3a1848..e1a75c672e8 100644 --- a/verif/tests/uvmt/base-tests/uvmt_cva6_base_test.sv +++ b/verif/tests/uvmt/base-tests/uvmt_cva6_base_test.sv @@ -220,7 +220,7 @@ function uvmt_cva6_base_test_c::new(string name="uvmt_cva6_base_test", uvm_compo super.new(name, parent); // Replaces default report server - // Gives you short-and-sweet looger messages like this: + // Gives you short-and-sweet logger messages like this: // UVM_INFO @ 9.750 ns : uvmt_cva6_dut_wrap.sv(79) reporter [DUT_WRAP] load_instr_mem asserted! rs = new("rs"); diff --git a/verif/tests/uvmt/compliance-tests/uvmt_cva6_firmware_test.sv b/verif/tests/uvmt/compliance-tests/uvmt_cva6_firmware_test.sv index e45f4925043..b35bda97041 100644 --- a/verif/tests/uvmt/compliance-tests/uvmt_cva6_firmware_test.sv +++ b/verif/tests/uvmt/compliance-tests/uvmt_cva6_firmware_test.sv @@ -29,7 +29,7 @@ * translate the firmware into a "hexfile" that is read into the CVA6 * instruction memory in the testbench module. * - * This class doesn't care what the firmware does, it mearly compiles it. + * This class doesn't care what the firmware does, it merely compiles it. * */ class uvmt_cva6_firmware_test_c extends uvmt_cva6_base_test_c; @@ -143,7 +143,7 @@ task uvmt_cva6_firmware_test_c::run_phase(uvm_phase phase); `uvm_info("TEST", "Test FINISHED", UVM_NONE) // Set sim_finished (otherwise tb will flag that sim was aborted) uvm_config_db#(bit)::set(null, "", "sim_finished", 1); - uvm_config_db#(int)::set(null, "", "test_exit_code", { 0'b0, tb_exit_vif.tb_exit_o[31:1] }); + uvm_config_db#(int)::set(null, "", "test_exit_code", { 1'b0, tb_exit_vif.tb_exit_o[31:1] }); // Let the termination-triggering instruction appear in the log. @(posedge env_cntxt.clknrst_cntxt.vif.clk); // Let all pending AXI requests settle.