From 32d67832297d5dbd29e7192d855f879a66ba6982 Mon Sep 17 00:00:00 2001 From: OmalyaV Date: Wed, 7 Jun 2023 05:44:58 +0530 Subject: [PATCH 01/27] added --- Lab9/Lab9.srcs/sources_1/new/LUT_16_7.vhd | 66 +++++++++++++++++++++++ Lab9/Lab9.xpr | 7 +++ 2 files changed, 73 insertions(+) create mode 100644 Lab9/Lab9.srcs/sources_1/new/LUT_16_7.vhd diff --git a/Lab9/Lab9.srcs/sources_1/new/LUT_16_7.vhd b/Lab9/Lab9.srcs/sources_1/new/LUT_16_7.vhd new file mode 100644 index 0000000..dbab3a4 --- /dev/null +++ b/Lab9/Lab9.srcs/sources_1/new/LUT_16_7.vhd @@ -0,0 +1,66 @@ +---------------------------------------------------------------------------------- +-- Company: +-- Engineer: +-- +-- Create Date: 05/03/2023 09:51:43 AM +-- Design Name: +-- Module Name: LUT_16_7 - Behavioral +-- Project Name: +-- Target Devices: +-- Tool Versions: +-- Description: +-- +-- Dependencies: +-- +-- Revision: +-- Revision 0.01 - File Created +-- Additional Comments: +-- +---------------------------------------------------------------------------------- + + +library IEEE; +use IEEE.STD_LOGIC_1164.ALL; +use ieee.numeric_std.all; + +-- Uncomment the following library declaration if using +-- arithmetic functions with Signed or Unsigned values +--use IEEE.NUMERIC_STD.ALL; + +-- Uncomment the following library declaration if instantiating +-- any Xilinx leaf cells in this code. +--library UNISIM; +--use UNISIM.VComponents.all; + +entity LUT_16_7 is + Port ( address : in STD_LOGIC_VECTOR (3 downto 0); + + data : out STD_LOGIC_VECTOR (11 downto 0)); +end LUT_16_7; + +architecture Behavioral of LUT_16_7 is +type rom_type is array (0 to 15) of std_logic_vector(6 downto 0); + + signal sevenSegment_ROM : rom_type := ( + "1000000", -- 0 + "1111001",--1 + "0100100",--2 + "1100000",--3 + "0011001",--4 + "0010010",--5 + "0000010",--6 + "1111000", --7 + "0000000",--8 + "0010000", --9 + "0001000", -- a + "0000011",--b + "1000110",--c + "0100001",--d + "0000110",--e + "0001110" -- f + ); + +begin +data <= sevenSegment_ROM(to_integer(unsigned(address))); + +end Behavioral; diff --git a/Lab9/Lab9.xpr b/Lab9/Lab9.xpr index cea481a..ec19ab9 100644 --- a/Lab9/Lab9.xpr +++ b/Lab9/Lab9.xpr @@ -179,6 +179,13 @@ + + + + + + +