クラス テンプレート sc_core::sc_port_b< IF >

#include <sc_port.h>

sc_core::sc_port_b< IF >に対する継承グラフ

Inheritance graph
[凡例]

すべてのメンバ一覧

Public 型

typedef sc_port_base base_type
typedef sc_port_b< IF > this_type

Public メソッド

void bind (IF &interface_)
void operator() (IF &interface_)
void bind (this_type &parent_)
void operator() (this_type &parent_)
int size () const
IF * operator-> ()
const IF * operator-> () const
const IF * get_interface (int iface_i) const
IF * get_interface (int iface_i)
IF * operator[] (int index_)
const IF * operator[] (int index_) const
virtual sc_interfaceget_interface ()
virtual const sc_interfaceget_interface () const

Protected メソッド

 sc_port_b (int max_size_, sc_port_policy policy=SC_ONE_OR_MORE_BOUND)
 sc_port_b (const char *name_, int max_size_, sc_port_policy policy=SC_ONE_OR_MORE_BOUND)
virtual ~sc_port_b ()
virtual int vbind (sc_interface &)
virtual int vbind (sc_port_base &)
virtual void make_sensitive (sc_thread_handle, sc_event_finder *=0) const
virtual void make_sensitive (sc_method_handle, sc_event_finder *=0) const

Private メソッド

virtual void add_interface (sc_interface *)
virtual const char * if_typename () const
virtual int interface_count ()
 sc_port_b ()
 sc_port_b (const this_type &)
this_typeoperator= (const this_type &)

Private 変数

IF * m_interface
std::vector< IF * > m_interface_vec

フレンド

class sc_sensitive
class sc_sensitive_neg
class sc_sensitive_pos


説明

template<class IF>
class sc_core::sc_port_b< IF >

sc_port.h289 行で定義されています。


型定義

template<class IF>
typedef sc_port_base sc_core::sc_port_b< IF >::base_type

template<class IF>
typedef sc_port_b<IF> sc_core::sc_port_b< IF >::this_type


コンストラクタとデストラクタ

template<class IF>
sc_core::sc_port_b< IF >::sc_port_b ( int  max_size_,
sc_port_policy  policy = SC_ONE_OR_MORE_BOUND 
) [inline, explicit, protected]

sc_port.h355 行で定義されています。

00357         : base_type( max_size_, policy ), m_interface( 0 )
00358         {}

template<class IF>
sc_core::sc_port_b< IF >::sc_port_b ( const char *  name_,
int  max_size_,
sc_port_policy  policy = SC_ONE_OR_MORE_BOUND 
) [inline, protected]

sc_port.h360 行で定義されています。

00362         : base_type( name_, max_size_, policy ), m_interface( 0 )
00363         {}

template<class IF>
virtual sc_core::sc_port_b< IF >::~sc_port_b (  )  [inline, protected, virtual]

sc_port.h368 行で定義されています。

00369         {}

template<class IF>
sc_core::sc_port_b< IF >::sc_port_b (  )  [private]

template<class IF>
sc_core::sc_port_b< IF >::sc_port_b ( const this_type  )  [private]


関数

template<class IF>
void sc_core::sc_port_b< IF >::bind ( IF &  interface_  )  [inline]

sc_port.h307 行で定義されています。

00308         { base_type::bind( interface_ ); }

template<class IF>
void sc_core::sc_port_b< IF >::operator() ( IF &  interface_  )  [inline]

sc_port.h310 行で定義されています。

00311         { base_type::bind( interface_ ); }

template<class IF>
void sc_core::sc_port_b< IF >::bind ( this_type parent_  )  [inline]

sc_core::sc_port_baseを再定義しています。

sc_core::sc_in< T >, sc_core::sc_in< bool >, sc_core::sc_in< sc_dt::sc_logic >, と sc_core::sc_in< sc_dt::sc_lv< W > >で再定義されています。

sc_port.h316 行で定義されています。

00317         { base_type::bind( parent_ ); }

template<class IF>
void sc_core::sc_port_b< IF >::operator() ( this_type parent_  )  [inline]

sc_core::sc_in< T >, sc_core::sc_in< bool >, sc_core::sc_in< sc_dt::sc_logic >, と sc_core::sc_in< sc_dt::sc_lv< W > >で再定義されています。

sc_port.h319 行で定義されています。

00320         { base_type::bind( parent_ ); }

template<class IF>
int sc_core::sc_port_b< IF >::size (  )  const [inline]

sc_port.h325 行で定義されています。

00326         { return m_interface_vec.size(); }

template<class IF>
IF * sc_core::sc_port_b< IF >::operator-> (  )  [inline]

sc_port.h486 行で定義されています。

00487 {
00488     if( m_interface == 0 ) {
00489         report_error( SC_ID_GET_IF_, "port is not bound" );
00490     }
00491     return m_interface;
00492 }

template<class IF>
const IF * sc_core::sc_port_b< IF >::operator-> (  )  const [inline]

