RefinateHome   

The Basics

Examples

Screenshots

One-row-per-part

覧覧覧

Download Refinate

Register

覧覧覧

Revision History

Support

Quick Exercises

HyphenateRanges.XLS

ExpandRanges.XLS

JoinCells.XLS

Assy Versions.XLS

Redundant_Part_Info

Netlist Sorting

Procedures:Compare

 

Company Info

 

  Refinate Netlist Sorting
 
 

Netlist Sorting: Pre-process

By using Refinate's convert_netlist action you can compare changes made to PCB netlists and other types of netlist (such as EDIF files for programmable logic). Once converted, you can write simple comparison equations in Excel or you can copy the sorted results to text files and use a file compare utility to find the differences

To convert a PCB netlist to one row per netname with its nodes sorted, import the netlist by pasting a text copy starting at any cell and drag to select only the "nets" section of the list. Then select the Cnvrt_Netlist action, click Yes and your list will be processed. This will work if each new netname is followed on the same line by a semicolon and then by at least one element (on the same line). There also must be at least two spaces (or a semicolon) at the beginning of extended rows for the same netname. Any spaces found between words will automatically be replaced with a comma.

If your netlist is not in the format just described, try using the Find & Replace of a word processor to make it conform so that it can be automatically sorted. If you expect to use a word processor to repeat this pre-processing, you can easily record the necessary steps you use into a word processor macro.

Keep in mind that you can also sort a netlist by using the One-row-per-part action with Ignore Ranges selected. To do this, the net_name must be in a column to the left of the net_connections column. Be sure Ignore Ranges mode is chosen. Bold a net_connection cell and use One-row-per-part.  Then sort each node's connections using Auto-Paste Format. If you want a count of the connections, use Auto-Paste Count. Then use Excel_Data_Sort to sort the whole netlist.

PCB netlist - original format
10MHZ;  U28.74 U25.L3
BITCLK;  U5.H3 U6.G3 U5.L3 TP7.1,
       U6.H3 U5.G3 U25.B6,
       U6.M1
 

 

After using Cnvrt_Netlist to Sort
Net Nodes Qty
10MHZ U25.L3, U28.74 2
BITCLK TP7.1, U25.B6, U5.G3, U5.H3, U5.L3, U6.G3, U6.H3, U6.M1 8

 

 

Sample procedure for pre-processing an EDIF netlist (use similar steps for other netlist types).

The following is a sample procedure for using the Find&Replace in MS_Word  to prepare an EDIF netlist to be sorted by Refinate.

EDIF netlist - original format

Pre-processed before using Refinate
     (net &10MHZ
      (joined
       (portRef O (instanceRef U315))
       (portRef OPAD (instanceRef U316)))
      (property Name (string "10MHZ")))
     (net BITCLK
      (joined
       (portRef O (instanceRef U335))
       (portRef OPAD (instanceRef U336)))
      (property Name (string "BITCLK")))
&10MHZ;(joined
;(portRefO(instanceRefU315))
;(portRefOPAD(instanceRefU316)))
;(propertyName(string"10MHZ")))
BITCLK;(joined
;(portRefO(instanceRefU335))
;(portRefOPAD(instanceRefU336)))
;(propertyName(string"BITCLK")))

 

To make  a macro in Word, use Tools_Macro_RecordNewMacro.

bullet

Copy the netlist into Word.

bullet

Search for the keyword (net: Find each group of nets and cut and paste them into one new document until there are no more nets remaining in the original copy. Do not cut and paste other types of entries into the newly created netlist document.

 

In the new document where only the nets have been pasted do the following:

bullet

Find and replace (net and its leading spaces and single trailing space with nothing.

To do this, in the Replace dialog, be sure the wildcard box is not checked. Activate the cursor in the Find_What box. Type as shown or click the Special button and choose WhiteSpace. A ^w will be inserted. Then type (net and put a space at the end. Place the cursor at the top of the document and then click Replace_All.

Find_What:

 [whitespace](net[spc]

^w(net

Replace_With:

 [empty]

 

 

bullet

Put a semicolon in front of (joined and move it up to the same line as the netname.

In the Replace dialog, be sure the wildcard box is not checked. Activate the cursor in the Find_What box. Type as shown or click the Special button and choose Paragraph_Mark. A ^p will be inserted. Click the special button and choose WhiteSpace. A ^w will be inserted. Then type (joined. Activate the cursor in the Replace_With box. Type ;(joined. Click Replace_All.

Find_What:

 [CR][whitespace](joined

^p^w(joined

Replace_With:

;(joined

 

 

bullet

Replace the leading spaces at the beginning of each line with a semicolon.

In the Replace dialog, be sure the wildcard box is not checked. Activate the cursor in the Find_What box. Delete the word (joined. Activate the cursor in the Replace_With box. Delete the word (joined and insert ^p in front of the semicolon. Click Replace_All.

Find_What:

 [CR][whitespace]

^p^w

Replace_With:

^p;

 

 

bullet

Replace all the remaining spaces with nothing (remove them).

In the Replace dialog, be sure the wildcard box is not checked. Activate the cursor in the Find_What box. Delete the ^p. Activate the cursor in the Replace_With box. Delete both the ^p and the semicolon. Click Replace_All.

Find_What:

 [whitespace]

^w

Replace_With:

 [empty]

 

 

bullet

You are now done pre-processing the netlist. Use the Word menu Edit_SelectAll. Then copy and paste the selection into any cell of Excel. While that list is highlighted in Excel, choose the Cnvrt_Netlist action in the Refinate Format display and click Apply.

Every node of the netlist will be sorted so it can be compared to another list sorted in this same manner. Create and copy a simple equation such as =if(A2<>F2,1,""). Use conditional formating to change the color of the cell if the value equates to 1 (due to a difference). If there is a shift between lists being compared due to new nets, right click and use INSERT_ShiftCellsDown and re-copy the comparison equation across the inserted rows and down to the bottom of the list. Alternatively, once Refinate has sorted the netlist, copy the list to a text file and use a file compare utility.

 

 
| RefinateHome | The_Basics | Examples | Screenshots | One_row_per_part |
| Register | Support | Revision_History | Download_Refinate |
AnalogDigital Engineering. Revised: 02/19/07.