Dept. Logo
Lab Home page
Department of Microelectronic Systems, Faculty of Electronics, Telecommunications and Informatics, Gdansk University of Technology Logo Wydziału
Flaga PL Polska wersja

Testing and implementation of 128-bit AES encryption block

Description

Write a testbench in VHDL to test the supplied encrypting block. Test vectors should be read from the supplied text file using std_logic_textio library.
After testing, the encryption block should be implemented in FPGA, embedded in a module that continuously generates the encryption key. LSB of plain data can be set using the switches SW0-SW7, the MSB part can be set equal to 0. Encrypted data can be displayed on LEDs LD0-LD7 (eight LSB bits only) or on LED display (sixteen LSB bits only). Output MSB bits will not be observed.
Check the maximum clock frequency of the designed circuit.

Source files

An example of UCF file, Digilent Spartan-3, Spartan-3 3S200 FT256-4:
NET clk TNM_NET = clk;
TIMESPEC TS_clk = PERIOD clk 20 ns;
NET rst TIG;
#########################################################################################
# Clock:
NET "clk" LOC = "T9" ; # 50 MHz clock
NET "rst" LOC = "L14" ; # PB3 active high
#########################################################################################
#########################################################################################
# Slide switches:
# sw7 Sw6 sw5 sw4 sw3 sw2 sw1 sw0
NET "data_i<0>" LOC = "F12" ; # active high when in UP position
NET "data_i<1>" LOC = "G12" ; # active high when in UP position
NET "data_i<2>" LOC = "H14" ; # active high when in UP position
NET "data_i<3>" LOC = "H13" ; # active high when in UP position
NET "data_i<4>" LOC = "J14" ; # active high when in UP position
NET "data_i<5>" LOC = "J13" ; # active high when in UP position
NET "data_i<6>" LOC = "K14" ; # active high when in UP position
NET "data_i<7>" LOC = "K13" ; # active high when in UP position
#########################################################################################
NET "data_write_i" LOC = "M13" ; # active high
#########################################################################################
NET "data_o<0>" LOC = "K12" ; # LD0 active high
NET "data_o<1>" LOC = "P14" ; # LD1 active high
NET "data_o<2>" LOC = "L12" ; # LD2 active high
NET "data_o<3>" LOC = "N14" ; # LD3 active high
NET "data_o<4>" LOC = "P13" ; # LD4 active high
NET "data_o<5>" LOC = "N12" ; # LD5 active high
NET "data_o<6>" LOC = "P12" ; # LD6 active high
NET "data_o<7>" LOC = "P11" ; # LD7 active high
#########################################################################################