Chapter 5. Data Modeling

5.1. Processing Element (PE) Data Model

PE Data Model characterizes the structure of PE and a memory sub-system. It consists of the following three data models: Datapath Model, Execution Model, and Memory Model.

Table 5-1. Model

NameSub-Models
ProcUnitDPModel, ExecModel, MemModel

Table 5-2. Attribute

NameDescriptionValueTypeSource
typeName for type of processing elementUser defined IdentifierStringUser define

5.1.1. Datapath Model

Datapath model has a set of functional units and pipelines. It enumerates all the pipelines and functional units available in the PE. Multiple pipelines are allowed for superscalar architectures. This model is composed of a set of pipeline models and a set of functional unit models.

Table 5-3. Model

NameSub-Models
DPModelFuncUnit, Pipeline

5.1.1.1. Functional Unit Model

This model consists of type of a functional unit and its quantity in the PE. Delay for the functional unit is specified in operation model explained later.

Table 5-4. Model

NameSub-Models
FuncUnitOperMode

Table 5-5. Attribute

NameDescriptionValueTypeSource
typeName for type of functional unitUser defined IdentifierStringUser define
quantityNumber of the functional units available in the PE≥ 1IntData sheet

5.1.1.1.1. Operation Model

Functional unit can operate in several modes. For each modes, it has different delays. For example, ALU may have addition and multiplication modes with different delays. In this model, delays for each operation modes are specified.

Table 5-6. Model

NameSub-Models
OperMode 

Table 5-7. Attribute

NameDescriptionValueTypeSource
modeName for type of modeUser defined IdentifierStringUser define
oplatDelay of functional unit for the operation mode≥ 1IntData sheet

5.1.1.2. Pipeline Model

Pipeline model consists of a name and a set of pipeline stages. It also defines branch delay model which is a statistical model that stores the branch prediction policy, cycles lost for mis-prediction and the average mis-prediction ratio. Please note that current version of ESE does not use branch prediction policy for now. This attribute will be used when ESE supports a dynamic branch prediction model.

Table 5-8. Model

NameSub-Models
PipelineStage

Table 5-9. Attribute

NameDescriptionValueTypeSource
nameIdentifier for the pipelineUser defined IdentifierStringUser define
br_pred_policyBranch prediction policyTAKEN, NOT_TAKENStringUser select
br_penaltyCycle lost for mis-predictionNumber of cyclesIntData sheet on PE
br_pred_hit_ratioHit ratio from branch prediction≥0.00, ≤100.00FPSimulation result by ISS or virtual platform

5.1.1.2.1. Pipeline Stage Model

Pipeline stage model has a set of pointers to a functional unit that is available in that pipeline stage. It consists of a set of pointers to functional unit model. Please note that we can describe non-pipelined datapath by defining only 1 stage inside of pipeline model. For this, please refer to the example of custom hardware in an Appendix B.

Table 5-10. Model

NameSub-Models
StageFURef

Table 5-11. Attribute

NameDescriptionValueTypeSource
nameIdentifier for the pipeline stageUser defined IdentifierStringUser define
5.1.1.2.1.1. Pointer to Functional Unit Model.

Pointer to functional unit model consists of type of functional unit and number of available functional units in the pipeline stage.

Table 5-12. Model

NameSub-Models
FURef 

Table 5-13. Attribute

NameDescriptionValueTypeSource
typeName for type of a functional unitType of a functional unitStringDatapath model
quantityNumber of functional units available in the pipeline stage≥1, ≤ the quantity of functional unit in Datapath modelIntDatapath model

5.1.2. Execution Model

Execution model consists of a set of operation models and scheduling policy. Each operation model maps a operation to Datapath model and the scheduling policy decides the execution order for a given stream of operations.

Table 5-14. Model

NameSub-Models
ExecModelOperation

Table 5-15. Attribute

NameDescriptionValueTypeSource
schedOperation scheduling algorithm used by the PE such as ASAP, ALAP, List scheduling etc.PIPELINE, LIST_SCHEDStringUser select

5.1.2.1. Operation Model

