[sv-bc] which name space belongs task/funcition ports in NON-ANSI style

From: Daniel Mlynek <daniel.mlynek_at_.....>
Date: Tue Mar 03 2009 - 06:09:46 PST
See below code  - question is what should be the types of the 'i' and 'loc'?

1. Should type TR for 'i' be resolved as external typedef  (typedef reg[1:0]
TR;) as this is port? 
2. Should type TR for 'loc' be resolved as internal typedef ( typedef
reg[7:0] TR;)as this is local variable?
 
module top;
 
typedef reg[1:0] TR;
int y;
 
function int f1;
 typedef TR;
 input i;
 TR loc; //<<<<<<<<<<local variable internal typedef
 TR i; //<<<<<<<<<<<<<port outside typedef.
 typedef reg[7:0] TR;
 $display(,,$bits(i));
 $display(,,$bits(loc));
 return 1;
 
endfunction
 
initial #1 y=f1(-1);
 
endmodule

 
DANiel
 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Mar 3 06:10:54 2009

This archive was generated by hypermail 2.1.8 : Tue Mar 03 2009 - 06:11:13 PST