原创 [IC Design]Resets--关于数字IC的复位设计(2)

2011-2-17 22:55 4438 32 34 分类: 消费电子

3 Asynchronous reset problem

In discussing this paper topic with a colleague, the engineer stated first that since all he was working on was FPGAs, they do not have the same reset problems that ASICs have (a misconception). He went on to say that he always had an asynchronous system reset that could override everything, to put the chip into a known state. The engineer was then asked what would happen to the FPGA or ASIC if the release of the reset occurred on or near a clock edge such that the flip-flops went metastable.

Too many engineers just apply an asynchronous reset thinking that there are no problems. They test the reset in the controlled simulation environment and everything works fine, but then in the system, the design fails intermittently. The designers do not consider the idea that the release of the reset in the system (non-controlled environment) could cause the chip to go into a metastable unknown state, thus avoiding the reset all together. Attention must be paid to the release of the reset so as to prevent the chip from going into a metastable unknown state when reset is released. When a synchronous reset is being used, then both the leading and trailing edges of the reset must be away from the active edge of the clock.

As shown in Figure 5, an asynchronous reset signal will be de-asserted asynchronous to the clock signal. There are two potential problems with this scenario: (1) violation of reset recovery time and, (2) reset removal happening in different clock cycles for different sequential elements.

figure 5 - asynchronous reset removal recovery time problem.jpg

 

Figure 5 - Asynchronous reset removal recovery time problem

3.1 Reset recovery time

Reset recovery time refers to the time between when reset is de-asserted and the time that the clock signal goes high again. The Verilog-2001 Standard [17] has three built-in commands to model and test recovery time and signal removal timing checks: $recovery, $removal and $recrem (the latter is a combination of recovery and removal timing checks).

Recovery time is also referred to as a tsu setup time of the form, PRE or CLR inactive setup time before CLK↑”[1].

Missing a recovery time can cause signal integrity or meta-stability problems with the registered data outputs.

3.2 Reset removal traversing different clock cycles

When reset removal is asynchronous to the rising clock edge, slight differences in propagation delays in either or both the reset signal and the clock signal can cause some registers or flip-flops to exit the reset state before others.

4.0 Reset synchronizer

Guideline: EVERY ASIC USING AN ASYNCHRONOUS RESET SHOULD INCLUDE A RESET

SYNCHRONIZER CIRCUIT!!

Without a reset synchronizer, the usefulness of the asynchronous reset in the final system is void even if the reset works during simulation.

The reset synchronizer logic of Figure 6 is designed to take advantage of the best of both asynchronous and synchronous reset styles.

figure 6 - reset synchronizer block diagram.jpg

 

Figure 6 - Reset Synchronizer block diagram

An external reset signal asynchronously resets a pair of master reset flip-flops, which in turn drive the master reset signal asynchronously through the reset buffer tree to the rest of the flip-flops in the design. The entire design will be asynchronously reset.

Reset removal is accomplished by de-asserting the reset signal, which then permits the d-input of the first master reset flip-flop (which is tied high) to be clocked through a reset synchronizer. It typically takes two rising clock edges after reset removal to synchronize removal of the master reset.

Two flip-flops are required to synchronize the reset signal to the clock pulse where the second flip-flop is used to remove any meta-stability that might be caused by the reset signal being removed asynchronously and too close to the rising clock edge. As discussed in section before, these synchronization flip-flops must be kept off of the scan chain.

figure 7 - predictable reset removal to satisfy reset recovery time.jpg

Figure 7 - Predictable reset removal to satisfy reset recovery time

 

A closer examination of the timing now shows that reset distribution timing is the sum of the a clk-to-q propagation delay, total delay through the reset distribution tree and meeting the reset recovery time of the destination registers and flip-flops, as shown in Figure 7.

The code for the reset synchronizer circuit is shown in Example 8.

