Verilog Nonblocking Assignments With Delays, Myths & Mysteries

Size: px
Start display at page:

Download "Verilog Nonblocking Assignments With Delays, Myths & Mysteries"

Transcription

1 With Delays, Myths & Mysteries Clifford E. Cummings SNUG-2002 Boston, MA Voted Best Paper 2 nd Place Sunburst Design, Inc. cliffc@sunburst-design.com ABSTRACT There is a common misconception that coding sequential logic with nonblocking assignments does not simulate correctly unless a #1 delay is added to the right hand side of the nonblocking assignment operator. This is not true. This paper will explain how delays and nonblocking assignments impact the Verilog event queue. This paper will also detail both good and bad reasons for adding delays to nonblocking assignments and include guidelines for good RTL coding styles that permit mixed RTL and gate-level simulation.

2 1.0 Introduction In his book Writing Testbenches[7], Functional Verification of HDL Models, Janick Bergeron claims that VHDL and Verilog both have the same area under the learning curve[8]. Due to the misinformation that has been spread through numerous Verilog books and training courses, I am afraid Bergeron may be right. When Verilog is taught correctly, I believe the area under the Verilog learning curve is much smaller and Verilog simulations run much faster than comparable VHDL simulations. This paper details functionality and important guidelines related to nonblocking assignments and nonblocking assignments with delays. Before discussing nonblocking assignment functionality and recommendations, a quick review of the definition of nonblocking assignments is in order: A nonblocking assignment is a Verilog procedural assignment that uses the "<=" operator inside of a procedural block. It is illegal to use a nonblocking assignment in a continuous assignment statement or in a net declaration. A nonblocking assignment can be viewed as a 2-step assignment. At the beginning of a simulation time step, the right-hand-side (RHS) of the nonblocking assignment is (1) evaluated and at the end of the nonblocking assignment the left-hand-side (LHS) variable is (2) updated. A nonblocking assignment does not "block" other assignments from being executed between the evaluation and update steps of a nonblocking assignment; hence, the name "nonblocking." Despite complaints from commercial document spell-checking software, nonblocking is spelled without a hyphen, as noted in both IEEE Verilog Standards[4][5] and the pending IEEE Verilog Synthesis Standard[6]. 2

3 2.0 The Verilog event queue The Verilog event queue described in this paper is an algorithmic description. The exact implementation is not defined in the Verilog Standard but the outcome must duplicate the functionality of the description. Section 5.4 of both IEEE Verilog Standards documents, IEEE Std [4] and IEEE Std [5], describes "The Verilog simulation reference model." The reference model is shown below: In all the examples that follow, T refers to the current simulation time, and all events are held in the event queue, ordered by simulation time. while (there are events) { if (no active events) { if (there are inactive events) { activate all inactive events; } else if (there are nonblocking assign update events) { activate all nonblocking assign update events; } else if (there are monitor events) { activate all monitor events; } else { advance T to the next event time; activate all inactive events for time T; } } E = any active event; if (E is an update event) { update the modified object; add evaluation events for sensitive processes to event queue; } else { /* shall be an evaluation event */ evaluate the process; add update events to the event queue; } } Figure 1 - The Verilog simulation reference model A simplified and restructured version of this algorithm can be examined if #0 delays (inactive events) are not used. The model can be further simplified if $monitor and $strobe commands are removed from the algorithm. Note that $monitor and $strobe commands do not trigger evaluation events and they are always executed last in the current time step. The algorithm has been reworded in an attempt to add clarification to the algorithm execution process. 3

