In 1364-2001 LRM, section 12.4, it is mentioned: [...] At the top of the name hierarchy are the names of one or more root modules of which no instances have been created.This root or these parallel root modules make up one or more hierarchies in a design description or description .Inside any module,each module instance (including an arrayed or generated instance),task def- inition,function definition,and named begin-end or fork-join block shall define a new branch of the hierarchy.Named blocks within named blocks and within tasks and functions shall create new branches. Only non-recursively referenced automatic tasks and/or functions create visible branches that can be refer- enced.Recursively called tasks and functions,declared using the automatic keyword and recursively called from within the same task or function,do not create visible branches that can be referenced.See 10.2.1 and 10.3.1 for a discussion of automatic tasks and functions. [...] What I can understand, the member of a directly recursive task/function is not allowed to be hierarchically referenced. If it is mutually recursive, then the member can be hierarchically referred unless the task/function is automatic. It is already mentioned, any member of automatic task/function can not be hierarchically referred. So is the member of a directly recursive task/function allowed to be hierarchically referred, if the task/function is not automatic. If yes, then why recursiveness is discussed here. For e.g., is the following test case legal? module tb; dut dut(); initial $dumpvars(); endmodule module dut(input clk, input d, output reg [7:0] q); //{remote href,local href, not} X {user dotted, implicit dotted} reg [7:0] \t1.local ; // capture? reg [7:0] \literal.local ; function inc (input [7:0] a); reg [7:0] incprev; begin if (a==0) begin if (d) incprev=0; // else reuse global incprev end else incprev=inc(a-1)+1; inc = incprev; end endfunction task t1 (output [7:0] out, input [7:0] in); reg [7:0] local; begin if (in[0]) local=in>>1; out=local+1; end endtask always @(posedge clk) begin t1(\t1.local , inc(4)); q = \t1.local + \literal.local + t1.local + inc.incprev; end endmodule Regards Surya.Received on Mon Jan 30 02:38:21 2006
This archive was generated by hypermail 2.1.8 : Mon Jan 30 2006 - 02:39:42 PST