Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

TCL question

I am trying to do some timing analysis using Quartus 9.1, TimeQuest and TCL.

When I use the following TCL code:

if { [string match -nocase "*io_recapture_h*" [ string trim $node_name ] ] } {

I get the following matches:

2.003 fpfe|sramintf|qdrintf|qdr_core_bot|io_recapture_h0[0]~feeder|dataf

2.058 fpfe|sramintf|qdrintf|qdr_core_bot|io_recapture_h0[0]~feeder|combout

2.058 fpfe|sramintf|qdrintf|qdr_core_bot|io_recapture_h0_0_|datain

2.220 fpfe:fpfe|sramintf:sramintf|qdrintf:qdrintf|qdr_core_1:qdr_core_bot|io_recapture_h0[0]

Since I want the one shown in bold (the last one with delay value 2.220), I modified the TCL code to (adding backslash and [) :

if { [string match -nocase "*io_recapture_h*\[0\]" [ string trim $node_name ] ] } {

But that didn't work. I tried many other combinations. None of which worked.

How do I escape the brackets?

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Looks like it should work. What is your list $node_name look like? A list where each element is made up of two other elements, a delay and a node name? Maybe try matching just the name?

    Can I ask what you're trying to do? I've analyzed man different interfaces and never had to do something like this. I'm wondering if there might be a better approach. (I also worry about disecting individual timing numbers, since you won't necessarily get the correct modeling.)
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The solution is to use {} instead of double quotes, as shown below:

    if { [string match -nocase {*io_recapture_h*\[0\]} [ string trim $node_name ] ] } {
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Ryan,

    Is it possible to send you a private message so that I can explain what I am trying to do with the TCL script.

    The original TCL problem though has been solved.

    Bye
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Is there a reason you can't post a description here? (Although I work for Altera, I'm not official support, and just try to answer questions a) that I can answer quickly from previous work and b) that might affect others, so that people who read/search these posts might be able to answer a similar issue. Taking it "off-line" gets around the second one, and might as well be a Service Request.) I don't mean to be a pain, and if it confidential or something, please send it through the forum email(just click on my name).