VHDL Code For 4 Bit Synchronous Counter
VHDL Code For 4 Bit Synchronous Counter
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity SYNCOUN is
Port ( CLK,RESET,UP : in STD_LOGIC;
OUTPUT : out STD_LOGIC_VECTOR (3 downto 0));
end SYNCOUN;
architecture Behavioral of CDCOUN is
SIGNAL TEMP : STD_LOGIC_VECTOR (3 DOWNTO 0);
begin
PROCESS(CLK,RESET,UP) IS
BEGIN
IF(RESET = '1') THEN
TEMP<= "0000";
ELSIF(RISING_EDGE(CLK)) THEN
IF(UP='1') THEN
IF(TEMP = "1111") THEN
TEMP<="0000";
ELSE
TEMP <= TEMP + 1;
END IF;
END IF;
END IF;
END PROCESS;
OUTPUT <= TEMP;
end Behavioral;
RTL=
CIRCUIT DIAGRAM
WAVE FORM=
SYNTHESIS REPORT =
================================================
=========================
*
Final Report
================================================
=========================
Final Results
RTL Top Level Output File Name
Top Level Output File Name
Output Format
: CDCOUN
: NGC
Optimization Goal
: Speed
Keep Hierarchy
: NO
Design Statistics
# IOs
:7
Cell Usage :
# BELS
:4
INV
LUT3
:1
LUT4
:2
:1
# FlipFlops/Latches
#
FDCE
: CDCOUN.ngr
:4
:4
# Clock Buffers
#
:1
BUFGP
:1
# IO Buffers
:6
IBUF
OBUF
:2
:4
================================================
=========================
Number of Slices:
2 out of
960
0%
4 out of 1920
0%
4 out of 1920
0%
Number of IOs:
Number of bonded IOBs:
Number of GCLKs:
7
7 out of
1 out of
83
24
8%
4%
---------------------------
================================================
=========================
TIMING REPORT
Clock Information:
----------------------------------------------------+------------------------+-------+
Clock Signal
-----------------------------------+------------------------+-------+
CLK
| BUFGP
|4
-----------------------------------+------------------------+-------+
| Buffer(FF name)
| Load |
-----------------------------------+------------------------+-------+
RESET
| IBUF
|4
-----------------------------------+------------------------+-------+
Timing Summary:
--------------Speed Grade: -5
Timing Detail:
-------------All values displayed in nanoseconds (ns)
================================================
=========================
Timing constraint: Default period analysis for Clock 'CLK'
Clock period: 2.289ns (frequency: 436.862MHz)
Total number of paths / destination ports: 12 / 4
------------------------------------------------------------------------Delay:
Source:
Destination:
Source Clock:
Net
---------------------------------------- -----------FDCE:C->Q
INV:I->O
(Mcount_TEMP)
FDCE:D
TEMP_0
---------------------------------------Total
================================================
=========================
Timing constraint: Default OFFSET IN BEFORE for Clock 'CLK'
Total number of paths / destination ports: 4 / 4
------------------------------------------------------------------------Offset:
Source:
Destination:
Net
---------------------------------------- -----------IBUF:I->O
FDCE:CE
TEMP_0
---------------------------------------Total
================================================
=========================
Timing constraint: Default OFFSET OUT AFTER for Clock 'CLK'
Total number of paths / destination ports: 4 / 4
------------------------------------------------------------------------Offset:
Source:
Destination:
Source Clock:
Net
---------------------------------------- -----------FDCE:C->Q
OBUF:I->O
3.169
OUTPUT_0_OBUF (OUTPUT<0>)
---------------------------------------Total
================================================
=========================
CPU : 3.44 / 3.63 s | Elapsed : 3.00 / 3.00 s
-->
Number of errors :
Number of warnings :
Number of infos
0 ( 0 filtered)
0 ( 0 filtered)
0 ( 0 filtered)