Mailbox

In reply to dave_59:

*In reply to sreelaxmi:*You should always parameterize your mailbox with the type of item being put/get.

mailbox #(stimulus) m_box;
function new(mailbox  #(stimulus) m_box);
this.m_box = m_box;
endfunction

But this is not your problem. You need to show us what you expect to happen to your inputs and you need to show who does the get(). What you are doing does not make much sense. Normally, your class ‘stimulus’ represents one set of values for (opcode,op1,o2) and create an class object for each set. The each object goes onto the mailbox.

stimulus vector is : at 1
[Stimulus]:stimulus is generated :: op1 = 36 , op2 = 8 , opcode = 1
stimulus vector is : at 2
[Stimulus]:stimulus is generated :: op1 = 0 , op2 = 9 , opcode = 2
stimulus vector is : at 3
[Stimulus]:stimulus is generated :: op1 = 99 , op2 = 156 , opcode = 3
stimulus vector is : at 4
[Stimulus]:stimulus is generated :: op1 = 13 , op2 = 141 , opcode = 5
message is put into mailbox at 4 0
Driver:: stimulus is received at 4
[Driver]:stimulus is generated :: op1 = 13 , op2 = 141 , opcode = 5 0
stimulus vector is : at 5
[Stimulus]:stimulus is generated :: op1 = 18 , op2 = 8 , opcode = 1
stimulus vector is : at 6

i want my driver output to work at every #1