Operator MemoryInterfaceAnalyzer

Operator Library: Debugging

The MemoryInterfaceAnalyzer operator provides information about the data flow of memory interfaces. It does not change, add, or remove any image data or control signals.

[重要的] Runtime Testing

This operator is intended for testing and analyzing your design during runtime. You must build (synthesize) the design, load it onto the target hardware, and run actual image processing before you can use the operator for debugging.

The operator is not intended for design simulation within VisualApplets.

You can use the operator to detect blocking conditions and to observe how multiple memory operators share the available memory bandwidth. For more information about the shared memory concept, see: Application Note: Shared Memory and ' Shared Memory Concept '.

The MemoryInterfaceAnalyzer operator only works when it is attached to an existing memory operator that uses a resource of type RAM. The operator attaches itself to the specified RAM port (RamResourceId) and observes the data flow. Each memory operator that uses Frame Grabber RAM (DRAM) has both a write interface and a read interface.

  • Write Interface:

    The memory operator requests write access, and the memory controller grants access if possible. Whether access is granted depends on all connected memory operators and their current read or write requests. The write interface can be in one of the following states:

    • Write Transfer:

      A write transfer occurs when the operator requests write access and the memory controller grants the request.

    • Write Wait:

      If the operator requests write access but the memory controller is currently processing requests from another memory interface, the request is not granted. The operator waits for write access.

    • Write Idle:

      The operator is not requesting write access and the write interface is currently unused.

  • Read Interface:

    The memory operator requests read access, and the memory controller grants access if possible. Whether access is granted depends on all connected memory operators and their current read or write requests. The read interface can be in one of the following states:

    • Read Transfer:

      A read transfer occurs when the operator requests read access and the memory controller grants the request.

    • Read Wait:

      If the operator requests read access but the memory controller is currently processing requests from another memory interface, the request is not granted. The operator waits for read access.

    • Read Idle:

      该算子未请求读取访问权限,且目前未占用 read 接口。

下图展示了 MemoryInterfaceAnalyzer 如何连接到指定的 Memory 接口。每个接口包含:

  • 来自 Memory 算子的一个 request 信号,以及

  • 来自 Memory 控制器的用于授予或拒绝访问权限的一个 acknowledge 信号。

每个 Memory 算子同时具有 write 和 read 接口。在以下示例中,MemoryPortId 为 1。

read 接口仅描述了读取地址向 Memory 的传输,因为可以认为,将读取地址传输给 Memory 控制器总会触发向 Memory 算子的读取数据传输。

有关共享 Memory 概念的更多信息,请阅读:应用笔记:共享 Memory 和 '共享 Memory 概念'。

MemoryInterfaceAnalyzer 算子用于测量在指定的测量周期(MeasurementPeriod)内,Memory 算子处于以下各个状态的时长占比:

  • Write Transfer

  • Write Wait

  • Write Idle

  • Read Transfer

  • Read Wait

  • Read Idle

该算子通过其 read 参数提供这些结果。由于它仅报告测量数据而不处理数据,因此 MemoryInterfaceAnalyzer 没有任何 input 或 output 端口。

I/O Property

Property 值
Operator Type O

支持的 Link Format

无

参数

RamResourceId
键入 静态写参数
默认 0
范围 [0, 可用 RAM 接口数量 - 1]

该参数指定了正在被监视 Memory 接口的 Memory 算子的 RAM 资源 ID。

如果没有为指定的 RAM 资源 ID 分配 Memory 算子,则设计无效。

MeasurementPeriod
键入 动态/静态写入参数
默认 1000
范围 [1, 1000]

该参数以毫秒为单位计算性能测量周期的时长。

测量周期的定义对于分析时间比例以及计算平均值非常重要。

WriteTransferFraction
键入 动态读取参数
默认 0
范围 [0, 100]

该参数计算在 MeasurementPeriod 期间向 Memory 写入数据的周期百分比。

当算子请求写入访问权限且 Memory 控制器授予该请求时,就会发生写入传输。

WriteWaitFraction
键入 动态读取参数
默认 0
范围 [0, 100]

该参数用于计算在 MeasurementPeriod 期间,内存算子请求写访问但被内存控制器拒绝的周期百分比。

只有在算子请求写访问且内存控制器批准该请求时,才会发生写传输。

WriteIdleFraction
键入 动态读取参数
默认 0
范围 [0, 100]

该参数用于计算在 MeasurementPeriod 期间,写接口处于未使用状态的周期百分比。此时没有发出写请求,因此也没有批准任何请求。

ReadTransferFraction
键入 动态读取参数
默认 0
范围 [0, 100]

该参数用于计算在 MeasurementPeriod 期间,从内存中读取数据的周期百分比。

当算子请求读访问且内存控制器批准该请求时,会发生读传输。

ReadWaitFraction
键入 动态读取参数
默认 0
范围 [0, 100]

该参数用于计算在 MeasurementPeriod 期间,内存算子请求读访问但被内存控制器拒绝的周期百分比。

只有在算子请求读访问且内存控制器批准该请求时,才会发生读传输。

ReadIdleFraction
键入 动态读取参数
默认 0
范围 [0, 100]

该参数用于计算在 MeasurementPeriod 期间,读接口处于未使用状态的周期百分比。此时没有发出读请求,因此也没有批准任何请求。

WriteReadRatio
键入 动态读取参数
默认 0.0
范围 [0.0, 1000.0]

该参数指定了成功的写传输与成功的读传输之间的比率。它有助于指示观察到的内存算子是否可能会遇到缓冲区溢出。

  • WriteReadRatio ≤ 1:读取的数据量与写入的数据量相同或更多。

  • WriteReadRatio > 1:写入的数据量多于读取的数据量。这可能会导致缓冲区溢出。

  • WriteReadRatio = 0:未写入任何数据。

  • WriteReadRatio = 1000:未读取任何数据。