4 Think of T as an integer that tracks the simulation time. At the beginning of a simulation, T is set to 0, all nets are set to HiZ (z) and all variables are set to unknown (x). All procedural blocks (initial and always blocks) then become active. In Verilog-2001, variables may be initialized in their respective declarations and this initialization is permitted either before or after the procedural blocks become active at time 0. while (there are events) { if (there are active events) { E = any active event; if (E is an update event) { update the modified object; add evaluation events for sensitive processes to event queue; } else { // this is an evaluation event, so... evaluate the process; add update events to the event queue; } } else if (there are nonblocking update events) { activate all nonblocking update events; } } else { advance T to the next event time; activate all inactive events for time T; } Figure 2 - Modified Verilog simulation reference model Activating the nonblocking events means to take all of the events from the nonblocking update events queue and put them in the active events queue. When these activated events are executed, they may cause additional processes to trigger and cause more active events and more nonblocking update events to be scheduled in the same time step. Activity in the current time step continues to iterate until all events in the current time step have been executed and no more processes, that could cause more events to be scheduled, can be triggered. At this point, all of the $monitor and $strobe commands would display their respective values and then the simulation time T can be advanced. 4

5 2.1 Event scheduling and re-triggering As defined in section 5.3 of the IEEE Verilog Standard, the "stratified event queue" is logically partitioned into four distinct queues for the current simulation time and additional queues for future simulation times. Figure 3 - The Verilog "stratified event queue" The active events queue is where most Verilog events are scheduled, including blocking assignments, continuous assignments, $display commands, evaluation of instance and primitive inputs followed by updates of primitive and instance outputs, and the evaluation of nonblocking RHS expressions. The LHS variables of nonblocking assignments are not updated in the active events queue but instead are placed in the nonblocking assign update events queue, where they remain until they are activated (moved into the active events queue). As shown in Figure 4, active events such as blocking assignments and contiuous assignments can trigger additional assignments and procedural blocks causing more active events and nonblocking assign update events to be scheduled in the same time step. Under these circumstances, the new active events would be executed before activating any of the nonblocking assign update events. As shown in Figure 5, after the nonblocking assign updates events are activated, the LHS of the nonblocking assignments are updated, which can trigger additional assignments and procedural blocks, causing more active events and nonblocking assign update events to be scheduled in the same time step. As described in the modified simulation reference model of Figure 2, simulation time does not advance while there are still active events and nonblocking assign update events to be processed in the current simulation time. 5

6 Figure 4 - Verilog event queue - active events can trigger additional events in the same simulation time step Figure 5 - Verilog event queue - nonblocking events can trigger additional events in the same simulation time step 6

7 3.0 Review of Important Coding Guidelines with Nonblocking Assignments In my SNUG2000 San Jose conference paper[2], I mentioned eight important guidelines to follow when modeling synthesizable logic. For review purposes, the guidelines are included here: Guideline #1: When modeling sequential logic, use nonblocking assignments. Guideline #2: When modeling latches, use nonblocking assignments. Guideline #3: When modeling combinational logic with an always block, use blocking assignments. Guideline #4: When modeling both sequential and combinational logic within the same always block, use nonblocking assignments. Guideline #5: Do not mix blocking and nonblocking assignments in the same always block. Guideline #6: Do not make assignments to the same variable from more than one always block. Guideline #7: Use $strobe to display values that have been assigned using nonblocking assignments. Guideline #8: Do not make assignments using #0 delays. Guidelines #1-#4 are now generally recognized to be good and safe coding styles for RTL coding. Guideline #5 has been debated and will be further addressed and justified in section Violating guideline #6 will typically yield bizarre mismatches between pre-synthesis and postsynthesis simulations and frequently neither the pre-synthesis nor post-synthesis simulations will be functionally accurate. Guideline #7 explains how to display the value of an assignment made with a nonblocking assignment in the same time step as the nonblocking assignment. Guideline #8 basically warns that a #0 assignment causes events to be scheduled in an unnecessary intermediate event queue with often confusing results. In general a #0 assignment is not necessary and should never be used. Exceptions to these guidelines can be safely implemented, but I would ask myself the following three questions when considering exceptions to the recommended coding styles: 1. Does the exception coding style significantly improve simulation performance more than an equivalent coding style that follows the above guidelines? Does it make the simulation significantly faster? 2. Does the exception make RTL or verification coding significantly easier to understand than an equivalent coding style that follows the above guidelines? Does it make the code more understandable? 3. Does the exception significantly facilitate RTL or verification coding more than an equivalent coding style that follows the above guidelines? Does it make the coding effort much easier? Much faster? More understandable? Easier to code? If not, then the exception is generally not worth making. 7

8 Section 10.0 will address these questions with respect to Guideline #5, the guideline from this list that is most frequently challenged in public forums. 4.0 For 0-delay RTL modeling, nonblocking assignments finish first! When testing a 0-delay RTL model, stimulus inputs typically are applied on an inactive clock edge and RTL sequential logic activity happens on the active clock edge. For the example in this section, the posedge clk will be considered the active clock edge. Consider the logic shown in Figure 6. The 0-delay RTL code for this model is shown in Example 1, and a simple stimulus testbench for this model is shown in Example 2. Figure 6 - Simple sequential logic with one clock module sblk1 ( output reg q2, input a, b, clk, rst_n); reg q1, d1, d2; or b or q1) begin d1 = a & b; d2 = d1 q1; end clk or negedge rst_n) if (!rst_n) begin q2 <= 0; q1 <= 0; end else begin q2 <= d2; q1 <= d1; end endmodule Example 1-0-delay RTL model for simple sequential logic with one clock 8

9 module tb; reg a, b, clk, rst_n; initial begin // clock oscillator clk = 0; forever #10 clk = ~clk; end sblk1 u1 (.q2(q2),.a(a),.b(b),.clk(clk),.rst_n(rst_n)); initial begin // stimulus a = 0; b = 0; rst_n <= clk) rst_n = 1; a = 1; b = clk) a = clk) b = clk) $finish; end endmodule Example 2 - Simple testbench to apply stimulus to the 0-delay RTL model for simple sequential logic The testbench has a free-running clock oscillator with the clk initialized to 0 for the first halfcycle and the initial block sets initial values for both the a and b inputs and then resets the circuit until one cycle into the simulation (the first official negedge clk). On the first official negedge clk, the reset is removed and the primary inputs to the model, a and b, are both changed to 1's. On the next two negedge clks, first the a-input and then the b-input are successively changed to 0's. One negedge clk later the simulation is stopped with a $finish command. From this simple sequence of stimulus inputs, we can see interesting aspects of how stimulus and RTL events are scheduled in the Verilog event queue. First note that the primary inputs (a and b) and any RTL combinational logic connected to the primary inputs (d1 and d2) change on the negedge clk as shown in Figure 7. This typically means that only active events are scheduled and executed on the inactive clock edge, as shown in Figure 8. 9

10 Figure 7 - Combinational module inputs are changed on the negedge clk Figure 8 - Verilog event queue - combinational clk In the Verilog event queue, nonblocking assignments are updated after the active events (blocking assignments) are executed, but within an RTL 0-delay, cycle-based model, in each time step where an active clock edge occurs, all nonblocking assignments will actually be updated before executing the combinational blocking assignments in the same simulation time step. Why? 10

11 Figure 9 - Verilog event queue - sequential clk Figure 10 - Sequential logic nonblocking assignment outputs change first on posedge clk As shown in the Verilog event queue of Figure 9 and the waveform display of Figure 10, a clock edge triggers the sequential always block(s). The outputs of the sequential always block(s) will schedule updates at the end of the current time step. All the nonblocking update events are activated and updated, which will then trigger the combinational logic, also in the same time step as shown in Figure 11. The combinational logic will settle out and remain unchanged until the 11

12 next posedge clk. On the next posedge clk, the sequential logic will again be updated with the stable combinational values and again trigger the combinational logic. Figure 11 - Combinational logic blocking assignment outputs change second after nonblocking assignments complete 5.0 Inertial & transport delays Inertial delay models are simulation delay models that filter pulses that are shorter than the propagation delay of Verilog gate primitives or continuous assignments. Inertial delays swallow glitches! Inertial delays are very easy for a simulator to implement because the simulator only keeps track of what the next assignment value is going to be and when it will occur. If another assignment is made to the same variable before the currently scheduled event is executed, the simulator replaces the earlier but unrealized scheduled event with the new event value and the new time when the event will occur. By default, both Verilog and VHDL simulate using inertial delays. Transport delay models are simulation delay models that pass all pulses, including pulses that are shorter than the propagation delay of corresponding Verilog procedural assignments. Transport delays pass glitches, delayed in time. The VHDL language models transport delays by adding the key word "transport" to assignments. Verilog can model RTL transport delays by adding explicit delays to the right-hand-side (RHS) of a nonblocking assignment. 12

13 5.1 Verilog Transport Delays in gate-level simulations By default, Verilog gate-level models are pure inertial-delay models but there are generally available Verilog command-line switches that can be used to alter this behavior for gate-level simulations. Many ASIC gate-level models are written with delays inside of specify blocks that permit simulation pulses to be passed using transport delay models when certain command line switches are invoked. Typically, Verilog simulators use the command line switches reject +pulse_r/% and error +pulse_e/% where the percent value (%) is equal to in increments of 10. The +pulse_r/r% switch forces pulses that are shorter than R% of the propagation delay of the device being tested to be "rejected" or ignored. The +pulse_e/e% switch forces pulses that are shorter than E% but longer than %R of the propagation delay of the device being tested to be an "error" causing unknowns (X's) to be driven onto the output of the device. Any pulse greater than E% of the propagation delay of the device being tested will propagate to the output of the device as a delayed version of the expected output value. Consider a simple delay buffer model with a propagation delay of 5ns, where the delay has been added to a Verilog specify block. The Verilog code for this gate-level model is shown in Example 3 and a simple testbench stimulus block to test the model is shown in Example 4. `timescale 1ns/1ns module delaybuf (output y, input a); buf u1 (y, a); specify (a*>y) = 5; endspecify endmodule Example 3 - Delay buffer (delaybuf) with specify-block path delay of 5ns `timescale 1ns/1ns module tb; reg a; integer i; delaybuf i1 (.y(y),.a(a)); initial begin a=0; #10 a=~a; for (i=1;i<7;i=i+1) #(i) a=~a; #20 $finish; end endmodule Example 4 - Simple stimulus testbench for the delay buffer (delaybuf) model 13

14 For this delaybuf model, the default will be a pure inertial delay-mode simulation and all input pulses less than 5ns in width will be filtered or ignored. This delaybuf model can be simulated with pure transport delays by turning on switches that neither cause any input signal to be rejected nor cause any input signal to be treated as an error using the command line switches shown below: vcs -RI +v2k tb.v delaybuf.v +pulse_r/0 +pulse_e/0 Figure 12 - Pure transport delays: delaybuf waveform display using +pulse_r/0 +pulse_e/0 switches Unfortunately, to get true transport delay simulation results, simulators also often require the +transport_path_delays switch to be used, to achieve the simulation results shown in Figure 13. vcs -RI +v2k tb.v delaybuf.v +pulse_r/0 +pulse_e/0 +transport_path_delays Figure 13 - Corrected transport delays: delaybuf waveform display using +pulse_r/0 +pulse_e/0 +transport_path_delays switches 14

15 This same delaybuf model can be simulated with pure "error" delays by turning on switches that cause no input signal to be rejected but that do cause all input signals shorter than the propagation delay of the device to be treated as an error using the command line switches shown below: vcs -RI +v2k tb.v delaybuf.v +pulse_r/0 +pulse_e/100 Figure 14 - Pure "error" delays: delaybuf waveform display using +pulse_r/0 +pulse_e/100 switches These switches command the simulator to not reject any pulses (+pulse_r/0), but pass unknowns for any pulse that is less than 100% of the propagation delay of the gate (+pulse_e/100). This causes all short pulses to be passed to the device outputs as unknowns. This same delaybuf model can be simulated with pure inertial delays by turning on switches that cause all input signals shorter than the propagation delay of the device to be ignored using the command line switches: vcs -RI +v2k tb.v delaybuf.v +pulse_r/100 +pulse_e/100 Figure 15 - Pure inertial delays: delaybuf waveform display using +pulse_r/0 +pulse_e/0 switches 15

16 The first switch commands the simulator to reject any input pulse shorter than 100% of the propagation delay of the device (+pulse_r/100). Since the percentage of the "error" switch matches the percentage of the "reject" switch, this forces the simulator to not pass unknowns to the outputs of the device. This is a pure inertial delay model style. Real hardware is neither pure-inertial nor pure-transport in behavior. Real hardware will generally reject very short inputs, pass longer inputs, and intermediate inputs will pass through some devices and not others depending on the process tolerances used to fabricate the chip when it was made (process variations). This same delaybuf model can be simulated with this same realistic mixture of inertial, uncertain and transport delays by turning on switches that cause short input signals to be rejected, long input signals to be passed, and intermediate input signals to propagate as unknowns. The command line switches to reject pulses shorter than 40% of the specified delay, pass error pulses for all pulses greater than 40% but less than 80% of the specified delay, and pass all pulses that are greater than 80% of the specified delay, are shown below: vcs -RI +v2k tb.v delaybuf.v +pulse_r/40 +pulse_e/80 Figure 16 - Mixed delays: delaybuf waveform display using +pulse_r/40 +pulse_e/80 switches NOTE: as shown in the example design in this section, +pulse switches only work with the Verilog specify block delays, not primitive delays. 16

17 6.0 Verilog delay line models In the early 1990's I posted a question to the comp.lang.verilog newsgroup asking, "How does one model a delay line using Verilog?" A number of answers were posted in response. After receiving a number of rather complex methods to accomplish the goal, one engineer[15] sent an elegantly simple model similar to the model shown in Example 5. This is an example of a delay line model with one input and two output taps. The first output displays the same waveform as the input signal but delayed by 25ns. The second output displays the same waveform as the input signal but delayed by 40ns. `timescale 1ns / 1ns module DL2 (y1, y2, in); output y1, y2; input in; reg y1, y2; begin y1 <= #25 in; y2 <= #40 in; end endmodule Example 5 - Verilog-1995 delay line model with two output taps A parameterized version of the same model with multiple delay line taps is shown below: `timescale 1ns / 1ns module DL2 (y1, y2, in); output y1, y2; input in; reg y1, y2; parameter TAP1 = 25; parameter TAP2 = 40; begin y1 <= #TAP1 in; y2 <= #TAP2 in; end endmodule Example 6 - Parameterized Verilog-1995 delay line model with two output taps And finally, a parameterized Verilog-2001 version of the same model with multiple delay line taps is shown on the next page: 17

18 `timescale 1ns / 1ns module DL2 #(parameter TAP1 = 25, TAP2 = 40) (output reg y1, y2, input in); begin y1 <= #TAP1 in; y2 <= #TAP2 in; end endmodule Example 7 - Parameterized Verilog-2001 delay line model with two output taps Since Verilog delays are ignored by synthesis tools, what do delay lines have to do with synthesis? Delays may be important to mixed RTL and gate simulations. More on this subject is discussed in section An important guideline that should be noted in every Verilog book (but often is missing) and taught in every beginning Verilog class (but often is not), is that whenever an engineer adds a #delay to a module, the module should be preceded by a `timescale directive; otherwise, the delays in the module are at the mercy of the last `timescale directive declared, which may not match the desired timing of the current module being compiled. Compiler directives, such as the `timescale directive, are compile-order dependent. Guideline: Add a `timescale directive in front of every module that contains #delays. 7.0 The #1 delay To delay or not to delay, that is the question! Myth: #1 delays are required to fix problems with nonblocking assignments. I have worked with many engineers at many companies and have often seen engineers add #1 to the RHS of all nonblocking assignments. When I ask engineers why they have added delays to their nonblocking assignments, frequently the answer given is "Verilog nonblocking assignments are broken and adding #1 fixes the problem!" Truth: Nonblocking assignments are not broken. The engineer's understanding is broken! There are a few good reasons and many bad reasons to add #1 to the RHS of nonblocking assignments. Some of these reasons include: Good reason #1: Adding #1 to nonblocking assignments will cause an output change to be delayed by 1 time unit. This often eases the debugging task when using a waveform viewer. Consider the register models in Example 8 and Example 9. 18

19 `timescale 1ns / 1ns module reg8 (q, d, clk, rst_n); output [7:0] q; input [7:0] d; input clk, rst_n; reg [7:0] q; clk or negedge rst_n) if (!rst_n) q <= #1 8'b0; else q <= #1 d; endmodule Example 8 - Verilog-1995 register model with #1 delays `timescale 1ns / 1ns module reg8 ( output reg [7:0] q, input [7:0] d, input clk, rst_n ); clk or negedge rst_n) if (!rst_n) q <= #1 8'b0; else q <= #1 d; endmodule Example 9 - Verilog-2001 register model with #1 delays These two models will exhibit an output delay of 1ns after a posedge clk or after a negedge rst_n. The delay has effectively implemented a 1ns clk-to-q or rst_n-to-q delay, which can be easily interpreted when viewed with a waveform viewer. For some engineers, the small delay between rising-clock and output-change in the waveform display is sometimes easier to interpret than when the clock edge and output change are displayed in the same waveform time tic. The small delay in the waveform viewer can also make it easy to see what the values of the sequential logic outputs were just prior to the clock edge, by placing the waveform viewer cursor on the clock edge itself, most waveform viewing tools will display the respective binary, decimal or hex values next to the signal names near the left side of the waveform display. Then to see the updated values, the cursor is moved to any transition shown 1ns later in the same waveform display[1]. Good reason #2: Most high-performance flip-flops have hold times between 0ps and 800ps. Adding #1 to RTL models that drive gate-level models will generally fix any problems associated with mixed RTL and gate-level simulations (assuming a `timescale time-step of 1ns). Exceptions would include any gate-level model with a required hold time of greater than 1ns or clock distribution models with a skew of greater than 1ns. 19

20 Bad reason #1: "Verilog nonblocking assignments are broken!" WRONG! Nonblocking assignments work fine, even without RHS #1 delays. If you add delays to the RHS of nonblocking assignments without knowing the correct reason for adding the delays, at some point you will likely run into problems with mixed RTL and gate-level simulations where the gate-level model has hold time delays in excess of 1ns, or the clock distribution network has a skew of greater than 1ns, and the simulation will fail. Bad reason #2: VCS has built-in optimizations for high-speed cycle-based simulation and some cycle-based simulators, like VCS, slow down significantly when #1 delays are added to the RHS of nonblocking assignments. 8.0 VCS simulation benchmarks using #1 delays If you could dramatically improve the performance of your simulator by making one small RTLcoding change to your designs, would you be interested? What is the impact to VCS simulation performance by adding #1 delays to the RHS nonblocking assignments? To answer the second question, the circuit I used to benchmark VCS simulator performance is a worst-case design, comprising a total of 20,000 flip-flops configured as 20 pipeline stages of 1000-bit pipeline registers as shown in Figure 17. Although this is not representative of a typical ASIC design, it does directly demonstrate the impact of adding delays to the sequential blocks of your RTL code. Figure 17 - Benchmark design with 20,000 flip-flops (dffpipe.v) 20

21 The second benchmark circuit is the same 20,000 flip-flop pipeline design but each flip-flop has been coded with a d-input inverter and a q-output inverter, just to add lots of combinational simulation transitions to the design as shown in Figure 18. Again this is not a typical ASIC design, but the 40,000 extra inversions should cause more combinational events to the execute during the second benchmark simulation. The testbench for these benchmark circuits applied a sequenced series of eight patterns, repeated 1,000,000 times. A large quantity of vectors was chosen to insure that the recorded CPU Times would be based on event-activity, as opposed to compile time and simulation startup overhead. Figure 18 - Benchmark design with 20,000 flip-flops and 40,000 inverters (dffpipe.v) The flip-flops for the benchmark circuits were coded with five small delay variations: (1) nonblocking assignments with no delays, (2) nonblocking assignments with #1 delays, (3) blocking assignments with #1 delays (NOT RECOMMENDED), (4) nonblocking assignments with #0 delays (using `define macro substitution), and (5) nonblocking assignments with no delays (using `define macro substitution to remove the delay). The corresponding code fragments are shown in Example 10 - Example

22 clk or negedge rst_n) if (!rst_n) q <= 0; else q <= d; Example 10 - Sequential logic coding style with no delays clk or negedge rst_n) if (!rst_n) q <= #1 0; else q <= #1 d; Example 11 - Sequential logic coding style with explicit #1 delays clk or negedge rst_n) if (!rst_n) q = #1 0; else q = #1 d; Example 12 - Sequential logic coding style with explicit #1 blocking delays (NOT RECOMMENDED!) `define D #0 clk or negedge rst_n) if (!rst_n) q <= `D 0; else q <= `D d; Example 13 - Sequential logic coding style with explicit #0 delays `define D clk or negedge rst_n) if (!rst_n) q <= `D 0; else q <= `D d; Example 14 - Sequential logic coding style with delays removed by macro substitution The simulations were run on two different computers running VCS version 6.2. The first was an IBM ThinkPad T21 laptop computer with Pentium III-850MHz processor, 384MB RAM, running Redhat Linux 6.2. The VCS license server was run from this laptop. The second computer was a SUN Ultra-Sparc 80 with 1GB RAM and running Solaris 8. Again, the license server for the SUN workstation was the Linux laptop computer. 22

23 The benchmark results are not intended to show superiority of one CPU or operating system over another. These just happen to be the two CPUs I had readily available in my office to run the benchmarks. IBM ThinkPad T21, Pentium III-850MHz, 384MB RAM, Redhat Linux 6.2 VCS Version Simulation ended at Time: ns DFF pipeline (no inverters) CPU Time (seconds) Speed compared to no-delay model No delays Baseline no-delay model Nonblocking #1 delays ( <= #1 ) Blocking #1 delays ( = #1 NOT RECOMMENDED) Nonblocking #0 delays ( <= `D and `define D #0 ) Nonblocking blank delays ( <= `D and `define D <no_value> ) % slower % slower % slower ~same speed Table 1 - DFF pipeline simulations - IBM ThinkPad running Linux IBM ThinkPad T21, Pentium III-850MHz, 384MB RAM, Redhat Linux 6.2 VCS Version Simulation ended at Time: ns DFF pipeline with inverters CPU Time (seconds) Speed compared to no-delay model No delays Baseline no-delay model Nonblocking #1 delays ( <= #1 ) Blocking #1 delays ( = #1 NOT RECOMMENDED) Nonblocking #0 delays ( <= `D and `define D #0 ) Nonblocking blank delays ( <= `D and `define D <no_value> ) % slower % slower ~same speed ~same speed Table 2 - DFF pipeline with combinational logic simulations - IBM ThinkPad running Linux 23

24 SUN Ultra 80, UltraSPARC-II 450MHz, 1GB RAM, Solaris 8 VCS Version Simulation ended at Time: ns DFF pipeline (no inverters) CPU Time (seconds) Speed compared to no-delay model No delays Baseline no-delay model Nonblocking #1 delays ( <= #1 ) Blocking #1 delays ( = #1 NOT RECOMMENDED) Nonblocking #0 delays ( <= `D and `define D #0 ) Nonblocking blank delays ( <= `D and `define D <no_value> ) % slower % slower % slower ~same speed Table 3 - DFF pipeline simulations - SUN Workstation running Solaris SUN Ultra 80, UltraSPARC-II 450MHz, 1GB RAM, Solaris 8 VCS Version Simulation ended at Time: ns DFF pipeline with inverters CPU Time (seconds) Speed compared to no-delay model No delays Baseline no-delay model Nonblocking #1 delays ( <= #1 ) Blocking #1 delays ( = #1 NOT RECOMMENDED) Nonblocking #0 delays ( <= `D and `define D #0 ) Nonblocking blank delays ( <= `D and `define D <no_value> ) 1, % slower % slower % slower % slower Table 4 - DFF pipeline with combinational logic simulations - SUN Workstation running Solaris Based on these benchmark results, it is clear there are significant increases in simulation performance possible simply by removing the #1 delays from the RHS of nonblocking assignments. 24

25 8.1 Conditionally compiled #1 delays For engineers interested in retaining the #1 delays for debugging purposes, I recommend that the #1 delays be added to all designs using a common macro definition as shown in Example 15, and code all sequential logic using `D values on the RHS of nonblocking assignments as shown in Example 16. `D was chosen because "D" stands for delay and it is also very short (half as many characters as typing `DLY). // To enable <= #1 (NonBlocking Delays), simulate with the // following command: +define+nbd // Default is to simulate with the higher performance no-delay `ifdef NBD `define D #1 `else `define D `endif Example 15 - Macro definitions for no-delay and explicit #1-delay simulations // Typical sequential logic coding style clk or negedge rst_n) if (!rst_n) q <= `D 0; else q <= `D d; Example 16 - Typical sequential logic coding style Using the code from Example 15 and Example 16 with the command line switch +define+nbd (NBD: NonBlocking Delays) would make all properly coded sequential logic behave equivalent to the code shown in Example 17, with added #1 delays and degraded simulation performance. // With +define+nbd - the equivalent code is: // *** slower simulations *** clk or negedge rst_n) if (!rst_n) q <= #1 0; else q <= #1 d; Example 17 - Equivalent sequential logic coding style after #1 macro substitution Using the code from Example 15 and Example 16 without the command line switch +define+nbd would make all properly coded sequential logic behave equivalent to the code shown in Example 18, with no delays and significantly increased simulation performance. // With NO +define+nbd - the equivalent code is: // *** faster simulations *** clk or negedge rst_n) if (!rst_n) q <= 0; else q <= d; Example 18 - Equivalent sequential logic coding style after no-delay macro substitution 25

26 NOTE: After sharing this benchmark information with Mark Warren, Technical Director of the Verification Group at Synopsys, Mark wanted me to note that VCS simulations of a typical design could experience a 0%-200% increase in simulation performance with a 30%-50% increase being typical, as opposed to the 18%-92% increase reported with the contrived benchmark circuits in this section[12]. The ratio of combinational logic to sequential logic in an actual ASIC design and the possible inclusion of PLI code could indeed mean that the percentage improvement in simulation performance would in all likelihood be closer to the 30%-50% figure. However, it is interesting to observe the tremendous difference in simulator performance related to adding #1 delays to the nonblocking assignments. 8.2 The VCS +nbaopt Command Line Switch VCS has a command line switch called "+nbaopt" designed to optimize nonblocking assignments by removing the #1 delays that might follow a nonblocking assignment. Using the +nbaopt switch did significantly improve the simulation performance of the model with #1 delays, but the design still ran 3%-16% slower than an equivalent model without delays or a model with macro-defined blank delays. As could be expected, using the +nbaopt switch did not increase the performance of the models that previously had no delays. IBM ThinkPad T21, Pentium III-850MHz, 384MB RAM, Redhat Linux 6.2 VCS Version including the +nbaopt command switch DFF pipeline (no inverters) CPU Time (seconds) Speed compared to no-delay model No delays +nbaopt Baseline no-delay model Nonblocking #1 delays +nbaopt ( <= #1 ) Blocking #1 delays +nbaopt ( = #1 NOT RECOMMENDED) % slower % slower Table 5 - DFF pipeline simulations - no delays vs #1 delays and +nbaopt command switch - IBM ThinkPad running Linux 26

27 SUN Ultra 80, UltraSPARC-II 450MHz, 1GB RAM, Solaris 8 VCS Version including the +nbaopt command switch DFF pipeline (no inverters) CPU Time (seconds) Speed compared to no-delay model No delays +nbaopt Baseline no-delay model Nonblocking #1 delays +nbaopt ( <= #1 ) Blocking #1 delays +nbaopt ( = #1 NOT RECOMMENDED) % slower % slower Table 6 - DFF pipeline simulations - no delays vs #1 delays and +nbaopt command switch - SUN Workstation running Solaris 8.3 The VCS +rad Command Line Switch VCS has a command line switch called "+rad" designed to optimize designs for improved simulation performance. Mark Warren of Synopsys reports that +rad is actually a family of optimizations that will make improvements to non-timing designs, such as speeding up logic and event propagation, but +rad does not affect delay scheduling[12]. Note that the +rad switch is not just for cycle-based simulations. Mark Warren reports that there are some designs that will give very large speedups with +rad (typically the uglier the code, the larger the speedup). When I tested the +rad switch on the Linux laptop computer, the no-delay RTL models ran 23%-26% faster than simulations without the +rad switch. Even though all simulations ran faster with the +rad switch, the models with #1 delays were still about 25% slower than comparable models without the delays. It was also interesting to note that the +rad switch helped models with the macro-added #0 delay to match or slightly beat the simulation performance of models with no delays. 27

28 The same simulations were not tested on the SUN Solaris workstation. IBM ThinkPad T21, Pentium III-850MHz, 384MB RAM, Redhat Linux 6.2 VCS Version 7.0 (early release) (using +rad switch) DFF pipeline (no inverters) CPU Time (seconds) Speed compared to no-delay model No delays Baseline no-delay model Nonblocking #1 delays ( <= #1 ) Blocking #1 delays ( = #1 NOT RECOMMENDED) Nonblocking #0 delays ( <= `D and `define D #0 ) Nonblocking blank delays ( <= `D and `define D <no_value> ) % slower % slower % faster ~same speed Table 7 - DFF pipeline simulations - early version of VCS 7.0 and +rad command switch - IBM ThinkPad running Linux IBM ThinkPad T21, Pentium III-850MHz, 384MB RAM, Redhat Linux 6.2 VCS Version 7.0 (early release) (using +rad switch) DFF pipeline with inverters CPU Time (seconds) Speed compared to no-delay model No delays Baseline no-delay model Nonblocking #1 delays ( <= #1 ) Blocking #1 delays ( = #1 NOT RECOMMENDED) Nonblocking #0 delays ( <= `D and `define D #0 ) Nonblocking blank delays ( <= `D and `define D <no_value> ) % slower % slower % faster % faster Table 8 - DFF pipeline with combinational logic simulations - early version of VCS 7.0 and +rad command switch - IBM ThinkPad running Linux 28

29 9.0 Multiple common clocks and race conditions? Are #1 nonblocking assignment delays required to avoid race conditions when multiple common clocks are generated in the same time step? If sequential logic is generated using nonblocking assignments, the answer is no (unless one of the clocks is incorrectly generated from the other clock signal using a nonblocking assignment, such as: clk1b <= clk1a;) Consider the case where clk1a and clk1b are two copies of the same clk1 signal as shown in Figure 19. In this case posedge clk1a and posedge clk1b occur at the same simulation time. Can there be a race condition caused by these two clock signals being generated from different blocks of RTL code? If the sequential logic driven by these two clocks is properly coded with nodelay nonblocking assignments, the answer is no. Figure 19 - Simple sequential logic driven by two buffered copies of clk1 For this example, all posedge clk1a nonblocking assignments will be scheduled to be updated in the nonblocking assignments update queue. Then all of the posedge clk1b nonblocking assignments will be scheduled to be updated in the nonblocking assignments update queue before the clk1a updates have been activated in the same time step. This insures that all registered logic will be correctly pipelined between the no-skew clock domains before the combinational logic is updated Avoid always blocks with mixed blocking and nonblocking assignments Now lets reexamine guideline #5 from section 3.0: Guideline #5: Do not mix blocking and nonblocking assignments in the same always block. Of the guidelines that were given in my SNUG2000 paper on nonblocking assignments[2], this guideline has probably been the most challenged in public forums. Paul Campbell of Verifarm Inc points out that one "can safely mix blocking assignments (without delays) that model combinatorial logic (ie temporary variables) and non-blocking assignments that model flops in the same edge triggered always statement[13]." 29

30 Paul is of course correct, but the coding style has its disadvantages, including: 1. It can be confusing to understand the event scheduling in this always block. 2. One might forget that only one nonblocking assignment should be used and that the nonblocking assignment should be listed last. 3. In a zero delay model, inputs and their resultant flip-flop outputs will change on the same clock edge yielding a confusing simulation waveform display. Consider the simple circuit of Figure 20 and the properly coded Verilog model shown in Example 19, without mixed blocking and nonblocking assignments in the same always block. This model follows the coding style guidelines detailed in section 3.0. Figure 20 - Simple circuit to test mixed blocking & nonblocking assignment coding styles module blk1 ( output reg q, // registered output output y, // combinational output input a, b, c, // combinational inputs input clk, rst_n); // control inputs wire d; clk or negedge rst_n) if (!rst_n) q <= 0; else q <= d; assign d = a & b; assign y = q & c; endmodule Example 19 - Properly coded model with no mixed blocking and nonblocking assignments in the same always block When synthesized, the Example 19 RTL code compiles to the logic shown in Figure 21 (for schematic clarity, the LSI 10K library that is included in the default Synopsys tools distribution was used and set_dont_use commands were run to remove all of the scan flip-flops prior to synthesis compilation). 30

31 Figure 21 - Synthesized version of the blk1 model The Verilog code in Example 20 also correctly models the simple circuit of Figure 20, but this code violates the guideline to prohibit blocking and nonblocking assignments in the same always block. This coding style is frequently employed by engineers with a former VHDL background who were accustomed to mixing variable and signal assignments in the same process to increase VHDL simulation performance. There is no simulation performance improvement achieved by using this coding style in Verilog. module blk1a ( output reg q, // registered output output y, // combinational output input a, b, c, // combinational inputs input clk, rst_n); // control inputs clk or negedge rst_n) if (!rst_n) q <= 0; else begin: logic reg d; // combinational intermediate signal d = a & b; q <= d; end assign y = q & c; endmodule Example 20 - Improperly coded model with mixed blocking and nonblocking assignments in the same always block Although the Verilog model of Example 20 simulates and synthesizes correctly, there are good reasons to avoid this coding style. The most obvious reason to avoid this coding style is to reduce confusion while interpreting signal transitions in a waveform viewer during debug of this design. The mixed coding style means that the internal combinational output d does not update when the inputs to the and gate change. The only time the d-signal updates (in the waveform viewer) is on a clock edge or at reset assertion. As can be seen in Figure 22, on the second rising clk edge, the clk has changed, the d-input to the flip-flop has changed and the q-output of the flip-flop has 31

32 changed. For a very large design, an engineer is going to need to spend a lot of time rationalizing why inputs and resultant outputs are both changing on the same clock edge. Input changes on clock edges do not happen in real hardware, this is simply a side-effect of this unusual coding style. Figure 22 - Confusing waveform display caused by mixed assignments in a sequential always block Although it is not obvious in Figure 22, the intermediate signal d is not in the same simulation scope as the rest of the signals in this module. Displaying transitions on the d-signal requires that the logic.d hierarchical signal name (d is declared in the named-block called "logic") must be added to the waveform display. module blk1b ( output reg q, // registered output output y, // combinational output input a, b, c, // combinational inputs input clk, rst_n); // control inputs clk or negedge rst_n) if (!rst_n) q <= 0; else begin: logic reg d; // combinational intermediate signal d = a & b; q <= d; d = 1'bx; // to avoid waveform confusion end assign y = q & c; endmodule Example 21 - Improperly coded model with mixed assignments and waveform canceling code 32

33 I have been told of one engineer who codes with a mixed assignment style that includes assigning X's to all of the intermediate local signals after making the nonblocking assignment, just to make sure nobody can display the intermediate signals in a waveform display and become confused! The highly unusual coding style is shown in Example 21. In this coding style, the intermediate signals are displayed as unknowns for the entire simulation, even though they took on momentary values to update the appropriate sequential logic. This seems like a lot of trouble just to use the mixed coding style. Upon examination, I believe the coding style of mixing blocking and nonblocking assignments in the same always block will not simulate any faster, is not quite as understandable (requires a better understanding of Verilog event scheduling) and is no easier to code (more opportunities to incorrectly mix blocking and nonblocking assignments and quite confusing in a simulation waveform display). Even though the mixed style can work, I consider the mixed style to be more error prone for coding and for waveform interpretation. Since the coding style offers no distinct advantage over other recommended coding styles, I stand by the guideline to not mix blocking and nonblocking assignments in the same always block. Note that the safest, but still not recommended, way to mix assignments is to declare the intermediate d-signal as a local variable in a named block as shown in Example 21. The reason this is the safest technique is because if the d-signal is declared within the global-module space, and if the signal is accidentally either directly or through other combinational equations, connected to an output port as shown in Example 22, synthesis tools will infer an extra flip-flop for this signal as shown in Figure 23. module blk2a ( output reg q, q2, // registered outputs output y, // combinational output input a, b, c, // combinational inputs input clk, rst_n); // control inputs reg d; // combinational intermediate signal clk or negedge rst_n) if (!rst_n) q <= 0; else begin d = a & b; q <= d; end assign y = q & c; q2 = d; endmodule Example 22 - Improperly coded model with mixed assignments and an extra connection to the d-signal 33

34 Figure 23 - Synthesized version of the blk2a model with extra sequential logic 11.0 Mixed RTL & gate simulations What are mixed RTL and gate-level simulations? On large ASIC projects with multiple designers, an ASIC is typically partitioned to permit multiple designers to code smaller portions of a larger design as shown in Figure 24. As multiengineer designs progress, it is not unusual for one of the RTL partitions to be completed and synthesized before the other RTL partitions are done. It is a good idea to begin testing of the completed-synthesized block before the rest of the blocks have been synthesized. Putting together a simulation configuration that tests in-design RTL blocks with the completed gate-level block allows testing of the gate-level model before the rest of the design is complete. This is mixed RTL and gate-level simulation. Figure 24 - ASIC design with multiple RTL partitions On large projects, the desire to run a mostly RTL-simulation with one gate-level block is not confined to the situation where one engineer finishes a block before the other blocks are 34

35 synthesized; indeed, mixed simulations are often run to test a gate-level block in isolation from other gate-level blocks in a design. This helps to narrow the focus of any potential debugging effort and also, because RTL models generally simulate much faster than equivalent gate-level models, using fewer gate-level models will generally improve simulation efficiency. The question is, are there any problems related to mixed RTL and gate-level simulation? Consider the block diagram of an ASIC partitioned into three design blocks as shown in Figure 24. For pure RTL simulations with an ideal common clock (no delay and no skew in the clock path), adhering to the coding guidelines outlined in section 3.0 of this paper will yield a race-free RTL simulation. Now assume that one of the RTL partitions has been completed, compiled (synthesized) and saved as a gate-level model as shown in Figure 25. The real flip-flops in the gate-level model have non-zero setup and hold time requirements and the real logic has actual non-zero propagation delays. Is there a problem with a 0-delay RTL model driving a gate-level model with real setup and hold time requirements? Is there a problem with a gate-level model with real propagation delays driving a 0-delay RTL model? Figure 25 - Mixed RTL and gate-level design with two RTL and one gate-level partitions 11.1 RTL-to-gates simulation First examine the setup time requirements of the gate-level model. If the gate-level model has a non-zero setup time requirement, there is no problem meeting the setup time requirements of the 35

A New Paradigm for Synchronous State Machine Design in Verilog

A New Paradigm for Synchronous State Machine Design in Verilog A New Paradigm for Synchronous State Machine Design in Verilog Randy Nuss Copyright 1999 Idea Consulting Introduction Synchronous State Machines are one of the most common building blocks in modern digital

More information

Asynchronous & Synchronous Reset Design Techniques - Part Deux

Asynchronous & Synchronous Reset Design Techniques - Part Deux Clifford E. Cummings Don Mills Steve Golson Sunburst Design, Inc. LCDM Engineering Trilobyte Systems cliffc@sunburst-design.com mills@lcdm-eng.com sgolson@trilobyte.com ABSTRACT This paper will investigate

More information

Understanding Verilog Blocking and Non-blocking Assignments

Understanding Verilog Blocking and Non-blocking Assignments Understanding Verilog Blocking and Non-blocking Assignments International Cadence User Group Conference September 11, 1996 presented by Stuart HDL Consulting About the Presenter Stuart has over 8 years

More information

A Verilog HDL Test Bench Primer Application Note

A Verilog HDL Test Bench Primer Application Note A Verilog HDL Test Bench Primer Application Note Table of Contents Introduction...1 Overview...1 The Device Under Test (D.U.T.)...1 The Test Bench...1 Instantiations...2 Figure 1- DUT Instantiation...2

More information

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: 03-4227151 ext:34534 Email: jimmy@ee.ncu.edu.tw. Sequential Circuit

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: 03-4227151 ext:34534 Email: jimmy@ee.ncu.edu.tw. Sequential Circuit Modeling Sequential Elements with Verilog Prof. Chien-Nan Liu TEL: 03-4227151 ext:34534 Email: jimmy@ee.ncu.edu.tw 4-1 Sequential Circuit Outputs are functions of inputs and present states of storage elements

More information

ECE232: Hardware Organization and Design. Part 3: Verilog Tutorial. http://www.ecs.umass.edu/ece/ece232/ Basic Verilog

ECE232: Hardware Organization and Design. Part 3: Verilog Tutorial. http://www.ecs.umass.edu/ece/ece232/ Basic Verilog ECE232: Hardware Organization and Design Part 3: Verilog Tutorial http://www.ecs.umass.edu/ece/ece232/ Basic Verilog module ();

More information

Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems

Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems Harris Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems David Harris Harvey Mudd College David_Harris@hmc.edu Based on EE271 developed by Mark Horowitz, Stanford University MAH

More information

Modeling Latches and Flip-flops

Modeling Latches and Flip-flops Lab Workbook Introduction Sequential circuits are digital circuits in which the output depends not only on the present input (like combinatorial circuits), but also on the past sequence of inputs. In effect,

More information

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters LAB OBJECTIVES 1. Introduction to latches and the D type flip-flop 2. Use of actual flip-flops to help you understand sequential

More information

Lecture 7: Clocking of VLSI Systems

Lecture 7: Clocking of VLSI Systems Lecture 7: Clocking of VLSI Systems MAH, AEN EE271 Lecture 7 1 Overview Reading Wolf 5.3 Two-Phase Clocking (good description) W&E 5.5.1, 5.5.2, 5.5.3, 5.5.4, 5.5.9, 5.5.10 - Clocking Note: The analysis

More information

Getting the Most Out of Synthesis

Getting the Most Out of Synthesis Outline Getting the Most Out of Synthesis Dr. Paul D. Franzon 1. Timing Optimization Approaches 2. Area Optimization Approaches 3. Design Partitioning References 1. Smith and Franzon, Chapter 11 2. D.Smith,

More information

VHDL GUIDELINES FOR SYNTHESIS

VHDL GUIDELINES FOR SYNTHESIS VHDL GUIDELINES FOR SYNTHESIS Claudio Talarico For internal use only 1/19 BASICS VHDL VHDL (Very high speed integrated circuit Hardware Description Language) is a hardware description language that allows

More information

Digital Design Verification

Digital Design Verification Digital Design Verification Course Instructor: Debdeep Mukhopadhyay Dept of Computer Sc. and Engg. Indian Institute of Technology Madras, Even Semester Course No: CS 676 1 Verification??? What is meant

More information

Chapter 2 Ensuring RTL Intent

Chapter 2 Ensuring RTL Intent Chapter 2 Ensuring RTL Intent A user starts the design of his block, by describing the functionality of the block in the form of RTL. The RTL code is then synthesized to realize the gate level connectivity

More information

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts) Dr. Greg Tumbush, gtumbush@uccs.edu Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts) Objective The objective of lab assignments 5 through 9 are to systematically design and implement

More information

Latch Timing Parameters. Flip-flop Timing Parameters. Typical Clock System. Clocking Overhead

Latch Timing Parameters. Flip-flop Timing Parameters. Typical Clock System. Clocking Overhead Clock - key to synchronous systems Topic 7 Clocking Strategies in VLSI Systems Peter Cheung Department of Electrical & Electronic Engineering Imperial College London Clocks help the design of FSM where

More information

Chapter 13: Verification

Chapter 13: Verification Chapter 13: Verification Prof. Ming-Bo Lin Department of Electronic Engineering National Taiwan University of Science and Technology Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010,

More information

Synthesizable Finite State Machine Design Techniques Using the New SystemVerilog 3.0 Enhancements

Synthesizable Finite State Machine Design Techniques Using the New SystemVerilog 3.0 Enhancements Clifford E. Cummings SNUG-2003 San Jose, CA Voted Best Paper 2 nd Place Sunburst Design, Inc. ABSTRACT This paper details RTL coding and synthesis techniques of Finite State Machine (FSM) design using

More information

Modeling Registers and Counters

Modeling Registers and Counters Lab Workbook Introduction When several flip-flops are grouped together, with a common clock, to hold related information the resulting circuit is called a register. Just like flip-flops, registers may

More information

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics PROGETTO DI SISTEMI ELETTRONICI DIGITALI Digital Systems Design Digital Circuits Advanced Topics 1 Sequential circuit and metastability 2 Sequential circuit - FSM A Sequential circuit contains: Storage

More information

Finite State Machine Design and VHDL Coding Techniques

Finite State Machine Design and VHDL Coding Techniques Finite State Machine Design and VHDL Coding Techniques Iuliana CHIUCHISAN, Alin Dan POTORAC, Adrian GRAUR "Stefan cel Mare" University of Suceava str.universitatii nr.13, RO-720229 Suceava iulia@eed.usv.ro,

More information

ESP-CV Custom Design Formal Equivalence Checking Based on Symbolic Simulation

ESP-CV Custom Design Formal Equivalence Checking Based on Symbolic Simulation Datasheet -CV Custom Design Formal Equivalence Checking Based on Symbolic Simulation Overview -CV is an equivalence checker for full custom designs. It enables efficient comparison of a reference design

More information

Counters and Decoders

Counters and Decoders Physics 3330 Experiment #10 Fall 1999 Purpose Counters and Decoders In this experiment, you will design and construct a 4-bit ripple-through decade counter with a decimal read-out display. Such a counter

More information

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics PROGETTO DI SISTEMI ELETTRONICI DIGITALI Digital Systems Design Digital Circuits Advanced Topics 1 Sequential circuit and metastability 2 Sequential circuit A Sequential circuit contains: Storage elements:

More information

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012 Latches, the D Flip-Flop & Counter Design ECE 52A Winter 22 Reading Assignment Brown and Vranesic 7 Flip-Flops, Registers, Counters and a Simple Processor 7. Basic Latch 7.2 Gated SR Latch 7.2. Gated SR

More information

More Verilog. 8-bit Register with Synchronous Reset. Shift Register Example. N-bit Register with Asynchronous Reset.

More Verilog. 8-bit Register with Synchronous Reset. Shift Register Example. N-bit Register with Asynchronous Reset. More Verilog 8-bit Register with Synchronous Reset module reg8 (reset, CLK, D, Q); input reset; input [7:0] D; output [7:0] Q; reg [7:0] Q; if (reset) Q = 0; else Q = D; module // reg8 Verilog - 1 Verilog

More information

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop. Objectives Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop. describe how such a flip-flop can be SET and RESET. describe the disadvantage

More information

ECE 451 Verilog Exercises. Sept 14, 2007. James Barnes (James.Barnes@colostate.edu)

ECE 451 Verilog Exercises. Sept 14, 2007. James Barnes (James.Barnes@colostate.edu) ECE 451 Verilog Exercises Sept 14, 2007 James Barnes (James.Barnes@colostate.edu) Organization These slides give a series of self-paced exercises. Read the specification of each exercise and write your

More information

ModelSim-Altera Software Simulation User Guide

ModelSim-Altera Software Simulation User Guide ModelSim-Altera Software Simulation User Guide ModelSim-Altera Software Simulation User Guide 101 Innovation Drive San Jose, CA 95134 www.altera.com UG-01102-2.0 Document last updated for Altera Complete

More information

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter Description: The NTE2053 is a CMOS 8 bit successive approximation Analog to Digital converter in a 20 Lead DIP type package which uses a differential

More information

Life Cycle of a Memory Request. Ring Example: 2 requests for lock 17

Life Cycle of a Memory Request. Ring Example: 2 requests for lock 17 Life Cycle of a Memory Request (1) Use AQR or AQW to place address in AQ (2) If A[31]==0, check for hit in DCache Ring (3) Read Hit: place cache word in RQ; Write Hit: replace cache word with WQ RDDest/RDreturn

More information

The 104 Duke_ACC Machine

The 104 Duke_ACC Machine The 104 Duke_ACC Machine The goal of the next two lessons is to design and simulate a simple accumulator-based processor. The specifications for this processor and some of the QuartusII design components

More information

Chapter 7: Advanced Modeling Techniques

Chapter 7: Advanced Modeling Techniques Chapter 7: Advanced Modeling Techniques Prof. Ming-Bo Lin Department of Electronic Engineering National Taiwan University of Science and Technology Digital System Designs and Practices Using Verilog HDL

More information

CS311 Lecture: Sequential Circuits

CS311 Lecture: Sequential Circuits CS311 Lecture: Sequential Circuits Last revised 8/15/2007 Objectives: 1. To introduce asynchronous and synchronous flip-flops (latches and pulsetriggered, plus asynchronous preset/clear) 2. To introduce

More information

EXPERIMENT 8. Flip-Flops and Sequential Circuits

EXPERIMENT 8. Flip-Flops and Sequential Circuits EXPERIMENT 8. Flip-Flops and Sequential Circuits I. Introduction I.a. Objectives The objective of this experiment is to become familiar with the basic operational principles of flip-flops and counters.

More information

Module 3: Floyd, Digital Fundamental

Module 3: Floyd, Digital Fundamental Module 3: Lecturer : Yongsheng Gao Room : Tech - 3.25 Email : yongsheng.gao@griffith.edu.au Structure : 6 lectures 1 Tutorial Assessment: 1 Laboratory (5%) 1 Test (20%) Textbook : Floyd, Digital Fundamental

More information

7. Latches and Flip-Flops

7. Latches and Flip-Flops Chapter 7 Latches and Flip-Flops Page 1 of 18 7. Latches and Flip-Flops Latches and flip-flops are the basic elements for storing information. One latch or flip-flop can store one bit of information. The

More information

Asynchronous counters, except for the first block, work independently from a system clock.

Asynchronous counters, except for the first block, work independently from a system clock. Counters Some digital circuits are designed for the purpose of counting and this is when counters become useful. Counters are made with flip-flops, they can be asynchronous or synchronous and they can

More information

White Paper Utilizing Leveling Techniques in DDR3 SDRAM Memory Interfaces

White Paper Utilizing Leveling Techniques in DDR3 SDRAM Memory Interfaces White Paper Introduction The DDR3 SDRAM memory architectures support higher bandwidths with bus rates of 600 Mbps to 1.6 Gbps (300 to 800 MHz), 1.5V operation for lower power, and higher densities of 2

More information

Registers & Counters

Registers & Counters Objectives This section deals with some simple and useful sequential circuits. Its objectives are to: Introduce registers as multi-bit storage devices. Introduce counters by adding logic to registers implementing

More information

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements ) Sequential Logic (Materials taken from: Principles of Computer Hardware by Alan Clements ) Sequential vs. Combinational Circuits Combinatorial circuits: their outputs are computed entirely from their present

More information

State Machines in VHDL

State Machines in VHDL State Machines in VHDL Implementing state machines in VHDL is fun and easy provided you stick to some fairly well established forms. These styles for state machine coding given here is not intended to

More information

E158 Intro to CMOS VLSI Design. Alarm Clock

E158 Intro to CMOS VLSI Design. Alarm Clock E158 Intro to CMOS VLSI Design Alarm Clock Sarah Yi & Samuel (Tae) Lee 4/19/2010 Introduction The Alarm Clock chip includes the basic functions of an alarm clock such as a running clock time and alarm

More information

SVA4T: SystemVerilog Assertions - Techniques, Tips, Tricks, and Traps

SVA4T: SystemVerilog Assertions - Techniques, Tips, Tricks, and Traps SVA4T: SystemVerilog Assertions - Wolfgang Ecker, Volkan Esen, Thomas Kruse, Thomas Steininger Infineon Technologies Peter Jensen Syosil Consulting Abstract ABV (Assertion Based Verification) is a very

More information

Chapter 2 Clocks and Resets

Chapter 2 Clocks and Resets Chapter 2 Clocks and Resets 2.1 Introduction The cost of designing ASICs is increasing every year. In addition to the non-recurring engineering (NRE) and mask costs, development costs are increasing due

More information

Sequential Logic: Clocks, Registers, etc.

Sequential Logic: Clocks, Registers, etc. ENEE 245: igital Circuits & Systems Lab Lab 2 : Clocks, Registers, etc. ENEE 245: igital Circuits and Systems Laboratory Lab 2 Objectives The objectives of this laboratory are the following: To design

More information

Wiki Lab Book. This week is practice for wiki usage during the project.

Wiki Lab Book. This week is practice for wiki usage during the project. Wiki Lab Book Use a wiki as a lab book. Wikis are excellent tools for collaborative work (i.e. where you need to efficiently share lots of information and files with multiple people). This week is practice

More information

Prototyping ARM Cortex -A Processors using FPGA platforms

Prototyping ARM Cortex -A Processors using FPGA platforms Prototyping ARM Cortex -A Processors using FPGA platforms Brian Sibilsky and Fredrik Brosser April 2016 Page 1 of 17 Contents Introduction... 3 Gating... 4 RAM Implementation... 7 esign Partitioning...

More information

VHDL Test Bench Tutorial

VHDL Test Bench Tutorial University of Pennsylvania Department of Electrical and Systems Engineering ESE171 - Digital Design Laboratory VHDL Test Bench Tutorial Purpose The goal of this tutorial is to demonstrate how to automate

More information

GETTING STARTED WITH PROGRAMMABLE LOGIC DEVICES, THE 16V8 AND 20V8

GETTING STARTED WITH PROGRAMMABLE LOGIC DEVICES, THE 16V8 AND 20V8 GETTING STARTED WITH PROGRAMMABLE LOGIC DEVICES, THE 16V8 AND 20V8 Robert G. Brown All Rights Reserved August 25, 2000 Alta Engineering 58 Cedar Lane New Hartford, CT 06057-2905 (860) 489-8003 www.alta-engineering.com

More information

ECE 3401 Lecture 7. Concurrent Statements & Sequential Statements (Process)

ECE 3401 Lecture 7. Concurrent Statements & Sequential Statements (Process) ECE 3401 Lecture 7 Concurrent Statements & Sequential Statements (Process) Concurrent Statements VHDL provides four different types of concurrent statements namely: Signal Assignment Statement Simple Assignment

More information

Gate-Level Simulation Methodology

Gate-Level Simulation Methodology Improving Gate-Level Simulation Performance Author: Gagandeep Singh, Cadence Design Systems, Inc. The increase in design sizes and the complexity of timing checks at 40nm technology nodes and below is

More information

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 1/20 EE 42/100 Lecture 24: Latches and Flip Flops ELECTRONICS Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad University of California,

More information

CHAPTER 11: Flip Flops

CHAPTER 11: Flip Flops CHAPTER 11: Flip Flops In this chapter, you will be building the part of the circuit that controls the command sequencing. The required circuit must operate the counter and the memory chip. When the teach

More information

Flip-Flops, Registers, Counters, and a Simple Processor

Flip-Flops, Registers, Counters, and a Simple Processor June 8, 22 5:56 vra235_ch7 Sheet number Page number 349 black chapter 7 Flip-Flops, Registers, Counters, and a Simple Processor 7. Ng f3, h7 h6 349 June 8, 22 5:56 vra235_ch7 Sheet number 2 Page number

More information

Sequential Logic Design Principles.Latches and Flip-Flops

Sequential Logic Design Principles.Latches and Flip-Flops Sequential Logic Design Principles.Latches and Flip-Flops Doru Todinca Department of Computers Politehnica University of Timisoara Outline Introduction Bistable Elements Latches and Flip-Flops S-R Latch

More information

9/14/2011 14.9.2011 8:38

9/14/2011 14.9.2011 8:38 Algorithms and Implementation Platforms for Wireless Communications TLT-9706/ TKT-9636 (Seminar Course) BASICS OF FIELD PROGRAMMABLE GATE ARRAYS Waqar Hussain firstname.lastname@tut.fi Department of Computer

More information

Lecture 11: Sequential Circuit Design

Lecture 11: Sequential Circuit Design Lecture 11: Sequential Circuit esign Outline Sequencing Sequencing Element esign Max and Min-elay Clock Skew Time Borrowing Two-Phase Clocking 2 Sequencing Combinational logic output depends on current

More information

EE552. Advanced Logic Design and Switching Theory. Metastability. Ashirwad Bahukhandi. (Ashirwad Bahukhandi) bahukhan@usc.edu

EE552. Advanced Logic Design and Switching Theory. Metastability. Ashirwad Bahukhandi. (Ashirwad Bahukhandi) bahukhan@usc.edu EE552 Advanced Logic Design and Switching Theory Metastability by Ashirwad Bahukhandi (Ashirwad Bahukhandi) bahukhan@usc.edu This is an overview of what metastability is, ways of interpreting it, the issues

More information

Objective. Testing Principle. Types of Testing. Characterization Test. Verification Testing. VLSI Design Verification and Testing.

Objective. Testing Principle. Types of Testing. Characterization Test. Verification Testing. VLSI Design Verification and Testing. VLSI Design Verification and Testing Objective VLSI Testing Mohammad Tehranipoor Electrical and Computer Engineering University of Connecticut Need to understand Types of tests performed at different stages

More information

Lecture 10: Multiple Clock Domains

Lecture 10: Multiple Clock Domains Bluespec SystemVerilog Training Lecture 10: Multiple Clock Domains Copyright Bluespec, Inc., 2005-2008 Lecture 10: Multiple Clock Domains The Clock type, and functions Modules with different clocks Clock

More information

PowerPC Microprocessor Clock Modes

PowerPC Microprocessor Clock Modes nc. Freescale Semiconductor AN1269 (Freescale Order Number) 1/96 Application Note PowerPC Microprocessor Clock Modes The PowerPC microprocessors offer customers numerous clocking options. An internal phase-lock

More information

Lecture 8: Synchronous Digital Systems

Lecture 8: Synchronous Digital Systems Lecture 8: Synchronous Digital Systems The distinguishing feature of a synchronous digital system is that the circuit only changes in response to a system clock. For example, consider the edge triggered

More information

Lesson 12 Sequential Circuits: Flip-Flops

Lesson 12 Sequential Circuits: Flip-Flops Lesson 12 Sequential Circuits: Flip-Flops 1. Overview of a Synchronous Sequential Circuit We saw from last lesson that the level sensitive latches could cause instability in a sequential system. This instability

More information

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa Experiment # 9 Clock generator circuits & Counters Eng. Waleed Y. Mousa 1. Objectives: 1. Understanding the principles and construction of Clock generator. 2. To be familiar with clock pulse generation

More information

CLOCK DOMAIN CROSSING CLOSING THE LOOP ON CLOCK DOMAIN FUNCTIONAL IMPLEMENTATION PROBLEMS

CLOCK DOMAIN CROSSING CLOSING THE LOOP ON CLOCK DOMAIN FUNCTIONAL IMPLEMENTATION PROBLEMS TECHNICAL PAPER CLOCK DOMAIN CROSSING CLOSING THE LOOP ON CLOCK DOMAIN FUNCTIONAL IMPLEMENTATION PROBLEMS TABLE OF CONTENTS 1 Overview...........................................................................1

More information

Lecture 10: Sequential Circuits

Lecture 10: Sequential Circuits Introduction to CMOS VLSI esign Lecture 10: Sequential Circuits avid Harris Harvey Mudd College Spring 2004 Outline q Sequencing q Sequencing Element esign q Max and Min-elay q Clock Skew q Time Borrowing

More information

SystemVerilog Is Getting Even Better!

SystemVerilog Is Getting Even Better! by, SystemVerilog Is Getting Even Better! An Update on the Proposed 2009 SystemVerilog Standard Part 2 presented by Clifford E. Cummings Sunburst Design, Inc. cliffc@sunburst-design.com www.sunburst-design.com

More information

New Verilog-2001 Techniques for Creating Parameterized Models (or Down With `define and Death of a defparam!)

New Verilog-2001 Techniques for Creating Parameterized Models (or Down With `define and Death of a defparam!) New Verilog-2001 Techniques for Creating Parameterized Models (or Down With `define and Death of a defparam!) Clifford E. Cummings Sunburst Design, Inc. Abstract Creating reusable models typically requires

More information

Traffic Light Controller. Digital Systems Design. Dr. Ted Shaneyfelt

Traffic Light Controller. Digital Systems Design. Dr. Ted Shaneyfelt Traffic Light Controller Digital Systems Design Dr. Ted Shaneyfelt December 3, 2008 Table of Contents I. Introduction 3 A. Problem Statement 3 B. Illustration 3 C. State Machine 3 II. Procedure 4 A. State

More information

RAPID PROTOTYPING OF DIGITAL SYSTEMS Second Edition

RAPID PROTOTYPING OF DIGITAL SYSTEMS Second Edition RAPID PROTOTYPING OF DIGITAL SYSTEMS Second Edition A Tutorial Approach James O. Hamblen Georgia Institute of Technology Michael D. Furman Georgia Institute of Technology KLUWER ACADEMIC PUBLISHERS Boston

More information

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas Take-Home Exercise Assume you want the counter below to count mod-6 backward. That is, it would count 0-5-4-3-2-1-0, etc. Assume it is reset on startup, and design the wiring to make the counter count

More information

Counters. Present State Next State A B A B 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0

Counters. Present State Next State A B A B 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0 ounter ounters ounters are a specific type of sequential circuit. Like registers, the state, or the flip-flop values themselves, serves as the output. The output value increases by one on each clock cycle.

More information

Manchester Encoder-Decoder for Xilinx CPLDs

Manchester Encoder-Decoder for Xilinx CPLDs Application Note: CoolRunner CPLDs R XAPP339 (v.3) October, 22 Manchester Encoder-Decoder for Xilinx CPLDs Summary This application note provides a functional description of VHDL and Verilog source code

More information

Using SystemVerilog Assertions for Creating Property-Based Checkers

Using SystemVerilog Assertions for Creating Property-Based Checkers Using SystemVerilog Assertions for Creating Property-Based Checkers Eduard Cerny Synopsys, Inc. Marlborough, USA edcerny@synopsys.com Dmitry Korchemny Intel Corp. Haifa, Israel dmitry.korchemny@intel.com

More information

Jianjian Song LogicWorks 4 Tutorials (5/15/03) Page 1 of 14

Jianjian Song LogicWorks 4 Tutorials (5/15/03) Page 1 of 14 LogicWorks 4 Tutorials Jianjian Song Department of Electrical and Computer Engineering Rose-Hulman Institute of Technology March 23 Table of Contents LogicWorks 4 Installation and update...2 2 Tutorial

More information

Contents COUNTER. Unit III- Counters

Contents COUNTER. Unit III- Counters COUNTER Contents COUNTER...1 Frequency Division...2 Divide-by-2 Counter... 3 Toggle Flip-Flop...3 Frequency Division using Toggle Flip-flops...5 Truth Table for a 3-bit Asynchronous Up Counter...6 Modulo

More information

Assertion Synthesis Enabling Assertion-Based Verification For Simulation, Formal and Emulation Flows

Assertion Synthesis Enabling Assertion-Based Verification For Simulation, Formal and Emulation Flows Assertion Synthesis Enabling Assertion-Based Verification For Simulation, Formal and Emulation Flows Manual Assertion Creation is ABV Bottleneck Assertion-Based Verification adopted by leading design companies

More information

Sequential Circuits. Combinational Circuits Outputs depend on the current inputs

Sequential Circuits. Combinational Circuits Outputs depend on the current inputs Principles of VLSI esign Sequential Circuits Sequential Circuits Combinational Circuits Outputs depend on the current inputs Sequential Circuits Outputs depend on current and previous inputs Requires separating

More information

Design Compiler Graphical Create a Better Starting Point for Faster Physical Implementation

Design Compiler Graphical Create a Better Starting Point for Faster Physical Implementation Datasheet Create a Better Starting Point for Faster Physical Implementation Overview Continuing the trend of delivering innovative synthesis technology, Design Compiler Graphical delivers superior quality

More information

Timing Methodologies (cont d) Registers. Typical timing specifications. Synchronous System Model. Short Paths. System Clock Frequency

Timing Methodologies (cont d) Registers. Typical timing specifications. Synchronous System Model. Short Paths. System Clock Frequency Registers Timing Methodologies (cont d) Sample data using clock Hold data between clock cycles Computation (and delay) occurs between registers efinition of terms setup time: minimum time before the clocking

More information

Lecture 5: Gate Logic Logic Optimization

Lecture 5: Gate Logic Logic Optimization Lecture 5: Gate Logic Logic Optimization MAH, AEN EE271 Lecture 5 1 Overview Reading McCluskey, Logic Design Principles- or any text in boolean algebra Introduction We could design at the level of irsim

More information

Getting off the ground when creating an RVM test-bench

Getting off the ground when creating an RVM test-bench Getting off the ground when creating an RVM test-bench Rich Musacchio, Ning Guo Paradigm Works rich.musacchio@paradigm-works.com,ning.guo@paradigm-works.com ABSTRACT RVM compliant environments provide

More information

Decimal Number (base 10) Binary Number (base 2)

Decimal Number (base 10) Binary Number (base 2) LECTURE 5. BINARY COUNTER Before starting with counters there is some vital information that needs to be understood. The most important is the fact that since the outputs of a digital chip can only be

More information

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill Objectives: Analyze the operation of sequential logic circuits. Understand the operation of digital counters.

More information

Lab 1: Full Adder 0.0

Lab 1: Full Adder 0.0 Lab 1: Full Adder 0.0 Introduction In this lab you will design a simple digital circuit called a full adder. You will then use logic gates to draw a schematic for the circuit. Finally, you will verify

More information

Lab 1: Introduction to Xilinx ISE Tutorial

Lab 1: Introduction to Xilinx ISE Tutorial Lab 1: Introduction to Xilinx ISE Tutorial This tutorial will introduce the reader to the Xilinx ISE software. Stepby-step instructions will be given to guide the reader through generating a project, creating

More information

6-BIT UNIVERSAL UP/DOWN COUNTER

6-BIT UNIVERSAL UP/DOWN COUNTER 6-BIT UNIVERSAL UP/DOWN COUNTER FEATURES DESCRIPTION 550MHz count frequency Extended 100E VEE range of 4.2V to 5.5V Look-ahead-carry input and output Fully synchronous up and down counting Asynchronous

More information

Clock Domain Crossing (CDC) Design & Verification Techniques Using SystemVerilog

Clock Domain Crossing (CDC) Design & Verification Techniques Using SystemVerilog SNUG-2008 Boston, MA Voted Best Paper 1st Place World Class Verilog & SystemVerilog Training Clifford E. Cummings Sunburst Design, Inc. cliffc@sunburst-design.com ABSTRACT Important design considerations

More information

81110A Pulse Pattern Generator Simulating Distorted Signals for Tolerance Testing

81110A Pulse Pattern Generator Simulating Distorted Signals for Tolerance Testing 81110A Pulse Pattern Generator Simulating Distorted Signals for Tolerance Testing Application Note Introduction Industry sectors including computer and components, aerospace defense and education all require

More information

Verilog: always @ Blocks

Verilog: always @ Blocks Verilog: always @ Blocks hris Fletcher U Berkeley Version 0.2008.9.4 September 5, 2008 Introduction Sections. to.6 discuss always@ blocks in Verilog, and when to use the two major flavors of always@ block,

More information

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012 Flip-Flops and Sequential Circuit Design ECE 52 Winter 22 Reading ssignment Brown and Vranesic 7 Flip-Flops, Registers, Counters and a Simple Processor 7.5 T Flip-Flop 7.5. Configurable Flip-Flops 7.6

More information

Flip-Flops and Sequential Circuit Design

Flip-Flops and Sequential Circuit Design Flip-Flops and Sequential Circuit Design ECE 52 Winter 22 Reading ssignment Brown and Vranesic 7 Flip-Flops, Registers, Counters and a Simple Processor 7.5 T Flip-Flop 7.5. Configurable Flip-Flops 7.6

More information

Testing Low Power Designs with Power-Aware Test Manage Manufacturing Test Power Issues with DFTMAX and TetraMAX

Testing Low Power Designs with Power-Aware Test Manage Manufacturing Test Power Issues with DFTMAX and TetraMAX White Paper Testing Low Power Designs with Power-Aware Test Manage Manufacturing Test Power Issues with DFTMAX and TetraMAX April 2010 Cy Hay Product Manager, Synopsys Introduction The most important trend

More information

FINITE STATE MACHINE: PRINCIPLE AND PRACTICE

FINITE STATE MACHINE: PRINCIPLE AND PRACTICE CHAPTER 10 FINITE STATE MACHINE: PRINCIPLE AND PRACTICE A finite state machine (FSM) is a sequential circuit with random next-state logic. Unlike the regular sequential circuit discussed in Chapters 8

More information

The Fundamentals of Efficient Synthesizable Finite State Machine Design using NC-Verilog and BuildGates. Clifford E. Cummings

The Fundamentals of Efficient Synthesizable Finite State Machine Design using NC-Verilog and BuildGates. Clifford E. Cummings The Fundamentals of Efficient Synthesizable Finite State Machine ICU-2002 San Jose, CA Voted Best Paper 2 nd Place Clifford E. Cummings Sunburst Design, Inc. 503-641-8446 cliffc@sunburst-design.com INTERNATIONAL

More information

Digital Circuit Design Using Xilinx ISE Tools

Digital Circuit Design Using Xilinx ISE Tools Digital Circuit Design Using Xilinx ISE Tools Contents 1. Introduction... 1 2. Programmable Logic Device: FPGA... 2 3. Creating a New Project... 2 4. Synthesis and Implementation of the Design... 11 5.

More information

Chapter 9 Latches, Flip-Flops, and Timers

Chapter 9 Latches, Flip-Flops, and Timers ETEC 23 Programmable Logic Devices Chapter 9 Latches, Flip-Flops, and Timers Shawnee State University Department of Industrial and Engineering Technologies Copyright 27 by Janna B. Gallaher Latches A temporary

More information

Memory Elements. Combinational logic cannot remember

Memory Elements. Combinational logic cannot remember Memory Elements Combinational logic cannot remember Output logic values are function of inputs only Feedback is needed to be able to remember a logic value Memory elements are needed in most digital logic

More information