• Home
  • :
  • Community
  • :
  • Blogs
  • :
  • PCB Design
  • :
  • BoardSurfers: Find by Name or Find by Query - That is the…

PCB Design Blogs

BarbS
BarbS
8 Sep 2020
Subscriptions

Get email delivery of the Cadence blog featured here

  • All Blog Categories
  • Breakfast Bytes
  • Cadence Academic Network
  • Cadence Support
  • Custom IC Design
  • カスタムIC/ミックスシグナル
  • 定制IC芯片设计
  • Digital Implementation
  • Functional Verification
  • IC Packaging and SiP Design
  • Life at Cadence
  • The India Circuit
  • Mixed-Signal Design
  • PCB Design
  • PCB設計/ICパッケージ設計
  • PCB、IC封装:设计与仿真分析
  • PCB解析/ICパッケージ解析
  • RF Design
  • RF /マイクロ波設計
  • Signal and Power Integrity (PCB/IC Packaging)
  • Silicon Signoff
  • Spotlight Taiwan
  • System Design and Verification
  • Tensilica and Design IP
  • Whiteboard Wednesdays
  • Archive
    • Cadence on the Beat
    • Industry Insights
    • Logic Design
    • Low Power
    • The Design Chronicles

BoardSurfers: Find by Name or Find by Query - That is the Question!

BoardSurfers: Cadence Allegro Blog

You must be using find utility day in and day out, but if you are unfamiliar with Find by Query in Allegro Layout Editors, read on. Layout editors retained the original Find by Name when developing a new utility to do what Find by Name could not. I am going to explain why you need both to get your job done by discussing some of the ways I use these find utilities.

A Little History

Let’s go back to the future with:

FBQ_1

The above image by JMortonPhoto.com & OtoGodfrey.com is licensed under Creative Commons Attribution-Share Alike 4.0 International.

For a long time, Find by Name and Extracta were my go-to tools when I needed information from my database. Find by Name is in the lower section of the Find filter and you can see it in the following image:

fbq_2

I love to use Find by Name for its simplicity and its speed at getting information quickly. It is great for quick reviews of general data, nets, diff pairs, and match groups, etc. If you want to highlight a diff pair or a specific part, or a match group, you don’t need anything fancy to get that done. Use the More button of Find by Name to bring up the Find by Name or Property UI. Then select the objects of interest from the list and you’re done!

The next image is of Find by Name or Property UI showing the complete list of searchable objects:

fbq_3

I use it all the time with Show Element and Highlight commands or to see where properties are used because it works so well for those actions, but I cannot use it to operate on the data, and I cannot save the output as a list. More importantly, there is no advanced filtering

For added filtering, over the years, I’ve been relatively happy writing Extracta custom view files, and to be honest, editing view files to get exactly what I want is added work. Who wants to open the data dictionary documentation just to look up what every GRAPHICAL_DATA_# will output?  The answer is NOBODY.

Somewhere in the middle of using Find by Name and Extracta (or SKILL) is a need to have a flexible and feature-rich method of getting information quickly, and that’s where Find by Query comes in.

Find by Query or FbQ for short, was added to Allegro Layout Editors in release 17.2 in 2016. So, if you are using either of the 17.2 or 17.4 releases, you have it!

If you haven’t noticed it, take another look at the Find Filter. It’s right there, above Find by Name. Click on FbQ to open its UI.

FBQ    FBQ

As you can see, the object list is enriched compared to Find by Name. And before we start, the first thing to mention is, almost everything in this UI requires a double-click to modify the setup. Selections in Fields or Matching Objects supports Microsoft standards (Shift and Control keys).

Now, let’s get to work!

Example 1: Finding and Updating All Instances of Specific Text that Carry a Part Number in a Database

To see specific text content in FbQ, perform the following steps in sequence:

  • Open FbQ and double-click Text in the Objects pane. The Fields section populates with text-related criteria.

             FBQ

  • Select Class Name, Subclass Name, and Text Contents in the Fields section. As you do this, the Filters section starts showing the choices with their values set to equal to “*” (meaning anything).

             FBQ 

  • Just below this section, the Matching Objects table displays every text record available in the database. To reduce this list to show only the ‘part number’ text, select and edit the Filter string: Text Contents equal to “*”.  A Filter Setting UI opens, listing all unique text content values found in the database. 

             FBQ 

  • Choose the three P/N text contents, or use a wildcard value. The Operator field for text values offers four choices: Equal to, Not Equal to, Contain, and Not Contain. Select Contain, set the Value field to *REV*, and click OK.  The Filters section updates with new value and the Matching Objects now only show text strings containing "REV".

      FBQ

Oops , it looks like the TITLE BLOCK text is incorrect. Well, that can be fixed too. You just need to edit that text string. Turn on the visibility for the TITLE_BLOCK, enable Text in the Find filter, and in the FbQ click the DRAWING FORMAT/TITLE BLOCK text. The text record gets zoomed and selected in the design canvas. Right-click on the text in the design canvas, choose Text edit, and update the text rev level to "B". Once you edited the text, the FbQ changes to read-only and show you the following message right above the objects list:

“The board has changed since the query was last run. Please rerun Query”

Execute the Rerun Query button which is now active and update the list (because you have performed an edit). Rerun it, review all part numbers, and you are done.

FBQ

FbQ not only 'finds' data but allows you to select and edit the data as well. Plus – and this is a big plus – you can save and reuse queries.