sc_port.h497 行で定義されています。

00498 {
00499     if( m_interface == 0 ) {
00500         report_error( SC_ID_GET_IF_, "port is not bound" );
00501     }
00502     return m_interface;
00503 }

template<class IF>
const IF * sc_core::sc_port_b< IF >::get_interface ( int  iface_i  )  const [inline]

sc_port.h529 行で定義されています。

00530 {
00531     if ( index_ == 0 ) {
00532         return m_interface;
00533     }
00534     else if( index_ < 0 || index_ >= size() ) {
00535         report_error( SC_ID_GET_IF_, "index out of range" );
00536     }
00537     return m_interface_vec[index_];
00538 }

template<class IF>
IF * sc_core::sc_port_b< IF >::get_interface ( int  iface_i  )  [inline]

sc_port.h515 行で定義されています。

00516 {
00517     if ( index_ == 0 ) {
00518         return m_interface;
00519     }
00520     else if( index_ < 0 || index_ >= size() ) {
00521         report_error( SC_ID_GET_IF_, "index out of range" );
00522     }
00523     return m_interface_vec[index_];
00524 }

template<class IF>
IF* sc_core::sc_port_b< IF >::operator[] ( int  index_  )  [inline]

sc_port.h337 行で定義されています。

00338         { return get_interface( index_ ); }

template<class IF>
const IF* sc_core::sc_port_b< IF >::operator[] ( int  index_  )  const [inline]

sc_port.h339 行で定義されています。

00340         { return get_interface( index_ ); }

template<class IF>
virtual sc_interface* sc_core::sc_port_b< IF >::get_interface (  )  [inline, virtual]

sc_core::sc_port_baseを実装しています。

sc_port.h345 行で定義されています。

00346         { return m_interface; }

template<class IF>
virtual const sc_interface* sc_core::sc_port_b< IF >::get_interface (  )  const [inline, virtual]

sc_core::sc_port_baseを実装しています。

sc_port.h348 行で定義されています。

00349         { return m_interface; }

template<class IF>
int sc_core::sc_port_b< IF >::vbind ( sc_interface interface_  )  [inline, protected, virtual]

sc_core::sc_port_baseを実装しています。

sc_core::sc_in< T >, sc_core::sc_in< bool >, sc_core::sc_in< sc_dt::sc_logic >, と sc_core::sc_in< sc_dt::sc_lv< W > >で再定義されています。

sc_port.h546 行で定義されています。

00547 {
00548     IF* iface = DCAST<IF*>( &interface_ );
00549     if( iface == 0 ) {
00550         // type mismatch
00551         return 2;
00552     }
00553     base_type::bind( *iface );
00554     return 0;
00555 }

template<class IF>
int sc_core::sc_port_b< IF >::vbind ( sc_port_base parent_  )  [inline, protected, virtual]

sc_core::sc_port_baseを実装しています。

sc_core::sc_in< T >, sc_core::sc_in< bool >, sc_core::sc_in< sc_dt::sc_logic >, と sc_core::sc_in< sc_dt::sc_lv< W > >で再定義されています。

sc_port.h560 行で定義されています。

00561 {
00562     this_type* parent = DCAST<this_type*>( &parent_ );
00563     if( parent == 0 ) {
00564         // type mismatch
00565         return 2;
00566     }
00567     base_type::bind( *parent );
00568     return 0;
00569 }

template<class IF>
void sc_core::sc_port_b< IF >::make_sensitive ( sc_thread_handle  handle_p,
sc_event_finder event_finder_ = 0 
) const [inline, protected, virtual]

sc_core::sc_port_baseを再定義しています。

sc_port.h618 行で定義されています。

00620 {
00621     if ( m_bind_info == 0 )
00622     {
00623         int if_n = m_interface_vec.size();
00624         for ( int if_i = 0; if_i < if_n; if_i++ )
00625         {
00626             IF* iface_p = m_interface_vec[if_i];
00627             assert( iface_p != 0 );
00628             add_static_event( handle_p, iface_p->default_event() );
00629         }
00630     }
00631     else
00632     {
00633         sc_port_base::make_sensitive( handle_p, event_finder_ );
00634     }
00635 }

template<class IF>
void sc_core::sc_port_b< IF >::make_sensitive ( sc_method_handle  handle_p,
sc_event_finder event_finder_ = 0 
) const [inline, protected, virtual]

sc_core::sc_port_baseを再定義しています。

sc_port.h639 行で定義されています。

00641 {
00642     if ( m_bind_info == 0 )
00643     {
00644         int if_n = m_interface_vec.size();
00645         for ( int if_i = 0; if_i < if_n; if_i++ )
00646         {
00647             IF* iface_p = m_interface_vec[if_i];
00648             assert( iface_p != 0 );
00649             add_static_event( handle_p, iface_p->default_event() );
00650         }
00651     }
00652     else
00653     {
00654         sc_port_base::make_sensitive( handle_p, event_finder_ );
00655     }
00656 }

