Implement a Cache that meets the specifications below. Cache Specifications Parameter Value CPU Address 10 bits Cache Da
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Implement a Cache that meets the specifications below. Cache Specifications Parameter Value CPU Address 10 bits Cache Da
Inputs Input Pin Size (bits) Description CpuAddress 10 bits The address the CPU wants to read from or write to CpuRead 1 bit 1 If the CPU wants to Read and otherwise CpuWrite 1 bit 1 if the CPU wants to Write and otherwise CpuWrite Value 8 bits The value the CPU wants to Write. Will only have a meaningful value is CpuWrite = 1 LineFromMem 32 bits The contents of the block you requested to read from memory All of the inputs will only be valid during the SINGLE clock cycle that your Cache says it is Ready. This means that you will have to save your inputs if you need them beyond that first clock cycle. The only exception to this is LineFromMem. It will be valid as long as you say you want to read from memory. If you aren't reading from memory LineFromMem will be EEE... and Red (an Error). Don't worry about this. It is normal behavior. As soon as your request to read from memory it will be the value at MemAddress.
Outputs Output Pin Size (in bits) Description Ready 1 bit 1 if your Cache is ready to start a new request. If you are ready to start a new request it means you must have finished the old request. So at this point in time, your output will be checked. DidContain 1 bit 1 if your Cache contained the value the CPU asked for and 0 otherwise. Checked when Ready == 1 ByteRead 8 bits The value at the address the CPU requested to read. Checked when Ready == 1 and the last request the CPU made was a read. MemAddress 8 bits The address of the block you want to read from memory or the address of the block that you want to write Line2Memory back to MemRead 1 bit 1 if you want to read the block at MemAddress and 0 otherwise. MemWrite 1 bit 1 if you want to write Line2Mem to MemAddress and O otherwise. Line2Mem 32 bits The block you want to write to MemAddress