component generators...

122
Component Generators Handbook 1 Component Generators Introduction ...............................................................................................3 AT40K Co-processor FPGAs ....................................................................4 Statistical Summary ..................................................................................7 Absolute Value ........................................................................................10 Accumulator ............................................................................................12 Adder - Carry Select ...............................................................................15 Adder - Ripple Carry ...............................................................................17 Buffer - BiDirectional ...............................................................................20 Buffer - Input ...........................................................................................23 Buffer - Output ........................................................................................25 Bus - Ripper ............................................................................................27 Comparator .............................................................................................28 Constant ..................................................................................................30 Counter - Johnson ..................................................................................32 Counter - LFSR .......................................................................................34 Counter - PreScaled ...............................................................................38 Counter - Ripple Carry ............................................................................41 Counter - Terminal ..................................................................................44 Decoder ..................................................................................................46 Deductor .................................................................................................49 FIFO ........................................................................................................52 Flip Flop - D Type ...................................................................................54 Flip Flop - Toggle ....................................................................................57 Gray Code ...............................................................................................60 Increment/Decrement by 1 ......................................................................62 Increment/Decrement by Value ..............................................................66 Transparent Latch ...................................................................................70 Logic Gates .............................................................................................73 Look-Up Table ........................................................................................76 Table of Contents

Upload: others

Post on 09-Jul-2020

13 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 1

Component Generators

Introduction ...............................................................................................3

AT40K Co-processor FPGAs....................................................................4

Statistical Summary ..................................................................................7

Absolute Value........................................................................................10

Accumulator ............................................................................................12

Adder - Carry Select ...............................................................................15

Adder - Ripple Carry ...............................................................................17

Buffer - BiDirectional ...............................................................................20

Buffer - Input ...........................................................................................23

Buffer - Output ........................................................................................25

Bus - Ripper ............................................................................................27

Comparator .............................................................................................28

Constant..................................................................................................30

Counter - Johnson ..................................................................................32

Counter - LFSR.......................................................................................34

Counter - PreScaled ...............................................................................38

Counter - Ripple Carry ............................................................................41

Counter - Terminal ..................................................................................44

Decoder ..................................................................................................46

Deductor .................................................................................................49

FIFO........................................................................................................52

Flip Flop - D Type ...................................................................................54

Flip Flop - Toggle ....................................................................................57

Gray Code...............................................................................................60

Increment/Decrement by 1......................................................................62

Increment/Decrement by Value ..............................................................66

Transparent Latch ...................................................................................70

Logic Gates.............................................................................................73

Look-Up Table ........................................................................................76

Table of Contents

0373f.fm Page 1 Tuesday, May 25, 1999 8:59 AM

Page 2: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

2 Component Generators Handbook

Multiplier - Serial Parallel ........................................................................79

Multiplier - Signed ...................................................................................81

Multiplier - Signed, 1 Stage of Pipelining ................................................83

Multiplier - Unsigned ...............................................................................85

Multiplier - Unsigned, 1 Stage of Pipelining ............................................87

Mux .........................................................................................................89

Negate Function......................................................................................91

Pulse Gen - Fixed ...................................................................................93

Pulse Gen - Loadable .............................................................................95

RAM - Dual Port ......................................................................................97

RAM - Single Port .................................................................................100

ROM......................................................................................................102

Shift Register ........................................................................................104

Subtractor - Carry Select ......................................................................107

Subtractor - Ripple Carry ......................................................................109

Macro Library ........................................................................................112

Table of Contents

0373f.fm Page 2 Tuesday, May 25, 1999 8:59 AM

Page 3: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 3

Introduction

IntroductionThank you for your interest in Atmel’s AT40K series FPGAs, and wel-come to Atmel’s very powerful design tool, the Automatic ComponentGenerator. Designed to exploit the many innovative features of Atmel’sAT40K architecture, high speed custom logic functions can be rapidly cre-ated, resulting in significantly improved performance for compute inten-sive applications.

This software facilitates quick and easy implementation of over 50 logicand RAM functions, such as multipliers, adders, accumulators and multi-plexers. Users can specify individual parameters, including width, pipelin-ing, and other function-specific options. Within minutes the design tool willautomatically create a hard layout with worst case speed and area infor-mation, as well as generate a schematic symbol, VHDL or Verilog simula-tion data for the function. The end result of this process is a fully specified,reusable circuit that can be used for any size AT40K FPGA arrays, in anylocation or orientation, without affecting its speed or function. The use ofthese fully deterministic functions in synthesis results in significantlyhigher silicon efficiency, as well as faster speed and design time.

The following pages describe the various generators available in Atmel’sFPGA design “IDS” software. For each one there is an explanation of itsfunction, the various parameters available, a list of its input and outputpins, the statistics for 16 and 8 bit versions of the macro (except for Adderand Subtractor Carry Select, which have a minimum bit width of 9), and ascreen capture of the graphical user interface.

The statistics for the macro contain a number of figures relating to its per-formance and area. The second and third columns in the table are aboutthe speed of the component. It should be noted that the speed figures formacros which contain sequential components (registers) exclude thedelay time for getting the global clock onto the chip and to the register ele-ment (approximately 3 ns). The next two columns deal with the size of themacro. The Cells column is the number of core cells used to build thecomponent. The Size is the width and height of the macro in core cells.

We are also constantly updating and improving our macro generatorproducts. The most current versions of the macro gererators can bedownloaded from the Atmel Web Site at www.atmel.com.

0373f.fm Page 3 Tuesday, May 25, 1999 8:59 AM

Page 4: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

4 Component Generators Handbook

AT40K Co-Processor FPGAs

AT40K Co-Processor FPGAsThe AT40K series of co-processor FPGAs are designed specifically forcompute-intensive DSP functions. Innovative features include:

• FreeRam™ - distributed, single/dual port 10 ns SRAM, independent of

logic cells

• Up to 384 PCI compliant I/Os

• Mixed 3V/5V capability

• Architecture optimized for efficient, ultra-fast array multipliers

• CacheLogic® dynamic full/partial reconfigurability in-system

• Eight global clocks and four fast PCI clocks

• User-defined, reusable hard macro capability

• Hard macro generators

• Variety of surface mount packages

• I/O with multiple direct paths to the center of the FPGA array

The AT40K is comprised of a perfectly symmetrical array of octagonallogic cells with direct connects to adjoining cells on all eight sides. Thenumber of connections between cells helps to conserve busing resourcesand minimizes delays. More important, by providing diagonal connectionsbetween cells, the chip allows the efficient implementation of extremelyhigh performance array multipliers as well as excellent support for synthe-sis-based designs. The array also features five separate planes of highspeed busing, each of which contains one local bus and two ultra-fastexpress buses. When combined with the extensive direct cell connec-tions, the busing network provide the FPGA with excellent routability.

The AT40K core cell includes two three-input LUTs, plus an upstreamAND gate. The two LUTs can be used to form a full-adder which, whencombined with the upstream AND gate, serves as a multiplier element.Therefore, a multiplier of any size can be constructed using an array ofindividual cells that are only directly connected.

The embedded FreeRam™ on the AT40K device is distributed throughoutthe array in 32 x 4 blocks. These dedicated SRAM blocks are not con-structed from logic cells, so implementing SRAM does not use up corecell logic resources. FreeRam™ is completely flexible, integrated with themulti-plane busing system, and can be structured in a variety of widthsand depths. Since it is distributed throughout the array, access isextremely fast and minimal routing resources are used.

All devices in the At40K family are pin compatible. AT40K FPGAs rangein size from 5,000 to 50,000 usable gates, with 2,048 to 18,432 bits of

0373f.fm Page 4 Tuesday, May 25, 1999 8:59 AM

Page 5: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 5

AT40K Co-Processor FPGAs

FreeRam™ on board. They allow designers to easily achieve new levelsof device integration at exceptionally high speeds. Like Atmel’s AT6000series FPGAs, the AT40K family provides CacheLogic® capabilities.

With CacheLogic, DSP and other logic functions can be created quicklyand accurately using Atmel’s design software, programmed into theFPGA, and then changed as new functions or algorithms are required.Individual LUTs can be reprogrammed in just 33 ns, without loss of regis-ter data. In fact, part of the array can be reprogrammed while the remain-der continues to operate without interruption. These features will offer sig-nificant performance gains for graphics and imaging, network, instrumen-tation, and telecommunications applications.

CacheLogic makes adaptive hardware possible, and accelerates systemperformance by handling logic much the same way a computer’s cachememory handles instructions and data. In a computer, the highest speedmemory (usually SRAM) stores active data, while the bulk of the dataresides in a less expensive DRAM, EPROM, or disk. In most complexapplications, only a small fraction of the circuitry is active at any giventime. Only active functions are loaded into the FPGA’s “logic cache”,while unused circuits reside in less expensive external memory. Logic canbe added to the “cache” as needed to replace or complement existingfunctions without physical modification to the hardware.

With CacheLogic, a 100,000-gate application may actually only require20,000 gates at any given cycle. By caching the extra 80,000 gates forlater use, a 20,000-gate device can replace a more expensive 100,000-gate device.

Atmel’s AT40K series boasts an innovative combination of features: acompute-intensive, yet flexible logic cell, diagonal cell-to-cell connections,FreeRam™ distributed SRAM, and multiple I/O options for each devicepin. Together, these provide the flexibility, density and performancerequired to implement complex functions such as those used in DSP,image processing, communications and complex datapath applications.They also support the efficient synthesis of high-performance randomlogic in a minimal amount of silicon.

Atmel’s design software, the Integrated Development System, uses a sin-gle data base to take your work from design entry to configured circuitquickly and efficiently. With exclusive features like system level hardmacro functions, component generators, Synthesis Gateway™ softwareand advanced timing analysis that uses physical wire lengths and loads topredict delays, our software tools let you design circuits that performexactly to specification.

0373f.fm Page 5 Tuesday, May 25, 1999 8:59 AM

Page 6: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

6 Component Generators Handbook

AT40K Co-Processor FPGAs

When your finalized design enters high volume production, the tools alloweasy migration to Atmel’s masked Gate Arrays for even more cost effec-tive production.

0373f.fm Page 6 Tuesday, May 25, 1999 8:59 AM

Page 7: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 7

Statistical Summary

Statistical SummaryThe following table is a summary, for quick reference, of all of the genera-tors covered in this manual.

Name Speed (Mhz)

Delay (ns)

Cells Size (x*y) Latency (clocks)

abs16 36.90 27.1 15 1x15 0

abs8 78.74 12.7 7 1x7 0

acc16 28.90 34.6 32 2x17 0

acc8 49.50 20.2 16 2x9 0

acs16 42.91 23.3 48 3x19 0

arc16 33.33 30.0 16 1x16 0

arc8 64.10 15.6 8 1x8 0

log16 99.00 10.1 6 4x2 0

log8 208.33 4.8 3 3x2 0

com16 45.87 21.8 12 8x2 0

com8 99.00 10.1 6 4x2 0

crc16 32.89 30.4 16 1x16 0

crc8 61.72 16.2 8 1x8 0

cjo16 93.45 10.7 16 1x16 0

cjo8 116.27 8.6 8 1x8 0

cps16 32.36 30.9 32 2x16 0

cps8 58.47 17.1 16 2x8 0

ctr16 72.46 13.8 5 1x5 0

ctr8 83.33 12.0 4 1x4 0

dec16 357.14 2.8 16 1x16 0

dec8 357.14 2.8 4 1x4 0

ded16 28.90 34.6 32 2x17 0

ded8 49.50 20.2 16 2x9 0

fdt16 384.61 2.6 16 1x16 0

fdt8 384.61 2.6 8 1x8 0

fft16 384.61 2.6 16 1x16 0

fft8 384.61 2.6 8 1x8 0

0373f.fm Page 7 Tuesday, May 25, 1999 8:59 AM

Page 8: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

8 Component Generators Handbook

Statistical Summary

fif16 36.10 27.7 19 7x6 0

fif8 36.49 27.4 16 7x5 0

gra16 357.14 2.8 8 1x8 0

gra8 357.14 2.8 4 1x4 0

inc16 31.05 32.2 16 1x16 0

inc8 55.55 18.0 8 1x8 0

inv16 31.05 32.2 16 1x16 0

inv8 55.55 18.0 8 1x8 0

ldt16 526.31 1.9 16 1x16 0

ldt8 526.31 1.9 8 1x8 0

lfs16 92.59 10.8 16 1x16 0

lfs8 111.11 9.0 8 1x8 0

lut16 357.14 2.8 16 1x16 0

lut8 357.14 2.8 8 1x8 0

mls16 15.79 63.3 289 17x17 0

mls8 30.12 33.2 81 9x9 0

mps16 28.81 34.7 306 17x18 1

mps8 49.26 20.3 90 9x10 1

mlu16 16.26 61.5 256 16x16 0

mlu8 31.84 31.4 64 8x8 0

mup16 31.94 31.3 272 16x17 1

mup8 59.52 16.8 72 8x9 1

mux16 113.63 8.8 16 8x2 0

mux8 126.58 7.9 8 4x2 0

nef16 35.84 27.9 16 1x16 0

nef8 70.92 14.1 8 1x8 0

pls16 72.46 13.8 5 1x5 0

pls8 83.33 12.0 4 1x4 0

pll16 16.02 62.4 48 3x17 0

pll8 29.76 33.6 24 3x9 0

rdp16 188.67 5.3 1 7x2 0

Name Speed (Mhz)

Delay (ns)

Cells Size (x*y) Latency (clocks)

0373f.fm Page 8 Tuesday, May 25, 1999 8:59 AM

Page 9: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 9

Statistical Summary

rdp8 188.67 5.3 1 7x2 0

rsp16 188.67 5.3 1 7x2 0

rsp8 188.67 5.3 1 7x2 0

rom16 357.14 2.8 8 8x1 0

rom8 357.14 2.8 7 4x2 0

sre16 185.18 5.4 16 1x16 0

sre8 188.67 5.3 8 1x8 0

msp16 99.00 10.1 32 2x16 0

msp8 99.00 10.1 16 2x8 0

src16 33.33 30.0 16 1x16 0

src8 64.10 15.6 8 1x8 0

scs16 42.91 23.3 48 3x19 0

Name Speed (Mhz)

Delay (ns)

Cells Size (x*y) Latency (clocks)

0373f.fm Page 9 Tuesday, May 25, 1999 8:59 AM

Page 10: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

10 Component Generators Handbook

Absolute Value

