def generate(env): """add the correct xst builder to the environement""" #Everything I need should be within the env #print "In generate function" env["XST_COMMAND"] = _detect(env) #get the configuration file name #fn = env["CONFIG_FILE"] #if os.path.exists(fn): # #if the configuration file name doesn't exists then # #maybe it is at the base directory of the project # fn = os.path.join(utils.get_project_base(), fn) config = utils.read_config(env) xst_utils.create_xst_project_file(config) script_filename = xst_utils.create_xst_script(config) report_filename = xst_utils.get_report_filename(config) ngc_filename = xst_utils.get_ngc_filename(config) env.SetDefault( XST_REPORT_FILE=report_filename, XST_SCRIPT_FILE=script_filename, XST_NGC_FILE=ngc_filename, #XST_COM = '$XST_COMMAND -intstyle ise -ifn "$XST_SCRIPT_FILE" -ofn "$XST_REPORT_FILE"', XST_COM='$XST_COMMAND -ifn "$XST_SCRIPT_FILE" -ofn "$XST_REPORT_FILE"', XST_COMSTR="") #print "Script Filename: %s" % script_filename #print "Report Filename: %s" % report_filename #print "NGC Filename: %s" % ngc_filename env.AddMethod(XST, 'xst') return None
def XST(env, target, source): """ A pseudo-Builder wrapper for the XST synthesizer Reads the config file Creates the XST Project file (containing all the verilog) Creates the XST Script file (containing all of the commands) Executes the build Args: env (SCons Environment) target (list of strings) source (list of strings) Returns: The output file list Raises: XSTBuilderWarning XSTBuilderError """ #OKAY MAYBE I DIDN'T NEED A PSUEDO-BUILDER config = utils.read_config(env) _xst_builder.__call__(env, env["XST_NGC_FILE"], config["verilog"]) return [xst_utils.get_ngc_filename(config)]
def generate(env): """add the correct xst builder to the environement""" #Everything I need should be within the env #print "In generate function" env["XST_COMMAND"] = _detect(env) #get the configuration file name #fn = env["CONFIG_FILE"] #if os.path.exists(fn): # #if the configuration file name doesn't exists then # #maybe it is at the base directory of the project # fn = os.path.join(utils.get_project_base(), fn) config = utils.read_config(env) xst_utils.create_xst_project_file(config) script_filename = xst_utils.create_xst_script(config) report_filename = xst_utils.get_report_filename(config) ngc_filename = xst_utils.get_ngc_filename(config) env.SetDefault( XST_REPORT_FILE = report_filename, XST_SCRIPT_FILE = script_filename, XST_NGC_FILE = ngc_filename, #XST_COM = '$XST_COMMAND -intstyle ise -ifn "$XST_SCRIPT_FILE" -ofn "$XST_REPORT_FILE"', XST_COM = '$XST_COMMAND -ifn "$XST_SCRIPT_FILE" -ofn "$XST_REPORT_FILE"', XST_COMSTR = "" ) #print "Script Filename: %s" % script_filename #print "Report Filename: %s" % report_filename #print "NGC Filename: %s" % ngc_filename env.AddMethod(XST, 'xst') return None
def get_xst_targets(env): """ Returns a list of build target for the XST """ config = utils.read_config(env) return xst_utils.get_ngc_filename(config, absolute=True)