This website uses cookies. By using this site, you consent to the use of cookies. For more information, please take a look at our Privacy Policy.
Home > FPGA Technical Tutorials > Design Recipes for FPGAs Using Verilog and VHDL > Design Optimization Example: DES > Final Optimization

TABLE OF CONTENTS

Xilinx FPGA FPGA Forum

Final Optimization

FONT SIZE : AAA

It was recognized that the key_rotate function could be simplified by rethinking the rotate algorithm such that a right rotate of 1 bit was replaced by a left rotate of 27 bits (for a 28-bit word). This eliminates a conditional statement, which it was felt could be preventing some optimizations from taking place. This means that there was no need to have a different algorithm for encryption and decryption. This led to the following rework:

function key_rotate

−−moods inline

(key : vec56;

round : natural range 0 to 15;

encrypt : std_logic)

return vec56 is

type distance_type is

array (natural range 0 to 31) of integer range

0 to 31;

constant shift_distance : distance_type :=

−−moods ROM

( 0, 1, 2, 2, 2, 2, 2, 2,

1, 2, 2, 2, 2, 2, 2, 1,

27, 27, 26, 26, 26, 26, 26, 26,

27, 26, 26, 26, 26, 26, 26, 27);

variable distance : natural range 0 to 31;

begin

distance := shift_distance(to_integer(unsigned(

encrypt & to_unsigned(round,4))));

return vec28(unsigned(key(1 to 28)) ror distance) &

vec28(unsigned(key(29 to 56)) ror distance);

end;

The state machine for this design was basically the same as for the previous design as shown in Figure 19.4. It was found that this version was slightly slower than the previous design but significantly smaller. MOODS predicts that this design has the area and delay characteristics shown in Table 19.1 in the line labeled (4).

  • XC2V2000-4BGG575C

    Manufacturer:Xilinx

  • FPGA Virtex-II Family 2M Gates 24192 Cells 650MHz 0.15um Technology 1.5V 575-Pin BGA
  • Product Categories: FPGAs (Field Programmable Gate Array)

    Lifecycle:Obsolete -

    RoHS:

  • XC2V2000-4FFG896I

    Manufacturer:Xilinx

  • FPGA Virtex-II Family 2M Gates 24192 Cells 650MHz 0.15um Technology 1.5V 896-Pin FCBGA
  • Product Categories: FPGAs (Field Programmable Gate Array)

    Lifecycle:Obsolete -

    RoHS:

  • XC4003E-3PQ100C

    Manufacturer:Xilinx

  • FPGA XC4000E Family 3K Gates 238 Cells 0.35um Technology 5V 100-Pin PQFP EP
  • Product Categories: FPGA

    Lifecycle:Obsolete -

    RoHS: No RoHS

  • XCV300-4BG352I

    Manufacturer:Xilinx

  • FPGA Virtex Family 322.97K Gates 6912 Cells 250MHz 0.22um Technology 2.5V 352-Pin Metal BGA
  • Product Categories: FPGAs (Field Programmable Gate Array)

    Lifecycle:Obsolete -

    RoHS: No RoHS

  • XC5VLX110-2FF1760I

    Manufacturer:Xilinx

  • FPGA Virtex-5 LX Family 110592 Cells 65nm Technology 1V 1760-Pin FCBGA
  • Product Categories: FPGAs (Field Programmable Gate Array)

    Lifecycle:Active Active

    RoHS: No RoHS

Need Help?

Support

If you have any questions about the product and related issues, Please contact us.