Dear Oveis.Gharan:
Thanks very much for your very detailed answer.what you say above is a very good solution to my problem.
I actually have many sets of pictures,every set contains more than 100 sequential pictures,i need to test every set . if i do it in your method i can write a matlab or perl script to combine all those pictures in one set into a single binary file(as you demonstrate me above) and meanwhile modify my testbench a little bit(change begin,end address automatically).
I used to want to use DPI or VPI to communicate with verilog ,use C to detect how many BMP file in the current directory,use c to transfer them into binary format and then change the 2D array value with VPI. but now i find you way is more direct and more focus on the hardware design or the software. so THANKS VERY MUCH:wink: