Skip to content

Commit

Permalink
tb: add support for SC versions greater than 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cfuguet committed Oct 27, 2024
1 parent ab4b7ea commit 7aa4c82
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 3 deletions.
2 changes: 2 additions & 0 deletions rtl/tb/hpdcache_test_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ class hpdcache_test_driver : public Driver

private:

#if SC_VERSION_MAJOR < 3
SC_HAS_PROCESS(hpdcache_test_driver);
#endif

typedef std::shared_ptr<hpdcache_test_transaction_req> transaction_ptr;

Expand Down
2 changes: 2 additions & 0 deletions rtl/tb/hpdcache_test_mem_resp_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ class hpdcache_test_mem_resp_model : public sc_module, public hpdcache_test_mem_

private:

#if SC_VERSION_MAJOR < 3
SC_HAS_PROCESS(hpdcache_test_mem_resp_model);
#endif

public:

Expand Down
2 changes: 2 additions & 0 deletions rtl/tb/hpdcache_test_scoreboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,9 @@ class hpdcache_test_scoreboard : public sc_module
sc_fifo<inflight_entry_t> inflight_amo_req_m;
bool sc_is_atomic;

#if SC_VERSION_MAJOR < 3
SC_HAS_PROCESS(hpdcache_test_scoreboard);
#endif

void perf_events_process()
{
Expand Down
2 changes: 2 additions & 0 deletions rtl/tb/sequence_lib/hpdcache_test_random_seq.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ class hpdcache_test_random_seq : public hpdcache_test_sequence
scv_smart_ptr<sc_bv<HPDCACHE_REQ_DATA_WIDTH> > size;
const unsigned int HPDCACHE_REQ_DATA_BYTES = HPDCACHE_REQ_DATA_WIDTH/8;

#if SC_VERSION_MAJOR < 3
SC_HAS_PROCESS(hpdcache_test_random_seq);
#endif

inline sc_bv<HPDCACHE_REQ_DATA_WIDTH> create_random_data()
{
Expand Down
4 changes: 3 additions & 1 deletion rtl/tb/sequence_lib/hpdcache_test_read_seq.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class hpdcache_test_read_seq : public hpdcache_test_sequence
{
public:

hpdcache_test_read_seq(sc_core::sc_module_name nm) : hpdcache_test_sequence(nm, "read_req")
hpdcache_test_read_seq(sc_core::sc_module_name nm) : hpdcache_test_sequence(nm, "read_seq")
{
SC_THREAD(run);
sensitive << clk_i.pos();
Expand All @@ -57,7 +57,9 @@ class hpdcache_test_read_seq : public hpdcache_test_sequence
scv_smart_ptr<req_data_t> size;
const unsigned int HPDCACHE_REQ_DATA_BYTES = HPDCACHE_REQ_DATA_WIDTH/8;

#if SC_VERSION_MAJOR < 3
SC_HAS_PROCESS(hpdcache_test_read_seq);
#endif

inline uint32_t create_random_size(bool is_amo)
{
Expand Down
4 changes: 3 additions & 1 deletion rtl/tb/sequence_lib/hpdcache_test_single_addr_seq.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class hpdcache_test_single_addr_seq : public hpdcache_test_sequence
public:

hpdcache_test_single_addr_seq(sc_core::sc_module_name nm)
: hpdcache_test_sequence(nm, "random_seq")
: hpdcache_test_sequence(nm, "single_addr_seq")
{
SC_THREAD(run);
sensitive << clk_i.pos();
Expand Down Expand Up @@ -102,7 +102,9 @@ class hpdcache_test_single_addr_seq : public hpdcache_test_sequence
scv_smart_ptr<sc_bv<HPDCACHE_REQ_DATA_WIDTH> > size;
const unsigned int HPDCACHE_REQ_DATA_BYTES = HPDCACHE_REQ_DATA_WIDTH/8;

#if SC_VERSION_MAJOR < 3
SC_HAS_PROCESS(hpdcache_test_single_addr_seq);
#endif

inline sc_bv<HPDCACHE_REQ_DATA_WIDTH> create_random_data()
{
Expand Down
4 changes: 3 additions & 1 deletion rtl/tb/sequence_lib/hpdcache_test_write_seq.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class hpdcache_test_write_seq : public hpdcache_test_sequence
{
public:

hpdcache_test_write_seq(sc_core::sc_module_name nm) : hpdcache_test_sequence(nm, "write_req")
hpdcache_test_write_seq(sc_core::sc_module_name nm) : hpdcache_test_sequence(nm, "write_seq")
{
SC_THREAD(run);
sensitive << clk_i.pos();
Expand All @@ -57,7 +57,9 @@ class hpdcache_test_write_seq : public hpdcache_test_sequence
scv_smart_ptr<req_data_t> size;
const unsigned int HPDCACHE_REQ_DATA_BYTES = HPDCACHE_REQ_DATA_WIDTH/8;

#if SC_VERSION_MAJOR < 3
SC_HAS_PROCESS(hpdcache_test_write_seq);
#endif

inline req_data_t create_random_data()
{
Expand Down

0 comments on commit 7aa4c82

Please sign in to comment.