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

From: Brad Pierce <Brad.Pierce@synopsys.com>
Date: Wed Nov 03 2004 - 19:12:15 PST

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 19:11:42 2004

This archive was generated by hypermail 2.1.8 : Wed Nov 03 2004 - 19:12:06 PST