• 大小: 4.18MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-13
  • 语言: 其他
  • 标签: dram  dramsim2  

资源简介

针对PCM的模拟器 可以基于trace进行模拟 也可以进行全系统的模拟

资源截图

代码片段和文件信息

/*********************************************************************************
*  Copyright (c) 2010-2011 Elliott Cooper-Balis
*                             Paul Rosenfeld
*                             Bruce Jacob
*                             University of Maryland 
*                             dramninjas [at] gmail [dot] com
*  All rights reserved.
*  
*  Redistribution and use in source and binary forms with or without
*  modification are permitted provided that the following conditions are met:
*  
*     * Redistributions of source code must retain the above copyright notice
*        this list of conditions and the following disclaimer.
*  
*     * Redistributions in binary form must reproduce the above copyright notice
*        this list of conditions and the following disclaimer in the documentation
*        and/or other materials provided with the distribution.
*  
*  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS“ AND
*  ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED
*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
*  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
*  FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL
*  DAMAGES (INCLUDING BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR
*  SERVICES; LOSS OF USE DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
*  CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY
*  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
*  OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*********************************************************************************/
#include “SystemConfiguration.h“
#include “AddressMapping.h“

namespace DRAMSim
{

void addressMapping(uint64_t physicalAddress unsigned &newTransactionChan unsigned &newTransactionRank unsigned &newTransactionBank unsigned &newTransactionRow unsigned &newTransactionColumn)
{
uint64_t tempA tempB;
unsigned transactionSize = TRANSACTION_SIZE;
uint64_t transactionMask =  transactionSize - 1; //ex: (64 bit bus width) x (8 Burst Length) - 1 = 64 bytes - 1 = 63 = 0x3f mask
unsigned channelBitWidth = NUM_CHANS_LOG;
unsigned rankBitWidth = NUM_RANKS_LOG;
unsigned bankBitWidth = NUM_BANKS_LOG;
unsigned rowBitWidth = NUM_ROWS_LOG;
unsigned colBitWidth = NUM_COLS_LOG;
// this forces the alignment to the width of a single burst (64 bits = 8 bytes = 3 address bits for DDR parts)
unsigned byteOffsetWidth = BYTE_OFFSET_WIDTH;
// Since we‘re assuming that a request is for BL*BUS_WIDTH the bottom bits
// of this address *should* be all zeros if it‘s not issue a warning

if ((physicalAddress & transactionMask) != 0)
{
DEBUG(“WARNING: address 0x“< }

// each burst will contain JEDEC_DATA_BUS_BITS/8 bytes of data

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-11-08 21:20  DRAMSim2-master\
     文件          73  2014-11-08 21:20  DRAMSim2-master\.gitignore
     文件       11321  2014-11-08 21:20  DRAMSim2-master\AddressMapping.cpp
     文件        1975  2014-11-08 21:20  DRAMSim2-master\AddressMapping.h
     文件        4695  2014-11-08 21:20  DRAMSim2-master\Bank.cpp
     文件        2450  2014-11-08 21:20  DRAMSim2-master\Bank.h
     文件        2854  2014-11-08 21:20  DRAMSim2-master\BankState.cpp
     文件        2405  2014-11-08 21:20  DRAMSim2-master\BankState.h
     文件        5064  2014-11-08 21:20  DRAMSim2-master\BusPacket.cpp
     文件        2494  2014-11-08 21:20  DRAMSim2-master\BusPacket.h
     文件        6894  2014-11-08 21:20  DRAMSim2-master\CSVWriter.h
     文件        3035  2014-11-08 21:20  DRAMSim2-master\Callback.h
     文件        3244  2014-11-08 21:20  DRAMSim2-master\ClockDomain.cpp
     文件        1268  2014-11-08 21:20  DRAMSim2-master\ClockDomain.h
     文件       21161  2014-11-08 21:20  DRAMSim2-master\CommandQueue.cpp
     文件        3186  2014-11-08 21:20  DRAMSim2-master\CommandQueue.h
     文件        3005  2014-11-08 21:20  DRAMSim2-master\DRAMSim.h
     文件       17551  2014-11-08 21:20  DRAMSim2-master\IniReader.cpp
     文件        3524  2014-11-08 21:20  DRAMSim2-master\IniReader.h
     文件        1478  2014-11-08 21:20  DRAMSim2-master\Makefile
     文件       31246  2014-11-08 21:20  DRAMSim2-master\MemoryController.cpp
     文件        4188  2014-11-08 21:20  DRAMSim2-master\MemoryController.h
     文件        8391  2014-11-08 21:20  DRAMSim2-master\MemorySystem.cpp
     文件        3071  2014-11-08 21:20  DRAMSim2-master\MemorySystem.h
     文件       15250  2014-11-08 21:20  DRAMSim2-master\MultiChannelMemorySystem.cpp
     文件        3632  2014-11-08 21:20  DRAMSim2-master\MultiChannelMemorySystem.h
     文件         349  2014-11-08 21:20  DRAMSim2-master\PrintMacros.cpp
     文件        2593  2014-11-08 21:20  DRAMSim2-master\PrintMacros.h
     文件        6699  2014-11-08 21:20  DRAMSim2-master\README
     文件      175801  2014-11-08 21:20  DRAMSim2-master\README.pdf
     文件       14803  2014-11-08 21:20  DRAMSim2-master\README.tex
............此处省略37个文件信息

评论

共有 条评论