Functional Coverage of UpDown Counter
Functional Coverage of UpDown Counter
Functional Coverage of UpDown Counter
Counter =>
Counter is a sequential logic circuit that generates a count in response to clock pulses, commonly used
for tasks like frequency division, timing or addressing in digital systems.
Up/Down Counter =>
An up/down counter is a versatile digital logic circuit that can increment or decrement its
count based on control signals, providing bi-directional counting in digital systems.
bins =>
bins keep track/record of number of times user hits specific value of coverpoint expression.
Types of bins =>
i] Automatic/ Implicit bins =>
If user do not specify bins explicitly, simulator automatically creates bins for user
depending on the possible values of cover-point and auto_bin_max.
By default auto_bin_max value is 64.
ii] Explicit bins =>
Explicit bins are user defined bins in which coverage calculated only for the specified bins.
With explicit bins we could create own bins and then depends number of bins we have calculated coverage.
Covergroup =>
Covergroup is something that will encapsulate all coverpoint or coverage point that user stressing.
Coverpoint =>
Coverpoint could variable that have multiple bins depending on the specific values user is targeting.
Cross coverage =>
Cross coverage allows having a cross product (i.e., cartesian product) between two or more
variables or coverage points within the same covergroup.
OR
Cross coverage is nothing but a set of cross products of variables or coverage points.
Counter Input Output Signals
clk: Clock input signal which is used to synchronize and control the operation of the counter.
rst: Reset input signal which resets the counter to its initial state.
up: Up/down control input signal. When it will high the counter counts up otherwise counts down.
load: Load control input signal. When activated, it loads a new value into the counter based on the “loadin” signal.
loadin: 8 - bit input data bus. When the load signal is active, the value present on this bus is loaded into the counter.
y: 8 - bit output data bus. It represents the current value of the counter. The value on this bus can be read externally.
Simulation Result=>