- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
I have designed a RAM. The RAM has following codes.
module ram_8bit (we,re, clk, add, datin, datout); input [6:0] add; input we, re, clk; input [7:0] datin; output[7:0] datout; reg [7:0] datout; reg [7:0] mem [127:0]; always @(posedge clk) begin if (we) mem[add] <= datin; //data write else if (re) datout = mem[add]; //data read else datout=datout; end endmodule The code a have written here shows a ram but the input and output simulation file remains same. I have attached the files here. Please see the files. Any one please help me regarding this code. Where is the wrong i made? or My input is wrong. Please help. I want to insert an image in this RAM. I mean the images pixel value not the image. Can any one help me? I am in big trouble. Thanks in advance.Ссылка скопирована
2 Ответы
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Do you mean you need to initialize the RAM? Or you'd like to perform a simulation that writes the image into the RAM? If you want to initialize, normally the values are stored in a file and either the $readmemh or $readmemb functions are used.
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Dear SusannahM,
Thanks for your reply. Yes, I want to perform a simulation that writes the image into the RAM. If would please see the input and output image of that program, and suggest me regarding the change the output. Thanks again.
Ответить
Параметры темы
- Подписка на RSS-канал
- Отметить тему как новую
- Отметить тему как прочитанную
- Выполнить отслеживание данной Тема для текущего пользователя
- Закладка
- Подписаться
- Страница в формате печати