def _decode_ddr3(self):
        spd = self.rawdata
        finetime = (spd[9] >> 4) / (spd[9] & 0xf)
        fineoffset = spd[34]
        if fineoffset & 0b10000000:
            # Take two's complement for negative offset
            fineoffset = 0 - ((fineoffset ^ 0xff) + 1)
        fineoffset = (finetime * fineoffset) * 10**-3
        mtb = spd[10] / float(spd[11])
        clock = 2 // ((mtb * spd[12] + fineoffset)*10**-3)
        self.info['speed'] = speed_from_clock(clock)
        self.info['ecc'] = (spd[8] & 0b11000) != 0
        self.info['module_type'] = module_types.get(spd[3] & 0xf, 'Unknown')
        sdramcap = ddr3_module_capacity[spd[4] & 0xf]
        buswidth = ddr3_bus_width[spd[8] & 0b111]
        sdramwidth = ddr3_dev_width[spd[7] & 0b111]
        ranks = ddr3_ranks[(spd[7] & 0b111000) >> 3]
        self.info['capacity_mb'] = sdramcap / 8 * buswidth / sdramwidth * ranks
        self.info['manufacturer'] = decode_manufacturer(spd[117], spd[118])
        self.info['manufacture_location'] = spd[119]
        self.info['manufacture_date'] = decode_spd_date(spd[120], spd[121])
        self.info['serial'] = hex(struct.unpack(
            '>I', struct.pack('4B', *spd[122:126]))[0])[2:].rjust(8, '0')
        self.info['model'] = struct.pack('18B', *spd[128:146])
dataset/ETHPy150Open openstack/pyghmi/pyghmi/ipmi/private/spd.py/SPD._decode_ddr3/original