February 13, 20082 minutes
When I make changes to a peripheral, what is the most efficient way to re-build the project? How can I avoid having to re-build the entire project?
Sometimes we are developing a peripheral and we have to re-build and test it several times over. In this situation, we don’t have to “Clean Hardware” and re-build the entire project from scratch every time. Instead, we can make use of an option in the .mpd file of the peripheral in development.
OPTION CORE_STATE = ACTIVE. Change the “ACTIVE” to “DEVELOPMENT” and save the file.Now every time that you select “Device Configuration->Download Bitstream”, XPS will check if you have made changes to the peripheral and re-build it into the project if necessary.
There is an exception to the above case and that is if you have modified the ports of your peripheral. In this case, you must use the Peripheral Wizard to Import your peripheral, change the .mpd file and then run “Project->Rescan User Repositories” again. Remember, every time that you run the Peripheral Wizard, it will re-write your .mpd file, so each time you will have to change the “ACTIVE” back to “DEVELOPMENT”. For a more detailed description of the Import process, see the tutorial Create a Peripheral Using the Peripheral Wizard.
How can I copy a peripheral from one project into another?
If you developed a peripheral in one project and you want to use it in another, you just have to copy all the peripheral files and use “Project->Rescan User Repositories”.
Now the peripheral should appear in the “IP Catalog” of the project.