diff options
| author | Clément Zrounba <clement.zrounba@ec-lyon.fr> | 2023-11-14 18:06:56 +0000 |
|---|---|---|
| committer | Clément Zrounba <clement.zrounba@ec-lyon.fr> | 2023-11-14 18:17:32 +0000 |
| commit | 05026d50fc3129413622ad0d32c61b05e411004c (patch) | |
| tree | 7e6a44d4704570c48afe51f6a0392574d2a6e689 /src/parser/parse_element.h | |
| parent | ce5bd6f52ec438ae21ff38181c465e0ea40a4a36 (diff) | |
| download | specs-05026d50fc3129413622ad0d32c61b05e411004c.tar.gz specs-05026d50fc3129413622ad0d32c61b05e411004c.zip | |
Fix bug in bidirectional devices handling
In some cases (wrongly defined netlists), segmentation faults and wrong
net handling could occur.
It may need further checks in the near future.
Diffstat (limited to 'src/parser/parse_element.h')
| -rw-r--r-- | src/parser/parse_element.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/parser/parse_element.h b/src/parser/parse_element.h index 58ad694..ebd08ab 100644 --- a/src/parser/parse_element.h +++ b/src/parser/parse_element.h @@ -40,11 +40,12 @@ using std::unique_ptr; virtual ParseElement *clone() const \ { return new ELEM_NAME(*this); } \ /* Implement virtual function create(...) to construct element */ \ - virtual sc_module *create(ParseTreeCreationHelper &pt_helper) const; \ + virtual sc_module *create(ParseTreeCreationHelper &pt_helper) const; \ virtual element_type_base * \ - instantiate_and_connect_uni(ParseTreeCreationHelper &pt_helper) const; \ + instantiate_and_connect_uni(ParseTreeCreationHelper &pt_helper) const; \ \ virtual string kind() const { return ELEM_NAME_LONG; } \ + virtual bool bidir_capable() const { return false; } \ }; /*************************************************/ @@ -64,13 +65,14 @@ using std::unique_ptr; virtual ParseElement *clone() const \ { return new ELEM_NAME(*this); } \ /* Implement virtual function create(...) to construct element */ \ - virtual sc_module *create(ParseTreeCreationHelper &pt_helper) const; \ + virtual sc_module *create(ParseTreeCreationHelper &pt_helper) const; \ virtual element_type_base * \ - instantiate_and_connect_uni(ParseTreeCreationHelper &pt_helper) const; \ + instantiate_and_connect_uni(ParseTreeCreationHelper &pt_helper) const; \ virtual element_type_base * \ - instantiate_and_connect_bi(ParseTreeCreationHelper &pt_helper) const; \ + instantiate_and_connect_bi(ParseTreeCreationHelper &pt_helper) const; \ \ virtual string kind() const { return string(ELEM_NAME_LONG) + " (bidir)"; } \ + virtual bool bidir_capable() const { return true; } \ }; /** ******************************************* **/ |
