Parameters, Parameters -5 – Altera Integer Arithmetic IP User Manual
Page 23

Port Name
Required
Description
eq[15..0]
No
Counter decode output. The
eq[15..0]
port is not accessible
using the MegaWizard Plug-In Manager as it is for AHDL use
only.
Either the
q[]
port or
eq[]
port must be connected. Up to
c eq
ports can be used (
0
<=
c
<=
15
). Only the 16 lowest count values
are decoded. When the count value is
c
, the
eqc
output is asserted
high (
1
). For example, when the count is
0
,
eq0
=
1
, when the
count is
1
,
eq1
=
1
, and when the count is
15
,
eq 15
=
1
. Decoded
output for count values of 16 or greater require external decoding.
The
eq[15..0]
outputs are asynchronous to the
q[]
output.
cout
No
Carry-out port of the counter's MSB bit. It can be used to connect
to another counter to create a larger counter.
Parameters
The following table lists the parameters for the LPM_COUNTER megafunction.
Table 2-4: LPM_COUNTER Megafunction Parameters
Parameter Name
Type
Required
Description
LPM_WIDTH
Integer
Yes
Specifies the widths of the
data[]
and
q[]
ports, if they are used.
LPM_DIRECTION
String
No
Values are
UP
,
DOWN
, and
UNUSED
. If the
LPM_
DIRECTION
parameter is used, the
updown
port cannot be connected. When the
updown
port is not connected, the
LPM_
DIRECTION
parameter default value is
UP
.
LPM_MODULUS
Integer
No
The maximum count, plus one. Number of
unique states in the counter's cycle. If the
load value is larger than the
LPM_MODULUS
parameter, the behavior of the counter is
not specified.
LPM_AVALUE
Integer/
String
No
Constant value that is loaded when
aset
is
asserted high. If the value specified is larger
than or equal to
, the behavior of
the counter is an undefined (X) logic level,
where
is
LPM_MODULUS
, if
present, or 2 ^
LPM_WIDTH
. Altera
recommends that you specify this value as a
decimal number for AHDL designs.
LPM_SVALUE
Integer/
String
No
Constant value that is loaded on the rising
edge of the clock port when the
sset
port is
asserted high. Altera recommends that you
specify this value as a decimal number for
AHDL designs.
UG-01063
2014.12.19
Parameters
2-5
LPM_COUNTER (Counter)
Altera Corporation