In all of my previous simulations I had always added idle cycles to a bus in between transactions. This is with my CPU interface. This was always the same number, so I have a idle member in my seq_item class. However now I need to be able vary this. So I am going to set the idle parameter to 0 and delay the next transaction in the sequence class. My driver class has been modified to leave the “pins” in an active state if the idle member of the transaction is 0. If it is greater than 0, then it puts the bus in an idle state. The driver uses the sequence_item_port.get() method to get the next transaction but with now the next transaction is not guaranteed to be available. How do I check to see if a transaction is available so that if one is not, I can put the bus in an idle state for 1 clock cycle and check again? Below is the section of the driver using the get method
forever
begin
seq_item_port.get(req);