127
Common Katode
Cara kerja dari seven segmen common katode akan aktif pada kondisi
high "1" dan akan off pada kondisi low "0".
Tabel 5.1 Seven Segmen Common Katode
Angka h
0
1
2
3
4
5
6
7
8
9
0
0
1
1
1
1
1
0
1
1
1
0
0
0
1
1
1
0
1
1
1
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
0
1
1
1
1
0
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
128
129
Anod
Cara
seven
common
akan aktif
kondisi
dan akan
kondisi
ommon
h
1
1
1
1
1
1
1
1
1
1
G
1
1
0
0
0
0
0
1
0
0
f
0
1
1
1
0
0
0
1
0
0
e
0
1
0
1
1
1
0
1
0
1
d
0
1
0
0
1
0
0
1
0
0
c
0
0
1
0
0
0
0
0
0
0
b
0
0
0
0
0
1
1
0
0
0
a
0
1
0
0
1
0
0
0
0
0
e
kerja dari
segmen
anode
pada
low
"0"
off
pada
high "1".
130
131
132
7. List Program
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity coba is
port (
clk : in std_logic;
bcd : in std_logic_vector(3 downto 0);
segment7 : out std_logic_vector(6 downto 0) );
end coba ;
architecture Behavioral of coba is
begin
process (clk,bcd)
BEGIN
if (clk'event and clk='1') then
case bcd is
when "0000"=> segment7 <="1000000"; -- '0'
when "0001"=> segment7 <="1111001"; -- '1'
when "0010"=> segment7 <="0100100"; -- '2'
when "0011"=> segment7 <="0110000"; -- '3'
when "0100"=> segment7 <="0011001"; -- '4'
when "0101"=> segment7 <="0010010"; -- '5'
when "0110"=> segment7 <="0000010"; -- '6'
when "0111"=> segment7 <="1111000"; -- '7'
when "1000"=> segment7 <="0000000"; -- '8'
when "1001"=> segment7 <="0010000"; -- '9'
when "1010"=> segment7 <="0001000"; -- 'A'
when "1011"=> segment7 <="0000011"; -- 'b'
when "1100"=> segment7 <="0110001"; -- 'c'
when "1101"=> segment7 <="0100001"; -- 'd'
when "1110"=> segment7 <="0000110"; -- 'E'
when others=> segment7 <="0001110"; -- 'F'
end case;
end if;
end process;
end Behavioral;
8. File ucf
NET "bcd[0]" LOC = L13;
NET "bcd[1]" LOC = L14;
NET "bcd[2]" LOC = H18;
NET "bcd[3]" LOC = N17;
NET "clk" LOC = C9;
133
134
5.5 Tugas
5.4.1
Counter-Up Ganjil
D
0
0
0
0
0
1
C
0
0
0
1
1
0
OUTPUT
B
A
0
0
0
1
1
1
0
1
1
1
0
1
Angka
0
1
3
5
7
9
135
0
0
0
1
1
1
0
1
1
1
0
1
1
1
1
B
D
F
5.4.1.2 RANGKAIAN
137
138
139
====================================================
=
---- Source Parameters
Input File Name
: "counter_up_ganjil.prj"
Input Format
: mixed
: "counter_up_ganjil"
Output Format
: NGC
Target Device
: xc3s500e-4-fg320
: counter_up_ganjil
: YES
: Auto
Safe Implementation
FSM Style
RAM Extraction
RAM Style
ROM Extraction
Mux Style
: No
: LUT
: Yes
: Auto
: Yes
: Auto
140
Decoder Extraction
: YES
: Yes
: YES
: YES
XOR Collapsing
ROM Style
: YES
: Auto
Mux Extraction
: Yes
Resource Sharing
: YES
Asynchronous To Synchronous
Multiplier Style
: NO
: Auto
: No
: YES
: 100000
: 24
: YES
: YES
: Yes
: Yes
: Yes
: Auto
: YES
: Speed
Optimization Effort
:1
Keep Hierarchy
: No
Netlist Hierarchy
: As_Optimized
RTL Output
Global Optimization
Read Cores
: Yes
: AllClockNets
: YES
141
: NO
: NO
Hierarchy Separator
:/
Bus Delimiter
: <>
Case Specifier
: Maintain
: 100
: 100
: YES
: NO
:5
====================================================
====================================================
==*
HDL Compilation
====================================================
=WARNING:HDLParsers:3607 - Unit work/counter_up_ganjil is now
defined in a different file. It was defined in
"C:/Users/q/Desktop/Percobaan ke 5
fix/percobaan_ke_5/counter_up_ganjil.vhd", and is now defined in
"C:/Users/samila/Desktop/tugas VHDL Fix/Percobaan ke 5
fix/percobaan_ke_5/counter_up_ganjil.vhd".
WARNING:HDLParsers:3607 - Unit work/counter_up_ganjil/Behavioral
is now defined in a different file. It was defined in
"C:/Users/q/Desktop/Percobaan ke 5
fix/percobaan_ke_5/counter_up_ganjil.vhd", and is now defined in
"C:/Users/samila/Desktop/tugas VHDL Fix/Percobaan ke 5
fix/percobaan_ke_5/counter_up_ganjil.vhd".
Compiling vhdl file "C:/Users/samila/Desktop/tugas VHDL
Fix/Percobaan ke 5 fix/percobaan_ke_5/counter_up_ganjil.vhd" in
Library work.
Architecture behavioral of Entity counter_up_ganjil is up to date.
142
====================================================
=*
HDL Analysis
====================================================
=Analyzing Entity <counter_up_ganjil> in library <work> (Architecture
<behavioral>).
Entity <counter_up_ganjil> analyzed. Unit <counter_up_ganjil>
generated.
====================================================
=*
HDL Synthesis
====================================================
=Performing bidirectional port resolution...
Synthesizing Unit <counter_up_ganjil>.
Related source file is "C:/Users/samila/Desktop/tugas VHDL
Fix/Percobaan ke 5 fix/percobaan_ke_5/counter_up_ganjil.vhd".
Found finite state machine <FSM_0> for signal <p_state>.
----------------------------------------------------------------------| States
|4
| Transitions
| Inputs
|4
|0
| Outputs
|3
| Clock
| clk
| Power Up State
| Encoding
| Implementation
|
(rising_edge)
| st1
| automatic
| LUT
|
|
|
|
----------------------------------------------------------------------Summary:
inferred 1 Finite State Machine(s).
143
====================================================
=Analyzing FSM <FSM_0> for best encoding.
Optimizing FSM <p_state/FSM> on signal <p_state[1:2]> with user
encoding.
------------------State | Encoding
------------------st1 | 00
st2 | 01
st3 | 10
st4 | 11
------------------====================================================
=Advanced HDL Synthesis Report
Macro Statistics
# FSMs
:1
====================================================
====================================================
==*
====================================================
=Optimizing unit <counter_up_ganjil> ...
Mapping all equations...
Building and optimizing final netlist ...
144
:2
Flip-Flops
:2
====================================================
====================================================
==*
Partition Report
====================================================
=Partition Implementation Status
------------------------------No Partitions were found in this design.
------------------------------====================================================
=*
Final Report
====================================================
=Final Results
RTL Top Level Output File Name
Top Level Output File Name
Output Format
: counter_up_ganjil.ngr
: counter_up_ganjil
: NGC
Optimization Goal
: Speed
Keep Hierarchy
: No
Design Statistics
# IOs
:4
Cell Usage :
# BELS
:2
LUT2
:1
VCC
:1
145
# FlipFlops/Latches
#
FD
FDR
:2
:1
:1
# Clock Buffers
#
:1
BUFGP
:1
# IO Buffers
:3
:3
OBUF
====================================================
=Device utilization summary:
--------------------------Selected Device : 3s500efg320-4
Number of Slices:
1 out of 4656
0%
2 out of 9312
0%
1 out of 9312
0%
4 out of
1%
Number of IOs:
Number of bonded IOBs:
Number of GCLKs:
4
1 out of
232
24
4%
-----------------------------------+------------------------+-------+
Clock Signal
-----------------------------------+------------------------+-------+
clk
| BUFGP
|2
-----------------------------------+------------------------+-------+
Asynchronous Control Signals Information:
---------------------------------------No asynchronous control signals found in this design
Timing Summary:
--------------Speed Grade: -4
Minimum period: 2.225ns (Maximum Frequency: 449.438MHz)
Minimum input arrival time before clock: No path found
Maximum output required time after clock: 4.394ns
Maximum combinational path delay: No path found
Timing Detail:
-------------All values displayed in nanoseconds (ns)
====================================================
=Timing constraint: Default period analysis for Clock 'clk'
Clock period: 2.225ns (frequency: 449.438MHz)
Total number of paths / destination ports: 3 / 2
------------------------------------------------------------------------Delay:
Source:
Destination:
Source Clock:
Net
---------------------------------------- -----------FD:C->Q
(p_state_FSM_FFd1)
LUT2:I0->O
(p_state_FSM_FFd1-In)
FD:D
0.308
p_state_FSM_FFd1
---------------------------------------Total
====================================================
=Timing constraint: Default OFFSET OUT AFTER for Clock 'clk'
Total number of paths / destination ports: 2 / 2
------------------------------------------------------------------------Offset:
Source:
Destination:
Source Clock:
Net
---------------------------------------- -----------FDR:C->Q
(p_state_FSM_FFd2)
OBUF:I->O
3.272
dout_1_OBUF (dout<1>)
---------------------------------------Total
====================================================
=Total REAL time to Xst completion: 8.00 secs
Total CPU time to Xst completion: 7.65 secs
148
-->
Total memory usage is 199992 kilobytes
Number of errors : 0 ( 0 filtered)
Number of warnings : 2 ( 0 filtered)
Number of infos
: 0 ( 0 filtered)
149
150
151
PENUTUP
Kesimpulan
Setelah
melakukan
keseluruhan
praktikum
ini,
penulis
dapat
152
DAFTAR PUTAKA
Catatan Kuliah
153