Use Spyglass Predictive Analysis For Effective RTL Coding

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Technology Focus Predictive Analysis

Use SpyGlass Predictive


Analysis for Effective
RTL Coding
Atrenta Inc.’s SpyGlass software uses a
“look-ahead” engine based on fast-synthesis
technology to help you identify potential problems –
and fix them – early in the design process.

by Bhanu Kapoor
Technology Director
Atrenta Inc.
bkapoor@atrenta.com

Decisions made early in the design process


affect the entire chip design process. Thus,
to manage designs effectively, the
tools you use for RTL (register
transfer level/language) design
must enable a stepwise refine-
ment of the code by predicting
likely downstream problems.
For example, to achieve high
performance, the guidelines for
synchronous design must be
met, as they play an important role
toward meeting timing objectives.
Recognizing the importance of adher-
ence to appropriate guidelines during the
RTL coding process, Xilinx recommends a
set of coding guidelines for designs target-
ing the various Xilinx device families. Most
designers currently follow a manual
method of design reviews to check to see if
coding guidelines have been met. This
manual method is both prone to error and
time consuming. Automating adherence to

00 Xcell Journal Spring 2003


Technology Focus Predictive Analysis

RTL coding guidelines, therefore, would process of RTL code development. Policy Engine
greatly increase the timely success of proj- Examples of such policies include lint, The policy engine accelerates electronic
ects targeting high-performance designs on reuse, verification, timing, and testability. product development by enabling develop-
Xilinx device families, such as the ment teams to capture, aggregate, distrib-
Virtex™-II series of platform FPGAs. Rule Groups ute, and apply constraints and requirements
The SpyGlass™ Predictive Analyzer A collection of rules within a policy is early in the development cycle. The fast
tool from Atrenta Inc. automates the termed a group. Typically, groups consist synthesis engine internally creates a struc-
process of meeting design guidelines of rules addressing a particular area of tural view of the design and foresees down-
through the use of an underlying predic- interest in the RTL code. Groups are hier- stream issues early in the development
tive analysis technology. This approach archical, meaning that a group can contain cycle, thereby eliminating errors at the ear-
performs detailed structural analysis on other lower-level rule groups as well as liest possible stage.
RTL aspects to check for Although you can
coding styles, RTL-handoff, check many complex rules
design reuse, clock/reset statically on the internal
requirements, verification, synthesized structural
timing guidelines, and view, other rules require
much more. The SpyGlass some understanding of the
tool employs a “look- logic function of the
ahead” engine based on design. This is particularly
fast-synthesis technology true for testability-related
and a fast, built-in, cycle- checks. In order to per-
based simulator to carry out form a testability check,
such analyses. Such a look- you must use an evaluator.
ahead methodology only The evaluator in the poli-
uses RTL code as input to cy engine is effectively a
the SpyGlass tool and does zero-delay, cycle-based
not require any vectors or simulator you can use to
assertions. It is therefore resolve functional design
very easy to set up and run. constraints, as well as carry
out a simulation required
Policy-Based RTL Coding to set up the design for
The SpyGlass™ Predictive testability analysis.
Analyzer is a comprehensive, Policy implementa-
policy-based system that tion requires a traversal
defines, in a succinct and engine that works on the
Figure 1 - Example of policy consisting of rule groups and rules
organized way, design poli- RTL netlist produced by
cies that automatically point fast synthesis. The
out time-consuming downstream issues. individual rules. A group provides an addi- SpyGlass engine generates basic primitives
The SpyGlass tool then offers suggestions tional level of modularity in applying poli- for rules that cover design traversal. The
on ways to overcome these downstream cies to a given RTL design. connectivity information, coupled with
issues during the RTL code development the traversal primitives, enable you to cre-
process. This helps you to meet your time- Rules ate rules that look for violations across the
to-market target. A rule is the most fundamental element in design hierarchy.
the policy-based management system. It By applying a policy over a given RTL
Policy describes a set of conditions that – when design code, you can obtain a wealth of
A policy is a collection of rules for a specif- checked by the policy engine – result in an information about the design – as well as
ic purpose, such as rules associated with a indication of a specific problem with the any of violations of the defined rules. The
standard, a silicon vendor, or a specific RTL code. Rules allow standard analysis SpyGlass interface highlights rule viola-
design tool. Policies enhance user extensi- of the RTL code. An example of a policy, tions on the specific lines of RTL code.
bility, allowing you to develop and manage rule groups, and rules in the SpyGlass sys- Not only does the SpyGlass predictive
customized groupings of rules more easily. tem is shown in Figure 1. With this sys- analysis tool offer an extensive help func-
The design methodology includes a set of tem, you can selectively turn on specific tion to assist you in understanding the
policies that you can select during the groups or specific rules within a group. nature of the violation, but also, where

