Beispiel #1
0
    def __call__(self, input, avoid, pcreg=None):

        icache_flush = 1

        # If randomization is disabled, ensure that the seed
        # is always the same for the builder.
        state = random.getstate()
        if not context.randomize:
            random.seed(1)

        try:
            b = builder.builder()

            enc_data = b.enc_data_builder(input)
            dec_loop = b.DecoderLoopBuilder(icache_flush)
            enc_dec_loop = b.encDecoderLoopBuilder(dec_loop)
            dec = b.DecoderBuilder(dec_loop, icache_flush)

            output,dec = b.buildInit(dec);

            output += dec
            output += enc_dec_loop
            output += enc_data

        finally:
            random.setstate(state)

        return output
Beispiel #2
0
    # source
    for each in makefile.findall( 'source' ):
        sys_bld.source.append( '%s%s' % ( dir, each.text ) )

    # libraries
    for each in makefile.findall( 'library' ):
        sys_bld.source.append( '%s%s' % ( dir, each.text ) )

    # more make files
    for each in makefile.findall( 'include' ):
        parseMakeFile( sys_bld,
                os.path.basename(each.text),
                '%s%s' % ( dir, os.path.dirname(each.text) ) )

if __name__ == '__main__':
    sys_bld = builder()

    # Init system build
    sys_bld.name = 'Farmer'
    sys_bld.conf.env['compiler']    = 'g++'
    sys_bld.conf.env['options']     = ''
    sys_bld.conf.env['out']         = 'out'
    sys_bld.conf.env['outfile']     = sys_bld.name
    sys_bld.conf.env['cflags']      = ''
    sys_bld.conf.env['cxxflags']    = ''
    sys_bld.conf.env['TOP_DIR']     = '.'
    sys_bld.conf.env['PLAN_CACHE']  = '__plancache_'

    parseMakeFile( sys_bld, 'makefile.xml' )

    sys_bld.conf.platform_check()
Beispiel #3
0
 def __init__(self):
     self.builder = builder()
Beispiel #4
0
 def call_builder(parameters):
   builder(parameters)