stdlib: Extend AbstractBoard pre_instantiation functionality (#1497)

* Deprecates the setting of FS/SE mode via the `Simulator` module.
* Moved the creation of the `Root` object from the `Simulator` to the
board.
* Moved the setting of `sim_quantum` from the `Simulator` to the
processor.
* Allows for easier development of boards which support both SE and FS
mode simulation by moving board setup function calls to occur after the
set_workload function is call which sets a boards stats `is_fs` status.
This commit is contained in:
Ivana Mitrovic
2024-10-14 10:12:41 -07:00
committed by GitHub
15 changed files with 164 additions and 77 deletions

View File

@@ -207,15 +207,15 @@ print("Running with ISA: " + processor.get_isa().name)
print("Running with protocol: " + get_runtime_coherence_protocol().name)
print()
root = Root(full_system=True, system=motherboard)
# Disable the gdb ports. Required for forking.
m5.disableAllListeners()
root = motherboard._pre_instantiate()
# TODO: This of annoying. Is there a way to fix this to happen
# automatically when running KVM?
root.sim_quantum = int(1e9)
# Disable the gdb ports. Required for forking.
m5.disableAllListeners()
motherboard._pre_instantiate()
m5.instantiate()
# Simulate the inital boot with the starting KVM cpu

View File

@@ -83,9 +83,8 @@ motherboard = TestBoard(
memory=memory,
cache_hierarchy=cache_hierarchy,
)
root = Root(full_system=False, system=motherboard)
motherboard._pre_instantiate()
root = motherboard._pre_instantiate()
m5.instantiate()
generator.start_traffic()

View File

@@ -83,9 +83,8 @@ motherboard = TestBoard(
memory=memory,
cache_hierarchy=cache_hierarchy,
)
root = Root(full_system=False, system=motherboard)
motherboard._pre_instantiate()
root = motherboard._pre_instantiate()
m5.instantiate()
generator.start_traffic()

View File

@@ -202,9 +202,7 @@ motherboard = TestBoard(
cache_hierarchy=cache_hierarchy,
)
root = Root(full_system=False, system=motherboard)
motherboard._pre_instantiate()
root = motherboard._pre_instantiate()
m5.instantiate()
generator.start_traffic()