Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

signal generator

Status
Not open for further replies.

UlfKenneth

Technical User
Joined
Apr 12, 2003
Messages
3
Location
SE
How do I make a signal generator with VHDL?
It should look someting like this.

pulsgenerator.gif


HI: a number of clockpulses
LOW: another number of clockpulses
 
HERE is the CODE for your requirement:

--_________________________________________
architecture rtl of cnt is

signal cnt: integer range 0 to 2;

begin

Process(clk)
begin
if rising_edge(clk) then
if cnt = 2 then
cnt <= 0;
clk2 <= '1';
else
cnt <= cnt + 1;
clk2 <= '0';
end if;
end if;
end process;
end rtl;
 
thanks a lot.. it works great..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top