Google Groups Home
Help | Sign in
How to run a simulation?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
eoz...@gmail.com  
View profile
 More options Jun 30, 10:02 am
From: eoz...@gmail.com
Date: Mon, 30 Jun 2008 07:02:20 -0700 (PDT)
Local: Mon, Jun 30 2008 10:02 am
Subject: How to run a simulation?
Hi all,
I'm trying to run a simulation but for some reason, something is wrong
there...
I have all my files compiled with no errors (finally).

Now, the simulation gets stuck at my Clock Divider portion. I
configured the input clock to be "clock" (rightclick menu of the
signal at the "Wave" window)
but for some reason, the other signals are not initializing correctly.

Can you tell what am I doing wrong or what have I missed?

Thanks,
Eyal.

the VHDL code is:

library ieee;
use ieee.std_logic_1164.all;

entity ClockDivider is
port(Clk       : in  std_logic;
     ClockDiv2 : out std_logic
     );
end ClockDivider;

architecture ClockDivider_arch of ClockDivider is
signal tempclk : std_logic;
begin
tempclk <= '0';
main : process(Clk)
begin

if (Clk'event and Clk='1') then
   tempclk<=not tempclk;
end if;
ClockDiv2<=tempclk;
end process main;
end ClockDivider_arch;


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian Griffin  
View profile
 More options Jun 30, 11:35 am
From: Brian Griffin <brian...@easystreet.net>
Date: Mon, 30 Jun 2008 08:35:20 -0700
Local: Mon, Jun 30 2008 11:35 am
Subject: Re: [modelsim-pese] How to run a simulation?
Hi Eyal,

The way your model is structure produces a conflict on the tempclk  
signal.  The assignment

     tempclk <= '0';

is providing a constant '0' driver while the main: process is driving  
a different value.  The main: process's driving value is initially  
'U', so the combined resolved value of tempclk will be 'X'.

The simplest solution is to eliminate the tempclk <= '0' assignment  
and instead, initialize the tempclk signal in it's declaration:

     signal tempclk : std_logic := '0';

This will reduce the number of drivers from 2 to 1.

-Brian

On Jun 30, 2008, at 7:02 AM, eoz...@gmail.com wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google