super_blk.hh revision 13938
113938Sodanrc@yahoo.com.br/** 213938Sodanrc@yahoo.com.br * Copyright (c) 2018 Inria 313938Sodanrc@yahoo.com.br * All rights reserved. 413938Sodanrc@yahoo.com.br * 513938Sodanrc@yahoo.com.br * Redistribution and use in source and binary forms, with or without 613938Sodanrc@yahoo.com.br * modification, are permitted provided that the following conditions are 713938Sodanrc@yahoo.com.br * met: redistributions of source code must retain the above copyright 813938Sodanrc@yahoo.com.br * notice, this list of conditions and the following disclaimer; 913938Sodanrc@yahoo.com.br * redistributions in binary form must reproduce the above copyright 1013938Sodanrc@yahoo.com.br * notice, this list of conditions and the following disclaimer in the 1113938Sodanrc@yahoo.com.br * documentation and/or other materials provided with the distribution; 1213938Sodanrc@yahoo.com.br * neither the name of the copyright holders nor the names of its 1313938Sodanrc@yahoo.com.br * contributors may be used to endorse or promote products derived from 1413938Sodanrc@yahoo.com.br * this software without specific prior written permission. 1513938Sodanrc@yahoo.com.br * 1613938Sodanrc@yahoo.com.br * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1713938Sodanrc@yahoo.com.br * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1813938Sodanrc@yahoo.com.br * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1913938Sodanrc@yahoo.com.br * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2013938Sodanrc@yahoo.com.br * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2113938Sodanrc@yahoo.com.br * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2213938Sodanrc@yahoo.com.br * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2313938Sodanrc@yahoo.com.br * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2413938Sodanrc@yahoo.com.br * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2513938Sodanrc@yahoo.com.br * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2613938Sodanrc@yahoo.com.br * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2713938Sodanrc@yahoo.com.br * 2813938Sodanrc@yahoo.com.br * Authors: Daniel Carvalho 2913938Sodanrc@yahoo.com.br */ 3013938Sodanrc@yahoo.com.br 3113938Sodanrc@yahoo.com.br/** @file 3213938Sodanrc@yahoo.com.br * Definition of a simple superblock class. Each superblock consists of a 3313938Sodanrc@yahoo.com.br * number of compressed cache blocks limited by the maximum compression 3413938Sodanrc@yahoo.com.br * factor that may or may not be present in the cache. 3513938Sodanrc@yahoo.com.br */ 3613938Sodanrc@yahoo.com.br 3713938Sodanrc@yahoo.com.br#ifndef __MEM_CACHE_TAGS_SUPER_BLK_HH__ 3813938Sodanrc@yahoo.com.br#define __MEM_CACHE_TAGS_SUPER_BLK_HH__ 3913938Sodanrc@yahoo.com.br 4013938Sodanrc@yahoo.com.br#include "mem/cache/tags/sector_blk.hh" 4113938Sodanrc@yahoo.com.br 4213938Sodanrc@yahoo.com.brclass SuperBlk; 4313938Sodanrc@yahoo.com.br 4413938Sodanrc@yahoo.com.br/** 4513938Sodanrc@yahoo.com.br * A superblock is composed of sub-blocks, and each sub-block has information 4613938Sodanrc@yahoo.com.br * regarding its superblock and a pointer to its superblock tag. A superblock 4713938Sodanrc@yahoo.com.br * can be seen as a variation of a sector block, and therefore we use a sector 4813938Sodanrc@yahoo.com.br * nomenclature. 4913938Sodanrc@yahoo.com.br */ 5013938Sodanrc@yahoo.com.brclass CompressionBlk : public SectorSubBlk 5113938Sodanrc@yahoo.com.br{ 5213938Sodanrc@yahoo.com.br public: 5313938Sodanrc@yahoo.com.br CompressionBlk(); 5413938Sodanrc@yahoo.com.br CompressionBlk(const CompressionBlk&) = delete; 5513938Sodanrc@yahoo.com.br CompressionBlk& operator=(const CompressionBlk&) = delete; 5613938Sodanrc@yahoo.com.br ~CompressionBlk() {}; 5713938Sodanrc@yahoo.com.br}; 5813938Sodanrc@yahoo.com.br 5913938Sodanrc@yahoo.com.br/** 6013938Sodanrc@yahoo.com.br * A basic compression superblock. 6113938Sodanrc@yahoo.com.br * Contains the tag and a list of blocks associated to this superblock. 6213938Sodanrc@yahoo.com.br */ 6313938Sodanrc@yahoo.com.brclass SuperBlk : public SectorBlk 6413938Sodanrc@yahoo.com.br{ 6513938Sodanrc@yahoo.com.br public: 6613938Sodanrc@yahoo.com.br SuperBlk() : SectorBlk() {} 6713938Sodanrc@yahoo.com.br SuperBlk(const SuperBlk&) = delete; 6813938Sodanrc@yahoo.com.br SuperBlk& operator=(const SuperBlk&) = delete; 6913938Sodanrc@yahoo.com.br ~SuperBlk() {}; 7013938Sodanrc@yahoo.com.br}; 7113938Sodanrc@yahoo.com.br 7213938Sodanrc@yahoo.com.br#endif //__MEM_CACHE_TAGS_SUPER_BLK_HH__ 73