Search the Community
Showing results for tags 'generic payload'.
-
Hello, I have two objects. One is a memory, and the second one is a generator. They are connected via a TLM socket. At the same time, both objects have a method that is sensitive on the clock. The method prepares data for write transactions and it should also pick-up data from reading transactions (and vice versa). It should also check the status of the transactions. I'd like to use a TLM socket for data passing instead of a pin-accurate model of memory interfaces. See the picture in the attachments. The issue is a synchronization because there is a clock (one source of events) and PEQ for sockets (second source of events). Is there any recommended/standard solution for this? For more detailed description of the issue, let's imagine the following scenario. Clock cycles a) Generator's clock cycle method issues a write request to the memory (data is not passed yet) b) The memory accepts the write request via the forward path, stores it to PEQ. a) Generator's clock cycle method prepared data and updates the payload for the write request (already in memory's PEQ). b) Generator's clock cycle method would like to check the status of the write (so it can mark the write transaction as finished ok or not). The memory should handle the write request in PEQ now and use the backward path to signalize a response to the generator. I don't know how to do this (is the standard PEQ capable of this? Should I write my own PEQ?). c) Generator's clock cycle method issues a read request to the memory. d) The memory accepts the read request via the forward path, stores it to PEQ. a) Generator's clock cycle method would like to check the status of the read request. The memory should handle the read request in PEQ now, update the payload with data, and use the backward path to signalize a response to the generator. I don't know how to do this (is the standard PEQ capable of this? Should I write my own PEQ?). b) If the response is ok, then generator's clock cycle method picks-up data and move on. ... Any help would be appreciated. Thanks and best regards. -- Zdenek
-
- tlm
- non-blocking transport
-
(and 3 more)
Tagged with:
-
Dear all, I am new to payload extensions and I would appreciate a feedback on whether I am doing things right.. I need to declare a simple payload extension, including two additional fields: a reset value a 16 bit bit vector representing the value of a register In the header, I simply declare the clone/copy from functions, plus my additional fields: class reg_extension : public tlm::tlm_extension<reg_extension>{ public: reg_extension(); tlm::tlm_extension_base* clone() const ; void copy_from(tlm::tlm_extension_base const &); bool reset; sc_bv<16> value; }; And then I implemented the functions, by taking care of the additional reset and value fields: reg_extension::reg_extension(){ reset = false; value = sc_bv<16>(0); } tlm::tlm_extension_base * reg_extension::clone() const{ cout<<"Executing clone!"<<endl; reg_extension * ext = new reg_extension(); ext->reset = this->reset; ext->value = this->value; return ext; } void reg_extension::copy_from(tlm::tlm_extension_base const & ext){ reset = static_cast<reg_extension const &>(ext).reset; value = static_cast<reg_extension const &>(ext).value; } Is this enough for the extension to work? Best regards, S.
- 1 reply
-
- tlm_extension
- payload extension
-
(and 1 more)
Tagged with:
-
Dear all, I am new to payload extensions and I would appreciate a feedback on whether I am doing things right.. I need to declare a simple payload extension, including two additional fields: a reset value a 16 bit bit vector representing the value of a register In the header, I simply declare the clone/copy from functions, plus my additional fields: class reg_extension : public tlm::tlm_extension<reg_extension>{ public: reg_extension(); tlm::tlm_extension_base* clone() const ; void copy_from(tlm::tlm_extension_base const &); bool reset; sc_bv<16> value; }; And then I implemented the functions, by taking care of the additional reset and value fields: reg_extension::reg_extension(){ reset = false; value = sc_bv<16>(0); } tlm::tlm_extension_base * reg_extension::clone() const{ cout<<"Executing clone!"<<endl; reg_extension * ext = new reg_extension(); ext->reset = this->reset; ext->value = this->value; return ext; } void reg_extension::copy_from(tlm::tlm_extension_base const & ext){ reset = static_cast<reg_extension const &>(ext).reset; value = static_cast<reg_extension const &>(ext).value; } Is this enough for the extension to work? Best regards, S.
-
- tlm_extension
- payload extension
-
(and 1 more)
Tagged with:
-
Hi all, I think I have located a bug in the uvm_tlm2_generic_payload class and I would like to file it. I did follow the instructions in this document: http://accellera.org/images/community/uvm/Reporting_bugs_enhancement_requests_UVM_Apr2014.pdf Is this still the recommended way of filing a bug? /JSA