Digilent Spartan 3 Board Lecture L2.2

Slides:



Advertisements
Similar presentations
Quad 2-to-1 and Quad 4-to-1 Multiplexers Discussion D2.4 Example 7.
Advertisements

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;
Arithmetic Logic Unit (ALU)
Multiplexer as a Universal Element Discussion D2.6 Example 9.
7-Segment Display: Spartan-3 board
Shifters Discussion D7.1 Example Bit Shifter.
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.
Logic Design Fundamentals - 3 Discussion D3.2. Logic Design Fundamentals - 3 Basic Gates Basic Combinational Circuits Basic Sequential Circuits.
Introduction to VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T1: Combinational Logic Circuits.
Single-Cycle Instructions VHDL Tutorial R. E. Haskell and D. M. Hanna T5: VHDL ROM.
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.
Structural VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T3: ALU Design.
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.
7-Segment Display DIO1 Board. Digilab2 – DIO1 Boards Four 7-segment displays A0A1A2A3.
Introduction to VHDL Multiplexers. Introduction to VHDL VHDL is an acronym for VHSIC (Very High Speed Integrated Circuit) Hardware Description Language.
Lecture L6.2 VHDL Multiply Operator (*)
Lab 2 4-Bit Adder Digilent Spartan 3 Board Lecture L2.3.
Division Lecture L6.3. Division
4-to-1 Multiplexer: case Statement Discussion D2.3 Example 6.
Digilab 7-Segment Displays Lab 4. selyInstruction name “000”true if b = a false otherwise = “001”true if b /= a false otherwise “010”true if b < a.
Switches, Pushbuttons, and LEDs Digilent Spartan 3 Board Lecture L2.1.
Finite State Machines Discussion D8.1 Example 36.
Digilent Spartan 3 Board Discussion D3.3
7-Segment Displays Digilent Spartan 3 Board Discussion DS-4.2.
Introduction to VHDL Multiplexers Discussion D1.1.
Division Discussion D11.3. Division
7-Segment Displays VHDL Tutorial R. E. Haskell and D. M. Hanna T4: Xilinx LogiBLOX.
Sequential Multiplication Lecture L6.4. Multiplication 13 x = 8Fh 1101 x
LCD Display DIO2 Board CPLD. DIO2 Board CPLD Interface LCD Display.
Arithmetic Logic Unit (ALU) Discussion D4.6. ALU N = negative flag (N=1 if y(n)=0 Z = zero flag (Z = 1 if Y = 0) V = overflow flag C = carry flag.
4-Bit Binary-to-BCD Converter: case Statement
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);
7-Segment Display DIO1 Board Verilog.
ECE 448: Spring 12 Lab 4 – Part 2 Finite State Machines Basys2 FPGA Board.
PS/2 Mouse/Keyboard Port Discussion D7.2. PS/2 Port.
4-bit Shift Register. 2-bit Register Serial-in-serial-out Shift Register.
A.7 Concurrent Assignment Statements Used to assign a value to a signal in an architecture body. Four types of concurrent assignment statements –Simple.
1 Part I: SYSTEM DESIGN. 2 Packages and Components Functions and Procedures Problem (Design & Implementation) Additional System Designs.
ENG2410 Digital Design LAB #8 LAB #8 Data Path Design.
VHDL for Combinational Circuits. VHDL We Know Simple assignment statements –f
ENG2410 Digital Design LAB #5 Modular Design and Hierarchy using VHDL.
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.
Copyright (c) 2003 by Valery Sklyarov and Iouliia Skliarova: DETUA, IEETA, Aveiro University, Portugal.
CS/EE 3700 : Fundamentals of Digital System Design
Prime Numbers Lecture L6.1 Sieve of Eratosthenes.
Registers and Counters Discussion D8.1. Logic Design Fundamentals - 3 Registers Counters Shift Registers.
LAB #5 Modular Design and Hierarchy using VHDL
Combinational logic circuit
LAB #4 Xilinix ISE Foundation Tools VHDL Design Entry “A Tutorial”
Describing Combinational Logic Using Processes
Comparators Discussion DS-3.1.
ENG6530 Reconfigurable Computing Systems
Combinational Circuits Using VHDL
مدار های ترکیبی دیکدر لامپ های هفت قسمتی یکی از دیکدر هایی که اغلب به کار برده می شود،دیکدر 4 به 7 برای تبدیل کد bcd به کد هفت بیتی برای لامپ های seven.
Binary-to-BCD Converter
A Greatest Common Divisor (GCD) Processor
Fibonacci Sequence Lecture L4.1 Lab 3.
Fast, Asynchronous SRAM
4-Input Gates VHDL for Loops
디 지 털 시 스 템 설 계 UP2 Kit를 이용한 카운터 설계
Digital Logic with VHDL
Presentation transcript:

Digilent Spartan 3 Board Lecture L2.2 7-Segment Displays Digilent Spartan 3 Board Lecture L2.2

Spartan 3 Board

Spartan 3 Board

Turning on an LED Note: A zero turns on the LED

Spartan 3 Board

7-Segment Decoder a-g LOW to turn on segment

Multiplex displays

Multiplex displays 1 1 1 0 0 0 0 1 1 0

Multiplex displays 1 1 1 0 0 0 1 1 1 1

Multiplex displays 1 1 1 1 0 0 1 1 0 0

Multiplex displays 1 1 1 0 1 1 1 0 0 0

x7seg

x7seg.vhd library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity x7seg is Port ( x : in std_logic_vector(15 downto 0); cclk, clr : in std_logic; AtoG : out std_logic_vector(6 downto 0); A : out std_logic_vector(3 downto 0) ); end x7seg;

architecture arch_x7seg of x7seg is signal digit : std_logic_vector(3 downto 0); signal count : std_logic_vector(1 downto 0); begin

ctr2bit: process(cclk,clr) begin if(clr = '1') then count <= "00"; elsif(cclk'event and cclk = '1') then count <= count + 1; end if; end process;

-- MUX4 with count select digit <= x(3 downto 0) when "00", x(7 downto 4) when "01", x(11 downto 8) when "10", x(15 downto 12) when others;

-- seg7dec with digit select AtoG <= "1001111" when "0001", --1 "0010010" when "0010", --2 "0000110" when "0011", --3 "1001100" when "0100", --4 "0100100" when "0101", --5 "0100000" when "0110", --6 "0001111" when "0111", --7 "0000000" when "1000", --8 "0000100" when "1001", --9 "0001000" when "1010", --A "1100000" when "1011", --b "0110001" when "1100", --C "1000010" when "1101", --d "0110000" when "1110", --E "0111000" when "1111", --F "0000001" when others; --0

Example: count = 10 AN(2) = 0 AN(0) = AN(1) = AN(3) = 1 AN(3:0) = 1011 ANcode: process(count) begin A <= (others => '1'); A(conv_integer(count)) <= '0'; end process; end arch_x7seg; Example: count = 10 AN(2) = 0 AN(0) = AN(1) = AN(3) = 1 AN(3:0) = 1011

.ucf file NET "AN<0>" LOC = "E13" ; NET "AN<1>" LOC = "F14" ; NET "AN<2>" LOC = "G14" ; NET "AN<3>" LOC = "d14" ; NET "AtoG<6>" LOC = "E14" ; NET "AtoG<5>" LOC = "G13" ; NET "AtoG<4>" LOC = "N15" ; NET "AtoG<3>" LOC = "P15" ; NET "AtoG<2>" LOC = "R16" ; NET "AtoG<1>" LOC = "F13" ; NET "AtoG<0>" LOC = "N16" ; NET "dp" LOC = "P16" ;