本文整理匯總了Golang中app/simulator/processor/components/channel.Channel.Capacity方法的典型用法代碼示例。如果您正苦於以下問題:Golang Channel.Capacity方法的具體用法?Golang Channel.Capacity怎麽用?Golang Channel.Capacity使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app/simulator/processor/components/channel.Channel
的用法示例。
在下文中一共展示了Channel.Capacity方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Run
func (this *Dispatcher) Run(input channel.Channel, output map[info.CategoryEnum]channel.Channel, commonDataBus, recoveryBus channel.Channel) {
// Create register alias table
rat := registeraliastable.New(this.Index(), this.RegisterAliasTableEntries())
// Create re-order buffer
rob := reorderbuffer.New(this.Index(),
this.Processor(),
this.StartOperationId(),
this.ReorderBufferEntries(),
this.InstructionsWrittenPerCycle(),
rat)
commonDataBusROB := channel.New(commonDataBus.Capacity())
// Create reservation station
rs := reservationstation.New(this.Index(), this.Processor(),
this.Registers(),
this.ReservationStationEntries(),
this.InstructionsFetchedPerCycle(),
rat, rob.Bus())
commonDataBusRS := channel.New(commonDataBus.Capacity())
// Create storage bus
this.dispatcher.bus = rob.Bus()
// Launch each unit as a goroutine
logger.Print(" => Initializing dispatcher unit %d", this.Index())
// Start dispatcher of operations to be executed into reservation station
go this.runDispatcherToReservationStation(input, rs, rat, rob)
// Start common bus multiplexer to send ack to reservation station and reorder buffer
go this.runCommonBusMultiplexer(commonDataBus, commonDataBusRS, commonDataBusROB)
// Run reservation station
rs.Run(commonDataBusRS, output)
// Run re-order buffer
rob.Run(commonDataBusROB, recoveryBus)
}