Exemple #1
0
def ref_dcd_obj():
    # Prepare reference DCD object
    obj = SegDCD(enabled=True)
    obj.append(
        CmdWriteData(ops=EnumWriteOps.WRITE_VALUE,
                     data=[(0x400FC010, 0x4F400005), (0x400FC010, 0x4F463645),
                           (0x400FC010, 0xA54EF14A)]))
    obj.append(
        CmdWriteData(ops=EnumWriteOps.WRITE_CLEAR_BITS,
                     data=[(0x402F0008, 0x00000001), (0x402F0008, 0x00000002),
                           (0x402F0008, 0x00000003)]))
    obj.append(
        CmdWriteData(ops=EnumWriteOps.SET_BITMASK,
                     data=[(0x400D8158, 0x00000009), (0x400D8158, 0x0000000A),
                           (0x400D8158, 0x000000B4)]))
    obj.append(
        CmdCheckData(ops=EnumCheckOps.ALL_CLEAR,
                     address=0x401F83F4,
                     mask=0x000000AF,
                     count=5))
    obj.append(
        CmdCheckData(ops=EnumCheckOps.ALL_CLEAR,
                     address=0x401F83F4,
                     mask=0x000000A1))
    obj.append(
        CmdCheckData(ops=EnumCheckOps.ANY_CLEAR,
                     address=0x400D8150,
                     mask=0x000000FF,
                     count=3))
    obj.append(
        CmdCheckData(ops=EnumCheckOps.ANY_CLEAR,
                     address=0x400D8150,
                     mask=0x00000004))
    obj.append(
        CmdCheckData(ops=EnumCheckOps.ALL_SET,
                     address=0x402F0008,
                     mask=0x00000006))
    obj.append(
        CmdCheckData(ops=EnumCheckOps.ALL_SET,
                     address=0x402F0008,
                     mask=0x00000AF3,
                     count=2))
    obj.append(
        CmdCheckData(ops=EnumCheckOps.ANY_SET,
                     address=0x400D8158,
                     mask=0x00000009))
    obj.append(
        CmdCheckData(ops=EnumCheckOps.ANY_SET,
                     address=0x400D8158,
                     mask=0xB00E60E1))
    obj.append(
        CmdCheckData(ops=EnumCheckOps.ANY_CLEAR,
                     address=0x400D8158,
                     mask=0x000F00A2))
    obj.append(
        CmdCheckData(ops=EnumCheckOps.ANY_CLEAR,
                     address=0x400D8158,
                     mask=0xA00F60C1))
    obj.append(
        CmdWriteData(ops=EnumWriteOps.WRITE_CLEAR_BITS,
                     data=[(0x401F8400, 0x00000001)]))
    obj.append(
        CmdWriteData(ops=EnumWriteOps.SET_BITMASK,
                     data=[(0x401F8400, 0x00000000)]))
    obj.append(
        CmdWriteData(ops=EnumWriteOps.WRITE_CLEAR_BITS,
                     data=[(0x401F8400, 0x00000000)]))
    obj.append(
        CmdWriteData(ops=EnumWriteOps.SET_BITMASK,
                     data=[(0x401F8400, 0x00000001)]))
    obj.append(CmdNop())
    return obj
Exemple #2
0
def dcd_in_python() -> SegDCD:
    """Create DCD in python code."""
    dcd = SegDCD(enabled=True)
    dcd.append(
        CmdWriteData(
            ops=EnumWriteOps.WRITE_VALUE,
            data=(
                (0x30340004, 0x4F400005),
                (0x30340004, 0x4F400005),
                (0x30340004, 0x4F400005),
                (0x30340004, 0x4F400005),
            ),
        ))
    dcd.append(
        CmdWriteData(ops=EnumWriteOps.CLEAR_BITMASK,
                     data=((0x307900C4, 0x00000001), )))
    dcd.append(
        CmdWriteData(ops=EnumWriteOps.SET_BITMASK,
                     data=((0x307900C4, 0x00000001), )))
    dcd.append(
        CmdCheckData(ops=EnumCheckOps.ALL_CLEAR,
                     address=0x307900C4,
                     mask=0x00000001))
    dcd.append(
        CmdCheckData(ops=EnumCheckOps.ALL_CLEAR,
                     address=0x307900C4,
                     mask=0x00000001,
                     count=5))
    dcd.append(
        CmdCheckData(ops=EnumCheckOps.ANY_CLEAR,
                     address=0x307900C4,
                     mask=0x00000001))
    dcd.append(
        CmdCheckData(ops=EnumCheckOps.ANY_CLEAR,
                     address=0x307900C4,
                     mask=0x00000001,
                     count=5))
    dcd.append(
        CmdCheckData(ops=EnumCheckOps.ALL_SET,
                     address=0x307900C4,
                     mask=0x00000001))
    dcd.append(
        CmdCheckData(ops=EnumCheckOps.ALL_SET,
                     address=0x307900C4,
                     mask=0x00000001,
                     count=5))
    dcd.append(
        CmdCheckData(ops=EnumCheckOps.ANY_SET,
                     address=0x307900C4,
                     mask=0x00000001))
    dcd.append(
        CmdCheckData(ops=EnumCheckOps.ANY_SET,
                     address=0x307900C4,
                     mask=0x00000001,
                     count=5))
    dcd.append(CmdNop())
    return dcd