Here you can ask questions and find or give answers to organizational, academic and other questions about studying computer science.

870 questions

988 answers

1.4k comments

439 users

0 votes

Hi,

while working on the old exams, I was confused by Cache exercise in SS2015 exam. As I understand, data in Abacus memory is addressed according to data words standard, which is 1 Word = 2 Bytes if not stated otherwise, and that the BlockOffset bits are used to index each Word (not Byte) in one Block. If that understanding is true, then shouldn't it be 5 and 6 bits for the Tag of DM and A2 respectively, since we use log2(512Byte/2Byte (per Word)) = 8 bits for memory addressing and don't need any bit for the block offset (because here 1 Block = 2 Bytes = 1 Word)? This would therefore affect all computations in other parts that used this address format. If 1 Word = 1 Byte in this case, the sample solution for part b, c, etc. would be then fitting, however shouldn't the addresses be presented in 9-bit form instead of 8-bit?

 

Is the assumption that 1 Word = 2 Bytes for Abacus wrong? When that's the case, how can one determine the size of a word? Are the BlockOffset bits to help index the words in each block or am I missing something?

Thanks in advance.

in # Mandatory Modules Bachelor by (120 points)

2 Answers

0 votes
I think you are right that this particular question from SS15 exam is a bit confusing. Usually it will be (and should be) mentioned in the question whether the memory is byte addressed (i.e., 1 word = 1 byte) or 2-byte addressed (1 word = 2 bytes) or addressed some other way. Here, this information is not provided. I think (but not sure) that more information would have been provided for this question during the exam time, but forgotten to include in the online paper.

Anyway, even if we assume for this question that 1 word = 2 bytes, the provided solution still is not clear as you rightly identified. For example, in this case, we will not have any bit in the memory address reserved for block offset, since the memory is addressed 2-byte wise (i.e., block-wise). But in the provided solution, there is 1 bit reserved for block offset. So as far as I can see, the question should have a main memory size of 256 bytes which is byte-addressable (1 word = 1 byte) for the provided solution to be correct. Or are there any simpler alternatives?

So I would suggest that you may ignore that question. To practice similar questions, you may refer to the exam from SS18 and WS17, where complete information is provided.
by (2.5k points)
0 votes
Abacus is using 16-bit data words, and is addressing a memory with such words also. Hence, each load/store refers to 2 bytes. Don't have doubts on this, unless it is stated otherwise in an exam problem. Some years ago, the version of Abacus of that time was byte-addressed like MIPS and that leads now to some confusions when looking at older exercises.

To avoid this, I have reworked that exam problem completely so that the same computations that were necessary are now to be done for the current version of Abacus. The program used now in the exam also runs in the simulator so that you can verify the given solution.

I hope this helps!
by (139k points)

Related questions

0 votes
1 answer
asked Mar 22, 2021 in * TF "Emb. Sys. and Rob." by ballatma (1.2k points)
+2 votes
1 answer
0 votes
1 answer
asked Mar 28, 2021 in # Mandatory Modules Bachelor by kremenadla (380 points)
Imprint | Privacy Policy
...