Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Assignment problem

Reply
Thread Tools

Assignment problem

 
 
Thomas Reinemann
Guest
Posts: n/a
 
      11-10-2004
Hello,

I run in trouble at an assignment within a process.
This entity is instanced twice. Within one instance T_I_reg is assigned the
value delayed by one rising edge, as expected. But within the other
instance the value is assigned immediately.
I'm using Modelsim 5.8c. Further more it says that the assignment line is
not executable.

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity forwarder is

port (
T_I, slot_data, slot_control : in std_logic;
reset, clk : in std_logic;
T_O : out std_logic);

end forwarder;


architecture rtl of forwarder is
signal T_I_reg : std_logic;
begin -- rtl

T_O <= slot_data when reset = '0' and slot_control = '1' else T_I_reg;

forward: process (clk)
begin -- process forward
if rising_edge(clk) then -- rising clock edge
T_I_reg <= T_I; -- _TROUBLE HERE_
end if;
end process forward;

end rtl;


Bye Tom.

 
Reply With Quote
 
 
 
 
Mike Treseler
Guest
Posts: n/a
 
      11-10-2004
Thomas Reinemann wrote:

> I run in trouble at an assignment within a process.
> This entity is instanced twice. Within one instance T_I_reg is assigned the
> value delayed by one rising edge, as expected. But within the other
> instance the value is assigned immediately.


What happens if you synch it up like this?

-- T_O <= slot_data when reset = '0'
-- and slot_control = '1' else T_I_reg;
-- (deleted)

forward: process (clk)
begin -- process forward
if rising_edge(clk) then -- rising clock edge
if reset = '0' and slot_control = '1' then
T_O <= slot_data;
else
T_I_reg <= T_I;
end if;
end if;
end process forward;

end rtl;

-- Mike Treseler
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assignment operator self-assignment check Chris C++ 34 09-26-2006 04:26 AM
Augument assignment versus regular assignment nagy Python 36 07-20-2006 07:24 PM
Nested Lists Assignment Problem Licheng Fang Python 7 04-26-2006 05:29 PM
JAVA CODE - Assignment problem dinesh Java 8 07-13-2004 07:48 PM
C++: Array assignment problem Newsnet Customer C++ 11 08-27-2003 11:38 AM



Advertisments
 



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 47 48 49 50 51 52 53 54 55 56 57