Jump to content

Loki5000

Members
  • Content count

    2
  • Joined

  • Last visited

  1. Yes, I did. Following the compiler (g++) errors descriptions I came to this: template<> template<unsigned DA_WIDTH> class scv_extensions<item_c<DA_WIDTH> > : public scv_extensions_base<item_c<DA_WIDTH> > { public: scv_extensions<op_t> op; scv_extensions<sc_uint<DA_WIDTH> > addr; scv_extensions<unsigned> delay; item_c<DA_WIDTH>* _instance; void _set_instance(item_c<DA_WIDTH>* p) { _instance = p; _set_instance_core_wrap(p); } item_c<DA_WIDTH>* _get_instance() const { return _instance; } SCV_EXTENSIONS_CTOR(item_c<DA_WIDTH>) { SCV_FIELD(op); SCV_FIELD(addr); SCV_FIELD(delay); } }; I defined another _instance, _set_instance and _get_instance functions. I'm not fully understand how, but it works. The next problem is that I need one more data field in item_c class. And it's of std::vector type. I didn't found a way to use std::vector type with SCV. Am I right? It's not possible with SCV? The only way is to use CRAVE?
  2. I'm faced with the same question. But my sequence item is parameterized via template as follow: template<unsigned DA_WIDTH> class item_c: public uvm::uvm_sequence_item { public: sc_uint<DA_WIDTH> addr; ... I'm trying to use SCV_EXTENSIONS and scv_smart_ptr like Akhila do, but my scv_extensions class becomes not fully specialized in my case: template<unsigned DA_WIDTH> class scv_extensions<item_c<DA_WIDTH> > : public scv_extensions_base<item_c<DA_WIDTH> > { public: scv_extensions<sc_uint<DA_WIDTH> > addr; ... If understand it right, that will not work. When I'm trying to create scv_smart_ptr like this: scv_smart_ptr<item_c<DA_WIDTH> > req("req_item"); I'm receiving the following error: _scv_smart_ptr.h:88:16: error: invalid new-expression of abstract class type ‘scv_extensions<item_c<16u> >’ tmp_(&*ext_) { ^ Could somebody, please, explain me how to resolve this? Probably, there are some more appropriate way to create a parameterized sequence item.
×