pub fn allocate_new_line(&self, _index: u64, policy: PlacementPolicy) -> u8 {
		match policy {
			PlacementPolicy::Random => random::<u8>() % (L1_SET_ASSOCIATIVE_WAY as u8),
			PlacementPolicy::LRU => {
				// @TODO: LRU
				0
			}
			PlacementPolicy::FIFO => {
				// @TODO: FIFO
				0
			}
		}
	}
/// Placement policy
/// supporting Random, LRU and FIFO
///
/// # Arguments
/// * `index`: index of cache set
Placement policy
supporting Random, LRU and FIFO
Placement policy supporting Random LRU and FIFO
pub fn allocate_new_line(&self, _index: u64, policy: PlacementPolicy) -> u8 {
		match policy {
			PlacementPolicy::Random => random::<u8>() % (L1_SET_ASSOCIATIVE_WAY as u8),
			PlacementPolicy::LRU => {
				// @TODO: LRU
				0
			}
			PlacementPolicy::FIFO => {
				// @TODO: FIFO
				0
			}
		}
	}
pub fn allocate_new_line ( & self , _index : u64 , policy : PlacementPolicy ) -> u8 { match policy { PlacementPolicy :: Random => random :: < u8 > ( ) % ( L1_SET_ASSOCIATIVE_WAY as u8 ) , PlacementPolicy :: LRU => { // @TODO: LRU 0 } PlacementPolicy :: FIFO => { // @TODO: FIFO 0 } } }
Placement policy
supporting Random, LRU and FIFO
Placement policy supporting Random LRU and FIFO
&self
_index
u64
policy
PlacementPolicy