type img_array_t is array(natural range <>, natural range <>) of natural;
signal img_array : img_array_t(0 to X_SIZE-1, 0 to Y_SIZE-1);
.....
--inside a process/function/procedure
file img_file : text open read_mode is "text.txt";
variable l : line;
for y in 0 to Y_SIZE-1 loop
readline(img_file, l); --gets 1 line at a time
for x in 0 to X_SIZE-1 loop
read(l, img_array(x,y)); --read in each pixel
end loop;
end loop;
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?