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

Reply

VHDL - Simple VHDL/ModelSim Problem

 
Thread Tools Search this Thread
Old 11-19-2007, 10:03 PM   #1
Red face Simple VHDL/ModelSim Problem


I am using: xilinx 9.2.03i
modelsim xe III 6.2g

My code is for an 8-bit shift adder. When I program my FPGA everything works correctly, now my problem is that I can't get the timing diagram in modelsim to reflect what is happening in real life. I have made the testbench in the xilinx project navigator and then hit "Simulate Behavioral Model".

I've been scouring the internet for an answer but have yet to find anything, any help would be GREATLY appreciated.

Also, sorry for using a bugmenot account I registered earlier today and still haven't recieved a confirmation email.
Code:
library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity Project is port( Clk : in std_logic; datain : in std_logic; dataout : out std_logic_vector(7 downto 0) := "00000000"; SSG : out std_logic_vector(0 to 7); En : out std_logic_vector(3 downto 0)); end Project; architecture Behavioral of Project is signal x : std_logic; signal data : std_logic_vector(7 downto 0) := "00000000"; signal tempclk : std_logic_vector(27 downto 0) := "0000000000000000000000000000"; begin En <= "0111"; process(Clk) begin if Clk='1' and Clk'event then tempclk <= tempclk + "0000000000000000000000000001"; end if; end process; x <= tempclk(26); process(x) begin if x='1' and x'event then dataout(0) <= datain; dataout(1) <= data(0); dataout(2) <= data(1); dataout(3) <= data(2); dataout(4) <= data(3); dataout(5) <= data(4); dataout(6) <= data(5); dataout(7) <= data(6); data(7) <= data(6); data(6) <= data(5); data(5) <= data(4); data(4) <= data(3); data(3) <= data(2); data(2) <= data(1); data(1) <= data(0); data(0) <= datain; end if; case x is when '0' => SSG <= "00000010"; when others => SSG <= "10011110"; end case; end process; end Behavioral;


bugmenotnot

Last edited by bugmenotnot : 04-27-2008 at 12:31 PM.
bugmenotnot is offline   Reply With Quote
Old 11-20-2007, 02:24 AM   #2
bugmenotnot
Junior Member
 
Join Date: Jul 2007
Posts: 23
Default
I figured out what the problem was. If I don't use a tempclk then it works, otherwise I have to wait a LONG time for anything to happen.


bugmenotnot
bugmenotnot 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
simple problem 4098mar General Help Related Topics 0 04-14-2008 12:40 AM
Dial Up Problem smackedass A+ Certification 3 02-02-2007 11:59 PM
Re: Virus Problem ** Help!** David BlandIII A+ Certification 1 03-02-2004 06:00 PM
Re: Serious Computer Problem hootnholler A+ Certification 1 11-24-2003 12:18 PM
Re: Serious Computer Problem Bret A+ Certification 0 11-19-2003 12:51 AM




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