Spring 2003 Xcell Journal 00


Technology Focus Predictive Analysis

to Xilinx FPGA designs:


• Single clock edge is used in the design
to clock the data.
• Internally derived or generated clocks and
set/resets are not used in the design.
• Appropriate synchronizers are used as sig-
nals cross clock-domain boundaries.
• The number of levels of logic between
registers is less than a specified value.
• The fanout of any design node does not
exceed a specified number.
• Unintended latch inferences are avoided
in the code.
• If-then-else or case statements are not
nested deeper than three levels.
• Naming conventions are followed while
coding pipeline logic.
Figure 2 - Example of rule violation and associated debug windows • Assess memory requirements and find out
feasibility of conversion into regular flops,
appropriate, it makes suggestions for mentation. For this reason, it is important distributed memory, and block memory.
resolving the problem. to identify the clocks and resets in the
• For state machines, separate the next-state
Moreover, each violation is highlighted design, as well as the clock-tree network,
decoding and output decoding into two
on a structural view of the design, which early in the code development process.
discrete processes or always blocks.
can give you additional debugging infor- Many designs, especially in the net-
mation for complex problems. And, as working domain, typically use multiple • Outputs from design units are registered.
shown in Figure 2, cross-probing between clock domains, a situation that presents
• Identify dead code and floating nodes
the code and structural views reveals an challenging integration and verification
in the design.
example of a clock domain synchronization issues. Signals that originate in one clock
problem. Additionally, a comprehensive set domain may be used in other clock Several of these checks are critical for
of reporting mechanisms and violation domains. Correct chip operation can only meeting timing objectives in high perform-
management utilities – such as waiver to be ensured if rules governing correct use of ance designs.
allow a specific rule violation in a given signals across asynchronous clock bound-
point in the design – further facilitate the aries are followed. Conclusion
RTL coding and assessment process. The routability of design is another We have described the elements of policy-
aspect that can benefit greatly by follow- based design methodology, enabled
Coding for Xilinx Devices ing appropriate coding guidelines. The through SpyGlass predictive analysis, for
Xilinx recommends a set of coding guide- number of I/Os, fanout of intermediate effective RTL coding leading to efficient
lines for designs targeting the various nodes, and widths of internal buses must implementation of designs on Xilinx-based
Xilinx device families. These include gener- meet specified limits for various parts of a platforms. This approach performs detailed
al coding guidelines, as well as synthesiz- given design. structural analysis on RTL code to check
able HDL guidelines. Furthermore, syn- Using the SpyGlass predictive analysis for coding styles, design reuse, clock/reset
chronous design guidelines help you meet system, you can check for all of the above requirements, verification, timing guide-
timing objectives in high-performance violations, problems, and issues during lines, and more. SpyGlass software includes
designs such as those targeting the Virtex- the RTL coding process itself. This saves the most comprehensive coverage of
II FPGAs, which can accommodate as many design iterations that might other- Xilinx-recommended coding guidelines
many as 8 million gates and operate at fre- wise be needed to fix errors later in the that are essential for reuse and efficient
quencies as high as 400 MHz. design cycle. design implementation.
Clock distribution also requires specific Specifically, you can use the SpyGlass To learn more about SpyGlass predic-
design code guidelines for successful imple- tool to check the following issues relevant tive analysis, go to www.atrenta.com.

00 Xcell Journal Spring 2003

You might also like