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.

[参考译文] TMS320F28377D:FuSa SRAM10 示例

Guru**** 2519520 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1551209/tms320f28377d-fusa-sram10-example

器件型号:TMS320F28377D


工具/软件:

您好、
安全手册要求使用 SafeTI 诊断库不支持的措施、这些措施将提交给用户。
例如、SRAM10:
•SafeTI 诊断库中没有测试例程
•《安全手册》要求测试 SRAM 包装程序逻辑(《安全手册》中的第 6.5.16 章)。 客户未找到测试仲裁的方法。 有这样的例子吗?

Excel 工作表也没有帮助。 只能在此处输入用户的操作。 在这里、他们希望仅选择使用的外设以及从 SafeTI 诊断库中选择使用的函数。 然后、该工具独立计算残留误差概率。  

此致、Holger

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Holger、

    我们目前没有 RAM 仲裁测试。 我已联系我们的设计团队以了解更多详情。 他们可能有一个内部测试用例、可以根据 SDL 中共享的内容进行调整。 我会在听到回来时更新您的信息。

    Whitney

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Holger、

    我已经与团队讨论过、可以提供一些建议。 您可以通过同时从两个不同的控制器 (CPU、CLA、DMA) 触发对同一存储器块的重复访问来测试仲裁。 您还可以通过从同一存储器块执行代码来混合访问类型。

    例如、下面是一些伪代码、其中显示了 CPU 在读取和写入 LS0 时从 LS0 执行代码、而 CLA 也对 LS0 进行读取和写入。

    lsramArbitrationTest()
    {
        - Configure MemCfgRegs to assign MSEL and CLAPGM settings
        - Configure CLA tasks
        
        - Force CLA task so it starts executing claRWFromLS0();
        - Call cpuExecuteFromLS0()
        
        - Repeat these steps for all required LS RAMs
    }
    
    #pragma CODE_SECTION(cpuExecuteFromLS0, ".ls0ExecuteSec")
    void cpuExecuteFromLS0(void)
    {
    	DataInitValue = 0x12345678;
    	DataCheckValue = 0x12345678;
    
        // I'm hard-coding addresses here, but of course you can declare an array
        // and put it in LS0 if the RAM contains other things that you don't want
        // to overwrite at this point    
        DataWriteAddr = (uint32_t *)(LS0_START_ADDR + 0x450);
        DataCheckAddr = (uint32_t *)(LS0_START_ADDR + 0x450);
    
        // While this function executes from LS0, repeatedly write to LS0.
        // A CLA task will also be writing and reading to LS0 at the same time.
        for (i = 0; i < 200; i ++) {
            DataInitValue = DataInitValue + 0x12345678;
            *(DataWriteAddr++) = DataInitValue;
        }	
    
        // Read back the data that was written and make sure the writes were all
        // successful.
        for (i = 0; i < 200; i ++) {
            DataCheckValue = DataCheckValue + 0x12345678;
            if(*(DataCheckAddr++) != DataCheckValue)
            {
                ErrCount++;
            }
        }
    }
    
    // This function won't be able to be executed from LS0 since the RAM would 
    // need to be set to configured as CLA program RAM to execute
    #pragma CODE_SECTION(Cla1Task1, "Cla1Prog1")
    __interrupt void Cla1Task1(void)
    {
    	ClaDataInitValue = 0x456789AB;
    	ClaDataCheckValue = 0x456789AB;
    
        // I'm hard-coding addresses here, but of course you can declare an array
        // and put it in LS0 if the RAM contains other things that you don't want
        // to overwrite at this point    
        ClaDataWriteAddr = (long int *)(LS0_START_ADDR + 0x650);
        ClaDataCheckAddr = (long int *)(LS0_START_ADDR + 0x650);
    
        // Write and read back a bunch of data from LS0 while the CPU does the
        // same. Check that the accesses were successful.
        for (i = 0; i < 200; i ++) {
            ClaDataInitValue = ClaDataInitValue + 0x12345678;
            *(ClaDataWriteAddr++) = ClaDataInitValue;
    
            ClaDataCheckValue = ClaDataCheckValue + 0x12345678;
            if(*(ClaDataCheckAddr++) != ClaDataCheckValue)
            {
                ClaErrCount++;
            }
        }
    }

    您也可以在 GS RAM 中的 CPU 之间执行类似的测试、 使用 IPC 标志来同步访问的开始。 您还需要确保在执行这些检查时禁用中断。

    Whitney

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Whitney、
    感谢您的回答。  

    客户不确定 SRAM10 要求。 该测试 (安全手册中的第 6.5.16 章)究竟意味着什么:

    “SRAM 包装程序逻辑电路的软件测试应提供诊断覆盖、以便在访问特定 SRAM 的不同主器件之间进行仲裁、并确保访问保护正常运行。 这是对用于提供 SRAM 位单元覆盖的测试的补充(请参阅第 6.3.12 节)。“

    上下文的含义是什么

    • SRAM 包装程序逻辑
    • 诊断覆盖
    • 主器件之间的调停
    • 访问特定的 SRAM
    • 访问保护

    测试是否应该测试 TMS320 的硬件或用户实现的软件?  

    此致、Holger

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    这是 RAM 硬件测试。 SRAM 包装程序逻辑包括仲裁、访问保护和 ECC/奇偶校验器等内容。 SDL 已经提供了一些用于执行 ECC/奇偶校验器逻辑测试的代码。 我认为我们没有 F2837x SDL 中的访问保护测试、但我们确实有一个 类似的 F2838x 示例。

    至于位单元的部分、RAM 当然具有 ECC/奇偶校验保护。 如果需要、SDL 还提供 March 测试、以主动在 RAM 中写入和读回模式。

    Whitney