If you decide to keep this query for future use to check other boards for consistent part numbers, use Save Query on the bottom edge of the FbQ UI. It will save the query as <filename>.qfnd (Query Find) file.

FBQ

Load Query is available to the left of the Save Query option and lists all the available query (*.qfnd) files. Note that the Load query option uses the value of the miscpath user-preference variable to find these files.

FBQ

 Another advantage of FbQ is the capability to save the list of matching objects for any query.  The Export Result button saves this list to a .csv or .xml file format, which you can refer to later or share with other engineers.

FBQ

Let’s try something else.

Example 2: Finding and Replacing Incorrect Via Padstacks on Differential Pairs

In the Objects section of FbQ double-click to select Vias. This action fills in the Fields section with vias-related criteria. To find only Diff Pair vias and not net-based vias, in the Fields section, select the following:

  • Diffpair
  • Location X
  • Location Y
  • Padstack Name

And, here you go! The Matching Objects list fills in with all vias that are on Diff Pairs.

  FBQ

While scanning the list I noticed that Power Vias are incorrectly used on these diff pairs. Let’s filter this list further by padstack name. Double-click Padstack Name equal to “*” in the Filters section and open Filter Setting UI. To narrow down the list to get specific vias, choose BARBS_POWER_VIA from the list of available values and click OK.

 FBQ

The Matching Objects list immediately updates and displays only the vias on Diff Pairs that are using BARBS_POWER_VIA.

 FBQ

That’s just what is expected. Now to replace these vias with Diff Pair via, you can use FbQ without making it out of date.

Here are the steps you need to follow:

  1. Leave the FbQ list open.
  2. Run the replace padstack command as you would without a list.
  3. Select single via replace mode.
  4. To select Old padstack name, click 1st via from the FBQ list.
  5. Enter the New replacement padstack name.
  6. Execute Replace.
  7. Repeat selecting each via from the list as the Old padstack and replace each one, working thru the FbQ.
  8. Right-click and choose Done to exit replace padstack command.

FBQ

I guess you might be thinking that “When you edited just one text record in your first example, FBQ became out of date. How come you can do all these replacements from the FbQ list without it going out of date?” 

Fair question! 

When I clicked the text in FbQ, I went into pre-select mode, so changing the text is an action that is completed with one pre-select edit. In this case, I am not in pre-select mode, and with each via replaced, I have not exited the command (yet). It is important to remember that the command exits when FbQ will update, and then you need to re-run the query. 

 FBQ

 Rerunning the query verifies the changes you made. The list is now empty and the Matching Objects list states “No matching objects found”.

 FBQ

I’m done! (with this example)

But wait... Keep reading... There’s more...

Example 3: Querying Database for Odd Via Rotations and Modify Rotation Angle

When I was asked to extract vias that were not at 0, 90, 180, or 270 degrees, I started by customizing a view file for extracta, and then I said, “Wait a minute, let’s try Find by Query instead of using Extracta”. Guess what?  It was much easier to create a generic query to check any database for odd via rotations.

Open FbQ and select Vias with fields Location X, Location Y, and Rotation Angle to generate a list of all vias, at all rotations. Since vias at 0, 90, 180, and 270 are allowed, modify the filter setting for Rotation Angle.

 FBQ

Use the Not Equal operator to skip 0, 90, 180, and 270 rotations. For numeric filtering FbQ filter setting offers six operators:

FBQ

After applying the filter, you get the resulting Matching Objects list.

 FBQ

Good, you have a list. Now, all you want to rotate all of these odd angle vias to a rotation of 0 degrees.

Tips on Object Selection

Before moving ahead, to make your task easy, I am sharing my best tips for multi-object selection in case you do not find it working as expected: 

  • No double-clicking.
  • To select the first object, right-click on the object.
  • To select all objects, right-click on any object, followed by a right-click (or left-click) on the Select All pop-up option. The other option is to left-click on the uppermost cell of the Matching Objects table.

            FBQ

  • To select multiple objects, drag-select, or right-click on an object and use the Shift and Control keys to create the selection set.
  • The best tip amongst all is to click the All On switch in the Find filter before selecting anything. If it’s not on, FbQ cannot do anything with that object list and message:

<Your object> selection is not appropriate at this time.

Again, FbQ makes this easy! 

Whatever operation you do it requires enabling the search objects in the Find filter (really, you will forget), and the command options need to be set properly.

Now, coming back to the task at hand. In this example, “spin” should have a rotation value set to Absolute and angle to 0 degrees. There are two ways to achieve this: 

Method 1: Using Find by Query

  1. Leave the FbQ list open.
  2. Make sure the Find filter is enabled for the object type.
  3. In the FbQ list:
    1. Right-click any object.
    2. Followed by a click on the Select All pop-up option. All the selected objects get highlighted in the design canvas.
    3. Hover over a highlighted object, right-click and select Spin and you are done.

Method 2: Using Spin Command

With everything selected:

  1. Choose the Edit – Spin menu option.
  2. Verify correct options are set.
  3. Pick an origin on the design canvas to execute the spin command and you are done.

I mention two different methods because you may want to confirm or change the Options tab settings before initiating the command.

I’m done now!  Really!

The purpose of this blog was to get you to think about creatively using Find by Query the next time you are looking for something specific in the database. You can use it for refined searching of just about anything. I hope you see it’s potential and have fun using it.

Tags:
  • Find command |
  • APD |
  • PCB Editor |
  • FIND |
  • Find result |
  • Find by Query |