Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > interconnecting two same type of components

Reply
Thread Tools

interconnecting two same type of components

 
 
deep
Guest
Posts: n/a
 
      05-27-2004
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




 
Reply With Quote
 
 
 
 
Just an Illusion
Guest
Posts: n/a
 
      06-08-2004
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

 
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
Interconnecting two pbx over CEoIP on Cisco 2610 and 2811 uchapahwa@yahoo.co.uk Cisco 1 12-15-2006 08:26 PM
Interconnecting two pbx over CEoIP hovla Cisco 1 12-02-2006 09:10 PM
interconnecting wifi routers. xor Wireless Networking 1 01-27-2006 05:17 PM
Direct Interconnecting Cisco Asyc swingmonkey@gmail.com Cisco 2 07-28-2005 11:53 PM
Interconnecting Cisco and Alcatel switches Chello Cisco 1 03-02-2004 02:53 AM



Advertisments