coreblocks.func_blocks.fu.common package

Submodules

coreblocks.func_blocks.fu.common.fifo_rs module

class coreblocks.func_blocks.fu.common.fifo_rs.FifoRS

Bases: RSBase

coreblocks.func_blocks.fu.common.fu_decoder module

class coreblocks.func_blocks.fu.common.fu_decoder.Decoder

Bases: Elaboratable

Module responsible for instruction decoding.

Attributes
decode_fn: Signal
exec_fn: View
__init__(gen_params: GenParams, decode_fn: Type[IntFlag], ops: Sequence[tuple], check_optype: bool)
class coreblocks.func_blocks.fu.common.fu_decoder.DecoderManager

Bases: object

Class responsible for instruction management.

Fn: Type[IntFlag]

Enumeration of instructions implemented in given functional unit.

get_decoder(gen_params: GenParams) Decoder

Method returning auto generated instruction decoder.

Parameters
gen_params: GenParams

Generation parameters passed to a decoder contructor.

Returns
returnDecoder

Instance of Decoder class.

get_function() Value

Method returning Signal Object for decoder, called function in FU blocks

Returns
returnValue

Signal object.

get_instructions() Sequence[tuple]

Method providing list of valid instruction.

Returns
returnSequence[tuple]

List of implemented instructions, each following format: (IntFlag, OpType, Funct3 (optional), Funct7 (optional))

get_op_types() set[coreblocks.arch.optypes.OpType]

Method returning op types from listed instructions.

Returns
returnset[OpType]

List of OpTypes.

coreblocks.func_blocks.fu.common.func_base module

class coreblocks.func_blocks.fu.common.func_base.FuncUnitBase

Bases: ABC, FuncUnit, Elaboratable, Generic[_T_DecoderManager]

__init__(gen_params: GenParams, fn: _T_DecoderManager)
fn: _T_DecoderManager

coreblocks.func_blocks.fu.common.rs module

class coreblocks.func_blocks.fu.common.rs.RS

Bases: RSBase

class coreblocks.func_blocks.fu.common.rs.RSBase

Bases: Elaboratable

__init__(gen_params: GenParams, rs_entries: int, rs_number: int, rs_ways: int = 1, ready_for: Optional[Iterable[Iterable[OpType]]] = None) None

coreblocks.func_blocks.fu.common.rs_func_block module

class coreblocks.func_blocks.fu.common.rs_func_block.RSBlockComponent

Bases: BlockComponentParams

__init__(func_units: ~typing.Collection[~coreblocks.params.fu_params.FunctionalComponentParams], rs_entries: int, rs_number: int = -1, rs_type: type[coreblocks.func_blocks.fu.common.rs.RSBase] = <class 'coreblocks.func_blocks.fu.common.rs.RS'>) None
func_units: Collection[FunctionalComponentParams]
get_layouts(gen_params: GenParams) RSInterfaceLayouts
get_module(gen_params: GenParams) FuncBlock
get_optypes() set[coreblocks.arch.optypes.OpType]
get_rs_entry_count() int
rs_entries: int
rs_number: int = -1
rs_type

alias of RS

class coreblocks.func_blocks.fu.common.rs_func_block.RSFuncBlock

Bases: FuncBlock, Elaboratable

Module combining multiple functional units with single RS unit. With input interface of RS and output interface of single FU.

Attributes
insert: Method

RS insert method.

select: Method

RS select method.

update: Methods

RS update methods.

get_result: Method

Method used for getting single result out of one of the FUs. It uses layout described by FuncUnitLayouts.

__init__(gen_params: GenParams, func_units: Iterable[tuple[coreblocks.func_blocks.interface.func_protocols.FuncUnit, set[coreblocks.arch.optypes.OpType], bool]], rs_entries: int, rs_number: int, rs_type: type[coreblocks.func_blocks.fu.common.rs.RSBase])
Parameters
gen_params: GenParams

Core generation parameters.

func_units: Iterable[FuncUnit]

Functional units to be used by this module.

rs_entries: int

Number of entries in RS.

rs_number: int

The number of this RS block. Used for debugging.

rs_type: type[RSBase]

The RS type to use.

Module contents