コード例 #1
0
ファイル: test_txngen.py プロジェクト: allevin/sst-elements
if "dumpConfig" in g_params and int(g_params["dumpConfig"]):
        print "\n###########################\nDumping global config parameters:"
        for key in g_params:
                print key + " " + g_params[key]
        print "###########################\n"

numChannels = int(g_params["numChannels"])
maxOutstandingReqs = numChannels*64
numTxnPerCycle = numChannels
maxTxns = 100000 * numChannels


# Define SST core options
sst.setProgramOption("timebase", g_params["clockCycle"])
sst.setProgramOption("stopAtCycle", g_params["stopAtCycle"])
sst.setStatisticLoadLevel(7)
sst.setStatisticOutput("sst.statOutputConsole")


#########################################################################################################

## Configure transaction generator
comp_txnGen = sst.Component("TxnGen", "CramSim.c_TxnGen")
comp_txnGen.addParams(g_params)
comp_txnGen.addParams({
	"maxTxns" : maxTxns,
	"numTxnPerCycle" : numTxnPerCycle,
	"maxOutstandingReqs" : maxOutstandingReqs,
	"readWriteRatio" : 0.5
	})
comp_txnGen.enableAllStatistics()
コード例 #2
0
mem.addParams({
    "backend": "memHierarchy.simpleMem",
    "backend.access_time": "30ns",
    "backend.mem_size": memory_capacity,
    "clock": memory_clock,
    "do_not_back": 1,
})

cpu_cache_link = sst.Link("cpu_cache_link")
cpu_cache_link.connect((cpu, "cache_link", cache_link_latency),
                       (l1, "high_network_0", cache_link_latency))

l2_cache_link = sst.Link("l2cache_link")
l2_cache_link.connect((l1, "low_network_0", cache_link_latency),
                      (l2, "high_network_0", cache_link_latency))

mem_link = sst.Link("l2cache_mem_link")
mem_link.connect((l2, "low_network_0", cache_link_latency),
                 (mem, "direct_link", cache_link_latency))

# ===============================================================================

# Enable SST Statistics Outputs for this simulation
sst.setStatisticLoadLevel(statLevel)
sst.enableAllStatisticsForAllComponents({"type": "sst.AccumulatorStatistic"})

sst.setStatisticOutput("sst.statOutputCSV")
sst.setStatisticOutputOptions({"filepath": statFile, "separator": ", "})

print "Completed configuring the EX1 model"
コード例 #3
0
ファイル: networkGen.py プロジェクト: h4u5/sst-elements
        sys.exit(1)


    endPoint = endpoints[ep];

    sst.merlin._params["xbar_arb"] = "merlin.xbar_arb_lru"

    
    print "Set statistics load level (0 = off):"
    stats = int(raw_input())
    if ( stats != 0 ):
        print "Statistic dump period (0 = end of sim only):"
        rate = raw_input();
        if ( rate == "" ):
            rate = "0"
        sst.setStatisticLoadLevel(stats)
        
        print "Please select statistics output type:"
        for (x,y) in statoutputs.iteritems():
            print "[ %d ]  %s" % (x, y)
        output = int(raw_input())
        if output not in statoutputs:
            print "Bad answer.  try again."
            sys.exit(1)
        
        sst.setStatisticOutput(statoutputs[output]);
        if (output != 1):
            print "Filename for stats output:"
            filename = raw_input()
            sst.setStatisticOutputOptions({
                    "filepath" : filename,
コード例 #4
0
    "debug_level": 10,
})
memctrl = sst.Component("memory", "memHierarchy.MemController")
memctrl.addParams({
    "clock": "1THz",
    "debug": DEBUG_MEM,
    "debug_level": 10,
})
memory = memctrl.setSubComponent("backend", "memHierarchy.simpleMem")
memory.addParams({
    "mem_size": "512MiB",
    "access_time": "100ns",
})

# Enable statistics
sst.setStatisticLoadLevel(7)
sst.setStatisticOutput("sst.statOutputConsole")
for a in componentlist:
    sst.enableAllStatisticsForComponentType(a)

# Define the simulation links
link_cpu0_l1cache_link = sst.Link("link_cpu0_l1cache_link")
link_cpu0_l1cache_link.connect((iface0, "port", "1000ps"),
                               (comp_c0_l1cache, "high_network_0", "1000ps"))
link_c0_l1_l2_link = sst.Link("link_c0_l1_l2_link")
link_c0_l1_l2_link.connect((comp_c0_l1cache, "low_network_0", "1000ps"),
                           (comp_bus, "high_network_0", "10000ps"))
link_cpu1_l1cache_link = sst.Link("link_cpu1_l1cache_link")
link_cpu1_l1cache_link.connect((iface1, "port", "1000ps"),
                               (comp_c1_l1cache, "high_network_0", "1000ps"))
link_c1_l1_l2_link = sst.Link("link_c1_l1_l2_link")
コード例 #5
0
import sst
import sys
import ConfigParser, argparse

# Define SST core options
sst.setProgramOption("timebase", "1ps")
sst.setProgramOption("stopAtCycle", "0 ns")

# Tell SST what statistics handling we want
sst.setStatisticLoadLevel(4)

globalDebug = 0
globalVerbose = 10
globalLevel = 10

