Jump to content

leoeltipo

Members
  • Content Count

    6
  • Joined

  • Last visited

  • Days Won

    1
  1. Hi Karsten, Thank you very much for your answer!!!! This line makes the difference: this->request_next_activation(max_timestep,inp->default_event()); As it allows me to maintain the resolution of the PWM module. I read about Dynamic TDF but did not know how to apply it here. Thank you again!!! Kind regards, Leandro
  2. Hello all, I have been working with SystemC some time. I am entering the SystemC-AMS world. I have this system: Processing algorithm (SystemC DE) PWM generation (SystemC DE) LPF (SystemC AMS, ELN) I want to argument the selection. The processing part was already done and is almost digital, that's why DE is used for the modelling. PWM generation is crucial in this application, as errors or quantization of the pulse position would result in distortion after demodulation. Using SystemC DE allows to toggle the signal at exact moments in time, without adding any quantization to the process. Now I want to complete my model with the Low Pass Filter, that actuates as demodulator here. The input should be sc_signal<bool> or sc_signal<double>, to interact with the PWM module. The low pass filter should be model using ELN. However, I do not know how to properly do this because I would need to define the sample time, however, as the LPF is the only AMS block and is a SC_MODULE instantiating the components and nodes, no sampling time is specified. In the other hand, if I define a TDF block with a given sampling period, I will add uncertainty to the PWM signal, as well as aliasing because armonic extent is infinite. I would appreciate any ideas. Please let me know if I have missunderstood some of the concepts of AMS. Regards, Leandro
  3. Hello, I would like to be able to overload operator<< to be able to print transaction information (assuming tlm_generic_payload for transaction type). I think on two alternatives: 1) ostream& operator<<(ostream& os, tlm_generic_payload& trans): the problem is that operator<< should be declared a friend function inside the definition of class tlm_generic_payload, and that is not the case. 2) Define a new class derived from tlm_generic_payload with the friend declaration. The problem is that I sould change the transaction type all over the design, and that attempts against interoperability because tlm_generic_payload is not the type in use. What do you think is the right way of doing this? Thank you in advance. Leandro
  4. To continue with this topic a little bit, I understand that a socket has an sc_port and sc_export. However, what is confusing for me is that tlm_base_initiator_socket inherints from sc_port but instantiate an object of type sc_export. Otherwise, the "sc_port" part of the socket shoul also be bound with an interface... Correct me if i am wrong... Thanks
  5. Hello, Thank you very much to both of you guys!!!! Now it is really clear for me. Thanks again!!! Leo
  6. Hello, I am new in the SystemC-TLM world. I am reading the LRM and looking at an example (chapter 13, systemc LRM, page 462). In the module constructor it is written ... init_socket.bind(*this); // Initiator socket bound to initiator itself ... The rest of the code is of no use for the sake of the question. I don't understand why the socket must be bound to the module itself. The example continues and the socket is bound to a target socket, but I don't get this one... Thank you in advance. Leo
×
×
  • Create New...