- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wink.gif Issue resolved, i was not holding the control signals long enough for the megafunction.
I have an Altera (stratix) NDK (1s10) I have instantiated an alt_remote update megafunction using the full_featured reference design as base. For some strange reason , i am unable to write any parameters into the megafunction, when i try to readback i always get all Ones. all the output PIOs from the Megafunction are declared as Rising edge in the SOPC builder and all unused pins are tristated, configuration is set to remote but it still does not work. Can any of the pros take a look at it and tell me whats wrong? I have been trying this for a week but cant seem to figure out the problem! Pretty desperate !!!! Got to submit the code in 2 days Heres my code <-------------------------------> IOWR_ALTERA_AVALON_PIO_DATA(READ_PARAM_BASE, 0x0); IOWR_ALTERA_AVALON_PIO_DATA(PARAM_BASE, 0x2); IOWR_ALTERA_AVALON_PIO_DATA(DATA_IN_BASE, 0x1); IOWR_ALTERA_AVALON_PIO_DATA(WRITE_PARAM_BASE, 0x1); IOWR_ALTERA_AVALON_PIO_DATA(WRITE_PARAM_BASE, 0x0); busy = IORD_ALTERA_AVALON_PIO_DATA(BUSY_BASE); while(busy == 1) { busy = IORD_ALTERA_AVALON_PIO_DATA(BUSY_BASE); } IOWR_ALTERA_AVALON_PIO_DATA(READ_PARAM_BASE, 0x1); IOWR_ALTERA_AVALON_PIO_DATA(READ_PARAM_BASE, 0x0); busy = IORD_ALTERA_AVALON_PIO_DATA(BUSY_BASE); while(busy == 1) { busy = IORD_ALTERA_AVALON_PIO_DATA(BUSY_BASE); } dataout = IORD_ALTERA_AVALON_PIO_DATA(DATA_OUT_BASE); IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, dataout); <------------------------------> regards PavanLink Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I need to have a read/write interface I usually have 1) An lpm_decode (enabled with cs), 2) A MUX (selected with the address bits), 3) registers enabled by the lpm_decode logic.
This simple mix allows you to do anything a PIO can plus allows you to take the functionality of many PIOs and stick them altogether implemented in their own address range. ppk031000 if you like I can send you an example of this (it's on my home machine so email me if you want it, otherwise I'll forget).
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