Presentation is loading. Please wait.

Presentation is loading. Please wait.

Embedded Systems Programming Networking on the puppeteer.

Similar presentations


Presentation on theme: "Embedded Systems Programming Networking on the puppeteer."— Presentation transcript:

1 Embedded Systems Programming Networking on the puppeteer

2 Networking in embedded systems Many, if not most, embedded systems require networking support This can be for development purposes –From of Ethernet to download kernel to use NFS mounted root file system for development Or it can be for application/end user –Web enabled devices, getting upgrades

3 Networking fundamentals To network we require –A NIC Network interface chip –Software support for the chip A (working) device driver –Protocol support TCP/IP, ftp, telnet, nfs… –A configured protocol stack Knowing how to talk –A configured server/client Someone to talk to –A network media A bit of wire!

4 The Puppeteer - networking To network we require –A NIC Network interface chip –Software support for the chip A (working) device driver –Protocol support TCP/IP, ftp, telnet, nfs… –A configured protocol stack Knowing how to talk –A configured server/client Someone to talk to –A network media A bit of wire! We have got –SMCs91C96I FPGA complications –SMC9194 driver in linux 2.4 kernel source Doesn’t work! –TCP/IP is in kernel Works –Needs configuration Fairly straightforward –We can use kenny LDAP problems –Use Ethernet fly leads Remember to reconnect!

5 The SMC91C96I Chip Standard series of chips –Originally ISA bus chips Local bus, PCMCIA versions Horrendously complex –The documentation leaves a lot to be desired Well supported under Linux –Various versions of drivers around We will look at this later

6 The SMC91C96I features Half and full duplex chip Has 6k bytes of on board ram memory Internal MMU Supports IEEE 802.3 (Ethernet) Status leds Has magic packet!

7 Linux SMC9194 device driver Doesn’t work out of the box! –There are a few lines that need editing before it will compile It requires quite a bit of configuration for our system –The memory address of the chip needs specifying –The FPGA code needs writing and incorporating

8 The SMC registers BANK 0BANK 1BANK 2BANK 3BANK 4 TCR EPH Status RCR Multicast Counter MIR MCR General Purpose ReservedControl Table MGMT Revision ERCV ECOR low ECSR high Bank Select Register MMU Command PNR ARR FIFO Ports Pointer Data Interrupt Config Base Individual Address0- 1 2-3 4-5 Bank 2 Registers used at run time Stored in EEPROM

9 The SMC registers The SMC chip is located at ox20000300 We repogram the MMU to reflect it at 0xF3800300, IO space –This is done in pangolin.c static struct map_desc pangolin_io_desc[] __initdata = { /* virtual physical length domain r w c b */ { 0xe8000000, 0x00000000, 0x00800000, DOMAIN_IO, 0, 1, 0, 0 }, /* Flash bank 0 */ { 0xf2400000, 0x10400000, 0x00030000, DOMAIN_IO, 0, 1, 0, 0 }, /* FPGA 0 */ { 0xf3800300, 0x20000300, 0x00004000, DOMAIN_IO, 0, 1, 0, 0 }, /* SMC91c96 ethernet chip */ LAST_DESC };

10 Probing the chip We need to probe the chip There are some bugs in the probe code that need fixing It finds the chip but can’t set up the irq for it unsigned int *addr; int base_addr; dev->base_addr=0xf3800300; dev->irq=0; base_addr = dev->base_addr; SET_MODULE_OWNER(dev); /* try a specific location */ addr = ioremap(0xf3800300, 10 * 16); if (!addr) return -ENOMEM; ret=smc_probe(dev, base_addr); iounmap(addr);

11 IRQs on the Puppeteer The interrupt structure on the StrongArm (and ARM generally) is very simple To create more complex interrupt structures in hardware designers will use interrupt controllers The Puppeteer use the FPGA for this task –This means that we are dependant on the level of documentation of the Verilog/VHDL rather than the datasheets

12


Download ppt "Embedded Systems Programming Networking on the puppeteer."

Similar presentations


Ads by Google