hw9 cosc
hw9 cosc
Assignment 9
Points: 13
Due: November 22, 2024 (11:59 p.m.)
Note: always show the intermediate results leading to your answers for all the problems.
(1) (2 points) (1.1) Determine the clock cycles needed to execute a program containing 30
sequential instructions carried out on a system supporting a pipeline containing 5 stages, each
of which takes 1 clock cycle to carry out its corresponding task. (1.2) Determine the speedup
made by the pipeline for Problem (1.1) above.
(2) (1 point) Determine the highest memory address (in hex) that can have a lowest address of
16000016.
(3) (1 point) Determine the highest and lowest addresses (in hex) of the memory ranges defined
by the chip select shown below.
𝑎31
𝑎30
𝑎29
𝑎28
𝑎27
(4) (1 point) Using logic gates, design a chip select for the memory device ranging from
3000016 to 37FFF16 in a 1 MB memory space.
(5) (3 points) Suppose a computer using direct-mapped cache has 232 bytes of byte-addressable
main memory and a cache of 1024 lines, where each cache line contains 32 bytes. (5.1) How
many blocks of main memory are there? (5.2) What is the format of a memory address as
seen by the cache; that is, what are the sizes (in bits) of the tag, line, and offset fields? (5.3)
To which cache line will the memory address 000063FA16 map?
Page 1 of 2
(6) (3 points) Suppose a computer using fully associative cache has 2 24 bytes of byte
addressable main memory and a cache of 128 lines, where each cache line contains 64 bytes.
(6.1) How many blocks of main memory are there? (6.2) What is the format of memory
address as seen by the cache; that is, what are the sizes (in bits) of the tag and offset fields?
(6.3) To which cache line will the memory address 01D872 16 map?
(7) (2 points) Suppose a byte-addressable computer using set-associative cache has 216 bytes of
main memory and a cache of 32 lines, where each cache line contains 8 bytes. If this cache is
4-way set associative, (7.1) what is the format of memory address as seen by the cache; that
is, what are the sizes (in bits) of the tag, set, and offset fields? (7.2) To which set will the
memory address 5B3916 map?
Follow the criteria shown below to prepare and turn your assignment in to Moodle.
Page 2 of 2