Jump to content

Lawrence Said

  • Content Count

  • Joined

  • Last visited

  1. In our testbench we use a semaphore around grab/ungrab calls. So all our grab/ungrab calls look like some_pkg::sem[sqcr].get() sqcr.grab(seq) // do whatever you need sqcr.ungrab(seq) some_pkg::sem[sqcr].put() The semaphore is static and is per sqcr (an associative array). It's ugly, but it was necessary to prevent this and also other issues like deadlock. You have to be careful though, if the thread getting the semaphore is killed you could also shoot yourself in the foot and cause a deadlock since the semaphore is never returned. In that case you need to get even more sophis
  2. In my testbench I have two background sequences (call them S1 and S2) perform register access and a test that has multiple threads ( call them T1 to T7) also performing register access on the same shared bus. T1 through T7 need to lock the sequencer in order to perform multi-cycle transactions on the CPU bus. The scenario is S1 issues a write, resulting in arb_sequence_q.size == 1 and arb_sequence_q[0].request == SEQ_TYPE_REQ in the same simulation tick, T1 through T7 issue lock requests. arb_sequence_q.size() == 8 and arb_sequence_q[0] is still the S1 request S2 issues a re
  • Create New...