python: Apply Black formatter to Python files

The command executed was `black src configs tests util`.

Change-Id: I8dfaa6ab04658fea37618127d6ac19270028d771
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47024
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Bobby R. Bruce
2022-07-05 11:02:25 -07:00
committed by Giacomo Travaglini
parent 1cfaa8da83
commit 787204c92d
980 changed files with 35668 additions and 22233 deletions

View File

@@ -34,14 +34,18 @@ from .Ruby import create_topology, create_directories
#
# Declare caches used by the protocol
#
class L1Cache(RubyCache): pass
class L1Cache(RubyCache):
pass
def define_options(parser):
return
def create_system(options, full_system, system, dma_ports, bootmem,
ruby_system, cpus):
if buildEnv['PROTOCOL'] != 'Garnet_standalone':
def create_system(
options, full_system, system, dma_ports, bootmem, ruby_system, cpus
):
if buildEnv["PROTOCOL"] != "Garnet_standalone":
panic("This script requires Garnet_standalone protocol to be built.")
cpu_sequencers = []
@@ -49,7 +53,7 @@ def create_system(options, full_system, system, dma_ports, bootmem,
#
# The Garnet_standalone protocol does not support fs nor dma
#
assert(dma_ports == [])
assert dma_ports == []
#
# The ruby network creation expects the list of nodes in the system to be
@@ -69,19 +73,18 @@ def create_system(options, full_system, system, dma_ports, bootmem,
# Only one cache exists for this protocol, so by default use the L1D
# config parameters.
#
cache = L1Cache(size = options.l1d_size,
assoc = options.l1d_assoc)
cache = L1Cache(size=options.l1d_size, assoc=options.l1d_assoc)
#
# Only one unified L1 cache exists. Can cache instructions and data.
#
l1_cntrl = L1Cache_Controller(version = i,
cacheMemory = cache,
ruby_system = ruby_system)
l1_cntrl = L1Cache_Controller(
version=i, cacheMemory=cache, ruby_system=ruby_system
)
cpu_seq = RubySequencer(dcache = cache,
garnet_standalone = True,
ruby_system = ruby_system)
cpu_seq = RubySequencer(
dcache=cache, garnet_standalone=True, ruby_system=ruby_system
)
l1_cntrl.sequencer = cpu_seq
exec("ruby_system.l1_cntrl%d = l1_cntrl" % i)
@@ -97,7 +100,8 @@ def create_system(options, full_system, system, dma_ports, bootmem,
l1_cntrl.forwardFromCache = MessageBuffer()
mem_dir_cntrl_nodes, rom_dir_cntrl_node = create_directories(
options, bootmem, ruby_system, system)
options, bootmem, ruby_system, system
)
dir_cntrl_nodes = mem_dir_cntrl_nodes[:]
if rom_dir_cntrl_node is not None:
dir_cntrl_nodes.append(rom_dir_cntrl_node)
@@ -107,7 +111,6 @@ def create_system(options, full_system, system, dma_ports, bootmem,
dir_cntrl.forwardToDir = MessageBuffer()
dir_cntrl.responseToDir = MessageBuffer()
all_cntrls = l1_cntrl_nodes + dir_cntrl_nodes
ruby_system.network.number_of_virtual_networks = 3
topology = create_topology(all_cntrls, options)