Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow core config without any 'param'

Also added a check if there is atleast 1 macine configuration to build

Signed-off-by: Avadh Patel <avadh4all@gmail.com>
  • Loading branch information...
commit e8c209ac0c6d8b5ce91de57782cabb36f071eb7e 1 parent f18f29e
@avadhpatel authored
View
3  config/l1_cache.conf
@@ -8,7 +8,6 @@ cache:
LINE_SIZE: 64 # bytes
ASSOC: 8
LATENCY: 2
- WRITE_BACK: 1
READ_PORTS: 2
WRITE_PORTS: 1
l1_128K_wt:
@@ -18,7 +17,6 @@ cache:
LINE_SIZE: 64 # bytes
ASSOC: 8
LATENCY: 2
- WRITE_BACK: 1
READ_PORTS: 2
WRITE_PORTS: 1
l1_128K_mesi:
@@ -28,7 +26,6 @@ cache:
LINE_SIZE: 64 # bytes
ASSOC: 8
LATENCY: 2
- WRITE_BACK: 1
READ_PORTS: 2
WRITE_PORTS: 1
# 256K L1 with same params as l1_128K
View
2  config_helper.py
@@ -27,7 +27,7 @@
_required_mem_params = ['LATENCY']
_required_keys = {
'config': ['core', 'cache', 'machine', 'memory'],
- 'core': ['base', 'params'],
+ 'core': ['base'],
'cache': ['base', { 'params' : _required_cache_params } ],
'memory': ['base'],
'machine': ['description', 'min_contexts',
View
9 ptlsim/sim/SConscript
@@ -7,8 +7,11 @@ Import('env')
# Machine Builder function
#########################################
+num_machines_build = 0
+
def machine_builder_func(env, m_name):
'''Build user defined machine configuration'''
+ global num_machines_build
config = env['config']
# First check if min/max number of cpus requirement
@@ -31,6 +34,7 @@ def machine_builder_func(env, m_name):
"machine '%s'." % (m_name, max_c, env['num_cpus'], m_name))
return []
+ num_machines_build += 1
m_objs = []
m_file = "%s_gen.cpp" % m_name
@@ -58,6 +62,11 @@ objs = env.Object(src_files)
for machine in env['config']['machine'].keys():
objs += env.machine_builder(machine)
+if num_machines_build == 0:
+ print("No machine built. Please provide a machine configuartion " \
+ "that matches the number of cores you are compiling.")
+ Exit(1)
+
# dstbuild objects
dst_objs = env.Object(Split("syscalls.cpp config-parser.cpp"))
View
9 ptlsim/tools/config_gen.py
@@ -229,7 +229,11 @@ def get_param_string(key, val):
def write_params_file(config, options):
obj_conf = config[options.type][options.name]
- params = obj_conf["params"]
+ if obj_conf.has_key("params"):
+ params = obj_conf["params"]
+ else:
+ params = {}
+
with open(options.output, 'w') as out_file:
out_file.write(auto_gen_header % obj_conf["_file"])
out_file.write("/* Configuration Name: %s */\n\n" %
@@ -500,10 +504,9 @@ def gen_output_file(config, options):
generate_cache_header(config, options)
elif options.type == "cache" and options.name == "logic":
generate_cache_logic(config, options)
- elif config[options.type][options.name].has_key("params"):
+ elif options.type == "core":
write_params_file(config, options)
-
if __name__ == "__main__":
_debug("Testing")
parser = get_arg_parser()
Please sign in to comment.
Something went wrong with that request. Please try again.