Coder Social home page Coder Social logo

cache-simulator's People

Contributors

c1field avatar caffeineinfused avatar tmsimont avatar

Watchers

 avatar  avatar  avatar

cache-simulator's Issues

Address index, tag and offset

The Address class looks like it has the index, tag and offset properties on it

This was a mistake I made in the UML.

The Cache needs to tell you what the index, tag and offset of an address are, because L1 and L2 will have different values for these properties for the same address. So, the address itself can't know what it's tag, offset or index is because these properties are specific to each cache.

For example, if L1 is 2-way associative, it only needs 1 bit for index.

If L2 is 4-way associative in the same architecture, then it will have to use 2 bits of the address to index the set.

This would bean that the tag size is different for the two caches is the same architecture.

So I think we need

std::bitset Cache::getTag(Address a);

for each of these three properties

Sorry to generate confusion with the bad UML

multi-cache hierarchy not working correctly

In a direct mapped configuration with L2 size >> L1 size, the L2 cache is never generating hits on an L1 miss, so the advantage of two level cache is not realized. Likely this is an issue with fundamental cache writing/reading code AND/OR an error in the way cache hierarchy is written on misses

address() class use causes memory leak

creating new instances of the address class for passing around addresses causes memory leaks due to used, no-longer-referenced, and not deleted address instances

address class should likely be converted to a static class with static method for convenient address calculations given cache parameters, with no actual instances of address class

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.