library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity encoder is
Port ( CLK : in STD_LOGIC;
RES : in STD_LOGIC;
C_OUT : out STD_LOGIC_vector(9 downto 0));
end encoder;
architecture Behavioral of encoder is
signal SI_OUT : std_logic_vector(9 downto 0);
begin
process (CLK, RES)
begin
if (RES = '0') then
SI_OUT <= "0000000001";
elsif rising_edge(CLK) then
SI_OUT(1) <= SI_OUT(0);
SI_OUT(2) <= SI_OUT(1);
SI_OUT(3) <= SI_OUT(2);
SI_OUT(4) <= SI_OUT(3);
SI_OUT(5) <= SI_OUT(4);
SI_OUT(6) <= SI_OUT(5);
SI_OUT(7) <= SI_OUT(6);
SI_OUT(8) <= SI_OUT(7);
SI_OUT(9) <= SI_OUT(8);
SI_OUT(0) <= SI_OUT(9);
C_OUT <= SI_OUT;end if;
end process;
end Behavioral;
-----sorry im in the lab right now. i wanted to save this file but i didnt bring my thumb drive. so i put it here. just ignore it.
xc3s100 keyboard encoder using vhdl.
Tuesday, May 6, 2008Posted by Asyraf Adlan at 10:55 PM
Subscribe to:
Post Comments (Atom)
About Me
- Asyraf Adlan
- born in kl, live in shah alam, studying in perth, loves music, family type of a person, a shy guy, very taken very not available heeee :D
Blog Archive
-
▼
2008
(129)
-
▼
May
(30)
- half man half tree
- last week of uni.
- P. Pinang haramkan Islam hadhari
- Hassan: S'gor haramkan Islam hadhari
- kawan yg penyanyang
- Lying to forget
- Political crisis in UMNO Club of Western Australia.
- interviewed by NST
- no joy for lina.
- phase shifter
- Karpal gets death threat, live bullet
- Great power comes great responsibility.
- home home
- free flight!
- While I was away...
- WHAT IF....
- Debate with a 10 yrs old Erin
- "Dinner of the year" - Mael
- Market Place
- Patience, Lisz-san
- sad but true
- hamster powered pc
- List of bands that im going to see this semester.
- tiger lily
- Dream Girl
- Restless
- Just when u thought that u're ok...
- xc3s100 keyboard encoder using vhdl.
- close enough
- LIVE LIFE TO THE FULLEST!
-
▼
May
(30)
0 comments:
Post a Comment