This is an old revision of the document!


XDC Formatting Info

This Guide is to standardize our format for XDCs. All Digilent XDCs should follow this format to help ease the transfer of projects between boards.


GPIO

Switches

All switches should designated by a lower case sw as seen below. The ports should be numbered from 0 to NUMBER_OF_SWITCHES. This will let the user use the name as a bus. Example of 8 LEDs

[get_ports { sw[0] }];
[get_ports { sw[1] }];
[get_ports { sw[2] }];
[get_ports { sw[3] }];
[get_ports { sw[4] }];
[get_ports { sw[5] }];
[get_ports { sw[6] }];
[get_ports { sw[7] }];

LEDs

All LEDs should designated by a lower case led as seen below. The ports should be numbered from 0 to NUMBER_OF_LEDs. This will let the user use the name as a bus. Example of 8 LEDs

[get_ports { led[0] }];
[get_ports { led[1] }];
[get_ports { led[2] }];
[get_ports { led[3] }];
[get_ports { led[4] }];
[get_ports { led[5] }];
[get_ports { led[6] }];
[get_ports { led[7] }];

Buttons

RULD Buttons

All LEDs should be designated by a lower case “btn” then the indicator of the position of the button

[get_ports { btnc }];
[get_ports { btnd }];
[get_ports { btnl }];
[get_ports { btnr }];
[get_ports { btnu }];

Inline Buttons

All LEDs should be designated by a lower case “btn” then the indicator of the position of the button

[get_ports { btn[0] }];
[get_ports { btn[1] }];
[get_ports { btn[2] }];
[get_ports { btn[3] }];

CPU Reset Button

The active high reset button (if applicable) will be named “cpu_resetn”

[get_ports { cpu_resetn }];