Git Product home page Git Product logo

memory-simulator's Introduction

Memory-Simulator

ENEE 646 midterm project. Implementation of the Cortex-A53 memory system using a virtual memory simulator with a time scale to reveal the key steps such as instruction fetch, address generation and computation, tag searches in level 1and 2 caches, TLBs, page faults, and virtual to physical address translations.

For instruction fetches, a program counter (PC) should be used. It is incremented each count or it is updated by a branch instruction. The PC should be initialized to an address of a certain point of the program. A new pair of instructions are fetched for each new address in the PC. At random points in the time scale, the next instruction location should be randomly modified with the use of a branch instruction to generate instruction misses in various levels of the memory hierarchy. The simulation is carried out as a "virtual" fetch to avoid dealing with 32-bit physical addresses.

For operand fetches, up to 4 operands, each 64-bit long, may be loaded (stored) at a time from (into) L1 data cache into (from) a 32-register, 64-bit scratchpad over a 256-bit databus. Both the timing and reference addresses of load and store instructions should be randomized. As in instruction fetches, the actual process of loading or storing data in and out of the scratchpad registers need not be simulated. Cache hits and misses and page faults due to operand fetches are calculated.

The simulator is tested using “virtual programs”. Each instruction is represented by a 40-bit triple: (opcode, oprcount/bcondition, opraddress/brnaddress).

The cache search sequence is followed by the description in Hennessy's Computer Architecture.

The LRU structure is achieved by two arrays. Here the unified TLB is used as an example. Each block is associated with one example of a structure to store the TLB tag, page number corresponding to the TLB tag, and if there’s such data stored in the unit. Another array of the whole unified TLB unit is used to store the time stamp for recognition of the last used time of each block.

memory-simulator's People

Contributors

mzd95 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.