SlideShare a Scribd company logo
qwertyuiopasdfghjklzxcvbnmqwertyui
opasdfghjklzxcvbnmqwertyuiopasdfgh
jklzxcvbnmqwertyuiopasdfghjklzxcvb
nmqwertyuiopasdfghjklzxcvbnmqwer
tyuiopasdfghjklzxcvbnmqwertyuiopas
dfghjklzxcvbnmqwertyuiopasdfghjklzx
cvbnmqwertyuiopasdfghjklzxcvbnmq
wertyuiopasdfghjklzxcvbnmqwertyuio
pasdfghjklzxcvbnmqwertyuiopasdfghj
klzxcvbnmqwertyuiopasdfghjklzxcvbn
mqwertyuiopasdfghjklzxcvbnmqwerty
uiopasdfghjklzxcvbnmqwertyuiopasdf
ghjklzxcvbnmqwertyuiopasdfghjklzxc
vbnmqwertyuiopasdfghjklzxcvbnmrty
uiopasdfghjklzxcvbnmqwertyuiopasdf
ghjklzxcvbnmqwertyuiopasdfghjklzxc
Universidad Autónoma de Baja
California
ECITEC Valle de las Palmas
Ingeniería en Electrónica
Diseño Digital a Alta Escala
Reporte Practica 2
Marcos Marcos Fernando
5 Octubre del 2015
Planteamiento del problema
Diseñar un sistema de multiplex ión en el tiempo que controle 4 displays enrutando 4
señales a una salida.
Diseñe un circuito de incremento unitario de 8 bits, como se observa en el siguiente
diagrama de la figura 1, y que muestre su salida en los 4 displays del tablero Nexys 2.
Figura 1.
DESARROLLO
Se inicio desarrollando cada uno de los programas necesarios para crear el
programa final (conjunto de programas o instancias).
Incrementador unitario de 8 bits
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
entity incremento_unitario_8bits is
generic(N:integer:=8);
PORT( sw1: in STD_LOGIC_VECTOR(N-1 downto 0);
swout: out STD_LOGIC_VECTOR(N-1 downto 0)
);
end incremento_unitario_8bits;
architecture Behavioral of incremento_unitario_8bits is
begin
swout <= std_logic_vector(unsigned(sw1) + 1);
end Behavioral;
Convertidor Hexadecimal a siente segmentos
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity PRACTICA2_02 is
port( hex: in std_logic_vector(3 downto 0);
-- dp1: in std_logic;
sseg: out std_logic_vector(7 downto 0)
end PRACTICA2_02;
architecture Behavioral of PRACTICA2_02 is
begin
process(hex)
begin
case hex is
when "0000" =>
sseg(6 downto 0) <= "0000001"; --0
when "0001" =>
sseg(6 downto 0) <= "1001111"; --1
when "0010" =>
sseg(6 downto 0) <= "0010010"; --2
when "0011" =>
sseg(6 downto 0) <= "0000110"; --3
when "0100" =>
sseg(6 downto 0) <= "1001100"; --4
when "0101" =>
sseg(6 downto 0) <= "0100100"; --5
when "0110" =>
sseg(6 downto 0) <= "0100000"; --6
when "0111" =>
sseg(6 downto 0) <= "0001111"; --7
when "1000" =>
sseg(6 downto 0) <= "0000000"; --8
when "1001" =>
sseg(6 downto 0) <= "0000100"; --9
when "1010" =>
sseg(6 downto 0) <= "0001000"; --A
when "1011" =>
sseg(6 downto 0) <= "1100000"; --b
when "1100" =>
sseg(6 downto 0) <= "0110001"; --C
when "1101" =>
sseg(6 downto 0) <= "1000010"; --d
when "1110" =>
sseg(6 downto 0) <= "0110000"; --E
when others =>
sseg(6 downto 0) <= "1111110"; --F
end case;
end process;
sseg(7) <= dp1;
end Behavioral;
Multiplexor de displays en el tiempo
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
entity mux4display is
Generic(N:integer:=8);
PORT( in1,in2,in3,in4: in STD_LOGIC_VECTOR(N-1 downto 0);
clk,rst1: in STD_LOGIC;
sseg1: out STD_LOGIC_VECTOR(N-1 downto 0);
an: out STD_LOGIC_VECTOR(3 downto 0)
);
end mux4display;
architecture Behavioral of mux4display is
CONSTANT N1:integer:=18;
signal count1,count: unsigned(N1-1 downto 0);
signal sel: std_logic_vector(1 downto 0);
signal s1: std_logic_vector(3 downto 0);
begin
process(clk,rst1)
begin
if(rst1 = '1') then
count1 <= (others => '0');
--sseg1 <= "11111111";
an <= "1111";
elsif(clk'event and clk = '1') then
count1 <= count;
an <= s1;
end if;
end process;
count <= count1 + 1;
sel <= STD_LOGIC_VECTOR(count1(N-1 downto N-2));
process(in1,in2,in3,in4,sel)
begin
case sel is
when "00" =>
sseg1 <= in1;
s1 <= "1110";
when "01" =>
sseg1 <= in2;
s1 <= "1101";
when "10" =>
sseg1 <= in3;
s1 <= "1011";
when others =>
sseg1 <= in4;
s1 <= "0111";
end case;
end process;
end Behavioral;
Realizados los programas necesario, ahora solo falta hacer el programa de mayor
jerarquía, el cual contendrá las instancias de cada uno de los tres programa anterior, en esta parte
lo único que se realiza es la asignación de señales entre cada instancia, el programa realizado es el
siguiente.
library IEEE;
use IEEE.STD_LOGIC_1164.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 primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity sistem_mux4display_time is
PORT( sw: in STD_LOGIC_VECTOR(7 downto 0);
clk,rst,dp: in STD_LOGIC;
sseg_out: out STD_LOGIC_VECTOR(7 downto 0);
an_out: out STD_LOGIC_VECTOR(3 downto 0)
);
end sistem_mux4display_time;
architecture Behavioral of sistem_mux4display_time is
signal swin,disp1,disp2,disp3,disp4: STD_LOGIC_VECTOR(7 downto 0);
begin
--INSTANCIA SUMADOR UNITARIO DE 8 BITS
sum: entity work.incremento_unitario_8bits(Behavioral)
PORT MAP(sw1 => sw, swout => swin);
--INSTANCIA HEX_TO_SEG1
hex_to_sseg1: entity work.PRACTICA2_02(Behavioral)
PORT MAP(hex => sw(7 downto 4), sseg => disp1, dp1 => dp);
--INSTANCIA HEX_TO_SEG2
hex_to_sseg2: entity work.PRACTICA2_02(Behavioral)
PORT MAP(hex => sw(3 downto 0), sseg => disp2, dp1 => dp);
--INSTANCIA HEX_TO_SEG1
hex_to_sseg3: entity work.PRACTICA2_02(Behavioral)
PORT MAP(hex => swin(7 downto 4), sseg => disp3, dp1 => dp);
--INSTANCIA HEX_TO_SEG1
hex_to_sseg4: entity work.PRACTICA2_02(Behavioral)
PORT MAP(hex => swin(3 downto 0), sseg => disp4, dp1 => dp);
--INTANCIA MULTIPLEXOR DE DISPLAYS
disp_mux: entity work.mux4display(Behavioral)
PORT MAP(in1 => disp1, in2 => disp2, in3 => disp3, in4 => disp4, clk => clk, rst1 => rst,
sseg1 => sseg_out, an => an_out);
end Behavioral;
El esquemático RTL es el siguiente.
Figura 2.
Asignación de pines en PlanAhead
Figura 3.
Evidencia de Funcionamiento
Figura 4.
Figura 5.

More Related Content

PPTX
Os Practical Assignment 1
PDF
Advanced QUnit - Front-End JavaScript Unit Testing
PDF
The Ring programming language version 1.10 book - Part 16 of 212
PDF
José Selvi - Historia de un CryptoFAIL [rootedvlc4]
PDF
OpenSPARC
DOCX
Lampiran 1.programdocx
PDF
CROCHET - Checkpoint Rollback in JVM (ECOOP 2018)
PDF
主機自保指南
Os Practical Assignment 1
Advanced QUnit - Front-End JavaScript Unit Testing
The Ring programming language version 1.10 book - Part 16 of 212
José Selvi - Historia de un CryptoFAIL [rootedvlc4]
OpenSPARC
Lampiran 1.programdocx
CROCHET - Checkpoint Rollback in JVM (ECOOP 2018)
主機自保指南

What's hot (20)

PDF
Verifikation - Metoder og Libraries
PDF
Crash Fast & Furious
DOCX
Percobaan 1
PDF
Kernel Recipes 2016 - Why you need a test strategy for your kernel development
PDF
Comunicação Android Arduino - JASI 2015
DOCX
Direct analog
PDF
Inspector - Node.js : Notes
ODP
Fpga creating counter with external clock
PDF
Unit Testing: Special Cases
PDF
Tomáš Čorej: Configuration management & CFEngine3
PDF
Capture and replay hardware behaviour for regression testing and bug reporting
PDF
Digital to analog -Sqaure waveform generator in VHDL
TXT
Sine Wave Generator with controllable frequency displayed on a seven segment ...
PDF
Coroutines in Kotlin. UA Mobile 2017.
PDF
Javascript: The Important Bits
PDF
Controlling Technical Debt with Continuous Delivery
PPT
E-Commerce Security - Application attacks - Server Attacks
DOCX
Vend with ff
PPT
Tool sdl2pml
PDF
The Ring programming language version 1.10 book - Part 68 of 212
Verifikation - Metoder og Libraries
Crash Fast & Furious
Percobaan 1
Kernel Recipes 2016 - Why you need a test strategy for your kernel development
Comunicação Android Arduino - JASI 2015
Direct analog
Inspector - Node.js : Notes
Fpga creating counter with external clock
Unit Testing: Special Cases
Tomáš Čorej: Configuration management & CFEngine3
Capture and replay hardware behaviour for regression testing and bug reporting
Digital to analog -Sqaure waveform generator in VHDL
Sine Wave Generator with controllable frequency displayed on a seven segment ...
Coroutines in Kotlin. UA Mobile 2017.
Javascript: The Important Bits
Controlling Technical Debt with Continuous Delivery
E-Commerce Security - Application attacks - Server Attacks
Vend with ff
Tool sdl2pml
The Ring programming language version 1.10 book - Part 68 of 212
Ad

Viewers also liked (20)

PDF
บทที่3 SVM (support vector machine) นายวิศวะ เลาห์กิติกูล_3301
PDF
зубаревич тольятти-окт2015
PDF
6 LinkedIn Mistakes in 60 Seconds
PPTX
Presentación2
PDF
JOEY - Investor Presentation
PPTX
Tecnología multimedia isaac
PPTX
Goal Setting
PPTX
Getting Smart, Not Big, With Data
RTF
JeffRowe 2PG
PDF
Simbolos cristales piezoelectricos osciladores
PPTX
Webinar - Microsoft Office 2016 for Mac - 2015-10-22
PPTX
PPTX
CHM 491 Senior Seminar
PPTX
Портфоліо Булгакова
PDF
Utah - Republican Presidential Caucus 2016
PPTX
Tecnologia educativa como disciplina pedagogica
PDF
Mobile UA 2.0: Three trends in Mobile Marketing for 2016 and Beyond
PPT
Relative permeability presentation
PPT
planificacion del mantenimiento
บทที่3 SVM (support vector machine) นายวิศวะ เลาห์กิติกูล_3301
зубаревич тольятти-окт2015
6 LinkedIn Mistakes in 60 Seconds
Presentación2
JOEY - Investor Presentation
Tecnología multimedia isaac
Goal Setting
Getting Smart, Not Big, With Data
JeffRowe 2PG
Simbolos cristales piezoelectricos osciladores
Webinar - Microsoft Office 2016 for Mac - 2015-10-22
CHM 491 Senior Seminar
Портфоліо Булгакова
Utah - Republican Presidential Caucus 2016
Tecnologia educativa como disciplina pedagogica
Mobile UA 2.0: Three trends in Mobile Marketing for 2016 and Beyond
Relative permeability presentation
planificacion del mantenimiento
Ad

Similar to DDAA FPGA - Multiplexor De Numeros en Display 7 Segmentos En Tiempo (20)

PPTX
MULTIPLEXER_DICA UNIT III-III.pptx
DOC
Vhdlbputspdas
PPT
ME- applied electronics Vlsi UNIT IV.ppt
PPTX
PPTX
2.4 MUXs & DEMUXs: multiplexers and demultiplexers.pptx
PPTX
VLSI_UNIT_4 _PPT.pptx
DOCX
4 bit uni shift reg
PDF
FPGA_Logic.pdf
PDF
eel6935_ch2.pdf
PPT
Digital Design for B.Tech. / B.Sc.
PPT
Chapter 4 the processor
DOC
VLSI Experiments I
PPT
Introduction to Asic Design and VLSI Design
PPTX
MULTIPLEXER
PDF
10 multiplexers-de mux
PPT
Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...
PDF
logic.deghjkl;jldddghbmedgygshedgyssfjfheueh
PPTX
module-4_sent to students computer organization.pptx
PPTX
6. Combinational Logic with MSI and LSI_1682052077241 (1).pptx
MULTIPLEXER_DICA UNIT III-III.pptx
Vhdlbputspdas
ME- applied electronics Vlsi UNIT IV.ppt
2.4 MUXs & DEMUXs: multiplexers and demultiplexers.pptx
VLSI_UNIT_4 _PPT.pptx
4 bit uni shift reg
FPGA_Logic.pdf
eel6935_ch2.pdf
Digital Design for B.Tech. / B.Sc.
Chapter 4 the processor
VLSI Experiments I
Introduction to Asic Design and VLSI Design
MULTIPLEXER
10 multiplexers-de mux
Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...
logic.deghjkl;jldddghbmedgygshedgyssfjfheueh
module-4_sent to students computer organization.pptx
6. Combinational Logic with MSI and LSI_1682052077241 (1).pptx

More from Fernando Marcos Marcos (20)

DOCX
LECTOR DE TEMPERATURA CON LM35 Y MULTIPLEXOR DE DISPLAY DE 7 SEGMENTOS CON AR...
DOCX
Multiplexor Display de 7 Segmentos con Arduino UNO ATmega328P
DOCX
CONTADOR BINARIO ASCENDENTE-DESCENDENTE DE 14 BITS CON ARDUINO
DOCX
CONTADOR BINARIO DESCENDENTE DE 14 BITS CON ARDUINO
DOCX
CONTADOR BINARIO ASCENDENTE DE 14 BITS CON ARDUINO
DOCX
CONTADOR BINARIO DESCENDENTE DE 8 BITS CON ARDUINO
DOCX
CONTADOR BINARIO ASCENDENTE DE 8 BITS CON ARDUINO
DOCX
MATRIZ LED 4x10 CON ARDUINO - ATMEGA328P
DOCX
GENERADOR DE SEÑALES CON LM741 - SIGNAL GENERATOR
DOCX
DISEÑO DE UN DETECTOR DE VELOCIDAD CON ARDUINO
PDF
DISEÑO DE PCB CON MODULO DE TRANSMISIÓN Y RECEPCIÓN RN41
PDF
DISEÑO Y DESARROLLO DE UNA PLACA PCB CON ATMEGA 328
DOCX
DISEÑO DEL JUEGO PING PONG EN FPGA - VHDL - VGA
DOCX
APLICACIONES DE FOURIER
DOCX
APLICACIONES DE LAPLACE
DOCX
CONTROL AUTOMATICO DE GANANCIA (AGC)
DOCX
PLL (OSCILADOR POR CAMBIO DE FASE) - PHASE SHIFT OSCILLATOR
DOCX
USO DEL TRANSISTOR COMO SWITCH - TRANSISTOR EN CORTE Y EN SATURACION - TRANSI...
PDF
SISTEMA DE CONTROL Y MONITOREO DE HUMEDAD EN LOMBRICOMPOSTA - HUMIDITY MONITO...
DOC
DISEÑO ANALOGICO Y ELECTRONICA - ADC - CONVERTIDOR ANALÓGICO DIGITAL - ANALOG...
LECTOR DE TEMPERATURA CON LM35 Y MULTIPLEXOR DE DISPLAY DE 7 SEGMENTOS CON AR...
Multiplexor Display de 7 Segmentos con Arduino UNO ATmega328P
CONTADOR BINARIO ASCENDENTE-DESCENDENTE DE 14 BITS CON ARDUINO
CONTADOR BINARIO DESCENDENTE DE 14 BITS CON ARDUINO
CONTADOR BINARIO ASCENDENTE DE 14 BITS CON ARDUINO
CONTADOR BINARIO DESCENDENTE DE 8 BITS CON ARDUINO
CONTADOR BINARIO ASCENDENTE DE 8 BITS CON ARDUINO
MATRIZ LED 4x10 CON ARDUINO - ATMEGA328P
GENERADOR DE SEÑALES CON LM741 - SIGNAL GENERATOR
DISEÑO DE UN DETECTOR DE VELOCIDAD CON ARDUINO
DISEÑO DE PCB CON MODULO DE TRANSMISIÓN Y RECEPCIÓN RN41
DISEÑO Y DESARROLLO DE UNA PLACA PCB CON ATMEGA 328
DISEÑO DEL JUEGO PING PONG EN FPGA - VHDL - VGA
APLICACIONES DE FOURIER
APLICACIONES DE LAPLACE
CONTROL AUTOMATICO DE GANANCIA (AGC)
PLL (OSCILADOR POR CAMBIO DE FASE) - PHASE SHIFT OSCILLATOR
USO DEL TRANSISTOR COMO SWITCH - TRANSISTOR EN CORTE Y EN SATURACION - TRANSI...
SISTEMA DE CONTROL Y MONITOREO DE HUMEDAD EN LOMBRICOMPOSTA - HUMIDITY MONITO...
DISEÑO ANALOGICO Y ELECTRONICA - ADC - CONVERTIDOR ANALÓGICO DIGITAL - ANALOG...

Recently uploaded (20)

PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Artificial Intelligence
PPTX
Construction Project Organization Group 2.pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PPT
Mechanical Engineering MATERIALS Selection
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Safety Seminar civil to be ensured for safe working.
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Sustainable Sites - Green Building Construction
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
composite construction of structures.pdf
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPT
Project quality management in manufacturing
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Artificial Intelligence
Construction Project Organization Group 2.pptx
Foundation to blockchain - A guide to Blockchain Tech
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
Mechanical Engineering MATERIALS Selection
Operating System & Kernel Study Guide-1 - converted.pdf
Safety Seminar civil to be ensured for safe working.
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Embodied AI: Ushering in the Next Era of Intelligent Systems
Sustainable Sites - Green Building Construction
Internet of Things (IOT) - A guide to understanding
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
composite construction of structures.pdf
CH1 Production IntroductoryConcepts.pptx
Model Code of Practice - Construction Work - 21102022 .pdf
Project quality management in manufacturing
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026

DDAA FPGA - Multiplexor De Numeros en Display 7 Segmentos En Tiempo

  • 2. Planteamiento del problema Diseñar un sistema de multiplex ión en el tiempo que controle 4 displays enrutando 4 señales a una salida. Diseñe un circuito de incremento unitario de 8 bits, como se observa en el siguiente diagrama de la figura 1, y que muestre su salida en los 4 displays del tablero Nexys 2. Figura 1.
  • 3. DESARROLLO Se inicio desarrollando cada uno de los programas necesarios para crear el programa final (conjunto de programas o instancias). Incrementador unitario de 8 bits library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.ALL; entity incremento_unitario_8bits is generic(N:integer:=8); PORT( sw1: in STD_LOGIC_VECTOR(N-1 downto 0); swout: out STD_LOGIC_VECTOR(N-1 downto 0) ); end incremento_unitario_8bits; architecture Behavioral of incremento_unitario_8bits is begin swout <= std_logic_vector(unsigned(sw1) + 1); end Behavioral; Convertidor Hexadecimal a siente segmentos library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity PRACTICA2_02 is port( hex: in std_logic_vector(3 downto 0); -- dp1: in std_logic; sseg: out std_logic_vector(7 downto 0) end PRACTICA2_02; architecture Behavioral of PRACTICA2_02 is begin process(hex) begin case hex is when "0000" => sseg(6 downto 0) <= "0000001"; --0 when "0001" => sseg(6 downto 0) <= "1001111"; --1 when "0010" => sseg(6 downto 0) <= "0010010"; --2 when "0011" => sseg(6 downto 0) <= "0000110"; --3 when "0100" => sseg(6 downto 0) <= "1001100"; --4 when "0101" =>
  • 4. sseg(6 downto 0) <= "0100100"; --5 when "0110" => sseg(6 downto 0) <= "0100000"; --6 when "0111" => sseg(6 downto 0) <= "0001111"; --7 when "1000" => sseg(6 downto 0) <= "0000000"; --8 when "1001" => sseg(6 downto 0) <= "0000100"; --9 when "1010" => sseg(6 downto 0) <= "0001000"; --A when "1011" => sseg(6 downto 0) <= "1100000"; --b when "1100" => sseg(6 downto 0) <= "0110001"; --C when "1101" => sseg(6 downto 0) <= "1000010"; --d when "1110" => sseg(6 downto 0) <= "0110000"; --E when others => sseg(6 downto 0) <= "1111110"; --F end case; end process; sseg(7) <= dp1; end Behavioral; Multiplexor de displays en el tiempo library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.ALL; entity mux4display is Generic(N:integer:=8); PORT( in1,in2,in3,in4: in STD_LOGIC_VECTOR(N-1 downto 0); clk,rst1: in STD_LOGIC; sseg1: out STD_LOGIC_VECTOR(N-1 downto 0); an: out STD_LOGIC_VECTOR(3 downto 0) ); end mux4display; architecture Behavioral of mux4display is CONSTANT N1:integer:=18; signal count1,count: unsigned(N1-1 downto 0); signal sel: std_logic_vector(1 downto 0); signal s1: std_logic_vector(3 downto 0); begin process(clk,rst1) begin if(rst1 = '1') then
  • 5. count1 <= (others => '0'); --sseg1 <= "11111111"; an <= "1111"; elsif(clk'event and clk = '1') then count1 <= count; an <= s1; end if; end process; count <= count1 + 1; sel <= STD_LOGIC_VECTOR(count1(N-1 downto N-2)); process(in1,in2,in3,in4,sel) begin case sel is when "00" => sseg1 <= in1; s1 <= "1110"; when "01" => sseg1 <= in2; s1 <= "1101"; when "10" => sseg1 <= in3; s1 <= "1011"; when others => sseg1 <= in4; s1 <= "0111"; end case; end process; end Behavioral; Realizados los programas necesario, ahora solo falta hacer el programa de mayor jerarquía, el cual contendrá las instancias de cada uno de los tres programa anterior, en esta parte lo único que se realiza es la asignación de señales entre cada instancia, el programa realizado es el siguiente. library IEEE; use IEEE.STD_LOGIC_1164.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 primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity sistem_mux4display_time is PORT( sw: in STD_LOGIC_VECTOR(7 downto 0); clk,rst,dp: in STD_LOGIC; sseg_out: out STD_LOGIC_VECTOR(7 downto 0); an_out: out STD_LOGIC_VECTOR(3 downto 0) );
  • 6. end sistem_mux4display_time; architecture Behavioral of sistem_mux4display_time is signal swin,disp1,disp2,disp3,disp4: STD_LOGIC_VECTOR(7 downto 0); begin --INSTANCIA SUMADOR UNITARIO DE 8 BITS sum: entity work.incremento_unitario_8bits(Behavioral) PORT MAP(sw1 => sw, swout => swin); --INSTANCIA HEX_TO_SEG1 hex_to_sseg1: entity work.PRACTICA2_02(Behavioral) PORT MAP(hex => sw(7 downto 4), sseg => disp1, dp1 => dp); --INSTANCIA HEX_TO_SEG2 hex_to_sseg2: entity work.PRACTICA2_02(Behavioral) PORT MAP(hex => sw(3 downto 0), sseg => disp2, dp1 => dp); --INSTANCIA HEX_TO_SEG1 hex_to_sseg3: entity work.PRACTICA2_02(Behavioral) PORT MAP(hex => swin(7 downto 4), sseg => disp3, dp1 => dp); --INSTANCIA HEX_TO_SEG1 hex_to_sseg4: entity work.PRACTICA2_02(Behavioral) PORT MAP(hex => swin(3 downto 0), sseg => disp4, dp1 => dp); --INTANCIA MULTIPLEXOR DE DISPLAYS disp_mux: entity work.mux4display(Behavioral) PORT MAP(in1 => disp1, in2 => disp2, in3 => disp3, in4 => disp4, clk => clk, rst1 => rst, sseg1 => sseg_out, an => an_out); end Behavioral; El esquemático RTL es el siguiente. Figura 2.
  • 7. Asignación de pines en PlanAhead Figura 3. Evidencia de Funcionamiento Figura 4. Figura 5.