Jump to content

Moreshwar Salpekar

Members
  • Posts

    5
  • Joined

  • Last visited

Moreshwar Salpekar's Achievements

Member

Member (1/2)

0

Reputation

  1. Hello, I have checked and found this to be true "producer_write_share_sc_fifo() writes multiple messages to sc_fifo1, sc_fifo2 and sc_fifo3. I think I can expect each of method1, method2 and method3 to be called once at least.". I just need a reconfirmation. Regards Moreshwar
  2. Thanks for the clarifications. I will try to check your clarifications in code. I may have some questions after reading the specification with respect to your clarification and my trials. I just wanted a reconfirmation for the following If producer_write_share_sc_fifo() writes to one sc_fifo, then there is one notification irrespective of number of entries written to that sc_fifo If producer_write_share_sc_fifo() writes to more than one sc_fifo, then there will be one notification per sc_fifo assuming there is one method per sc_fifo that is sensitive to the data_written_event() of the sc_fifo. To be clearer with an example: If have 3 sc_fifos: sc_fifo1, sc_fifo2 and sc_fifo3 method1 is sensitive to data_written_event of sc_fifo1 method2 is sensitive to data_written_event of sc_fifo2 method3 is sensitive to data_written_event of sc_fifo3 producer_write_share_sc_fifo() writes multiple messages to sc_fifo1, sc_fifo2 and sc_fifo3. I think I can expect each of method1, method2 and method3 to be called once at least.
  3. Hello, I am learning sc_fifo and I cant find anything on below points. it will be helpful if someone can answer or at least point me where i can get more info. What i have done: 1. I have a sc_fifo shared between producer and consumer the consumer is declared sensitive to sc_fifo data_written_event by using SC_METHOD(consumer_read_shared_sc_fifo) sensitive << shared_sc_fifo.data_written_event() 2. I write 3 entries to shared_sc_fifo within same function producer_write_shared_sc_fifo as follows shared_sc_fifo.write(msg1) shared_sc_fifo.write(msg2) where msg1 and msg 2 are the two messages of struct Message I have defined What noticing is that the function producer_write_shared_sc_fifo returns successfully implying that data is now in shared_sc_fifo My Questions/ Doubts are 1. I am expecting that consumer_read_shared_sc_fifo will be called twice but it is called once even though the available count (value returned by num_available() method) is 2. I think this is because i am writing in the same function. Am I right? 2. I am thinking of calling nb_write() instead of write() as I dont want to block if there is insufficient space . However, I am not sure the behaviour of caller i.e., producer_write_share_sc_fifo() in case space is not available. i know it will return false. What I am not sure is, what should be the behaviour in case nb_write returns false. Do i have to try this nb_write again? 3. When does the delta cycle end for write nb_write Regards Moreshwar
  4. Dear Sir, Thank you for your information. it clears my understanding well. Regards Moreshwar
  5. I want to know if a method can be triggered only when two two signals or ports are high. To be specific, I want my module (Write_Data_out) to output data only when all of the following conditions hold: 1. Clock positive edge is detected 2. Address Valid (AV) signal is low 3. Read (RD) is High. The method (Write_Data_out) must not be triggered otherwise. I cannot find any information or examples to do this. The only way i see this that I declare a method sensitive to clock and in the method, do processing if the AV is low RD is high else return from method the && operator does not support sc_event_finder and << does not support bool (if << operator for sensitive supported boo, i could do something like this clk.posedge()& (!AV.read()) && (RD.read). where AV and RD are sc_in<bool>
×
×
  • Create New...