answersLogoWhite

0

UP-DOWN COUNTER

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

use IEEE.STD_LOGIC_ARITH.ALL;

use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity updowncount is

port(reset,c,clk:in std_logic;

s:inout std_logic_vector(3 downto 0));

end updowncount;

architecture Behavioral of updowncount is

begin

process(reset,c,clk,s)

begin

if reset='1' then

s<="0000";

elsif c='1' and rising_edge(clk) then

s<=s+1;

elsif c='0' and rising_edge(clk) then

s<=s-1;

end if;

end process;

end Behavioral;UP-DOWN COUNTER

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

use IEEE.STD_LOGIC_ARITH.ALL;

use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity updowncount is

port(reset,c,clk:in std_logic;

s:inout std_logic_vector(3 downto 0));

end updowncount;

architecture Behavioral of updowncount is

begin

process(reset,c,clk,s)

begin

if reset='1' then

s<="0000";

elsif c='1' and rising_edge(clk) then

s<=s+1;

elsif c='0' and rising_edge(clk) then

s<=s-1;

end if;

end process;

end Behavioral;

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is vhdl code for 2 bit sliced processor?

library ieee;


Vhdl program for a 3 bit ripple counter using flip flops?

library ieee; use ieee.std_logic_1164.all; entity 3bitrc is port(


What is Bit And Bit vector in VHDL programming?

These are predefined words in VHDL standards. Bit indicates that the data type is a bit i. e. 0 or 1. A bit_vector is an array of bits. example: a: in bit; b: in bit_vector(1 downto 0);


What is STD logic in vhdl?

In VHDL, std_logic is a data type. It is assigned to input and / or output variables. It means that the variable is a standard logic type i. e. a logic bit which accepts or provides one bit data, either 1 or 0.


What is the Vhdl code of rake receiver?

vhdl is a hardware definition languega to be run on a dsp. it describes circuits, a logical hardware structure. a rake receiver is a piece of hardware that enables every WCDMA-receiver (e i a mobile working with the umts standard) to handel a cdma-coded bit sequence. i know... cant describe it in an easier way.... ;)


What is 4-bit counter?

it has for bit or states for its output


What is 4 bit counter?

it has for bit or states for its output


No of flip flop in 5 bit ripple counter?

There are five flip-flops in a five-bit ripple counter.


What does watchdog means in terms of technically?

watchdog timer is a 16 bit counter that resets the processor when it rolls over to zero. The processor can reset the counter or turn it off, but, correctly used, it will reset the processor in case of a code crash


What is a 2 bit counter?

a 2 bit counter is a counter which have only 2 bits i.e. the posibble counting states are 00, 01, 10,11,00. It may also be known as MOD 3 counter. It can be realized by using 2 Flip flop.


Designed a sequential circuit that will function as 2 bit-up down counter?

designed a sequential circuit that will function as 2 bit-up down counter


What is the maximum modulus of 3 bit counter?

A 3-bit counter can represent values from 0 to 7, which corresponds to a total of 8 different states (2^3 = 8). Therefore, the maximum modulus of a 3-bit counter is 8. This means the counter will cycle through its states and return to zero after reaching the value of 7.

Trending Questions
Is there a free editing software that would let you cut out part of the middle of the clip like if you had a 20 sec video could you take out 13 to 17 sec so I would have 1 to 12 and 18 to 20 sec? What are the upcoming new businesses in India? What is the purpose of a podcast? Why does your CD track stop playing halfway through the song on both Itunes and Windows Media Player? What is the customs and the protocols of koroneihana? What are some software protocol? My jailbroken ipod touch wont turn on i turned it off after it was being glitchy and went to turn it back on and it showed the apple logo but in 5 sec the lights dimmed and in 20 sec it shut off? Would it be weird if I friended the guy I like on Steam I looked up even though he didn't tell me his Steam name? What does the button abbreviated to 'ctrl' on a computer keyboard stand for? Can any one tell best site for Oracle Apps Technical training? Where do you find your oldest mails in your Gmail? What are the 4 different ways of moving the cursor around the spreadsheet? If you have just downloaded a Microsoft PowerPoint file but you do not have the PowerPoint program installed on your computer? What happens to the data link layer during the encapsulation process? What is a writing format? Why is aim so cool? What is the function of HDMI port? What is difference between ide sata and scsi hard disk? What does a RJ11 cable do for a computer? A fully buffered DIMM uses an advanced buffering technique that makes it possible for servers to support a large number of DIMMs?