- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
dear all,
I layout a pcb according to ep1c20 ,connect the nios2 and 91c111 ,but the lan91c11 don't work ,could anyone do PCB using the 91c111 and tell me how to connect the signal wire ?Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We copied the design from the Nios development board Cyclone II edition and it works fine. There might be problems while compiling with SOPC Builder 6.1 instead 6.0 (we have not isolated a bug yet).
Try some low level access to the chip like: alt_putstr("-------------------------------------------------------------------------------\n");
alt_putstr("- LAN91C111 access test -\n");
alt_putstr("-------------------------------------------------------------------------------\n");
alt_putstr(" direction | address | data | comment\n");
alt_putstr("-------------------------------------------------------------------------------\n");
addr = LAN91C111_BASE + LAN91C111_LAN91C111_REGISTERS_OFFSET + 0xE;
data16 = IORD_16DIRECT(addr, 0);
alt_printf(" READ16 | 0x%x | 0x%x | check which register bank is selected\n", addr, data16);
data16 = 0x0003;
IOWR_16DIRECT(addr, 0, data16);
alt_printf(" WRITE16 | 0x%x | 0x%x | selection of register bank 3 (16 bit write)\n", addr, data16);
data16 = IORD_16DIRECT(addr, 0);
alt_printf(" READ16 | 0x%x | 0x%x | check register bank selection (expected 0x3303)\n", addr, data16);
alt_putstr("-------------------------------------------------------------------------------\n");
addr = LAN91C111_BASE + LAN91C111_LAN91C111_REGISTERS_OFFSET + 0xC;
data32 = 0x00030000;
IOWR_16DIRECT(addr, 0, data32);
alt_printf(" WRITE32 | 0x%x | 0x%x | selection of register bank 3 (32 bit write)\n", addr, data32);
data32 = IORD_32DIRECT(addr, 0);
alt_printf(" READ32 | 0x%x | 0x%x | check register bank selection (expected 0x3303XXXX)\n", addr, data32);
alt_putstr("-------------------------------------------------------------------------------\n");
addr = LAN91C111_BASE + LAN91C111_LAN91C111_REGISTERS_OFFSET + 0xA;
data16 = IORD_16DIRECT(addr, 0);
alt_printf(" READ16 | 0x%x | 0x%x | read the revision register (expected 0x3391)\n", addr, data16);
alt_putstr("-------------------------------------------------------------------------------\n");
change the alt_functions for normal C versions the result of the last read may be different, since it depends on the chip revision IzI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by iztok.jeras@Jan 16 2007, 06:24 AM we copied the design from the nios development board cyclone ii edition and it works fine. there might be problems while compiling with sopc builder 6.1 instead 6.0 (we have not isolated a bug yet).
try some low level access to the chip like:
alt_putstr("-------------------------------------------------------------------------------\n");
alt_putstr("- lan91c111 access test -\n");
alt_putstr("-------------------------------------------------------------------------------\n");
alt_putstr(" direction | address | data | comment\n");
alt_putstr("-------------------------------------------------------------------------------\n");
addr = lan91c111_base + lan91c111_lan91c111_registers_offset + 0xe;
data16 = iord_16direct(addr, 0);
alt_printf(" read16 | 0x%x | 0x%x | check which register bank is selected\n", addr, data16);
data16 = 0x0003;
iowr_16direct(addr, 0, data16);
alt_printf(" write16 | 0x%x | 0x%x | selection of register bank 3 (16 bit write)\n", addr, data16);
data16 = iord_16direct(addr, 0);
alt_printf(" read16 | 0x%x | 0x%x | check register bank selection (expected 0x3303)\n", addr, data16);
alt_putstr("-------------------------------------------------------------------------------\n");
addr = lan91c111_base + lan91c111_lan91c111_registers_offset + 0xc;
data32 = 0x00030000;
iowr_16direct(addr, 0, data32);
alt_printf(" write32 | 0x%x | 0x%x | selection of register bank 3 (32 bit write)\n", addr, data32);
data32 = iord_32direct(addr, 0);
alt_printf(" read32 | 0x%x | 0x%x | check register bank selection (expected 0x3303xxxx)\n", addr, data32);
alt_putstr("-------------------------------------------------------------------------------\n");
addr = lan91c111_base + lan91c111_lan91c111_registers_offset + 0xa;
data16 = iord_16direct(addr, 0);
alt_printf(" read16 | 0x%x | 0x%x | read the revision register (expected 0x3391)\n", addr, data16);
alt_putstr("-------------------------------------------------------------------------------\n");
change the alt_functions for normal c versions
the result of the last read may be different, since it depends on the chip revision
izi
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=20610)</div> --- Quote End --- This piece of code was helpful for me. Thanks

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