[gem5-dev] [S] Change in gem5/gem5[develop]: tests: Fix bugs related to gem5 Vision
Kunal Pai has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/71360?usp=email ) Change subject: tests: Fix bugs related to gem5 Vision .. tests: Fix bugs related to gem5 Vision This patch fixes refs under tests/pyunit/stdlib/resources. Removes instances of {url_base} in refs. Also, renames two refs: mongo_mock and mongo_dup_mock to mongo-mock and mongo-dup-mock to follow naming convention of other refs. Change-Id: If115114bc7a89764e7c546b77a93d36d6a3b5f8a Co-authored-by: Parth Shah Co-authored-by: Harshil2107 Co-authored-by: aarsli Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71360 Tested-by: kokoro Reviewed-by: Bobby Bruce Maintainer: Bobby Bruce --- M tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py R tests/pyunit/stdlib/resources/refs/mongo-dup-mock.json R tests/pyunit/stdlib/resources/refs/mongo-mock.json M tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json M tests/pyunit/stdlib/resources/refs/workload-checks.json 5 files changed, 5 insertions(+), 5 deletions(-) Approvals: Bobby Bruce: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py b/tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py index 96aadf6..344f67b 100644 --- a/tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py +++ b/tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py @@ -82,12 +82,12 @@ mock_json = {} -with open(Path(__file__).parent / "refs/mongo_mock.json", "r") as f: +with open(Path(__file__).parent / "refs/mongo-mock.json", "r") as f: mock_json = json.load(f) duplicate_mock_json = {} -with open(Path(__file__).parent / "refs/mongo_dup_mock.json", "r") as f: +with open(Path(__file__).parent / "refs/mongo-dup-mock.json", "r") as f: duplicate_mock_json = json.load(f) diff --git a/tests/pyunit/stdlib/resources/refs/mongo_dup_mock.json b/tests/pyunit/stdlib/resources/refs/mongo-dup-mock.json similarity index 100% rename from tests/pyunit/stdlib/resources/refs/mongo_dup_mock.json rename to tests/pyunit/stdlib/resources/refs/mongo-dup-mock.json diff --git a/tests/pyunit/stdlib/resources/refs/mongo_mock.json b/tests/pyunit/stdlib/resources/refs/mongo-mock.json similarity index 100% rename from tests/pyunit/stdlib/resources/refs/mongo_mock.json rename to tests/pyunit/stdlib/resources/refs/mongo-mock.json diff --git a/tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json b/tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json index 8349b92..a7e9c9d 100644 --- a/tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json +++ b/tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json @@ -6,7 +6,7 @@ "architecture": "X86", "is_zipped": false, "md5sum": "dbf120338b37153e3334603970cebd8c", -"url": "{url_base}/test-progs/hello/bin/x86/linux/hello64-static", +"url": "http://dist.gem5.org/dist/develop/test-progs/hello/bin/x86/linux/hello64-static;, "source": "src/simple", "resource_version": "1.0.0", "gem5_versions": [ diff --git a/tests/pyunit/stdlib/resources/refs/workload-checks.json b/tests/pyunit/stdlib/resources/refs/workload-checks.json index d19396b..d41001d 100644 --- a/tests/pyunit/stdlib/resources/refs/workload-checks.json +++ b/tests/pyunit/stdlib/resources/refs/workload-checks.json @@ -6,7 +6,7 @@ "architecture": "X86", "is_zipped": false, "md5sum": "4838c99b77d33c8307b939c16624e4ac", -"url": "{url_base}/kernels/x86/static/vmlinux-5.2.3", +"url": "http://dist.gem5.org/dist/develop/kernels/x86/static/vmlinux-5.2.3;, "source": "src/linux-kernel", "resource_version": "1.0.0", "gem5_versions": [ @@ -20,7 +20,7 @@ "architecture": "X86", "is_zipped": true, "md5sum": "90e363abf0ddf22eefa2c7c5c9391c49", -"url": "{url_base}/images/x86/ubuntu-18-04/x86-ubuntu.img.gz", +"url": "http://dist.gem5.org/dist/develop/images/x86/ubuntu-18-04/x86-ubuntu.img.gz;, "source": "src/x86-ubuntu", "root_partition": "1", "resource_version": "1.0.0", -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71360?usp=email To unsubscribe, or for
[gem5-dev] [S] Change in gem5/gem5[develop]: tests: Fix bugs related to gem5 Vision
Kunal Pai has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/71360?usp=email ) Change subject: tests: Fix bugs related to gem5 Vision .. tests: Fix bugs related to gem5 Vision This patch fixes refs under tests/pyunit/stdlib/resources. Removes instances of {url_base} in refs. Also, renames two refs: mongo_mock and mongo_dup_mock to mongo-mock and mongo-dup-mock to follow naming convention of other refs. Change-Id: If115114bc7a89764e7c546b77a93d36d6a3b5f8a Co-authored-by: Parth Shah Co-authored-by: Harshil2107 Co-authored-by: aarsli --- M tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py R tests/pyunit/stdlib/resources/refs/mongo-dup-mock.json R tests/pyunit/stdlib/resources/refs/mongo-mock.json M tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json M tests/pyunit/stdlib/resources/refs/workload-checks.json 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py b/tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py index 96aadf6..344f67b 100644 --- a/tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py +++ b/tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py @@ -82,12 +82,12 @@ mock_json = {} -with open(Path(__file__).parent / "refs/mongo_mock.json", "r") as f: +with open(Path(__file__).parent / "refs/mongo-mock.json", "r") as f: mock_json = json.load(f) duplicate_mock_json = {} -with open(Path(__file__).parent / "refs/mongo_dup_mock.json", "r") as f: +with open(Path(__file__).parent / "refs/mongo-dup-mock.json", "r") as f: duplicate_mock_json = json.load(f) diff --git a/tests/pyunit/stdlib/resources/refs/mongo_dup_mock.json b/tests/pyunit/stdlib/resources/refs/mongo-dup-mock.json similarity index 100% rename from tests/pyunit/stdlib/resources/refs/mongo_dup_mock.json rename to tests/pyunit/stdlib/resources/refs/mongo-dup-mock.json diff --git a/tests/pyunit/stdlib/resources/refs/mongo_mock.json b/tests/pyunit/stdlib/resources/refs/mongo-mock.json similarity index 100% rename from tests/pyunit/stdlib/resources/refs/mongo_mock.json rename to tests/pyunit/stdlib/resources/refs/mongo-mock.json diff --git a/tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json b/tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json index 8349b92..f336915 100644 --- a/tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json +++ b/tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json @@ -6,7 +6,7 @@ "architecture": "X86", "is_zipped": false, "md5sum": "dbf120338b37153e3334603970cebd8c", -"url": "{url_base}/test-progs/hello/bin/x86/linux/hello64-static", +"url": "https://dist.gem5.org/dist/develop/test-progs/hello/bin/x86/linux/hello64-static;, "source": "src/simple", "resource_version": "1.0.0", "gem5_versions": [ diff --git a/tests/pyunit/stdlib/resources/refs/workload-checks.json b/tests/pyunit/stdlib/resources/refs/workload-checks.json index d19396b..c9554a9 100644 --- a/tests/pyunit/stdlib/resources/refs/workload-checks.json +++ b/tests/pyunit/stdlib/resources/refs/workload-checks.json @@ -6,7 +6,7 @@ "architecture": "X86", "is_zipped": false, "md5sum": "4838c99b77d33c8307b939c16624e4ac", -"url": "{url_base}/kernels/x86/static/vmlinux-5.2.3", +"url": "https://dist.gem5.org/dist/develop/kernels/x86/static/vmlinux-5.2.3;, "source": "src/linux-kernel", "resource_version": "1.0.0", "gem5_versions": [ @@ -20,7 +20,7 @@ "architecture": "X86", "is_zipped": true, "md5sum": "90e363abf0ddf22eefa2c7c5c9391c49", -"url": "{url_base}/images/x86/ubuntu-18-04/x86-ubuntu.img.gz", +"url": "https://dist.gem5.org/dist/develop/images/x86/ubuntu-18-04/x86-ubuntu.img.gz;, "source": "src/x86-ubuntu", "root_partition": "1", "resource_version": "1.0.0", -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71360?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: If115114bc7a89764e7c546b77a93d36d6a3b5f8a Gerrit-Change-Number: 71360 Gerrit-PatchSet: 1 Gerrit-Owner: Kunal Pai ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [S] Change in gem5/gem5[develop]: tests: Fix bugs related to gem5 Vision
Kunal Pai has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/71359?usp=email ) Change subject: tests: Fix bugs related to gem5 Vision .. tests: Fix bugs related to gem5 Vision This patch fixes refs under tests/pyunit/stdlib/resources. Removes instances of {url_base} in refs. Also, renames two refs: mongo_mock and mongo_dup_mock to mongo-mock and mongo-dup-mock to follow naming convention of other refs. Change-Id: I2d0b617e3c4aecf7c8239b8e8af614b6b2a1b530 Co-authored-by: Parth Shah Co-authored-by: Harshil2107 Co-authored-by: aarsli --- M tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py R tests/pyunit/stdlib/resources/refs/mongo-dup-mock.json R tests/pyunit/stdlib/resources/refs/mongo-mock.json M tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json M tests/pyunit/stdlib/resources/refs/workload-checks.json 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py b/tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py index 96aadf6..344f67b 100644 --- a/tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py +++ b/tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py @@ -82,12 +82,12 @@ mock_json = {} -with open(Path(__file__).parent / "refs/mongo_mock.json", "r") as f: +with open(Path(__file__).parent / "refs/mongo-mock.json", "r") as f: mock_json = json.load(f) duplicate_mock_json = {} -with open(Path(__file__).parent / "refs/mongo_dup_mock.json", "r") as f: +with open(Path(__file__).parent / "refs/mongo-dup-mock.json", "r") as f: duplicate_mock_json = json.load(f) diff --git a/tests/pyunit/stdlib/resources/refs/mongo_dup_mock.json b/tests/pyunit/stdlib/resources/refs/mongo-dup-mock.json similarity index 90% rename from tests/pyunit/stdlib/resources/refs/mongo_dup_mock.json rename to tests/pyunit/stdlib/resources/refs/mongo-dup-mock.json index fe87cc8..c5e7ecd 100644 --- a/tests/pyunit/stdlib/resources/refs/mongo_dup_mock.json +++ b/tests/pyunit/stdlib/resources/refs/mongo-dup-mock.json @@ -21,7 +21,7 @@ "23.0" ], "workload_name": "x86-print-this-15000-with-simpoints", -"example_usage": "get_resource(resource_name=\"x86-print-this-1500-simpoints\")", +"example_usage": "obtain_resource(resource_name=\"x86-print-this-1500-simpoints\")", "workloads": [ "x86-print-this-15000-with-simpoints", "x86-print-this-15000-with-simpoints-and-checkpoint" diff --git a/tests/pyunit/stdlib/resources/refs/mongo_mock.json b/tests/pyunit/stdlib/resources/refs/mongo-mock.json similarity index 95% rename from tests/pyunit/stdlib/resources/refs/mongo_mock.json rename to tests/pyunit/stdlib/resources/refs/mongo-mock.json index b6376cc..11469b0 100644 --- a/tests/pyunit/stdlib/resources/refs/mongo_mock.json +++ b/tests/pyunit/stdlib/resources/refs/mongo-mock.json @@ -51,6 +51,6 @@ "gem5_versions": [ "23.0" ], -"example_usage": "get_resource(resource_name=\"x86-ubuntu-18.04-img\")" +"example_usage": "obtain_resource(resource_name=\"x86-ubuntu-18.04-img\")" } ] diff --git a/tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json b/tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json index 5c03ae0..f336915 100644 --- a/tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json +++ b/tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json @@ -6,11 +6,11 @@ "architecture": "X86", "is_zipped": false, "md5sum": "dbf120338b37153e3334603970cebd8c", -"url": "{url_base}/test-progs/hello/bin/x86/linux/hello64-static", +"url": "https://dist.gem5.org/dist/develop/test-progs/hello/bin/x86/linux/hello64-static;, "source": "src/simple", "resource_version": "1.0.0", "gem5_versions": [ "23.0" ] } -] \ No newline at end of file +] diff --git a/tests/pyunit/stdlib/resources/refs/workload-checks.json b/tests/pyunit/stdlib/resources/refs/workload-checks.json index d19396b..c9554a9 100644 --- a/tests/pyunit/stdlib/resources/refs/workload-checks.json +++ b/tests/pyunit/stdlib/resources/refs/workload-checks.json @@ -6,7 +6,7 @@ "architecture": "X86", "is_zipped": false, "md5sum": "4838c99b77d33c8307b939c16624e4ac", -"url": "{url_base}/kernels/x86/static/vmlinux-5.2.3", +"url": "https://dist.gem5.org/dist/develop/kernels/x86/static/vmlinux-5.2.3;, "source": "src/linux-kernel", "resource_version": "1.0.0", "gem5_versions": [ @@ -20,7 +20,7 @@ "architecture": "X86", "is_zipped": true, "md5sum": "90e363abf0ddf22eefa2c7c5c9391c49", -"url":
[gem5-dev] [XL] Change in gem5/gem5[develop]: resources: Add the gem5 Resources Manager
Kunal Pai has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/71218?usp=email ) Change subject: resources: Add the gem5 Resources Manager .. resources: Add the gem5 Resources Manager A GUI web-based tool to manage gem5 Resources. Can manage in two data sources, a MongoDB database or a JSON file. The JSON file can be both local or remote. JSON files are written to a temporary file before writing to the local file. The Manager supports the following functions on a high-level: - searching for a resource by ID - navigating to a resource version - adding a new resource - adding a new version to a resource - editing any information within a searched resource (while enforcing the gem5 Resources schema found at: https://resources.gem5.org/gem5-resources-schema.json) - deleting a resource version - undo and redo up to the last 10 operations The Manager also allows a user to save a session through localStorage and re-access it through a password securely. This patch also provides a Command Line Interface tool mainly for MongoDB-related functions. This CLI tool can currently: - backup a MongoDB collection to a JSON file - restore a JSON file to a MongoDB collection - search for a resource through its ID and view its JSON object - make a JSON file that is compliant with the gem5 Resources Schema Co-authored-by: Parth Shah Co-authored-by: Harshil2107 Co-authored-by: aarsli Change-Id: I8107f609c869300b5323d4942971a7ce7c28d6b5 --- A util/gem5-resources-manager/.gitignore A util/gem5-resources-manager/README.md A util/gem5-resources-manager/api/client.py A util/gem5-resources-manager/api/create_resources_json.py A util/gem5-resources-manager/api/json_client.py A util/gem5-resources-manager/api/mongo_client.py A util/gem5-resources-manager/cli.py A util/gem5-resources-manager/docs/schemaUML.svg A util/gem5-resources-manager/requirements.txt A util/gem5-resources-manager/server.py A util/gem5-resources-manager/static/help.md A util/gem5-resources-manager/static/images/favicon.png A util/gem5-resources-manager/static/images/gem5ColorLong.gif A util/gem5-resources-manager/static/images/gem5ResourcesManager.png A util/gem5-resources-manager/static/js/app.js A util/gem5-resources-manager/static/js/editor.js A util/gem5-resources-manager/static/js/index.js A util/gem5-resources-manager/static/js/login.js A util/gem5-resources-manager/static/styles/global.css A util/gem5-resources-manager/templates/404.html A util/gem5-resources-manager/templates/base.html A util/gem5-resources-manager/templates/editor.html A util/gem5-resources-manager/templates/help.html A util/gem5-resources-manager/templates/index.html A util/gem5-resources-manager/templates/login/login_json.html A util/gem5-resources-manager/templates/login/login_mongodb.html A util/gem5-resources-manager/test/__init__.py A util/gem5-resources-manager/test/api_test.py A util/gem5-resources-manager/test/comprehensive_test.py A util/gem5-resources-manager/test/json_client_test.py A util/gem5-resources-manager/test/mongo_client_test.py A util/gem5-resources-manager/test/refs/resources.json A util/gem5-resources-manager/test/refs/schema.json A util/gem5-resources-manager/test/test_json_endpoint.json 34 files changed, 6,231 insertions(+), 0 deletions(-) -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71218?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I8107f609c869300b5323d4942971a7ce7c28d6b5 Gerrit-Change-Number: 71218 Gerrit-PatchSet: 1 Gerrit-Owner: Kunal Pai ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [XS] Change in gem5/gem5[develop]: resources, tests, configs: Introduce gem5 Vision to resources
Kunal Pai has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/70859?usp=email ) Change subject: resources, tests, configs: Introduce gem5 Vision to resources .. resources, tests, configs: Introduce gem5 Vision to resources This patch makes changes to resources based on the gem5 Vision project. Firstly, a MongoDB database is supported. A JSON database's support is continued. The data for these databases is stored in src/python under "gem5-config.json". An AbstractClient is an abstract class that implements searching and sorting relevant to the databases. Databases is an optional list that can be passed while defining any Resource class and obtain_resource. These databases can be defined in the config JSON. Resource version is a new feature introduced. It is a string and decouples a resource from the gem5 Version. Example of a version is "1.0.0". It is an optional field that can be passed while defining any Resource class and obtain_resource. By default, it picks the latest version compatible with the gem5 Version of the user. A gem5 resource schema now has additional fields. These are: - source_url: Stores URL of GitHub Source of the resource. - license: License information of the resource. - tags: Words to identify a resource better, like hello for hello-world. - example_usage: How to use the resource in a simulation. - gem5_versions: List of gem5 versions that resource is compatible with. - resource_version: The version of the resource itself. - size: The load size of the resource, if it exists. - code_examples: List of objects. These objects contain the path to where a resource is used in gem5 example config scripts, and if the resource itself is used in tests or not. Some fields have been renamed: - "name" is changed to "id" - "documentation" is changed to "description" Besides these, the schema also supports resource specialization. It adds fields revant to a specific resource as specified in src/python/gem5/resources/resource.py These changes have been made to better present information on the new gem5 Resources website. But, they do not affect the way resources are used in gem5. Also, refs in the tests have been changed to match this new schema. Tests have been changed to work with the two clients. Change-Id: I19d4fecd5bb68eb6ac851ea9584276ee328e8bd8 Co-authored-by: Parth Shah Co-authored-by: Harshil Patel Co-authored-by: aarsli --- 1 file changed, 3 insertions(+), 0 deletions(-) -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/70859?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I19d4fecd5bb68eb6ac851ea9584276ee328e8bd8 Gerrit-Change-Number: 70859 Gerrit-PatchSet: 1 Gerrit-Owner: Kunal Pai ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [M] Change in gem5/gem5[develop]: stdlib: Edit RISCVMatched Configuration
Kunal Pai has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/70798?usp=email ) Change subject: stdlib: Edit RISCVMatched Configuration .. stdlib: Edit RISCVMatched Configuration This patch changes the RISCVMatched Cache Hierarchy to private L1 shared L2. It also changes the RISCVMatched Core's parameters to better match hardware performance. Also, sizes are changed to MiB or KiB instead of MB or KB, to match the datasheet. All the changes that deviate from the datasheet and the ARM HPI CPU (reference for pipeline parameters) are documented. Change-Id: I4235140f33be6a3b529a819ae6a7223cb88bb7ab --- M src/python/gem5/prebuilt/riscvmatched/riscvmatched_board.py M src/python/gem5/prebuilt/riscvmatched/riscvmatched_cache.py M src/python/gem5/prebuilt/riscvmatched/riscvmatched_core.py 3 files changed, 89 insertions(+), 55 deletions(-) diff --git a/src/python/gem5/prebuilt/riscvmatched/riscvmatched_board.py b/src/python/gem5/prebuilt/riscvmatched/riscvmatched_board.py index ae483cc..a11927e 100644 --- a/src/python/gem5/prebuilt/riscvmatched/riscvmatched_board.py +++ b/src/python/gem5/prebuilt/riscvmatched/riscvmatched_board.py @@ -109,7 +109,7 @@ def __init__( self, clk_freq: str = "1.2GHz", -l2_size: str = "2MB", +l2_size: str = "2MiB", is_fs: bool = False, ) -> None: """ @@ -321,7 +321,7 @@ root.appendCompatible(["riscv-virtio"]) for mem_range in self.mem_ranges: -node = FdtNode(f"memory@{int(mem_range.start):x}") +node = FdtNode("memory@%x" % int(mem_range.start)) node.append(FdtPropertyStrings("device_type", ["memory"])) node.append( FdtPropertyWords( diff --git a/src/python/gem5/prebuilt/riscvmatched/riscvmatched_cache.py b/src/python/gem5/prebuilt/riscvmatched/riscvmatched_cache.py index dc66af3..a424419 100644 --- a/src/python/gem5/prebuilt/riscvmatched/riscvmatched_cache.py +++ b/src/python/gem5/prebuilt/riscvmatched/riscvmatched_cache.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The Regents of the University of California +# Copyright (c) 2023 The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -42,6 +42,7 @@ from m5.objects import Cache, L2XBar, BaseXBar, SystemXBar, BadAddr, Port from gem5.utils.override import * +from typing import Type class RISCVMatchedCacheHierarchy( @@ -50,17 +51,7 @@ """ A cache setup where each core has a private L1 Data and Instruction Cache, -and a private L2 cache. -The HiFive board has a partially inclusive cache hierarchy, hence this hierarchy is chosen. -The details of the cache hierarchy are in Table 7, page 36 of the datasheet. - -- L1 Instruction Cache: -- 32 KiB 4-way set associative -- L1 Data Cache -- 32 KiB 8-way set associative -- L2 Cache -- 2 MiB 16-way set associative - +and a shared L2 cache. """ def __init__( @@ -74,9 +65,9 @@ AbstractClassicCacheHierarchy.__init__(self=self) AbstractTwoLevelCacheHierarchy.__init__( self, -l1i_size="32kB", +l1i_size="32KiB", l1i_assoc=4, -l1d_size="32kB", +l1d_size="32KiB", l1d_assoc=8, l2_size=l2_size, l2_assoc=16, @@ -108,16 +99,17 @@ for i in range(board.get_processor().get_num_cores()) ] self.l1dcaches = [ -L1DCache(size=self._l1d_size, assoc=self._l1d_assoc) +L1DCache( +size=self._l1d_size, assoc=self._l1d_assoc, response_latency=10 +) for i in range(board.get_processor().get_num_cores()) ] -self.l2buses = [ -L2XBar() for i in range(board.get_processor().get_num_cores()) -] -self.l2caches = [ -L2Cache(size=self._l2_size, assoc=self._l2_assoc) -for i in range(board.get_processor().get_num_cores()) -] +self.l2bus = L2XBar() + +self.l2cache = L2Cache( +size=self._l2_size, assoc=self._l2_assoc, data_latency=20 +) + # ITLB Page walk caches self.iptw_caches = [ MMUCache(size="4KiB") @@ -137,14 +129,10 @@ cpu.connect_icache(self.l1icaches[i].cpu_side) cpu.connect_dcache(self.l1dcaches[i].cpu_side) -self.l1icaches[i].mem_side = self.l2buses[i].cpu_side_ports -self.l1dcaches[i].mem_side = self.l2buses[i].cpu_side_ports -self.iptw_caches[i].mem_side = self.l2buses[i].cpu_side_ports -self.dptw_caches[i].mem_side = self.l2buses[i].cpu_side_ports - -self.l2buses[i].mem_side_ports = self.l2caches[i].cpu_side - -
[gem5-dev] [M] Change in gem5/gem5[develop]: configs: Adds an example script for MIPS Hello
Kunal Pai has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/68777?usp=email ) Change subject: configs: Adds an example script for MIPS Hello .. configs: Adds an example script for MIPS Hello Used the "mips-hello" resource to make an stdlib example script for that resource. Change-Id: I14f1bac69aebde4d8fe96eb844f41d5d97d606ae --- A configs/example/gem5_library/mips-hello.py 1 file changed, 89 insertions(+), 0 deletions(-) diff --git a/configs/example/gem5_library/mips-hello.py b/configs/example/gem5_library/mips-hello.py new file mode 100644 index 000..4a0e904 --- /dev/null +++ b/configs/example/gem5_library/mips-hello.py @@ -0,0 +1,89 @@ +# Copyright (c) 2023 The Regents of the University of California +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer; +# redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution; +# neither the name of the copyright holders nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +""" +This gem5 configuation script creates a simple board to run a MIPS +"hello world" binary. + +This is setup is the close to the simplest setup possible using the gem5 +library. It does not contain any kind of caching, IO, or any non-essential +components. + +Usage +- + +``` +scons build/MIPS/gem5.opt +./build/MIPS/gem5.opt configs/example/gem5_library/mips-hello.py +``` +""" + +from gem5.isas import ISA +from gem5.utils.requires import requires +from gem5.resources.resource import Resource +from gem5.components.memory import SingleChannelDDR3_2133 +from gem5.components.processors.cpu_types import CPUTypes +from gem5.components.boards.simple_board import SimpleBoard +from gem5.components.cachehierarchies.classic.no_cache import NoCache +from gem5.components.processors.simple_processor import SimpleProcessor +from gem5.simulate.simulator import Simulator + +# This check ensures the gem5 binary is compiled to the MIPS ISA target. +# If not, an exception will be thrown. +requires(isa_required=ISA.MIPS) + +# In this setup we don't have a cache. `NoCache` can be used for such setups. +cache_hierarchy = NoCache() + +# We use a single channel DDR3_2133 memory system +memory = SingleChannelDDR3_2133(size="16MB") + +# We use a simple TIMING processor with one core. +processor = SimpleProcessor( +cpu_type=CPUTypes.TIMING, isa=ISA.MIPS, num_cores=1 +) + +# The gem5 library simple board which can be used to run simple SE-mode +# simulations. +board = SimpleBoard( +clk_freq="5GHz", +processor=processor, +memory=memory, +cache_hierarchy=cache_hierarchy, +) + +board.set_se_binary_workload(Resource("mips-hello")) + +# Lastly we run the simulation. +simulator = Simulator(board=board) +simulator.run() + +print( +"Exiting @ tick {} because {}.".format( +simulator.get_current_tick(), +simulator.get_last_exit_event_cause(), +) +) -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/68777?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I14f1bac69aebde4d8fe96eb844f41d5d97d606ae Gerrit-Change-Number: 68777 Gerrit-PatchSet: 1 Gerrit-Owner: Kunal Pai Gerrit-MessageType: newchange ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [M] Change in gem5/gem5[develop]: configs: Adds an example script for POWER Hello
Kunal Pai has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/68737?usp=email ) Change subject: configs: Adds an example script for POWER Hello .. configs: Adds an example script for POWER Hello Used the "power-hello" resource to make an stdlib example script for that resource Change-Id: Ia8a051330e263617aa0e2ef08321d01cfa1093c4 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/68737 Reviewed-by: Boris Shingarov Maintainer: Boris Shingarov Tested-by: kokoro --- A configs/example/gem5_library/power-hello.py 1 file changed, 89 insertions(+), 0 deletions(-) Approvals: Boris Shingarov: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/configs/example/gem5_library/power-hello.py b/configs/example/gem5_library/power-hello.py new file mode 100644 index 000..cf31778 --- /dev/null +++ b/configs/example/gem5_library/power-hello.py @@ -0,0 +1,89 @@ +# Copyright (c) 2023 The Regents of the University of California +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer; +# redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution; +# neither the name of the copyright holders nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +""" +This gem5 configuation script creates a simple board to run a POWER +"hello world" binary. + +This is setup is the close to the simplest setup possible using the gem5 +library. It does not contain any kind of caching, IO, or any non-essential +components. + +Usage +- + +``` +scons build/POWER/gem5.opt +./build/POWER/gem5.opt configs/example/gem5_library/power-hello.py +``` +""" + +from gem5.isas import ISA +from gem5.utils.requires import requires +from gem5.resources.resource import Resource +from gem5.components.memory import SingleChannelDDR4_2400 +from gem5.components.processors.cpu_types import CPUTypes +from gem5.components.boards.simple_board import SimpleBoard +from gem5.components.cachehierarchies.classic.no_cache import NoCache +from gem5.components.processors.simple_processor import SimpleProcessor +from gem5.simulate.simulator import Simulator + +# This check ensures the gem5 binary is compiled to the POWER ISA target. +# If not, an exception will be thrown. +requires(isa_required=ISA.POWER) + +# In this setup we don't have a cache. `NoCache` can be used for such setups. +cache_hierarchy = NoCache() + +# We use a single channel DDR4_2400 memory system +memory = SingleChannelDDR4_2400(size="32MB") + +# We use a simple ATOMIC processor with one core. +processor = SimpleProcessor( +cpu_type=CPUTypes.ATOMIC, isa=ISA.POWER, num_cores=1 +) + +# The gem5 library simple board which can be used to run simple SE-mode +# simulations. +board = SimpleBoard( +clk_freq="3GHz", +processor=processor, +memory=memory, +cache_hierarchy=cache_hierarchy, +) + +board.set_se_binary_workload(Resource("power-hello")) + +# Lastly we run the simulation. +simulator = Simulator(board=board) +simulator.run() + +print( +"Exiting @ tick {} because {}.".format( +simulator.get_current_tick(), +simulator.get_last_exit_event_cause(), +) +) -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/68737?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: Ia8a051330e263617aa0e2ef08321d01cfa1093c4 Gerrit-Change-Number: 68737 Gerrit-PatchSet: 9 Gerrit-Owner: Kunal Pai Gerri
[gem5-dev] [M] Change in gem5/gem5[develop]: configs: Added example script for POWER Hello
Kunal Pai has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/68737?usp=email ) Change subject: configs: Added example script for POWER Hello .. configs: Added example script for POWER Hello Used the "power-hello" resource to make an stdlib example script for that resource Change-Id: Ia8a051330e263617aa0e2ef08321d01cfa1093c4 --- A configs/example/gem5_library/power-hello.py 1 file changed, 91 insertions(+), 0 deletions(-) diff --git a/configs/example/gem5_library/power-hello.py b/configs/example/gem5_library/power-hello.py new file mode 100644 index 000..fb3af98 --- /dev/null +++ b/configs/example/gem5_library/power-hello.py @@ -0,0 +1,91 @@ +# Copyright (c) 2023 The Regents of the University of California +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer; +# redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution; +# neither the name of the copyright holders nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +""" +This gem5 configuation script creates a simple board to run a POWER +"hello world" binary. + +This is setup is the close to the simplest setup possible using the gem5 +library. It does not contain any kind of caching, IO, or any non-essential +components. + +Usage +- + +``` +scons build/POWER/gem5.opt +./build/POWER/gem5.opt configs/example/gem5_library/power-hello.py +``` +""" + +from gem5.isas import ISA +from gem5.utils.requires import requires +from gem5.resources.resource import Resource +from gem5.components.memory import SingleChannelDDR4_2400 +from gem5.components.processors.cpu_types import CPUTypes +from gem5.components.boards.simple_board import SimpleBoard +from gem5.components.cachehierarchies.classic.no_cache import NoCache +from gem5.components.processors.simple_processor import SimpleProcessor +from gem5.simulate.simulator import Simulator + +# This check ensures the gem5 binary is compiled to the POWER ISA target. +# If not, an exception will be thrown. +requires(isa_required=ISA.POWER) + +# In this setup we don't have a cache. `NoCache` can be used for such setups. +cache_hierarchy = NoCache() + +# We use a single channel DDR4_2400 memory system +memory = SingleChannelDDR4_2400(size="32MB") + +# We use a simple ATOMIC processor with one core. +processor = SimpleProcessor(cpu_type=CPUTypes.ATOMIC, +isa=ISA.POWER, +num_cores=1) + +# The gem5 library simple board which can be used to run simple SE-mode +# simulations. +board = SimpleBoard( +clk_freq="3GHz", +processor=processor, +memory=memory, +cache_hierarchy=cache_hierarchy, +) + +board.set_se_binary_workload( +Resource("power-hello") +) + +# Lastly we run the simulation. +simulator = Simulator(board=board) +simulator.run() + +print( +"Exiting @ tick {} because {}.".format( +simulator.get_current_tick(), +simulator.get_last_exit_event_cause(), +) +) -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/68737?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: Ia8a051330e263617aa0e2ef08321d01cfa1093c4 Gerrit-Change-Number: 68737 Gerrit-PatchSet: 1 Gerrit-Owner: Kunal Pai Gerrit-MessageType: newchange ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [M] Change in gem5/gem5[develop]: configs: Added example script for SPARC Hello
Kunal Pai has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/68718?usp=email ) Change subject: configs: Added example script for SPARC Hello .. configs: Added example script for SPARC Hello Used the same format for hello scripts to make one for "sparc-hello" Resource. Change-Id: I05e3911383576b2d8972b3c6ca75789adb5ebe9d --- A configs/example/gem5_library/sparc-hello.py 1 file changed, 91 insertions(+), 0 deletions(-) diff --git a/configs/example/gem5_library/sparc-hello.py b/configs/example/gem5_library/sparc-hello.py new file mode 100644 index 000..1241293 --- /dev/null +++ b/configs/example/gem5_library/sparc-hello.py @@ -0,0 +1,91 @@ +# Copyright (c) 2023 The Regents of the University of California +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer; +# redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution; +# neither the name of the copyright holders nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +""" +This gem5 configuation script creates a simple board to run an SPARC +"hello world" binary. + +This is setup is the close to the simplest setup possible using the gem5 +library. It does not contain any kind of caching, IO, or any non-essential +components. + +Usage +- + +``` +scons build/SPARC/gem5.opt +./build/SPARC/gem5.opt configs/example/gem5_library/sparc-hello.py +``` +""" + +from gem5.isas import ISA +from gem5.utils.requires import requires +from gem5.resources.resource import Resource +from gem5.components.memory import SingleChannelDDR3_1600 +from gem5.components.processors.cpu_types import CPUTypes +from gem5.components.boards.simple_board import SimpleBoard +from gem5.components.cachehierarchies.classic.no_cache import NoCache +from gem5.components.processors.simple_processor import SimpleProcessor +from gem5.simulate.simulator import Simulator + +# This check ensures the gem5 binary is compiled to the SPARC ISA target. +# If not, an exception will be thrown. +requires(isa_required=ISA.SPARC) + +# In this setup we don't have a cache. `NoCache` can be used for such setups. +cache_hierarchy = NoCache() + +# We use a single channel DDR3_1600 memory system +memory = SingleChannelDDR3_1600(size="32MB") + +# We use a simple Timing processor with one core. +processor = SimpleProcessor(cpu_type=CPUTypes.TIMING, +isa=ISA.SPARC, +num_cores=1) + +# The gem5 library simble board which can be used to run simple SE-mode +# simulations. +board = SimpleBoard( +clk_freq="3GHz", +processor=processor, +memory=memory, +cache_hierarchy=cache_hierarchy, +) + +board.set_se_binary_workload( +Resource("sparc-hello") +) + +# Lastly we run the simulation. +simulator = Simulator(board=board) +simulator.run() + +print( +"Exiting @ tick {} because {}.".format( +simulator.get_current_tick(), +simulator.get_last_exit_event_cause(), +) +) -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/68718?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I05e3911383576b2d8972b3c6ca75789adb5ebe9d Gerrit-Change-Number: 68718 Gerrit-PatchSet: 1 Gerrit-Owner: Kunal Pai Gerrit-MessageType: newchange ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [M] Change in gem5/gem5[develop]: stdlib, configs: Add example FS script for RISCV Matched
Kunal Pai has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/64014?usp=email ) Change subject: stdlib, configs: Add example FS script for RISCV Matched .. stdlib, configs: Add example FS script for RISCV Matched This script loads riscv-bootloader-vmlinux-5.10 onto a riscv-ubuntu-20.04-img disk image on the RISCVMatched prebuilt board found at src/python/gem5/prebuilt/riscvmatched directory. Change-Id: Ic2b4b19bac0a66d40d667b82a43c7791ff918847 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64014 Maintainer: Bobby Bruce Reviewed-by: Bobby Bruce Tested-by: kokoro --- A configs/example/gem5_library/riscvmatched-fs.py 1 file changed, 84 insertions(+), 0 deletions(-) Approvals: Bobby Bruce: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/configs/example/gem5_library/riscvmatched-fs.py b/configs/example/gem5_library/riscvmatched-fs.py new file mode 100644 index 000..da47a4b --- /dev/null +++ b/configs/example/gem5_library/riscvmatched-fs.py @@ -0,0 +1,66 @@ +# Copyright (c) 2022 The Regents of the University of California +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer; +# redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution; +# neither the name of the copyright holders nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +""" +This gem5 configuration script runs a full system Ubuntu image, Linux +kernel and calls m5 exit after the kernel is loaded. + +Usage +--- + +``` +scons build/RISCV/gem5.opt + +./build/RISCV/gem5.opt \ +configs/example/gem5_library/riscvmatched-fs.py +``` +""" + +from python.gem5.prebuilt.riscvmatched.riscvmatched_board import ( +RISCVMatchedBoard, +) +from gem5.utils.requires import requires +from gem5.isas import ISA +from gem5.simulate.simulator import Simulator +from gem5.resources.workload import Workload + +requires(isa_required=ISA.RISCV) + +# instantiate the riscv matched board with default parameters +board = RISCVMatchedBoard( +clk_freq="1.2GHz", +l2_size="2MB", +is_fs=True, +) + +# Here we a full system workload: "riscv-ubuntu-20.04-boot" which boots +# Ubuntu 20.04. Once the system successfully boots it encounters an `m5_exit` +# instruction which stops the simulation. When the simulation has ended you may +# inspect `m5out/system.pc.com_1.device` to see the stdout. +board.set_workload(Workload("riscv-ubuntu-20.04-boot")) + +simulator = Simulator(board=board) +simulator.run() -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/64014?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: Ic2b4b19bac0a66d40d667b82a43c7791ff918847 Gerrit-Change-Number: 64014 Gerrit-PatchSet: 5 Gerrit-Owner: Kunal Pai Gerrit-Reviewer: Bobby Bruce Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: Kunal Pai Gerrit-Reviewer: kokoro Gerrit-MessageType: merged ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [S] Change in gem5/gem5[develop]: stdlib: Edit RiscvMatched RTC
Kunal Pai has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/64013?usp=email ) Change subject: stdlib: Edit RiscvMatched RTC .. stdlib: Edit RiscvMatched RTC Fixed the bug that made FS mode break. Changed RTC value as fix. Change-Id: I0effa1ecd32a8a8845e619d940f8e0efe549cfc1 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64013 Maintainer: Jason Lowe-Power Reviewed-by: Jason Lowe-Power Tested-by: kokoro --- M src/python/gem5/prebuilt/riscvmatched/riscvmatched_board.py 1 file changed, 17 insertions(+), 3 deletions(-) Approvals: Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/src/python/gem5/prebuilt/riscvmatched/riscvmatched_board.py b/src/python/gem5/prebuilt/riscvmatched/riscvmatched_board.py index 986f29e..469010c 100644 --- a/src/python/gem5/prebuilt/riscvmatched/riscvmatched_board.py +++ b/src/python/gem5/prebuilt/riscvmatched/riscvmatched_board.py @@ -104,8 +104,6 @@ Details can be found on page 77, section 7.1 of the datasheet. Datasheet for inbuilt params can be found here: https://sifive.cdn.prismic.io/sifive/1a82e600-1f93-4f41-b2d8-86ed8b16acba_fu740-c000-manual-v1p6.pdf - -NOTE: FS Mode does not work yet. """ def __init__( @@ -153,7 +151,7 @@ # Add the RTC self.platform.rtc = RiscvRTC( -frequency=Frequency("1MHz") +frequency=Frequency("100MHz") ) # page 77, section 7.1 self.platform.clint.int_pin = self.platform.rtc.int_pin -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/64013?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I0effa1ecd32a8a8845e619d940f8e0efe549cfc1 Gerrit-Change-Number: 64013 Gerrit-PatchSet: 3 Gerrit-Owner: Kunal Pai Gerrit-Reviewer: Bobby Bruce Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: Kunal Pai Gerrit-Reviewer: kokoro Gerrit-MessageType: merged ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [M] Change in gem5/gem5[develop]: stdlib, configs: Add example FS script for RISCV Matched
Kunal Pai has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/64014?usp=email ) Change subject: stdlib, configs: Add example FS script for RISCV Matched .. stdlib, configs: Add example FS script for RISCV Matched This script loads riscv-bootloader-vmlinux-5.10 onto a riscv-ubuntu-20.04-img disk image on the RISCVMatched prebuilt board found at src/python/gem5/prebuilt/riscvmatched directory. Change-Id: Ic2b4b19bac0a66d40d667b82a43c7791ff918847 --- A configs/example/gem5_library/riscvmatched-fs.py 1 file changed, 85 insertions(+), 0 deletions(-) diff --git a/configs/example/gem5_library/riscvmatched-fs.py b/configs/example/gem5_library/riscvmatched-fs.py new file mode 100644 index 000..12764b4 --- /dev/null +++ b/configs/example/gem5_library/riscvmatched-fs.py @@ -0,0 +1,71 @@ +# Copyright (c) 2022 The Regents of the University of California +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer; +# redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution; +# neither the name of the copyright holders nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +""" +This gem5 configuration script runs a full system Ubuntu image, Linux +kernel and calls m5 exit after the kernel is loaded. + +Usage +--- + +``` +scons build/RISCV/gem5.opt + +./build/RISCV/gem5.opt \ +configs/example/gem5_library/riscvmatched-fs.py +``` +""" + +from python.gem5.prebuilt.riscvmatched.riscvmatched_board import ( +RISCVMatchedBoard, +) +from gem5.utils.requires import requires +from gem5.isas import ISA +from gem5.simulate.simulator import Simulator +from gem5.resources.workload import Workload +from gem5.resources.resource import Resource + +requires(isa_required=ISA.RISCV) + +# instantiate the riscv matched board with default parameters +board = RISCVMatchedBoard( +clk_freq="1.2GHz", +l2_size="2MB", +is_fs=True, +) + +# Here we a full system workload: "riscv-ubuntu-20.04-boot" which boots +# Ubuntu 20.04. Once the system successfully boots it encounters an `m5_exit` +# instruction which stops the simulation. When the simulation has ended you may +# inspect `m5out/system.pc.com_1.device` to see the stdout. +board.set_kernel_disk_workload( +kernel=Resource("riscv-bootloader-vmlinux-5.10"), +disk_image=Resource("riscv-ubuntu-20.04-img"), +kernel_args = board.get_default_kernel_args(), +) + +simulator = Simulator(board=board) +simulator.run() -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/64014?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: Ic2b4b19bac0a66d40d667b82a43c7791ff918847 Gerrit-Change-Number: 64014 Gerrit-PatchSet: 1 Gerrit-Owner: Kunal Pai Gerrit-MessageType: newchange ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [S] Change in gem5/gem5[develop]: stdlib: Edit RiscvMatched RTC
Kunal Pai has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/64013?usp=email ) Change subject: stdlib: Edit RiscvMatched RTC .. stdlib: Edit RiscvMatched RTC Fixed the bug that made FS mode break. Changed RTC value as fix. Change-Id: I0effa1ecd32a8a8845e619d940f8e0efe549cfc1 --- M src/python/gem5/prebuilt/riscvmatched/riscvmatched_board.py 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/python/gem5/prebuilt/riscvmatched/riscvmatched_board.py b/src/python/gem5/prebuilt/riscvmatched/riscvmatched_board.py index 986f29e..469010c 100644 --- a/src/python/gem5/prebuilt/riscvmatched/riscvmatched_board.py +++ b/src/python/gem5/prebuilt/riscvmatched/riscvmatched_board.py @@ -104,8 +104,6 @@ Details can be found on page 77, section 7.1 of the datasheet. Datasheet for inbuilt params can be found here: https://sifive.cdn.prismic.io/sifive/1a82e600-1f93-4f41-b2d8-86ed8b16acba_fu740-c000-manual-v1p6.pdf - -NOTE: FS Mode does not work yet. """ def __init__( @@ -153,7 +151,7 @@ # Add the RTC self.platform.rtc = RiscvRTC( -frequency=Frequency("1MHz") +frequency=Frequency("100MHz") ) # page 77, section 7.1 self.platform.clint.int_pin = self.platform.rtc.int_pin -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/64013?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I0effa1ecd32a8a8845e619d940f8e0efe549cfc1 Gerrit-Change-Number: 64013 Gerrit-PatchSet: 1 Gerrit-Owner: Kunal Pai Gerrit-MessageType: newchange ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [XL] Change in gem5/gem5[develop]: stdlib: Added RiscvMatched prebuilt board
__init__( +self, +core_id, +): +super().__init__(core=U74CPU(cpu_id=core_id), isa=ISA.RISCV) diff --git a/src/python/gem5/prebuilt/riscvmatched/riscvmatched_processor.py b/src/python/gem5/prebuilt/riscvmatched/riscvmatched_processor.py new file mode 100644 index 000..838f810 --- /dev/null +++ b/src/python/gem5/prebuilt/riscvmatched/riscvmatched_processor.py @@ -0,0 +1,55 @@ +# Copyright (c) 2022 The Regents of the University of California +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer; +# redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution; +# neither the name of the copyright holders nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +from gem5.utils.override import overrides +from gem5.components.boards.mem_mode import MemMode + +from m5.util import warn + +from gem5.components.processors.base_cpu_processor import BaseCPUProcessor +from gem5.components.processors.cpu_types import CPUTypes +from gem5.components.boards.abstract_board import AbstractBoard +from .riscvmatched_core import U74Core + + +class U74Processor(BaseCPUProcessor): +""" +A U74Processor contains a number of cores of U74Core. +""" + +def __init__( +self, +is_fs: bool, +) -> None: +self._cpu_type = CPUTypes.MINOR +super().__init__(cores=self._create_cores(is_fs)) + +def _create_cores(self, is_fs: bool): +if is_fs: +num_cores = 4 +else: +num_cores = 1 +return [U74Core(core_id=i) for i in range(num_cores)] -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/63411?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: Ic2c066bb3a41dc2f42566ce971f9a665542f9771 Gerrit-Change-Number: 63411 Gerrit-PatchSet: 18 Gerrit-Owner: Kunal Pai Gerrit-Reviewer: Bobby Bruce Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: Kunal Pai Gerrit-Reviewer: kokoro Gerrit-CC: Jasjeet Rangi Gerrit-MessageType: merged ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org