Professional Documents
Culture Documents
Optimizing Multiple
EDA Tools within the
ASIC Design Flow
Lionel Bening and Harry Foster
Hewlett-Packard
46
application-oriented libraries. With this technique, engineers can generate optimized libraries
for specic process points in the design ow.
We favor an alternate approach to VHDL
and Verilog, one that defines text macros for
various objects in the design (for example, an
n-bit register, specific multiplexer, or latch
arrays). Designers instantiate these high-level
text macros within their HDL. The HDL is then
preprocessed to expand the text macro into
either a module instantiation or inline code.
Our text-macro approach lets engineers modify module interfaces (if required), support
inline code expansion, and customize projectspecic needs seamlesslyall controlled at a
single point within the design ow.
Benefits of text macros
On the surface, our proposed object-based
or text-macro methodology might appear to
recommend coding the design at a low gate
instance or cell-based level. On the contrary, a
text-macro hardware design methodology
enables coding at a higher abstraction level.
The engineer is free to design with higher-level
objects rather than coding lower-level implementation details, meaning tool-specific optimization details are isolated and localized
within process-specic libraries.
Furthermore, the text-macro methodology
facilitates design reuse9 by maintaining cell technology independence, which, if required, is controlled within a synthesis-targeted library.10 The
inference of register cells from a library object is
still possible during the synthesis process.
Alternatively, explicitly referencing a unique
technology cell type within the library object can
be controlled during synthesis, depending on
the users synthesis optimization requirement.
Based on our experience developing large
systems with this methodology, developing the
text-macro object libraries does not require signicant effort. The cost of revisiting tens of thousands of lines of RTL code simply to optimize
or enable a new verification feature
compared with the cost of developing tool-specific librariessupports our cost-effective,
object-based hardware design approach.
In the rest of this article, we highlight example processes in a typical design ow and the
47
Optimizing simulation
In many design projects, RTL logic simulation
consumes most of the computing and human
effort in design verication before tape-out.
Macro-library-based renement can optimize the
simulations performance and support verication techniques, such as two-state initialization.
Two-state initialization
Faster simulation can be achieved by means
of two-state simulation. However, proper handling of register initialization, as well as non-twostate input port values, needs to be addressed.
Tool-specic macro library renements support
the random initialization and X-Z-state trapping
in two-state RTL logic simulation, which is central to our proposed methodology.11 Random initialization addresses start-up problems in a
design, where some (or all) power-on states are
incorrect states for functional hardware. The solution would be, for example, to turn the power off
and on one or more times as needed to bring up
a device in a correctly functioning state.
The two-state random initializations coverage of start-up problems was superior to RTL
simulations coverage with an X state. While it
is widely known that RTL simulation is grossly
pessimistic compared to gate-level simulation,
RTL simulation with an X state can be optimistic as well. RTL simulation X-state pessimism
often points out malfunctions even where there
is no combination of Boolean 1/0 values that
fail. With RTL simulation X-state optimism, simulations pass tests using X states and fail when
1/0 values replace the X states. This optimism
can occur when designers use if-else and casewith-default behavioral RTL statements instead
of lower-level Boolean RTL statements. An
incoming X can result in an optimistic 0 or 1
output when the if takes the else branch or
when the case takes the default branch.
48
adds a hierarchy level. The RTL simulation optimizer must eliminate any simulation runtime
overhead resulting from hierarchy boundaries
by removing those boundaries. In the attening
process, the optimization replaces the ip-op
instances with the code for the ip-op model:
dffr r0( .d(dp_a), .ck (ck),
.q (dp_ff[0:3]), .r (rst));
dffr r1( .d(dp_b), .ck (ck),
.q (dp_ff[4:7]), .r (rst));
becomes
always @(posedge ck)
begin
if (!rst)
dp_ff[0:3] <= dp_a;
else
dp_ff[0:3] <= 4b0;
end
always @(posedge ck)
begin
if (!rst)
dp_ff[4:7] <= dp_b;
else
dp_ff[4:7] <= 4b0;
end
or
always @(posedge ck)
q <= d;
49
Register
transfer level (RTL)
with text macros
module Top ();
case () ;
if () ;
RTL text
macro preprocessor
Equivalence
checker
Simulationtargeted library
module dff_3 ();
wire [0:3] d; reg [0:3] q:
always @ (posedge ck)
if (dsel)
q<=d;
else if (i_scan)
Flat gate
Synthesistargeted library
Equivalence
checker
Vendor
cell library
module dff_3 ();
SMUX a0 ();
XDFF r0 (q[0], )'
XDFF r1 (q[1], );
XDFF r2 (q[2], );
50
51
Text macro
library
Text macro
preprocessor
Register transfer
level with
text macros
Modelchecking
library
Model
checker
Equivalence
checker
Simulation
library
Simulation
Equivalence
checker
Equivalencechecking
library
Register
transfer level
Equivalence
checker
Equivalence
checker
Synthesis
library
Synthesis
Gates
Figure 2. A typical ASIC design flow using the text-macro object preprocessor.
library is automatically created with a functional behavior model optimized for simulation:
module mux2x1_20(x_, d0, d1, s);
output [19:0] x_
input s;
input [19:0] d0, d1;
assign x_ = (s ? d1 : d0);
endmodule
52
Text-macro implementation
There are myriad possible techniques for
implementing a text-macro methodology.10,16,17
For example, designers could automatically
generate tool-specific libraries during an RTL
postprocess by identifying specific instantiations (or text-macro objects) that require a
model in the process-specific libraries. For
instance, they could identify a parameterized
dff object during a Verilog postprocessing step.
Conversely, they could preprocess the RTL and
use a text-macro instantiation to identify the
unique objects. They could then build tool-specic libraries along with Verilog RTL expansion
of the text-macro, as Figure 2 shows. The preprocess approach has the following advantages
over a postprocessing technique:
Unrolling of instance names can be controlled within the synthesis library, something not possible with parameterized
modules. This is necessary for identifying
latch-mapping points between an RTL specication and a gate-level implementation.
Redefining the RTL module port definition is
possible for specific process points within
our design ow without changing the original RTL preprocess description. For example, adding an enable signal port to support
model-checking multiphase-related clock
abstraction is possible without modifying the
original RTL preprocess code.
Providing a boilerplate or template (set of
port connection defaults) for commonly
used signals within the macro definition
(such as scan control and reset connections) simplies text-macro object instantiation within the design.
As we mentioned earlier, designers can readily
JulyAugust 2001
53
enddene
54
output [3:0] q;
input clk;
input [3:0] d;
always @(posedge clk) begin
q <= d;
end
initial $InitialState(q);
endmodule
As previously mentioned, we could construct the simulation targeted library using parameterized modules. However, standard Verilog
(IEEE Std 1364, 1995) did not support the
Verilog instance name iterator (that is,
parameter iteration on instance names).
Predictable instance names are required for
efficient name mapping and equivalence
checking of the nal netlist. An optimized synthesis-targeted library for our previous example,
which contains the appropriate number of cell
instances required for the designers specied
text-macro bit width (with uniquely composed
instance names), might appear as
module dff_2(q, clk, d);
output [1:0] q;
input clk;
input [1:0] d;
cffd r0( .d(d[0]), .clk(clk),
.q(q[0]) );
cffd r1( .d(d[1]), .clk(clk),
.q(q[1]) );
endmodule
module dff_4(q, clk, d);
output [3:0] q;
input clk; input [3:0] d;
cffd r0( .d(d[0]), .clk(clk),
.q(q[0]) );
cffd r1( .d(d[1]), .clk(clk),
.q(q[1]) );
cffd r2( .d(d[2]), .clk(clk),
.q(q[2]) );
cffd r3( .d(d[3]), .clk(clk),
.q(q[3]) );
endmodule
ciple to the functional grouping of state elements and other objects within the RTL and
introducing a new level of design abstraction,
we have successfully isolated design details
within tool-specific libraries. This text-macrobased hardware design methodology lets us
simultaneously optimize the performance of
simulation, equivalence checking, model
checking, and physical design within our
ASIC design flow. Furthermore, without interfering with the original designs text or functional intent, our methodology lets us add
new features and tools throughout a projects
duration.
Our discussion and examples draw from
actual product design processes and tool experience. We believe that the text-macro concepts
discussed are appropriate to designs of any size
or complexity. To apply these concepts, however, designers must base decisions on a projects size, complexity, and time-to-market
requirements.
References
pubs/snug/snug99_papers/Barnes_Final.pdf.
Lionel Bening is a
CAD engineer with HewlettPackard, currently working on
uniform Verilog RTL methods
for effective verification across
large designs. He has also
served as an adjunct lecturer on logic and timing
verification topics at the University of Minnesota.
Bening has a BS in electrical engineering from the
University of Minnesota. He is a member of the
ACM and a senior member of the IEEE.
JulyAugust 2001
55