Absolute ValueThe function of the Absolute Value generator can be explained as follows:

if DATA = -2(Width-1), then

OVERFLOW = 1, RESULT = 0

else if DATA < 0, then

RESULT = - DATA

else

RESULT = DATA

DATA must always represent a two’s complement and the RESULT isalways a positive number

Parameters

Pins

Statistics

Parameter Value Explanation

Overflow Boolean Create with Overflow pin

Width Integer > 1 Width of input and output vectors

Type Name Option Explanation

In DATA[Width-1:0] No Input data

Out RESULT[Width-1:0] No Absolute value of Data (Number of outputs will be Width-1 if overflow is used)

Out OVERFLOW Yes True if Data = -2(Width-1)

Name Speed (MHz)

Delay (ns)

Cells Size (x*y)

abs16 36.90 27.1 15 1x15

abs8 78.74 12.7 7 1x7

0373f.fm Page 10 Tuesday, May 25, 1999 8:59 AM

Page 11: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 11

Absolute Value

Figure 1. Absolute Value

0373f.fm Page 11 Tuesday, May 25, 1999 8:59 AM

Page 12: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

12 Component Generators Handbook

Accumulator

AccumulatorThe Accumulator adds a given number to the register initial value. Thefunctional description of the accumulator is as follows:

always(@posedge CLK or negedge RST)

begin

if(RST == ‘b0)

SUM = 0;

else if (ACC)

{COUT, SUM} = SUM + DATA + CIN;

end

Note: The above assumes that positive-edge clock and active-low reset have been specified.

0373f.fm Page 12 Tuesday, May 25, 1999 8:59 AM

Page 13: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 13

Accumulator

Parameters

Pins

Carry out = SUM[Width-1:0]+DATA[Width-1:0]+CIN > 2n – 1

Parameter Value Explanation

Pitch Integer >= 1 Spacing between input pins. A pitch of 2 means will result in 1 cell between input pins

Width Integer > 1 Width of input and output vectors

Initialization Reset Registers can be reset to zero

Set Registers can be set to one

None Registers are reset automatically on power-up

Preset Value Registers can be asynchronously loaded with a constant value

Invert Clock Boolean Invert the clock input

InitializationPolarity = Low

Boolean Set/reset/preset input is active-low

Preset valueradix

Binary Constants for preset are specified in binary representation

Octal Constants are specified in octal

Decimal Constants are specified in decimal

Hex Constants are specified in hexadecimal

Type Name Option Explanation

In CIN No Carry in

In ACCUMULATE No Enables the accumulator, active high

In DATA [Width-1:0] No Data input

In CLK / CLKN Yes Clock (noninverted / inverted)

In R / RN / S / SN Yes Reset / set (active high /low)

Out SUM[Width-1:0] No Accumulator output

Out COUT No Carry out

0373f.fm Page 13 Tuesday, May 25, 1999 8:59 AM

Page 14: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

14 Component Generators Handbook

Accumulator

Truth Table

Statistics

Figure 2. Accumulator

Input Output

CIN DATA [W-1:0] SUM[W-1:0] COUT

A BA + B +

SUM[W-1:0]1 if A+B+ SUM[W-1:0] >(2W)-1,

0 otherwise

Name Speed (MHz) Delay (ns) Cells Size (x*y)

acc16 28.90 34.6 32 2x17

acc8 49.50 20.2 16 2x9

0373f.fm Page 14 Tuesday, May 25, 1999 8:59 AM

Page 15: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 15

Adder - Carry Select

Adder - Carry SelectThis generator can be used to generate an n bit Carry Select Adder.

Parameters

Pins

Truth Table

Statistics

Parameter Value Explanation

Width Integer > 1 Width of input and output vectors

Carry In Boolean Provide a carry-in pin

Carry Out Boolean Provide a carry-out pin

Type Name Option Explanation

In CIN Yes Carry in

In DATAA[Width-1:0] No A input

In DATAB[Width-1:0] No B input

Out SUM[Width-1:0] No Adder output

Out COUT Yes Carry out

Input Output

CIN DATAA[W-1:0] DATAB[W-1:0] SUM[W-1:0] COUT

C A B A + B + C1 if A+B+C > 2W,

0 otherwise

Name Speed (MHz) Delay (ns) Cells Size (x*y)

acs16 42.91 23.3 48 3x19

0373f.fm Page 15 Tuesday, May 25, 1999 8:59 AM

Page 16: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

16 Component Generators Handbook

Adder - Carry Select

Figure 3. Adder - Carry Select

0373f.fm Page 16 Tuesday, May 25, 1999 8:59 AM

Page 17: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 17

Adder - Ripple Carry

Adder - Ripple CarryThe Adder generator can be used to generate a ripple carry adder.

Parameters

If input, output, carry-in or carry-out registers are selected, three addi-tional parameters are available.

Parameter Value Explanation

Carry In NoRegister Include the carry in pin on the generatorbut do not register it.

Register Register carry in of the adder

Disabled Do not include the carry in pin on the adder

Carry Out Noregister Include the carry out pin on the adder but do not register it

Register Register carry out of the adder

Disabled Do not include the carry outpin on the adder

Register None Do not register the inputs and outputs

Input Register inputs on the adder, exclude carry in pin

Output Register outputs on the adder, exclude carry out pin

Both Register both inputs and outputs including the carry in and carry out pins of the adder

Signed over-flow pin Boolean Provide a signed overflow output (treating input vectors as signed values)

Pitch Integer > 1 Spacing between input pins, pitch of 2 means one cell between input pins

Width Integer > 1 Width of input and output vectors

Aspect ratio Float >= 0.0 Aspect ratio of the adder layout. A ratio of 0.0 gives a thin, vertical layout, whereas a ratio of 1.0 gives a square layout

0373f.fm Page 17 Tuesday, May 25, 1999 8:59 AM

Page 18: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

18 Component Generators Handbook

Adder - Ripple Carry

Register Parameters

Pins

Carry out = DATAA + DATAB + CIN > 2n - 1 or

DATAA + DATAB + CIN < -2n

Signed overflow = DATAA + DATAB + CIN > 2n - 1 or

DATAA + DATAB + CIN < -2n

Truth Table

Parameter Value Explanation

Invert Clock Boolean Invert the register clock

InitializationPolarity = Low

Boolean Make register initialization active low

Register set / reset function

Reset Registers can be reset to zero

Set Registers can be set to one

Type Name Option Explanation

In CIN Yes Carry in

In DATAA[Width-1:0] No A input

In DATAB[Width-1:0] No B input

In CLK / CLKN Yes Clock (noninverted / inverted)

In R / RN / S / SN Yes Reset / set (active high / low)

Out SUM[Width-1:0] No Adder output

Out COUT Yes Carry out (cannot be used with overflow in an unsigned adder)

Out OVERFLOW Yes Overflow

Input Output

CIN DATAA[W-1:0] DATAB[W-1:0] SUM[W-1:0] COUT

C A B A + B + C1 if A+B+C > 2W,

0 otherwise

0373f.fm Page 18 Tuesday, May 25, 1999 8:59 AM

Page 19: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 19

Adder - Ripple Carry

Statistics

Figure 4. Adder - Ripple Carry

Name Speed (MHz) Delay (ns) Cells Size (x*y)

arc16 33.33 30.0 16 1x16

arc8 64.10 15.6 8 1x8

0373f.fm Page 19 Tuesday, May 25, 1999 8:59 AM

Page 20: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

20 Component Generators Handbook

Buffer - BiDirectional

Buffer - BiDirectionalThe Bidirectional I/O buffer generator can be used to generate a softmacro (schematic only) which uses the specified options. This macro isnot stored in the library, but becomes a part of the design. The generatorprovides a simple means for connecting I/Os to buses within the design. Italso facilitates I/O selection as all of the parameters can be specified andthe program will choose the appropriate cell from the library.

Parameters

Parameter Value Explanation

Input Threshold

TTL The input threshold is TTL compatible

CMOS The input threshold is CMOS compatible

Input extra delay (ns)

0 The input has no additional delay associated with it

1 The input has an extra delay of approx. 1ns

3 The input has an extradelay of approx. 3ns

5 The input has an extra delay of approx. 5ns

Input Schmitt triggering

Boolean The input Schmitt trigger circuit is enabled

Output Slewrate

Fast The output buffer has fast drive(maximum slew rate)

Medium The output buffer has medium drive(medium slew rate)

Slow The output buffer has standard drive (reduced slew rate)

Output Type Enable The output has an enable pin

Open Source The output is an open source

Open Drain The output is open drain

Pull resistor None Pad pins have no pull-up or pull-down

Pull Up Pad pins have pull-up

Pull Down Pad pins have pull-down

Width Integer > 0 Width of input and output data

0373f.fm Page 20 Tuesday, May 25, 1999 8:59 AM

Page 21: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 21

Buffer - BiDirectional

Pins

The following user configurable memory bits, which are set depending onthe above selection of parameters, provide control of the I/O logic.

• TTL/CMOS inputs: A user configurable bit determining the threshold

level, TTL or CMOS, of the input buffer.

• Schmitt triggering: A user configurable bit determining whether a

Schmitt Trigger circuit on the input pad should be enabled or disabled.

The Schmitt Trigger is a regenerative comparator circuit, which

improves the rise and fall times (leading and trailing edges) of the

incoming signal.

• Extra delay: The input buffer can have four different intrinsic delays.

This lets the user specify an extra delay on the input signal in order to

meet any data hold requirements. A value of ‘0’ means no extra delay

above the intrinsic delay of the input buffer. Delays of approximately 1,

3 and 5 ns can also be set.

• Open Source/Open drain/Tri-state Outputs: User configurable bits that

set the output drive to either tristate, open source (1 or Z) or open drain

(0 or Z).

• Slew Rate Control: User configurable bits that control the output drive.

When set to ‘FAST’, the output buffer has full drive capability (20-mA

buffer). The ‘MEDIUM’ setting produces a medium-drive (14-mA) buffer,

while ‘SLOW’ gives a standard-drive (6-mA) buffer.

• Pull-up/Pull-down: User configurable bits controlling the pull-up and

pull-down transistors in the I/O pin. These supply either a weak ‘1’ or a

weak ‘0’ level to the pad pin. When all other drivers are off, this control

will dictate the signal level of the pad pin.

Type Name Option Explanation

In A[Width-1:0] No Data input from the core to the I/O

In OE[Width-1:0] Yes Output enable input from the core to the I/O

In/Out PAD[Width-1:0] No Pad pin of I/O (Bidirectional)

Out Q[Width-1:0] No Output from the I/O to the core

0373f.fm Page 21 Tuesday, May 25, 1999 8:59 AM

Page 22: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

22 Component Generators Handbook

Buffer - BiDirectional

Figure 5. Buffer - Biderectional

0373f.fm Page 22 Tuesday, May 25, 1999 8:59 AM

Page 23: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 23

Buffer - Input

Buffer - InputThe input I/O buffer generator can be used to generate a soft macro(schematic only) which uses the specified options. This macro is notstored in the library, but becomes a part of the design. The generator pro-vides a simple means for connecting I/Os to buses within the design. Italso facilitates I/O selection as all of the parameters can be specified andthe program will choose the appropriate cell from the library.

Parameters

Pins

Parameter Value Explanation

Threshold TTL Input threshold is TTL compatible

CMOS Input threshold is CMOS compatible

Width Integer > 0 Width of input and output data

Extra delay 0 The input has no additional delay associated with it

1 The input has an extra delay of approx. 1ns

3 The input has an extra delay of approx. 3ns

5 The input has an extra delay of approx. 5ns

Pull resistor None Pad pins have no pull-up or pull-down

Pull Up Pad pins have pull-up

Pull Down Pad pins have pull-down

Schmitt triggering

Boolean The input Schmitt trigger circuit is enabled

Type Name Option Explanation

In PAD[Width-1:0] No Data input to the chip (pad pin)

Out Q[Width-1:0] No Output from the I/O to the core

0373f.fm Page 23 Tuesday, May 25, 1999 8:59 AM

Page 24: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

24 Component Generators Handbook

Buffer - Input

The following user configurable memory bits, which are set depending onthe above selection of parameters, provide control of the I/O logic.

• TTL/CMOS inputs: A user configurable bit determining the threshold

level, TTL or CMOS, of the input buffer.

• Schmitt triggering: A user configurable bit determining whether a

Schmitt Trigger circuit on the input pad should be enabled or disabled.

The Schmitt Trigger is a regenerative comparator circuit, which

improves the rise and fall times (leading and trailing edges) of the

incoming signal.

• Extra delay: The input buffer can have four different intrinsic delays.

This lets the user specify an extra delay on the input signal in order to

meet any data hold requirements. A value of ‘0’ means no extra delay

above the intrinsic delay of the input buffer. Delays of approximately 1,

3 and 5 ns can also be set.

• Pull-up/Pull-down: User configurable bits controlling the pull-up and

pull-down transistors in the I/O pin. These supply either a weak ‘1’ or a

weak ‘0’ level to the pad pin. When all other drivers are off, this control

will dictate the signal level of the pad pin.

Figure 6. Buffer - input

0373f.fm Page 24 Tuesday, May 25, 1999 8:59 AM

Page 25: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 25

Buffer - Output

Buffer - OutputThe output I/O buffer generator can be used to generate a soft macro(schematic only) which uses the specified options. This macro is notstored in the library, but becomes a part of the design. The generator pro-vides a simple means for connecting I/Os to buses within the design. Italso facilitates I/O selection as all of the parameters can be specified andthe program will choose the appropriate cell from the library.

Parameters

Pins

Parameter Value Explanation

Type Normal The output has no enable pin

Enable The output has an enable pin

Open Source

The output is an open source

Open Drain The output is open drain

Width Integer > 0 Width of output data

Slewrate Fast The output buffer should be fast drive (maximum slew rate)

Medium The output buffer should be medium drive (medium slew rate)

Slow The output buffer should be standard drive (reduced slew rate)

Pull resistor None Pad pins have no pull-up or pull-down

Pull Up Pad pins have pull-up

Pull Down Pad pins have pull-down

Type Name Option Explanation

In A[Width-1:0] No Data input from the chip

In OE[Width-1:0] Yes Tri-state Enable Pins

Out PAD[Width-1:0] No Output from the I/O (pad pin)

0373f.fm Page 25 Tuesday, May 25, 1999 8:59 AM

Page 26: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

26 Component Generators Handbook

Buffer - Output

