Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

Problem with the IOWR and IORD

Altera_Forum
Honored Contributor II
1,169 Views

in an Ethernet program developed by IDE 

I do a test , writing: 

IOWR ( DM9000A_Base, 1, data); 

tmp=IORD ( DM9000A_Base ,1); 

Should not the tmp be the same with the data? 

the result is not , and whatever data is , the result tmp=ff00, 

will anyone tell me why?
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
454 Views

It looks like you are trying to write to the DM900A ethernet chip status register, which is read-only (writing to it only clears status bits). A quick glance at the data sheet shows register 1 (the offset in your IOWR statement) is 00h at reset, so this is why you read 00h in the lower 8 bits. Upper bits are undefined if you are reading a byte. 

Hope this helps. 

Tim
0 Kudos
Reply