I have a .mif image that I want to encrypt in Verilog. To do so, I need to read the image into the program and store it in an array.
The image would be 160 by 120 and I would like to store it in an array of size 160*120*3 (It's multiplied by 3 since each pixel requires a 3 bit number to store its color). So ideally, I would be doing something like this:
wire  image = read ("myimage.mif")
So far, I've taken a look at initial blocks and they seem like they might help. I wasn't able to find a specific guide for reading in images though. Note that I have to do this in Verilog, not SystemVerilog.
Could someone please show me how to do this or at the very least tell me what kind of things I should be looking into in order to be able to do this? Thank you.