X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/1df76ccc8673a2760af17b88ebfba4bfd7f5c11d..dd3fe103df79a5a4c2962e2f05fec9a9ed58580d:/ReferenceInterface.cpp diff --git a/ReferenceInterface.cpp b/ReferenceInterface.cpp index faa51e8..a0f50ca 100644 --- a/ReferenceInterface.cpp +++ b/ReferenceInterface.cpp @@ -17,6 +17,13 @@ throw (Exception) : AbstractInterface(_owner, _name, _type, _width, _direction, if (_owner->isReferenceBlock()) throw(Exception(BLOCK_INVALID_TYPE)); multiplicity = _multiplicity; + + if (purpose == Control) { + // override some attributes with forced values + type = Boolean; + width = "1"; + multiplicity = 1; + } if (direction == InOut) { multiplicity = 1; } @@ -42,9 +49,9 @@ int ReferenceInterface::translatePurpose(const QString& txt) { else if (txt == "reset") { return Reset; } - if (txt == "wb") { + else if (txt == "wb") { return Wishbone; - } + } return Data; }