Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > assigning output to input

Reply
Thread Tools

assigning output to input

 
 
Simone Winkler
Guest
Posts: n/a
 
      08-28-2003
Hello!

I tried to do a RS-flip-flop with nor-gates in VHDL. But i got the following
error message:

Parameter notq of mode out can not be associated with a f
ormal parameter of mode in.


the vhdl code was:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity rs is
Port ( S : in std_logic;
R : in std_logic;
Q : out std_logic;
notQ : out std_logic);
end rs;

architecture Behavioral of rs is

begin
Q <= S nor notQ;
notQ <= R nor Q;
end Behavioral;


....it was just to try the functionality of vhdl......
what can i do to solve this problem?

thanx...


 
Reply With Quote
 
 
 
 
Jonathan Bromley
Guest
Posts: n/a
 
      08-28-2003
"Simone Winkler" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...

> I tried to do a RS-flip-flop with nor-gates in VHDL. But i got the

following
> error message:
>
> Parameter notq of mode out can not be associated with a f
> ormal parameter of mode in.


Sounds like you may have two problems.

First, your code is trying to use the value of an "out" port,
which is illegal in VHDL. You must create an internal signal, use
that internal signal for all the useful work, and then copy it
to the out port(s).

Second, the error message: it sounds as if your testbench for
this module is connecting to the ports inappropriately - or
perhaps it's just a confusing error message.

> library IEEE;
> use IEEE.STD_LOGIC_1164.ALL;
> use IEEE.STD_LOGIC_ARITH.ALL;
> use IEEE.STD_LOGIC_UNSIGNED.ALL;


You don't need arithmetic packages for this code.
Get rid of them.

> entity rs is
> Port ( S : in std_logic;
> R : in std_logic;
> Q : out std_logic;
> notQ : out std_logic);
> end rs;


OK so far.

> architecture Behavioral of rs is
>
> begin
> Q <= S nor notQ; -- Can't do this (notQ is an out port)
> notQ <= R nor Q;
> end Behavioral;


architecture Corrected of rs is
signal Q_int: std_logic;
signal Qbar_int: std_logic;
begin
Q_int <= S nor Qbar_int; -- this is OK
Qbar_int <= R nor Q_int;
-- now get the signals out to the ports:
Q <= Q_int;
notQ <= Qbar_int;
end Corrected;

> ...it was just to try the functionality of vhdl......


OK, but be aware that combinational feedback is always a bad
idea for synthesisable logic.
--

Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * Perl * Tcl/Tk * Verification * Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail: http://www.velocityreviews.com/forums/(E-Mail Removed)
Fax: +44 (0)1425 471573 Web: http://www.doulos.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.



 
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
Assigning methods to objects, and assigning onreadystatechange to an XMLHttpRequest -- an inconsistency? weston Javascript 1 09-22-2006 09:33 AM
Assigning User input to an array IanH Java 17 03-08-2006 09:49 AM
Which is faster in ASIC: 2-input AND gate or a 2-input multiplexer Weng Tianxiang VHDL 12 08-11-2005 10:50 AM
Assigning present state to output. Mohammed A.khader VHDL 1 09-06-2004 12:21 PM
Assigning a CGI output to JavaScript variable. sams Javascript 1 10-12-2003 04:41 PM



Advertisments