cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hongyijia2013
Visitor
Visitor
10,911 Views
Registered: ‎01-04-2013

Can “read_edif” use asterisk wildcard?

Jump to solution

I want to load quite a lot of .ngc files to vivado .

But it seem that only one file can be loaded by using the command "read_edif"

 And this command "read_edif  synplify/core/*.ngc" does't work.

Thanks!

0 Kudos
1 Solution

Accepted Solutions
avrumw
Guide
Guide
17,912 Views
Registered: ‎01-23-2009

You have to think about the Tcl parser. To the Tcl parser, the * doesn't really mean anything. Some commands can take strings that contain a star an interpret the * in a particular way, but the parser itself doesn't.

 

For example, in the command "get_cells my_cell*", the * is used as a wildcard for cell names. But, it is the get_cells command that makes the * look for cell names. Similarly, in "get_nets my_net*", the get_nets command expands the wildcard against the nets that exist in the database. The command "get_files my_file*", expands the * using the set of files that are currently part of the project (added with add_files).

 

None of these are what you want. Furthermore, the 'read_edif' command does not have any wildcarding capabilities. But, as Sikta said, it can take a list of files. So, the question is, how do you create a list of files based on the files that exist within a directory?

 

The answer is the Tcl command 'glob'. From 'help glob'

 

_________________________________________________________________

NAME
       glob - Return names of files that match patterns

SYNOPSIS
       glob ?switches? pattern ?pattern ...?
_________________________________________________________________

 

This shows that glob accepts one or more patterns (that can contain wildcards) and return the files (from the filesystem) that match the pattern.

 

Therefore

 

read_edif [glob synplify/core/*.ngc]

 

should work.

 

Avrum

View solution in original post

3 Replies
siktap
Scholar
Scholar
10,888 Views
Registered: ‎06-14-2012

Can you try creating a list of files and then passing the list of files through read_Edif?

 

I think that should work.

 

Regards

Sikta

0 Kudos
avrumw
Guide
Guide
17,913 Views
Registered: ‎01-23-2009

You have to think about the Tcl parser. To the Tcl parser, the * doesn't really mean anything. Some commands can take strings that contain a star an interpret the * in a particular way, but the parser itself doesn't.

 

For example, in the command "get_cells my_cell*", the * is used as a wildcard for cell names. But, it is the get_cells command that makes the * look for cell names. Similarly, in "get_nets my_net*", the get_nets command expands the wildcard against the nets that exist in the database. The command "get_files my_file*", expands the * using the set of files that are currently part of the project (added with add_files).

 

None of these are what you want. Furthermore, the 'read_edif' command does not have any wildcarding capabilities. But, as Sikta said, it can take a list of files. So, the question is, how do you create a list of files based on the files that exist within a directory?

 

The answer is the Tcl command 'glob'. From 'help glob'

 

_________________________________________________________________

NAME
       glob - Return names of files that match patterns

SYNOPSIS
       glob ?switches? pattern ?pattern ...?
_________________________________________________________________

 

This shows that glob accepts one or more patterns (that can contain wildcards) and return the files (from the filesystem) that match the pattern.

 

Therefore

 

read_edif [glob synplify/core/*.ngc]

 

should work.

 

Avrum

View solution in original post

hongyijia2013
Visitor
Visitor
10,850 Views
Registered: ‎01-04-2013
Thanks !I will take a try a few days later,and feed back my result.
0 Kudos