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

Reply

VHDL - interconnecting two same type of components

 
Thread Tools Search this Thread
Old 05-27-2004, 12:37 PM   #1
Default interconnecting two same type of components


I am trying to design a component that could be used multiple times. For ex
C1 an c2. Now the ports of components are defined as :

component c is(
rst: in std_logic;
clk : in std_logic;
a: inout std_logic;
b: inout std_logic);

...
...
c1: c
port map(
rst=>rst,
clk=>clk,
a=> x, --a is output
b=> y); --b is input

c2: c
port map(
rst=>rst,
clk=>clk,
a=> y, --a is output
b=> x);--a is output


rst and clk are global input signals. "x" and "y" are used as wires
interconnecting modules c1 and c2. "x" works as output of c1 and input of
c2. "y" works as output of c2 and input of c1.c1 works in master mode and
c2 works in slave mode. when asynchronous reset is applied, x is mapped as
high. and then the operation starts subsequently with the logic applied.

my problem is that "x" always remains at undefined level inspite of the
fact that I forced it high when rst='1'. and same happens with "y" though
it is derived after ther is some change on "x".

I am synthesing the code in Xilinx and simulating on Modelsim.
could somebody help me out .

--deep






deep
  Reply With Quote
Old 06-08-2004, 01:37 PM   #2
Just an Illusion
 
Posts: n/a
Default Re: interconnecting two same type of components
Hi deep,

deep wrote:

>I am trying to design a component that could be used multiple times. For ex
>C1 an c2. Now the ports of components are defined as :
>
>component c is(
> rst: in std_logic;
> clk : in std_logic;
> a: inout std_logic;
> b: inout std_logic);
>
>

You must banish usage of 'inout' into a sub-component. Inout are
generally used at top chip level just before implementation of pad cells.

More it miss some select signal to give directionality of the data.

>..
>..
>c1: c
>port map(
> rst=>rst,
> clk=>clk,
> a=> x, --a is output
> b=> y); --b is input
>
>
>c2: c
>port map(
> rst=>rst,
> clk=>clk,
> a=> y, --a is output
> b=> x);--a is output
>
>
>rst and clk are global input signals. "x" and "y" are used as wires
>interconnecting modules c1 and c2. "x" works as output of c1 and input of
>c2. "y" works as output of c2 and input of c1.c1 works in master mode and
>c2 works in slave mode. when asynchronous reset is applied, x is mapped as
>high. and then the operation starts subsequently with the logic applied.
>
>my problem is that "x" always remains at undefined level inspite of the
>fact that I forced it high when rst='1'. and same happens with "y" though
>it is derived after ther is some change on "x".
>
>

Read you implementation comments, in the both cells the 'x' is an
output; you have two sources for the 'x' value, if you use a std_logic
signal you have an undefined state.

For 'y', you must give the code of 'c' component, but I suspect that you
certainly have a sequential process to drive 'y', something like:

process (clk)
if (clk'event and clk=1) then
b <= f(a);
end if;

then event on 'x' doesn't drive event on 'b'

Or see my remark on missing ports.
If you have no logic which give the sens of the 'a' and 'b' value, the
circuit can't resolve the values.

Remember: inside a chip level, all internal signals must be
monodirectional to ensure logic resolution. Take as example a AND gate
where you connect the output as input, that give you a deadlock
situation, if any others inputs go to logical '0'.

JaI



Just an Illusion
  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: expected constructor, destructor or type conversion before '(' token suse Software 0 03-09-2009 03:25 AM
Eclipse - Axis2 - Java Webservices Error amanjsingh Software 1 10-09-2007 09:03 AM
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 Software 0 03-14-2007 10:43 PM
Need Help on a Modelsim VHDL Syntax....ASAP:) kaji Hardware 0 03-14-2007 10:41 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