Overview

Namespaces

  • Csim
    • Controller
    • Model
    • Util
  • PHP

Classes

  • Cache
  • CacheCell
  • CacheLayout
  • Execution
  • Instruction
  • InstructionType
  • Set
  • SimulationState

Exceptions

  • InvalidInstructionException
  • Overview
  • Namespace
  • Class
  • Tree

Class CacheLayout

Holds sizes of cache parts.

Namespace: Csim\Model
Located at classes/Csim/Model/CacheLayout.php
Methods summary
public
# __construct( mixed $associativity, mixed $block_count, mixed $block_size )

Constructs a new instance with the specified associativity, block count and block size.

Constructs a new instance with the specified associativity, block count and block size.

public integer
# getIndexBits( )

Returns the number of bits needed to represent a block in a set.

Returns the number of bits needed to represent a block in a set.

Returns

integer
public integer
# getOffsetBits( )

Returns the number of bits needed to represent an index in a block..

Returns the number of bits needed to represent an index in a block..

Returns

integer
public integer
# getTagBits( )

Returns the number of bits needed to represent the address of a set.

Returns the number of bits needed to represent the address of a set.

Returns

integer
public integer
# getAssociativity( )

Returns the number of sets in the cache.

Returns the number of sets in the cache.

Returns

integer
public integer
# getBlockCount( )

Returns the number of blocks in a set.

Returns the number of blocks in a set.

Returns

integer
public integer
# getBlockSize( )

Returns the number of words in a block..

Returns the number of words in a block..

Returns

integer
public integer
# getTagBitMask( )

Returns an integer with all bits in the tag part of an address set to one and all other bits set to zero.

Returns an integer with all bits in the tag part of an address set to one and all other bits set to zero.

Returns

integer
public integer
# getIndexBitMask( )

Returns an integer with all bits in the block index part of an address set to one and all other bits set to zero.

Returns an integer with all bits in the block index part of an address set to one and all other bits set to zero.

Returns

integer
public integer
# getOffsetBitMask( )

Returns an integer with all bits in the block offset part of an address set to one and all other bits set to zero.

Returns an integer with all bits in the block offset part of an address set to one and all other bits set to zero.

Returns

integer
Constants summary
integer LOG_BASE 2
#
integer ADDRESS_SIZE 32
#
csim-jquery-nophpfw API documentation generated by ApiGen 2.8.0