Versuch Universalzähler

Dieter Konrad & Carolin Urbanski
10.05.2016

Aufgabe 1-5

Aufgabe 6

hex7seg.vhd

-- Filename :      hex7seg.vhd
-- Beschreibung: Ausgabe der Hexadezimalzeichen 0 bis f auf einer 
--                 7-Segment LED-Anzeige. 

LIBRARY ieee;
USE ieee.std_logic_1164.all;

ENTITY hex7seg IS
    PORT (B    : IN    STD_LOGIC_VECTOR(3 DOWNTO 0); -- q - Output Univeralszähler
            H    : OUT    STD_LOGIC_VECTOR(0 TO 6)); -- 7 Segment - Anzeige
END hex7seg;

ARCHITECTURE Behavior OF hex7seg IS
BEGIN

    --       0  
    --      ---  
    --     |   |
    --    5|   |1
    --     | 6 |
    --      ---  
    --     |   |
    --    4|   |2
    --     |   |
    --      ---  
    --       3  

WITH B SELECT
    H    

Aufgabe 7

Programmier-Datei in eine Assembler-Datei umwandeln

Im Menü File > Convert Programming Files... Configuration Device > EPCS16 Mode: Active Serial Unter Input files to convert > *.sof angeben.

*.pof wird aus dem EEPROM in den RAM geladen. Danach muss das Board neu gestartet werden.

Aufgabe 8 bis 9

Aufgabe 10

Siehe Anhang Nr. 1

Aufgabe 11

UNIVERSAL_ZAEHLER.vhdl

library ieee;
use ieee.std_logic_1164.all;

entity UNIZAEHLER_MANUELL is
    port
    (
        -- Input ports
        CLOCK_50    : in  std_logic;
        SW    : in  std_logic_vector(16 downto 0);
        KEY : in std_logic_vector(1 downto 0);

        -- Output ports
        LEDG    : out std_logic_vector(0 to 0);
        LEDR    : out std_logic_vector(15 downto 0);
        HEX0    : out std_logic_vector(0 to 6);
        HEX1    : out std_logic_vector(0 to 6);
        HEX2    : out std_logic_vector(0 to 6);
        HEX3    : out std_logic_vector(0 to 6)
    );
end UNIZAEHLER_MANUELL;

architecture BEHAVIOR of UNIZAEHLER_MANUELL is

    signal data, q : std_logic_vector(15 downto 0);
    signal clk_1Hz : std_logic;

    COMPONENT clk_div IS
        PORT
        (
            clock_50Mhz            : IN    STD_LOGIC;
            clock_1MHz            : OUT    STD_LOGIC;
            clock_100KHz        : OUT    STD_LOGIC;
            clock_10KHz            : OUT    STD_LOGIC;
            clock_1KHz            : OUT    STD_LOGIC;
            clock_100Hz            : OUT    STD_LOGIC;
            clock_10Hz            : OUT    STD_LOGIC;
            clock_1Hz            : OUT    STD_LOGIC
        );
    end component;

    component lpm_counter0 IS
        port
        (
            aclr        : IN STD_LOGIC ;
            aload        : IN STD_LOGIC ;
            clock        : IN STD_LOGIC ;
            data        : IN STD_LOGIC_VECTOR (15 DOWNTO 0);
            updown    : IN STD_LOGIC ;
            q        : OUT STD_LOGIC_VECTOR (15 DOWNTO 0)
        );
    end component;

    component hex7seg IS
        port (B    : IN    STD_LOGIC_VECTOR(3 DOWNTO 0);
                H    : OUT    STD_LOGIC_VECTOR(0 TO 6));
    end component;

begin

    LEDG(0) <= clk_1Hz;

    clk1 : clk_div port map (clock_50Mhz => CLOCK_50, clock_1Hz => clk_1Hz);

    lpm1 : lpm_counter0 port map (not KEY(0), not KEY(1), clk_1Hz, SW(15 downto 0), SW(16), q);

    hexseg0 : hex7seg port map (B => q(3 downto 0), H => HEX0);
    hexseg1 : hex7seg port map (B => q(7 downto 4), H => HEX1);
    hexseg2 : hex7seg port map (B => q(11 downto 8), H => HEX2);
    hexseg3 : hex7seg port map (B => q(15 downto 12), H => HEX3);

    LEDR(15 downto 0) <= SW(15 downto 0);

end BEHAVIOR;

Aufgabe 13

Siehe Anhang 2.1, 2.2, 2.3

Die Darstellung der logischen Elemente erfolgt im Gesamtbild auf dem FPGA und in der Detaildarstellung kann die realisierte Verdrahtung angeschaut werden.

Aufgabe 15

Siehe Anhang 3

  • Total Termal Power Dissipation: 119.83 mW
  • Core Dynamic Termal Power Dissipation: 1.33 mW
  • Core Static Thermal Power Dissipation 79.96 mW
  • I/O Thermal Power Dissipation 38.95 mW

Aufgabe 16

Siehe Anhang 4

  • Total logic elements: (2%)
  • Total combinational functions: (2%)
  • Dedicated logic registers: (2%)
  • Total pins: (14%)
  • Total memory bits: (2%)