-
Notifications
You must be signed in to change notification settings - Fork 2
Update src and examples to use override keyword #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@voertler This needs to be rebased on the current master |
during clang-tidy checks.
with virtual/override definitions
where appropriate
-Woverloaded-virtual - synchronize examples with tests/uvm-systemc/examples
@barnasc PR has been rebased so that it can be merged |
I reviewed the PR and have some questions/remarks:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments above
tests/tests/uvm-systemc/examples/simple/phases/timeout/tb_env.h
Outdated
Show resolved
Hide resolved
void do_pack(uvm::uvm_packer& p) const override; | ||
void do_unpack(uvm::uvm_packer& p) override; | ||
void do_copy(const uvm::uvm_object& rhs) override; | ||
bool do_compare(const uvm::uvm_object& rhs, const uvm::uvm_comparer* comparer = nullptr ) const override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see we changed the signature of do_compare
, where a second argument has been added to specify the comparer. Is this really required? Can we specify the comparer not in a different way?
uvm::uvm_reg_data_t previous, | ||
uvm::uvm_reg_data_t& value, | ||
uvm::uvm_reg_data_t value, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to check this, I would expect value can change, in this method (in UVM-SV this is an inout
type, so we might need to keep it as pass-by-reference. We also need to check the LRM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is discussed #331
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a reference not a copy
tests/tests/uvm-systemc/examples_uvmsc/packer/operators/packet.h
Outdated
Show resolved
Hide resolved
@@ -32,7 +32,7 @@ class test : public uvm_test | |||
test( uvm_component_name name ) : uvm_test(name) | |||
{} | |||
|
|||
virtual void report_phase( uvm_phase& phase ) | |||
void report_phase( uvm_phase& phase ) override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove empty space at front
@@ -25,11 +25,12 @@ | |||
|
|||
#ifndef UVM_COMPONENT_REGISTRY_H_ | |||
#define UVM_COMPONENT_REGISTRY_H_ | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove whitespaces
@@ -21,6 +21,8 @@ | |||
#define UVM_COPY_MAP_H_ | |||
|
|||
////////////// | |||
#include <map> | |||
#include "uvmsc/base/uvm_object.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need an include here or is a forward declaration not sufficient?
#include "uvmsc/misc/uvm_status_container.h" | ||
#include "uvmsc/misc/uvm_copy_map.h" | ||
|
||
#include "uvmsc/base/uvm_object.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need an include here or is a forward declaration enough?
uvm_object* clone() override; | ||
void do_copy( const uvm_object& rhs ) override; | ||
bool do_compare( const uvm_object& rhs, | ||
const uvm_comparer* comparer ) const override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix indentation
VWG:
|
This PR implemts #289 for src, examples and tests