UPF has command set_retention_elements . This command is used to create list of signals/register which are supposed to be retained . This list will be used in set_retention -elements command.
Now the question is if we are directly able to specify the signal/register name in set_retention -elements command , why we need to create the list using set_retention_elements command and then using it in set_retention -elements .
Answer to this question is that when any third party vendor is creating an IP for any block and developing UPF for the same . At that time he does not have the information that if this block will be shutdown when used in SOC level by end user. So what he will do is just give the list of signal/register which are important and need to be retained by the user if domain in which this block will be placed is shutdown . So this list he will provide using set_retention_elements command .
Now if end user need this block to be in switchable domain , he need to write retention strategy for the elements specified in the list created by set_retention_elements . This way end user need not to analyse the internal of the IP block. And will serve the purpose of retaining important registers as well.
Also if the end user does not know the critical registers he has to retain all registers in the IP. Which can lead to area overhead and which might not be be required as all the registers might not be critical to be retained.
Example:
RTL:
module dut (input d,clk,rst, output reg q,q1) ;
always @ (posedge clk) begin
if (!rst)
q <= 0;
else
q <= d;
end
always @ (posedge clk) begin
if (!rst)
q1 <= 0;
else
q1 <= d;
end
endmodule
UPF:
set_retention_elements ret_list -elements { q q1}
set_retention ret_1 -domain TOP -elements {ret_list}
Now the question is if we are directly able to specify the signal/register name in set_retention -elements command , why we need to create the list using set_retention_elements command and then using it in set_retention -elements .
Answer to this question is that when any third party vendor is creating an IP for any block and developing UPF for the same . At that time he does not have the information that if this block will be shutdown when used in SOC level by end user. So what he will do is just give the list of signal/register which are important and need to be retained by the user if domain in which this block will be placed is shutdown . So this list he will provide using set_retention_elements command .
Now if end user need this block to be in switchable domain , he need to write retention strategy for the elements specified in the list created by set_retention_elements . This way end user need not to analyse the internal of the IP block. And will serve the purpose of retaining important registers as well.
Also if the end user does not know the critical registers he has to retain all registers in the IP. Which can lead to area overhead and which might not be be required as all the registers might not be critical to be retained.
Example:
RTL:
module dut (input d,clk,rst, output reg q,q1) ;
always @ (posedge clk) begin
if (!rst)
q <= 0;
else
q <= d;
end
always @ (posedge clk) begin
if (!rst)
q1 <= 0;
else
q1 <= d;
end
endmodule
UPF:
set_retention_elements ret_list -elements { q q1}
set_retention ret_1 -domain TOP -elements {ret_list}
No comments:
Post a Comment