GGRBERRGREV
Clasificado en Inglés
Escrito el en
español con un tamaño de 9,5 KB
library IEEE;
use IEEE.Std_logic_1164.All;
entity ButtonPress_FSM is
port (clk, rst : in std_logic;
bP_state : out std_logic_vector(1 downto 0));
end ButtonPress_FSM;
architecture Behavior of ButtonPress_FSM is
begin
process (clk)
variable BP_state : std_logic_vector(1 downto 0);
variable BP_state_next : BP_state_type;
begin
if rising_edge(clk) then
if rst = '1' then
BP_state <= BP_Init;
else
BP_state <= BP_state_next;
end if;
end if;
case BP_state is
when BP_Init =>
if BP_In1 = '1' then
BP_state_next <= BP_Out1;
elsif BP_In2 = '1' then
BP_state_next <= BP_Out2;
end if;
when BP_Out1 =>
BP_state_next <= BP_Out2;
when BP_Out2 =>
BP_state_next <= BP_Init;
when others =>
BP_state_next <= BP_Init;
end case;
case BP_state is
when BP_Init =>
bP_state <= "00";
when BP_Out1 =>
bP_state <= "01";
when BP_Out2 =>
bP_state <= "10";
when others =>
bP_state <= "11";
end case;
end process;
end Behavior;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity ButtonPress_FSM_Testbench is
end ButtonPress_FSM_Testbench;
architecture Behavior of ButtonPress_FSM_Testbench is
-- Component Declaration ...
constant CLK_PERIOD : time := 20 ns;
signal clk_tb, rst_tb, b_tb, y_tb : std_logic;
begin
ButtonPress_FSM_tb : ButtonPress_FSM
port map (clk_tb, rst_tb, b_tb, y_tb);
-- Generate clock
process begin
clk_tb <= '0';
wait for CLK_PERIOD/2;
clk_tb <= '1';
wait for CLK_PERIOD/2;
end process;
process begin
rst_tb <= '1';
b_tb <= '0';
wait for CLK_PERIOD;
rst_tb <= '0';
wait for CLK_PERIOD;
b_tb <= '1';
wait for CLK_PERIOD;
b_tb <= '0';
wait for CLK_PERIOD;
end process;
end Behavior;
library IEEE;
use IEEE.Std_logic_1164.All;
use IEEE.Numeric_std.All;
entity UnitControl_MFSM is
port (clk, rst : in std_logic;
btn : in std_logic_vector(downto 0);
Y : out std_logic_vector(7 downto 0));
end UnitControl_MFSM;
architecture Behavior of UnitControl_MFSM is
begin
process (clk)
type DC_statetype is (DC_Init, DC_GetInput, DC_Button);
variable DC_state : DC_statetype;
begin
if rising_edge(clk) then
if rst = '1' then
DC_state := DC_Init;
else
-- State transitions
case DC_state is
when DC_Init =>
DC_state := DC_GetInput;
when DC_GetInput =>
if (btn /= "0") then
DC_state := DC_Button;
else
DC_state := DC_GetInput;
end if;
when DC_Button =>
if btn = "0" then
DC_state := DC_Init;
elsif btn /= "0" then
DC_state := DC_Button;
end if;
end case;
end if;
end if;
-- Output logic
case DC_state is
when DC_Init =>
Y <= to_signed(0, 8);
when DC_GetInput =>
Y <= to_signed(1, 8);
when DC_Button =>
Y <= to_signed(2, 8);
when others =>
Y <= to_signed(0, 8);
end case;
end process;
end Behavior;
PLDs (Dispositivos Lógicos Programables):
- Son circuitos integrados reconfigurables para implementar circuitos digitales.
- Principales ventajas: integración de funcionalidad en un solo chip y capacidad de reprogramación.
ROMs:
- Memoria de solo lectura, no se puede modificar su contenido.
- Tipos: ROMs programables por máscara, PROMs (programables por el usuario), EPROMs (borrables con luz UV), EEPROMs (borrables eléctricamente), memorias flash.
PLAs (Arreglos Lógicos Programables):
- Tienen matrices programables de compuertas AND y OR.
- Muy versátiles pero lentas.
PALs (Arreglos Lógicos Programables):
- Caso especial de PLA con matriz AND programable y matriz OR fija.
- Más baratos y fáciles de programar que PLAs.
SPLDs (Dispositivos Lógicos Programables Simples):
- Incluyen PLAs, PALs, GALs (PALs reprogramables) y ROMs.
CPLDs (Dispositivos Lógicos Programables Complejos):
- Equivalentes a múltiples PLDs en un solo chip.
- Consisten en bloques lógicos similares a PALs y una matriz de interconexiones programable.
FPGAs (Arreglos de Puertas Programables en Campo):
- Contienen bloques lógicos idénticos con interconexiones programables.
- Se pueden programar tanto las funciones de los bloques como las interconexiones entre ellos.
- Altamente flexibles y potentes.
Choose the most versatile and slow SPLD when programming. PLA
What was missing in CPLDs that created a need for devices like FPGAs ? All of the above
Which of the following characterize CPLDs ? Easy to design with for State Machines. LUTs
Which SPLD has a programmable AND gate array and a fixed OR array?PAL
Which of the following set of characteristics best matches LUTs. Memory elements that are the basic elements of the device
Which of the following is the best definition for a CPLD ?A device with múltiple PALs in same package with registered outputs and interconnecting programmable fabric
Which one of the following is not a programmable logic device?ROM
FPGA architecture is advantageous over CPLD architecture as it . Has an abundance of flip flops/registers - Scales easily
Field Programable Gate Arrray
FPGAs are primarily made up of Look Up Tables
PLDs (Dispositivos Lógicos Programables):
Son circuitos integrados reconfigurables para implementar circuitos digitales.
Principales ventajas: integración de funcionalidad en un solo chip y capacidad de reprogramación.
ROMs:
Memoria de solo lectura, no se puede modificar su contenido.
Tipos: ROMs programables por máscara, PROMs (programables por el usuario), EPROMs (borrables con luz UV), EEPROMs (borrables eléctricamente), memorias flash.
PLAs (Arreglos Lógicos Programables):
Tienen matrices programables de compuertas AND y OR.
Muy versátiles pero lentas.
PALs (Arreglos Lógicos Programables):
Caso especial de PLA con matriz AND programable y matriz OR fija.
Más baratos y fáciles de programar que PLAs.
SPLDs (Dispositivos Lógicos Programables Simples):
Incluyen PLAs, PALs, GALs (PALs reprogramables) y ROMs.
CPLDs (Dispositivos Lógicos Programables Complejos):
Equivalentes a múltiples PLDs en un solo chip.
Consisten en bloques lógicos similares a PALs y una matriz de interconexiones programable.
FPGAs (Arreglos de Puertas Programables en Campo):
Contienen bloques lógicos idénticos con interconexiones programables.
Se pueden programar tanto las funciones de los bloques como las interconexiones entre ellos.
Altamente flexibles y potentes.
Es un circuito con un comportamiento automático. Un circuito de este tipo realiza una serie de pasos repetitivos, siempre respondiendo de la misma manera ante una secuencia de estímulos en las entradas
A Moore action appears in an FSM's state. In contrast, a Mealy action appears on an FSM's transition.
1.Multi-bit data: 2.Arithmetic expressions: 3.Equality and relational operations: