answersLogoWhite

0


Best Answer

library IEEE;

use ieee.std_logic_1164.all;

use ieee.std_logic_unsigned.all;

entity counter is

port(Clock, CLR : in std_logic;

Q : out std_logic_vector(3 downto 0));

end counter;

architecture archi of counter is

signal tmp: std_logic_vector(3 downto 0);

begin

process (Clock, CLR)

begin

if (CLR='1') then

tmp <= "0000";

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

tmp <= tmp + 1;

end if;

end process;

Q <= tmp;

end archi;

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is vhdl program for counter in behavioral model?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Other Math
Related questions

What is the basics of VHDL?

VHDL is a hardware description language. You can describe the hardware in three different ways using VHDL. 1. dataflow model 2. behavioral model 3. structural model


What is a vhdl gold model?

Vhdl has got three models - programming styles. 1. data flow model 2. behavioral model 3. structural model.


How to implement XOR gate in behavioral model of VHDL?

basic gates like XOR already exist in VHDL.


Code for square wave generation in VHDL?

implement vhdl code for counter.output of counter pulse is a square wave


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

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


Why function in VHDL?

A function is a subprogram written in VHDL. This program can be called and used in other programs.


What is VHDL program for half adder in behavioral model?

PROGRAM:Library ieee;use ieee.std_logic_1164.all;entity ha1 isport(a,b:in bit;s,c:out bit);end ha1;architecture ha1 of ha1 isbegins


What is meaning of Test Benches in VHDL?

After compiling a hardware description language like VHDL, it is required to apply inputs to the program in order to obtain out puts. Applying the inputs involves initial conditions. As the systems designed using VHDL are electronic, the initial conditions plays a vital role. Hence, all these conditions along with the information as to where the input is expected to change from 1 to 0 or 0 to 1 is provided to the VHDL program. This is done in the form of a wave or another VHDL program. These are called VHDL test benches. In other words, test benches are the means of applying inputs to VHDL program.


What is the VHDL code to implement NAND gate in behavioral model?

Below code can implement NAND gate in VHDL. The code is written in behavioral model. Library ieee; use ieee.std_logic_1164.all; Entity gates is port (a,b : in std_logic; c : out std_logic); end gates ; architecture and1 of gates is begin process(a,b) Begin If (a=1 and b=1) then C&lt;='0'; Else C&lt;= '1'; End if; End process; End and1;


How do you build 8085 using vhdl?

VHDL is a hardware description language. It describes the functionality of a hardware as a program. If we know the architecture of 8085, the same can be implemented or coded using VHDL.


How vhdl is used?

VHDL is a hardware description language. The purpose of any HDL is to represent hardware as a program. We can write a program (code) for any digital circuit using VHDL. With the help of this code, the output of the circuit can be observed before actually designing it physically.


4 Difference between c program and vhdl program?

There are 4 main differences between C programming and VHDL programming. C is a mid-level language, while VHDL is a hardware description language. C can handle one type of instruction, while VHDL can handle two. C does not require as much resource usage as VHDL. C can be written only with logical thinking, but a VHDL programmer must understand hardware circuits.