Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Image Processing on Verilog

Status
Not open for further replies.

UFK

Member level 3
Joined
Mar 8, 2010
Messages
60
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Location
Pakistan
Activity points
1,728
Hiii

Im trying to read an image on Verilog. Im supposed to carry out a DWT on an image matrix. Since i couldnt figure out how to convert an image into matrix (Hex) on Verilog i used MATLAB imread for it. Now that i have the matrix for it how can i save it on Verilog? Should i access it on Verilog using it as a .txt file? Please help
 

Yes, you can extract the matrix from a file. There are several commands available, some of them similar to C programming, such as $fscanf, $fgetc, $fread.

You can load the matrix into variables or registers.

See this thread for more information:
 

    UFK

    Points: 2
    Helpful Answer Positive Rating
Thanks alot. That was really quick. Ill try it. Hope it will solve my prob.
 

hii

can someone please help me debug this piece of code.

module test;
reg [7:0] memory [7:0];
integer i;

initial
begin

$readmemb("init.dat",memory);
for (i=0; i<8; i=i+1)
$display("memory [%0d]=%b",i,memory);
end
endmodule

It says Module <test> has no port.

I saved a test file init.dat as follows:

@002

11111111 01010101
00000000 10101010

@006

1111zzzz 00001111

Please help me with it. Thanks alot in advance
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top