The following user configurable memory bits, which are set depending onthe above selection of parameters, provide control of the I/O logic.

• Open Source/Open drain/Tri-state Outputs: User configurable bits that

set the output drive to either tristate, open source (1 or Z) or open drain

(0 or Z).

• Slew Rate Control: User configurable bits that control the

• output drive. When set to ‘FAST’, the output buffer has full drive

capability (20 mA buffer). The ‘MEDIUM’ setting produces a medium-

drive (14 mA) buffer, while ‘SLOW’ gives a standard-drive (6 mA) buffer.

• Pull-up/Pull-down: User configurable bits controlling the pull-up and

pull-down transistors in the I/O pin. These supply either a weak ‘1’ or a

weak ‘0’ level to the pad pin. When all other drivers are off, this control

will dictate the signal level of the pad pin.

Figure 7. Buffer - Output

0373f.fm Page 26 Tuesday, May 25, 1999 8:59 AM

Page 27: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 27

Bus Ripper

Bus RipperThe bus ripper generator allows the user to produce variable-width “soft”buffers for re-naming buses within a design. When the design is importedinto IDS, the mapping tools will identify the bus ripper macro as redundantlogic and remove it from the netlist. The bus rippers are a fast and conve-nient method of re-labeling buses in a design without consuming unnec-essary logic resources in the final implementation.

Note: Ensure that Mapping is enabled when importing a circuit containing bus-ripper macros, to prevent extra logic from being added to the design. From the Options menu, select Options and then Mapping. The Map-ping Enabled option should be checked.

Parameters

Pins

Figure 8. Bus Ripper

Parameter Value Explanation

Width Integer Width of input bus

Type Name Option Explanation

In INPUT[Width-1:0] No Input bus

In OUTPUT[Width-1:0] No Output bus

0373f.fm Page 27 Tuesday, May 25, 1999 8:59 AM

Page 28: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

28 Component Generators Handbook

Comparator

ComparatorThe function of the Comparator generator can be explained as follows:

Equals = (DATAA == DATAB)

NotEquals = (DATAA != DATAB)

LessThan = (DATAA < DATAB)

LessThanOrEqualTo = (DATAA <= DATAB)

GreaterThan = (DATAA > DATAB)

GreaterThanOrEqualTo= (DATAA >= DATAB)

Parameters

Note that if A=B is the only output selected, an optimized Equality-Onlycomparator will be produced, resulting in a much smaller layout.

Parameter Value Explanation

Representation Unsigned Treat inputs as unsigned

Signed Treat inputs as signed

Width Integer > 1 Width of inputs A and B

A = B Boolean Add Equal pin (AEB) to comparator

A != B Boolean Add NotEqual pin (ANEB) to comparator

A < B Boolean Add LessThan pin (ALB) to comparator

A <= B Boolean Add LessThanOrEqualTo pin (ALEB)to comparator

A > B Boolean Add GreaterThan pin (AGB) to comparator

A >= B Boolean Add GreaterThanOrEqualTo pin (AGEB) to comparator

0373f.fm Page 28 Tuesday, May 25, 1999 8:59 AM

Page 29: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 29

Comparator

Pins

Statistics

Figure 9. Comparator

Type Name Option Explanation

In DATAA[Width-1:0] No Input data A

In DATAB[Width-1:0] No Input data B

Out AEB Yes 1 if A = B, 0 otherwise

Out ANEB Yes 1 if A != B, 0 otherwise

Out ALB Yes 1 if A < B, 0 otherwise

Out ALEB Yes 1 if A <= B, 0 otherwise

Out AGB Yes 1 if A > B, 0 otherwise

Out AGEB Yes 1 if A >= B, 0 otherwise

Name Speed (MHz) Delay (ns) Cells Size (x*y)

com16 45.87 21.8 12 8x2

com8 99.00 10.1 6 4x2

0373f.fm Page 29 Tuesday, May 25, 1999 8:59 AM

Page 30: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

30 Component Generators Handbook

Constant

ConstantA Constant can be generated with the specified values. Note that thisgenerator has to be run with the “Hard Macro” option deselected. This isbecause constants should be implemented as soft macros so that themapper can “fold” them in with other logic in

the design.

Parameters

Pins

Parameter Value Explanation

Width Integer > 0 Width of output vector

ConstantValue Integer >= 0 Value of the constant

Radix Binary Constant value is specified using binary representation

Octal Value is octal

Decimal Value is decimal

Hex Value is hexadecimal

Type Name Option Explanation

Out RESULT[WIDTH-1:0] No Constant value, if Width is not large enough, least significant bits of value will be used

0373f.fm Page 30 Tuesday, May 25, 1999 8:59 AM

Page 31: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 31

Constant

Figure 10. Constant

0373f.fm Page 31 Tuesday, May 25, 1999 8:59 AM

Page 32: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

32 Component Generators Handbook

Counter - Johnson

Counter - JohnsonThe Johnson Counter generator can be used to generate counters inwhich only one output changes on each clock cycle. The following param-eters are available.

Parameters

Pins

Truth Table

Note: The above assumes that a noninverted clock and active low reset have been selected.

Parameter Value Explanation

Width Integer > 1 Width of output vector

Enable Boolean Add an enable pin to component

Fold Boolean Fold layout in half

Invert Clock Boolean Invert the clock input

Initialization Polarity = Low

Boolean Set/reset/preset input is active-low

Initialization Reset Registers can be reset to zero

Set Registers can be set to one

None Registers are initialized automatically on power-up

Type Name Option Explanation

In R/RN/S/SN No Reset/Set (active high / low)

In CLK / CLKN No Clock (noninverted / inverted)

In ENABLE Yes Enable counter

Out Q[Width-1:0] No Counter output

Input Output

RN CLK ENABLE Q[W-1:0]

0 X X 0

1 X 0 Q[W-1:0]

1 R 1 Q[W-2:0]Q[W-1]

0373f.fm Page 32 Tuesday, May 25, 1999 8:59 AM

Page 33: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 33

Counter - Johnson

Statistics

Figure 11. Counter - Johnson

Name Speed (MHz) Delay (ns) Cells Size (x*y)

cjo16 93.45 10.7 16 1x16

cjo8 116.27 8.6 8 1x8

0373f.fm Page 33 Tuesday, May 25, 1999 8:59 AM

Page 34: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

34 Component Generators Handbook

Counter - LFSR

Counter - LFSRThe LFSR generator can be used to create a high-speed divide-by-[2**(n-1) -1] counter, where n is the number of bits. The count sequence can beoutput in a format specified by a user-supplied data file (described below).

Parameters

Parameter Value Explanation

Generator Output

Component Generate component only - do not output count sequence

Count File Output count sequence only - do not generate component

Both Output count sequence and generate component

Width Integer >= 3 Width of input and output data

Pitch Integer >= 1 Pitch of output pins. A pitch of 2 results in a one cell gap between outputs

Fold layout Boolean Fold layout in half

Count sequence report file

Filename Name of count sequence output file. This file is written out to the current project direc-tory when “Count file” or “Both” are selected as the generator output option.

Count sequence formatting file

Filename Name of the file (found in the current project directory) that is to be used to format the count sequence output.

Invert clock Boolean Invert the clock input

Initialization Polarity = Low

Boolean Set/reset/preset input is active-low

Initialization Reset Registers can be reset to zero

Set Registers can be set to one

None Registers are initialized automatically on power-up

Preset Registers can be asynchronously loaded with a constant value

(continued)

0373f.fm Page 34 Tuesday, May 25, 1999 8:59 AM

Page 35: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 35

Counter - LFSR

Pins

Truth Table

Note: The above truth table assumes a noninverted clock and active low reset have been selected.

Count Sequence Output When the Generator Output option is set toCount or Both, an output file called the Count sequence report file is gen-erated on completion of the program run. This file lists the countsequence for the generated LFSR.

The user can also create an input file, called the Count sequence format-ting file, to specify which parts of the count sequence should be listed.The Count sequence formatting file should be placed in the design direc-tory. The format of the file is basically a header line with “hex”, “dec” or“bin” to indicate that the numbers in the file are in hexadecimal, decimal orbinary format. Each subsequent line should be in the form of Start_CountEnd_Count. For example:

Preset Value radix

Binary Preset value is specified in binary representation

Octal Preset value is specified in octal representation

Decimal Preset value is specified in decimal representation

Hex Preset value is specified in hexadecimal representation

Type Name Option Explanation

In R/RN/S/SN/P/PN No Reset/set/preset (active high/low)

In CLK / CLKN No Clock (noninverted / inverted)

Out Q[Width-1:0] No Counter output

Input Output

RN CLK Q[W-1:0]

0 X 0

1 X Present state

1 R LFSR Next state

Parameter Value Explanation

0373f.fm Page 35 Tuesday, May 25, 1999 8:59 AM

Page 36: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

36 Component Generators Handbook

Counter - LFSR

lfsr.datdec

0 2

4 20

88 127

300 844

1088 1090

The output wi l l have the format Count count_number Decodedecode_value, where decode_value is the counter Q[W-1:0] output forcount_number.Decoding Terminal Count The count sequence always ends with thesame sequence: all bits are 1’s after which 0’s shift in on each clock fromthe LSB until all bits are 0’s. For example, a 3 bit counter would end withthe sequence 7, 6, 4, 0. A simple comparator circuit can therefore beused to quickly decode the Terminal Count.

Statistics

Name Speed (MHz) Delay (ns) Cells Size (x*y)

lfs16 92.59 10.8 16 1x16

lfs8 111.11 9.0 8 1x8

0373f.fm Page 36 Tuesday, May 25, 1999 8:59 AM

Page 37: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 37

Counter - LFSR

Figure 12. Counter - LFSR

0373f.fm Page 37 Tuesday, May 25, 1999 8:59 AM

Page 38: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

38 Component Generators Handbook

Counter - PreScaled

Counter - PreScaledThe PreScaled Counter generator can be used to implement a faster Rip-ple Carry binary counter.

Parameters

Parameter Value Explanation

Direction Up Create an up counter

Down Create a down counter

Up Down Create a programmable up / down counter

Width Integer > 2 Width of input and output vectors

Pitch Integer >= 1 Spacing between output pins. A pitch of 2 means one cell between pins

Parallel Load Boolean Provide a parallel load capability

Enable Boolean Provide an enable input

Invert Clock Boolean Invert the clock input

Initialization polarity = low

Boolean Set/reset/preset input is active-low

Initialization Reset Registers can be reset to zero

Set Registers can be set to one

None Registers are reset automatically on power up

Preset Registers can be asynchronously loaded with a constant value

Preset value radix

Binary Preset value is specified in binary representation

Octal Preset value is specified in decimal representation

Decimal Preset value is specified in octal representation

Hex Preset value is specified in hexadecimal representation

0373f.fm Page 38 Tuesday, May 25, 1999 8:59 AM

Page 39: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 39

Counter - PreScaled

Pins

If Up, then Carry out = 1 when counter overflowselse Carry out = 1 when counter underflows

Truth Table

Note: The ENABLE signal must be negated during load, and must remain negated for at least 1 clock cycle after SLOAD negates.

Type Name Option Explanation

In SLOAD Yes Performs a parallel load when low

In ENABLE Yes Enables the Counter, active high

In CARRYIN No Carry in to counter

In UP_DOWN No Up = 1, down = 0

In DATA [Width-1:0] Yes Parallel load data input

In CLK / CLKN Yes Clock (noninverted / inverted)

In R/RN/S/SN/P/PN Yes Reset / set /preset (active high / low)

Out Q[Width-1:0] No Counter output

Out RCO No Carry out

Input Output

SLOAD ENABLE UP_DOWN CARRYIN DATA [W-1:0] Q[W-1:0] RCO

0 x 1 x A A 1 if A > (2W)-1, 0 otherwise

0 x 0 x A A 1 if A < -(2W), 0 otherwise

1 0 x x x Present state

Present state

1 x x 0 x Q[W-1:0] RCO

1 1 1 1 x Q[W-1:0]+11 if Q[W-1:0]+1

> (2W)-1, 0 otherwise

1 1 0 1 x Q[W-1:0]-11 if Q[W-1:0]-1

< -(2W), 0 otherwise

0373f.fm Page 39 Tuesday, May 25, 1999 8:59 AM

Page 40: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

40 Component Generators Handbook

Counter - PreScaled

Statistics

Figure 13. Counter - PreScaled

Name Speed (MHz) Delay (ns) Cells Size (x*y)

cps16 32.36 30.9 32 2x16

cps8 58.47 17.1 16 2x8

0373f.fm Page 40 Tuesday, May 25, 1999 8:59 AM

Page 41: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 41

Counter - Ripple Carry

Counter - Ripple CarryThe Counter generator can be used to generate Ripple CarryCounters.The following parameters are available for the counters.

Parameters

Parameter Value Explanation

Direction Up Create an Up counter

Down Create a Down counter

UpDown Create an Up/Down counter

Width Integer > 1 Width of input and output vectors

Enable Boolean Add an enable pin to component

Fold Boolean Fold layout in half

Parallel load Disabled No parallel load capability

Var. Value Parallel load capability

Const. Value

Fixed value can be synchronously loaded

Initialization Reset Registers can be reset to zero

Set Registers can be set to one

None Registers are initialized automatically on power-up

Preset Registers can be asynchronously loaded with a constant value

Invert Clock Boolean Invert the clock input

Initialization Polarity = Low

Boolean Set/reset/preset input is active-low

Preset & load value radix

Binary Constants for parallel load and preset are specified in binary representation

Octal Constants are specified in octal

Decimal Constants are specified in decimal

Hex Constants are specified in hexadecimal

0373f.fm Page 41 Tuesday, May 25, 1999 8:59 AM

Page 42: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

42 Component Generators Handbook

Counter - Ripple Carry

Pins

Truth Table

Note: The above truth table assumes that an active-low reset and non-inverted clock have been selected. For an up counter, the RCO pin goes high whenever the current state equals the maximum count. For a down counter, it goes high when the minimum count state is reached (i.e. all zeros). Counters can be chained together by connecting the RCO pin of one counter to the enable input of the next.

Type Name Option Explanation

In R/RN/S/SN/P/PN No Reset/Set/Preset (active high / low)

In CLK / CLKN No Clock (noninverted / inverted)

In ENABLE Yes Enable counter

In DATA[Width-1:0] Yes Parallel load input

In LOAD Yes Load signal (active low)

In UP_DOWN Yes Up/Down control Up=1

Out Q[Width-1:0] No Counter output

