Home

Advertisement

Customize

Nov. 1st, 2007

Testing Glossary

 

 

Black box testing
not based on any knowledge of internal design or code. Tests are based on requirements and functionality. 
White box testing
based on knowledge of the internal logic of an application's code. Tests are based on coverage of code statements, branches, paths, conditions. 
Unit testing
the most 'micro' scale of testing; to test particular functions or code modules. Typically done by the programmer and not by testers, as it requires detailed knowledge of the internal program design and code. Not always easily done unless the application has a well-designed architecture with tight code; may require developing test driver modules or test harnesses. 
Incremental integration testing
continuous testing of an application as new functionality is added; requires that various aspects of an application's functionality be independent enough to work separately before all parts of the program are completed, or that test drivers be developed as needed; done by programmers or by testers. 
Integration testing
testing of combined parts of an application to determine if they function together correctly. The 'parts' can be code modules, individual applications, client and server applications on a network, etc. This type of testing is especially relevant to client/server and distributed systems. 
Functional testing
black-box type testing geared to functional requirements of an application; this type of testing should be done by testers. This doesn't mean that the programmers shouldn't check that their code works before releasing it (which of course applies to any stage of testing.) 
System testing
black box type testing that is based on overall requirement specifications; covers all combined parts of a system. 
End-to-end testing 
similar to system testing; the 'macro' end of the test scale; involves testing of a complete application environment in a situation that mimics real-world use, such as interacting with a database, using network communications, or interacting with other hardware, applications, or systems if appropriate. 
Sanity testing
typically an initial testing effort to determine if a new software version is performing well enough to accept it for a major testing effort. For example, if the new software is crashing systems every 5 minutes, bogging down systems to a crawl, or destroying databases, the software may not be in a 'sane' enough condition to warrant further testing in its current state. 
Regression testing
re-testing after fixes or modifications of the software or its environment. It can be difficult to determine how much re-testing is needed, especially near the end of the development cycle. Automated testing tools can be especially useful for this type of testing. 
Acceptance testing
final testing based on specifications of the end-user or customer, or based on use by end-users/customers over some limited period of time. 
Load testing
testing an application under heavy loads, such as testing of a web site under a range of loads to determine at what point the systems response time degrades or fails. 
Stress testing
term often used interchangeably with 'load' and 'performance' testing. Also used to describe such tests as system functional testing while under unusually heavy loads, heavy repetition of certain actions or inputs, input of large numerical values, large complex queries to a database system, etc. 
Performance testing
term often used interchangeably with 'stress' and 'load' testing. Ideally 'performance' testing (and any other 'type' of testing) is defined in requirements documentation or QA or Test Plans. 
Usability testing
testing for 'user-friendliness'. Clearly this is subjective, and will depend on the targeted end-user or customer. User interviews, surveys, video recording of user sessions, and other techniques can be used. Programmers and testers are usually not appropriate as usability testers. 
Install/uninstall testing
testing of full, partial, or upgrade install/uninstall processes. 
Recovery testing
testing how well a system recovers from crashes, hardware failures, or other catastrophic problems. 
Security testing
testing how well the system protects against unauthorized internal or external access, willful damage, etc; may require sophisticated testing techniques. 
Compatibility testing
testing how well software performs in a particular hardware/software/operating system/network/etc. environment. 
Exploratory testing
often taken to mean a creative, informal software test that is not based on formal test plans or test cases; testers may be learning the software as they test it. 
Ad-hoc testing
similar to exploratory testing, but often taken to mean that the testers have significant understanding of the software before testing it. 
User acceptance testing
determining if software is satisfactory to an end-user or customer. 
Comparison testing
comparing software weaknesses and strengths to competing products. 
Alpha testing
testing of an application when development is nearing completion; minor design changes may still be made as a result of such testing. Typically done by end-users or others, not by programmers or testers. 
Beta testing
testing when development and testing are essentially completed and final bugs and problems need to be found before final release. Typically done by end-users or others, not by programmers or testers. 
Mutation testing
a method for determining if a set of test data or test cases is useful, by deliberately introducing various code changes ('bugs') and retesting with the original test data/cases to determine if the 'bugs' are detected. Proper implementation requires large computational resources.
Tags:

