cache-simulator | A processor cache simulator for the MIPS architecture
kandi X-RAY | cache-simulator Summary
kandi X-RAY | cache-simulator Summary
This program simulates a processor cache for the MIPS instruction set architecture. It can simulate all three fundamental caching schemes: direct-mapped, n-way set associative, and fully associative. The program must be run from the command line and requires Python 3.4+ to run. Executing the program will run the simulation and print an ASCII table containing the details for each supplied word address, as well as the final contents of the cache. For example, the following command simulates a 3-way set associative LRU cache, with 2 words per block. To see all examples and their respective outputs, see examples.txt.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Runs the simulation
- Display the address references
- Prints the given cache
- Read references
- Checks if the given address is hit
- Replace a block in the cache
- Replaces the entry with the given replacement policy
- Mark the address as last seen
- Return a cache entry
- Given a list of word addresses return a list of Reference objects
- Returns a list of all consecutive consecutive words
- Parse command line arguments
- Returns the long description
cache-simulator Key Features
cache-simulator Examples and Code Snippets
# 3-way set associative (LRU; 2 words per block)
cache-simulator --cache-size 24 --num-blocks-per-set 3 --num-words-per-block 2 --word-addrs 3 180 43 2 191 88 190 14 181 44 186 253
WordAddr BinAddr Tag Index Offset
Community Discussions
Trending Discussions on cache-simulator
QUESTION
I'm trying to use Intel Pin for investigating memory activity of an executable. And I tried to use IARG_MEMORYREAD_SIZE
parameter. Here is the source code.
ANSWER
Answered 2019-May-07 at 22:49This might fall under the case where you need to use IARG_MULTI_MEMORYACCESS_EA
(see the documentation).
Basically, according to the XSAVE documentation the number of bytes written to the memory pointed by the instruction is not constant and depends on the following factors:
- The requested-feature bitmap (RFBM)
- The logical-AND of EDX:EAX
- The logical-OR of XCR0 with the IA32_XSS MSR
You can check if you can use IARG_MEMORYREAD_SIZE
(constant memory sized instruction) or not with INS_hasKnownMemorySize
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install cache-simulator
You can use cache-simulator like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page