4-Bit Binary-to-BCD Converter: case Statement

Slides:



Advertisements
Similar presentations
Digital Logic with VHDL EE 230 Digital Systems Fall 2006 (10/17/2006)
Advertisements

1 Lecture 13 VHDL 3/16/09. 2 VHDL VHDL is a hardware description language. The behavior of a digital system can be described (specified) by writing a.
Quad 2-to-1 and Quad 4-to-1 Multiplexers Discussion D2.4 Example 7.
Arbitrary Waveform Discussion 5.5 Example 34.
Decoders Discussion D9.5 Example 25. Decoders 3-to-8 Decoder decoder38.vhd library IEEE; use IEEE.STD_LOGIC_1164.all; use IEEE.STD_LOGIC_unsigned.all;
Gray Code Converters Discussion D9.1 Example 16.
Edge-Triggered D Flip-Flops Discussion D4.2 Example 26.
Multiplexer as a Universal Element Discussion D2.6 Example 9.
7-Segment Display: Spartan-3 board
1 VLSI DESIGN USING VHDL Part II A workshop by Dr. Junaid Ahmed Zubairi.
Shifters Discussion D7.1 Example Bit Shifter.
Divider Discussion D7.3 Example 20.
Ring Counter Discussion D5.3 Example 32. Ring Counter if rising_edge(CLK) then for i in 0 to 2 loop s(i)
Adder Discussion D6.2 Example 17. s i = c i ^ (a i ^ b i ) c i+1 = a i * b i + c i * (a i ^ b i ) Full Adder (Appendix I)
Top-level VHDL Designs
Generic Multiplexers: Parameters Discussion D2.5 Example 8.
2-to-1 Multiplexer: if Statement Discussion D2.1 Example 4.
Decoders and Encoders Lecture L4.2. Decoders and Encoders Binary Decoders Binary Encoders Priority Encoders.
Introduction to VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T1: Combinational Logic Circuits.
Registers VHDL Tutorial R. E. Haskell and D. M. Hanna T2: Sequential Logic Circuits.
Lab Lecture 3 VHDL Architecture styles and Test Bench -Aahlad.
Digilent Spartan 3 Board Lecture L2.2
1 Comparators Discussion D A 1-Bit Comparator The variable Gout is 1 if x > y or if x = y and Gin = 1. The variable Eout is 1 if x = y and Gin =
FPGAs and VHDL Lecture L12.1. FPGAs and VHDL Field Programmable Gate Arrays (FPGAs) VHDL –2 x 1 MUX –4 x 1 MUX –An Adder –Binary-to-BCD Converter –A Register.
Counters Discussion D5.3 Example 33. Counters 3-Bit, Divide-by-8 Counter 3-Bit Behavioral Counter in Verilog Modulo-5 Counter An N-Bit Counter.
Lab 6 Program Counter and Program ROM Mano & Kime Sections 7-1 – 7-6.
Lab 2 4-Bit Adder Digilent Spartan 3 Board Lecture L2.3.
4-to-1 Multiplexer: case Statement Discussion D2.3 Example 6.
FPGAs and VHDL Lecture L13.1 Sections 13.1 – 13.3.
Logic Design Fundamentals - 2 Lecture L1.2. Logic Design Fundamentals - 2 Basic Gates Basic Combinational Circuits Basic Sequential Circuits.
Digilent Spartan 3 Board Discussion D3.3
Binary-to-BCD Converter
Binary-to-BCD Converter
Shift Registers Discussion D5.2 Example Bit Shift Register qs(3) qs(2) qs(1) qs(0) if rising_edge(CLK) then for i in 0 to 2 loop s(i) := s(i+1);
1 Comparators: Procedures Discussion D9.2 Example 22.
VHDL Examples Subra Ganesan Reference: Professor Haskell’s Notes,
4-bit Shift Register. 2-bit Register Serial-in-serial-out Shift Register.
ECE 448: Lab 4 FIR Filters.
Binary-to-BCD Converter
1 Copyright (c) 2003 by Valery Sklyarov and Iouliia Skliarova: DETUA, IEETA, Aveiro University, Portugal.
ENG2410 Digital Design LAB #8 LAB #8 Data Path Design.
VHDL for Combinational Circuits. VHDL We Know Simple assignment statements –f
EE3A1 Computer Hardware and Digital Design Lecture 5 Testbenches and Memories in VHDL.
Digital Systems Design VHDL simulation of a 3 – Bit Binary Decoder with Enable by Marc A. Mackey.
ECE 331 – Digital System Design Multiplexers and Demultiplexers (Lecture #13)
2’s Complement 4-Bit Saturator Discussion D2.8 Lab 2.
4-to-1 Multiplexer: Module Instantiation Discussion D2.2 Example 5.
2/10/07DSD,USIT,GGSIPU1 BCD adder KB3B2B1B0CD3D2D1D
Digital System Projects
1 Part III: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
9/9/2006DSD,USIT,GGSIPU1 Concurrent vs Sequential Combinational vs Sequential logic –Combinational logic is that in which the output of the circuit depends.
VHDL ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
1 Bits, Bytes, Binary & Hex CIS TAG ▪ Byte Bit.
EGRE 6311 LHO 04 - Subprograms, Packages, and Libraries EGRE 631 1/26/09.
Describing Combinational Logic Using Processes
Comparators Discussion DS-3.1.
ENG6530 Reconfigurable Computing Systems
Combinational Circuits Using VHDL
LIBRARY IEEE; Include Libraries for standard logic data types USE IEEE.STD_LOGIC_1164.ALL; -- Entity name normally the same as file name.
LIBRARY IEEE; Include Libraries for standard logic data types USE IEEE.STD_LOGIC_1164.ALL; -- Entity name normally the same as file name.
Mano and Kime Sections 7-6 – 7-8
Getting Started with Vivado
Binary-to-BCD Converter
Concurrent vs Sequential
ECE 331 – Digital System Design
ECE 448: Lab 4 FIR Filters.
4-Input Gates VHDL for Loops
디 지 털 시 스 템 설 계 UP2 Kit를 이용한 카운터 설계
Digital Logic with VHDL
(Sequential-Circuit Building Blocks)
Presentation transcript:

4-Bit Binary-to-BCD Converter: case Statement Discussion D3.4 Example 14

Binary-to-BCD Converter

-- Example 14: 4-Bit Binary-to-BCD Converter library IEEE; use IEEE.STD_LOGIC_1164.all; entity binbcd4 is port( b : in STD_LOGIC_VECTOR(3 downto 0); p : out STD_LOGIC_VECTOR(4 downto 0) ); end binbcd4;

architecture binbcd4 of binbcd4 is signal ps: STD_LOGIC_VECTOR(7 downto 0); begin process(b) case b is when X"0" => ps <= X"00"; when X"1" => ps <= X"01"; when X"2" => ps <= X"02"; when X"3" => ps <= X"03"; when X"4" => ps <= X"04"; when X"5" => ps <= X"05"; when X"6" => ps <= X"06"; when X"7" => ps <= X"07"; when X"8" => ps <= X"08"; when X"9" => ps <= X"09"; when X"A" => ps <= X"10"; when X"B" => ps <= X"11"; when X"C" => ps <= X"12"; when X"D" => ps <= X"13"; when X"E" => ps <= X"14"; when X"F" => ps <= X"15"; when others => ps <= X"00"; end case; end process; p <= ps(4 downto 0); end binbcd4;

Aldec Active-HDL Simulation