Beispiel #1
0
    def parse(cls, e):
        """
        Parse the description of this IP object from an element tree
        element and return a dictionary with the parameters
        found.

        Arguments:

        e -- An element tree element containing the description of this
        object
        
        """
        d = super(DDR, cls).parse(e)
        d["type"] = "DDR3"
        pow2_dq_pins = d["pow2_dq_pins"]

        bank_pins = parse_int(e, "bank_pins")
        column_pins = parse_int(e, "column_pins")
        row_pins = parse_int(e, "row_pins")

        size = pow2_dq_pins / 8 * (2**bank_pins) * (2**column_pins) * (
            2**row_pins)
        d["size"] = int(size)

        return d
Beispiel #2
0
    def parse(cls, e):
        d = super(Phy, cls).parse(e)

        i = parse_id(e)
        fref_mhz = parse_float(e, "fref_mhz")
        fphy_mhz = parse_float(e, "fphy_mhz")
        dq_pins = parse_int(e, "dq_pins")
        macros = parse_macros(e)

        d["id"] = i
        d["fphy_mhz"] = fphy_mhz
        d["fref_mhz"] = fref_mhz
        d["dq_pins"] = dq_pins
        d["macros"] = macros

        group = cls.parse_grouping(e)
        group.remove(i)
        octs = cls.parse_oct_pins(e)

        d["group"] = group
        d["oct_pins"] = octs

        pow2_dq_pins = int(2**Tinker.clog2(dq_pins))
        d["pow2_dq_pins"] = pow2_dq_pins
        d["bandwidth_bs"] = int(
            (d["fphy_mhz"] * 10**6 * cls._C_RATE * pow2_dq_pins) / 8)

        return d
Beispiel #3
0
    def parse(cls,e):
        d = super(Phy, cls).parse(e)

        i = parse_id(e)
        fref_mhz = parse_float(e, "fref_mhz")
        fphy_mhz = parse_float(e, "fphy_mhz")
        dq_pins = parse_int(e, "dq_pins")
        macros = parse_macros(e)

        d["id"] = i
        d["fphy_mhz"] = fphy_mhz
        d["fref_mhz"] = fref_mhz
        d["dq_pins"] = dq_pins
        d["macros"] = macros
        
        group = cls.parse_grouping(e)
        group.remove(i)
        octs = cls.parse_oct_pins(e)

        d["group"] = group
        d["oct_pins"] = octs

        pow2_dq_pins = int(2 ** Tinker.clog2(dq_pins))
        d["pow2_dq_pins"] = pow2_dq_pins
        d["bandwidth_bs"] = int((d["fphy_mhz"] * 10**6 * cls._C_RATE * pow2_dq_pins) / 8)

        return d
Beispiel #4
0
    def parse(self, e):
        """
        Parse the description of this IP object from an element tree
        element and return a dictionary with the parameters
        found.

        Arguments:

        e -- An element tree element containing the description of this
        object
        
        """
        d = super(QDR, self).parse(e)
        d["type"] = "QDRII"
        pow2_dq_pins = d["pow2_dq_pins"]

        address_pins = parse_int(e, "address_pins")
        phyburst = parse_int(e, "phyburst")

        size = pow2_dq_pins / 8 * (2**address_pins) * phyburst
        d["size"] = int(size)

        return d
Beispiel #5
0
    def parse(self,e):
        """
        Parse the description of this IP object from an element tree
        element and return a dictionary with the parameters
        found.

        Arguments:

        e -- An element tree element containing the description of this
        object
        
        """
        d = super(QDR,self).parse(e)
        d["type"] = "QDRII"
        pow2_dq_pins = d["pow2_dq_pins"]

        address_pins = parse_int(e, "address_pins")
        phyburst = parse_int(e, "phyburst")

        size = pow2_dq_pins/8 * (2**address_pins) * phyburst
        d["size"] = int(size)

        return d
Beispiel #6
0
    def parse(cls,e):
        """
        Parse the description of this IP object from an element tree
        element and return a dictionary with the parameters
        found.

        Arguments:

        e -- An element tree element containing the description of this
        object
        
        """
        d = super(DDR,cls).parse(e)
        d["type"] = "DDR3"
        pow2_dq_pins = d["pow2_dq_pins"]

        bank_pins = parse_int(e, "bank_pins")
        column_pins = parse_int(e, "column_pins")
        row_pins = parse_int(e, "row_pins")

        size = pow2_dq_pins/8 * (2**bank_pins) * (2 ** column_pins) * (2 ** row_pins)
        d["size"] = int(size)

        return d
Beispiel #7
0
    def parse(cls, e):
        """
        Parse the description of this Memory object from an element tree
        element and return a dictionary with the parameters
        found.

        Arguments:

        e -- An element tree element containing the description of this
        object
        
        """
        d = dict()
        d["resources"] = cls._parse_resources(e)
        d["latency"] = parse_int(e, "latency")
        d["ports"] = cls.parse_ports(e)
        d["ratios"] = cls.parse_ratios(e)
        d["roles"] = cls.parse_roles(e)
        return d
Beispiel #8
0
 def _parse_resources(cls, e):
     d = Counter()
     for rt in cls._C_RESOURCE_TYPES:
         d[rt] = parse_int(e, rt)
     return d