From 9e856810b9817167ad2e9816432a7560de35e0fc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 29 Sep 2014 16:05:26 +0200 Subject: [PATCH] vhdlpp: Workaround to avoid translation of variables to wires in functions. --- vhdlpp/subprogram_emit.cc | 3 ++- vhdlpp/vtype.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vhdlpp/subprogram_emit.cc b/vhdlpp/subprogram_emit.cc index 70a97baba..f3a2a428e 100644 --- a/vhdlpp/subprogram_emit.cc +++ b/vhdlpp/subprogram_emit.cc @@ -62,7 +62,8 @@ int Subprogram::emit_package(ostream&fd) const for (map::const_iterator cur = new_variables_.begin() ; cur != new_variables_.end() ; ++cur) { - + // Workaround to enable reg_flag for variables + cur->second->count_ref_sequ(); errors += cur->second->emit(fd, NULL, NULL); } diff --git a/vhdlpp/vtype.h b/vhdlpp/vtype.h index 247af6b51..2ccb999fb 100644 --- a/vhdlpp/vtype.h +++ b/vhdlpp/vtype.h @@ -86,7 +86,7 @@ class VType { virtual bool can_be_packed() const { return false; } private: - friend class decl_t; + friend struct decl_t; // This virtual method is called to emit the declaration. This // is used by the decl_t object to emit variable/wire/port declarations. virtual int emit_decl(std::ostream&out, perm_string name, bool reg_flag) const;