coreblocks.scheduler package

Submodules

coreblocks.scheduler.scheduler module

class coreblocks.scheduler.scheduler.Scheduler

Bases: Elaboratable

Module responsible for preparing an instruction and its insertion into RS. It supports multiple RS configurations, in which case, it will send the instruction to the first available RS which supports this kind of instructions.

In order to prepare instruction it performs following steps: - physical register allocation - register renaming - ROB entry allocation - RS selection - RS insertion

Warning

Instruction without any supporting RS will get stuck and block the scheduler pipeline.

__init__(*, get_instr: Method, get_free_reg: Method, rat_rename: Method, rob_put: Method, rf_read1: Method, rf_read2: Method, reservation_stations: Sequence[tuple[coreblocks.func_blocks.interface.func_protocols.FuncBlock, set[coreblocks.arch.optypes.OpType]]], gen_params: GenParams)
Parameters
get_instr: Method

Method providing decoded instructions to be scheduled for execution. It has layout as described by DecodeLayouts.decoded_instr.

get_free_reg: Method

Method providing the ID of a currently free physical register.

rat_rename: Method

Method used for renaming the source register in F-RAT. Uses RATLayouts.rat_rename_in and RATLayouts.rat_rename_out.

rob_put: Method

Method used for getting a free entry in ROB. Uses ROBLayouts.data_layout.

rf_read1: Method

Method used for getting value of first source register and information if it is valid. Uses RFLayouts.rf_read_out and RFLayouts.rf_read_in.

rf_read2: Method

Method used for getting value of second source register and information if it is valid. Uses RFLayouts.rf_read_out and RFLayouts.rf_read_in.

reservation_stations: Sequence[FuncBlock]

Sequence of units with RS interfaces to which instructions should be inserted.

gen_params: GenParams

Core generation parameters.

coreblocks.scheduler.wakeup_select module

class coreblocks.scheduler.wakeup_select.WakeupSelect

Bases: Elaboratable

Simple Wakeup Select unit. Works by firstly getting readiness vector from the method get_ready (it is a binary vector, where 1 on i-th position means i-th row is ready to be taken and 0 means it is not). In next step if any row is ready to be taken it calls take_row with i (position of last ready row) as an argument in order to get its value and then calls method issue with i-th row as argument. It is prepared to work with RS and functional unit interfaces.

__init__(*, gen_params: GenParams, get_ready: Method, take_row: Method, issue: Method)
Parameters
gen_paramsGenParams

Instance of GenParams with parameters describing the core.

get_readyMethod

Method which is invoked to get the vector of readiness. It uses RSLayouts.get_ready_list_out.

take_rowMethod

Method which is invoked to get a single ready row. It uses RSLayouts.take_out.

issueMethod

Method which is invoked to a push row down the pipeline. It uses FuncUnitLayouts.issue.

Module contents