Adding Custom Logic to HW Core
From RCSWiki
About
- Author: Andy Schmidt
- Last Modified: 07/11/2008
- Notes: This tutorial explains how to add custom HDL logic to your hardware core as a separate component (entity) not directly into the user_logic.vhd.
Getting Started
I assume you have already created a hardware core (probably using Create / Import IP Wizard) in XPS and have some custom logic / entity you want to add to it in a separate file.
This tutorial aims to show you how to do it so XPS will recognize the file. I also assume you know how to hookup and instantiate your component.
This tutorial Assumes You Already:
- Created a hardware core (Create / Import IP Wizard in EDK)
- Assume the core is named: test_core_v1_00_a
- Created custom logic / component as a separate VHDL file
- Assume the file is name: custom_logic.vhd
Modifying Hardware Core
In your project directory under the pcores directory you will see your test_core directory.
Within this directory you will likely see a couple of directories: data and hdl
- Copy your custom_logic.vhd file to the pcores/test_core/hdl/vhdl/custom_logic.vhd directory
- Change directories to the pcores/test_core/data directory
- Modify the test_core.pao file.
- The PAO File is the Peripheral Analysis Order which specifies which order the HDL files should be analyzed / compiled in
- Add the Line above the user_logic vhdl line:
- lib test_core_v1_00_a custom_logic vhdl
The bottomo of your PAO file should look like this:
lib test_core_v1_00_a custom_logic vhdl lib test_core_v1_00_a user_logic vhdl lib test_core_v1_00_a test_core vhdl
To explain what that line means:
- lib just means Library
- test_core_v1_00_a is the official name of the hardware core
- custom_logic is the name of the HDL file
- vhdl specifies that the particular file is a VHDL file (and is in the /hdl/vhdl) directory
Save the PAO file and you are done.
Now you just have to instantiate and use your new custom logic entity or component in the user_logic.vhd file.
