RE: [sv-bc] Why no 'output' continuous assignments from a function call?

From: Rich, Dave <Dave_Rich@mentorg.com>
Date: Wed Nov 03 2004 - 22:43:27 PST

Brad,

In the simple case, it might have been possible to allow output
arguments in continuous assignments, but things get more complicated if
output variables are used elsewhere in the RHS. Instead of making a
special exception for simple continuous assignments, it was thought to
be best to keep the rules simple.

Now onto void functions, there currently is no syntax to support the use
of a void function in a continuous assignment, regardless of the
semantic restriction with output arguments.

Dave

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Brad
Pierce
Sent: Wednesday, November 03, 2004 7:12 PM
To: sv-bc@eda.org
Subject: [sv-bc] Why no 'output' continuous assignments from a function
call?

According to 10.3, "it shall be illegal to call a function with
output ... arguments ... in an expression that is not within
a procedural statement." This means that a function call can
drive at most one continuous assignment, and, for example,

    assign a = f(y, b);

would be illegal for

    function f(input y, output b);

And it also means that a void function cannot be used like a
task enable to make continuous assignments, so, for example,

    g(y,a,b);

would be an illegal concurrent statement for

    function void g(input y, output a, b);

Why force people to declare a and b as variables and wrap those
function calls in always_comb?

    always_comb a = f(y,b);
    always_comb g(y,a,b);

See also http://www.eda.org/sv-bc/display_3.1a_issue.cgi?issue_num=56 .

-- Brad
Received on Wed Nov 3 22:43:35 2004

This archive was generated by hypermail 2.1.8 : Wed Nov 03 2004 - 22:44:28 PST