itsmyturn Posted June 30, 2012 Report Posted June 30, 2012 (edited) I have to insert random delays between the transactions in the sequence. From some basic reading that I've done, I felt like the approach to follow is to have a driver's run task similar to this (say no response): task run(); forever begin seq_item_port.get_next_item(req); driveTxn(req); seq_item_port.item_done(); dlyCfg::get_config_int("txnDelay", this.txnDelay); repeat (this.txnDelay) @(posedge vif.clk); end endtask : run If I followed this approach, after every transaction, both driver and sequence access the database. Won't it slow down things? I'm wondering if there's a better approach that's optimal/cleaner. Thanks in advance. Edited June 30, 2012 by itsmyturn formatting the code Quote
dudi Posted June 30, 2012 Report Posted June 30, 2012 Why do you need to use config_db for this? Since its a random delay, you can either use std:randomize to locally randomize it in the run task, or even better - you can add the delay to be part of the transaction. Then you can easily control the delay with constraint given to your transactions/sequences Quote
itsmyturn Posted June 30, 2012 Author Report Posted June 30, 2012 Why do you need to use config_db for this? Since its a random delay, you can either use std:randomize to locally randomize it in the run task, or even better - you can add the delay to be part of the transaction. Then you can easily control the delay with constraint given to your transactions/sequences I probably don't want any randomization/intelligence in my driver. But having the delay field as part of transaction sounds like a good way of doing it. I'll try that. Thanks! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.