Home - Rasfoiesc.com
Educatie Sanatate Inginerie Business Familie Hobby Legal
Satisfactia de a face ce iti place. tutorial, lectii online, solutii simple, exmeple, programe, C++

Biologie Chimie Didactica Fizica Geografie Informatica
Istorie Literatura Matematica Psihologie

C


Index » educatie » » informatica » C
Registru de deplasare cu functii extinse - codul


Registru de deplasare cu functii extinse - codul


Registru de deplasare cu functii extinse

Codul

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

use IEEE.STD_LOGIC_ARITH.ALL;

use IEEE.STD_LOGIC_UNSIGNED.ALL;

---- Uncomment the following library declaration if instantiating

---- any Xilinx primitives in this code.

--library UNISIM;

--use UNISIM.VComponents.all;

entity shift_reg is

port (CLK, CLR, RIN, LIN: in STD_LOGIC;

S: in std_logic_vector (2 downto 0 ) ;

D: in std_logic_vector ( 7 downto 0) ;

Q: buffer std_logic_vector(7 downto 0));

end shift_reg;

architecture schift_reg_arch of shift_reg is

signal IQ: STD_LOGIC_VECTOR (7 downto 0);

begin

process (CLK, CLR, IQ)

begin

if (CLR = '1') then IQ <= (others => '0');

elsif (CLK'event and CLK = '1') then

case CONV_INTEGER (S) is

when 0 => null;

when 1 => IQ <= D;

when 2 => IQ <= RIN & IQ(7 downto 1);

when 3 => IQ <= IQ( 6 downto 0) & LIN;

when 4 => IQ <= Q(0) & IQ (7 downto 1);

when 5 => IQ <= IQ (6 downto 0) & Q(7);

when 6 => IQ <= Q(7) & IQ (7 downto 1);

when 7 => IQ <= IQ (6 downto 0) & '0';

when others => null;

end case;

end if;

Q <= IQ;

end process;

end architecture;

Afisarea rezultatelor simularii







Politica de confidentialitate
C


Access
Adobe photoshop
Autocad
Baze de date
C
Calculatoare
Corel draw
Excel
Foxpro
Html
Internet
Java
Linux
Mathcad
Matlab
Outlook
Pascal
Php
Powerpoint
Retele calculatoare
Sql
Windows
Word

Supraincarcarea constructorilor
Constructori
CLASE
OPERATOR SUPRAINCARCAT
Pointeri la clase
Multiple instante pentru aceeasi clasa
Registru de deplasare cu functii extinse - codul
FUNCTII PENTRU GESTIONAREA TIMPULUI ALE MEDIULUI C++ BUILDER
Decodificator - cod sursa
DECLARATII SI CONSTANTE















 
Copyright © 2019 - Toate drepturile rezervate