def __init__(self):
		apps = App.defaultApps() 
		self.make_rules = []
		self.precious_targets = []
		self.random_headers_created = set()

		self.make_random_header = BUILD+"make-random-header"
# obsoleted by include
#		output = self.make_random_header
#		inputs = [ "make-random-header.c" ]
#		self.make(output, inputs,
#			[ "gcc", "-o", output ] + inputs)

		#self.system(["make"])	# be sure common .os are built
		for app in apps:
			self.make_rules.append(Comment("# App %s\n" % app.name))
			for param in app.params:
				self.make_rules.append(Comment("#   Param %s\n" % param))
				for bitwidth in app.bitwidths:
					self.make_rules.append(Comment("#     Bitwidth %s\n" % bitwidth))
					self.build(app, param, bitwidth)

		all_rule = Make("matrix-all", ["build"]+self.precious_targets, [])
		self.make_rules = [all_rule] + self.make_rules
		self.make_rules.append(Directive("include make.in\n"))

		makefp = open("make.matrix", "w")
 		makefp.write("PYTHON=python\n\n")
		for makerule in self.make_rules:
			makefp.write(makerule.emit())
		makefp.close()
Example #2
0
    def __init__(self, dir):
        apps = App.defaultApps()
        appData = {}

        print '{:<30}{:^10}{:^10}'.format("Name", "Degree", "Size")
        #print "Name" + " "*26 + "Degree\tSize"
        for app in apps:
            for param in app.params:
                for bitwidth in app.bitwidths:
                    app_base = "%s-p%s-b%s" % (app.name, param, bitwidth)
                    filename = dir + "/" + app_base + ".arith"
                    if (os.path.isfile(filename)):
                        appData[app_base] = AppData(app.name, param, bitwidth,
                                                    filename)
                        print appData[app_base]
                    else:
                        print "%s:\t Missing" % (app_base)