Esempio n. 1
0
 def parse_oct_pins(cls, e):
     pins = parse_list(e, "oct_pins")
     for p in pins:
         if (not Tinker.is_valid_verilog_name(p)):
             Tinker.value_error_xml("oct_pins", p, "Valid Verilog Names",
                                    ET.tostring(e))
     return pins
Esempio n. 2
0
 def parse_grouping(cls, e):
     ids = parse_list(e, "grouping")
     for i in ids:
         if (not Tinker.is_id(i)):
             Tinker.value_error_xml("grouping", i, "Alphabetic Characters",
                                    ET.tostring(e))
     return ids
Esempio n. 3
0
 def parse_grouping(cls, e):
     ids = parse_list(e, "grouping")
     for i in ids:
         if(not Tinker.is_id(i)):
             Tinker.value_error_xml("grouping", i, "Alphabetic Characters",
                                    ET.tostring(e))
     return ids
Esempio n. 4
0
 def parse_oct_pins(cls, e):
     pins = parse_list(e, "oct_pins")
     for p in pins:
         if(not Tinker.is_valid_verilog_name(p)):
             Tinker.value_error_xml("oct_pins", p, "Valid Verilog Names",
                                    ET.tostring(e))
     return pins
Esempio n. 5
0
 def __parse_ip(self, e):
     d = dict()
     d["types"] = parse_list(e, "types")
     for t in d["types"]:
         se = findsingle(e, t)
         if (t == "memory"):
             d[t] = MemoryType.MemoryType(se)
     return d
Esempio n. 6
0
 def __parse_ip(self, e):
     d = dict()
     d["types"] = parse_list(e, "types")
     for t in d["types"]:
         se = findsingle(e, t)
         if(t == "memory"):
             d[t] = MemoryType.MemoryType(se)
     return d
Esempio n. 7
0
 def __parse_type(self, t, e):
     d = dict()
     d["interfaces"] = parse_list(e, "interfaces")
     d["default"] = parse_string(e, "default")
     for i in d["interfaces"]:
         ie = findsingle(e, "./phy/[@id='%s']" % str(i))
         m = self.__construct(t, ie)
         d[i] = m
     return d
Esempio n. 8
0
 def __parse(self, e):
     d = dict()
     d["type"] = "memory"
     d["types"] = parse_list(e, "types")
     for t in d["types"]:
         te = findsingle(e, "./%s" % t)
         if (t not in self._C_KNOWN_TYPES):
             Tinker.value_error_xml("types", t,
                                    str(list(self._C_KNOWN_TYPES)),
                                    ET.tostring(e))
         d[t] = self.__parse_type(t, te)
     return d
Esempio n. 9
0
 def parse_roles(cls, e):
     roles = parse_list(e, "roles")
     for mr in roles:
         if(mr not in cls._C_ROLES):
             Tinker.value_error_xml("roles", mr, str(roles), ET.tostring(e))
     return roles
Esempio n. 10
0
 def parse_ratios(cls, e):
     mem_ratios = parse_list(e, "ratios")
     for mr in mem_ratios:
         if(mr not in cls._C_RATIOS):
             Tinker.value_error_xml("ratios", mr, str(ratios), ET.tostring(e))
     return mem_ratios
Esempio n. 11
0
 def parse_ports(cls, e):
     mem_ports = parse_list(e,"ports")
     for mp in mem_ports:
         if(mp not in cls._C_PORT_TYPES):
             Tinker.value_error_xml("ports", mp, str(ports), ET.tostring(e))
     return mem_ports