Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Decoder Z0
X1
X0 Z1
Z2
En Z3
1.1 Create a new folder, for instance, named xilinx_projects, in write permitted drive for your future
digital design on FPGA projects.
1.2 Go to All Programs > Xilinx Design Tools and launch Vivado. If it does not show in All Programs
menu it is at C:\Xilinx\Vivado\2014.4\bin\vivado.bat
1
Digital System Projects
2.6 View Project Setting. Check if the target language is VHDL and the Part is xc7a35tcpg236-1.
3.1 Project Manager -> Add Sources -> Add or Create Design Sources -> Create Files
File Name: decoder -> Finish
Define Module -> OK
“Module Ddefinition…” -> yes
2
Digital System Projects
3
Digital System Projects
4
Digital System Projects
6. Program FPGA
6.1 Connect Basys 3 board (micro USB) and switch power
6.1 Open Hardware Manual
6.2 Open Target -> Open New Target
7. Verify Correctness
7.1 Refer to the design constraints what switches are x(1), x(0) and en and what leds are z(0), …, z(3).
Exercise
1. Use the array type syntax (Bhasker 3.3 Array Type) for assigning a vector with a single ‘1’. For example
i) (5 => ‘1’, others => ‘0’) is a vector with the bit at index 5 equal to a ‘1’ and other bits are ‘0’s.
ii) (others => ‘0’) is a vector with all ‘0’s.
5
Digital System Projects
The new 14-to16 decoder description has a case statement for x like,
case x is
when “0000” => Z <= (0 => ‘1’, others => ‘0’);
when “0001” => Z <= (1 => ‘1’, others => ‘0’);
when “0010” => Z <= (2 => ‘1’, others => ‘0’);
…
when “1111” => Z <= (15 => ‘1’, others => ‘0’);
end case;
2. Use” find and replace” feature of the editor for the LEDs assignment in the XDC file.