goglsound.blogg.se

Direct mapped cache tutorial
Direct mapped cache tutorial









direct mapped cache tutorial

Hit ratio varying with number of words per line plot Plots: hit ratio varying with number of instructions plot (words per line of cache fixed as 16) output.txt file, containing details about cache hit/miss is generated in the working directory.png files, namely hit_ratio_ni and hit_ratio_wp, saved in the directory

direct mapped cache tutorial

DIRECT MAPPED CACHE TUTORIAL HOW TO

Sample screenshot of how to output file would look, can be seen below Tells us whether each instruction is a miss or hit and what and where the data is read/stored, i.e. cache.py:Ĭache list is used to find whether the memory instruction is a hit or a missĬache_data list contains data stored in cacheĪfter reading all instructions from input trace files gives an output file output.txt. memory.dat:Ĭontains 10 6 random entries between 0 and 255. Hence, we whenever we want to access memory beyond 10 6, we are doing %10 6. In mem_gen.py, we are implementing a main memory file with 1000000 entries (since creating a file with 2 36 entries will become too big 11.64 GB to be exact). To observe and study the change in hit ratio for differing conditions such as number of words per line, number of lines, number of instructions. Implementaion of direct mapped cache with 256 lines and varying words per line (1->16) using python, where each word is of 32 bits size. Direct-Mapped-cache-python-implementation About project:











Direct mapped cache tutorial