I am trying to compile a verilog code for FPGA programming where I will implement a VGA application. I use QuartusII and Altera. I am trying to use readmemh properly for acquiring a picture pixel by pixel.
For now, I have converted a picture into rgb texts using matlab. Each has the following format and nothing else (example): 03 A0 15 B7 ...
At the moment I am not getting any syntax errors however I had to define three registers each having 50x50 = 2500 bits and it is compiling quite slower, and I am getting "Timing requirements are not met" warning.
When I want to use a file with better resolution (640x480 would be great but its off limits, it seems) it is significantly lot worse. It took 15 minutes to get 200x200 pixel image and .sof file is around 6MB.
Isn't there a way to use readmemh for large inputs?
that is what I did to read
...
reg [7:0] mem_R[0:2499];
reg [7:0] mem_G[0:2499];
reg [7:0] mem_B[0:2499];
initial begin
...
$readmemh("menuR.txt", mem_R);
$readmemh("menuG.txt", mem_G);
$readmemh("menuB.txt", mem_B);
end
and I access it as follows
if( mem_R[total_current-127510] > 0)
begin
menu_red = 1;
end
Ex: Set(0, 6) to color
it has to go to the start and then0, 1, 2, 3, 4, 5, 6
and on and on. – Evan Carslake