I modified the SPI OVM testbench that can be downloaded from Mentor's web site. The testbench is customized to test our design. I have been using Mentor's Questa tool to run simulation while we evaluate the tool. The testbench has worked with Questa. We are also evaluating Cadence's Incisive. I started to compile and run simulation with Incisive. It apprears to compile OK but $cast does not seem to work right.
seq_item_port.get_next_item(req); $cast(cloned_item, req.clone()); ap.write(cloned_item);
This works fine with Questa but not with Incisive. The data members in req are defined but not cloned_item after $cast.
Is there any reason that this does not work with Incisive? Questa was sourceing OVM-2.1.2 source code.
Stephen, thank you for your response. I had to comment out some data member functions in the seq_item class because Incisive gave errors about unpacked array for convert2string and do_record functions. (This was not an issue with Questa.) I also commented out do_copy functions thinking that they are not used. I think you are right, this caused the problem. I thought clone function was not working properly, so I replaced the clone function call with "create cloned_item and do_copy" after uncommenting out do_copy function in the seq_item class. This worked. After reading your post, I switched back to "clone". This works, too! I didn't realize that "clone" is using "do_copy" function but this makes sense. If my analysis (guess) above is incorrect, please let me know.