The purpose of this assignment is to use the Nios II Emberdded Development - Software Build Tools (SBT) for Eclipse along with the .sof file you created in the previous assignment to create software projects Program in the FPGA development board Cyclone I

computer science

Description

Introduction 

The purpose of this assignment is to use the Nios II Emberdded Development - Software Build Tools (SBT) for Eclipse along with the .sof file you created in the previous assignment to create software projects Program in the FPGA development board Cyclone IV E.


The Nios II EDS provides a consistent software development environment that works for all Nios II processor systems. With the Nios II EDS running on a host computer, an Intel FPGA FPGA, and a JTAG download cable (such as an Intel FPGA USB-Blaster download cable), you can write programs for and communicate with any Nios II processor system.


The Nios II SBT includes proprietary and open-source tools (such as the GNU C/C++ tool chain) for creating Nios II programs. The Nios II EDS automates board support package (BSP) creation for Nios II processor-based systems, eliminating the need to spend time manually creating BSPs. The BSP provides a C/C++ runtime environment, insulating you from the hardware in your embedded system. Intel FPGA BSPs contain the Intel FPGA hardware abstraction layer (HAL), an optional RTOS, and device drivers.


Each Nios II program you develop consists of an application project, optional user library projects, and a BSP project. You build your Nios II program to create an Executable and Linking Format File (.elf) which runs on a Nios II processor. The Nios II SBT creates software projects for you. Each project is based on a makefile. 


Part One 

Write a C language program that displays a decimal digit on the green lights LED3 0 on the DE2-115 board. The other lights LED7 4 should be off. Using the HAL device drivers or direct memory addresses to develop your code. If KEY2 is pressed on the DE2-115 board, you should set the number displayed on the LEDs to 0. If KEY3 is pressed and SW0 is high, then increment the displayed number to a maximum of 9. If KEY3 is pressed and SW0 is low, then decrement the number to a minimum of 0. In your program, use polled I/O to read the Data registers of the KEY and SW ports to check the status of the buttons and switches. When you are not pressing any KEY the Data register provides 0, and when you press KEYi the Data register provides the value 1 in bit position i. Once a button-press is detected, be sure that your program waits until the button is released. You should not use the Interruptmask or Edgecapture registers for this assignment. 


Related Questions in computer science category