template<class IF>
void sc_core::sc_port_b< IF >::add_interface ( sc_interface interface_  )  [inline, private, virtual]

sc_core::sc_port_baseを実装しています。

sc_port.h577 行で定義されています。

00578 {
00579     IF* iface = DCAST<IF*>( interface_ );
00580     assert( iface != 0 );
00581 
00582     // make sure that the interface is not already bound:
00583 
00584     int size = m_interface_vec.size();
00585     for ( int i = 0; i < size; i++ )
00586     {
00587         if ( iface == m_interface_vec[i] )
00588         {
00589             report_error( SC_ID_BIND_IF_TO_PORT_, 
00590                 "interface already bound to port" );
00591         }
00592     }
00593 
00594     // "bind" the interface and make sure our short cut for 0 is set up.
00595 
00596     m_interface_vec.push_back( iface );
00597     m_interface = m_interface_vec[0]; 
00598 }

template<class IF>
const char * sc_core::sc_port_b< IF >::if_typename (  )  const [inline, private, virtual]

sc_core::sc_port_baseを実装しています。

sc_port.h603 行で定義されています。

00604 {
00605     return typeid( IF ).name();
00606 }

template<class IF>
int sc_core::sc_port_b< IF >::interface_count (  )  [inline, private, virtual]

sc_core::sc_port_baseを実装しています。

sc_port.h611 行で定義されています。

00612 {
00613         return m_interface_vec.size();
00614 }

template<class IF>
this_type& sc_core::sc_port_b< IF >::operator= ( const this_type  )  [private]

sc_core::sc_port_baseを再定義しています。

sc_core::sc_port< IF, N, P >, sc_core::sc_in< T >, sc_core::sc_in< bool >, sc_core::sc_in< sc_dt::sc_logic >, sc_core::sc_inout< T >, sc_core::sc_inout< T >, sc_core::sc_inout< bool >, sc_core::sc_inout< bool >, sc_core::sc_inout< sc_dt::sc_logic >, sc_core::sc_inout< sc_dt::sc_logic >, sc_core::sc_out< T >, sc_core::sc_out< T >, sc_core::sc_in_resolved, sc_core::sc_inout_resolved, sc_core::sc_inout_resolved, sc_core::sc_out_resolved, sc_core::sc_out_resolved, sc_core::sc_in_rv< W >, sc_core::sc_inout_rv< W >, sc_core::sc_out_rv< W >, sc_core::sc_port< sc_core::sc_signal_inout_if< bool >, 1, SC_ONE_OR_MORE_BOUND >, sc_core::sc_port< sc_core::sc_signal_inout_if< sc_dt::sc_logic >, 1, SC_ONE_OR_MORE_BOUND >, sc_core::sc_port< sc_core::sc_signal_in_if< bool >, 1, SC_ONE_OR_MORE_BOUND >, sc_core::sc_port< sc_core::sc_signal_in_if< sc_dt::sc_logic >, 1, SC_ONE_OR_MORE_BOUND >, sc_core::sc_port< sc_core::sc_signal_inout_if< T >, 1, SC_ONE_OR_MORE_BOUND >, sc_core::sc_port< sc_core::sc_signal_in_if< T >, 1, SC_ONE_OR_MORE_BOUND >, sc_core::sc_port< sc_core::sc_signal_in_if< sc_dt::sc_lv< W > >, 1, SC_ONE_OR_MORE_BOUND >, sc_core::sc_port< sc_core::sc_fifo_out_if< T >, 0, SC_ONE_OR_MORE_BOUND >, sc_core::sc_port< sc_core::sc_signal_inout_if< sc_dt::sc_lv< W > >, 1, SC_ONE_OR_MORE_BOUND >, sc_core::sc_port< sc_core::sc_fifo_in_if< T >, 0, SC_ONE_OR_MORE_BOUND >, sc_core::sc_in< sc_dt::sc_lv< W > >, sc_core::sc_inout< sc_dt::sc_lv< W > >, と sc_core::sc_inout< sc_dt::sc_lv< W > >で再定義されています。


フレンドと関連する関数

template<class IF>
friend class sc_sensitive [friend]

sc_core::sc_port_baseを再定義しています。

sc_port.h294 行で定義されています。

template<class IF>
friend class sc_sensitive_neg [friend]

sc_core::sc_port_baseを再定義しています。

sc_port.h295 行で定義されています。

template<class IF>
friend class sc_sensitive_pos [friend]

sc_core::sc_port_baseを再定義しています。

sc_port.h296 行で定義されています。


変数

template<class IF>
IF* sc_core::sc_port_b< IF >::m_interface [private]

sc_port.h396 行で定義されています。

template<class IF>
std::vector<IF*> sc_core::sc_port_b< IF >::m_interface_vec [private]

sc_port.h397 行で定義されています。


このクラスの説明は次のファイルから生成されました:

SystemCに対してFri Jun 6 20:11:47 2008に生成されました。  doxygen 1.5.6