HardwareDevices / BusInterface
Block Name: BusInterface

Code File Location: VisualSim/actor/lib/bus/Linear_Port

Table of Content

Description

Connections

Demonstration Examples

Delay Calculations

Required Fields

Parameters

Port

Description

The BusInterface block is used to connect the devices to the BusArbiter.  The block has a queue for each port. The incoming transactions are queued and the head of the queue is sent to the Controller Queue.  When the transaction has been sent out, the current head of the Queue is sent to the arbiter.  The two ports of this block are completely independent.  Both ports can be attached to a Master or Slave devices.  Both the input and output connections for each device must be attached.  Otherwise the Routing Table will not be updated.  The connection information of the device to the port and the communication between the devices and the rest of the topology is maintained in the Architecture_Setup block. The port queue is a priority queue and will reorder based on the priority of the incoming transaction.  The priority is maintained in the A_Priority field.  The Length of the queue are defined by the parameter called FIFO_Length.  When the Queue is full, a exception is triggered and the simulation is terminated.  No statistics are generated for this Queue.  The flow of the Data Structure is from Input Port -> Controller -> Output Port.

Linear_Port

Connections

The BusInterface block is used in conjunction with the BusArbiter. In all cases, the block is used to connect devices to the Shared Bus topology. The blocks are linked serially with the Controller being at the top. All the BusInterface are connected in serial order. Refer to the demonstration examples for Read and Write.  

Connections between Controller and Port

The devices connected to the BusInterface can be a Processor, DMA, Memory Controller, Cache, DRAM, and custom device. To connect the custom device, use the Hardware->Core_Architecture->DeviceInterface block at the BusInterface interface.  To use the DeviceInterface block with the left port, make sure to select block->Right-click->Appearance->Flip Ports Horizontally for the DeviceInterface block.

Connecting Devices to the Bus

Demonstration Examples

To illustrate the usage, look at the following Examples in the BDE.

Delay Calculations

Write Delay: The delays in this block are the queuing at the BusInterface, one address/control cycle and the transfer of the data.  The data transfer time is the A_Bytes/Bus_Speed.  If there is a acknowledgement, then the delay is simply one cycle across the bus.

Read Delay:The delay in this block are the queuing at the BusInterface, followed by one address/control cycle.  When the data returns from the Destination/Slave device, there is one address/control cycle, followed by the data transfer.  The data transfer time is the A_Bytes/Bus_Speed.

Required Fields

The following fields are required by the Linear Bus, including AHB bus mode.  If any of these fields are missing in the data structure, an exception will be reported.  

The standard Processor_DS data structure also contains these fields:

A_Source, A_Hop, A_Destination, A_Bytes, A_Bytes_Remaining, A_Bytes_Sent, A_Command, A_Task_Flag, A_Status, A_Prefetch and A_Interrupt.

Parameter Explanation Type  Example 
Architecture_Name This is the name of the ArchitectureSetup block that this BusInterface is associated. The ArchitectureSetup block maintains the routing table and statistics collection. String "Architecture_1"
Bus_Name This is an unique name of the Controller block that this Port is connected too. The Controller can be Linear, IO or Memory Controller. All the Linear_Ports that are conencted in Serial to this Port and the associated Controller will have the same name. String "Bus_1"
Port_Name_1 This is the name of the port on the Left (West) side. The name is used in the Routing Table (ArchitectureSetup) and matching address for routing when using the address mode in the IO and Memory Controller. If the Address Mode on those controllers is set to Address, then the Address field will contain a Port_Name to send the Data Structure too. The Port Name must be unique for the model. It is best to associate the Architecture_Name + Controller Name + Port Name as the Port Name. String

"Port_Name_1"
Port_Name_2 This is the name of the port on the Left (West) side. The name is used in the Routing Table (Architecture_Setup) and matching address for routing when using the address mode in the IO and Memory Controller. If the Address Mode on those controllers is set to Address, then the Address field will contain a Port_Name to send the Data Structure too. The Port Name must be unique for the model. It is best to associate the Architecture_Name + Controller Name + Port Name as the Port Name. String "Port_Name_2"
FIFO_Buffers This is the length of the Queue. This is a priority-based Queue. Integer
8


Port Explanation
input1 This port is connected to the device on the Left (West) and receives Data Structures from the device.
output1 This port is connected to the device on the Left (West) and sends Data Structures to the device.
input2 This port is connected to the device on the Right (East) and receives Data Structures from the device.
output2 This port is connected to the device on the Right (East) and sends Data Structures to the device.
child_in This port is connected to the child_out of another Linear_Port.
child_out This is connected to the child_in of another Linear_Port or to the Controller.