cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor
Visitor
2,340 Views
Registered: ‎11-25-2012

Simulation with .elf file?

I have basic FPGA design with virtex 4 power-pc structure. My purpose is simulate my design using ISIM.

 

My inputs are DIP_Switches which I declared in my testbench (system_tb.v) file as:

...........

initial
begin
fpga_0_rst_1_sys_rst_pin = 1'b1;

fpga_0_DIP_Switches_8Bit_GPIO_IO_I_pin=4'b0000;

#3000;

fpga_0_DIP_Switches_8Bit_GPIO_IO_I_pin=4'b0001;
#3000;

$finish;
end

............

 

I connected my DIP_Switches to my LEDS as output in SDK environment that:

 

int main() {
XGpio led;
XGpio switch;
XGpio_Initialize(&led, XPAR_LEDS_4BIT_DEVICE_ID);
XGpio_Initialize(&switch, XPAR_DIP_SWITCHES_8BIT_DEVICE_ID);
XGpio_SetDataDirection(&led,1,0); 
XGpio_SetDataDirection(&switch,1,1);
int data=0;

XGpio_DiscreteWrite(&led, 1, 0x00);
while(1){


data = XGpio_DiscreteRead(&switch, 1);


XGpio_DiscreteWrite(&led, 1, data);

data=0;
}
return 0;
}

 

After that  .elf file was created and I simulate my design with .elf file.

 

My problem is I can see changes with  DIP_Switcehs but LEDs haven't changed at all in simulation. where is my mistake? is there anbody suggest me solition? 

 

0 Kudos