ImageMonitor 運算子

Operator Library: Debugging

「ImageMonitor」運算子會從您所定義的內部處理流程中的任何位置,為您擷取影像。 您可以查看影像在抵達此處之前所經歷的過程,並利用這些資訊進行除錯。

「ImageMonitor」運算子的工作原理類似於您在VisualApplets 中模擬設計時所使用的「Simulation Probe」—— 只是「 ImageMonitor」運算子是用於執行期間的測試。

該操作員提供了一個非常簡單的影像讀出寄存器介面。當參數 Mode 設定為影像監控時, 僅需讀取 PixelData 寄存器,即可讀取完整的影像。

這非常有用,因為您無需佔用其中一個(數量有限的)DMA 通道,即可監控影像資料。

在設計中 ,ImageMonitor運算子的實例數量在理論上是沒有限制的。 然而,您應謹慎使用此運算子以節省資源,因為在讀出期間暫停 資料流會引入額外的 FPGA 邏輯。 這也意味著,此運算子無法用於監控無限資料源。

由於 PixelData 的最後三位元組承載 Valid、EndOfLine 及 EndOfFrame 標誌,因此支援的像素寬度上限為 61 位元。

CurrXPos 和 CurrYPos 參數指向當前活躍的像素位置。此資訊可用於篩選 輸出像素,例如, 僅分析每兩個或三個像素中的其中一個。

[重要] 執行階段測試

此運算子專為在執行階段測試與分析您的設計而設計: 在您使用此運算子進行偵錯之前,必須先建置 (合成) 設計、将其載入目標硬體,並啟動實際的影像處理。

該運算子並非用於 VisualApplets 內的設計模擬。

I/O Properties

Property Value
Operator Type M
Input Link I,影像資料輸入

Supported Link Format

Link Parameter Input Link I
Bit Width [1, 61]
Arithmetic {unsigned, signed}
Parallelism any
Kernel Columns 1
Kernel Rows 1
Img Protocol {VALT_IMAGE2D, VALT_LINE1D}
Color Format any
Color Flavor any
Max. Img Width any
Max. Img Height any

Parameters

Mode
Type dynamic write parameter
Default UnlimitedSink
Range {UnlimitedSink、Monitor、MonitorFromLineStart、MonitorFromFrameStart}

此參數用於設定工作模式。

UnlimitedSink = 由於所有輸入皆被捨棄,因此無需監控。

監控 = 立即切換至監控模式。

MonitorFromLineStart = 在當前行結束後切換至監控模式。

MonitorFromFrameStart = 在當前幀結束後切換至監控模式。

已準備好進行監測
Type 動態讀取參數
Default no
Range {yes, no}

表示已準備好讀取 PixelData 參數。僅當 PixelData 設定為「是」時,才需讀取該參數。

PixelData
Type 動態讀取參數
Default
Range [1, 64]

包含當前的像素值以及三個像素標誌。當未設定有效標誌時,像素值將被捨棄。

PixelValue = PixelData[1, LinkBitWidth]

ValidFlag = PixelData[LinkBitWidth+1]

EndOfLineFlag =

PixelData[LinkBitWidth+2]

EndOfFrameFlag =

PixelData[LinkBitWidth+3]

CurrXPos
Type 動態讀取參數
Default 0
Range [0, MaxImageWidth-1]

顯示當前行位置。

CurrYPos
Type 動態讀取參數
Default 0
Range [0, MaxImageHeight-1]

顯示當前影像的高度位置。

Examples of Use

以下範例展示了運算子 ImageMonitor 的使用方式: