Module 3
Module 3
https://www.edacafe.com/book/ASIC/CH15/CH15.php
The schematic shows how all the components are connected together,
the connectivity of an ASIC
The circuit schematic is a picture, an easy format for us to understand and use, but
computers need to work with an ASCII or binary version of the schematic that we call
a netlist.
The output of a schematic-entry tool is thus a netlist file that contains a description of all
the components in a design and their interconnections.
The schematic translates into a netlist, a computer-readable file listing components and their connections.
However, for programmable elements like ASICs, design entry might also involve writing code or specifying
memory content (PROM microcode).
Schematic: This is a visual representation of the electronic circuit, similar to an architect's blueprint
for a building. It uses symbols to represent electronic components like resistors, transistors, and
integrated circuits (ICs). Lines connecting these symbols depict the electrical connections between
them. Schematics are easy for humans to understand and create, making them a popular choice for
design entry.
Netlist: In contrast to the schematic, a netlist is a textual representation of the circuit's connectivity.
It's a list that describes all the components in the design and how they are interconnected. Think of it
like a table with columns for component names, pin numbers, and the "net" (electrical connection)
they are connected to. While not as intuitive for humans as a schematic, netlists are machine-
readable. EDA (electronic design automation) tools can understand and use this information to
perform tasks like circuit simulation or generating the physical layout of the circuit board.
With increasingly complex systems, alternative design entry methods are emerging, including Hardware
Description Languages (HDLs) that can directly generate netlists through logic synthesis. The choice of method
depends on the specific design, with the key objective being a complete system specification for both
functionality and understanding.
Figure 9.2 shows some pictorial definitions of objects you can use in a simple schematic.
Hierarchical Design
Hierarchical design reduces complexity in schematics by breaking them down into levels.
Similar to building plans, a top-level schematic shows the overall design, while lower levels show
details of smaller components.
Subschematics (like office plans) are children of parent schematics (like floors).
Hierarchical design is essential for managing complexity in large ASICs with thousands of logic gates.
An alternative, flat design with everything on one schematic, is impractical for modern ASICs.
An electrical schematic can contain subschematics. The subschematic, in turn, may
contain other subschematics. Figure 9.3 illustrates the principles of schematic
hierarchical design.
FIGURE 9.3 Schematic example showing hierarchical design. (a) The schematic of a half-
adder, the subschematic of cell HADD. (b) A schematic symbol for the half adder. (c) A
schematic that uses the half-adder cell. (d) The hierarchy of cell HADD.
The Cell Library
ASIC schematic components come from a library of cells (modules, macros, books).
There is no standard naming convention for cells across different vendors, making it difficult to switch
vendors after using their library.
Cell behavior can also differ between vendors, causing problems when porting schematics.
Most ASIC companies provide a schematic library of primitive gates to be used for
schematic entry.
Primitive cells are basic logic gates like NAND gates.
In hierarchical design, a cell can also be a more complex component like a flip-flop or even a
microprocessor.
There are two types of macros for MGAs and programmable ASICs. hard macro & soft
macro
The most common type of macro is a hard macro that includes placement information. A
hard macro can change in position and orientation, but the relative location of the
transistors, other layout, and wiring inside the macro is fixed.
A soft macro contains only connection information (between transistors for a gate array
or between logic cells for a programmable ASIC). Thus the placement and wiring for a
soft macro can vary.
The timing parameters for a soft macro can only be determined after you complete the
place-and-route step.
Standard cells have layout information on all mask levels, while MGA hard macros only have info on
metal layers.
An MGA hard macro contains layout information on just the metal, contact, and via
layers.
An MGA soft macro or programmable ASIC macro does not contain any layout
information at all, just the details of connections to be made inside the macro.
Naming Inconsistency: There is no standard naming convention for cells across different
vendors. This makes it difficult to port schematics from one vendor to another.
Behavioral Differences: Cells with the same function (e.g., MUX) can have different behavior
depending on the vendor. This can lead to bugs when porting schematics. It is know as
retargeting schematics, also known as porting a design.
Lack of Standards: There are no universal standards for cell behavior and layout information,
making it difficult to switch between vendors.
Soft Macros: Timing parameters for soft macros are unavailable until after place-and-route,
which can complicate the design process.
Names
Cell vs Instance: A cell is the original design, while an instance is a specific placement of that cell
within a schematic.
Naming: Each cell has a unique name, and each instance of that cell also has a unique instance
name.
A cell instance is somewhere between a copy and a reference to a cell in a library.
we represent each cell instance by a picture or icon , also known as a symbol
Icon Confusion: The same icon can represent both a primitive cell (like a NAND gate) and a
subschematic (like a floor plan). There's no easy way to distinguish between the two on a schematic.
Primitive Cell Definition: The definition of a primitive cell depends on the library. For schematic
designers, primitive cells are basic gates like NAND gates. For library designers, primitive cells are
transistors that make up the gates.
a 4-bit latch:
FIGURE 9.5 A 4-bit latch: (a) drawn as a flat schematic from gate-level primitives,
(b) drawn as four instances of the cell symbol DLAT, (c) drawn using a vectored instance
of the DLAT cell symbol with cardinality of 4, (d) drawn using a new cell symbol with cell
name FourBit.
Each primitive cell instance in this schematic must have a unique name.
Nets:
The schematic DLAT also contains three external nets: D, EN, and Q . The terminals on
the symbol DLAT connect these nets to other nets in the hierarchical level above. For
example, the signal Trigger:flag in Figure 9.4 (c) is also Trigger.DLAT:Q .
Key Points:
Reference designators are essential for PCB routing as they connect schematic symbols to physical
components on the board.
Instance names are better suited for ASIC design due to their hierarchical nature and ability to
provide context within the design.
Connections
Cell instances have terminals that are the inputs and outputs of the cell. Terminals are
also known as pins , connectors , or signals.
The term pin reserve for the metal leads on an ASIC package. The term pin is used in
schematic entry and routing programs that are primarily intended for PCB design.
Cell Terminals: These are the connection points of a cell, also called pins, connectors, or signals.
Nets and Buses: Electrical connections are made with wires (nets). A group of related nets (e.g.,
address lines) can be bundled together into a bus.
Electrical connections between cell instances use wire segments or nets
Bundles vs Buses: If the signals are not closely related (e.g., data, control signals), use bundle or
array instead of bus.
Breakouts/Rippers: Used to access individual nets within a bus (e.g., accessing specific bits from a
data bus).
Swizzles: Some tools allow rearranging the order of bits within a bus (e.g., moving MSB to LSB).
This can be useful for operations like multiplying by 2 (shifting bits by one position).
FIGURE 9.6 An example of the use of a bus to simplify a schematic. (a) An address
decoder without using a bus. (b) A bus with bus rippers simplifies the schematic and
reduces the possibility of making a mistake in creating and reading the schematic.
Vectored Instances and Buses
Edit-in-Place
Edit-in-Place:
o Allows editing a cell instance directly within the current schematic.
o Any changes made to the subcell instance propagate to all other instances of that same cell within
the design.
Example: Office Building Analogy
o Imagine editing an "office floor" cell to change offices from "no window" to "window" type.
o Edit-in-place modifies all floors using that cell (floors 2-10).
Instead of editing a cell in place, you may really want to edit just one instance of a cell
and leave any other instances unchanged. In this case you must create a new cell with a
new symbol and new, unique cell name. It might also be wise to change the instance
name of the new cell to avoid any confusion.
Editing a Single Instance:
o If you only want to modify one instance (e.g., floor 3), you cannot use edit-in-place.
o Create a new cell with a unique name and symbol for that specific instance.
o Optionally, rename the instance itself (e.g., "FloorSpecial").
Net Aliasing:
o Some tools allow aliasing nets to create a single name across the entire design hierarchy.
o This replaces local net names (e.g., D, Q in a flip-flop) with higher-level names (e.g., Clock1, Data2).
o This simplifies tracing signals throughout a complex design.
Attributes
Elements to Name: You can assign names (or labels) to various schematic elements like
components, cell instances, nets, and terminals.
You can also attach an attribute , or property , which describes some aspect of the
component, cell instance, net, or connector.
Attributes: Additional descriptive properties (attributes) can be attached to these elements, some
with specific values.
Each attribute has a name, and some attributes also have values.
Naming Issues: Naming inconsistencies are a major challenge, particularly when sharing schematics
across different software tools.
Cell Names and Filenames: Since cell information is often stored in databases, cell names often
correspond to filenames. This introduces specific naming considerations:
o Case sensitivity (uppercase vs lowercase matters)
o Avoiding name collisions (ensuring unique names)
o Handling special characters (spaces, underscores, foreign alphabets)
o First character restrictions (some systems may limit the first character)
o Name length limitations (e.g., 28 characters for NFS compatibility)
Netlist Screener
The screener can work continuously as the designer is creating the schematic or can be
run as a separate program independently from schematic entry. Usually the designer
provides attributes that give the screener the information necessary to perform the
checks.
A screener usually generates a list of errors together with the locations of the problem
on the schematic where appropriate. Some editors associate an identifier, or handle , to
every piece of a schematic, including comments and every net
Grid-Based Schematic Entry:
Most editors use a grid system for placing components and wires.
Snapping to the grid simplifies the program's internal workings.
Grid usage improves compatibility between EDA tools.
It also promotes cleaner and more readable schematics.
Finding Components:
Automatic Naming:
Terminal Polarity:
The fanout of a cell measures the driving capability of an output terminal. The fanin of a
cell measures the number of input terminals.
Fanout measures an output's driving capability (number of standard loads it can drive).
Fanin measures the number of inputs on a cell.
Netlist screeners can check if fanout exceeds the total load on a net.
Schematic-Entry tools
1. Icon Edit-in-Place: Some editors offer icon edit-in-place, similar to schematic edit-in-
place for cells, allowing toggling between editing modes.
2. Timestamp Tracking: Schematic-entry programs track cell modifications using
timestamps, alerting designers if subcell timestamps are more recent, indicating
changes.
3. Primitive Cell Editing: Primitive cells in libraries are typically locked. Editing requires
making a copy, but it's usually not accessible or desired by ASIC designers.
4. Version Control: EDA tools maintain backup versions of files, automatically appending
version numbers. Designers can revert to earlier versions if needed.
5. Library Management: Sophisticated tools allow users to create and control access to
libraries during ASIC design, often integrated into larger EDA frameworks.
6. Undo Functionality: Schematic editors offer undo and redo commands, allowing
designers to revert changes within the current editing session.
7. Efficiency Features: Editors provide features like rubber banding for making
connections, automatic wiring, and easy component movement.
8. Connection Validation: Editors may offer visual or audible feedback for accurate wire
connections and prevent ambiguity in four-way connections.
9. Cell Libraries: Managing and selecting components from libraries is essential, and
editors should facilitate easy access to library components.
10. Global Nets and Special Connectors: Large schematics require extending
signals across pages. Global nets and special connectors help in labeling and managing
connections across multiple pages.
Editors track cell edits using timestamps. When loading cells, they compare timestamps to subcells to
identify updates.
Designers are warned about potential inconsistencies if subcells have been modified by others.
Most EDA tools automatically version files by appending numbers (e.g., Floor.6, Floor.7). This creates
backups in case of mistakes.
Some advanced tools allow user-controlled libraries with access restrictions.
You can usually set the number of backup versions kept by the software (version history).
In case of accidental edits, there's an option to revert to an earlier version.
More advanced systems use check-out services to prevent conflicts when multiple users edit the
same design.
It's recommended to rely on software for version control as manual editing can lead to issues.
Undo/Redo Functionality:
Most schematic editors allow undo/redo commands for a certain number of steps within an editing
session.
Rubber Banding: Drag the cursor to create connections that snap to right angles at the end.
Automatic Wiring: Define a wire path with clicks, and the editor completes the connections.
Moving Components with Wires: Move components while automatically dragging connected wires
along.
Connection Verification:
o Visual or audible feedback confirms successful wire connections.
o Automatic dots at junctions indicate connections.
o Some editors disallow four-way connections to avoid ambiguity about connections between crossing
wires.
Libraries and Hierarchical Designs:
Back-Annotation
After entering a schematic, the design undergoes simulation to verify its functionality.
Following this logical design phase, the process moves to ASIC physical design for layout
completion. Only after layout completion can parasitic capacitance and interconnect
delay be determined. This delay information is then back-annotated to the
schematic. Finally, a post-layout simulation ensures that ASIC specifications are met.
ASIC CONSTRUCTION
The physical design of ASICs is normally divided into system partitioning,
floorplanning, placement, and routing.
System Partitioning (Town Planning): Similar to how a town planner allocates areas for different
purposes (residential, commercial), this stage divides the entire microelectronic system into functional
blocks (e.g., memory, processor) to be implemented in separate ASICs.
Floorplanning (Architect): An architect designs the building layout (room arrangement). In ASIC
design, floorplanning defines the overall chip layout, specifying where each functional block from
partitioning will be placed.
Placement (Builder): The builder physically constructs the building based on the architect's plans.
Similarly, placement assigns specific locations on the chip to each functional block defined in the
floorplan.
Routing (Electrician): The electrician installs electrical wiring after construction. In ASIC design,
routing connects all the placed blocks with wires, ensuring electrical signals can flow between them.
Physical Design
1. System Partitioning: Divides the entire microelectronic system into functional blocks (like memory,
processor) to be implemented in separate ASICs.
2. Floorplanning: Defines the overall chip layout, specifying where each functional block from
partitioning will be placed. This includes allocating space for power, clock wiring, and input/output
pads.
3. Placement: Assigns specific locations on the chip to each functional block defined in the floorplan
and sets aside space for the interconnect to each logic cell. Placement for a gate-array or
standard-cell design assigns each logic cell to a position in a row. Floorplanning and
placement are closely related and are sometimes combined in a single CAD tool.
4. Routing: Routing makes the connections between logic cells. split into two distinct steps,
called global and local routing.
Global Routing: Global routing determines where the interconnections between the
placed logic cells and blocks will be situated. Only the routes to be used by the
interconnections are decided in this step, not the actual locations of the
interconnections within the wiring areas. is sometimes called loose routing.
Local Routing: Makes the final connections between logic cells using the information from global
routing. This stage defines the exact width, mask layer, and location of each wire. Local routing
is also known as detailed routing
FIGURE 15.1 Part of an ASIC design flow showing the system partitioning,
floorplanning, placement, and routing steps. These steps may be performed in
a slightly different order, iterated or omitted depending on the type and size of
the system and its ASICs. As the focus shifts from logic to interconnect,
floorplanning assumes an increasingly important role. Each of the steps shown
in the figure must be performed and each depends on the previous step.
However, the trend is toward completing these steps in a parallel fashion and
iterating, rather than in a sequential manner.
Key Points:
The order of these steps may vary depending on the design size and complexity.
There may be iterative adjustments between steps.
The trend is to perform these steps more concurrently rather than strictly sequentially.
Floorplanning becomes more crucial as the design focuses on interconnections between blocks.
CAD Tools
To develop a CAD tool for ASIC physical design, each step must be defined with clear
goals and objectives:
Each physical design step needs clearly defined goals (what must be achieved).
Objectives (what's desirable to achieve) are additional targets to strive for while reaching the goals.
These goals and objectives will be used in developing Computer-Aided Design (CAD) tools.
Goals and objectives for each of the ASIC physical design steps are as follows:
System partitioning:
Floorplanning:
Goal. Calculate the sizes of all the blocks and assign them locations.
Objective. Keep the highly connected blocks physically close to each other.
Placement:
Goal. Assign the interconnect areas and the location of all the logic cells within the
flexible blocks.
Objectives. Minimize the ASIC area and the interconnect density.
Global routing:
Detailed routing:
The methods and algorithms used in ASIC physical design according to the text:
Methods:
Heuristic Algorithms: These are used when there's no guaranteed optimal solution. They rely on
rules of thumb to find "good enough" solutions within a reasonable time frame.
Algorithm Complexity:
The text introduces the concept of Algorithm Complexity using Big O notation (O(f(n))). This notation
describes how the execution time of an algorithm grows with the size of the input (n).
In ASIC design (where n is typically very large - a large number of transistors or wires), efficient
algorithms are crucial. Here's a breakdown of preferable complexities mentioned:
f (n) = constant. The algorithm is constant in time. In this case, steps of the
algorithm are repeated once or just a few times. It would be nice if our algorithms
had this property, but it does not usually happen in ASIC design.
f (n) = log n . The algorithm is logarithmic in time. This usually happens when a
big problem is (possibly recursively) transformed into a smaller one.
f (n) = n . The algorithm is linear in time. This is a good situation for an ASIC
algorithm that works with n objects.
f (n) = n log n . This type of algorithm arises when a large problem is split into a
number of smaller problems, each solved independently.
f (n) = n 2 . The algorithm is quadratic in time and usually only practical for small
ASIC problems.
If the time it takes to solve a problem increases with the size of the problem at a rate
that is polynomial but faster than quadratic
NP-Complete Problems:
The text mentions that most ASIC physical design steps belong to a class of problems known as NP-
complete problems. These are problems where finding the optimal solution is very difficult, and it's
unlikely to find an algorithm that efficiently (polynomial time) guarantees the best answer.
Since finding optimal solutions for NP-complete problems might be impractical, the approach is to find
solutions that are "good enough" and meet the design goals.
To measure how close a solution is to being good, designers define metrics that quantify how well the
solution achieves the goals and objectives set for each design step (area, power consumption, etc.).
These metrics are often combined into a single measurement function or objective function.
If the goal is to minimize a metric (like area), the objective function becomes a cost function.
Conversely, if maximizing a metric (like speed), the function becomes a gain function.
Finding Solutions with Algorithms:
CAD tools rely on algorithms to solve physical design problems within a reasonable time.
Often, there's no perfect solution, so these tools use heuristic (rule-of-thumb) algorithms to find good
enough solutions.
The effectiveness of an algorithm is measured by its time complexity (how long it takes to run based
on problem size).
In ASIC design, where problems are typically large (n), we aim for algorithms with complexity lower
than n^2 (quadratic).
The worst-case scenario is exponential complexity, which is impractical for ASIC design.
Many ASIC physical design problems are NP-complete, meaning it's unlikely to find an exact optimal
solution in polynomial time.
Since we can't find the absolute best solution, we need ways to measure how close a solution is to
optimal.
This measurement is done using a function that combines various factors related to the design goals
and objectives.
This function can be a cost function (minimized) or a gain function (maximized).
ASIC designers consider factors like speed, area, and power consumption during design.
Current CAD tools are limited and can't handle these trade-offs on their own.
They can only find solutions based on a few basic objectives provided by the designer.
System partitioning:
System Partitioning:
When a functional block is too large for a single ASIC, it's divided (partitioned) based on specified
goals and objectives.
Common goals include minimizing the number of pins per ASIC (reducing packaging cost).
CAD tools can assist with system partitioning.
The choice between using custom ASICs or pre-designed ASSPs influences partitioning.
Other factors influencing decisions (not aided by CAD tools):
o Time-to-market pressure
o Past experience with a technology
o Design reusability from previous products
o Difficulty in quantifying these factors makes them unsuitable for CAD tool support.
While CAD tools can't answer questions like "what's the cheapest way to build the system?", they can
help with:
o "How to split the circuit into pieces that fit on a chip?"
Estimating ASIC Size
The actual size of a memory will depend on (1) the required access time, (2) the use of
synchronous or asynchronous read or write, (3) the number and type of ports (read–
write), (4) the use of special design rules, (5) the number of interconnect layers
available, (6) the RAM architecture (number of devices in RAM cell), and (7) the process
technology (active pull-up devices or pull-up resistors).
Figure 15.3 (a) shows the typical size of SRAM constructed on an ASIC. These figures are
based on the use of a RAM compiler (as opposed to building memory from flip-flops or
latches) using a standard CMOS ASIC process, typically using a six-transistor cell.
FIGURE 15.3 (a) ASIC memory size. These figures are for static RAM constructed using
compilers in a 2LM ASIC process, but with no special memory design rules. The actual
area of a RAM will depend on the speed and number of read–write ports. (b) Multiplier
size for a 2LM process. The actual area will depend on the multiplier architecture and
speed.
FPGA Partitioning
Designing ASICs involves many considerations during partitioning, making it complex.
There are currently no commercial tools that effectively address all these complexities.
For such cases, a simple spreadsheet might be the most practical tool.
Partitioning a group of logic cells into Field-Programmable Gate Arrays (FPGAs).
This is considered "easier" if all the FPGAs are identical.
Partitioning Methods
System partitioning requires goals and objectives, methods and algorithms to find
solutions, and ways to evaluate these solutions.
The goal of partitioning is to divide this part of the system so that each partition
is a single ASIC. To do this we may need to take into account any or all of the
following objectives:
Measuring Connectivity
FIGURE 15.6 Networks, graphs, and partitioning. (a) A network containing circuit logic
cells and nets. (b) The equivalent graph with vertexes and edges. For example: logic cell
D maps to node D in the graph; net 1 maps to the edge (A, B) in the graph. Net 3 (with
three connections) maps to three edges in the graph: (B, C), (B, F), and (C, F).
(c) Partitioning a network and its graph. A network with a net cut that cuts two nets.
(d) The network graph showing the corresponding edge cut. The net cutset in c contains
two nets, but the corresponding edge cutset in d contains four edges. This means a
graph is not an exact model of a network for partitioning purposes.
Networks and Graphs:
o An ASIC circuit can be represented as a network of logic cells connected by electrical nets.
o This network can be modeled by a mathematical graph with vertices (representing logic cells) and
edges (representing connections between cells).
Partitioning for ASIC Design:
o ASICs are often built by dividing the circuit into smaller blocks.
o Graph theory helps analyze how to partition the network into these blocks while minimizing the
number of connections between them.
o Minimizing connections reduces the size and complexity of the final ASIC.
Limitations of Graph Model:
o A net can connect more than two logic cells, while a graph edge only connects two vertices.
o When partitioning the network, cutting a net with multiple connections creates multiple edge cuts in
the graph model.
o This means the number of connections between partitions might be underestimated by the graph
model.
the network shown in Figure 15.6 (c) into two parts, corresponding to creating two ASICs,
we can divide the network’s graph in the same way. Figure 15.6 (d) shows a possible
division, called a cutset. We say that there is a net cutset (for the network) and an edge
cutset (for the graph). The connections between the two ASICs are external connections,
the connections inside each ASIC are internal connections.
Notice that the number of external connections is not modeled correctly by the network
graph. When we divide the network into two by drawing a line across connections, we
make net cuts. The resulting set of net cuts is the net cutset. The number of net cuts we
make corresponds to the number of external connections between the two partitions.
When we divide the network graph into the same partitions we make edge cuts and we
create the edge cutset. We have already shown that nets and graph edges are not
equivalent when a net has more than two terminals.
(a) shows a simple network we need to partition [ Goto and Matsud, 1986]. There are 12
logic cells, labeled A–L, connected by 12 nets (labeled 1–12). At this level, each logic cell
is a large circuit block and might be RAM, ROM, an ALU, and so on. Each net might also
be a bus, but, for the moment, we assume that each net is a single connection and all
nets are weighted equally. The goal is to partition our simple network into ASICs. Our
objectives are the following:
Figure 15.7 (b) shows a partitioning with five external connections; two of the ASICs have
three pins; the third has four pins.We might be able to find this arrangement by hand,
but for larger systems we need help.
(a) (b) (c)
FIGURE 15.7 Partitioning example. (a) We wish to partition this network into three ASICs
with no more than four logic cells per ASIC. (b) A partitioning with five external
connections (nets 2, 4, 5, 6, and 8)—the minimum number. (c) A constructed partition
using logic cell C as a seed. It is difficult to get from this local minimum, with seven
external connections (2, 3, 5, 7, 9,11,12), to the optimum solution of b.
Splitting a network into several pieces is a network partitioning problem. In the following
sections we shall examine two types of algorithms to solve this problem and describe
how they are used in system partitioning.
Constructive Partitioning
Goals of partitioning:
o Minimize the number of connections between ASICs (external connections).
o Limit the size and complexity of each ASIC (number of logic cells per ASIC).
The most common constructive partitioning algorithms use seed growth or cluster
growth. A simple seed-growth algorithm for constructive partitioning consists of the
following steps:
The algorithm starts with the choice of a seed logic cell ( seed module, or just seed). The
logic cell with the most nets is a good choice as the seed logic cell. You can also use a
set of seed logic cells known as a cluster. Some people also use the term clique —
borrowed from graph theory. A clique of a graph is a subset of nodes where each pair of
nodes is connected by an edge—like your group of friends at school where everyone
knows everyone else in your clique.
Constructive partitioning is a technique used in ASIC design to divide a circuit into smaller blocks
(ASICs) by building partitions from scratch. Here's how it works:
1. Seed Selection:
o The algorithm starts by choosing a seed element, which can be:
A single logic cell: The logic cell with the most connections (nets) is a good initial choice.
A cluster of logic cells: This can be a group of interconnected cells or even an entire schematic page
representing a functional block in your design.
A clique (graph theory term): This refers to a group of cells where every cell is connected to every
other cell within the group. Similar to a close-knit group of friends where everyone knows everyone
else.
2. Cell Addition:
o Once you have a seed, the algorithm considers all the remaining logic cells in the circuit (not yet
assigned to a partition).
o For each un-assigned cell, a gain function is calculated. This function estimates the benefit of adding
that cell to the current partition.
o The gain function typically considers the number of connections between the cell and the existing
elements in the partition. More connections generally indicate a better fit for the cell within that
partition.
3. Growth and Repeat:
o The cell with the highest gain (most connections to the current partition) is then added to that
partition.
o Steps 2 and 3 (considering un-assigned cells and adding the best fit) are repeated until the partition
reaches its size limit (e.g., maximum number of cells allowed per ASIC).
4. Multiple Partitions:
o Once a partition is full, a new partition is created, and the process restarts with a new seed selection
(another logic cell, cluster, or clique).
o This continues until all the logic cells in the circuit are assigned to a partition, effectively dividing the
entire circuit into separate ASIC blocks.
The seed selection plays a crucial role in constructive partitioning. A good seed can lead to a more
efficient partitioning with fewer external connections between ASICs. Here are some tips:
Cells with Many Connections: These cells likely have connections spread across different parts of
the circuit. Including them early can help guide the formation of well-connected partitions.
Functional Blocks: If your design uses pre-defined functional blocks (schematic pages or Verilog
modules), using them as seeds can ensure these blocks stay together within an ASIC.
Experimentation: Sometimes trying different seed choices can lead to better partitioning results.
Limitations:
Constructive partitioning is a greedy approach. It makes local decisions (adding the best fitting cell at
each step) which may not always lead to the globally optimal solution (absolute minimum number of
external connections).
The gain function used can significantly impact the final outcome. Choosing the right function
depends on your specific partitioning goals (minimizing connections, balancing cell count across
ASICs, etc.).
Iterative Partitioning Improvement
The most common iterative improvement algorithms are based on interchange
and group migration. The process of interchanging (swapping) logic cells in an
effort to improve the partition is an interchange method. If the swap improves
the partition, we accept the trial interchange; otherwise we select a new set of
logic cells to swap.
(b) (c)
Figure 15.7 (c) shows a partitioning of the network of part a using a constructed
partitioning algorithm with logic cell C as the seed. To get from the solution shown in
part c to the solution of part b, which has a minimum number of external connections,
requires a complicated swap. The three pairs: D and F, J and K, C and L need to be
swapped—all at the same time. It would take a very long time to consider all possible
swaps of this complexity.
A simple interchange algorithm considers only one change and rejects it immediately if it
is not an improvement. Algorithms of this type are greedy algorithms in the sense that
they will accept a move only if it provides immediate benefit.
a greedy algorithm is not prepared to walk over a hill to see if there is a better solution in
the next valley. This type of problem occurs repeatedly in CAD algorithms.
Simple partitioning algorithms often use a greedy approach, where they only consider single swaps
and accept them if they immediately improve the solution.
This approach can lead the algorithm to a local minimum, a solution that seems good locally but isn't
necessarily the best overall
Group migration consists of swapping groups of logic cells between partitions. The group
migration algorithms are better than simple interchange methods at improving a solution
but are more complex. Almost all group migration methods are based on the powerful
and general Kernighan–Lin algorithm ( K–L algorithm) that partitions a graph, The
problem of dividing a graph into two pieces, minimizing the nets that are cut, is
the min-cut problem—a very important one in VLSI design.
FIGURE 15.8 Terms used by the Kernighan–Lin partitioning algorithm. (a) An example
network graph. (b) The connectivity matrix, C;
Suppose we already have split a network into two partitions, A and B , each
with m nodes (perhaps using a constructed partitioning). Our goal now is to swap
nodes between A and B with the objective of minimizing the number of
external edges connecting the two partitions. Each external edge may be
weighted by a cost, and our objective corresponds to minimizing a cost function
that we shall call the total external cost, cut cost, or cut weight, W :
In Figure 15.8 (a) the cut weight is 4 (all the edges have weights of 1).
In order to simplify the measurement of the change in cut weight when we interchange
nodes, we need some more definitions. First, for any node a in partition A , we define
an external edge cost, which measures the connections from node a to B ,
For example, in Figure 15.8 (a) E 1 = 1, and E 3 = 0. Second, we define the internal edge
cost to measure the internal connections to a ,
So, in Figure 15.8 (a), I 1 = 0, and I 3 = 2. We define the edge costs for partition B in a
similar way (so E 8 = 2, and I 8 = 1). The cost difference is the difference between
external edge costs and internal edge costs,
Thus, in Figure 15.8 (a) D 1 = 1, D 3 = – 2, and D 8 = 1. Now pick any node in A , and any
node in B . If we swap these nodes, a and b, we need to measure the reduction in cut
weight, which we call the gain, g . We can express g in terms of the edge costs as
follows:
The last term accounts for the fact that a and b may be connected. So, in Figure 15.8 (a),
if we swap nodes 1 and 6, then g = D 1 + D 6 – 2 c 16 = 1 + 1. If we swap nodes 2 and 8,
then g = D 2 + D 8 – 2 c 28 = 1 + 2 – 2.
The K–L algorithm finds a group of node pairs to swap that increases the gain even
though swapping individual node pairs from that group might decrease the gain. First we
pretend to swap all of the nodes a pair at a time. Pretend swaps are like studying chess
games when you make a series of trial moves in your head.
1. Find two nodes, a i from A , and b i from B , so that the gain from swapping them is
a maximum. The gain is
2. Next pretend swap a i and b i even if the gain g i is zero or negative, and do not
consider a i and b i eligible for being swapped again.
3. Repeat steps 1 and 2 a total of m times until all the nodes of A and B have been
pretend swapped. We are back where we started, but we have ordered pairs of
nodes in A and B according to the gain from interchanging those pairs.
4. Now we can choose which nodes we shall actually swap. Suppose we only swap
the first n pairs of nodes that we found in the preceding process. In other words we
swap nodes X = a 1 , a 2 ,…, a n from A with nodes Y = b 1 , b 2 ,…, b n from B. The
total gain would be
If the maximum value of G n > 0, then we swap the sets of nodes X and Y and thus
reduce the cut weight by G n . We use this new partitioning to start the process again at
the first step. If the maximum value of G n = 0, then we cannot improve the current
partitioning and we stop. We have found a locally optimum solution.
FIGURE 15.9 Partitioning a graph using the Kernighan–Lin algorithm. (a) Shows how
swapping node 1 of partition A with node 6 of partition B results in a gain of g = 1. (b) A
graph of the gain resulting from swapping pairs of nodes. (c) The total gain is equal to
the sum of the gains obtained at each step
The K–L algorithm works well for partitioning graphs. However, there are the following
problems that we need to address before we can apply the algorithm to network
partitioning:
It minimizes the number of edges cut, not the number of nets cut.
It does not allow logic cells to be different sizes.
It is expensive in computation time.
It does not allow partitions to be unequal or find the optimum partition size.
It does not allow for selected logic cells to be fixed in place.
The results are random.
It does not directly allow for more than two partitions.
To represent nets with multiple terminals in a network accurately, we can extend the
definition of a network graph. Figure 15.10 shows how a hypergraph with a special type
of vertex, a star, and a hyperedge, represents a net with more than two terminals in a
network.
In the K–L algorithm, the internal and external edge costs have to be calculated for all
the nodes before we can select the nodes to be swapped. Then we have to find the pair
of nodes that give the largest gain when swapped. This requires an amount of computer
time that grows as n 2 log n for a graph with 2n nodes. This n 2 dependency is a major
problem for partitioning large networks.
Only one logic cell, the base logic cell, moves at a time. In order to stop the
algorithm from moving all the logic cells to one large partition, the base logic cell
is chosen to maintain balance between partitions. The balance is the ratio
of total logic cell size in one partition to the total logic cell size in the
other. Altering the balance allows us to vary the sizes of the partitions.
Critical nets are used to simplify the gain calculations. A net is a critical
net if it has an attached logic cell that, when swapped, changes the
number of nets cut. It is only necessary to recalculate the gains of logic cells on
critical nets that are attached to the base logic cell.
The logic cells that are free to move are stored in a doubly linked list. The
lists are sorted according to gain. This allows the logic cells with maximum
gain to be found quickly.
These techniques reduce the computation time so that it increases only slightly
more than linearly with the number of logic cells in the network, a very important
improvement.
Methods based on the K–L algorithm find locally optimum solutions in a random fashion.
There are two reasons for this. The first reason is the random starting partition. The
second reason is that the choice of nodes to swap is based on the gain. The choice
between moves that have equal gain is arbitrary
We call the gain for the initial move the first-level gain. Gains from subsequent moves
are then second-level and higher gains. We can define a gain vector that contains these
gains. Figure 15.11 shows how the first-level and second-level gains are calculated.
Using the gain vector allows us to use a look-ahead algorithm in the choice of nodes to
be swapped. This reduces both the mean and variation in the number of cuts in
the resulting partitions.
FIGURE 15.11 An example of network partitioning that shows the need to look ahead
when selecting logic cells to be moved between partitions. Partitionings (a), (b), and (c)
show one sequence of moves, partitionings (d), (e), and (f) show a second sequence. The
partitioning in (a) can be improved by moving node 2 from A to B with a gain of 1. The
result of this move is shown in (b). This partitioning can be improved by moving node 3
to B, again with a gain of 1. The partitioning shown in (d) is the same as (a). We can
move node 5 to B with a gain of 1 as shown in (e), but now we can move node 4 to B
with a gain of 2.