Efinity Quantum Ti Primitives Ug v1.3
Efinity Quantum Ti Primitives Ug v1.3
User Guide
UG-TIPRIM-v1.3
August 2022
www.efinixinc.com
Copyright © 2022. All rights reserved. Efinix, the Efinix logo, the Titanium logo, Quantum, Trion, and Efinity are trademarks of Efinix, Inc. All other
trademarks and service marks are the property of their respective owners. All specifications subject to change without notice.
Quantum Titanium Primitives User Guide
Contents
Introduction..................................................................................................................................... 4
XLR Cell............................................................................................................................................4
EFX_LUT4......................................................................................................................................... 6
EFX_LUT4 Ports.......................................................................................................................................... 6
EFX_LUT4 Parameters............................................................................................................................... 6
EFX_LUT4 Function................................................................................................................................... 6
EFX_ADD..........................................................................................................................................8
EFX_ADD Ports.......................................................................................................................................... 8
EFX_ADD Parameters............................................................................................................................... 8
EFX_ADD Function....................................................................................................................................9
EFX_COMB4...................................................................................................................................11
EFX_COMB4 Ports...................................................................................................................................11
EFX_COMB4 Parameters........................................................................................................................12
EFX_COMB4 Function............................................................................................................................ 12
EFX_FF........................................................................................................................................... 16
EFX_FF Ports............................................................................................................................................ 16
EFX_FF Parameters................................................................................................................................. 16
EFX_FF Function......................................................................................................................................17
EFX_SRL8....................................................................................................................................... 18
EFX_SRL8 Ports........................................................................................................................................ 18
EFX_SRL8 Parameters............................................................................................................................. 18
EFX_SRL8 Function................................................................................................................................. 19
EFX_RAM10................................................................................................................................... 21
EFX_RAM10 Ports....................................................................................................................................23
EFX_RAM10 Parameters......................................................................................................................... 23
EFX_RAM10 Function............................................................................................................................. 24
EFX_DPRAM10.............................................................................................................................. 28
EFX_DPRAM10 Ports...............................................................................................................................30
EFX_DPRAM10 Parameters....................................................................................................................31
EFX_DPRAM10 Function........................................................................................................................ 31
DSP Block...................................................................................................................................... 36
DSP Block Modes....................................................................................................................................37
DSP Block Primitives............................................................................................................................... 38
Floating-Point Support............................................................................................................................39
EFX_DSP48.................................................................................................................................... 40
EFX_DSP48 Ports..................................................................................................................................... 40
EFX_DSP48 Parameters.......................................................................................................................... 41
EFX_DSP48 Function.............................................................................................................................. 43
EFX_DSP24.................................................................................................................................... 46
EFX_DSP24 Ports..................................................................................................................................... 46
EFX_DSP24 Parameters.......................................................................................................................... 47
EFX_DSP24 Function.............................................................................................................................. 49
EFX_DSP12.................................................................................................................................... 51
www.efinixinc.com
Quantum Titanium Primitives User Guide
EFX_DSP12 Ports..................................................................................................................................... 51
EFX_DSP24 Parameters.......................................................................................................................... 52
EFX_DSP12 Function.............................................................................................................................. 54
EFX_GBUFCE..................................................................................................................................56
EFX_GBUFCE Ports................................................................................................................................. 56
EFX_GBUFCE Parameters...................................................................................................................... 56
EFX_GBUFCE Function...........................................................................................................................57
Revision History.............................................................................................................................58
www.efinixinc.com
Quantum Titanium Primitives User Guide
Introduction
This document defines the Efinity® software technology-mapped logic primitives for
Titanium FPGAs. These primitives are the basic building blocks of the user netlist that is
passed to the place-and-route tool.
XLR Cell
The XLR cell functions as:
• A 4-input LUT that supports any combinational logic function with four inputs.
• A simple full adder.
• An 8-bit shift register that can be cascaded.
• A fracturable LUT or full adder.
The logic cell includes an optional flipflop. You can configure multiple logic cells to
implement arithmetic functions such as adders, subtractors, and counters.
Full Adder
Sum Out
Input[1:0]
Clock Full
Flipflop Register Out
Clock Enable Adder
Carry In Carry Out
www.efinixinc.com 4
Quantum Titanium Primitives User Guide
www.efinixinc.com 5
Quantum Titanium Primitives User Guide
EFX_LUT4
Simple 4-Input LUT ROM
The EFX_LUT4 primitive is a simple 4-input LUT ROM. Leave unused LUT inputs
unconnected and set the LUTMASK value so that it does not depend on them. The software
generates an error if the LUTMASK depends on an unconnected input.
EFX_LUT4 Ports
Figure 2: EFX_LUT4 Symbol
EFX_LUT4
I0 O
I1
I2
I3
I0 Input Data in 0.
I1 Input Data in 1.
I2 Input Data in 2.
I3 Input Data in 3.
O Output Data out.
EFX_LUT4 Parameters
Table 2: EFX_LUT4 Parameters
Parameter Allowed Values Description
EFX_LUT4 Function
Table 3: EFX_LUT4 Function
Inputs Output
I3 I2 I1 I0 O
0 0 0 0 LUTMASK[0]
0 0 0 1 LUTMASK[1]
0 0 1 0 LUTMASK[2]
www.efinixinc.com 6
Quantum Titanium Primitives User Guide
Inputs Output
I3 I2 I1 I0 O
0 0 1 1 LUTMASK[3]
0 1 0 0 LUTMASK[4]
0 1 0 1 LUTMASK[5]
0 1 1 0 LUTMASK[6]
0 1 1 1 LUTMASK[7]
1 0 0 0 LUTMASK[8]
1 0 0 1 LUTMASK[9]
1 0 1 0 LUTMASK[10]
1 0 1 1 LUTMASK[11]
1 1 0 0 LUTMASK[12]
1 1 0 1 LUTMASK[13]
1 1 1 0 LUTMASK[14]
1 1 1 1 LUTMASK[15]
EFX_LUT4 # (
.LUTMASK(16'hFFFE) // LUT contents (4 input 'OR')
) EFX_LUT4_inst (
.O(O), // LUT output
.I0(I0), // LUT input 0
.I1(I1), // LUT input 1
.I2(I2), // LUT input 2
.I3(I3) // LUT input 3
);
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
library efxphysicallib;
use efxphysicallib.efxcomponents.all;
entity LUT4_VHDL is
port
(
din : in std_logic_vector(3 downto 0);
dout : out std_logic
);
end entity LUT4_VHDL;
EFX_LUT4_inst : EFX_LUT4
generic map (
LUTMASK => x"8888"
)
port map (
I0 => din(0),
I1 => din(1),
I2 => din(2),
I3 => din(3),
O => dout
);
www.efinixinc.com 7
Quantum Titanium Primitives User Guide
EFX_ADD
Simple Full Adder
The EFX_ADD primitive is a simple full adder. The carry-in (CI) and carry-out (CO)
connections are dedicated routing between logic cells. Therefore, the first CI in an adder
chain must be tied to ground. To access the CO signal through general logic, insert one adder
cell to the end of the adder chain to propagate the CO to the sum.
If unused, connect the adder inputs (I1 and I0) to ground.
EFX_ADD Ports
Figure 5: EFX_ADD Symbol
CI
EFX_ADD
I0 O
I1
CO
I0 Input Data in 0.
I1 Input Data in 1.
CI Input Carry in.
O Output Sum out.
CO Output Carry out.
EFX_ADD Parameters
Table 5: EFX_ADD Parameters
Parameter Allowed Values Description
IO_POLARITY 0, 1 0: Inverting,
1: Non-inverting (default).
I1_POLARITY 0, 1 0: Inverting,
1: Non-inverting (default).
www.efinixinc.com 8
Quantum Titanium Primitives User Guide
EFX_ADD Function
Table 6: EFX_ADD Function
Inputs Outputs
CI I1 I0 CO O
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
EFX_ADD # (
.IO_POLARITY(1'b1), // 0 inverting, 1 non-inverting
.I1_POLARITY(1'b0) // 0 inverting, 1 non-inverting
) EFX_ADD_inst (
.O(O), // Sum output
.CO(CO), // Carry output
.I0(I0), // Adder input 0
.I1(I1), // Adder input 1
.CI(CI) // Carry input
);
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
library efxphysicallib;
use efxphysicallib.efxcomponents.all;
entity ADDER_VHDL is
port
(
din_a : in std_logic_vector(2 downto 0);
din_b : in std_logic_vector(2 downto 0);
sum : out std_logic_vector(2 downto 0)
);
end entity ADDER_VHDL;
EFX_ADD_inst_1 : EFX_ADD
generic map (
I0_POLARITY => 1,
I1_POLARITY => 1
)
port map (
I0 => din_a(0),
I1 => din_b(0),
CI => '0',
O => sum(0),
CO => carry_out(0)
);
EFX_ADD_inst_2 : EFX_ADD
generic map (
I0_POLARITY => 1,
I1_POLARITY => 1
www.efinixinc.com 9
Quantum Titanium Primitives User Guide
)
port map (
I0 => din_a(1),
I1 => din_b(1),
CI => carry_out(0),
O => sum(1),
CO => carry_out(1)
);
EFX_ADD_inst_3 : EFX_ADD
generic map (
I0_POLARITY => 1,
I1_POLARITY => 1
)
port map (
I0 => din_a(2),
I1 => din_b(2),
CI => carry_out(1),
O => sum(2)
);
www.efinixinc.com 10
Quantum Titanium Primitives User Guide
EFX_COMB4
Simple 4-Input LUT ROM plus Simple Adder
The EFX_COMB4 primitive supports the full capabilities of the Titanium logic cell. The
EFX_COMB4 has all the inputs and outputs of the EFX_LUT4 and the EFX_ADD plus two
additional outputs, P and FCO. The P output is the internal 4-LUT signal that generates the
propagate logic used to calculate carry-out (CO). The FCO is a flexible carry-out signal that can
drive normal logic (CO can only drive the CI port of another EFX_COMB4).
EFX_COMB4 Ports
Figure 8: EFX_COMB4 Symbol
CI
EFX_COMB4
I0 O
I1 P
I2 FCO
I3
CO
I0 Input Data in 0.
I1 Input Data in 1.
I2 Input Data in 2.
I3 Input Data in 3.
CI Input Carry in. This port is only fed by dedicated routing from the
adjacent logic cell's CO connection. Therefore, tie the first CI in an
adder chain to ground.(1)
O Output Data out.
P Output Propagate out.
CO Output Carry out. Dedicated fast connection to the CI of the neighboring
EFX_COMB4 primitive. It passes the inverted value of the carry
function.
FCO Output Flexible carry out. General-purpose output from the EFX_COMB4
that can connect to any block. It passes the un-inverted value of
the carry function.
(1)
In the place and route netlist, the CI input is unconnected and treated as GND in the LUTMASK.
www.efinixinc.com 11
Quantum Titanium Primitives User Guide
EFX_COMB4 Parameters
Table 8: EFX_COMB4 Parameters
Parameter Allowed Values Description
EFX_COMB4 Function
You can use EFX_COMB4 to map complicated functions that are not supported by
EFX_LUT4 or EFX_ADD. For example, you can export the arithmetic propagate signal to
implement a carry skip adder in soft logic or pack a 3-input and 2-input function into one
logic cell.
The MODE parameter controls whether the EFX_COMB4 is performing general logic
(LOGIC) or arithmetic functions (ARITH).
I0 Input. Input.
I1 Input. Input.
I2 Input. Unused.
I3 Input. Unused.
O Is a function of the I3, I2, I1, and I0 inputs. Is a function of the CI, I1, and I0 inputs.
P Is a function of the I1 and I0 inputs. Is a function of the I1 and I0 inputs.
FCO Unused. Is a function of the CI, I1, and I0 inputs.
CI Unused. Carry in.
CO Unused. Is a function of the CI, I1, and I0 inputs.
Notes When just using the O output, all 4 inputs are Unlike EFX_ADD, the function of the outputs is
rotatable during routing. dependent on the LUTMASK parameter.
When using the O and P outputs, only the I1 and The I1 and I0 inputs may be rotated during
I0 inputs may be rotated during routing. routing.
Only a flipflop being driven by the O output may
be packed with this cell.
Leave unused inputs unconnected and as a “don't care” in the LUTMASK. The Efinity®
software issues an error if the LUTMASK depends on an unconnected input. A LUT cannot
be driven by the same net on different input ports. Remove any redundant inputs and adjust
the LUTMASK appropriately.
www.efinixinc.com 12
Quantum Titanium Primitives User Guide
Note: EFX_ADD and EFX_COMB4 may not be intermingled in a single adder chain because the CO signal
of an EFX_COMB4 is inverting, while the EFX_ADD is not.
I3 I2 I1 I0 O P
0 0 0 0 LUTMASK[0] LUTMASK[8]
0 0 0 1 LUTMASK[1] LUTMASK[9]
0 0 1 0 LUTMASK[2] LUTMASK[10]
0 0 1 1 LUTMASK[3] LUTMASK[11]
0 1 0 0 LUTMASK[4] LUTMASK[8]
0 1 0 1 LUTMASK[5] LUTMASK[9]
0 1 1 0 LUTMASK[6] LUTMASK[10]
0 1 1 1 LUTMASK[7] LUTMASK[11]
1 0 0 0 LUTMASK[8] LUTMASK[8]
1 0 0 1 LUTMASK[9] LUTMASK[9]
1 0 1 0 LUTMASK[10] LUTMASK[10]
1 0 1 1 LUTMASK[11] LUTMASK[11]
1 1 0 0 LUTMASK[12] LUTMASK[8]
1 1 0 1 LUTMASK[13] LUTMASK[9]
1 1 1 0 LUTMASK[14] LUTMASK[10]
1 1 1 1 LUTMASK[15] LUTMASK[11]
CI I1 I0 O PROP GEN
In arithmetic mode, the carry function uses the CI input and the PROP and GEN signals. If
the PROP signal is 1, the CI input is propagated to carry; otherwise, the GEN signal is sent to
carry.
The CO output is a dedicated fast connection to the CI of neighboring COMB4 primitive. It
passes the inverted value of the carry function. The FCO is a general-purpose output from the
COMB4 that can connect to any block. It passes the un-inverted value of the carry function.
www.efinixinc.com 13
Quantum Titanium Primitives User Guide
0 0 0 1 0 0
0 0 1 1 0 0
0 1 0 0 1 0
0 1 1 0 1 0
1 0 0 1 0 1
1 0 1 0 1 1
1 1 0 1 0 1
1 1 1 0 1 1
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
library efxphysicallib;
use efxphysicallib.efxcomponents.all;
entity COMB4_VHDL is
port
(
din : in std_logic_vector(3 downto 0);
fco : out std_logic;
p0,p1 : out std_logic;
dout0 : out std_logic;
dout1 : out std_logic
);
end entity COMB4_VHDL;
EFX_COMB4_inst0 : EFX_COMB4
generic map (
LUTMASK => x"abcd",
MODE => "LOGIC"
)
www.efinixinc.com 14
Quantum Titanium Primitives User Guide
port map (
I0 => din(0),
I1 => din(1),
I2 => din(2),
I3 => din(3),
P => p0,
O => dout0
);
EFX_COMB4_inst1 : EFX_COMB4
generic map (
LUTMASK => x"8696",
MODE => "ARITH"
)
port map (
I0 => din(0),
I1 => din(1),
FCO => fco,
P => p1,
O => dout1
);
www.efinixinc.com 15
Quantum Titanium Primitives User Guide
EFX_FF
D Flip-flop with Clock Enable and Set/Reset Pin
The basic EFX_FF primitive is a D flip-flop with a clock enable and a set/reset pin that can
be either asynchronous or synchronously asserted. You can positively or negatively trigger
the clock, clock-enable and set/reset pins.
All input ports must be connected. If you do not use a flip-flop control port, connect it to
ground or VCC, depending on the polarity. The software issues a warning if a clock port is set
to VCC or ground.
EFX_FF Ports
Figure 11: EFX_FF Symbol
EFX_FF
D Q
CE
CLK
SR
EFX_FF Parameters
Table 14: EFX_FF Parameters
Parameter Allowed Values Description
www.efinixinc.com 16
Quantum Titanium Primitives User Guide
EFX_FF Function
When the SR_SYNC parameter is asynchronous, the SR port overrides all other ports. When
the SR_SYNC parameter is synchronous, the SR port is synchronous with the clock and
higher priority than the CE port (the SR port takes effect even if CE is disabled).
EFX_FF # (
.CLK_POLARITY(1'b1), // 0 falling edge, 1 rising edge
.CE_POLARITY(1'b1), // 0 active low, 1 active high
.SR_POLARITY(1'b0), // 0 active low, 1 active high
.D_POLARITY(1'b1), // 0 inverting, 1 non-inverting
.SR_SYNC(1'b0), // 0 asynchronous, 1 synchronous
.SR_VALUE(1'b0) // 0 reset, 1 set
) EFX_FF_inst (
.Q(Q), // FF output
.D(D), // D input
.CE(CE), // Clock-enable input
.CLK(CLK), // Clock input
.SR(SR) // Set/reset input
);
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
library efxphysicallib;
use efxphysicallib.efxcomponents.all;
entity D_FF_VHDL is
port
(
clk : in std_logic;
rst : in std_logic;
ce : in std_logic;
d : in std_logic;
q : out std_logic
);
end entity D_FF_VHDL;
EFX_FF_inst : EFX_FF
generic map (
CLK_POLARITY => 1,
CE_POLARITY => 1,
SR_POLARITY => 1,
D_POLARITY => 1,
SR_SYNC => 1,
SR_VALUE => 0,
SR_SYNC_PRIORITY => 1
)
port map (
D => d,
CE => ce,
CLK => clk,
SR => rst,
Q => q
);
www.efinixinc.com 17
Quantum Titanium Primitives User Guide
EFX_SRL8
8-Bit Shift Register
The EFX_SRL8 primitive is an 8-bit shift register with static or dynamic reads. It is
controlled by a clock and clock enable, each of which can be positively or negatively
triggered.
You must connect all of the EFX_SRL8 input ports. Connect unused EFX_SRL8 control
ports to GND or VCC depending on their polarity. The Efinity® software issues a warning if
a clock port is set to VCC or GND.
EFX_SRL8 Ports
Figure 14: EFX_SRL8 Symbol
EFX_SRL8
D Q7
CE Q
A[2:0]
CLK
EFX_SRL8 Parameters
Table 16: EFX_SRL8 Parameters
Parameter Allowed Values Description
www.efinixinc.com 18
Quantum Titanium Primitives User Guide
EFX_SRL8 Function
If the CE port is enabled, the D input value is captured into the first bit of the shift register
on the active clock edge; the existing shift register content is shifted by 1. If the CE port is
disabled, the value on the D input is ignored and the shift registers maintain their current
values.
The inverted bit selected by the address ports A drives the Q output. The first bit is selected
by value 3’b111, while the last bit is selected by 2’b000. For a fixed-size shift register, you can
drive the A input ports by constant values. To read the shift-register content dynamically,
drive the address ports with active signals.
Note: The shift register read is asynchronous to the clock. The eighth bit of the shift register always drives
the output Q7. Use it to cascade to another EFX_SRL8 block to implement larger shift registers.
Use the INIT parameter to set the initial content of EFX_SRL8. If unused, EFX_SRL8
initializes to all zeros.
111 1
110 2
101 3
100 4
011 5
010 6
001 7
000 8
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
library efxphysicallib;
use efxphysicallib.efxcomponents.all;
entity SRL8_VHDL is
port
(
clk : in std_logic;
ce : in std_logic;
d : in std_logic;
www.efinixinc.com 19
Quantum Titanium Primitives User Guide
www.efinixinc.com 20
Quantum Titanium Primitives User Guide
EFX_RAM10
10 Kbit RAM Block
The EFX_RAM10 primitive represents a configurable 10 Kbit RAM block(2) that supports
a variety of widths and depths. All inputs have programmable invert capabilities, allowing
positively or negatively triggered control signals.
The memory read and write ports can be configured into various modes for addressing the
memory contents. The read and write ports support independently configured data widths.
1024 x 8
2048 x 4
4096 x 2
8192 x 1
512 x 20
1024 x 10
2048 x 5
The following formula shows how the memory content is addressed for the different data
widths.
[((ADDR + 1) * WIDTH ) - 1 : (ADDR * WIDTH) ]
You define the initial RAM content using INIT_N parameters. There are 40 INIT_N
parameters, each one represents 256 bits of the memory. The memory space covered by each
INIT_N parameter uses this formula:
[((N+1) * 256) - 1 : (N * 256)]
Used as RAM
When using the EFX_RAM10 primitive as RAM:
• You must connect the control ports (WCLK, WE, WCLKE, WADDREN, RCLK, RE, RADDREN,
and RST). If the ports are unused, connect them to GND or VCC depending on their
polarity.
• You can use an optional output register to improve tCO at a cost of one stage of latency. It
uses the same clock and read enable as the read port.
• If you use the same clock and clock polarity to control both the read and write ports of
the memory, the memory is synchronous; otherwise it is asynchronous.
When writing to a synchronous memory and reading the same address, the read port has
these modes:
• READ_FIRST–Old memory content is read. (default)
(2)
10 Kbits only available in 1024 x 10 and 2048 x 5 modes.
www.efinixinc.com 21
Quantum Titanium Primitives User Guide
• WRITE_FIRST–Write data is passed to read port. To use this mode, READ_WIDTH and
WRITE_WIDTH must be the same and the same signals must drive the RADDR and WADDR
ports.
• READ_UNKNOWN–Read data becomes X. Use READ_UNKNOWN for
asynchronous memory. Write operations ignore the read port, which guarantees that if
the same address is written and read at the same time the write succeeds, but the read is
undefined. This mode is inferred if the RAM uses two different read and write clocks or if
the same clock is used but the HDL behavior is not deterministic.
The WRITE_MODE parameter controls the read port behavior.
Only the address lines valid in the mode may be used. Leave all other address lines
unconnected. For example, only address bits WADDR[8:0] may be used in 512 x 16 write
mode. You must connect all address lines for a mode. Connect required, unused address
lines to GND. For example if the RAM is in 512 x 16 write mode but is only implementing
a 64 x 2 memory address, WADDR[12:9] will be unconnected. Connect WADDR[8:6] to
GND, WADDR[5:0] is used..
Leave unused data lines unconnected. For example if the RAM is in 512 x 16 write mode but
is only implementing a 64 x 2 memory, WDATA[19:2] and RDATA[19:2] are unused and
unconnected. WDATA[1:0] and RDATA[1:0] are connected and used.
Used as ROM
When using the EFX_RAM10 primitive as ROM:
• Connect WE, WCLK, WCLKE, and WADDREN to GND.
• Leave WDATA unconnected.
• Leave WADDR unconnected or connect to GND based on the write width you select.
Note: The write mode must be compatible with the read mode even though the write ports of the ROM
are not used. For example, if the ROM is reading in 512 x 16 mode one compatible write mode is 1024 x 8.
The Efinity® software issues an error if the read or write clock is constant and issues warnings
if the WE, RE, WCLKE, WADDREN, RADDREN, or RST ports are disabled. When implementing
a ROM, no errors or warnings are given for the write port if WCLK, WE, WADDREN, and
WCLKE are disabled.
WADDREN and RADDREN are enable ports for the write and read addresses. During normal
operation they should be high using the value on the address lines to choose the address for
reading or writing. When disabled (low) they act as an address stall and the read or write
operation uses the previous address latched into the memory.
Byte Enable Support
The EFX_RAM10 block supports byte enable if the WRITE_WIDTH parameter is 16 or 20. In
widths of 16 or 20, WE[0] controls writing to the lower half of the data and WE[1] controls
writing to the upper half of the data.
Reset
The RST port can reset the output of the RAM and/or the RAM output register. The
RST_RAM and RST_OUTREG parameters control the behavior.
• RST_RAM can be set to NONE, ASYNC (default), or SYNC. If set to ASYNC, the RAM
output is reset to all 0s asynchronous to the RCLK. If it is SYNC, the output is reset to all
0s synchronously with the RCLK.
• RST_OUTREG can be set to NONE or ASYNC (default). This parameter is ignored if the
output register is disabled.
www.efinixinc.com 22
Quantum Titanium Primitives User Guide
EFX_RAM10 Ports
Figure 17: EFX_RAM10 Symbol
EFX_RAM10
WDATA[19:0] RDATA[19:0]
WADDR[12:0] RADDR[12:0]
WE[1:0] RE
WCLK RADDREN
WCLKE RCLK
WADDREN RST
EFX_RAM10 Parameters
Table 20: EFX_RAM10 Parameters
Every input port has programmable inversion support defined by <port name>_POLARITY.
www.efinixinc.com 23
Quantum Titanium Primitives User Guide
10 1,024 x 10.
5 2,048 x 5.
OUTPUT_REG 0, 1 0: disable output register (default).
1: enable output register.
RESET_RAM NONE RST signals does not affect the RAM output.
ASYNC RAM output resets asynchronously to RCLK.
SYNC RAM output resets synchronously to RCLK.
RESET_OUTREG NONE RST signals does not affect the RAM output register.
ASYNC RAM output register resets asynchronously to RCLK.
<port name>_POLARITY 0, 1 0: Active low
1: Active high (default)
WRITE_MODE READ_FIRST Old memory content is read. (default).
WRITE_FIRST Write data is passed to the read port. In this mode WCLKE
must be enabled.
READ_UNKNOWN Read and writes are unsynchronized, therefore, the results
of the address can conflict.
EFX_RAM10 Function
The EFXBRAM is physically implemented as a 512 x 20 memory array with decoder logic
to map to the different read and write modes. The read and write ports are independent and
the behavior is undefined when addresses conflict. The address at the physical memory array
must not conflict.
EFX_RAM10 # (
www.efinixinc.com 24
Quantum Titanium Primitives User Guide
.INIT_10 (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_11 (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_12 (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_13 (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_14 (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_15 (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_16 (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_17 (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_18 (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_19 (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_1A (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_1B (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_1C (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_1D (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_1E (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_1F (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_20 (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_21 (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_22 (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_23 (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_24 (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_25 (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_26 (256'h0000000000000000000000000000000000000000000000000000000000000000),
.INIT_27 (256'h0000000000000000000000000000000000000000000000000000000000000000)
)
ram10_inst (
.WCLK (WCLK), // write clk
.WE (WE), // 2-bit write enable
.WCLKE (WCLKE), // write clk enable
.WADDREN (WADDREN), // write address enable
.WDATA (WDATA), // write data input
.WADDR (WADDR), // write address input
.RCLK (RCLK), // read clk
.RE (RE), // read enable
.RST (RST), // reset
.RADDREN (RADDREN), // read address enable
.RDATA (RDATA), // read data output
.RADDR (RADDR) // read address input
);
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
library efxphysicallib;
use efxphysicallib.efxcomponents.all;
entity ram10_VHDL is
generic (
AWIDTH : integer := 9;
DWIDTH : integer := 16
);
port
(
wclk, wclke : in std_logic;
rclk, re, rst : in std_logic;
waddren, raddren : in std_logic;
we : in std_logic_vector(1 downto 0);
wdata : in std_logic_vector(DWIDTH-1 downto 0);
waddr, raddr : in std_logic_vector(AWIDTH-1 downto 0);
rdata : out std_logic_vector(DWIDTH-1 downto 0)
);
end entity ram10_VHDL;
www.efinixinc.com 25
Quantum Titanium Primitives User Guide
ram : EFX_RAM10
generic map (
READ_WIDTH => DWIDTH,
WRITE_WIDTH => DWIDTH,
WCLK_POLARITY => 1,
WCLKE_POLARITY => 1,
WADDREN_POLARITY => 1,
WE_POLARITY => b"11",
RCLK_POLARITY => 1,
RE_POLARITY => 1,
RST_POLARITY => 1,
RADDREN_POLARITY => 1,
www.efinixinc.com 26
Quantum Titanium Primitives User Guide
www.efinixinc.com 27
Quantum Titanium Primitives User Guide
EFX_DPRAM10
10 Kbit True-Dual-Port RAM Block
The EFX_DPRAM10 block represents a 10 Kbit true-dual-port RAM block(3) that can be
configured to support a variety of widths and depths. All inputs have programmable invert
capabilities, which allows you to trigger the control signals positively or negatively.
The memory A and B ports can be configured into several modes for addressing the memory
contents. The read and write widths of a single port can be configured to allow writing in one
data width while reading another.
The true-dual-port RAM uses the same address bus for reading and writing on a port.
Therefore, when a port has mixed widths, the software uses the widest address bus size to
determine the address bus width. The direction (read or write) operating in the shallower
address size ignores the address bus’s LSB because they describe addresses that are outside the
legal range for that mode. For example, if reading in 1024 x 8 mode and writing in 2048 x 4
mode the address must be 11 bits wide to be able to address all 2048 words being written. The
write data would be 4 bits wide and the read data would be 8 bits wide. Only the upper 10
bits of the address port would be used during reading because it can only read 1024 words
from the memory.
2048 x 4
4096 x 2
8192 x 1
1024 x 10
2048 x 5
The following formula shows how the memory content is addressed for the different data
widths:
[((ADDR + 1) * WIDTH ) - 1 : (ADDR * WIDTH) ]
You define the initial content of the RAM using INIT_N parameters. Each INIT_N
parameter represents 256 bits of the memory. The 40 INIT_N parameters cover the entire
10K memory content. The memory space covered by each INIT_N parameter uses this
formula:
[((N+1) * 256) - 1 : (N * 256)]
Used as RAM
When connecting the ports, use the following guidelines:
• You must connect the BRAM control ports (CLKA, WEA, CLKEA, ADDRENA, RSTA,
CLKB, WEB, CLKEB, ADDRENB, RSTB) must be connected. If the ports are unused,
connect them to GND or VCC depending on their polarity.
(3)
10 Kbits only available in 1024 x 10 and 2048 x 5 modes.
www.efinixinc.com 28
Quantum Titanium Primitives User Guide
www.efinixinc.com 29
Quantum Titanium Primitives User Guide
EFX_DPRAM10 Ports
Figure 20: EFX_DPRAM10 Symbol
EFX_DPRAM10
WDATAA[9:0] WDATAB[9:0]
ADDRB[12:0] ADDRB[12:0]
WEA[1:0] WEB[1:0]
CLKA CLKB
CLKEA CLKEB
ADDRENA ADDRENB
RSTA RSTB
RDATAA[9:0] RDATAB[9:0]
www.efinixinc.com 30
Quantum Titanium Primitives User Guide
EFX_DPRAM10 Parameters
Table 23: EFX_DPRAM10 Parameters
Every input port has programmable inversion support defined by <port name>_POLARITY.
INIT_0, …INIT_F..., INIT_27 256 bit hexadecimal Initial RAM content (default = 0).
number
READ_WIDTH_A 8 1,024 x 8 (default).
READ_WIDTH_B 4 2,048 x 4.
WRITE_WIDTH_A
2 4,096 x 2.
WRITE_WIDTH_B
1 8,192 x 1.
10 1,024 x 10.
5 2,048 x 5.
WRITE_MODE_A READ_FIRST Old data is output to RDATA.
WRITE_MODE_B
WRITE_FIRST New data is output RDATA.
NO_CHANGE RDATA holds its last value.
OUTPUT_REG_A 0, 1 0: disable output register (default).
OUTPUT_REG_B 1: enable output register.
RESET_RAM NONE RST signals do not affect the RAM output.
ASYNC RAM output resets asynchronously to RCLK.
SYNC RAM output resets synchronously to RCLK.
RESET_OUTREG NONE RST signals do not affect the RAM output register.
ASYNC RAM output register resets asynchronously to RCLK.
<port name>_POLARITY 0, 1 0: active low
1: active high (default)
EFX_DPRAM10 Function
The EFXBRAM is physically implemented as a 512 x 20 memory array with decoder logic
to map to the different read and write modes. The A and B ports are independent, and the
behavior is undefined when addresses conflict. The address at the physical memory array
must not conflict.
www.efinixinc.com 31
Quantum Titanium Primitives User Guide
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
www.efinixinc.com 32
Quantum Titanium Primitives User Guide
library efxphysicallib;
use efxphysicallib.efxcomponents.all;
entity dpram10_VHDL is
generic (
AWIDTH : integer := 10;
DWIDTH : integer := 8
);
port
(
clka, wea, clkea : in std_logic;
rsta, addrena : in std_logic;
addra : in std_logic_vector(AWIDTH-1 downto 0);
wdataa : in std_logic_vector(DWIDTH-1 downto 0);
rdataa : out std_logic_vector(DWIDTH-1 downto 0);
clkb, web, clkeb : in std_logic;
rstb, addrenb : in std_logic;
addrb : in std_logic_vector(AWIDTH-1 downto 0);
wdatab : in std_logic_vector(DWIDTH-1 downto 0);
rdatab : out std_logic_vector(DWIDTH-1 downto 0)
);
end entity dpram10_VHDL;
www.efinixinc.com 33
Quantum Titanium Primitives User Guide
ram : EFX_DPRAM10
generic map (
READ_WIDTH_A => DWIDTH,
WRITE_WIDTH_A => DWIDTH,
READ_WIDTH_B => DWIDTH,
WRITE_WIDTH_B => DWIDTH,
CLKA_POLARITY => 1,
CLKEA_POLARITY => 1,
WEA_POLARITY => 1,
ADDRENA_POLARITY => 1,
RSTA_POLARITY => 1,
CLKB_POLARITY => 1,
CLKEB_POLARITY => 1,
WEB_POLARITY => 1,
ADDRENB_POLARITY => 1,
RSTB_POLARITY => 1,
www.efinixinc.com 34
Quantum Titanium Primitives User Guide
www.efinixinc.com 35
Quantum Titanium Primitives User Guide
DSP Block
The Titanium FPGA has high-performance, complex DSP blocks that can perform
multiplication, addition, subtraction, accumulation, and 4-bit variable right shifting. The 4-bit
variable right shift supports one lane in normal mode, two lanes in dual mode and four lanes
in quad mode. Each DSP block has four modes, which support the following multiplication
operations:
• Normal—One 19 x 18 integer multiplication with 48-bit addition/subtraction.
• Dual—One 11 x 10 integer multiplication and one 8 x 8 integer multiplication with two
24-bit additions/subtractions.
• Quad—One 7 x 6 integer multiplication and three 4 x 4 integer multiplications with four
12-bit additions/subtractions.
• Float—One fused-multiply-add/subtract/accumulate (FMA) BFLOAT16 multiplication.
The integer multipliers can represent signed or unsigned values based on the SIGNED
parameter. When multiple EFX_DSP12 or EFX_DSP24 primitives are mapped to the same
DSP block, they must have the same SIGNED value. The inputs to the multiplier are the
A and B data inputs. Optionally, you can use the result of the multiplier in an addition or
subtraction operation.
A[18:0] A
19 P
37 pext
M 48
W >> O O[47:0]
B[17:0] B Signed
18
16
OVFL
C[17:0] C cext
48 >> 18¹ 0
>>> 18² N
1
CLK
CE
RST
16
Shift
OP[1:0] OP
2
48 DSP Block
1. Logical right-shift-by-18.
2. Arithmetic right-shift-by-18.
Learn more: Refer to the Quantum Titanium Primitives User Guide for more information about the
Titanium DSP block primitives.
www.efinixinc.com 36
Quantum Titanium Primitives User Guide
Normal Mode
In NORMAL mode the multiplier implements a 19 x 18 integer multiplier with a 37-bit
result P. The multiplier may be signed or unsigned depending on the SIGNED parameter.
The result is extended to 48 bits.
The C input is 18 bits and is extended to 48 bits based on the C_EXT parameter.
The logical shifter can shift the result 0 to 15 bits to the right. The shift is arithmetic or
logical depending on the sign of the DSP Block. The C inputs capture the shift value when
the SHIFT_ENA port is asserted.
Dual Mode
In DUAL mode the multiplier implements an 11 x 10 integer multiplier with a 21 bit result
and an 8 x 8 integer multiplier with a 16-bit result. The results of both multipliers are
extended to 24 bits.
The C input is divided between the two data paths. Each data path is extended to 24 bits
based on the C_EXT parameter.
The logical shifter can shift the result 0 to 15 bits to the right. The shift is arithmetic or
logical depending on the sign of the DSP Block. The C inputs capture the shift value when
the SHIFT_ENA port is asserted.
Quad Mode
In QUAD mode the multiplier implements one 7 x 6 integer multiplier with a 13-bit
result and three 4 x 4 integer multipliers with an 8-bit result. The results of the three 4 x 4
multipliers are extended to 12 bits.
The 7 x 6 multiplier’s 13-bit result is truncated to 12 bits. If P_EXT is ALIGN_RIGHT, the
MSB is removed; if it is ALIGN_LEFT, the LSB is removed.
The C input is divided between the four data paths. Each data path is extended to 12 bits
based on the C_EXT parameter.
The logical shifter can shift the result 0 to 15 bits to the right. The shift is arithmetic or
logical depending on the sign of the DSP Block. The C inputs capture the shift value when
the SHIFT_ENA port is asserted.
www.efinixinc.com 37
Quantum Titanium Primitives User Guide
BFLOAT Mode
In BFLOAT mode the multiplier implements one fused multiply-add (FMA) function. The
A, B, and C inputs are represented as BFLOAT16 while the accumulator and output are
represented as FP32. In BFLOAT mode:
• Set the A_REG, B_REG, P_REG, OP_REG, and W_REG parameters to 1.
• If the C input is used, set the C_REG parameter to 1.
• Set M_SEL to P.
• Set N_SEL to CONST0, C, CASCIN, or W.
• Set W_SEL to ADD_SUB.
• Set CASCOUT_SEL to W or ABC. If set to ABC the A, B, and C inputs are expected to be
capturing the 33-bit internal FP32 representation expected by the adder.
• Set the P_EXT and C_EXT parameters to ALIGN_RIGHT.
The shifter is bypassed.
The O output is in FP32 mode:
• Bits [47:43] carry the error flags {INVALID, INFINITE, OVERFLOW, UNDERFLOW,
INEXACT},.
• Bits [42:32] are unused.
• Bits [31:0] are the FP32 representation.
The USE_CE and USE_RST parameters are only valid for the A, B, C, OP, and O registers.
They are ignored for the P and W registers.
Cascading Blocks
When the CASCIN or CASCOUT ports are used to chain DSP blocks the bit-slicing of the data
matches the output port O. All DSP Blocks in a chain must be in the same mode.
www.efinixinc.com 38
Quantum Titanium Primitives User Guide
Floating-Point Support
The Titanium DSP block supports the bfloat16 number format for the A, B, and C inputs and
single-precision IEEE 754 32-bit floating point (FP32) number format for the CASCIN input
and O and CASCOUT outputs.
Bfloat16 is a truncated, 16-bit version of the 32-bit IEEE Std 754 single-precision floating
point format, and is often used in AI and machine learning applications. Because they have
the same number of exponent bits, you can easily convert bfloat16 to to FP32.
www.efinixinc.com 39
Quantum Titanium Primitives User Guide
EFX_DSP48
Full Function DSP Block
The EFX_DSP48 primitive models the full functionality of the DSP block in all modes
(NORMAL, BFLOAT, DUAL, and QUAD). In DUAL or QUAD modes, the physical
arrangement of the individual data paths must be considered as well as special handling of the
MSB data bits.
EFX_DSP48 Ports
Figure 24: EFX_DSP48 Symbol
CASCIN[47:0]
EFX_DSP48
A[18:0] CLK
B[17:0] CE
C[17:0] RST
OP[1:0] O[47:0]
SHIFT_ENA OVFL
CASCOUT[47:0]
www.efinixinc.com 40
Quantum Titanium Primitives User Guide
EFX_DSP48 Parameters
Table 28: EFX_DSP48 Parameters
Every input port has programmable inversion support defined by <name>_POLARITY.
www.efinixinc.com 41
Quantum Titanium Primitives User Guide
www.efinixinc.com 42
Quantum Titanium Primitives User Guide
N_SEL CONST0, Selects the data for the N input to the add/sub block.
CONST1, C, CONST0/1: Chooses a constant 0 or 1. In DUAL and QUAD modes,
P, CASCIN, the 1 is passed to each slice value;
CASCIN_ASR18, C: Input C.
CASCIN_LSR18,
P: Multiplier output;
W, O
CASCIN: CASCIN input;
CASCIN_ASR18: CASCIN input, but does an arithmetic shift it right by
18 bits. Only legal in NORMAL mode.
CASCIN_LSR18: CASCIN input, but does a logical shift it right by 18
bits. Only legal in NORMAL mode.
W: Input to the logical shifter. If selected, enable the W register.
O: DSP output. If selected, enable the O register.
W_SEL P, X Selects the data for the logical shifter.
P: Multiplier output.
X: Add/sub output.
If you bypass the adder, disable W_REG.
CASCOUT_SEL C, P, W, ABC Selects the data for the CASCOUT output.
ABC: Lower 16 bits of the A, B, and C inputs.
C: C input. Illegal in BFLOAT mode.
P: Multiplier output. Illegal in BFLOAT mode.
W: Input to the logical shifter. When set to W, you cannot bypass the
adder.
CASCOUT_SEL is legal in NORMAL, DUAL, and QUAD modes. Allows
you to pass in a full CASCIN result.
With some external logic, allows a DSP CASCOUT to represent an
FP32 number {a[15:0], b[15:0], c[15:0]}
EFX_DSP48 Function
The EFX_DSP48 is a signed integer multiplier.
(4)
ROUNDING is only used in BFLOAT mode.
www.efinixinc.com 43
Quantum Titanium Primitives User Guide
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
library efxphysicallib;
use efxphysicallib.efxcomponents.all;
entity dsp48_VHDL is
port
(
clk, ce, rst, shift_ena : in std_logic;
a : in std_logic_vector(18 downto 0);
b,c : in std_logic_vector(17 downto 0);
op : in std_logic_vector(1 downto 0);
o : out std_logic_vector(47 downto 0);
ovfl : out std_logic
);
end entity dsp48_VHDL;
EFX_DSP48_inst : EFX_DSP48
generic map (
MODE => "NORMAL",
A_REG => 0,
B_REG => 0,
C_REG => 0,
P_REG => 0,
OP_REG => 0,
W_REG => 0,
O_REG => 0,
RST_SYNC => 0,
SIGNED => 1,
www.efinixinc.com 44
Quantum Titanium Primitives User Guide
CLK_POLARITY => 1,
CE_POLARITY => 1,
RST_POLARITY => 1,
SHIFT_ENA_POLARITY => 1,
A_REG_USE_CE => 1,
B_REG_USE_CE => 1,
C_REG_USE_CE => 1,
OP_REG_USE_CE => 1,
P_REG_USE_CE => 1,
W_REG_USE_CE => 1,
O_REG_USE_CE => 1,
A_REG_USE_RST => 1,
B_REG_USE_RST => 1,
C_REG_USE_RST => 1,
OP_REG_USE_RST => 1,
P_REG_USE_RST => 1,
W_REG_USE_RST => 1,
O_REG_USE_RST => 1,
www.efinixinc.com 45
Quantum Titanium Primitives User Guide
EFX_DSP24
Dual-Mode 8 x 8 DSP Block
The EFX_DSP24 primitive can model the functionality of one 8 x 8 multiplier in DUAL
mode. The placer can place two EFX_DSP24 primitives in one DSP block. The placer is
responsible for sign or zero extending the MSB bits of the EFX_DSP24 placed in the top
location.
EFX_DSP24 Ports
Figure 27: EFX_DSP24 Symbol
CASCIN[23:0]
EFX_DSP24
A[7:0] CLK
B[7:0] CE
C[7:0] RST
OP[1:0] O[23:0]
SHIFT_ENA
CASCOUT[23:0]
www.efinixinc.com 46
Quantum Titanium Primitives User Guide
The add/subtract behavior for 00, 01, and 10 functions operate as expected, but 11 performs -
M-N-1.
EFX_DSP24 Parameters
Table 30: EFX_DSP24 Parameters
Every input port has programmable inversion support defined by <name>_POLARITY.
www.efinixinc.com 47
Quantum Titanium Primitives User Guide
www.efinixinc.com 48
Quantum Titanium Primitives User Guide
EFX_DSP24 Function
The EFX_DSP24 is a signed integer multiplier.
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
library efxphysicallib;
use efxphysicallib.efxcomponents.all;
entity dsp24_VHDL is
port
(
clk, ce, rst, shift_ena : in std_logic;
a,b,c : in std_logic_vector(7 downto 0);
op : in std_logic_vector(1 downto 0);
o : out std_logic_vector(23 downto 0)
);
end entity dsp24_VHDL;
EFX_DSP24_inst : EFX_DSP24
www.efinixinc.com 49
Quantum Titanium Primitives User Guide
generic map (
A_REG => 0,
B_REG => 0,
C_REG => 0,
P_REG => 0,
OP_REG => 0,
W_REG => 0,
O_REG => 0,
RST_SYNC => 0,
SIGNED => 1,
CLK_POLARITY => 1,
CE_POLARITY => 1,
RST_POLARITY => 1,
SHIFT_ENA_POLARITY => 1,
A_REG_USE_CE => 1,
B_REG_USE_CE => 1,
C_REG_USE_CE => 1,
OP_REG_USE_CE => 1,
P_REG_USE_CE => 1,
W_REG_USE_CE => 1,
O_REG_USE_CE => 1,
A_REG_USE_RST => 1,
B_REG_USE_RST => 1,
C_REG_USE_RST => 1,
OP_REG_USE_RST => 1,
P_REG_USE_RST => 1,
W_REG_USE_RST => 1,
O_REG_USE_RST => 1
)
port map (
CLK => clk,
CE => ce,
RST => rst,
SHIFT_ENA => shift_ena,
A => a,
B => b,
C => c,
OP => op,
O => o
);
www.efinixinc.com 50
Quantum Titanium Primitives User Guide
EFX_DSP12
Quad-Mode 4 x 4 DSP Block
The EFX_DSP12 primitive models the functionality of one 4 x 4 multiplier in QUAD mode.
The placer can place four EFX_DSP12 primitives in one DSP block. The placer is responsible
for sign or zero extending the MSB bits of the EFX_DSP12 placed in the top location.
EFX_DSP12 Ports
Figure 30: EFX_DSP12 Symbol
CASCIN[11:0]
EFX_DSP12
A[3:0] CLK
B[3:0] CE
C[3:0] RST
OP[1:0] O[11:0]
SHIFT_ENA
CASCOUT[11:0]
www.efinixinc.com 51
Quantum Titanium Primitives User Guide
The add/subtract behavior for 00, 01, and 10 functions operate as expected, but 11 performs -
M-N-1.
EFX_DSP24 Parameters
Table 32: EFX_DSP24 Parameters
Every input port has programmable inversion support defined by <name>_POLARITY.
www.efinixinc.com 52
Quantum Titanium Primitives User Guide
www.efinixinc.com 53
Quantum Titanium Primitives User Guide
EFX_DSP12 Function
The EFX_DSP12 is a signed integer multiplier.
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
library efxphysicallib;
use efxphysicallib.efxcomponents.all;
entity dsp12_VHDL is
port
(
clk, ce, rst, shift_ena : in std_logic;
a,b,c : in std_logic_vector(3 downto 0);
op : in std_logic_vector(1 downto 0);
o : out std_logic_vector(11 downto 0)
);
end entity dsp12_VHDL;
EFX_DSP12_inst : EFX_DSP12
www.efinixinc.com 54
Quantum Titanium Primitives User Guide
generic map (
A_REG => 0,
B_REG => 0,
C_REG => 0,
P_REG => 0,
OP_REG => 0,
W_REG => 0,
O_REG => 0,
RST_SYNC => 0,
SIGNED => 1,
CLK_POLARITY => 1,
CE_POLARITY => 1,
RST_POLARITY => 1,
SHIFT_ENA_POLARITY => 1,
A_REG_USE_CE => 1,
B_REG_USE_CE => 1,
C_REG_USE_CE => 1,
OP_REG_USE_CE => 1,
P_REG_USE_CE => 1,
W_REG_USE_CE => 1,
O_REG_USE_CE => 1,
A_REG_USE_RST => 1,
B_REG_USE_RST => 1,
C_REG_USE_RST => 1,
OP_REG_USE_RST => 1,
P_REG_USE_RST => 1,
W_REG_USE_RST => 1,
O_REG_USE_RST => 1
)
port map (
CLK => clk,
CE => ce,
RST => rst,
SHIFT_ENA => shift_ena,
A => a,
B => b,
C => c,
OP => op,
O => o
);
www.efinixinc.com 55
Quantum Titanium Primitives User Guide
EFX_GBUFCE
Global Clock Buffer
The EFX_GBUFCE logic block represents the global clock buffer driving the global or
regional clock network. The CE port gates the clock and is active high.
You must connect all EFX_GBUFCE input ports. If you do not use a port, connect it to
ground or VCC depending on its polarity. The software issues an error if the clock input I is
set to VCC or ground.
You can use an EFX_GBUFCE to gate a clock with the clock enable pin.
EFX_GBUFCE Ports
Figure 33: EFX_GBUFCE Symbol
CE
I O
EFX_GBUFCE Parameters
Table 34: EFX_GBUFCE Parameters
Parameter Name Allowed Values Description
www.efinixinc.com 56
Quantum Titanium Primitives User Guide
EFX_GBUFCE Function
The function table assumes all inputs are active-high polarity.
CE I O
0 X 0
1 0 0
1 1 1
EFX_GBUFCE # (
.CE_POLARITY(1'b1) // 0 active low, 1 active high
) EFX_GBUFCE_inst (
.O(O), // Clock output to global clock network
.I(I), // Clock input
.CE(CE) // Clock gate
);
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
library efxphysicallib;
use efxphysicallib.efxcomponents.all;
entity gbufce_i_VHDL is
port
(
clk, d, ce : in std_logic;
q : out std_logic
);
end gbufce_i_VHDL;
dut : EFX_GBUFCE
port map (
CE => ce,
I => clk,
O => clknet
);
ffx : EFX_FF
port map (
Q => q,
D => d,
CLK => clknet,
CE => '1',
SR => '0'
);
end behavioral;
www.efinixinc.com 57
Quantum Titanium Primitives User Guide
Revision History
August 2022 1.3 The legal values for the EFX_DSP48, EFX_DSP24, and EFX_DSP12 blocks
W_SEL parameter are P or X. (DOC-894)
Removed the OVFL() signal from the EFX_DSP24 and EFX_DSP12 Verilog
HDL examples. These blocks do not have this signal. (DOC-894)
August 2022 1.2 Input output functions at EX4_COMB4 (Arithmetic Mode) at PROP and
GEN column. (DOC-848)
April 2022 1.1 The DSP RST_SYNC parameter applies to more than just the A register.
(DOC-785)
June 2021 1.0 Initial release.
www.efinixinc.com 58