Skip to content

Commit

Permalink
Merge pull request #47 from tk-ka/tlm_target_socketname
Browse files Browse the repository at this point in the history
tlm_target: added constructor argument to assign a socket name
  • Loading branch information
eyck authored Jul 24, 2023
2 parents 31bf4f8 + 639eeb6 commit baba121
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/scc/tlm_target.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ template <unsigned int BUSWIDTH = LT, unsigned int ADDR_UNIT_WIDTH = 8> class tl
* @brief the constructor
*
* @param clock the clock period of the component
* @param socket_name optional name of the internal socket
*/
tlm_target(sc_core::sc_time& clock);
tlm_target(sc_core::sc_time& clock, const char* socket_name = "socket");
//! the target socket
tlm::scc::target_mixin<tlm::scc::scv::tlm_rec_target_socket<BUSWIDTH>> socket;
/**
Expand Down Expand Up @@ -125,8 +126,8 @@ template <unsigned int BUSWIDTH = LT, unsigned int ADDR_UNIT_WIDTH = 8> struct t
} /* namespace scc */

template <unsigned int BUSWIDTH, unsigned int ADDR_UNIT_WIDTH>
inline scc::tlm_target<BUSWIDTH, ADDR_UNIT_WIDTH>::tlm_target(sc_core::sc_time& clock)
: socket("socket")
inline scc::tlm_target<BUSWIDTH, ADDR_UNIT_WIDTH>::tlm_target(sc_core::sc_time& clock, const char* socket_name)
: socket(socket_name)
, clk(clock)
, socket_map(std::make_pair(nullptr, 0)) {
socket.register_b_transport(
Expand Down

0 comments on commit baba121

Please sign in to comment.