- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I want to know the different things to write a simple driver in Nios IDE. Because I've already written a driver but It wasn't in Nios IDE. DavidLink Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
For components already in the system, go through NIOS software development manual. For peripherals you need to the following You want to go through the following steps 1. include "system.h" which shall contain the base address to your peripheral. 2. make a file <peripheral_name.h> and define your register accesses in it. Eg. If your perihperal has a 2 registers, define the following# define MY_PERIPHERAL_REG1_WR(MY_PERPHERAL_BASE,data) IOWR(base, 0,data)# define MY_PERIPHERAL_REG1_RD(MY_PERPHERAL_BASE,data) IOWR(base, 0) This defines your RD and WR access. Remember that the "0" after base refers to the offset from the base address. Feel free to use this.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page