In reply to Pooja Pathak:
How I understand it as covering all rd_size is important and that must be done for unique addr - covering all client is also important.
So, covering all address space is not important.
We need to try to reduce it.
Suppose,
We need to do a cross of client_id x rd_size x unique_addr_valid_count
Instead of
client_id x rd_size x addr
so, our task is to map unique_add_valid_count to addr[8:0] to reduce the space of cross.
We can try following :
logic bit [8:0]unique_add_arr[2] ;
logic bit unique_add_valid[2] ;
logic bit [2:0] unique_addr_valid_count ;
always @(posedge clk) begin
int is_unique[$] ;
case(rd_en)
2'b01 : begin
is_unique = unique_add_arr.find(x) with (x == addr);
if (is_unique.size == 0) begin
unique_add_arr[0] = addr ;
unique_add_valid[0] = 1
end
end // rd_en = 1
2'b10 : begin
is_unique = unique_add_arr find (x) with (x == addr);
if (is_unique.size == 0) begin
unique_add_arr[1] = addr ;
unique_add_valid[1] = 1
end
end // rd_en = 2
2'b11 : begin
is_unique = unique_add_arr find (x) with (x == addr);
if (is_unique.size == 0) begin
unique_add_arr[2] = addr ;
unique_add_valid[2] = 1
end
end // rd_en = 3
endcase
end // always
unique_addr_valid_count = $countonce(unique_add_valid);
Instead of having a cross :
client_id x rd_size x addr [0-2^8-1]
we will have :
client_id x rd_size x unique_addr_valid_count [1-3]
Now your bins reduces drastically. Here I only see if a client issue a read_of_different_size then see if the address is unique... that is bare minimum to check.
Above code try not to cover all address range but to just store address if it is unique wrt rd_en.
Note : Just try to cover the intention of what should be done... there are many corner things that you can find as an issue for now. But, getting intention of mapping input to some other variable of reduce space is important.