Add has_index flag to interconnect_port_s
This commit is contained in:
parent
665295ba00
commit
0c95493794
|
|
@ -469,16 +469,15 @@ port
|
|||
/* | hierarchical_identifier '[' INTEGER ']' */
|
||||
;
|
||||
|
||||
/* Since INTERCONNECT is ignored we can also ignore a vector bit. */
|
||||
port_interconnect
|
||||
: hierarchical_identifier
|
||||
{
|
||||
struct interconnect_port_s tmp = {$1, -1};
|
||||
struct interconnect_port_s tmp = {$1, false, 0};
|
||||
$$ = tmp;
|
||||
}
|
||||
| hierarchical_identifier '[' INTEGER ']'
|
||||
{
|
||||
struct interconnect_port_s tmp = {$1, $3};
|
||||
struct interconnect_port_s tmp = {$1, true, $3};
|
||||
$$ = tmp;
|
||||
}
|
||||
;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
|
||||
# include <stdio.h>
|
||||
# include <stdbool.h>
|
||||
|
||||
/*
|
||||
* Invoke the parser to parse the opened SDF file. The fd is the SDF
|
||||
|
|
@ -55,7 +56,8 @@ struct port_with_edge_s {
|
|||
|
||||
struct interconnect_port_s {
|
||||
char* name;
|
||||
int index; // -1 for whole vector
|
||||
bool has_index;
|
||||
int index; // invalid if has_index is false
|
||||
};
|
||||
|
||||
extern void sdf_select_instance(const char*celltype, const char*inst,
|
||||
|
|
|
|||
Loading…
Reference in New Issue