This model consists of the LLVM operations and their mapping to a pipelined datapath as defined in Datapath model. Please note that operation model uses LLVM operations instead of the specific set instruction sets or operations to make estimation framework re-targettable. LLVM operations can be easily mapped to the operations or instructions supported by the PE. To give an example, 'add', 'addc', 'addk' and 'addkc' instructions in the instruction set of MicroBlaze can be mapped to 'add' operation in LLVM instruction set. One LLVM operation can take care of several data types. Therefore, data type of variable for the operation should be also specified. Unless data type for the operation is not specified, no input or integer type is assumed.

The mapping of LLVM operation to a pipelined datapath consists of two steps. The first step is to map an operation to a set of pipeline stages and the second is to map available functional units to the pipeline stage. This mapping is done by two references, pipeline stage reference and functional unit reference explained later.

Table 5-16. Model

NameSub-Models
OperationStgRef

Table 5-17. Attribute

NameDescriptionValueTypeSource
nameName of LLVM instructionLLVM instructionStringA set of LLVM instruction
var_typeType of operand for LLVM instructionint, float, doubleStringUser select

5.1.2.1.1. Pipeline Stage Reference

The pipeline stage reference consists of two flags and a pointer to a pipeline stage defined in Datapath model. Two flags are 'demand operand' and 'commit result' that specify the pipeline stages where the operation needs operand and commits the result, respectively.

Table 5-18. Model

NameSub-Models
StgRefFURef

Table 5-19. Attribute

NameDescriptionValueTypeSource
namePointer to a pipeline stageName of a pipeline stageStringDatapath model
flagsSpecify 'demand operand' and 'commit result''COMMIT', 'DEMAND' 'COMMIT DEMAND'StringUser select
5.1.2.1.1.1. Functional Unit Reference

Functional unit reference is used to associate a pipeline stage with functional units used by operation in the pipeline stage. It specifies a type of functional unit along with its operation mode.

Table 5-20. Model

NameSub-Models
FURef 

Table 5-21. Attribute

NameDescriptionValueTypeSource
typePointer to a functional unitName of a functional unitStringDatapath model
modeOperation mode for a functional unitOperation modeStringDatapath model

5.1.3. Memory Model

Memory model defines cache model and external memory model. Current version of ESE can support one level cache in a memory sub-system.

Table 5-22. Model

NameSub-Models
MemModelCache, Memory

5.1.3.1. Cache Model

Current cache model is a statistical model. The model specifies cache policy and its delay for an instruction cache and a data cache. It also defines average cache hit ratio for a set of cache sizes. Please note that cache policy is not used in current version of ESE now. This attribute will be used when ESE supports a dynamic cache model.

Table 5-23. Model

NameSub-Models
CacheInstCache, DataCache

Table 5-24. Attribute

NameDescriptionValueTypeSource
policyCache policyD-Mapped, 2way-SetStringUser select
i_cache_delayDelay for an instruction cacheNumber of cyclesIntData sheet
d_cache_delayDelay for an data cacheNumber of cyclesIntData sheet

5.1.3.1.1. Instruction Cache Model

Instruction cache model defines cache hit ratio for a cache size.

Table 5-25. Model

NameSub-Models
InstCache 

Table 5-26. Attribute

NameDescriptionValueTypeSource
i_cache_sizeCache size for instruction cacheCache sizeIntData sheet
i_cache_hit_ratioCache hit ratio≥0.00, ≤1.00FPSimulation result by ISS or virtual platform

5.1.3.1.2. Data Cache Model

Data cache model defines cache hit ratio for a cache size.

Table 5-27. Model

NameSub-Models
DataCache 

Table 5-28. Attribute

NameDescriptionValueTypeSource
d_cache_sizeCache size for data cacheCache sizeIntData sheet
d_cache_hit_ratioCache hit ratio≥0.00, ≤1.00FPSimulation result by ISS or virtual platform

5.1.3.2. External Memory Model

The external memory latencies for memory read and memory write are specified here.

Table 5-29. Model

NameSub-Models
Memory 

Table 5-30. Attribute

NameDescriptionValueTypeSource
r_delayThe external memory access latency for readNumber of cyclesIntData sheet
w_delayThe external memory access latency for writeNumber of cyclesIntData sheet