diff --git a/elab_sig.cc b/elab_sig.cc index c060f9bdc..345fd8993 100644 --- a/elab_sig.cc +++ b/elab_sig.cc @@ -1074,6 +1074,7 @@ NetNet* PWire::elaborate_sig(Design*des, NetScope*scope) const // declaration, which is the dimensions [null:]. if (use_ridx==0 && dynamic_cast(use_lidx)) { netvector_t*vec = new netvector_t(packed_dimensions, data_type_); + vec->set_signed(get_signed()); packed_dimensions.clear(); ivl_assert(*this, netdarray==0); netdarray = new netqueue_t(vec); diff --git a/netqueue.h b/netqueue.h index af2de0a1c..85526910e 100644 --- a/netqueue.h +++ b/netqueue.h @@ -1,7 +1,7 @@ #ifndef IVL__netqueue_H #define IVL__netqueue_H /* - * Copyright (c) 2014 Stephen Williams (steve@icarus.com) + * Copyright (c) 2014-2015 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -38,6 +38,9 @@ class netqueue_t : public netdarray_t { // IVL_VT_QUEUE for queues. ivl_variable_type_t base_type() const; + // A queue may have a type that is signed. + inline bool get_signed() const { return element_type()->get_signed(); } + std::ostream& debug_dump(std::ostream&) const; private: