VHDL code for Counterlibrary IEEE;use IEEE.std_logic_1164.all;use IEEE.numeric_std.all; -- for the unsigned typeentity counter_example isgeneric ( WIDTH : integer := 32);port (CLK, RESET, LOAD : in std_logic;DATA : in unsigned(WIDTH-1 downto 0);Q : out unsigned(WIDTH-1 downto 0));end entity counter_example;architecture counter_example_a of counter_example issignal cnt : unsigned(WIDTH-1 downto 0);beginprocess(RESET, CLK)beginif RESET = '1' thencnt <= (others => '0');elsif rising_edge(CLK) thenif LOAD = '1' thencnt <= DATA;elsecnt <= cnt + 1;end if;end if;end process;Q <= cnt;end architecture counter_example_a;
This blog contains all the information, latest technologies in VLSI and interview questions for freshers
Friday, October 30, 2009
VHDL code for Counter
Subscribe to:
Post Comments (Atom)
Popular Posts
-
http://www.mediafire.com/?n77dan3ovdwyoy3 http://www.mediafire.com/?8ncruxr37o1dbqb http://www.mediafire.com/?jqhvobf6j4gbp6e ...
-
Verilog code for an 8-bit shift-left register with a positive-edge clock, serial in and serial out. module shift (clk, si, so);...
-
Verilog code for a 4-bit unsigned up counter with asynchronous clear. module counter (clk, clr, q); input ...
-
seminar topics with ppts if u need any topics below mail me: bsnspkumar_484@yahoo.co.in Analysis of the Performance of DOA Algorithms in sma...
-
ECE Seminar topics These are the seminar topics based on Electronics and Communications. If u need abstracts of the below seminar topics u c...
-
// memory module `timescale 1ns/1ns module ram(wr_ad,rd_ad,wr_en,rd_en,clk,wr_dat,rd_dat); //parameter addr_width=4; //parameter depth=16; /...
-
Verilog code for single-port RAM in read-first mode. module raminfr (clk, en, we, addr, di, do); input clk; input ...
-
If inverted output of D flip-flop is connected to its input how the flip-flop behaves? Design a circuit to divide input frequency by 2...
-
http://www.mediafire.com/?h1bj9w1bx8kja69 http://www.mediafire.com/?yot1d4b0u344lmc http://www.mediafire.com/?hzqj1m6j91mg9td http://ww...
-
Synthesizeable constructs and VHDL templates VHDL is frequently used for two different goals: simulation of electronic designs and synthesis...
No comments:
Post a Comment