August 17, 20112 minutes
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:
cmd in the Start->Run menu option in Windows. If you use Linux, open up a terminal window.cd command to move to the folder in which you keep your netlist.ngc2edif infilename.ngc outfilename.edf where infilename and outfilename correspond to the input and output filenames respectively.
edif2ngd filename.edf filename.ngd to convert the EDIF file into an NGD file (Xilinx Native Generic Database file).ngd2vhdl filename.ngd filename.vhd.ngd2ver filename.ngd filename.v.
netgen -ofmt vhdl filename.ngc. Netgen will create a filename.vhd file.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.