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.

Comparing text files in Verilog

Status
Not open for further replies.

star_golden

Junior Member level 1
Joined
Jul 3, 2013
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
99
Hi All,

Can anyone please tell me how to compare 2 text files in Verilog..?

Thanks !
 

Can you clarify, because this question is a bit vague.

But to strictly answer your question: open both files, then read byte from each and compare. Keep reading until end-of-file is reached or until first different byte is encountered.

Code:
file_a = $fopenr("filename_a"); 
file_b = $fopenr("filename_b"); 

// etc
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top