cliffc Posted March 25, 2012 Report Share Posted March 25, 2012 Hi, All - I have a small example (test1, env, agent, driver, sequencer, sequence and sequence_item) coded with trans extended from uvm_sequence_item. All items are registered with the factory. The driver and sequencer are parameterized to trans, as is the sequence. The trans has a convert2string virtual function so I can display all of the transactions executed by the sequence. I coded a trans2 transaction extended from trans, with convert2string updates to show "trans2", and a separate test with a build_phase() that does: set_type_override_by_type(trans::get_type(), trans2::get_type()); But when I run the second test, I still see the trans1 messages. I also printed out the factory information in the test's end_of_elaboration_phase() and it shows that trans2 should replace trans. I then created a second driver, extended from the original driver, added an additional `uvm_info message to the run_phase() and a third test that does: set_type_override_by_type(tb_driver::get_type(), tb_driver2::get_type()); And when I run, the second driver messages appear, but I still do not see the trans2 messages. Again, printing the factory.print() shows that both the tb_driver and trans types should be replaced by tb_driver2 and trans2. Any hints as to why the transaction and transaction printing of the trans2 transaction do not seem to be working? Thanks - Cliff Cummings Quote Link to comment Share on other sites More sharing options...
cliffc Posted March 26, 2012 Author Report Share Posted March 26, 2012 Well, I'm embarrassed! I was putting together an example that showed the difference between ::type_id::create() factory construction and new() class construction, and I forgot to remove the new() constructor from the sequence. Once all of the new() constructors were properly replaced with factory create()-constructors, the example worked fine and the trans2 print message is now executing as expected. Sorry for the false alarm. Regards - Cliff Cummings 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.