update docs (#pattern#@name tag)
This commit is contained in:
parent
7144ead895
commit
a306d97725
|
|
@ -551,6 +551,19 @@ verilog_format="xnor #(@risedel , @falldel ) @name ( @@Z , @@A , @@B );"
|
|||
</ul>
|
||||
<h3>PREDEFINED SYMBOL VALUES</h3>
|
||||
<ul>
|
||||
<li><kbd>@name</kbd></li>
|
||||
<p> This expands to the instance name of the symbol (like C1, R2, X3, ...)
|
||||
It is replaced with the value of the <kbd>name=...</kbd> attribute given when placing an instance of the symbol
|
||||
in a schematic.</p>
|
||||
<li><kbd>#pattern#@name</kbd></li>
|
||||
<p> This is a variation of the above where <kbd>pattern</kbd> is prefixed to all substituted <kbd>@name</kbd>
|
||||
patterns. The difference with <kbd>pattern@name</kbd> is that in case of vector instances (this means
|
||||
a placement of an instance with <kbd>name=R2[3:0]</kbd>, for example) the <kbd>pattern</kbd> string
|
||||
is added to all single instances when expanding the name. see below examples.<br>
|
||||
<kbd>pattern@name</kbd> where <kbd>name=R2[2:0]</kbd> is given in the instance placement,
|
||||
expands to <kbd>patternR2[2],R2[1],R2[0]</kbd><br>
|
||||
<kbd>#pattern#@name</kbd> where <kbd>name=R2[2:0]</kbd> is given in the instance placement,
|
||||
expands to <kbd>patternR2[2],patternR2[1],patternR2[0]</kbd><br>
|
||||
<li><kbd>@symname</kbd></li>
|
||||
<p> This expands to the name of the symbol</p>
|
||||
<li><kbd>@symref</kbd></li>
|
||||
|
|
|
|||
|
|
@ -594,7 +594,11 @@ FILE *my_fopen(const char *f, const char *m)
|
|||
|
||||
st = stat(f, &buf);
|
||||
if(st) return NULL; /* not existing or error */
|
||||
#ifdef __unix__
|
||||
if(!S_ISREG(buf.st_mode)) return NULL; /* not a regular file/symlink to a regular file */
|
||||
#else
|
||||
/* TBD */
|
||||
#endif
|
||||
fd = fopen(f, m);
|
||||
return fd;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2783,7 +2783,8 @@ static void load_inst(int k, FILE *fd)
|
|||
if(name[0] == '/') my_strdup2(_ALLOC_ID_, &xctx->inst[i].name, rel_sym_path(name));
|
||||
else my_strdup2(_ALLOC_ID_, &xctx->inst[i].name, name);
|
||||
#else
|
||||
my_strdup2(_ALLOC_ID_, &xctx->inst[i].name, rel_sym_path(name));
|
||||
if(isupper(name[0]) && name[1] == ':' && name[1] == '/') my_strdup2(_ALLOC_ID_, &xctx->inst[i].name, rel_sym_path(name));
|
||||
else my_strdup2(_ALLOC_ID_, &xctx->inst[i].name, name);
|
||||
#endif
|
||||
my_free(_ALLOC_ID_, &tmp);
|
||||
if(fscanf(fd, "%lf %lf %hd %hd", &xctx->inst[i].x0, &xctx->inst[i].y0,
|
||||
|
|
|
|||
|
|
@ -6744,9 +6744,15 @@ proc rel_sym_path {symbol} {
|
|||
global OS pathlist env
|
||||
|
||||
regsub {^~/} $symbol ${env(HOME)}/ symbol
|
||||
if {$OS eq "Windows"} {
|
||||
if {![regexp {^[A-Za-z]\:/} $symbol]} {
|
||||
set symbol [pwd]/$symbol
|
||||
}
|
||||
} else {
|
||||
if {![regexp {^/} $symbol]} {
|
||||
set symbol [pwd]/$symbol
|
||||
}
|
||||
}
|
||||
set curr_dirname [pwd]
|
||||
set name {}
|
||||
foreach path_elem $pathlist {
|
||||
|
|
|
|||
Loading…
Reference in New Issue