memDebug = 0
memVerbose = 0
memLevel = 10

core_clock = "2100MHz"

mirandaVerbose = 0
miranda_stride = 64
miranda_req_per_cycle = 4
miranda_oustanding_reqs = 64

#backend = "hbm"  ## hbm or simple
backend = "simple"
memory_mb = 16384
memory_capacity_inB = memory_mb * 1024 * 1024
memory_clock = "877MHz"
コード例 #6
0
ファイル: emberLoad.py プロジェクト: vjleung/sst-elements
epParams.update(emberParams)
epParams.update(hermesParams)

loadInfo = LoadInfo(nicParams, epParams, numNodes, numCores,
                    topoInfo.getNumNodes())

if len(loadFile) > 0:
    if len(workList) > 0:
        sys.exit("Error: can't specify both loadFile and cmdLine")

    loadInfo.initFile(motifDefaults, loadFile, statNodeList)
else:
    if len(workList) > 0:
        if len(loadFile) > 0:
            sys.exit("Error: can't specify both loadFile and cmdLine")

        loadInfo.initWork(workList, statNodeList)
    else:
        sys.exit("Error: need a loadFile or cmdLine")

topo.prepParams()

topo.setEndPointFunc(loadInfo.setNode)
topo.build()
'''
sst.setStatisticLoadLevel(8) 
sst.setStatisticOutput("sst.statOutputCSV")
sst.setStatisticOutputOptions( {"filepath" : "%s" %(networkStatOut), "separator" : ", " } )
sst.enableAllStatisticsForComponentType("merlin.hr_router")
'''
コード例 #7
0
ファイル: emberLoad.py プロジェクト: allevin/sst-elements
loadInfo = LoadInfo( nicParams, epParams, numNodes, numCores, topoInfo.getNumNodes()  )

if len(loadFile) > 0:
	if len(workList) > 0:
		sys.exit("Error: can't specify both loadFile and cmdLine");

	loadInfo.initFile( motifDefaults, loadFile, statNodeList )
else:
	if len(workList) > 0:
		if len(loadFile) > 0:
			sys.exit("Error: can't specify both loadFile and cmdLine");

		loadInfo.initWork( workList, statNodeList )
	else:
		sys.exit("Error: need a loadFile or cmdLine")


topo.prepParams()

topo.setEndPointFunc( loadInfo.setNode )
topo.build()

'''
sst.setStatisticLoadLevel(8) 
sst.setStatisticOutput("sst.statOutputCSV")
sst.setStatisticOutputOptions( {"filepath" : "%s" %(networkStatOut), "separator" : ", " } )
sst.enableAllStatisticsForComponentType("merlin.hr_router")
'''

コード例 #8
0
ファイル: testKingsley.py プロジェクト: h4u5/sst-elements
    for x in range (0, mesh_stops_x):

        # North-south connections
        if y != (mesh_stops_y -1):
            kRtrReqNS = sst.Link("krtr_req_ns_" + str(i))
            kRtrReqNS.connect( (kRtrReq[i], "south", mesh_link_latency), (kRtrReq[i + mesh_stops_x], "north", mesh_link_latency) )
            kRtrAckNS = sst.Link("krtr_ack_ns_" + str(i))
            kRtrAckNS.connect( (kRtrAck[i], "south", mesh_link_latency), (kRtrAck[i + mesh_stops_x], "north", mesh_link_latency) )
            kRtrFwdNS = sst.Link("krtr_fwd_ns_" + str(i))
            kRtrFwdNS.connect( (kRtrFwd[i], "south", mesh_link_latency), (kRtrFwd[i + mesh_stops_x], "north", mesh_link_latency) )
            kRtrDataNS = sst.Link("krtr_data_ns_" + str(i))
            kRtrDataNS.connect( (kRtrData[i], "south", mesh_link_latency), (kRtrData[i + mesh_stops_x], "north", mesh_link_latency) )

        if x != (mesh_stops_x - 1):
            kRtrReqEW = sst.Link("krtr_req_ew_" + str(i))
            kRtrReqEW.connect( (kRtrReq[i], "east", mesh_link_latency), (kRtrReq[i+1], "west", mesh_link_latency) )
            kRtrAckEW = sst.Link("krtr_ack_ew_" + str(i))
            kRtrAckEW.connect( (kRtrAck[i], "east", mesh_link_latency), (kRtrAck[i+1], "west", mesh_link_latency) )
            kRtrFwdEW = sst.Link("krtr_fwd_ew_" + str(i))
            kRtrFwdEW.connect( (kRtrFwd[i], "east", mesh_link_latency), (kRtrFwd[i+1], "west", mesh_link_latency) )
            kRtrDataEW = sst.Link("krtr_data_ew_" + str(i))
            kRtrDataEW.connect( (kRtrData[i], "east", mesh_link_latency), (kRtrData[i+1], "west", mesh_link_latency) )

        setNodeDist(i, kRtrReq[i], kRtrAck[i], kRtrFwd[i], kRtrData[i])
        i = i + 1

# Enable SST Statistics Outputs for this simulation
sst.setStatisticLoadLevel(16)
sst.enableAllStatisticsForAllComponents({"type":"sst.AccumulatorStatistic"})
sst.setStatisticOutput("sst.statOutputConsole")