Hello all ,could someone tell me what is the function of the following code
(it is in the Ruby.py file),or where could I find the explanation ?Thank
very much! :

def create_system(options, system, piobus = None, dma_devices = []):

    protocol = buildEnv['PROTOCOL']
    exec "import %s" % protocol
    try:
        (cpu_sequencers, dir_cntrls, all_cntrls) =
eval("%s.create_system(options, system, piobus, dma_devices)" % protocol)
    except:
        print "Error: could not create sytem for ruby protocol %s" %
protocol
        raise

    #
    # Important: the topology must be created before the network and after
the
    # controllers.
    #
    exec "import %s" % options.topology
    try:
        net_topology = eval("%s.makeTopology(all_cntrls, options)"%
options.topology)
    except:
        print "Error: could not create topology %s" % options.topology
        raise

    if options.garnet_network == "fixed":
        network = GarnetNetwork_d(topology = net_topology)
    elif options.garnet_network == "flexible":
        network = GarnetNetwork(topology = net_topology)
    else:
        network = SimpleNetwork(topology = net_topology)


-- 
Xuewen Zhou  Master
Shanghai Jiaotong University
School of Microelectronics
National Engineering Laboratory For Automotive Electronic Control Technology
800 Dongchuan Road, Shanghai 200240, P. R. China
Phone : 13062728106
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Reply via email to