Oct. 4th, 2007

FPGA speed definition !

 

So the question is how fast can FPGA go ? In todays scenario where the high speed communication system is expected to support upto few Gbps, the need to understand the factors invovled in calculating the max speed becomes important.

Lets start form basics, there are 2 different terms viz : MHz and bps (bits per second), the later term defines the IO throughput  and the former defines the clock frequency. With LVDS standard, its possible to transmit data both at rising and falling edge of the clock. Hence as a thumb rule the throughput is normally double the max clock freq.

The following functional areas determine the overall operating speed of the FPGA:

  1. I/O interface
  2. Logic implementation
  3. Clock tree and PLL
  4. Other functional blocks

The I/O speed is generally measured by input setup/hold time and output clock-to-out time. This will give us the raw speed in terms of frequency (MHz) or data rate (Mbps) of the individual I/O interface.  If an application requires multiple I/O pins, the skew between the pins will affect the I/O operation speed as well.

Logic implementation speed is generally determined by the internal register-to-register operation speed. The register-to-register speed is determined by the logic block and routing delays between the registers. The FPGA static timing analysis tool will report the register to register speed in MHz or point to point delay.

Clock tree delay skew and PLL (sysCLOCK PLL) speed also are part of the determining factor for the logic speed.  Clock tree delay skew will directly impact the logic register-to-register speed.  Again, the FPGA static timing analysis tool will report this as part of the register-to-register speed of operation in MHz. PLLs will generally be able to support the fastest speed that the registers and logic can operate.

Other functional blocks like Embedded Block RAM (EBR) and Multiplier (sysDSP) will also have their associated operating frequencies.  These operating frequencies are all taken into account into the overall speed of operation for the FPGA. 

The question "how fast do FPGAs go?" can be answered in terms of frequency in MHz.  But this simple frequency of operation is made up of all the components discussed above.  The following are the LatticeECP2 FPGA specifications for each component of speed. These specifications tell us how fast LatticeECP2 FPGAs go.

  • I/O - 840Mbps generic LVDS
  • Logic - 250MHz to 500MHz
  • Clock tree/PLL - 420MHz
  • EBR - 350MHz
  • DSP - 325MHz

Set-up and Hold Times !

Many designers are familiar with setup and hold time definitions - however, few can identify correctly the launch and capture edges and the slack/violation between two flops during timing analysis. In this post, we will cover setup/hold times in a design with clear examples.

Setup time is defined as the minimum amount of time BEFORE the clock’s active edge by which the data must be stable for it to be latched correctly. Any violation in this minimum required time causes incorrect data to be captured and is known as setup violation.

Hold time is defined as the minimum amount of time AFTER the clock’s active edge during which the data must be stable. Any violation in this required time causes incorrect data to be latched and is known as hold violation.

The setup time in a design determines the maximum frequency at which the chip can run without any timing failures. Factors affecting the setup analysis are the clock period Tclk, Clock to Q propagation delay of the launch flop Tck->q, negative clock skew Tskew, required setup time of the capture flop Tfs and combinational logic delay Tcomb between the two flops being timed. The following condition must be satisfied.

Tfs <= Tclk – Tck->q – Tskew – Tcomb

Hold analysis depends on the Tck->q, combinational logic delay, the clock skew and the hold time requirement Tfh of the capture flop. It is independent of the frequency of the clock. The condition below must be satisfied.

Tck->q + Tskew + Tcomb >= Tfh

Consider the figure below depicting a flop to flop path in the same domain with some combinational logic between them. We will now calculate the setup and hold time slacks in the design based on the given timing parameters.

Setup and Hold time Illustration

