circular buffer(its urgent)

Aug 08, 2005 1 Replies

hi,



i m doing project on image processing.For that i need to store pixe



value of any frame in memory. I read from one journal that there is one circular read address generator which is used to generate physica address from logical address this help to reduce the size of memory.



I have to store 30*32 pixel in memory.NOW for that i have to generat



physical address for those memory location.THey suggest circular rea address generator for this.



But i never read about circular read address generato.So pleas



anybody tell me about this generator. Is it possible to reduce memory size using this method



I don't know what you mean by "logical address" and "physical address" in your context.

But a circular address generator for me would count

0 1 2 ... (30*32)-1 0 1 2 ...

so

-------< CUT >---------- signal rst:std_logic; signal clk:std_logic; signal cnt:std_logic_vector(9 downto 0);

process(clk) begin if rising_edge(clk) then if rst='1' then cnt '0'); else if (cnt = "1110111111") then cnt '0'); else cnt ----------

Note that if you don't need it to count upwards (i.e. just for a FIFO without direct access), the downwards version might be smaller.

-------< CUT >---------- signal rst:std_logic; signal clk:std_logic; signal cnt:std_logic_vector(9 downto 0); signal cnt_n:std_logic_vector(10 downto 0);

cnt_n

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required