Question: This problem must be completed using Verilog. It is different from the other questions on Chegg. The numbers / parameters are different if you read

This problem must be completed using Verilog.
It is different from the other questions on Chegg. The numbers/parameters are different if you read closely. In addition, other answers that are posted do not work.
Here is the problem:
setAssociative.v: A digital circuit that implements the read-hit logic of a set associative cache
Your task:
Your task in this assignment part is to create a digital circuit that decides whether a read address given to a cache is a read-hit, and if it is, provides the single-byte data block as output. The cache in question is a E=2 way set-associative cache, with m=3 bit addresses, t=1 bit tags, s=1 bit set indices for S=2 sets, b=1 bit block offsets such that data blocks are two bytes to support data locality. The total capacity of the cache is S*E*B =2*2*2=8 bytes.
Input format:
The interface to the cache logic is given in setAssociative_provided.v. The address to be read from is given to the cache in read_address. The state of the cache (stored in SRAM sequential logic) is recorded in the rest of the inputs.
Output format:
The circuit has two outputs. The output "read_hit" is true if and only if the address to be read matches the tag in either line of the correct set, and that said line is valid. The output "read_byte" contains the 8-bit block data of the line if the address is a read-hit, otherwise its value is ignored.
Test cases and expected answers:
The inputs for each test case are recorded in the tests/ directory. Corresponding expected answers are recorded in the answers/ directory.
Here is setAssociative_provided.v:
input [2:0] read_address;
input set_0_line_0_valid;
input set_0_line_0_tag;
input [15:0] set_0_line_0_block;
input set_0_line_1_valid;
input set_0_line_1_tag;
input [15:0] set_0_line_1_block;
input set_1_line_0_valid;
input set_1_line_0_tag;
input [15:0] set_1_line_0_block;
input set_1_line_1_valid;
input set_1_line_1_tag;
input [15:0] set_1_line_1_block;
output read_hit;
output [7:0] read_byte;
Here is test0.txt:
1
0
1
30678
1
0
64493
0
0
55803
1
1
44430
Here is answer0.txt:
read_hit =1
read_byte =251
Here is test5.txt:
6
1
0
33990
0
1
1655
1
0
62330
1
1
56306
Here is answer5.txt:
read_hit =1
read_byte =242

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!