Ejemplo n.º 1
0
def loadCfgFile(filename):
    config = ps.parse(filename)
    # pprint.pprint(config, depth=2)
    if(config.has_key('process0')):
        print "Error: Input .cfg file already have a process!"
    else:
        procs = []
        addProcess(procs)
        # print procs
        outputToFile(procs, filename)
Ejemplo n.º 2
0
			my_list.append(i)
	my_list.pop()	
	if my_list:
		if len(my_list) == 3:
			pid = str(my_list[0]) + str(my_list[1])
			PID = int(pid)
			COREID = my_list[2]
		else:
			PID = my_list[0]
			COREID = my_list[1]
		flag = 1
	else:
		flag = 0
		PID = "default"
		COREID = "default"
	cfg = ps.parse(CFG_PATH)

	#pprint.pprint(cfg)

	frequency = float(cfg['sys']['frequency'])
	phaseLength = int(cfg['sim']['phaseLength'])
	# core numbers
	cores_big = int(cfg['sys']['cores']['big']['cores'])
	cores_little = int(cfg['sys']['cores']['little']['cores'])
	cores_mid1 = int(cfg['sys']['cores']['mid1']['cores'])
	cores_mid2 = int(cfg['sys']['cores']['mid2']['cores'])

	# L1 
	L1SIZE_big = int(cfg['sys']['caches']['l1d_big']['size'])/1024
	L1WAYS_big = int(cfg['sys']['caches']['l1d_big']['array']['ways'])
	L1SIZE_mid1 = int(cfg['sys']['caches']['l1d_mid1']['size'])/1024