Out RCO No Ripple Carry out

Input Output

RN ENABLE CLK LOAD DATA[W-1:0] UP/DOWN Q[W-1:0] RCO

0 X X X X...X X 0...0 0

1 0 X 1 X...X X QW...Q0 0

1 1 R 0 DW...D0 X DW...D0 0

1 1 X 1 X...X X PresentState QW*...*Q1*Q0

1 1 R 1 DW...D0 1 DW...D0+1 QW*...*Q1*Q0

1 1 R 1 DW...D0 0 DW...D0-1 QW*...*Q1*Q0

0373f.fm Page 42 Tuesday, May 25, 1999 8:59 AM

Page 43: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 43

Counter - Ripple Carry

Statistics

Figure 14. Counter - Ripple Carry

Name Speed (MHz) Delay (ns) Cells Size (x*y)

crc16 32.89 30.4 16 1x16

crc8 61.72 16.2 8 1x8

0373f.fm Page 43 Tuesday, May 25, 1999 8:59 AM

Page 44: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

44 Component Generators Handbook

Counter - Terminal

Counter - TerminalThe Terminal Counter generator allows the user to create a Counter thatstops after n clock cycles. The following options are available.

Parameters

Pins

Terminal Count = 1 when n clock cycles have been applied. The countcan be reset by asserting the preset pin. This loads the counter with theappropriate value to produce a count sequence of length n.

Parameter Value Explanation

Terminal Count

Integer >= 1 The number of states the counter should step through before stopping and asserting the TERMCNT pin.

Radix of terminal count

Binary Terminal count value is specified in binary representation

Octal Value is specified in octal

Decimal Constants are specified in decimal

Hex Constants are specified in hexadecimal

Pitch Integer >= 1 Pitch between output pins. A pitch of 2 results in a one cell gap between pins.

Invert Clock Boolean Invert the clock input

Initialization Polarity = Low

Boolean Preset input is active-low

Type Name Option Explanation

In CLK / CLKN No Clock (noninverted / inverted)

In P / PN No Preset input (active high / low)

Out TERMCNT No Terminal Count

0373f.fm Page 44 Tuesday, May 25, 1999 8:59 AM

Page 45: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 45

Counter - Terminal

Statistics

Figure 15. Counter - Terminal

Name Speed (MHz) Delay (ns) Cells Size (x*y)

ctr16 72.46 13.8 5 1x5

ctr8 83.33 12.0 4 1x4

0373f.fm Page 45 Tuesday, May 25, 1999 8:59 AM

Page 46: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

46 Component Generators Handbook

Decoder

DecoderThe Decoder generator can be used to create a full or partial decode ofthe specified number of bits of input or output.

Parameters

Note: At least one of Decodes or Width must be greater than 0 (unless Value is specified). If input or output registers are selected, three additional parameters are available.

Parameter Value Explanation

Output Activehigh Output logic level will be high for the decoded input

Activelow Output logic level will be low for the decoded output

Input Width Integer >= 0 Width of input vector. If this value is left at 0, the input width will be determined by the number of outputs specified

No. of values to decode

Integer >= 0 Width of output vector. If this value is left at 0, the number of outputs will be determined by 2**Input Width (i.e. all values will be decoded)

Starting at value

Integer >= 0 First value to decode. When used in con-junction with the previous parameter, this can be used to specify exactly the range of outputs to decode. For example, setting the “No. of values to decode” parameter to 3 and “Starting at value” to 2 would decode the values 2, 3 and 4.

Radix of start value

Binary “Starting at value” parameter is specified as a binary number

Octal “Starting at value” parameter is specified as an octal number

Decimal “Starting at value” parameter is specified as a decimal number

Hex “Starting at value” parameter is specified as a hexadecimal number

InRegister Boolean Register inputs on the Decoder

OutRegister Boolean Register outputs on the Decoder

0373f.fm Page 46 Tuesday, May 25, 1999 8:59 AM

Page 47: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 47

Decoder

Register Parameters

Pins

Truth Table

Parameter Value Explanation

Invert Clock Boolean Invert the register clock

Initialization Polarity = Low

Boolean Make register initialization active low

Initialization Reset Registers can be reset to zero

Set Registers can be set to one

None Registers are initialized automatically

Type Name Option Explanation

In DATA[Width-1:0] No Decoder input pins, either Width bits wide or log2 Decodes bits wide

Out EQ[Decodes-1:0] No Decoder output, either 2Width bits wide or decode bits wide. If both Width and Decodes are specified, the output will start at the lowest count and work up

Option Explanation

DATA[W-1:0] EQ[D-1:0]

0 0...001

1 0...010

2 0...100

.

.

.

.

.

.

0373f.fm Page 47 Tuesday, May 25, 1999 8:59 AM

Page 48: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

48 Component Generators Handbook

Decoder

Statistics

Figure 16. Decoder

Name Speed (MHz) Delay (ns) Cells Size (x*y)

dec16 357.14 2.8 16 1x16

dec8 357.14 2.8 4 1x4

0373f.fm Page 48 Tuesday, May 25, 1999 8:59 AM

Page 49: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 49

Deductor

DeductorThe Deductor subtracts a given number from the register initial value. Thefunctional description of the Deductor is as follows:

always(@posedge CLK or negedge R)

begin

if(R == ‘b0)

SUM = 0;

else if (ACC)

{COUT, SUM} = SUM - DATA - CIN;

end

Note: The above assumes that positive-edge clock and active-low reset have been specified.

Parameters

Parameter Value Explanation

Pitch Integer >= 1 Spacing between input pins. A pitch of 2 means will result in 1 cell between input pins

Width Integer > 1 Width of input and output vectors

Initialization Reset Registers can be reset to zero

Set Registers can be set to one

None Registers are reset automatically on power-up

Preset Value

Registers can be asynchronously loaded with a constant value

Invert Clock Boolean Invert the clock input

Initialization Polarity = Low

Boolean Set/reset/preset input is active-low

Preset value radix

Binary Constants for preset are specified in binary representation

Octal Constants are specified in octal

Decimal Constants are specified in decimal

Hex Constants are specified in hexadecimal

0373f.fm Page 49 Tuesday, May 25, 1999 8:59 AM

Page 50: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

50 Component Generators Handbook

Deductor

Pins

Carry out = SUM[Width-1:0]-DATA[Width-1:0]-CIN < -2n

Truth Table

Statistics

Type Name Option Explanation

In CIN No Carry in

In ACCUMULATE No Enables the deductor, active high

In DATA [Width-1:0] No Data input

In CLK / CLKN Yes Clock (noninverted / inverted)

In R/RN/S/SN/P/PN Yes Reset/set/preset (active high / low)

Out SUM[Width-1:0] No Deductor output

Out COUT No Carry out

Input Output

CIN DATA [W-1:0] SUM[W-1:0] COUT

A B SUM[W-1:0]-A-B 1 if SUM[W-1:0]-A-B < -(2W),

0 otherwise

Name Speed (MHz) Delay (ns) Cells Size (x*y)

ded16 28.90 34.6 32 2x17

ded8 49.50 20.2 16 2x9

0373f.fm Page 50 Tuesday, May 25, 1999 8:59 AM

Page 51: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 51

Deductor

Figure 17. Deductor

0373f.fm Page 51 Tuesday, May 25, 1999 8:59 AM

Page 52: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

52 Component Generators Handbook

FIFO

FIFOThis generator creates a First-In First-Out (FIFO) buffer that makes use ofthe RAM cells in the AT40K series architecture to produce a compactimplementation with no read or write latency. In order to make efficientuse of the RAM cells, some restrictions are placed on the data width andFIFO depth parameters - the data width must be a multiple of 4, and theFIFO depth is rounded up to the nearest power of 2.

The Read Enable (REN) and Write Enable (WEN) pins control the FIFOoperation. When the WEN pin is asserted (i.e. pulled low), the buffer is inthe write mode. Data presented at the D bus will be written into the FIFOuntil the FULL pin goes low, indicating that the FIFO cannot accept anymore data. When the REN pin is asserted, the FIFO is in the read mode.Data can be read from the Q bus until the EMPTY pin goes low, indicatingthat no more data is present in the buffer. When REN and WEN are bothhigh, operation of the FIFO is effectively suspended.

Parameters

Pins

Parameter Value Explanation

Data Width Integer >= 4 Width of parallel input and output data (must be a multiple of 4)

Depth Integer > 2 FIFO depth (rounded up to the nearest power of 2)

Invert clock Boolean Invert the polarity of the clock input

Type Name Option Explanation

In D[Width-1:0] No Data input bus

Out Q[Width-1:0] No Data output bus

In CLK / CLKN No Clock (noninverted / inverted)

In REN No Read Enable pin (active low)

In WEN No Write Enable pin (active low)

Out FULL No FIFO full flag (active low)

Out EMPTY No FIFO empty flag (active low)

0373f.fm Page 52 Tuesday, May 25, 1999 8:59 AM

Page 53: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 53

FIFO

Statistics

Figure 18. FIFO

Name Speed (MHz) Delay (ns) Cells Size (x*y)

fif16 36.10 27.7 19 7x6

fif8 36.49 27.4 16 7x5

0373f.fm Page 53 Tuesday, May 25, 1999 8:59 AM

Page 54: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

54 Component Generators Handbook

Flip Flop - D Type

Flip Flop - D TypeThe D Flip Flop generator can be used to create a register bank consist-ing of D-type flip flops.

Parameters

Parameter Value Explanation

Register Bank Enable

None No register enable control is provided

Group Enable

A single enable input is used to control all flip flops

Individual Enables

Each flip flop in the register bank has its own enable control

Tri-state control

None Register bank has no tri-state control

Group OE pin

A single OE pin is used to tri-state the outputs of all flip flops

Individual OE pins

Each flip flop has its own tri-state control

Width Integer > 0 Width of the input and output data

Pitch Integer > 0 Spacing between input pins. Pitch of 2 means one cell between inputs

Invert clock Boolean Invert the clock input

Initialization Polarity = Low

Boolean Reset/Set/Preset input is active-low

Asynchronous initialization

Reset Registers can be reset to zero

Set Registers can be set to one

None Registers are automatically reset on power-up

Preset Registers can be asynchronously loaded with a constant value

Synchronous initialization

None Registers have synchronous initialization capability

Auxiliary input

Registers have a second data input that can be used to synchronously preset them to any value

Const. Value

Registers can be synchronously preset with a user-supplied constant value

0373f.fm Page 54 Tuesday, May 25, 1999 8:59 AM

Page 55: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 55

Flip Flop - D Type

Pins

Note: The truth table below assumes that an active-low reset and non-inverted clock have been selected.

Truth Table

Note: Q- is the value of Q preceding the clock transition.

Initialization Value Radix

Binary Initialization values are specified using binary representation

Octal Values are specified in octal

Decimal Values are specified in decimal

Hex Values are specified in hexadecimal

Type Name Option Explanation

In DATA[Width-1:0] No Data input

In CLK / CLKN No Clock pin (noninverted / inverted)

Out Q[Width-1:0] No Data output

In ENABLE Yes Group enable input

In ENABLE[Width-1:0] Yes Individual enable inputs

In LOAD Yes Perform synchronous initialization

In LOADDATA[Width-1: 0] Yes Data input for synchronous initialization

In OE Yes Group tristate control input

In OE[Width-1:0] Yes Individual tristate control inputs

In R/RN/S/SN/P/PN No Reset/Set/Preset(active high/low)

Input Output

RN DATA[W-1:0] CLK ENABLE Q[W-1:0]

0 X X X 0

1 X 0>1 X No Change

1 0 0>1 1 0

1 1 0>1 1 1

1 X 0>1 1Q(I) = Q-(I-1)

Q(0) = SI

Parameter Value Explanation

0373f.fm Page 55 Tuesday, May 25, 1999 8:59 AM

Page 56: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

56 Component Generators Handbook

Flip Flop - D Type

Statistics

Figure 19. Flip Flop - D Type

Name Speed (MHz) Delay (ns) Cells Size (x*y)

fdt16 384.61 2.6 16 1x16

fdt8 384.61 2.6 8 1x8

0373f.fm Page 56 Tuesday, May 25, 1999 8:59 AM

Page 57: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 57

Flip Flop - Toggle

Flip Flop - ToggleThe Toggle Flip Flop generator can be used to create a register bank con-sisting of T-type (toggle) flip flops.

Parameters

Parameter Value Explanation

Register Bank Enable

None No register enable control is provided

Group Enable

A single enable input is used to control all flip flops

Individual Enables

Each flip flop in the register bank has its own enable control

Tri-state control

None Register bank has no tri-state control

Group OE pin

A single OE pin is used to tri-state the out-puts of all flip flops

Individual OE pins

Each flip flop has its own tri-state control

Width Integer > 0 Width of the input and output data

Pitch Integer > 0 Spacing between input pins. Pitch of 2 means one cell between inputs

Invert clock Boolean Invert the clock input

Initialization Polarity = Low

Boolean Reset/Set/Preset input is active-low

Asynchronous initialization

Reset Registers can be reset to zero

Set Registers can be set to one

None Registers are automatically reset on power-up

Preset Registers can be asynchronously loaded with a constant value

Synchronous initialization

None Registers have synchronous initialization capability

Auxiliary input

Registers have a second data input that can be used to synchronously preset them to any value

Const. Value

Registers can be synchronously preset with a user-supplied constant value

(continued)

0373f.fm Page 57 Tuesday, May 25, 1999 8:59 AM

Page 58: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

58 Component Generators Handbook

Flip Flop - Toggle

Pins

Note: The truth table below assumes that an active-low reset and non-inverted clock have been selected.

Truth Table

Note: Q- is the value of Q preceding the clock transition.

Initialization Value Radix

Binary Initialization values are specified using bi-nary representation

Octal Values are specified in octal

Decimal Values are specified in decimal

Hex Values are specified in hexadecimal

Type Name Option Explanation

In DATA[Width-1:0] No Data input

In CLK / CLKN No Clock pin (noninverted / inverted)

Out Q[Width-1:0] No Data output

In ENABLE Yes Group enable input

In ENABLE[Width-1:0] Yes Individual enable inputs

In LOAD Yes Perform synchronous parallel load

In LOADDATA[Width-1: 0] Yes Parallel load data

In OE Yes Group tristate control input

In OE[Width-1:0] Yes Individual tristate control inputs

In R/RN/S/SN/P/PN No Reset/Set/Preset(active high/low)

Input Output

