base_socket_if.hh revision 13521:74fa3ac44057
16654Snate@binkert.org/*****************************************************************************
26654Snate@binkert.org
35467Snate@binkert.org  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
45467Snate@binkert.org  more contributor license agreements.  See the NOTICE file distributed
55467Snate@binkert.org  with this work for additional information regarding copyright ownership.
65467Snate@binkert.org  Accellera licenses this file to you under the Apache License, Version 2.0
75467Snate@binkert.org  (the "License"); you may not use this file except in compliance with the
85467Snate@binkert.org  License.  You may obtain a copy of the License at
95467Snate@binkert.org
105467Snate@binkert.org    http://www.apache.org/licenses/LICENSE-2.0
115467Snate@binkert.org
125467Snate@binkert.org  Unless required by applicable law or agreed to in writing, software
135467Snate@binkert.org  distributed under the License is distributed on an "AS IS" BASIS,
145467Snate@binkert.org  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
155467Snate@binkert.org  implied.  See the License for the specific language governing
165467Snate@binkert.org  permissions and limitations under the License.
175467Snate@binkert.org
185467Snate@binkert.org *****************************************************************************/
195467Snate@binkert.org
205467Snate@binkert.org#ifndef __SYSTEMC_EXT_TLM_CORE_2_SOCKETS_BASE_SOCKET_IF_H__
215467Snate@binkert.org#define __SYSTEMC_EXT_TLM_CORE_2_SOCKETS_BASE_SOCKET_IF_H__
225467Snate@binkert.org
235467Snate@binkert.org#include <systemc>
245467Snate@binkert.org
255467Snate@binkert.orgnamespace tlm
265467Snate@binkert.org{
275467Snate@binkert.org
285467Snate@binkert.orgenum tlm_socket_category
295467Snate@binkert.org{
306654Snate@binkert.org    TLM_UNKNOWN_SOCKET = 0,
316654Snate@binkert.org    TLM_INITIATOR_SOCKET = 0x1,
326654Snate@binkert.org    TLM_TARGET_SOCKET = 0x2,
336654Snate@binkert.org
346654Snate@binkert.org    TLM_MULTI_SOCKET = 0x10,
356654Snate@binkert.org
366654Snate@binkert.org    TLM_MULTI_INITIATOR_SOCKET = TLM_INITIATOR_SOCKET | TLM_MULTI_SOCKET,
377459Snate@binkert.org    TLM_MULTI_TARGET_SOCKET = TLM_TARGET_SOCKET | TLM_MULTI_SOCKET
386502Snate@binkert.org};
395467Snate@binkert.org
406500Snate@binkert.orgclass tlm_base_socket_if
416654Snate@binkert.org{
427503Snate@binkert.org  public:
435873Snate@binkert.org    virtual sc_core::sc_port_base &get_port_base() = 0;
446654Snate@binkert.org    virtual sc_core::sc_port_base const &get_port_base() const = 0;
456654Snate@binkert.org    virtual sc_core::sc_export_base &get_export_base() = 0;
466654Snate@binkert.org    virtual sc_core::sc_export_base const &get_export_base() const = 0;
476654Snate@binkert.org    virtual unsigned int get_bus_width() const = 0;
486654Snate@binkert.org    virtual sc_core::sc_type_index get_protocol_types() const = 0;
496654Snate@binkert.org    virtual tlm_socket_category get_socket_category() const = 0;
506654Snate@binkert.org
516654Snate@binkert.org  protected:
526654Snate@binkert.org    virtual ~tlm_base_socket_if() {}
536654Snate@binkert.org};
546654Snate@binkert.org
556654Snate@binkert.org} // namespace tlm
566654Snate@binkert.org
576654Snate@binkert.org#endif // __SYSTEMC_EXT_TLM_CORE_2_SOCKETS_BASE_SOCKET_IF_H__
586654Snate@binkert.org