i'm so sorry for my poor english
i use the method PIO to test the bloc altfp_add_sub in quartus all steps are al right in quatus when i want to execute this bloc altfp _add_sub in niosII with fpga 2S60ES
the results in the console of niosII is 0.000 i don't khnow where is my pb
the programme that i use is here:
# include <math.h>
# include <stdio.h>
# include <string.h>
# include <stdlib.h>
# include "system.h"
# include "alt_types.h"
# include <time.h>
# include <unistd.h>
# include <sys/alt_timestamp.h>
# include "sys/alt_irq.h"
# include "altera_avalon_pio_regs.h"
void main( void)
{
float val=1.1;
int i;
IOWR_ALTERA_AVALON_PIO_DATA(PIO_3_BASE, 0);// aclr pin
IOWR_ALTERA_AVALON_PIO_DATA(PIO_3_BASE, 1);//aclr pin
//
IOWR_ALTERA_AVALON_PIO_DATA(PIO_2_BASE, 0);//clk-en
IOWR_ALTERA_AVALON_PIO_DATA(PIO_0_BASE, 1.2);//
IOWR_ALTERA_AVALON_PIO_DATA(PIO_1_BASE, 2.3);
for(i=0;i<6400;i++)
{
val=IORD_ALTERA_AVALON_PIO_DATA(PIO_5_BASE);
}
}
please help me and so sorry for my poor english