Setup and Hold time illustration - Full cycle transfer

For setup checks in single cycle paths, the clock edges that are relevant is shown in the Figure above. The data required time for the capture flop B to meet setup is

Data Required time = (Clock Period + Clock Insertion Delay + Clock Skew - Setup time of the flop) = 8 + 2 + 0.25 -0.1 = 10.15 ns

The data arrival time from the launch flop is

Data Arrival time = (Clock Insertion Delay + CK->Q Delay of the launch flop + Combinational logic Delay) = 2 + 0.1 + 5 = 7.1 ns.

Setup slack is

Setup Margin = Data Required Time - Data Arrival Time = 10.15 - 7.10 = 3.05 ns

 

Similarly for hold checks assuming the hold time requirement of the flop B is 100 ps, the data expected time is

Data expected time = (Clock Insertion Delay + Clock skew + Hold time requirement of flop) = 2 + 0.25 +0.1 = 2.35 ns.

So the hold time slack is

Hold Margin = Data Arrival time - Data expected time = 7.10 - 2.35 = 4.85 ns

Consider the case where the clock to flop B is inverted (or that the flop is negative edge trigerred). In this particular case, the relevant edges for setup/hold are as shown in the figure below.

Setup and Hold Illustration - 2

Setup and Hold time illustration - Half cycle transfer

 

In this scenario, the setup margin considering all the other parameters to be the same is

Data Required time = (half_clock_period + clock insertion delay + Ck->Q delay of flop A - Setup time required for flop B) = 4 + 2 + 0.25 -0.1 = 6.15 ns

Since the Data Arrival time remains the same, there is a setup violation of

Setup violation = 6.15 ns - 7.10 ns = -1.05 ns

There is no hold violation since the data arrival time remains the time but the data expected time is any time after (Clock skew + Hold time requirement of flop B)

Data expected time = 0.25 + 0.1 = 0.35 ns

Hold Margin = 7.10 - 0.35 = 6.75 ns

RTL coding guidelines

  • Document in detail interface timing and signal descriptions, clock and reset strategy, modular view of the design and FSMs prior to RTL coding
  • Have a comment “header” for each module with functionality description, version and a log of past changes. This can be managed using a revision control system like celarcase, CVS etc.
  • Do not include more than one module in one file and the module name should match the filename in the design.
  • Be generous while adding comments where necessary - like inputs and outputs.
  • Indent your code and use Emacc verilog mode for connectivity to keep it error-free. Split the design into separate modules based on clock domains.
  • Use separate always @ blocks for sequential and combinational logic. Always use non-blocking assignments for sequential logic and blocking assignments for combinational logic.
  • Avoid “parallel_case full_case” compiler directives and always add a default clause for case statements.
  • Do NOT assign the same variable in more than one always@ block.
  • Use “if-else” only for priority encoders and case statements for parallel states.
  • Avoid inferring latches in the design, clock gating and instantiating gates in the design to keep it technology independent.
  • Register all inputs and outputs in the design to ease timing closure.
  • Use dual stage synchronizer cells available in the library than two stage flops for synchronization.
  • Use reset synchronizers for asynchronous resets. Add DFT bypass muxes for reset and clock controllability where necessary.
  • Avoid combinational loops in the design to aid timing analysis and DFT
  • Avoid using clock as data for flop inputs for hassle free DFT insertion.
  • Do not mix posedge and negedge flops in the same module where possible.
  • Always separate the combinational and sequential logic in a FSM with two always@ blocks.
  • Always code with design reuse in mind - For example, FIFOs can be made generic and can be customized by passing parameters while being instantiated.
  • Remember the thumb rule - Be conservative in what you transmit and be generous in what you receive
  • Parenthesize all operations without depending on the reader to figure out the precedence of operators.

November 2007

S M T W T F S
    123
45678910
11121314151617
18192021222324
252627282930 

Tags

Syndicate

RSS Atom
Powered by LiveJournal.com

Advertisement

Customize