The example of 23.2 has a typo in it, "but_t" should be "bus_t".
But additionally, the code in the example could be expressed more
simply. How about the following?
typedef bit [12:0] T ;
T A_bus, B_bus ;
parameter type bus_t = T;
generate
case ($typeof(bus_t))
$typeof(T):
add_fixed_int #(T) (A_bus, B_bus);
$typeof(real):
add_float #(T) (A_bus, B_bus);
endcase
endgenerate
-- Brad
Received on Wed Jun 16 09:01:49 2004
This archive was generated by hypermail 2.1.8 : Wed Jun 16 2004 - 09:02:00 PDT