nabla101
Junior Member level 3
Hi, I want to declare four constant arrays to emulate four frames of a VGA resolution video sequence, to use for simulation of a video CODEC. I am only considering luminance values to begin with, which have values from 0 (black) to 255 (white). I want to use a simple pattern like a cross moving across a background of a different shade for the emulated video sequence. I want to know if anyone has any ideas on how I can easily define the arrays using a formula, or from a file for example since there are 19200 unsigned elements in each 2D array, too many to define practically.
I was thinking of starting like this:
But obviously that would take impossibly long to do, so is there another way?
I was thinking of starting like this:
Code:
type PXL is unsigned 0 to 255;
type VGA_frame is array (0 to 639, 0 to 479) of PXL;
constant frame_0 : VGA_frame := ( .....
..... )
But obviously that would take impossibly long to do, so is there another way?