Altera_Forum
Honored Contributor
14 years agovideo line buffer using m9k
Hi all.
I qould like to make a median filter by my own and interface it with avalon streaming protocol. I am going to work only on Y pixelsl. Now, I need to make a line buffer of 720 pixels. Firs, I thought of something like --- Quote Start --- module buffer_720_brute( input clk, input [7:0] data_in, input enable, output reg[7:0] data_out ); reg [7:0] reg_1, reg_2, ..... reg 720; always@(posedge clk) begin if (enable) begin reg_1 <= ingresso; reg_2 <= registro_1; reg_3 <= registro_2; reg_720 <= reg_719; data_out <= reg_720; end endmodule --- Quote End --- I qould like to make a more efficient video line buffer, possibily using blocks or without using lots of LEs. I was thinking of two counters, one for the write address and one for the read address, when the write adddress reaches 720 it becomes 0, while the read address begins from 0 to 720 and so on. I fear only superpositions of read and write counter. Could anyone please help me? Best Regards Phate.