XTEA Encryption/Decryption VHDL Engine

Job ID: 35494367

Budget: $250 – $750 USD

Hello can you help me with this project it’s going to be similar to lab 4 that I have attached.
I have attached the project pdf too

(CMPE_487_PROJECT.pdf
193.22 KB) this one



Division.c

#include "system.h"
#include "altera_avalon_pio_regs.h"
#include <stdio.h>

/* register offset definitions */
#define DVND_REG_OFT 0 // dividend register address offset
#define DVSR_REG_OFT 1 // divisor register address offset
#define STRT_REG_OFT 2 // start register address offset

#define QUOT_REG_OFT 3
#define REMN_REG_OFT 4
#define REDY_REG_OFT 5
#define DONE_REG_OFT 6

/* main program */
int main ()
{
alt_u32 a, b, q, r, ready, done;

printf("Division accelerator test #2: \n\n");
while (1){
printf "Perform division a / b = q remainder r\n");
printf("Enter a: " );
scanf ('"/.d", fea);
printf("Enter b: " );
scanf("%d", &b);
/* send data to division accelerator */
I0WR(DIV32_BASE, DVND_REG_OFT, a );
I0WR(DIV32_BASE, DVSR_REG_OFT, b );
/* wait until the division accelerator is ready */
while(1) {
ready = IORD(DIV32_BASE, REDY_REG_OFT) & 0x00000001;
if (ready == l)
break;
}
/* generate a 1—pulse */
printf( "S t a r t . . . \ n");
I0WR(DIV32_BASE, STRT_REG_OFT, 1);
/* wait for completion */
while (1) {
done = I0RD(DIV32_BASE, DONE_REG_OFT) & 0x00000001;
if (done == l)
break ;
}
/* clear done-tick register */
I0WR(DIV32_BASE, DONE_REG_OFT, 1);
/* retrieve results from division accelerator */
q = I0RD(DIV32_BASE, QUOT_REG_OFT);
r = I0RD(DIV32_BASE, REMN_REG_OFT);
printf("Hardware: %u / %u = %u remainder %u\n", a, b, q, r );
/* compare results with built in C operators */
printf( "Software: %u / %u = %u remainder y , %u\n\n\n", a, b, a/b , a%,b) ;
}//end while
}