module xyz(a,b,c)
inout a,b,c;
trireg a,b,c;
always
begin
a <= #2 0;
b <= #2 0;
c <= #2 0;
end
Can we assign a trireg variable in the above mentioned way.Verilog XL
is givin me an error saying that Illegal left hand side assignment.
Thanks in advance
Regards
Steve
Procedural assignments in an always-begin-end block can be done only to
variables, not to nets.
Nets are assigned values using continuous assignments or as outputs of
primitives or port connections.
Shalom
Steve Hamm wrote:
--
Shalom Bresticker Shalom.Bresticker @freescale.com
Design & Reuse Methodology Tel: +972 9 9522268
Freescale Semiconductor Israel, Ltd. Fax: +972 9 9522890
POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 5441478
[ ]Freescale Internal Use Only [ ]Freescale Confidential Proprietary
[...]
>trireg a,b,c;
>
>always
> begin
> a <= #2 0;
> b <= #2 0;
> c <= #2 0;
> end
>
>Can we assign a trireg variable in the above mentioned way.Verilog XL
>is givin me an error saying that Illegal left hand side assignment.
It tells the truth.
trireg is a species of net, and nets cannot be assigned
in a procedural block (always or initial). You need
continuous assignment, or connection to a module output.
You also have a zero-delay loop in your always, but I guess
that's because you cut down your example for the posting.
inout ports are necessarily nets, and therefore it's never
possible to assign to them within a procedural block.
You probably need an auxiliary reg variable, assigned
in the always block, and then a continuous assign to
apply the value of that reg on to the inout port net.
--
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, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail:jonathan...@doulos.com
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.
Metin
hamm_...@yahoo.com (Steve Hamm) wrote in message news:<a4ea06c0.04090...@posting.google.com>...