ppinzani Posted July 11, 2012 Report Share Posted July 11, 2012 Hi, I'm really new in the verification world and this may sound silly but I just can't get it. I have a sequence in my sequence library that creates a certain amount of transactions, the code for this sequence is: repeat (trans_num) begin req = b66_trans::type_id::create("req"); //Create Transaction assert(req.randomize()); wait_for_grant(); send_request(req); wait_for_item_done(); end So far everything seems works fine (In my Scoreboard Report I get that all transactions Matches). The problems comes when I take the line where the transaction (req) is created out of the repeat loop (I'm trying to do this in order reduce simulation time which is taking too long). When i take this line out of the repeat loop I don't get Transaction Matches in my scoreboard report anymore. So what i'm basically asking is: 1) Is there any problem if i send to the Driver (and to the Scoreboard) the same instance of a transaction but with different payload (It changes everytime i call the randomize() method)? 2) Why do i get Transaction Match when i create the transaction everytime the driver consumes one transaction and I get Transaction mismatch when I have one instance of a transaction but i change its payload everytime the driver consumes data?(Im mean, shouldn't it be the same for the scoreboard?) Thank you, Paulo Quote Link to comment Share on other sites More sharing options...
mastrick Posted July 15, 2012 Report Share Posted July 15, 2012 The new() that is done by create allocates new memory to store your transaction (including payload). If you don't do that, the information about your previous transaction is completely lost, so the scoreboard cannot match it. An alternative to create would be to send a clone of the transaction to the scoreboard, but I doubt that will save simulation time. Quote Link to comment Share on other sites More sharing options...
uwes Posted July 16, 2012 Report Share Posted July 16, 2012 hi, this is a general principle in UVM that clone/copy is not performed by default (since this costs). if an object wants to keep a "private"/"unchangable"/persistant copy of an object it has to perform the copy/clone itself. in your example you either allocate a new transaction all the time and pass this new object around OR you allocate it once (outside of the repeat) and have everyone who needs a private/persistant copy to perform the clone/copy. /uwe Quote Link to comment Share on other sites More sharing options...
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.