hi ,
am trying to write code for image processing. for this first i just write data in one file to another.
my code is compiled successfully and simulated also. but doesn't create output file
am trying to write the data in input file into output file. but its not created any output file.
i made some changes also using commands like:
$writememb(".txt", w);
$fopenw();
but its not works properly.
my code is here:
module txtrd(in1,out1,clk);
input [3:0] in1;
reg [3:0] in ;
output out1;
reg[3:0]out1;
input clk;
reg [3:0] temp [0:15];
integer i,file;
initial
begin
$readmemb("input1.txt",temp);
end
always @(posedge (clk))
begin
for (i=0;i<=15;i=i+1)
begin
in = temp;
out1=in;
end
file=$fopen("output1.txt", out1);
for (i=0;i<=15;i=i+1)
begin
$display(file,"%b", out1);
end
end
endmodule
any changes is need for this. please tell me.
and another doubt is is there any possibility to read image directly into verilog, and is it
synthesizable and is it possible to dump on fpga.
please tell me ..