Intel® FPGA University Program
University Program Material, Education Boards, and Laboratory Exercises
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
1087 Discussions

DE2-lab4-computer organization exercise help/solution

Altera_Forum
Honored Contributor II
771 Views

an you please help me out on the lab_4 exercise in computer organization laboratory exercises. I prefer not to write in assembly, so using C to write the application program for it. Its a DE2 board.  

 

If anyone could please help me out with a solution.  

code: 

# include<stdio.h> 

//define timerr (char *) 0x00011000 

define jtag_uart_cnt (char *) 0x00011024 

define jtag_uart_data ( char *) 0x00011020 

 

int main(){ 

 

 

char x; 

int x2; 

while(1){ 

 

*jtag_uart_cnt=0xfffff; 

 

if(*jtag_uart_cnt>0){ 

 

 

printf("write data to jtag_uart\n"); 

scanf("%s",x); 

x2=(int)x; 

 

*jtag_uart_data=x2; 

 

printf("sucessfully written to jtag data register\n"); 

 

 

 

return 1; 

}
0 Kudos
0 Replies
Reply