Académique Documents
Professionnel Documents
Culture Documents
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity trafic is
Port ( rst : in STD_LOGIC;
clk : in STD_LOGIC;
G : inout STD_LOGIC_VECTOR (3 downto 0);
R : inout STD_LOGIC_VECTOR (3 downto 0);
Y : inout STD_LOGIC_VECTOR (3 downto 0));
end trafic;
begin
PROCESS(CLK,RST)
BEGIN
IF(RST='1') THEN
R <= "0000";
G <= "0000";
Y <= "0000";
ELSIF(CLK='1' AND CLK' EVENT) THEN
CASE A IS
WHEN S0 =>
R <= "0111";
G <= "1000";
Y <= "0000";
count2 <= count2+1;
if(count2(26)='1')then
count2<=(others=>'0');
A<=S1;
end if;
WHEN S1 =>
R <= "0111";
G <= "0000";
Y <= "1000";
count1 <= count1+1;
if(count1(25)='1')then
count1<=(others=>'0');
A<=S2;
end if;
WHEN S2 =>
R <= "1011";
G <= "0100";
Y <= "0000";
count2 <= count2+1;
if(count2(26)='1')then
count2<=(others=>'0');
A<=S3;
end if;
WHEN S3 =>
R <= "1011";
G <= "0000";
Y <= "0100";
count1 <= count1+1;
if(count1(25)='1')then
count1<=(others=>'0');
A<=S4;
end if;
WHEN S4 =>
R <= "1101";
G <= "0010";
Y <= "0000";
count2 <= count2+1;
if(count2(26)='1')then
count2<=(others=>'0');
A<=S5;
end if;
WHEN S5 =>
R <= "1101";
G <= "0000";
Y <= "0010";
count1 <= count1+1;
if(count1(25)='1')then
count1<=(others=>'0');
A<=S6;
end if;
WHEN S6 =>
R <= "1110";
G <= "0001";
Y <= "0000";
WHEN S7 =>
R <= "1110";
G <= "0000";
Y <= "0001";
count1 <= count1+1;
if(count1(25)='1')then
count1<=(others=>'0');
end if;
END CASE;
END IF;
END PROCESS;
end Behavioral;
ENTITY WD IS
END WD;
ARCHITECTURE behavior OF WD IS
COMPONENT trafic
PORT(
rst : IN std_logic;
clk : IN std_logic;
G : INOUT std_logic_vector(3 downto 0);
R : INOUT std_logic_vector(3 downto 0);
Y : INOUT std_logic_vector(3 downto 0)
);
END COMPONENT;
--Inputs
--BiDirs
signal G : std_logic_vector(3 downto 0);
signal R : std_logic_vector(3 downto 0);
signal Y : std_logic_vector(3 downto 0);
BEGIN
process(clk)
begin
clk<=(not clk) after 30 ns;
end process;
process
begin
rst <='1';
wait for 30 ns;
rst <='0';
wait;
end process;
END;
FPGA KIT:
net"rst"loc="p57";
net"clk"loc="p181";
net"G<0>"loc="p115";
net"R<0>"loc="p117";
net"Y<0>"loc="p106";
net"G<1>"loc="p123";
net"R<1>"loc="p120";
net"Y<1>"loc="p119";
net"G<2>"loc="p146";
net"R<2>"loc="p149";
net"Y<2>"loc="p131";
net"G<3>"loc="p152";
net"R<3>"loc="p13";
net"Y<3>"loc="p113";
RTL SYNTHESIS:
TEST-BENCH:
SYNTHESIS REPORT:
Release 10.1 - xst K.31 (nt)
Copyright (c) 1995-2008 Xilinx, Inc. All rights reserved.
--> Parameter TMPDIR set to D:/a/trafic/xst/projnav.tmp
TABLE OF CONTENTS
1) Synthesis Options Summary
2) HDL Compilation
3) Design Hierarchy Analysis
4) HDL Analysis
5) HDL Synthesis
5.1) HDL Synthesis Report
6) Advanced HDL Synthesis
=========================================================================
*
=========================================================================
---- Source Parameters
Input File Name
Input Format
: "trafic.prj"
: mixed
: "trafic"
Output Format
Target Device
: NGC
: xc3s400-4-pq208
: trafic
: YES
: Auto
Safe Implementation
FSM Style
: No
: lut
RAM Extraction
: Yes
RAM Style
: Auto
ROM Extraction
Mux Style
: Yes
: Auto
Decoder Extraction
: YES
: YES
: YES
: YES
XOR Collapsing
ROM Style
Mux Extraction
Resource Sharing
: YES
: Auto
: YES
: YES
Asynchronous To Synchronous
Multiplier Style
: NO
: auto
: No
: YES
: 500
: YES
: YES
:8
: Yes
: Yes
: Yes
: auto
: YES
: Speed
Optimization Effort
:1
: trafic.lso
Keep Hierarchy
: NO
Netlist Hierarchy
: as_optimized
RTL Output
Global Optimization
Read Cores
: Yes
: AllClockNets
: YES
: NO
: NO
Hierarchy Separator
:/
Bus Delimiter
: <>
Case Specifier
: maintain
: 100
: 100
: YES
: NO
:5
=========================================================================
=========================================================================
*
HDL Compilation
=========================================================================
Compiling vhdl file "D:/a/trafic/trafic.vhd" in Library work.
Entity <trafic> compiled.
Entity <trafic> (Architecture <behavioral>) compiled.
=========================================================================
*
=========================================================================
Analyzing hierarchy for entity <trafic> in library <work> (architecture <behavioral>).
=========================================================================
*
HDL Analysis
=========================================================================
Analyzing Entity <trafic> in library <work> (Architecture <behavioral>).
Entity <trafic> analyzed. Unit <trafic> generated.
=========================================================================
*
HDL Synthesis
=========================================================================
|8
| 15
|2
|
|
| 12
| clk (rising_edge)
| Clock enable
|
|
| rst (negative)
| Power Up State
| Encoding
| s0
| automatic
| Implementation
| LUT
|
|
|
|
INFO:Xst:1767 - HDL ADVISOR - Resource sharing has identified that some arithmetic operations in this
design can share the same physical resources for reduced device utilization. For improved clock
frequency you may try to disable resource sharing.
=========================================================================
HDL Synthesis Report
Macro Statistics
# Adders/Subtractors
:2
26-bit adder
:1
27-bit adder
:1
# Registers
:5
26-bit register
:1
27-bit register
:1
4-bit register
:3
=========================================================================
=========================================================================
*
=========================================================================
=========================================================================
Advanced HDL Synthesis Report
Macro Statistics
# Adders/Subtractors
:2
26-bit adder
:1
27-bit adder
:1
# Registers
: 68
Flip-Flops
: 68
=========================================================================
=========================================================================
*
=========================================================================
=========================================================================
Final Register Report
Macro Statistics
# Registers
Flip-Flops
: 68
: 68
=========================================================================
=========================================================================
*
Partition Report
=========================================================================
-------------------------------
=========================================================================
*
Final Report
=========================================================================
Final Results
RTL Top Level Output File Name
Top Level Output File Name
Output Format
Optimization Goal
Keep Hierarchy
Design Statistics
: trafic.ngr
: trafic
: NGC
: Speed
: NO
# IOs
: 14
Cell Usage :
# BELS
: 226
GND
:1
INV
LUT1
: 51
LUT2
:4
LUT3
: 12
LUT4
: 52
MUXCY
VCC
XORCY
:3
: 51
:1
: 51
# FlipFlops/Latches
: 68
FDC
: 12
FDE
: 56
# Clock Buffers
#
BUFGP
# IO Buffers
#
IBUF
OBUF
:1
:1
: 13
:1
: 12
=========================================================================
Number of Slices:
67 out of 3584
1%
68 out of 7168
1%
14 out of 141
9%
Number of IOs:
Number of bonded IOBs:
Number of GCLKs:
0%
14
1 out of
8 12%
---------------------------
=========================================================================
TIMING REPORT
Clock Information:
----------------------------------------------------+------------------------+-------+
Clock Signal
-----------------------------------+------------------------+-------+
clk
| BUFGP
| 68 |
-----------------------------------+------------------------+-------+
| Buffer(FF name)
| Load |
-----------------------------------+------------------------+-------+
rst
| IBUF
| 12 |
-----------------------------------+------------------------+-------+
Timing Summary:
--------------Speed Grade: -4
Timing Detail:
-------------All values displayed in nanoseconds (ns)
=========================================================================
Timing constraint: Default period analysis for Clock 'clk'
Clock period: 7.050ns (frequency: 141.844MHz)
Total number of paths / destination ports: 929 / 68
------------------------------------------------------------------------Delay:
Source:
Destination:
count2_26 (FF)
Source Clock:
clk rising
Net
---------------------------------------- -----------FDE:C->Q
LUT1:I0->O
1 0.551 0.000 Madd_count2_addsub0000_cy<1>_rt
(Madd_count2_addsub0000_cy<1>_rt)
MUXCY:S->O
1 0.500 0.000 Madd_count2_addsub0000_cy<1>
(Madd_count2_addsub0000_cy<1>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<2>
(Madd_count2_addsub0000_cy<2>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<3>
(Madd_count2_addsub0000_cy<3>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<4>
(Madd_count2_addsub0000_cy<4>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<5>
(Madd_count2_addsub0000_cy<5>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<6>
(Madd_count2_addsub0000_cy<6>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<7>
(Madd_count2_addsub0000_cy<7>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<8>
(Madd_count2_addsub0000_cy<8>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<9>
(Madd_count2_addsub0000_cy<9>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<10>
(Madd_count2_addsub0000_cy<10>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<11>
(Madd_count2_addsub0000_cy<11>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<12>
(Madd_count2_addsub0000_cy<12>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<13>
(Madd_count2_addsub0000_cy<13>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<14>
(Madd_count2_addsub0000_cy<14>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<15>
(Madd_count2_addsub0000_cy<15>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<16>
(Madd_count2_addsub0000_cy<16>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<17>
(Madd_count2_addsub0000_cy<17>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<18>
(Madd_count2_addsub0000_cy<18>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<19>
(Madd_count2_addsub0000_cy<19>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<20>
(Madd_count2_addsub0000_cy<20>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<21>
(Madd_count2_addsub0000_cy<21>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<22>
(Madd_count2_addsub0000_cy<22>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<23>
(Madd_count2_addsub0000_cy<23>)
MUXCY:CI->O
1 0.064 0.000 Madd_count2_addsub0000_cy<24>
(Madd_count2_addsub0000_cy<24>)
MUXCY:CI->O
0 0.064 0.000 Madd_count2_addsub0000_cy<25>
(Madd_count2_addsub0000_cy<25>)
XORCY:CI->O
LUT3:I2->O
FDE:D
0.203
count2_26
---------------------------------------Total
=========================================================================
Timing constraint: Default OFFSET IN BEFORE for Clock 'clk'
Total number of paths / destination ports: 56 / 56
------------------------------------------------------------------------Offset:
Source:
Destination:
Net
---------------------------------------- -----------IBUF:I->O
INV:I->O
FDE:CE
0.602
A_FFd3
---------------------------------------Total
=========================================================================
Timing constraint: Default OFFSET OUT AFTER for Clock 'clk'
Total number of paths / destination ports: 12 / 12
------------------------------------------------------------------------Offset:
Source:
Destination:
G<3> (PAD)
Source Clock:
clk rising
Net
---------------------------------------- -----------FDC:C->Q
OBUF:I->O
G_3_OBUF (G<3>)
---------------------------------------Total
=========================================================================
-->