I am working on a UVM testbench with several agents that have driver and monitor classes parameterized with identical seq item class. Upon “`include foo_seq_item.sv” in individual agent package files will compile identical class definition multiple times in separate agent package namespace. Is it okay as per SV/UVM experts? How would you compile foo_seq_item class once and use it in multiple package so that you don’t have multiple identical copies of them in separate namespaces?
Why not compile foo_seq_item.sv in a package and import it instead of including.
I wanted to get a second opinion on that.
I created a foo_seq_item_pkg.sv package, included foo_seq_item.sv file in it and then adding “import foo_seq_item_pkg::*” in all agent packages whose subcomponents are parameterized with foo_seq_item.
Thanks for your response.