stdlib: Move Root obj creation from Simulator to Board
It makes much more sense for the Root Object to be create within the board and passed where required. Creating it in the Simulator class is not required. For this to work the signuature of the `_pre_instantiate` function in `AbstractBoard` has been updated to return the Root object.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user