Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Glitches in Modelsim

 
Thread Tools Search this Thread
Old 12-14-2007, 11:11 PM   #1
Question Glitches in Modelsim


Hi all,

I'm having trouble trying to figure out why this VHDL synthesizes to something which generates glitches when post-route simulated in Modelsim.

Regardless of what I do, I always get tons of warnings from VitalGlitch in Modelsim about glitches on slices involving "count". I am using Precision to synthesize. These tools are all part of Lattice ispLever v7.0. The clock is 1MHz. This is supposed to be a simple divide by 100 counter.

I don't actually see any glitches as written. However, if I remove the range restriction on count, I do see some glitches (this is all in sim...I have not checked for glitches in the actual HW).

Please help!

Thanks,

Sean


Here's the code:

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

entity Tester is
PORT (

CLK: IN std_logic;
RESET: IN std_logic;
CS: IN std_logic;
OUTP: OUT std_logic;
QA0_d: OUT std_logic;
QA1_d: OUT std_logic);
end;

architecture RTL of Tester is

COMPONENT clock IS --Divides 1MHz clock down to 10KHz
PORT (
--Inputs
CLK1M: IN std_logic; --1MHz clock
RESET: IN std_logic; --Active Low
--Outputs
CLK10K: OUT std_logic); --10KHz clock
END COMPONENT;
begin
div: clock PORT MAP (
CLK1M => CLK,
RESET => RESET,
CLK10K => OUTP);
QA0_d <= '0';
QA1_d <= '0';
end RTL;



Now the code for the module clock:

LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_unsigned.ALL;
USE ieee.std_logic_arith.ALL;

ENTITY clock IS
PORT (
--Inputs
CLK1M: IN std_logic; --1MHz clock
RESET: IN std_logic; --Active Low
--Outputs
CLK10K: OUT std_logic); --10KHz clock
END clock;

ARCHITECTURE Behavioral OF clock IS
BEGIN
PROCESS(CLK1M, RESET)
variable count: integer range 0 to 255;
BEGIN
IF RESET='0' THEN
count := 0;
CLK10K <= '0';
ELSIF rising_edge(CLK1M) THEN
count := (count+1);
IF count = 51 then
clk10k <= '1';
elsif count = 100 then
count := 0;
clk10k <='0';
else null;
end if;
END IF;
END PROCESS;
END Behavioral;


sbreheny
sbreheny is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in Modelsim 6.0a boitsas Software 1 10-26-2009 05:36 AM
simprim problems on modelsim saiyijinprince Hardware 2 04-05-2007 02:24 PM
Need help on Modelsim VHDL syntax? ASAP:) kaji General Help Related Topics 0 03-14-2007 10:43 PM
Need Help on a Modelsim VHDL Syntax....ASAP:) kaji Hardware 0 03-14-2007 10:41 PM
Anyone else notice any glitches in the Sports Night set? Video Flyer DVD Video 1 01-19-2004 06:15 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46