亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? config.py

?? linux下基于c++的處理器仿真平臺(tái)。具有處理器流水線(xiàn)
?? PY
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
def isSimObjSequence(value):    if not isinstance(value, (list, tuple)):        return False    for val in value:        if not isNullPointer(val) and not isSimObject(val):            return False    return Truedef isNullPointer(value):    return isinstance(value, NullSimObject)# The metaclass for ConfigNode (and thus for everything that derives# from ConfigNode, including SimObject).  This class controls how new# classes that derive from ConfigNode are instantiated, and provides# inherited class behavior (just like a class controls how instances# of that class are instantiated, and provides inherited instance# behavior).class MetaSimObject(type):    # Attributes that can be set only at initialization time    init_keywords = { 'abstract' : types.BooleanType,                      'type' : types.StringType }    # Attributes that can be set any time    keywords = { 'check' : types.FunctionType,                 'children' : types.ListType }        # __new__ is called before __init__, and is where the statements    # in the body of the class definition get loaded into the class's    # __dict__.  We intercept this to filter out parameter assignments    # and only allow "private" attributes to be passed to the base    # __new__ (starting with underscore).    def __new__(mcls, name, bases, dict):        # Copy "private" attributes (including special methods such as __new__)        # to the official dict.  Everything else goes in _init_dict to be        # filtered in __init__.        cls_dict = {}        for key,val in dict.items():            if key.startswith('_'):                cls_dict[key] = val                del dict[key]        cls_dict['_init_dict'] = dict        return super(MetaSimObject, mcls).__new__(mcls, name, bases, cls_dict)            # initialization    def __init__(cls, name, bases, dict):        super(MetaSimObject, cls).__init__(name, bases, dict)        # initialize required attributes        cls._params = multidict()        cls._values = multidict()        cls._anon_subclass_counter = 0        # We don't support multiple inheritance.  If you want to, you        # must fix multidict to deal with it properly.        if len(bases) > 1:            raise TypeError, "SimObjects do not support multiple inheritance"        base = bases[0]        if isinstance(base, MetaSimObject):            cls._params.parent = base._params            cls._values.parent = base._values            # If your parent has a value in it that's a config node, clone            # it.  Do this now so if we update any of the values'            # attributes we are updating the clone and not the original.            for key,val in base._values.iteritems():                # don't clone if (1) we're about to overwrite it with                # a local setting or (2) we've already cloned a copy                # from an earlier (more derived) base                if cls._init_dict.has_key(key) or cls._values.has_key(key):                    continue                if isSimObject(val):                    cls._values[key] = val()                elif isSimObjSequence(val) and len(val):                    cls._values[key] = [ v() for v in val ]        # now process remaining _init_dict items        for key,val in cls._init_dict.items():            if isinstance(val, (types.FunctionType, types.TypeType)):                type.__setattr__(cls, key, val)            # param descriptions            elif isinstance(val, ParamDesc):                cls._new_param(key, val)            # init-time-only keywords            elif cls.init_keywords.has_key(key):                cls._set_keyword(key, val, cls.init_keywords[key])            # default: use normal path (ends up in __setattr__)            else:                setattr(cls, key, val)    def _set_keyword(cls, keyword, val, kwtype):        if not isinstance(val, kwtype):            raise TypeError, 'keyword %s has bad type %s (expecting %s)' % \\                  (keyword, type(val), kwtype)        if isinstance(val, types.FunctionType):            val = classmethod(val)        type.__setattr__(cls, keyword, val)    def _new_param(cls, name, value):        cls._params[name] = value        if hasattr(value, 'default'):            setattr(cls, name, value.default)    # Set attribute (called on foo.attr = value when foo is an    # instance of class cls).    def __setattr__(cls, attr, value):        # normal processing for private attributes        if attr.startswith('_'):            type.__setattr__(cls, attr, value)            return        if cls.keywords.has_key(attr):            cls._set_keyword(attr, value, cls.keywords[attr])            return        # must be SimObject param        param = cls._params.get(attr, None)        if param:            # It's ok: set attribute by delegating to 'object' class.            try:                cls._values[attr] = param.convert(value)            except Exception, e:                msg = "%s\\nError setting param %s.%s to %s\\n" % \\                      (e, cls.__name__, attr, value)                e.args = (msg, )                raise        # I would love to get rid of this        elif isSimObject(value) or isSimObjSequence(value):           cls._values[attr] = value        else:            raise AttributeError, \\                  "Class %s has no parameter %s" % (cls.__name__, attr)    def __getattr__(cls, attr):        if cls._values.has_key(attr):            return cls._values[attr]        raise AttributeError, \\              "object '%s' has no attribute '%s'" % (cls.__name__, attr)# The ConfigNode class is the root of the special hierarchy.  Most of# the code in this class deals with the configuration hierarchy itself# (parent/child node relationships).class SimObject(object):    # Specify metaclass.  Any class inheriting from SimObject will    # get this metaclass.    __metaclass__ = MetaSimObject    def __init__(self, _value_parent = None, **kwargs):        self._children = {}        if _value_parent and type(_value_parent) != type(self):            # this was called as a type conversion rather than a clone            raise TypeError, "Cannot convert %s to %s" % \\                  (_value_parent.__class__.__name__, self.__class__.__name__)        if not _value_parent:            _value_parent = self.__class__        # clone values        self._values = multidict(_value_parent._values)        for key,val in _value_parent._values.iteritems():            if isSimObject(val):                setattr(self, key, val())            elif isSimObjSequence(val) and len(val):                setattr(self, key, [ v() for v in val ])        # apply attribute assignments from keyword args, if any        for key,val in kwargs.iteritems():            setattr(self, key, val)    def __call__(self, **kwargs):        return self.__class__(_value_parent = self, **kwargs)    def __getattr__(self, attr):        if self._values.has_key(attr):            return self._values[attr]        raise AttributeError, "object '%s' has no attribute '%s'" \\              % (self.__class__.__name__, attr)    # Set attribute (called on foo.attr = value when foo is an    # instance of class cls).    def __setattr__(self, attr, value):        # normal processing for private attributes        if attr.startswith('_'):            object.__setattr__(self, attr, value)            return        # must be SimObject param        param = self._params.get(attr, None)        if param:            # It's ok: set attribute by delegating to 'object' class.            try:                value = param.convert(value)            except Exception, e:                msg = "%s\\nError setting param %s.%s to %s\\n" % \\                      (e, self.__class__.__name__, attr, value)                e.args = (msg, )                raise        # I would love to get rid of this        elif isSimObject(value) or isSimObjSequence(value):            pass        else:            raise AttributeError, "Class %s has no parameter %s" \\                  % (self.__class__.__name__, attr)        # clear out old child with this name, if any        self.clear_child(attr)        if isSimObject(value):            value.set_path(self, attr)        elif isSimObjSequence(value):            value = SimObjVector(value)            [v.set_path(self, "%s%d" % (attr, i)) for i,v in enumerate(value)]        self._values[attr] = value    # this hack allows tacking a '[0]' onto parameters that may or may    # not be vectors, and always getting the first element (e.g. cpus)    def __getitem__(self, key):        if key == 0:            return self        raise TypeError, "Non-zero index '%s' to SimObject" % key    # clear out children with given name, even if it's a vector    def clear_child(self, name):        if not self._children.has_key(name):            return        child = self._children[name]        if isinstance(child, SimObjVector):            for i in xrange(len(child)):                del self._children["s%d" % (name, i)]        del self._children[name]    def add_child(self, name, value):        self._children[name] = value    def set_path(self, parent, name):        if not hasattr(self, '_parent'):            self._parent = parent            self._name = name            parent.add_child(name, self)    def path(self):        if not hasattr(self, '_parent'):            return 'root'        ppath = self._parent.path()        if ppath == 'root':            return self._name        return ppath + "." + self._name    def __str__(self):        return self.path()    def ini_str(self):        return self.path()    def find_any(self, ptype):        if isinstance(self, ptype):            return self, True        found_obj = None        for child in self._children.itervalues():            if isinstance(child, ptype):                if found_obj != None and child != found_obj:                    raise AttributeError, \\                          'parent.any matched more than one: %s %s' % \\                          (found_obj.path, child.path)                found_obj = child        # search param space        for pname,pdesc in self._params.iteritems():            if issubclass(pdesc.ptype, ptype):                match_obj = self._values[pname]                if found_obj != None and found_obj != match_obj:                    raise AttributeError, \\                          'parent.any matched more than one: %s' % obj.path                found_obj = match_obj        return found_obj, found_obj != None    def unproxy(self, base):        return self    def print_ini(self):        print '[' + self.path() + ']'	# .ini section header        if hasattr(self, 'type') and not isinstance(self, ParamContext):            print 'type=%s' % self.type        child_names = self._children.keys()        child_names.sort()        np_child_names = [c for c in child_names \\                          if not isinstance(self._children[c], ParamContext)]        if len(np_child_names):            print 'children=%s' % ' '.join(np_child_names)        param_names = self._params.keys()        param_names.sort()        for param in param_names:            value = self._values.get(param, None)            if value != None:                if isproxy(value):                    try:                        value = value.unproxy(self)                    except:                        print >> sys.stderr, \\                              "Error in unproxying param '%s' of %s" % \\                              (param, self.path())                        raise                    setattr(self, param, value)                print '%s=%s' % (param, self._values[param].ini_str())        print	# blank line between objects        for child in child_names:            self._children[child].print_ini()    # generate output file for 'dot' to display as a pretty graph.    # this code is currently broken.    def outputDot(self, dot):        label = "{%s|" % self.path        if isSimObject(self.realtype):            label +=  '%s|' % self.type        if self.children:            # instantiate children in same order they were added for            # backward compatibility (else we can end up with cpu1            # before cpu0).            for c in self.children:                dot.add_edge(pydot.Edge(self.path,c.path, style="bold"))                  simobjs = []         for param in self.params:            try:                if param.value is None:                    raise AttributeError, 'Parameter with no value'                value = param.value                string = param.string(value)            except Exception, e:                msg = 'exception in %s:%s\\n%s' % (self.name, param.name, e)                e.args = (msg, )                raise            if isSimObject(param.ptype) and string != "Null":                simobjs.append(string)            else:                label += '%s = %s\\\\n' % (param.name, string)                        for so in simobjs:            label += "|<%s> %s" % (so, so)            dot.add_edge(pydot.Edge("%s:%s" % (self.path, so), so,                                    tailport="w"))        label += '}'        dot.add_node(pydot.Node(self.path,shape="Mrecord",label=label))                # recursively dump out children        for c in self.children:            c.outputDot(dot)class ParamContext(SimObject):    pass####################################################################### Proxy object support.######################################################################class BaseProxy(object):    def __init__(self, search_self, search_up):        self._search_self = search_self        self._search_up = search_up        self._multiplier = None    def __setattr__(self, attr, value):        if not attr.startswith('_'):            raise AttributeError, 'cannot set attribute on proxy object'        super(BaseProxy, self).__setattr__(attr, value)    # support multiplying proxies by constants    def __mul__(self, other):

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一级做a爱片久久| 免费av网站大全久久| 欧美日韩成人一区二区| 国产乱人伦偷精品视频不卡| 夜夜亚洲天天久久| 日韩av一区二区在线影视| 久久久久国产一区二区三区四区| 欧美在线|欧美| 成人91在线观看| 激情另类小说区图片区视频区| 亚洲色图视频网站| 精品久久久久香蕉网| 91国产免费观看| 国产xxx精品视频大全| 日本不卡一区二区三区高清视频| 国产精品免费视频一区| www国产成人| 91麻豆精品国产无毒不卡在线观看| 成人午夜激情视频| 国产在线精品一区二区夜色| 日韩国产高清影视| 午夜精品久久久久久久久久久| 国产精品久久久久久福利一牛影视 | 在线观看不卡视频| 成人激情小说网站| 国产成人精品亚洲日本在线桃色| 老鸭窝一区二区久久精品| 亚洲成av人影院| 亚洲一卡二卡三卡四卡| 亚洲日本va午夜在线电影| 中文字幕免费不卡在线| 久久精品视频一区二区| 久久蜜桃av一区二区天堂| 亚洲精品一区在线观看| 日韩免费成人网| 日韩午夜电影在线观看| 欧美一区中文字幕| 91精品免费在线| 欧美一级二级三级乱码| 欧美一级免费观看| 欧美一区二区三区白人| 3d成人动漫网站| 欧美二区在线观看| 欧美一二三区精品| 精品国精品自拍自在线| 久久久久久久久久看片| 久久精品一区二区三区四区 | 成人免费小视频| 亚洲日本乱码在线观看| 亚洲精品免费在线观看| 亚洲色图另类专区| 一区二区三区精品| 丝袜诱惑制服诱惑色一区在线观看 | 欧美亚洲综合久久| 在线观看亚洲精品视频| 欧美日韩在线三区| 亚洲黄网站在线观看| 亚洲美女免费在线| 午夜国产不卡在线观看视频| 日韩和欧美一区二区| 麻豆精品久久精品色综合| 久久国产精品无码网站| 高清不卡一区二区| 日本大香伊一区二区三区| 欧美性视频一区二区三区| 51精品国自产在线| 国产网站一区二区三区| 亚洲天堂2014| 日韩av电影免费观看高清完整版 | 国内精品久久久久影院一蜜桃| 国产成人欧美日韩在线电影| 91女人视频在线观看| 欧美日韩高清不卡| 久久久不卡影院| 一区二区三区免费在线观看| 免费精品视频在线| av亚洲精华国产精华精华 | 国产欧美一区二区精品性色| 亚洲裸体在线观看| 毛片一区二区三区| 懂色一区二区三区免费观看| 欧美日韩综合一区| 久久亚洲捆绑美女| 亚洲夂夂婷婷色拍ww47| 精品一区二区精品| 91小视频免费观看| 精品久久久久香蕉网| 亚洲欧美日韩久久| 激情综合网av| 欧美中文字幕一区二区三区亚洲| 久久综合九色综合欧美亚洲| 亚洲国产美女搞黄色| 国产精品一区专区| 国产精品久久毛片av大全日韩| 亚洲成人av福利| 成人app网站| 精品国产免费一区二区三区四区 | 国产精品二区一区二区aⅴ污介绍| 亚洲图片欧美色图| 成人国产精品视频| 精品久久一区二区| 亚洲va中文字幕| 99精品视频一区| 国产亚洲精品bt天堂精选| 日韩精品福利网| 在线精品观看国产| 国产精品高潮久久久久无| 极品少妇xxxx精品少妇| 欧美日韩国产片| 亚洲综合成人在线视频| www.欧美日韩| 久久精品欧美日韩| 韩国三级电影一区二区| 欧美电影影音先锋| 亚洲成人自拍一区| 色94色欧美sute亚洲线路一久| 中文字幕精品一区| 国产高清无密码一区二区三区| 日韩欧美国产不卡| 热久久国产精品| 6080亚洲精品一区二区| 亚洲中国最大av网站| 色综合天天视频在线观看| 国产日产精品1区| 国产精品18久久久久久久网站| 日韩欧美国产一二三区| 日韩成人免费电影| 欧美放荡的少妇| 日韩精品一卡二卡三卡四卡无卡| 欧美三级日韩三级| 亚洲chinese男男1069| 欧美人成免费网站| 日韩主播视频在线| 91精品国产综合久久蜜臀| 亚洲国产一区视频| 欧美视频一二三区| 亚洲超碰精品一区二区| 欧美日韩久久久| 三级亚洲高清视频| 日韩欧美一级片| 国产综合成人久久大片91| 精品999在线播放| 国产精品一级片| 中文字幕的久久| 97精品超碰一区二区三区| 日韩伦理电影网| 在线日韩av片| 秋霞av亚洲一区二区三| 久久综合九色综合97婷婷| 国产成人免费视频网站| 国产精品久久三区| 在线精品视频一区二区三四 | 一区二区三区四区高清精品免费观看 | 精品国产一区二区三区av性色| 韩国成人精品a∨在线观看| 国产色91在线| 91玉足脚交白嫩脚丫在线播放| 伊人色综合久久天天| 91精品国产综合久久久久久| 老司机免费视频一区二区| 国产女主播一区| 91国偷自产一区二区开放时间| 亚洲电影一级片| 欧美精品一区二区三区蜜臀| 福利电影一区二区| 亚洲国产wwwccc36天堂| 日韩视频免费观看高清完整版| 国产黄色成人av| 亚洲一卡二卡三卡四卡| 精品剧情v国产在线观看在线| eeuss影院一区二区三区| 丝袜亚洲另类丝袜在线| 久久精品视频一区二区| 欧美影视一区在线| 精品一区二区三区久久| 亚洲视频在线一区观看| 欧美一级日韩免费不卡| 成人av午夜电影| 日精品一区二区三区| 国产日韩欧美制服另类| 欧美三片在线视频观看| 国产一区久久久| 亚洲v精品v日韩v欧美v专区| 国产亚洲精久久久久久| 欧美另类高清zo欧美| 国产不卡高清在线观看视频| 婷婷综合在线观看| 国产精品久久夜| 精品国产一区二区三区忘忧草| 色综合久久久久综合99| 国产精品一区二区无线| 午夜久久久久久| 综合久久一区二区三区| 久久无码av三级| 欧美日韩在线直播| 99re在线精品| 国产剧情一区二区| 天天亚洲美女在线视频| 亚洲视频1区2区| 国产午夜精品一区二区|