Upload
khaled-omar
View
215
Download
2
Embed Size (px)
DESCRIPTION
VHDL 1
Citation preview
Number representation
in VHDL
8/28/2015
Footer Text
3
Integers Binary Values
Unsigned Values
Signed Values
Fundamental VHDL Units Library
declarations,
•LIBRARY ieee;
•USE ieee.std_logic_1164.all;
ENTITY
•ENTITY comp_add IS
•PORT (a, b: IN INTEGER RANGE 0 TO 7;
•comp: OUT STD_LOGIC;
• sum: OUT INTEGER RANGE 0 TO 15);
•END ENTITY;
ARCHITECTURE.
•ARCHITECTURE circuit OF comp_add IS
•BEGIN
•comp <= '1' WHEN a>b ELSE '0';
•sum <= a + b;
•END ARCHITECTURE;
8/28/2015
Footer Text
4