- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am having a large text file which contains only the pixel values of an image.....here i can able to read the pixels using $readmemh system task..... but the prolem is memory......am using only 1000 words of memory as below
reg [31:0] Mem [0:999]; initial $readmemh("pixels.txt",Mem); By this i can get only 1000 pixles from the text file and i will give these pixels to the next module for furthur processing....then i have to read the next 1000 pixels from the text file and put it in the Mem....similarly i want all the pixels to be readed from the txt file with the Mem size as 1000 and give those to the next module for furthur processing......so how i can do this plz i will be very thank full to u...plz help me.....Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Typically in image processing you use "stream oriented" processing and not "buffer oriented" processing.
You seam to think in terms of buffers, one buffer is 100 pixels, you process it and then move on to the next buffer. It is a nice approach for typical processors, but not for FPGAs. In FPGAs you can do many operations in parallel, and therefore it is better to think in streams, one stream is a sequence of pixels. you fetch a pixel, process it, and store it back all at the same time in the FPGA (aka pipelining). So back to you question, how do you read large images ? Read it pixel by pixel. After all The simulation can be slow, the hardware will be fast anyways. Try reading on "Avalon streaming interfaces", you will get my point.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page