This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

有关STK_C6657工程包中的问题

你好!

请问以下几个函数有什么作用

.global Asm_LDDW_Test
.global Asm_STDW_Test
.global Asm_LDW_Test
.global Asm_STW_Test

  • 测试相关汇编指令功能的函数。你这是在例程中具体哪个文件看到的,我没印象STK中有这些函数。

  • 我知道是汇编测试代码,想知道这个函数的功能。

    附代码DSP_core_access_Test.asm:

     .global Asm_LDDW_Test

    .global Asm_STDW_Test
    .global Asm_LDW_Test
    .global Asm_STW_Test

    .asg A16, A16_Index
    .asg B0, B0_Cnt
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;Asm_LDDW_Test(srcBuff, uiIndex, uiCount);
    Asm_LDDW_Test:

    SUB A6, 5, B0_Cnt
    MV B4, A16_Index

    [B0_Cnt] B LoadTestLoop
    || LDDW *A4++[A16_Index], A31:A30

    [B0_Cnt] B LoadTestLoop
    || LDDW *A4++[A16_Index], A31:A30

    [B0_Cnt] B LoadTestLoop
    || LDDW *A4++[A16_Index], A31:A30

    [B0_Cnt] B LoadTestLoop
    || LDDW *A4++[A16_Index], A31:A30

    [B0_Cnt] B LoadTestLoop
    || LDDW *A4++[A16_Index], A31:A30

    LoadTestLoop:

    [B0_Cnt] B LoadTestLoop
    || LDDW *A4++[A16_Index], A31:A30
    ||[B0_Cnt] SUB B0_Cnt, 1, B0_Cnt

    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    BNOP B3, 5
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;Asm_STDW_Test(srcBuff, uiIndex, uiCount);
    Asm_STDW_Test:

    SUB A6, 5, B0_Cnt
    MV B4, A16_Index

    [B0_Cnt] B StoreTestLoop
    || STDW A31:A30, *A4++[A16_Index]

    [B0_Cnt] B StoreTestLoop
    || STDW A31:A30, *A4++[A16_Index]

    [B0_Cnt] B StoreTestLoop
    || STDW A31:A30, *A4++[A16_Index]

    [B0_Cnt] B StoreTestLoop
    || STDW A31:A30, *A4++[A16_Index]

    [B0_Cnt] B StoreTestLoop
    || STDW A31:A30, *A4++[A16_Index]

    StoreTestLoop:

    [B0_Cnt] B StoreTestLoop
    || STDW A31:A30, *A4++[A16_Index]
    ||[B0_Cnt] SUB B0_Cnt, 1, B0_Cnt

    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    BNOP B3, 5
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;Asm_LDW_Test(srcBuff, uiIndex, uiCount);
    Asm_LDW_Test:

    SUB A6, 5, B0_Cnt
    MV B4, A16_Index

    [B0_Cnt] B LDWTestLoop
    || LDW *A4++[A16_Index], A30

    [B0_Cnt] B LDWTestLoop
    || LDW *A4++[A16_Index], A30

    [B0_Cnt] B LDWTestLoop
    || LDW *A4++[A16_Index], A30

    [B0_Cnt] B LDWTestLoop
    || LDW *A4++[A16_Index], A30

    [B0_Cnt] B LDWTestLoop
    || LDW *A4++[A16_Index], A30

    LDWTestLoop:

    [B0_Cnt] B LDWTestLoop
    || LDW *A4++[A16_Index], A30
    ||[B0_Cnt] SUB B0_Cnt, 1, B0_Cnt

    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    BNOP B3, 5
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;Asm_STW_Test(srcBuff, uiIndex, uiCount);
    Asm_STW_Test:

    SUB A6, 5, B0_Cnt
    MV B4, A16_Index

    [B0_Cnt] B STWTestLoop
    || STW A30, *A4++[A16_Index]

    [B0_Cnt] B STWTestLoop
    || STW A30, *A4++[A16_Index]

    [B0_Cnt] B STWTestLoop
    || STW A30, *A4++[A16_Index]

    [B0_Cnt] B STWTestLoop
    || STW A30, *A4++[A16_Index]

    [B0_Cnt] B STWTestLoop
    || STW A30, *A4++[A16_Index]

    STWTestLoop:

    [B0_Cnt] B STWTestLoop
    || STW A30, *A4++[A16_Index]
    ||[B0_Cnt] SUB B0_Cnt, 1, B0_Cnt

    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    BNOP B3, 5
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

  • 用汇编代码的形式测试汇编指令LDDW/STDM等进行数据读写的性能。

x 出现错误。请重试或与管理员联系。