[gem5-dev] Change in gem5/gem5[develop]: stdlib: Update the LupvBoard to use 'requires'

2021-12-07 Thread melissa jost (Gerrit) via gem5-dev
melissa jost has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/53084 )


Change subject: stdlib: Update the LupvBoard to use 'requires'
..

stdlib: Update the LupvBoard to use 'requires'

Usage of this function was previously avoided due to a bug which has
since been fixed:
https://gem5-review.googlesource.com/c/public/gem5/+/53003

Change-Id: Idc76ca26d02dcfbb290cebcca297e50e905d8e6d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53084
Maintainer: Bobby Bruce 
Tested-by: kokoro 
Reviewed-by: Jason Lowe-Power 
---
M src/python/gem5/components/boards/experimental/lupv_board.py
1 file changed, 21 insertions(+), 7 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Bobby Bruce: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/python/gem5/components/boards/experimental/lupv_board.py  
b/src/python/gem5/components/boards/experimental/lupv_board.py

index e2787d5..d14326c 100644
--- a/src/python/gem5/components/boards/experimental/lupv_board.py
+++ b/src/python/gem5/components/boards/experimental/lupv_board.py
@@ -33,7 +33,7 @@
 from ...memory.abstract_memory_system import AbstractMemorySystem
 from ...cachehierarchies.abstract_cache_hierarchy import  
AbstractCacheHierarchy

 from isas import ISA
-from runtime import get_runtime_isa
+from utils.requires import requires

 import m5
 from m5.objects import (
@@ -89,15 +89,12 @@
 cache_hierarchy: AbstractCacheHierarchy,
 ) -> None:

-super().__init__(clk_freq, processor, memory, cache_hierarchy)
-if get_runtime_isa() != ISA.RISCV:
-raise EnvironmentError(
-"RiscvBoard will only work with the RISC-V ISA. Please"
-" recompile gem5 with ISA=RISCV."
-)
+requires(isa_required=ISA.RISCV)
 if cache_hierarchy.is_ruby():
 raise EnvironmentError("RiscvBoard is not compatible with  
Ruby")


+super().__init__(clk_freq, processor, memory, cache_hierarchy)
+
 @overrides(AbstractBoard)
 def _setup_board(self) -> None:


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53084
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: Idc76ca26d02dcfbb290cebcca297e50e905d8e6d
Gerrit-Change-Number: 53084
Gerrit-PatchSet: 11
Gerrit-Owner: Bobby Bruce 
Gerrit-Reviewer: Bobby Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-Reviewer: melissa jost 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Update the LupvBoard to use 'requires'

2021-11-22 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/53084 )



Change subject: stdlib: Update the LupvBoard to use 'requires'
..

stdlib: Update the LupvBoard to use 'requires'

Usage of this function was previously avoided due to a bug which has
since been fixed:
https://gem5-review.googlesource.com/c/public/gem5/+/53003

Change-Id: Idc76ca26d02dcfbb290cebcca297e50e905d8e6d
---
M src/python/gem5/components/boards/experimental/lupv_board.py
1 file changed, 17 insertions(+), 7 deletions(-)



diff --git a/src/python/gem5/components/boards/experimental/lupv_board.py  
b/src/python/gem5/components/boards/experimental/lupv_board.py

index 423e3d9..76e857e 100644
--- a/src/python/gem5/components/boards/experimental/lupv_board.py
+++ b/src/python/gem5/components/boards/experimental/lupv_board.py
@@ -33,7 +33,7 @@
 from ...memory.abstract_memory_system import AbstractMemorySystem
 from ...cachehierarchies.abstract_cache_hierarchy import  
AbstractCacheHierarchy

 from isas import ISA
-from runtime import get_runtime_isa
+from utils.requires import requires

 import m5
 from m5.objects import (
@@ -89,15 +89,12 @@
 cache_hierarchy: AbstractCacheHierarchy,
 ) -> None:

-super().__init__(clk_freq, processor, memory, cache_hierarchy)
-if get_runtime_isa() != ISA.RISCV:
-raise EnvironmentError(
-"RiscvBoard will only work with the RISC-V ISA. Please"
-" recompile gem5 with ISA=RISCV."
-)
+requires(isa_required=ISA.RISCV)
 if cache_hierarchy.is_ruby():
 raise EnvironmentError("RiscvBoard is not compatible with  
Ruby")


+super().__init__(clk_freq, processor, memory, cache_hierarchy)
+
 @overrides(AbstractBoard)
 def _setup_board(self) -> None:


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53084
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: Idc76ca26d02dcfbb290cebcca297e50e905d8e6d
Gerrit-Change-Number: 53084
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s