For the occasions that you find yourself with a netlist file and you don’t know where it came from or what version it is, etc. this post is about how you can interpret the netlist file (ie. convert it into something readable).
Today I found myself with two netlists and I needed to know if they were the same. Yes of course you can try comparing the two files with a program such as Beyond Compare, but if the netlists were compiled on separate dates, you will have trouble recognizing this from the raw binary data. The best thing to do in this case is to convert the netlists to EDIF files, a readable, text file version of the netlist. Another option is to convert the netlists into VHDL or Verilog code. Here is how you can do this:
To convert a netlist (.ngc) to an EDIF file (.edf)
- Get a command window open by typing “cmd” in the Start->Run menu option in Windows. If you use Linux, open up a terminal window.
- Use the “cd” command to move to the folder in which you keep your netlist.
- Type “ngc2edif infilename.ngc outfilename.edf” where infilename and outfilename correspond to the input and output filenames respectively.
- Open the .edf file with any text editor to view the netlist.
To reverse engineer a netlist with ISE versions older than 6.1i
- Convert the netlist to an EDIF file using the above instructions.
- Type “edif2ngd filename.edf filename.ngd” to convert the EDIF file into an NGD file (Xilinx Native Generic Database file).
- To convert the netlist into VHDL type “ngd2vhdl filename.ngd filename.vhd“.
- To convert the netlist into Verilog type “ngd2ver filename.ngd filename.v“.
To reverse engineer a netlist with ISE versions 6.1i and up
- To convert the netlist into VHDL type “netgen -ofmt vhdl filename.ngc“. Netgen will create a filename.vhd file.
- To convert the netlist into Verilog type “netgen -ofmt verilog filename.ngc“. Netgen will create a filename.v file.
Now you should have all the tools you need to read an NGC netlist file.
Post a Comment
Please provide valuable comments and suggestions for our motivation. Feel free to write down any query if you have regarding this post.