module async_resetFFstyle2 (rst_n, clk, asyncrst_n);

  output rst_n;

  input  clk, asyncrst_n;

  reg    rst_n, rff1;

  always @(posedge clk or negedge asyncrst_n)

    if (!asyncrst_n) {rst_n,rff1} <= 2'b0;

    else             {rst_n,rff1} <= {rff1,1'b1};

endmodule

Example 8a - Properly coded reset synchronizer using Verilog

5 Multi-clock reset issues

For a multi-clock design, a separate asynchronous reset synchronizer circuit and reset distribution tree should be used for each clock domain. This is done to insure that reset signals can indeed be guaranteed to meet the reset recovery time for each register in each clock domain.

As discussed earlier, asynchronous reset assertion is not a problem. The problem is graceful removal of reset and synchronized startup of all logic after reset is removed.

Depending on the constraints of the design, there are two techniques that could be employed: (1) non-coordinated reset removal, and (2) sequenced coordination of reset removal.

figure 12 - multi-clock reset removal.jpg

 

Figure 12 - Multi-clock reset removal

5.1 Non-coordinated reset removal

For many multi-clock designs, exactly when reset is removed within one clock domain compared to when it is removed in another clock domain is not important. Typically in these designs, any control signals crossing clock boundaries are passed through some type of request-acknowledge handshaking sequence and the delayed acknowledge from one clock domain to another is not going to cause invalid execution of the hardware. For this type of design, creating separate asynchronous reset synchronizers as shown in Figure 12 is sufficient, and the fact that arst_n, brst_n and crst_n could be removed in any sequence is not important to the design.

5.2 Sequenced coordination of reset removal

For some multi-clock designs, reset removal must be ordered and proper sequence. For this type of design, creating prioritized asynchronous reset synchronizers as shown in Figure 13 might be required to insure that all aclk domain logic is activated after reset is removed before the bclk logic, which must also be activated before the cclk logic becomes active.

figure 13 - multi-clock ordered reset removal.jpg

Figure 13 - Multi-clock ordered reset removal

For this type of design, only the highest priority asynchronous reset synchronizer input is tied high. The other asynchronous reset synchronizer inputs are tied to the master resets from higher priority clock domains.

This article abstracted from <CummingsSNUG2002SJ_Resets> , the original author is Clifford E. Cummings and Don Mills.

文章评论2条评论)

登录后参与讨论

用户1187092 2011-3-16 16:49

嗯。。。。

用户1015393 2011-3-3 17:25

不错的资料
相关推荐阅读
用户1575195 2011-10-11 22:15
从10M到100Gbps,以太网芯片接口(二)
XGMII是万兆位以太网中标准的MAC芯片和PHY芯片接口,数据位宽为32bit,工作在156.25MHz双沿采样。它使用HSTL电平标准,在PCB上可以有效传输7CM。因为单板上布局布线的复杂性...
用户1575195 2011-10-11 22:04
从10M到100Gbps,以太网芯片接口(一)
标准的10M/100M以太网MAC芯片与PHY芯片间的接口是MII(介质无关接口)。MII是一个4bit位宽,频率为25MHz的接口。一个标准的MII接口需要16个管脚。它有2个变种,以便在多端口...
用户1575195 2011-09-21 17:40
背板以太网与高能效以太网标准
背板以太网标准 802.3ap标准定义了背板应用的物理层。这些规范包括1Gbps的1000Base-KX,10Gbps使用4条3.125Gbps链路的10Gbase-KX4和10Gbps单条...
用户1575195 2011-09-14 21:58
DDR3的效率杀手——时间参数
DDR系列SDRAM存储芯片的高速率、高集成度和低成本使其理所当然成为存储芯片的一霸。在PC和消费电子领域当然是不必说,它被称为“主存”。其实,随着通信设备价格战愈演愈烈,在看起来水有点深的通信设...
用户1575195 2011-05-13 19:29
互联网又泡沫了吗?
随着国内几家互联网企业扎堆上市,担忧互联网再度泡沫化的声音在互联网上也渐渐多了起来。我比较认同一种观点,在早已多元化的今天,通信行业整体的泡沫化应该还远没到来,可能泡沫化的是某些互联网商业模式。 ...
用户1575195 2011-04-20 21:14
28nm芯片工艺, Xilinx和Altera各执一词
近期, Xilinx和Altera分别在公司召开了28nm工艺新器件发布会。与技术研究该有的严谨不同,对技术成果的展示可以生动活泼。生动活泼之中两家含沙射影的“攻击”让人感叹。正如她们的发布会礼品都选...
我要评论
2
32
关闭 站长推荐上一条 /2 下一条