[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Packets are defined as information between units. Synchronized units and asynchronized units transfers packets each other through ports.
All packets are implemented as a derived class of packet
class.
5.1 packet class 5.2 bus_packet_base class 5.3 bus_packet class 5.4 network_packet_base class 5.5 network_packet class
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
packet
class is a base class of all other classes represent
packets. All information transferred between hardware units is
treated as packets. Information on the bus and packets in the router
are implemented with derived class of packet
class.
packet
class is an abstract class, and root_object
is
its base class. Derived class must give definition of all pure
virtual functions in root_object
class.
packet
class defines the following member functions:
packet* new_packet(void) const
new_object
of root_object
.
packet* clone_object(void) const
new_object
of root_object
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
bus_packet_base
class represents an abstract packet which
represents memory access on the bus. Block transfer and split
transaction are supported. This class is a class template with two
type parameters: the first specifies address type and the second does
data type.
This packet does not include any state other than address and data, and only support state query functions as pure virtual functions and pre-defined virtual functions. For transferring packets, derived class with state must be used. Although the derived class is implemented by defining pure virtual functions, other virtual functions should be re-defined for reducing the cost for function call.
A packet is classified into the following five categories:
Member functions are shown as follows:
address_type address(void) const
data_type data(void) const
size_t total_packet_count(void) const
size_t packet_number(void) const
bool is_single(void) const
bool is_multi(void) const
void set_single(void)
void set_multi(size_t)
void set_multi(size_t, size_t)
virtual bool is_read(void) const = 0
read
.
virtual bool is_write(void) const = 0
write
.
virtual bool is_request(void) const = 0
request
.
virtual bool is_grant(void) const = 0
grant
.
virtual bool is_ack(void) const = 0
ack
.
virtual bool is_nack(void) const = 0
nack
.
virtual bool is_data(void) const = 0
data
.
virtual void set_read(void) = 0
read
.
virtual void set_write(void) = 0
write
.
virtual void set_request(void) = 0
request
.
virtual void set_grant(void) = 0
grant
.
virtual void set_ack(void) = 0
ack
.
virtual void set_nack(void) = 0
nack
.
virtual void set_data(void) = 0
data
.
virtual bool is_read_request(void) const
read_request
.
virtual bool is_read_grant(void) const
read_grant
.
virtual bool is_read_ack(void) const
read_ack
.
virtual bool is_read_nack(void) const
read_nack
.
virtual bool is_read_data(void) const
read_data
.
virtual bool is_write_request(void) const
write_request
.
virtual bool is_write_grant(void) const
write_grant
.
virtual bool is_write_ack(void) const
write_ack
.
virtual bool is_write_nack(void) const
write_nack
.
virtual bool is_write_data(void) const
write_data
.
virtual bool is_single_read_request(void) const
read_request
.
virtual bool is_single_read_grant(void) const
read_grant
.
virtual bool is_single_read_ack(void) const
read_ack
.
virtual bool is_single_read_nack(void) const
read_nack
.
virtual bool is_single_read_data(void) const
read_data
.
virtual bool is_single_write_request(void) const
write_request
.
virtual bool is_single_write_grant(void) const
write_grant
.
virtual bool is_single_write_ack(void) const
write_ack
.
virtual bool is_single_write_nack(void) const
write_nack
.
virtual bool is_single_write_data(void) const
write_data
.
virtual bool is_multi_read_request(void) const
read_request
.
virtual bool is_multi_read_grant(void) const
read_grant
.
virtual bool is_multi_read_ack(void) const
read_ack
.
virtual bool is_multi_read_nack(void) const
read_nack
.
virtual bool is_multi_read_data(void) const
read_data
.
virtual bool is_multi_write_request(void) const
write_request
.
virtual bool is_multi_write_grant(void) const
write_grant
.
virtual bool is_multi_write_ack(void) const
write_ack
.
virtual bool is_multi_write_nack(void) const
write_nack
.
virtual bool is_multi_write_data(void) const
write_data
.
virtual void set_read_request(void)
read_request
.
virtual void set_read_grant(void)
read_grant
.
virtual void set_read_ack(void)
read_ack
.
virtual void set_read_nack(void)
read_nack
.
virtual void set_read_data(void)
read_data
.
virtual void set_write_request(void)
write_request
.
virtual void set_write_grant(void)
write_grant
.
virtual void set_write_ack(void)
write_ack
.
virtual void set_write_nack(void)
write_nack
.
virtual void set_write_data(void)
write_data
.
virtual void set_single_read_request(address_type)
read_request
with specified address.
virtual void set_single_read_grant(void)
read_ack
.
virtual void set_single_read_grant(void)
read_ack
.
virtual void set_single_read_nack(void)
read_nack
.
virtual void set_single_read_data(data_type)
read_data
with specified data.
virtual void set_single_write_request(data_type)
write_request
with specified address.
virtual void set_single_write_grant(void)
write_grant
.
virtual void set_single_write_ack(void)
write_ack
.
virtual void set_single_write_nack(void)
write_nack
.
virtual void set_single_write_data(data_type)
write_data
with specified data.
virtual void set_multi_read_request(address_type, size_t)
read_request
with address specified
with the first parameter and size specified with the second parameter.
virtual void set_multi_read_grant(void)
read_grant
.
virtual void set_multi_read_ack(void)
read_ack
.
virtual void set_multi_read_nack(void)
read_nack
.
virtual void set_multi_read_data(data_type, size_t, size_t)
read_data
with data specified with
the first parameter, size specified with the second parameter and
packet index number specified with the third parameter.
virtual void set_multi_write_request(address_type, size_t)
write_request
with address
specified with the first parameter and size specified with the second
parameter.
virtual void set_multi_write_grant(void)
write_grant
.
virtual void set_multi_write_ack(void)
write_ack
.
virtual void set_multi_write_nack(void)
write_nack
.
virtual void set_multi_write_data(data_type, size_t, size_t)
write_data
with data specified with
the first parameter, size specified with the second parameter and
packet index number specified with the third parameter.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
bus_packet
is a instance of a packet which represents memory
access on a bus. It is a derived class of bus_packet_base
, and
only instantiates functions in bus_packet_base
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
network_packet_base
class represents a packet on an
interconnection network. It is a class template whose parameter is
network address type.
A packet holds at least a send node address. For unicast, a destination address is stored, and multiple destinations are stored for multicast. For broadcast, destination node address is not stored. Packet size and generation time are stored. Data is not included.
void set_unicast(void)
void set_multicast(void)
void set_broadcast(void)
void set_source(address_type)
void set_destination(address_type)
void set_multicast_destination_number(size_t)
void set_multicast_destination(size_t, address_type)
void set_length(size_t)
void set_timestamp(timestamp_type)
bool is_unicast(void) const
bool is_multicast(void) const
bool is_broadcast(void) const
address_type source(void) const
address_type destination(void) const
address_type multicast_destination(size_t) const
size_t length(void) const
timestamp_type set_timestamp(void) const
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
network_packet
class is a derived class of
network_packet_base
class with data.
void set_data_size(size_type)
void set_data(size_type, data_type)
size_type data_size(void) const
data_type data(size_type) const
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |