Two types of mailbox.
1) Bounded mailbox
2) Unbounded mailbox
REQUIREMENT
Bounded mailbox
It requires to transfer limited packets.
Unbounded mailbox
Used to transfer to unlimited packets.
APPLICATION
Bounded mailbox
- Fixed(2KB) number of memory size need to verify
Unbounded mailbox
- To make a generic checker/scoreboard for different size of memories
ANALOGY
Bounded mailbox is same as limited internet pack. Like limited size of data is available
in data pack.
Similarly, limited size of packets can store.
An unbounded mailbox is the same as an unlimited internet pack. Where unlimited data is available to use the internet. Similarly, an unlimited size of packets can store.
// UNBOUNDED MAILBOX EXAMPLE
program mailbox;
mailbox m1;
int i,j;
initial
begin
m1 = new; // unbounded mailbox, it can store unlimited packets
repeat(5) // multiple packets we can verify, change the vlaue from 5 to any number
begin
m1.put(i); //put packet/value in mailbox
i++;
$display("Unbounded mail box value of i = %d",i);
end
end
endprogram
To run simulation click on below link:
Link: https://www.edaplayground.com/x/6Fwp// BOUNDED MAILBOX EXAMPLE
program mailbox;
mailbox m1 = new(3); // bound the mailbox with 3, it can not store more than 3 packets
int i,j;
initial
begin
repeat(5) // limited packets we can verify, change the vlaue from 5 to any number
begin
m1.put(i); //put packet/value in mailbox
i++;
$display("Bounded with 3 value of i = %d",i); // will reach to only 3 as mailbox is bounded with 3
end
end
endprogram
To run simulation click on below link:
Link: https://www.edaplayground.com/x/znA