
Port Name Required Description
cnt_en No Count enable input to disable the count when asserted low
without affecting sload, sset, or sclr. If omitted, the default
value is 1.
updown No Controls the direction of the count. When asserted high (1), the
count direction is up, and when asserted low (0), the count
direction is down. If the LPM_DIRECTION parameter is used, the
updown port cannot be connected. If LPM_DIRECTION is not used,
the updown port is optional. If omitted, the default value is up (1).
cin No Carry-in to the low-order bit. For up counters, the behavior of the
cin input is identical to the behavior of the cnt_en input. If
omitted, the default value is 1 (VCC).
aclr No Asynchronous clear input. If both aset and aclr are used and
asserted, aclr overrides aset. If omitted, the default value is 0
(disabled).
aset No Asynchronous set input. Specifies the q[] outputs as all 1s, or to
the value specified by the LPM_AVALUE parameter. If both the aset
and aclr ports are used and asserted, the value of the aclr port
overrides the value of the aset port. If omitted, the default value is
0, disabled.
aload No Asynchronous load input that asynchronously loads the counter
with the value on the data input. When the aload port is used, the
data[] port must be connected. If omitted, the default value is 0,
disabled.
sclr No Synchronous clear input that clears the counter on the next active
clock edge. If both the sset and sclr ports are used and asserted,
the value of the sclr port overrides the value of the sset port. If
omitted, the default value is 0, disabled.
sset No Synchronous set input that sets the counter on the next active
clock edge. Specifies the value of the q outputs as all 1s, or to the
value specified by the LPM_SVALUE parameter. If both the sset and
sclr ports are used and asserted, the value of the sclr port
overrides the value of the sset port. If omitted, the default value is
0 (disabled).
sload No Synchronous load input that loads the counter with data[] on the
next active clock edge. When the sload port is used, the data[]
port must be connected. If omitted, the default value is 0
(disabled).
Table 2-3: LPM_COUNTER Megafunction Output Ports
Port Name Required Description
q[] No Data output from the counter. The size of the output port
depends on the LPM_WIDTH parameter value. Either q[] or at least
one of the eq[15..0] ports must be connected.
2-4
Ports
UG-01063
2014.12.19
Altera Corporation
LPM_COUNTER (Counter)
Send Feedback
Kommentare zu diesen Handbüchern