0 votes 0 votes CO and Architecture co-and-architecture cache-memory + – saxena0612 asked Nov 23, 2017 saxena0612 762 views answer comment Share Follow See all 12 Comments See all 12 12 Comments reply joshi_nitish commented Nov 23, 2017 reply Follow Share cache address will look like this, 14 8 8 now, extra bits except tag = 2+1 =3 total tag+extra bits per line = 14+3=17 total size of tag directory = (no. of lines * 17) bits =28*8*17 = 34816 bits = 34Kb 2 votes 2 votes akash.dinkar12 commented Nov 23, 2017 reply Follow Share Block size = 256 Bytes, so we require 8 bits for block offset Number of lines in cache = 219/28 = 211 Number of sets in cache = 211/23 = 28 hence the number of tag bits = 30 -(8+8) = 14 tag directory size = (tagbits+valid bits+one modified bit) * number of lines in cache = (14+2+1) * 211 = 17 *2 Kbits = 34 Kbits.. 2 votes 2 votes saxena0612 commented Nov 23, 2017 reply Follow Share Thanks got it ! @akash ,@nitish 2 votes 2 votes abhishek tiwary commented Nov 23, 2017 reply Follow Share tag directry size =no of lines *tag bit=256*17=4352*8=34816 bits 0 votes 0 votes Anu007 commented Nov 23, 2017 reply Follow Share That is for direct mapped. 0 votes 0 votes joshi_nitish commented Nov 23, 2017 reply Follow Share @Anu007 sir, tag bits are always for each line, whether it is direct or set associative cache. 0 votes 0 votes saxena0612 commented Nov 23, 2017 reply Follow Share @joshi : So where is the diiference i know the structure means harware wise: We need 1 comparator in case of direct do we need X comparator in case of set associative where X is way. Any link will be helpful i read hamacher but didn`t got this hardware difference. 0 votes 0 votes Anu007 commented Nov 23, 2017 reply Follow Share Nitish yes agree but his formula is for direct: no of lines *tag bit for associative : set *no of lines in cache *tag bit to differentiate i said 0 votes 0 votes saxena0612 commented Nov 23, 2017 reply Follow Share Anu sir, It should be: No of sets * No of lines/set *T agBit used? 0 votes 0 votes Anu007 commented Nov 23, 2017 reply Follow Share No of sets * No of lines/set = number of lines right ? nitish want to say in this form both are same. 1 votes 1 votes Ashwin Kulkarni commented Nov 23, 2017 reply Follow Share Always tag directory size is number of lines * tag bits (Whether it is direct mapped or associative or set associative) Here it is 8 way set associative Hence, Number of lines = Size of cache/Block size = 219/28 = 211 number of sets = 211/8 = 28 hence PAS = 30 = tag bits + set number + block number 14 8 8 Total tag bits = 14+2+1 =17 tag directory size = no of lines * tag bits = 211 * 17 = 34816 = 34KB 0 votes 0 votes Shubhanshu commented Nov 23, 2017 reply Follow Share Don't worry! Both formulas are same:- In direct Mapping it is = No of lines * Tag bits In set associative it is = No of sets * No of Lines per set * Tag bits Now if you see Bolded part of set associative it is nothing but No of lines (Bolded part) in Direct mapping formula. So, both are basically same. 0 votes 0 votes Please log in or register to add a comment.