In a off line discussion, we have been talking about how to implement package generics in the fixed and floating point packages. Two basic ideas have come up, which I would like the group to decide between: 1) fixed_base_pkg, float_base_pkg - with no generics fixed_generic_pkg, float_generic_pkg - with package generics This approach (which we are currently using) offers you a package that does not use package generics. These can be used for base types. 2) fixed_generic_pkg, float_generic_pkg - packages with generics fixed_pkg, float_pkg - Instances of the generic packages that would be in the IEEE library. This approach gives us only one package to worry about. However there are problems with data types in these packages. You would have to many "work.my_fixed_pkg.xxx" type calls if trying to mix your own fixed point data types with the default package. Examples of interfaces: Approach 1) Two types. "ufixed" comes from base package, "uf" comes from generic package. use ieee.fixed_base_pkg.all; entity xxx is port ( aaa : in ufixed (3 downto -3); bbb : out ufixed (3 downto -3)); end entity xxx; use work.my_fixed_pkg.all; architecture RTL of xxx is signal my_aaa, my_bbb : uf (3 downto -3); begin my_aaa <= uf (aaa); bbb <= ufixed (my_bbb); .. Approach 2) One type. "ufixed" is in both the default and "my_fixed_pkg". use ieee.fixed_pkg.all; entity xxx is port ( aaa : in ufixed (3 downto -3); bbb : out ufixed (3 downto -3)); end entity xxx; architecture RTL of xxx is signal my_aaa, my_bbb : work.my_fixed_pkg.ufixed (3 downto -3); begin my_aaa <= work.my_fixed_pkg.ufixed(aaa); bbb <= ufixed (my_bbb); .. -- David W. Bishop dbishop@vhdl.org All standard disclaimers apply.Received on Tue Jun 28 07:43:02 2005
This archive was generated by hypermail 2.1.8 : Tue Jun 28 2005 - 07:43:15 PDT