Package File

Top  Previous  Next

You must define a package for each FPGA task you create; this is done in the package file associated with the task. The package file name must be derived from the task name by adding the suffix _pkg. The file contains only the component declaration for the task and must not contain any other declarations. You introduce a package file in the FCD with the keyword 'PACKAGE'.

 

The following is an example of a package file for the task my_task.

 

library ieee;

use ieee.std_logic_1164.all;

library diamond;

use diamond.chan_pkg.all;

 

package mytask_pkg is

   component mytask is

      port (

         clk          :  IN std_logic;

         rst          :  IN std_logic;

         ce           :  IN std_logic;

         ce_clr       :  IN std_logic;

         X_chan_in_0  :  IN X_chan_t;

         Y_chan_in_0  : OUT Y_chan_t;

         X_chan_out_0 : OUT X_chan_t;

         Y_chan_out_0 :  IN Y_chan_t;

         X_chan_out_1 : OUT X_chan_t;

         Y_chan_out_1 :  IN Y_chan_t

      );

   end component;

end mytask_pkg;