Notes on Computer Project #7
----------------------------
Comments about the assignment and responses to frequently asked questions will
be added to this file as necessary.
***** items added on 03/11/19 *****
1. As stated on the assignment handout, you are required to create a makefile
which controls the translation of your program, and the name of your executable
file must be "proj07".
2. Your program will create a data structure representing the simulated RAM and
set all of the entries to zero at the start of the simulation. Your program
will then read from the file specified by the "-ram" option and initialize a
subset of the simulated RAM.
3. Your program will create a data structure representing the simulated data
cache and initialize the entries to the appropriate values.
4. To simply some aspects of error handling, you can make the following
assumptions:
a) If the file specified by the "-ram" option (containing the initial contents
of a subset of RAM) can be opened, then you can assume that the contents of
that file have the correct format. For example:
12a0
9d e3 bf a0 31 00 00 86 b0 16 21 d4 e0 06 00 00
33 00 00 86 b2 16 61 d8 e2 06 40 00 35 00 00 86
b4 16 a1 dc e4 06 80 00 37 00 00 86 b6 16 e1 e0
e6 06 c0 00 ae 5c 20 05 ae 25 c0 11 ac 04 80 13
aa 5d c0 16 a8 7d 60 02 39 00 00 86 b8 17 21 e4
e8 27 00 00 11 00 00 42 90 12 22 ec 13 00 00 43
92 12 61 6c 40 00 00 0c 01 00 00 00 11 00 00 86
90 12 21 d4 13 00 00 86 92 12 61 e8 40 00 00 06
01 00 00 00 40 00 00 71 01 00 00 00 81 c7 e0 08
81 e8 00 00 9d e3 be 90 c1 3f bf 00 c5 3f bf 08
c9 3f bf 10 cd 3f bf 18 d1 3f bf 20 d5 3f bf 28
d9 3f bf 30 dd 3f bf 38 e1 3f bf 40 e5 3f bf 48
An example is posted as "project07.sample.ram" in the "Projects" directory.
b) If the file specified by the "-refs" option (containing the sequence of
memory references) can be opened, then you can assume that the contents of that
file have the correct format. For example:
12b4 R
12dc W 12 34 56 78
12a8 R
12ac R
An example is posted as "project07.sample.refs" in the "Projects" directory.
5. You may use masking and shifting to decompose the 16-bit logical addresses.
The example program in the following file demonstrates three methods for
extracting bit fields:
/user/cse410/Projects/project07.unpack.c
版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。