Package Declaration Syntax - 2022.1 English

Vivado Design Suite User Guide: Synthesis (UG901)

Document ID
UG901
Release Date
2022-06-06
Version
2022.1 English

package mypackage is

   type mytype is record

      first : integer;

      second : integer;

   end record;

   constant myzero : mytype := (first => 0, second => 0);

   function getfirst (x : mytype) return integer;

end mypackage;

 

package body mypackage is

   function getfirst (x : mytype) return integer is

   begin

      return x.first;

   end function;

end mypackage;