RN DATA[W-1:0] CLK ENABLE Q[W-1:0]

0 X X X 0

1 X 0>1 0 No Change

1 0 0>1 1 Q

1 1 0>1 1 ~Q

Parameter Value Explanation

0373f.fm Page 58 Tuesday, May 25, 1999 8:59 AM

Page 59: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 59

Flip Flop - Toggle

Statistics

Figure 20. Flip Flop - Toggle

Name Speed (MHz) Delay (ns) Cells Size (x*y)

fft16 384.61 2.6 16 1x16

fft8 384.61 2.6 8 1x8

0373f.fm Page 59 Tuesday, May 25, 1999 8:59 AM

Page 60: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

60 Component Generators Handbook

Gray Code

Gray CodeThe Gray Code generator can be used to convert binary code to graycode or gray code to binary code.

Parameters

Pins

Truth Table

Statistics

Parameter Value Explanation

Function ToGray Convert the binary code input to gray-code

ToBinary Convert the gray-code input to binary code

Width Integer > 1 Width of input and output data

Type Name Option Explanation

In DATA[Width-1:0] No Input data to be converted

Out OUT[Width-1:0 No Output bits

Input Output

Binary DATA[W-1:0]DATAW, DATA[W-1] xor DATAW,

DATA[W-2] xor DATA[W-1],...

Gray DATA[W-1:0]DATAW, DATA[W-1] xor DATAW,

DATA[W-2] xor DATA[W-1] xor DATAW, ...

Name Speed (MHz) Delay (ns) Cells Size (x*y)

gra16 357.14 2.8 8 1x8

gra8 357.14 2.8 4 1x4

0373f.fm Page 60 Tuesday, May 25, 1999 8:59 AM

Page 61: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 61

Gray Code

Figure 21. Gray Code

0373f.fm Page 61 Tuesday, May 25, 1999 8:59 AM

Page 62: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

62 Component Generators Handbook

Inc/Dec by 1

Inc/Dec by 1The Incrementor/Decrementor by 1 generator can be used to add/sub-tract 1 to/from the current registered value.This generator can be used tocreate a macro which increments or decrements by 1 a preloaded valueor the data input on each rising (or falling) edge of the clock. The func-tional description of the generator is as follows:

always @(posedge CLK or negedge R)

begin

if(R == ‘b0)

SUM = 0;

else if (ENABLE && !LOAD) // Assuming Load is active low

SUM = DATA;

else if (ENABLE)

begin

if (INC_DEC)

{COUT, SUM} = SUM + 1;

else

{COUT, SUM} = SUM - 1;

end

end

Note: The above assumes that positive-edge clock and active-low reset have been specified.

0373f.fm Page 62 Tuesday, May 25, 1999 8:59 AM

Page 63: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 63

Inc/Dec by 1

Parameters

Parameter Value Explanation

Function Increment Generate an incrementor

Decrement Generate a decrementor

Increment Decrement

Generate a programmable incrementor / decrementor

Pitch Integer >= 1 Spacing between input pins. A pitch of 2 means one cell between input pins

Width Integer > 1 Width of input and output vectors

Load Boolean Macro has a parallel load capability

Enable Boolean Provide enable pin

Initialization Reset Registers can be reset to zero

Set Registers can be set to one

None Registers are automatically reset on power-up

Preset Registers can be asynchronously loaded with a constant value

Invert Clock Boolean Invert the clock input

Initialization Polarity = Low

Boolean Initialization input is active-low

Preset value radix

Binary Constants for preset are specified in binary representation

Octal Constants are specified in octal

Decimal Constants are specified in decimal

Hex Constants are specified in hexadecimal

0373f.fm Page 63 Tuesday, May 25, 1999 8:59 AM

Page 64: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

64 Component Generators Handbook

Inc/Dec by 1

Pins

If Incrementor, then Carry out = SUM[Width-1:0]+1 > 2n - 1

else Carry out = SUM[Width-1:0]-1 < -2n

Truth Table

Type Name Option Explanation

In LOADIN Yes Loads the data if low

In ENABIN Yes Enables the Incrementor / Decrementor, active high

In INC_DEC Yes Incrementor if high, other-wise Decrementor

In DATA [Width-1:0] No Data input, if LOADIN is low, as parallel load

In CLK / CLKN Yes Clock (noninverted / inverted)

In R/RN/S/SN/P/PN Yes Reset/set/preset (active high /low)

Out SUM[Width-1:0] No Accumulator output

Out COUT No Carry out

Input Output

LOADIN ENABIN INC_DEC DATA [W-1:0] SUM[W-1:0] COUT

0 x 1 A A 1 if A+1> (2W)-1, 0 otherwise

0 x 0 A A 1 if A-1< -(2W), 0 otherwise

1 0 x x Present state Present state

1 1 1 x SUM[W- 1:0]+1 1 if SUM[W-1:0]+1 > (2W)-1, 0 otherwise

1 1 0 x SUM[W-1:0]-1 1 if SUM[W-1:0]-1 < -(2W), 0 otherwise

0373f.fm Page 64 Tuesday, May 25, 1999 8:59 AM

Page 65: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 65

Inc/Dec by 1

Statistics

Figure 22. Inc/Dec by 1

Name Speed (MHz) Delay (ns) Cells Size (x*y)

inc16 31.05 32.2 16 1x16

inc8 55.55 18.0 8 1x8

0373f.fm Page 65 Tuesday, May 25, 1999 8:59 AM

Page 66: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

66 Component Generators Handbook

Inc/Dec by Value

Inc/Dec by ValueThe Incrementor/Decrementor by value generator can be used to add/subtract a value to/from the current registered value.This generator canbe used to create a macro which increments or decrements a preloadedvalue or the data input by a user-specified amount on each rising (or fall-ing) edge of the clock. The functional description of the generator is asfollows:

always @(posedge CLK or negedge R)

begin

if(R == ‘b0)

SUM = 0;

else if (ENABLE && !LOAD)// Assuming Load is active low

SUM = DATA;

else if (ENABLE)

begin

if (INC_DEC)

{COUT, SUM} = SUM + VALUE;

else

{COUT, SUM} = SUM - VALUE;

end

end

Note: The above assumes that positive-edge clock and active-low reset have been specified.

0373f.fm Page 66 Tuesday, May 25, 1999 8:59 AM

Page 67: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 67

Inc/Dec by Value

Parameters

Parameter Value Explanation

Function Increment Generate an incrementor

Decrement Generate a decrementor

Increment Decrement

Generate a programmable incrementor / decrementor

Pitch Integer >= 1 Spacing between input pins. A pitch of 2 means one cell between input pins

Width Integer > 1 Width of input and output vectors

Inc/dec value Integer >= 1 Amount to increment/decrement by

Load Boolean Macro has a parallel load capability

Enable Boolean Provide enable pin

Initialization Reset Registers can be reset to zero

Set Registers can be set to one

None Registers are automatically reset on power-up

Preset Registers can be asynchronously loaded with a constant value

Invert Clock Boolean Invert the clock input

Initialization Polarity = Low

Boolean Initialization input is active-low

Preset value radix

Binary Constants for preset are specified in binary representation

Octal Constants are specified in octal

Decimal Constants are specified in decimal

Hex Constants are specified in hexadecimal

0373f.fm Page 67 Tuesday, May 25, 1999 8:59 AM

Page 68: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

68 Component Generators Handbook

Inc/Dec by Value

Pins

If Incrementor, then Carry out = SUM[Width-1:0]+IncDecValue > 2n - 1

else Carry out = SUM[Width-1:0]-IncDecValue < -2n

Truth Table

Type Name Option Explanation

In LOADIN Yes Loads the data if low

In ENABIN Yes Enables the Incrementor / Decrementor, active high

In INC_DEC Yes Incrementor if high, otherwise Decrementor

In DATA [Width-1:0] No Data input, if LOADIN is low, as parallel load

In CLK / CLKN Yes Clock (noninverted / inverted)

In R/RN/S/SN/P/PN Yes Reset/set/preset (active high / low)

Out SUM[Width-1:0] No Accumulator output

Out COUT No Carry out

Input Output

LOADIN ENABIN INC_DEC DATA[W-1:0] SUM[W-1:0] COUT

0 x 1 A A 1 if A+IncDecValue > (2W)-1, 0 otherwise

0 x 0 A A 1 if A-IncDecValue < -(2W), 0 otherwise

1 0 x x Present state Present state

1 1 1 x SUM[W-1:0]+ IncDecValue

1 if SUM[W-1:0]+ IncDecValue > (2W)-1,

0 otherwise

1 1 0 x SUM[W-1:0]- IncDecValue

1 if SUM[W-1:0]- IncDecValue < -(2W),

0 otherwise

0373f.fm Page 68 Tuesday, May 25, 1999 8:59 AM

Page 69: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 69

Inc/Dec by Value

Statistics

Figure 23. Inc/Dec by Value

Name Speed (MHz) Delay (ns) Cells Size (x*y)

inv16 31.05 32.2 16 1x16

inv8 55.55 18.0 8 1x8

0373f.fm Page 69 Tuesday, May 25, 1999 8:59 AM

Page 70: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

70 Component Generators Handbook

Latch - Transparent

Latch - TransparentThe Latch generator can be used to create a D-type transparent latch.

Parameters

Parameter Type Explanation

Width Integer > 0 Width of the input and output data

Pitch Integer > 0 Spacing between input pins. Pitch of 2 means one cell between inputs

Latch Enable Group Enable

One enable pin controls all latches

Individual Enables

Each latch has its own enable input

Tri-state control

None Latch outputs are not tristated

Group OE pin

Latch outputs are tristated and controlled from a single OE pin

Individual OE pins

Each latch has its own OE pin to control the tri-stating of its outputs

Active Low Set/Reset

Boolean Reset/Set/Preset input is active-low

Asynchronous initialization

Reset Latches can be reset to zero

Set Latches can be set to one

None Latches are automatically reset on powerup

Preset Latches can be asynchronously loaded with a constant value

Initialization Value Radix

Binary Initialization values are specified using binary representation

Octal Values are specified in octal

Decimal Values are specified in decimal

Hex Values are specified in hexadecimal

0373f.fm Page 70 Tuesday, May 25, 1999 8:59 AM

Page 71: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 71

Latch - Transparent

Pins

Statistics

Type Name Option Explanation

In DATA[Width-1:0] No Data input to the D-type latches

In ENABLE Yes Common Latch Enable input (1 = flow-through, 0 = latch)

In ENABLE[Width-1:0] Yes Individual Latch Enable inputs (1 = flow-through, 0 = latch)

In OE Yes Common Output Enable input (0 = tri-state)

In OE[Width-1:0] Yes Individual Output Enable inputs (0 = tri-state)

In R/RN/S/SN/P/PN Yes Reset/set/preset (active high/low)

Out Q[Width-1:0] No Data output from D latches

Name Speed (MHz) Delay (ns) Cells Size (x*y)

ldt16 526.31 1.9 16 1x16

ldt8 526.31 1.9 8 1x8

0373f.fm Page 71 Tuesday, May 25, 1999 8:59 AM

Page 72: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

72 Component Generators Handbook

Latch - Transparent

Figure 24. Latch - Transparent

0373f.fm Page 72 Tuesday, May 25, 1999 8:59 AM

Page 73: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 73

Logic Gates

Logic GatesA variety of Logic Gates can be generated, each with a programmablenumber of inverted inputs.

Parameters

Pins

Note: S stands for Size (number of gates) and W stands for Width (number of inputs per gate).

Parameter Value Explanation

Gate Type AND And gates

NAND Nand gates

OR Or gates

NOR Nor gates

XOR Exclusive Or gates

XNOR Exclusive NOR gates

INV Inverter gates

Number of gates

Integer > 0 Number of gates in component

Number of in-puts per gate

Integer > 0 Width of input vector for each gate

Number of in-verted inputs per gate

Integer > 0 Number of inputs that are inverted on each gate. The inverted inputs start from the first input to the gate and count up.

CommonInput Boolean Select this option if a common input should be supplied to each of the gates

Type Name Option Explanation

In DATA[S-1:0]_[W-1:0] No Gate input pin where S goes from 0 to Size and W goes from 0 to Width

Out RESULT[S-1:0] No Gate output

0373f.fm Page 73 Tuesday, May 25, 1999 8:59 AM

Page 74: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

74 Component Generators Handbook

Logic Gates

Truth Table

Note: S stands for Size (number of gates) and W stands for Width (number of inputs per gate).

If the inverter function is selected, or the gate width is 2, the macro mustbe generated as a soft macro (i.e. with the Hard macro option dese-lected). This is to ensure the most efficient implementation of the logic assmall gates are better handled by the Mapper in Figaro and cannot beeffectively implemented as a hard macro.

Statistics

Type Name Explanation

And DATA[S-1:0]_[W-1:0] DATA0 * DATA1 ... * DATAW-1

Inv DATA[S-1:0]_[W-1:0] ~DATA0, ~DATA1, ... ~DATAS-1

Nand DATA[S-1:0]_[W-1:0] ~(DATA0 * DATA1 ... * DATAW-1)

Nor DATA[S--1:0]_[W-1:0] ~(DATA0 + DATA1 ... + DATAW-1)

Or DATA[S-1:0]_[W-1:0] DATA0 + DATA1 ... + DATAW-1

Xor DATA[S-1:0]_[W-1:0] DATA0 ^ DATA1 ... ^ DATAW-1

Xnor DATA[S-1:0]_[W-1:0] ~(DATA0 ^ DATA1 ... ^ DATAW-1)

Name Speed(MHz) Delay (ns) Cells Size (x*y)

log16 99.00 10.1 6 4x2

log8 208.33 4.8 3 3x2

0373f.fm Page 74 Tuesday, May 25, 1999 8:59 AM

Page 75: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 75

Logic Gates

Figure 25. Logic Gates

0373f.fm Page 75 Tuesday, May 25, 1999 8:59 AM

Page 76: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

76 Component Generators Handbook

Look-Up Table

Look-Up TableThe Look-Up Table (LUT), or Generic Cell generator can be used as aconvenient interface for generating components using the FGENxx andMGENxx generic cell components in the AT40K macro library. The gener-ator allows complete control over the function of an AT40K core cell, andit allows this function to be replicated n times.

Parameters

Parameter Value Explanation

LUT Type 4-input LUT Configure each cell in the macro as an FGEN1-type component, with a single 4-input LUT.

2 x 3-input LUT

Configure each cell in the macro as an FGEN2-type component, with two 3 -input LUT sharing common inputs.

4-input LUT with AND gate

Configure each cell in the macro as an MGEN-type component, with a single 4-input LUT and an upstream AND gate.

Tri-state control

None Cells have no tri-state control

Group OE pin

A single OE pin is used to tri-state the outputs of all cells

Individual OE pins

Each cell has its own tri-state control

Number of LUTs

Integer > 0 Number of generic cells to be included in the macro. Each cell is configured identically.

Pitch Integer > 0 Spacing between generic cells.

Internal Feedback

Boolean Program the cell to include internal feedback (FB input). This reduces the number of exter-nal inputs to the cell by one. Not available for 1x4-input LUT with AND gate.

Function G String Equation string used to specify the function of the G cell output, in terms of A, B, C, D and FB (if feedback option is selected).

Function H String Equation string used to specify the function of the H cell output, in terms of A, B, C, D and FB (if feedback option is selected).

Register Boolean Include a register in the cell

0373f.fm Page 76 Tuesday, May 25, 1999 8:59 AM

Page 77: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 77

Look-Up Table

If the register option is selected, the following additional parameters areavailable.

Register Parameters

Pins

Parameter Value Explanation

Invert clock Boolean Invert the clock input

Initialization Polarity = Low

Boolean Reset/Set/Preset input is active-low

Initialization Reset Registers can be reset to zero

Set Registers can be set to one

None Registers are automatically reset on power-up

Preset Registers can be asynchronously loaded with a constant value

Initialization Value Radix

Binary Initialization value is specified using binary representation

Octal Value is specified in octal

Decimal Value is specified in decimal

Hex Value is specified in hexadecimal

Type Name Option Explanation

In A[N-1:0] No Data input A (must always be used in equation)

In B[N-1:0] Yes Data input B

In C[N-1:0] Yes Data input C

In D[N-1:0] Yes Data input D

Out G[N-1:0] No Data output

Out H[N-1:0] Yes Data output

In OE Yes Group output enable pin

In OE[N-1:0] Yes Individual output enable pins

In CLK / CLKN No Clock pin (noninverted / inverted)

In R/RN/S/SN/P/PN No Reset/Set/Preset(active high / low)

0373f.fm Page 77 Tuesday, May 25, 1999 8:59 AM

Page 78: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

78 Component Generators Handbook

Look-Up Table

In the above table, N stands for the number of generic cells in the macro.Note that the truth table below assumes that an active-low reset and non-inverted clock have been selected.

Statistics

Figure 26. Look-Up Table

Name Speed (MHz) Delay (ns) Cells Size (x*y)

lut16 357.14 2.8 16 1x16

lut8 357.14 2.8 8 1x8

0373f.fm Page 78 Tuesday, May 25, 1999 8:59 AM

Page 79: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 79

Multiplier - Serial Parallel

Multiplier - Serial ParallelThe Serial Parallel Multiplier (SPM) generator can be used to create asigned or unsigned serial by parallel multiplier with serial output. A width nunsigned multiplier is constructed in the FPGA by stringing n Carry-SaveAdders. A width n signed multiplier is constructed by stringing n-1 Carry-Save Adders and a two’s complement together.

Let X and Y be the n-bit and m-bit number respectively. The parallel inputX is multiplied by each bit of serial input with the least significant bit com-ing first, and each of those partial products is added to the shifted accu-mulation of the previous product. The serial output is then taken from theoutput of the least significant bit adder. The output bit has the sameweight as the previous serial input bit. The number of bits in the output isequal to the sum of the number of bits in each of the inputs.

Thus the product is:

{Y_(m-1)}*{X_(n-1)*2**(n-1)+X_(n-2)*2**(n-2)+...+X_(0)}

+ {Y_(m-2)}*{X_(n-1)*2**(n-1)+X_(n-2)*2**(n-2)+...+X_(0)}

+...

+ {Y_(0)}*{X_(n-1)*2**(n-1)+X_(n-2)*2**(n-2)+...+X_(0)}

Note: The multiplier uses an asynchronous initialization scheme. After each multiplication operation is complete, the reset pin should be asserted for one clock cycle. This flushes the carry-save registers and is required for correct operation of the multiplier.

Parameters

Parameter Value Explanation

Width Integer > 1 Width of parallel input data

Representation Signed Treat inputs as signed

Unsigned Treat inputs as unsigned

Invert Clock Boolean Invert the clock input

Initialization Polarity = Low

Boolean Reset input is active-low

0373f.fm Page 79 Tuesday, May 25, 1999 8:59 AM

Page 80: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

80 Component Generators Handbook

Multiplier - Serial Parallel

Pins

Statistics

Figure 27. Multiplier - Serial Parallel

Type Name Option Explanation

In X[Width-1:0] No Multiplier (parallel input)

In Y No Multiplicand (serial input)

In R / RN No Reset input (active high / low)

Out PROD No Product of X and Y (serial output)

Name Speed (MHz) Delay (ns) Cells Size (x*y)

msp16 99.00 10.1 32 2x16

msp8 99.00 10.1 16 2x8

0373f.fm Page 80 Tuesday, May 25, 1999 8:59 AM

Page 81: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 81

Multiplier - Signed

Multiplier - SignedThe signed multiplier generator can be used to generate the product oftwo varying width inputs. The function it produces is the following:

Product = DATAA * DATAB

where DATAA and DATAB are treated as two’s complement signed num-bers.

Parameters

Pins

Statistics

Parameter Value Explanation

WidthA Integer > 2 Width of input DataA

WidthB Integer > 2 Width of input DataB

Type Name Option Explanation

In DATAA[WidthA-1:0] No Multiplicand

In DATAB[WidthB-1:0] No Multiplier

Out PRODUCT[Width-1:0] No DataA * DataB (Width is WidthA+WidthB)

Name Speed (MHz) Delay (ns) Cells Size (x*y)

mls16 15.79 63.3 289 17x17

mls8 30.12 33.2 81 9x9

0373f.fm Page 81 Tuesday, May 25, 1999 8:59 AM

Page 82: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

82 Component Generators Handbook

Multiplier - Signed

Figure 28. Multiplier - Signed

0373f.fm Page 82 Tuesday, May 25, 1999 8:59 AM

Page 83: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 83

Multiplier - Signed, 1 Stage of Pipelining

Multiplier - Signed, 1 Stage of PipeliningPipeline x 1This component can be used to generate the product of two varying widthinputs. A single stage of pipelining is used to produce a considerablyfaster macro than the standard signed multiplier with minimal additionallogic.

The function it produces is the following:

Product = DATAA * DATAB

where DATAA and DATAB are treated as two’s complement signed num-bers.

Parameters

Pins

Parameter Value Explanation

WidthA Integer > 2 Width of input DataA

WidthB Integer > 2 Width of input DataB

Invert Clock Boolean Invert the clock input

Initialization Polarity = Low

Boolean Reset input is active-low

Initialization Reset Provide a reset input for initialization of the pipeline registers

None Pipeline registers are automatically initialized on power-up

Type Name Option Explanation

In DATAA[WidthA-1:0] No Multiplicand

In DATAB[WidthB-1:0] No Multiplier

In CLK / CLKN No Clock input (noninverted/inverted)

In R / RN Yes Reset input (active high /low)

Out PRODUCT[Width-1:0] No DataA * DataB (Width is WidthA+WidthB)

0373f.fm Page 83 Tuesday, May 25, 1999 8:59 AM

Page 84: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

84 Component Generators Handbook

Multiplier - Signed, 1 Stage of Pipelining

Statistics

Figure 29. Multiplier - Signed

Name Speed (MHz) Delay (ns) Cells Size (x*y)

mps16 28.81 34.7 306 17x18

mps8 49.26 20.3 90 9x10

0373f.fm Page 84 Tuesday, May 25, 1999 8:59 AM

Page 85: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 85

Multiplier - Unsigned

Multiplier - UnsignedThe unsigned multiplier generator can be used to generate the product oftwo varying width inputs. The function it produces is the following:

Product = DATAA * DATAB

Where DATAA and DATAB are treated as unsigned numbers.

Parameters

Pins

Statistics

Parameter Value Explanation

WidthA Integer > 2 Width of input DataA

WidthB Integer > 2 Width of input DataB

Truncate result to n least significant bits

Integer >= 0 The number of output pins that have to be included in the layout starting from the LSB. This option saves the layout area by not including the unnecessary output pins. If this value is left at 0, all outputs will be present.

Type Name Option Explanation

In DataA[WidthA-1:0] No Multiplicand

In DataB[WidthB-1:0] No Multiplier

Out PRODUCT[Width-1:0] No DataA * DataB (Width is WidthA+WidthB)

Name Speed (MHz) Delay (ns) Cells Size (x*y)

mlu16 16.26 61.5 256 16x16

mlu8 31.84 31.4 64 8x8

0373f.fm Page 85 Tuesday, May 25, 1999 8:59 AM

Page 86: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

86 Component Generators Handbook

Multiplier - Unsigned

Figure 30. Multiplier - Unsigned

0373f.fm Page 86 Tuesday, May 25, 1999 8:59 AM

Page 87: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 87

Multiplier - Unsigned, 1 Stage of Pipelining

Multiplier - Unsigned, 1 Stage of PipeliningPipeline x 1This component can be used to generate the product of two varying widthinputs. A single stage of pipelining is used to produce a considerablyfaster macro than the standard unsigned multiplier with minimal additionallogic.

The function it produces is the following:

Product = DATAA * DATAB

Where DATAA and DATAB are treated as unsigned numbers.

Parameters

Pins

Parameter Value Explanation

WidthA Integer > 2 Width of input DataA

WidthB Integer > 2 Width of input DataB

Invert Clock Boolean Invert the clock input

Initialization Polarity = Low

Boolean Reset input is active-low

Initialization Reset Provide a reset input for initialization of the pipeline registers

None Pipeline registers are automatically initialized on power-up

Type Name Option Explanation

In DATAA[WidthA-1:0] No Multiplicand

In DATAB[WidthB-1:0] No Multiplier

In CLK / CLKN No Clock input (noninverted/inverted)

In R / RN Yes Reset input (active high /low)

Out PRODUCT[Width-1:0] No DataA * DataB (Width is WidthA+WidthB)

0373f.fm Page 87 Tuesday, May 25, 1999 8:59 AM

Page 88: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

88 Component Generators Handbook

Multiplier - Unsigned, 1 Stage of Pipelining

Statistics

Figure 31. Multiplier - Unsigned

Name Speed (MHz) Delay (ns) Cells Size (x*y)

mup16 31.94 31.3 272 16x17

mup8 59.52 16.8 72 8x9

0373f.fm Page 88 Tuesday, May 25, 1999 8:59 AM

Page 89: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 89

Mux

MuxThe Mux generator can be used to generate one or more muxes con-trolled by a single SELECT bus input. The width of each Mux is user pro-grammable.

Parameters

Pins

Note: In the above table Size represents the number of muxes and Width is the number of inputs to each mux.

Truth Table

Parameter Value Explanation

Number of muxes

Integer >= 1 Number of parallel mux components in the macro

Number of inputs per mux

Integer >= 1 Number of inputs that each mux switches

Type Name Option Explanation

In S[log2 (Width) - 1:0] No Mux select pins, log2 Width bits wide

In DATA[Size-1:0]_[Width-1:0]

No Mux input pins

Out RESULT[Size-1:0] No Mux output

Input Output

S DATA RESULT

0 ..XXX0 0

0 ..XXX1 1

1 ..XX0X 0

1 ..XX1X 1

2 ..X0XX 0

2 ..X1XX 1

.

.

.

.

.

.

0373f.fm Page 89 Tuesday, May 25, 1999 8:59 AM

Page 90: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

90 Component Generators Handbook

Mux

Statistics

Figure 32. Mux

Name Speed (MHz) Delay (ns) Cells Size (x*y)

mux16 113.63 8.8 16 8x2

mux8 126.58 7.9 8 4x2

0373f.fm Page 90 Tuesday, May 25, 1999 8:59 AM

Page 91: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 91

Negate Function

Negate FunctionThe Negate Function generator can be used to create a two’s comple-ment function implemented in a ripple carry manner.

if DATA = 2(Width-1), then

OVERFLOW = 1, RESULT = -DATA

else

RESULT = -DATA

DATA must always represent a positive number and the RESULT isalways a two’s complement number

Parameters

Pins

Statistics

Parameter Value Explanation

Overflow Boolean Overflow output pin is present

Width Integer > 1 Width of input and output data

Type Name Option Explanation

In DATA[Width-1:0] No Data input

Out RESULT No Data output = two’s complement of Data

Out OVERFLOW Yes 1 if Data = 2(Width-1), 0 otherwise

Name Speed (MHz) Delay (ns) Cells Size (x*y)

nef16 35.84 27.9 16 1x16

nef8 70.92 14.1 8 1x8

0373f.fm Page 91 Tuesday, May 25, 1999 8:59 AM

Page 92: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

92 Component Generators Handbook

Negate Function

Figure 33. Negate Function

0373f.fm Page 92 Tuesday, May 25, 1999 8:59 AM

Page 93: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 93

Pulse Gen - Fixed

Pulse Gen - FixedThis can be used to create a pulse generator that asserts its output onceevery n clock cycles, where n is a fixed value specified by the user.

Parameters

Pins

Statistics

Parameter Value Explanation

Generate a pulse every n clock cycles

Integer > 1 Output will be low for n-1 clock cycles, then high for 1 clock cycle, in a repeating pattern

Radix of above value

Binary n is specified in binary representation

Octal n is specified in octal representation

Decimal n is specified in decimal representation

Hex n is specified in hexadecimal representa-tion

Pitch Integer >= 1 Spacing between cells in the pulse genera-tor – a pitch of 2 doubles the size of the generator by spreading out its layout

Invert Clock Boolean Invert the clock input

Initialization Polarity = Low

Boolean Preset input is active-low

Type Name Option Explanation

In CLK / CLKN No Clock (noninverted / inverted)

In P / PN No Preset to starting value (active high / low)

Out TERMCNT No Terminal Count (Pulse output)

Name Speed (MHz) Delay (ns) Cells Size (x*y)

pls16 72.46 13.8 5 1x5

pls8 83.33 12.0 4 1x4

0373f.fm Page 93 Tuesday, May 25, 1999 8:59 AM

Page 94: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

94 Component Generators Handbook

Pulse Gen - Fixed

Figure 34. Pulse Gen - Fixed

0373f.fm Page 94 Tuesday, May 25, 1999 8:59 AM

Page 95: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 95

Pulse Gen - Loadable

Pulse Gen - LoadableThis can be used to create a pulse generator that asserts its output onceevery n clock cycles, where n is a value that is loaded into the macro atrun-time. Performing a parallel load operation modifies the value of n, i.e.the pulse frequency.

Parameters

Pins

Statistics

Parameter Value Explanation

Width Integer > 1 Width of the pulse generator (i.e. the num-ber of registers it contains). This parameter dictates the maximum size of n that can be loaded into the macro.

Pitch Integer >= 1 Spacing between cells in the pulse genera-tor – a pitch of 2 doubles the size of the generator by spreading out its layout

Invert Clock Boolean Invert the clock input

Initialization Polarity = Low

Boolean Reset input is active-low

Type Name Option Explanation

In SLOAD No 0 = Load pulse frequency value, 1 = generate pulses

In DATA [Width-1:0] No Parallel load inputs for pulse frequency value

In CLK / CLKN No Clock (noninverted / inverted)

In R / RN No Reset (active high / low)

Out TERMCNT No Terminal Count (Pulse output)

Name Speed (MHz) Delay (ns) Cells Size (x*y)

pll16 16.02 62.4 48 3x17

pll8 29.76 33.6 24 3x9

0373f.fm Page 95 Tuesday, May 25, 1999 8:59 AM

Page 96: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

96 Component Generators Handbook

Pulse Gen - Loadable

Figure 35. Pulse Gen - Loadable

0373f.fm Page 96 Tuesday, May 25, 1999 8:59 AM

Page 97: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 97

RAM - Dual Port

RAM - Dual PortThe Dual Port RAM generator is used to create synchronous and asyn-chronous random-access memories. The read data, write data, readaddress and write address ports are all brought out to separate sets ofpins. Only one location can be read/written at any time. The generatormakes use of the RAM cells included in the AT40K architecture, each ofwhich incorporates a 5-bit address decoder. If the required address widthis greater than 5, additional decoding logic is generated as part of themacro. This decode logic can either be grouped together in one place(clustered), or distributed across the different sectors alongside the RAMcells.

When the OEN (Output Enable) pin is asserted (OEN=‘0’) and the WEN(Write Enable) pin is de-asserted (WEN=‘1’), the RAM is in read mode(data currently selected by AOUT appears on the DIO port). When theOEN (Output Enable) pin is de-asserted (OEN=‘1’) and the WEN (WriteEnable) pin is asserted (WEN=‘0’), the RAM is in write mode (datapresent on the DIO port is written to the address selected by the AINport). When both OEN and WEN are de-asserted, the operation of theRAM is effectively suspended.

Parameters

Parameter Value Explanation

Address Width

Integer > 0 Width of Address Inputs - The number of RAM words created is determined by this parameter, e.g. 2AdWidth

Width Integer > 0 Width of RAM data word created is deter-mined by this parameter. Must be a multi-ple of 4 bits.

External Decoding

Clustered Additional decode logic (if required) should be grouped together in one sector

Distributed Additional decode logic (if required) should be distributed across multiple sectors

RAM Type Synchronous Generate a synchronous RAM

Asynchronous Generate an asynchronous RAM

Invert Clock Boolean Invert the clock input (synchronous RAM only)

0373f.fm Page 97 Tuesday, May 25, 1999 8:59 AM

Page 98: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

98 Component Generators Handbook

RAM - Dual Port

Pins

Statistics

Type Name Option Explanation

In AIN[AD-Width-1:0] No Input (write) address for RAM

In AOUT[AD-Width-1:0] No Output (read) address for RAM

In DIN[Width-1:0] No Input (write) data port

Out DOUT[Width-1:0] No Output (read) data port

In WEN No Write Enable (active low)

In CLK / CLKN Yes Clock input (noninverted/inverted)

In OEN No Output Enable (active low)

Name Speed (MHz) Delay (ns) Cells Size (x*y)

rdp16 188.67 5.3 1 7x2

rdp8 188.67 5.3 1 7x2

0373f.fm Page 98 Tuesday, May 25, 1999 8:59 AM

Page 99: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 99

RAM - Dual Port

Figure 36. RAM - Dual Port

0373f.fm Page 99 Tuesday, May 25, 1999 8:59 AM

Page 100: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

100 Component Generators Handbook

RAM - Single Port

RAM - Single PortThe Single Port RAM generator is used to create single-port random-access memories. Only one location can be read/written at any time. Thegenerator makes use of the RAM cells included in the AT40K architec-ture, each of which incorporates a 5-bit address decoder. If the requiredaddress width is greater than 5, additional decoding logic is generated aspart of the macro. This decode logic can either be grouped together inone place (clustered), or distributed across the different sectors alongsidethe RAM cells.

When the OEN (Output Enable) pin is asserted (OEN=‘0’) and the WEN(Write Enable) pin is de-asserted (WEN=‘1’), the RAM is in read mode(data currently selected by ADDRESS appears on the DIO port. When theOEN (Output Enable) pin is de-asserted (OEN=‘1’) and the WEN (WriteEnable) pin is asserted (WEN=‘0’), the bidirectional I/O lines are tri-statedand write data can be applied to the DIO port. When both OEN and WENare de-asserted, the operation of the RAM is effectively suspended. TheOEN and WEN pins should never be asserted simultaneously.

Parameters

Parameter Value Explanation

Address Width

Integer > 0 Width of Address Inputs - The number of RAM words created is determined by this parameter, e.g. 2AdWidth

Width Integer > 0 Width of RAM data word created is deter-mined by this parameter. Must be a multi-ple of 4 bits.

External Decoding

Clustered Additional decode logic (if required) should be grouped together in one sector

Distributed Additional decode logic (if required) should be distributed across multiple sectors

RAM type Synchronous Generate a synchronous RAM

Asynchronous Generate an asynchronous RAM

Invert Clock Boolean Invert the clock input (synchronous RAM only)

0373f.fm Page 100 Tuesday, May 25, 1999 8:59 AM

Page 101: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 101

RAM - Single Port

Pins

Statistics

Figure 37. RAM - Single Port

Type Name Option Explanation

In ADDRESS[AD-Width-1:0] No Input address for RAM

In/Out DIO[Width-1:0] No Data I/O Port

In WEN No Write Enable (active low)

In CLK / CLKN Yes Clock input (noninverted / inverted)

In OEN No Output Enable (active low)

Name Speed (MHz) Delay (ns) Cells Size (x*y)

rsp16 188.67 5.3 1 7x2

rsp8 188.67 5.3 1 7x2

0373f.fm Page 101 Tuesday, May 25, 1999 8:59 AM

Page 102: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

102 Component Generators Handbook

ROM

ROMThe ROM generator is used to create synchronous read-only data memo-ries. The data is generated by reading a user-supplied data file (describedbelow) and then using the look-up tables within each core cell to store thedata.

Parameters

Pins

The ROM generator reads as input a file specified by the File option(default is rom.hex) which should be located in the project directory. Theformat of the file is basically a header line with either hex, dec, oct or binto indicate that numbers in the file are in hexa-decimal, decimal, octal orbinary format respectively. Each subsequent line should be of the formAddress Value. For example:

Parameter Value Explanation

Address width

Integer > 0 Width of Address Inputs - The number of ROM words created is determined by this parameter, e.g. 2AdWidth

Width Integer > 0 Width of each ROM data word

ROM File File name Name of the file with data to be stored in the ROM

Enable input Boolean Provide an enable input (active high)

Type Name Option Explanation

In ADDRESS[AD-Width-1:0] No Input address for ROM

In OE Yes Memory Enable 1 = Out-put Data, 0 = Tri-State

Out Q[Width-1:0] No ROM Data output

0373f.fm Page 102 Tuesday, May 25, 1999 8:59 AM

Page 103: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 103

ROM

rom.hexdec

0 0

1 2

2 4

3 8

4 7

5 5

6 3

.

Statistics

Figure 38. ROM

Name Speed (MHz) Delay (ns) Cells Size (x*y)

rom16 357.14 2.8 8 8x1

rom8 357.14 2.8 7 4x2

0373f.fm Page 103 Tuesday, May 25, 1999 8:59 AM

Page 104: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

104 Component Generators Handbook

Shift Register

Shift RegisterThe Shift Register generator can be used to create serial, serial-parallel,parallel-serial and parallel-parallel shift registers.

Parameters

Parameter Value Explanation

Input Type Serial Input is serial

Parallel (Var.)

Input is parallel

Parallel (Const.)

Input is parallel, with a fixed value

Output Type Serial Output is serial

Parallel Output is parallel

Width Integer > 0 Width of shift register

Enable Boolean Add an Enable pin to the register

Invert clock Boolean Invert the clock input

Initialization polarity = Low

Boolean Reset/Set/Preset input is active-low

Initialization Reset Registers can be reset to zero

Set Registers can be set to one

None Registers are reset automatically on power-up

Preset Registers can be asynchronously loaded with a constant value

Preset & Parallel Input Radix

Binary Preset & parallel input values are specified using binary representation

Octal Values are specified in octal

Decimal Values are specified in decimal

Hex Values are specified in hexadecimal

0373f.fm Page 104 Tuesday, May 25, 1999 8:59 AM

Page 105: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 105

Shift Register

Pins

Note: The truth table below assumes that an active-low reset and non-inverted clock have been selected.

Truth Table

Notes: Q- is the value of Q preceding the clock transition.

Type Name Option Explanation

In DATA[Width-1:0] Yes Data input for parallel- input shift registers

In SHIFTIN Yes Data input for serial-input shift registers

In CLK/CLKN No Clock (noninverting/inverting)

In ENABLE Yes Register enable input

In SHIFTEN Yes (with parallel input)

0 = Load data in 1 = Shift

In R/RN/S/SN/P/PN No Reset/Set/Preset (active high/low)

Out Q[Width-1:0] Yes Data output for parallel-output shift registers

Out SHIFTOUT Yes Data output for serial-output shift registers

Input Output

RN DATA[W-1:0] CLK ENABLE SHIFTIN SHIFTEN Q[W-1:0] SHIFTOUT

0 X X X X X 0 Q(N-1)

1 X 0>1 X X X No Change Q(N-1)

1 0 0>1 1 X 1 0 Q(N-1)

1 1 0>1 1 X 1 1 Q(N-1)

1 X 0>1 1 SI 0 Q(I) = Q-(I-1) Q(0) = SI Q(N-2)

0373f.fm Page 105 Tuesday, May 25, 1999 8:59 AM

Page 106: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

106 Component Generators Handbook

Shift Register

Statistics

Figure 39. Shift Register

Name Speed (MHz) Delay (ns) Cells Size (x*y)

sre16 185.18 5.4 16 1x16

sre8 188.67 5.3 8 1x8

0373f.fm Page 106 Tuesday, May 25, 1999 8:59 AM

Page 107: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 107

Subtrator - Carry Select

Subtrator - Carry SelectThis generator can be used to create an n bit Carry Select Subtractor.

Parameters

Pins

Truth Table

Statistics

Parameter Value Explanation

Width Integer > 1 Width of input and output vectors

Carry In Boolean Provide a carry-in pin

Carry Out Boolean Provide a carry-out pin

Type Name Option Explanation

In CIN Yes Carry in

In DATAA[Width-1:0] No A input

In DATAB[Width-1:0] No B input

Out SUM[Width-1:0] No Subtractor output

Out COUT Yes Carry out

Input Output

CIN DATAA[W-1:0] DATAB[W-1:0] SUM[W-1:0] COUT

C A B A - B - C1 if A-B-C < 0,

0 otherwise

Name Speed (MHz) Delay (ns) Cells Size (x*y)

scs16 42.91 23.3 48 3x19

0373f.fm Page 107 Tuesday, May 25, 1999 8:59 AM

Page 108: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

108 Component Generators Handbook

Subtrator - Carry Select

Figure 40. Subtractor - Carry Select

0373f.fm Page 108 Tuesday, May 25, 1999 8:59 AM

Page 109: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 109

Subtractor - Ripple Carry

Subtractor - Ripple CarryThis generator can be used to create a Ripple Carry Subtractor.

Parameters

If input, output, carry-in or carry-out registers are selected, three addi-tional parameters are available.

Parameter Value Explanation

CarryIn NoRegister Include the carry in pin on the generator but do not register it.

Register Register carry in of the subtractor

Disabled Do not include the carry in pin on the subtractor

CarryOut Noregister Include the carry out pin on the subtractor but do not register it

Register Register carry out of the subtractor

Disabled Do not include the carry out pin on the subtractor

Register None Do not register the inputs and outputs

Input Register inputs on the subtractor, exclude carry in pin

Output Register outputs on the subtractor, exclude carry out pin

Both Register both inputs and outputs including the carry in and carry out pins of the subtractor

Signed over-flow pin

Boolean Provide a signed overflow output (treating input vectors as signed values)

Pitch Integer > 1 Spacing between input pins, pitch of 2 means one cell between input pins

Width Integer > 1 Width of input and output vectors

Aspect ratio Float >= 0.0 Aspect ratio of the subtractor layout. A ratio of 0.0 gives a thin, vertical layout, whereas a ratio of 1.0 gives a square layout

0373f.fm Page 109 Tuesday, May 25, 1999 8:59 AM

Page 110: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

110 Component Generators Handbook

Subtractor - Ripple Carry

Register Parameters

Pins

Carry out =DATAA - DATAB - CIN > 2n - 1 or

DATAA - DATAB - CIN < -2n

Overflow for Unsigned

DATAA - DATAB - CIN > 2n - 1 or

DATAA - DATAB - CIN < 0

Overflow for Signed

DATAA - DATAB - CIN > 2n - 1 or

DATAA - DATAB - CIN < -2n

Parameter Value Explanation

Invert Clock Boolean Invert the register clock

Initialization Polarity = Low

Boolean Make register initialization active low

Register set / reset function

Reset Registers can be reset to zero

Set Registers can be set to one

Type Name Option Explanation

In CIN Yes Carry in

In DATAA[Width-1:0] No A input

In DATAB[Width-1:0] No B input

In CLK / CLKN Yes Clock (noninverted / inverted)

In R / RN / S / SN Yes Reset / set (active high / low)

Out SUM[Width-1:0] No Adder output

Out COUT Yes Carry out (cannot be used with overflow in an unsigned adder)

Out OVERFLOW Yes Overflow

0373f.fm Page 110 Tuesday, May 25, 1999 8:59 AM

Page 111: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 111

Subtractor - Ripple Carry

Truth Table

Statistics

Figure 41. Subtractor - Ripple Carry

Input Output

CIN DATAA[W-1:0] DATAB[W-1:0] SUM[W-1:0] COUT

C A B A - B - C1 if A-B-C < 0,

0 otherwise

Name Speed (MHz) Delay (ns) Cells Size (x*y)

src16 33.33 30.0 16 1x16

src8 64.10 15.6 8 1x8

0373f.fm Page 111 Tuesday, May 25, 1999 8:59 AM

Page 112: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

112 Component Generators Handbook

Macro Library

Macro LibraryThe AT40K library of components can be divided into 2 types of macros:functional and dynamic. Functional macros are components with fixedfunctionality, such as the 2 input AND gate. Dynamic macros aredesigned to allow user specification of any desired functionality attachedas an attribute, via an equation string, on the symbol. This should be usedonly when a specific function for an AT40K core cell is required. Designstargeted to AT40K can use a mix of dynamic and functional macros.

Functional MacrosLogical Function

Description Area(x * y)

Gates - NAND

ND2 2-Input NAND 1x1

ND2I1 2-Input NAND with 1-Input inverted 1x1

ND2I2 2-Input NAND with 2-Inputs inverted 1x1

ND3 3-Input NAND 1x1

ND3I1 3-Input NAND with 1-Input inverted 1x1

ND3I2 3-Input NAND with 2-Inputs inverted 1x1

ND3I3 3-Input NAND with 3-Inputs inverted 1x1

ND4 4-Input NAND 1x1

ND4I1 4-Input NAND with 1-Input inverted 1x1

ND4I2 4-Input NAND with 2-Inputs inverted 1x1

ND4I3 4-Input NAND with 3-Inputs inverted 1x1

ND4I4 4-Input NAND with 4-Inputs inverted 1x1

Gates - AND

AN2 2-Input AND 1x1

AN2I1 2-Input AND with 1-Input inverted 1x1

AN2I2 2-Input AND with 2-Inputs inverted 1x1

AN3 3-Input AND 1x1

AN3I1 3-Input AND with 1-Input inverted 1x1

AN3I2 3-Input AND with 2-Inputs inverted 1x1

AN3I3 3-Input AND with 3-Inputs inverted 1x1

(continued)

0373f.fm Page 112 Tuesday, May 25, 1999 8:59 AM

Page 113: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 113

Macro Library

AN4 4-Input AND 1x1

AN4I1 4-Input AND with 1-Input inverted 1x1

AN4I2 4-Input AND with 2-Inputs inverted 1x1

AN4I3 4-Input AND with 3-Inputs inverted 1x1

AN4I4 4-Input AND with 4-Inputs inverted 1x1

Gates - OR

OR2 2-Input OR 1x1

OR2I1 2-Input OR with 1-Input inverted 1x1

OR2I2 2-Input OR with 2-Inputs inverted 1x1

OR3 3-Input OR 1x1

OR3I1 3-Input OR with 1-Input inverted 1x1

OR3I2 3-Input OR with 2-Inputs inverted 1x1

OR3I3 3-Input OR with 3-Inputs inverted 1x1

OR4 4-Input OR 1x1

OR4I1 4-Input OR with 1-Input inverted 1x1

OR4I2 4-Input OR with 2-Inputs inverted 1x1

OR4I3 4-Input OR with 3-Inputs inverted 1x1

OR4I4 4-Input OR with 4-Inputs inverted 1x1

Gates - NOR

NR2 2-Input OR 1x1

NR2I1 2-Input OR with 1-Input inverted 1x1

NR2I2 2-Input OR with 2-Inputs inverted 1x1

NR3 3-Input OR 1x1

NR3I1 3-Input OR with 1-Input inverted 1x1

NR3I2 3-Input OR with 2-Inputs inverted 1x1

NR3I3 3-Input OR with 3-Inputs inverted 1x1

NR4 4-Input OR 1x1

NR4I1 4-Input OR with 1-Input inverted 1x1

NR4I2 4-Input OR with 2-Inputs inverted 1x1

Logical Function

Description Area(x * y)

(continued)

0373f.fm Page 113 Tuesday, May 25, 1999 8:59 AM

Page 114: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

114 Component Generators Handbook

Macro Library

NR4I3 4-Input OR with 3-Inputs inverted 1x1

NR4I4 4-Input OR with 4-Inputs inverted 1x1

Gates - XOR

XO2 2-Input XOR 1x1

XO3 3-Input XOR 1x1

XO4 4-Input XOR 1x1

XN2 2-Input XNOR 1x1

XN3 3-Input XNOR 1x1

XN4 4-Input XNOR 1x1

Inverters

INV Inverter 1x1

Constants

ONE Logic One 1x1

ZERO Logic Zero 1x1

Multiplexers

MUX2 2-to-1 Multiplexer 1x1

MUX3 3-to-1 Multiplexer 1x2

Latches

LD D Latch Transparent High 1x1

LDRA D Latch Transparent High, Reset Low 1x1

LDSA D Latch Transparent High, Set Low 1x1

LDE D Latch Transparent High with Enable 1x1

Flip-Flops

FD D Flip-Flop 1x1

FDRA D Flip-Flop, Asynchronous Reset Low 1x1

FDSA D Flip-Flop, Asynchronous Set Low 1x1

FDE D Flip-Flop with Enable 1x1

FDRAE D Flip-Flop with Enable, Asynchronous Reset Low 1x1

Logical Function

Description Area(x * y)

(continued)

0373f.fm Page 114 Tuesday, May 25, 1999 8:59 AM

Page 115: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 115

Macro Library

Dynamic MacrosThis section describes the dynamic macros for the AT40K. The macorsare provided to give the user better control over the implementation ofspecific functions in a single core cell. It can also be used to simplify thedesign entry process. Pre-defined attributes with user designated valuesare used to exploit the logic capabilities of the AT40K core cell. The dif-ferent pre-defined attributes that can be specified for the dynamic macrosare listed below:

• FUNCTIONG

• FUNCTIONH

• CLOCKEDGE

• RSFUNCTION

• RSPOLARITY

• PRESERVE

FDSAE D Flip-Flop with Enable, Asynchronous Set Low 1x1

FJK JK Flip-Flop 1x1

FJKRA JK Flip-Flop, Asynchronous Reset Low 1x1

FJKSA JK Flip-Flop, Asynchronous Set Low 1x1

Arithmetic Functions

FA 1-Bit Full Adder 1x1

MULT 1-Bit Multiplier 1x1

Tri-State functions

BUFZ Tri-State Buffer 1x1

HZ Bus Driver High or Z 1x1

LZ Bus Driver Low or Z 1x1

RAM Macros

RAMS 32 X 4 Asynchronous Single Port RAM 1x1

RAMD 32 X 4 Asynchronous Dual Port RAM 1x1

RAMDSYNC 32 X 4 Synchronous Dual Port RAM 1x1

RAMSSYNC 32 X 4 Synchronous Single Port RAM 1x1

Logical Function

Description Area(x * y)

0373f.fm Page 115 Tuesday, May 25, 1999 8:59 AM

Page 116: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

116 Component Generators Handbook

Macro Library

Note: When dynamic macros are used in a design, the circuit cannot be simu-lated directly. It must be run through to Initial Placement before a func-tional netlist can be generated.

FUNCTIONGDescription

Specifies the equation to be implemented as the G output of themacro.

ValueAn equation string of one to four variables. Details on the eqution syn-tax are explained in the Equation Syntax section of the document.

FUNCTIONHDescription

Specifies the equation to be implemented as the H output of themacro.

ValueAn equation string of one to four variables. Details on the equationsyntax are explained in the Equation Syntax section of this document.

CLOCKEDGEDescription

Specifies the rising edge or falling edge trigger on the clock to whichthe register responds.

RSFUNCTIONDescription

The register in the AT40K core cell can provide set or reset functionsthrough the RS pin on the dynamic macros.

Value Explanation

RISING Positive edge trigger on the register CLK pin

FALLING Negative edge trigger on the register CLK pin

Value Explanation

RESET RS functions as reset pin

SET RS functions as set pin

0373f.fm Page 116 Tuesday, May 25, 1999 8:59 AM

Page 117: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 117

Macro Library

RSPOLARITYDescription

Specifies the polarity of the RS pin.

PRESERVEDescription

Specifies if the component should be preserved by the mapper duringtechnology mapping

Equation SyntaxThe equation string attached to the FUNCTIONG and FUNCTIONHattributes describes the combinatorial behavior of the respective outputsof the core cell. To register and/or tri-state the output of the equation, thecorrect registered or tri-stated dynamic macros must be used from thelibrary. The equation string is a multi-level sum-of-products equation builtusing the operators shown in the table below.

The dynamic macro input port names, called A, B, C, and D, are the vari-ables used in the equation. Unconnected input ports are allowed ondynamic macro instances. However, an error will be generated if a portname used in the equation string is not connected to a net. The CLK, RS,

Value Explanation

HIGH Active high RS pin

LOW Active low RS pin

Value Explanation

YES Don’t touch the macro during mapping

NO Macro can be flattened during mapping

Operators Description

^, ~ Logical NOT

*, & Logical AND

|, + Logical OR

#, @ Logical XOR

0373f.fm Page 117 Tuesday, May 25, 1999 8:59 AM

Page 118: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

118 Component Generators Handbook

Macro Library

and OE pins on the register and tri-state dynamic macros should not beused in the equation string.

The following section describes the dynamic macros available in theAT40K library.

Logical Function

Description

FGEN1 n input function generator (1 ≤ n ≤ 4)

FGEN1F n input function generator with combinatorial feedback (1 ≤ n ≤ 3)

FGEN1FT n input function generator with combinatorial feedback followed by tri-state buffer (1 ≤ n ≤ 3)

FGEN1R n input function generator followed by a register (1 ≤ n ≤ 4)

FGEN1RF n input function generator with registered feedback (1 ≤ n ≤ 3)

FGEN1RFT n input function generator with registered feedback followed by tri-state buffer(1 ≤ n ≤ 3)

FGEN1RT n input function generator followed by a register and tri-state buffer (1 ≤ n ≤ 4)

FGEN1T n input function generator followed by a tri-state buffer (1 ≤ n ≤ 4)

FGEN2 Two n input function generators (1 ≤ n ≤ 3)

FGEN2F Two n input function generators with combinatorial feedback on 1-output(1 ≤ n ≤ 2)

FGEN2FTTwo n input function generators with combinatorial feedback followed by tri-state bufferon 1-output (1 ≤ n ≤ 2)

FGEN2R Two n input function generators with 1-output registered and the other combinatorial (1 ≤ n ≤ 3)

FGEN2RF Two n input function generators with 1-output registered and fedback (1 ≤ n ≤ 2)

FGEN2RFT Two n input function generators with 1-output registered, tri-stated and fedback (1 ≤ n ≤ 2)

FGEN2RT Two n input function generators with 1-output registered and tri-stated (1 ≤ n ≤ 3)

FGEN2T Two n input function generator with 1-output tri-stated (1 ≤ n ≤ 3)

MGEN Two 3-input function generators

(continued)

0373f.fm Page 118 Tuesday, May 25, 1999 8:59 AM

Page 119: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 119

Macro Library

Note: The MGEN macros are special case macros (typically used in multi-pliers) with an upstream AND gate feeding the Look Up Tables.

I/O MacrosThis section covers the I/O macros available for the AT40K. In order tospecify additional functionality on the I/O, various properties or attributesare used. Different pre-defined attributes can be set on the I/O pads in theAT40K library. Attributes are used on the I/O macros to select the thresh-old levels, different slew rates etc. The pre-defined attributes that can bespecified on the I/O macros are listed below:

• THRESHOLD

• SCHMITT

• SLEWRATE

• EXTRADELAY

THRESHOLDDescription

Specifies the threshold level on the input buffers.

SCHMITTDescription

Specifies whether a Schmitt trigger circuit on the input pads should beenabled or disabled. The Schmitt trigger is a regenerative comparatorcircuit to improve the rise and fall times (leading and trailing edges) ofthe incoming signal.

MGENR Two 3-input function generators with 1-output registered

MGENRT Two 3-input function generators with 1-output registered and tri-stated

MGENT Two 3-input function generator with 1-output tri-stated

Value Explanation

CMOS CMOS on input

TTL TTL on input

Logical Function

Description

0373f.fm Page 119 Tuesday, May 25, 1999 8:59 AM

Page 120: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

120 Component Generators Handbook

Macro Library

SLEWRATEDescription

Specifies the output drive.

EXTRADELAYDescription

The input buffers in the AT40k library can have four different intrinsicdelays. This attribute lets the user specify an extra delay on the inputsignal to meet any data hold requirements. A value of ‘0’ provides noextra delay above the intrinsic delay of the input buffer and a value of‘1’ allows an extra delay of approximately 1ns above the intrinsicdelay.

Value Explanation

ENABLE Enable the Schmitt trigger circuit

DISABLE Disable the Schmitt trigger circuit

Value Explanation

FAST Full drive (20 mA buffer)

MEDIUM Medium drive (14 mA buffer)

SLOW Standard drive (6 mA buffer)

Value Explanation

0 No extra intrinsic delay

1 Extra intrinsic delay of approx. 1ns

3 Extra intrinsic delay of approx. 3ns

5 Extra intrinsic delay of approx. 5 ns

0373f.fm Page 120 Tuesday, May 25, 1999 8:59 AM

Page 121: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

Component Generators Handbook 121

Macro Library

Logical Function Description

IBUF Input Buffer

OBUF Output Buffer

OBUFE Output Buffer with active high enable

OBUFOD Output Buffer Open Drain

OBUFOS Output Buffer Open Source

BIBUF Bidirectional Buffer

BIBUFOD Bidirectional Buffer Open Drain

BIBUFOS Bidirectional Buffer Open Source

GCLKBUF Global Clock Buffer

RSBUF Global Reset Buffer

FCLKBUF Fast Clock Buffer

0373f.fm Page 121 Tuesday, May 25, 1999 8:59 AM

Page 122: Component Generators Handbookdb.zmitac.aei.polsl.pl/Electronics_Firm_Docs/ATMEL/Atmel/acrobat/doc0373.pdfComponent Generators Handbook 7 Statistical Summary Statistical Summary The

122 Component Generators Handbook

Macro Library

0373f.fm Page 122 Tuesday, May 25, 1999 8:59 AM