aboutsummaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/README8
-rw-r--r--firmware/microblaze/.gitignore46
-rw-r--r--firmware/microblaze/COPYING674
-rw-r--r--firmware/microblaze/ChangeLog1
-rw-r--r--firmware/microblaze/INSTALL234
-rw-r--r--firmware/microblaze/Makefile.am29
-rw-r--r--firmware/microblaze/Makefile.common88
-rw-r--r--firmware/microblaze/NEWS0
-rw-r--r--firmware/microblaze/README3
-rw-r--r--firmware/microblaze/apps/cruft/Makefile.am82
-rwxr-xr-xfirmware/microblaze/bootstrap26
-rw-r--r--firmware/microblaze/configure.ac54
-rw-r--r--firmware/microblaze/lib/Makefile.inc50
-rw-r--r--firmware/microblaze/lib/bsm12.c319
-rw-r--r--firmware/microblaze/lib/bsm12.h83
-rw-r--r--firmware/microblaze/lib/buffer_pool.c72
-rw-r--r--firmware/microblaze/lib/buffer_pool.h75
-rw-r--r--firmware/microblaze/lib/dbsm.c299
-rw-r--r--firmware/microblaze/lib/dbsm.h90
-rw-r--r--firmware/microblaze/lib/net/.gitignore2
-rw-r--r--firmware/microblaze/lib/usrp2_bytesex.h66
-rw-r--r--firmware/microblaze/lib/wb16550.h98
-rwxr-xr-xfirmware/microblaze/u2_flash_tool116
-rw-r--r--firmware/microblaze/usrp2/.gitignore9
-rw-r--r--firmware/microblaze/usrp2p/.gitignore9
-rw-r--r--firmware/microblaze/usrp2p/Makefile.am71
-rw-r--r--firmware/microblaze/usrp2p/bootloader/.gitignore11
-rw-r--r--firmware/microblaze/usrp2p/bootloader/Makefile.am39
-rw-r--r--firmware/microblaze/usrp2p/bootloader_utils.c39
-rw-r--r--firmware/zpu/.gitignore1
-rw-r--r--firmware/zpu/AUTHORS (renamed from firmware/microblaze/AUTHORS)1
-rw-r--r--firmware/zpu/CMakeLists.txt118
-rw-r--r--firmware/zpu/README16
-rw-r--r--firmware/zpu/apps/bitrot/tx_drop.c (renamed from firmware/microblaze/apps/bitrot/tx_drop.c)0
-rw-r--r--firmware/zpu/apps/bitrot/tx_drop2.c (renamed from firmware/microblaze/apps/bitrot/tx_drop2.c)0
-rw-r--r--firmware/zpu/apps/bitrot/tx_drop_rate_limited.c (renamed from firmware/microblaze/apps/bitrot/tx_drop_rate_limited.c)0
-rw-r--r--firmware/zpu/apps/blinkenlights.c (renamed from firmware/microblaze/apps/blinkenlights.c)4
-rw-r--r--firmware/zpu/apps/cruft/app_passthru_v2.c (renamed from firmware/microblaze/apps/cruft/app_passthru_v2.c)0
-rw-r--r--firmware/zpu/apps/cruft/app_passthru_v2.h (renamed from firmware/microblaze/apps/cruft/app_passthru_v2.h)0
-rw-r--r--firmware/zpu/apps/cruft/blink_leds.c (renamed from firmware/microblaze/apps/cruft/blink_leds.c)0
-rw-r--r--firmware/zpu/apps/cruft/blink_leds2.c (renamed from firmware/microblaze/apps/cruft/blink_leds2.c)0
-rw-r--r--firmware/zpu/apps/cruft/buf_ram_test.c (renamed from firmware/microblaze/apps/cruft/buf_ram_test.c)0
-rw-r--r--firmware/zpu/apps/cruft/burn_dbsrx_eeprom.c (renamed from firmware/microblaze/apps/cruft/burn_dbsrx_eeprom.c)0
-rw-r--r--firmware/zpu/apps/cruft/burnrev30.c (renamed from firmware/microblaze/apps/cruft/burnrev30.c)0
-rw-r--r--firmware/zpu/apps/cruft/burnrev31.c (renamed from firmware/microblaze/apps/cruft/burnrev31.c)0
-rw-r--r--firmware/zpu/apps/cruft/can_i_sub.c (renamed from firmware/microblaze/apps/cruft/can_i_sub.c)0
-rw-r--r--firmware/zpu/apps/cruft/double_buffer_fragment.c (renamed from firmware/microblaze/apps/cruft/double_buffer_fragment.c)0
-rw-r--r--firmware/zpu/apps/cruft/echo.c (renamed from firmware/microblaze/apps/cruft/echo.c)0
-rw-r--r--firmware/zpu/apps/cruft/eth_serdes.c (renamed from firmware/microblaze/apps/cruft/eth_serdes.c)0
-rw-r--r--firmware/zpu/apps/cruft/factory_test.c (renamed from firmware/microblaze/apps/cruft/factory_test.c)0
-rw-r--r--firmware/zpu/apps/cruft/gen_eth_packets.c (renamed from firmware/microblaze/apps/cruft/gen_eth_packets.c)0
-rw-r--r--firmware/zpu/apps/cruft/gen_pause_frames.c (renamed from firmware/microblaze/apps/cruft/gen_pause_frames.c)0
-rw-r--r--firmware/zpu/apps/cruft/hello.c (renamed from firmware/microblaze/apps/cruft/hello.c)0
-rw-r--r--firmware/zpu/apps/cruft/ibs_rx_test.c (renamed from firmware/microblaze/apps/cruft/ibs_rx_test.c)0
-rw-r--r--firmware/zpu/apps/cruft/ibs_tx_test.c (renamed from firmware/microblaze/apps/cruft/ibs_tx_test.c)0
-rw-r--r--firmware/zpu/apps/cruft/mimo_app_common_v2.c (renamed from firmware/microblaze/apps/cruft/mimo_app_common_v2.c)0
-rw-r--r--firmware/zpu/apps/cruft/mimo_app_common_v2.h (renamed from firmware/microblaze/apps/cruft/mimo_app_common_v2.h)0
-rw-r--r--firmware/zpu/apps/cruft/mimo_tx.c (renamed from firmware/microblaze/apps/cruft/mimo_tx.c)0
-rw-r--r--firmware/zpu/apps/cruft/mimo_tx_slave.c (renamed from firmware/microblaze/apps/cruft/mimo_tx_slave.c)0
-rw-r--r--firmware/zpu/apps/cruft/rcv_eth_packets.c (renamed from firmware/microblaze/apps/cruft/rcv_eth_packets.c)0
-rw-r--r--firmware/zpu/apps/cruft/read_dbids.c (renamed from firmware/microblaze/apps/cruft/read_dbids.c)0
-rw-r--r--firmware/zpu/apps/cruft/sd_bounce.c (renamed from firmware/microblaze/apps/cruft/sd_bounce.c)0
-rw-r--r--firmware/zpu/apps/cruft/sd_gentest.c (renamed from firmware/microblaze/apps/cruft/sd_gentest.c)0
-rw-r--r--firmware/zpu/apps/cruft/serdes_to_dsp.c (renamed from firmware/microblaze/apps/cruft/serdes_to_dsp.c)0
-rw-r--r--firmware/zpu/apps/cruft/serdes_txrx.c (renamed from firmware/microblaze/apps/cruft/serdes_txrx.c)0
-rw-r--r--firmware/zpu/apps/cruft/set_hw_rev.c (renamed from firmware/microblaze/apps/cruft/set_hw_rev.c)0
-rw-r--r--firmware/zpu/apps/cruft/test1.c (renamed from firmware/microblaze/apps/cruft/test1.c)0
-rw-r--r--firmware/zpu/apps/cruft/test_db_spi.c (renamed from firmware/microblaze/apps/cruft/test_db_spi.c)0
-rw-r--r--firmware/zpu/apps/cruft/test_i2c.c (renamed from firmware/microblaze/apps/cruft/test_i2c.c)0
-rw-r--r--firmware/zpu/apps/cruft/test_lsadc.c (renamed from firmware/microblaze/apps/cruft/test_lsadc.c)0
-rw-r--r--firmware/zpu/apps/cruft/test_lsdac.c (renamed from firmware/microblaze/apps/cruft/test_lsdac.c)0
-rw-r--r--firmware/zpu/apps/cruft/test_phy_comm.c (renamed from firmware/microblaze/apps/cruft/test_phy_comm.c)0
-rw-r--r--firmware/zpu/apps/cruft/test_ram.c (renamed from firmware/microblaze/apps/cruft/test_ram.c)0
-rw-r--r--firmware/zpu/apps/cruft/test_sd.c (renamed from firmware/microblaze/apps/cruft/test_sd.c)0
-rw-r--r--firmware/zpu/apps/cruft/timer_test.c (renamed from firmware/microblaze/apps/cruft/timer_test.c)0
-rw-r--r--firmware/zpu/apps/cruft/tx_standalone.c (renamed from firmware/microblaze/apps/cruft/tx_standalone.c)0
-rw-r--r--firmware/zpu/apps/flash_test.c (renamed from firmware/microblaze/apps/flash_test.c)0
-rw-r--r--firmware/zpu/apps/hardware_testbed.c (renamed from firmware/microblaze/apps/hardware_testbed.c)0
-rw-r--r--firmware/zpu/apps/txrx_uhd.c (renamed from firmware/microblaze/apps/txrx_uhd.c)305
-rw-r--r--firmware/zpu/apps/uart_flash_loader.c (renamed from firmware/microblaze/apps/uart_flash_loader.c)4
-rwxr-xr-xfirmware/zpu/bin/bin_to_mif.py (renamed from firmware/microblaze/bin/bin_to_mif.py)0
-rwxr-xr-xfirmware/zpu/bin/bin_to_ram_macro_init.py (renamed from firmware/microblaze/bin/bin_to_ram_macro_init.py)0
-rwxr-xr-xfirmware/zpu/bin/elf_to_sbf (renamed from firmware/microblaze/bin/elf_to_sbf)0
-rw-r--r--firmware/zpu/bin/sbf.py (renamed from firmware/microblaze/bin/sbf.py)0
-rwxr-xr-xfirmware/zpu/bin/serial_loader (renamed from firmware/microblaze/bin/serial_loader)0
-rwxr-xr-xfirmware/zpu/bin/uart_ihex_flash_loader.py (renamed from firmware/microblaze/bin/uart_ihex_flash_loader.py)0
-rwxr-xr-xfirmware/zpu/bin/uart_ihex_ram_loader.py (renamed from firmware/microblaze/bin/uart_ihex_ram_loader.py)0
-rwxr-xr-xfirmware/zpu/divisors.py (renamed from firmware/microblaze/divisors.py)0
-rw-r--r--firmware/zpu/lib/CMakeLists.txt47
-rw-r--r--firmware/zpu/lib/_exit.c (renamed from firmware/microblaze/lib/_exit.c)0
-rw-r--r--firmware/zpu/lib/abort.c (renamed from firmware/microblaze/lib/abort.c)0
-rw-r--r--firmware/zpu/lib/ad9510.c (renamed from firmware/microblaze/lib/ad9510.c)0
-rw-r--r--firmware/zpu/lib/ad9510.h (renamed from firmware/microblaze/lib/ad9510.h)0
-rw-r--r--firmware/zpu/lib/arp_cache.c (renamed from firmware/microblaze/lib/arp_cache.c)0
-rw-r--r--firmware/zpu/lib/arp_cache.h (renamed from firmware/microblaze/lib/arp_cache.h)0
-rw-r--r--firmware/zpu/lib/banal.c (renamed from firmware/microblaze/lib/banal.c)0
-rw-r--r--firmware/zpu/lib/banal.h (renamed from firmware/microblaze/lib/banal.h)21
-rw-r--r--firmware/zpu/lib/bootconfig.c (renamed from firmware/microblaze/lib/bootconfig.c)0
-rw-r--r--firmware/zpu/lib/clock_bits.h (renamed from firmware/microblaze/lib/clock_bits.h)0
-rw-r--r--firmware/zpu/lib/clocks.c (renamed from firmware/microblaze/lib/clocks.c)0
-rw-r--r--firmware/zpu/lib/clocks.h (renamed from firmware/microblaze/lib/clocks.h)0
-rw-r--r--firmware/zpu/lib/compiler.h (renamed from firmware/microblaze/lib/compiler.h)3
-rw-r--r--firmware/zpu/lib/eeprom.c (renamed from firmware/microblaze/lib/eeprom.c)0
-rw-r--r--firmware/zpu/lib/eth_addrs.c (renamed from firmware/microblaze/lib/eth_addrs.c)0
-rw-r--r--firmware/zpu/lib/eth_mac.c (renamed from firmware/microblaze/lib/eth_mac.c)4
-rw-r--r--firmware/zpu/lib/eth_mac.h (renamed from firmware/microblaze/lib/eth_mac.h)0
-rw-r--r--firmware/zpu/lib/eth_mac_regs.h (renamed from firmware/microblaze/lib/eth_mac_regs.h)0
-rw-r--r--firmware/zpu/lib/ethernet.h (renamed from firmware/microblaze/lib/ethernet.h)0
-rw-r--r--firmware/zpu/lib/ethertype.h (renamed from firmware/microblaze/lib/ethertype.h)0
-rw-r--r--firmware/zpu/lib/exit.c (renamed from firmware/microblaze/lib/exit.c)0
-rw-r--r--firmware/zpu/lib/gdbstub2.c (renamed from firmware/microblaze/lib/gdbstub2.c)0
-rw-r--r--firmware/zpu/lib/gdbstub2.h (renamed from firmware/microblaze/lib/gdbstub2.h)0
-rw-r--r--firmware/zpu/lib/hal_io.c (renamed from firmware/microblaze/lib/hal_io.c)0
-rw-r--r--firmware/zpu/lib/hal_io.h (renamed from firmware/microblaze/lib/hal_io.h)24
-rw-r--r--firmware/zpu/lib/hal_uart.c (renamed from firmware/microblaze/lib/hal_uart.c)2
-rw-r--r--firmware/zpu/lib/hal_uart.h (renamed from firmware/microblaze/lib/hal_uart.h)0
-rw-r--r--firmware/zpu/lib/i2c.c (renamed from firmware/microblaze/lib/i2c.c)0
-rw-r--r--firmware/zpu/lib/i2c.h (renamed from firmware/microblaze/lib/i2c.h)0
-rw-r--r--firmware/zpu/lib/i2c_async.c (renamed from firmware/microblaze/lib/i2c_async.c)0
-rw-r--r--firmware/zpu/lib/i2c_async.h (renamed from firmware/microblaze/lib/i2c_async.h)0
-rw-r--r--firmware/zpu/lib/if_arp.h (renamed from firmware/microblaze/lib/if_arp.h)0
-rw-r--r--firmware/zpu/lib/ihex.c (renamed from firmware/microblaze/lib/ihex.c)0
-rw-r--r--firmware/zpu/lib/ihex.h (renamed from firmware/microblaze/lib/ihex.h)0
-rw-r--r--firmware/zpu/lib/mdelay.c (renamed from firmware/microblaze/lib/mdelay.c)3
-rw-r--r--firmware/zpu/lib/mdelay.h (renamed from firmware/microblaze/lib/mdelay.h)0
-rw-r--r--firmware/zpu/lib/memcpy_wa.c (renamed from firmware/microblaze/lib/memcpy_wa.c)0
-rw-r--r--firmware/zpu/lib/memcpy_wa.h (renamed from firmware/microblaze/lib/memcpy_wa.h)0
-rw-r--r--firmware/zpu/lib/memset_wa.c (renamed from firmware/microblaze/lib/memset_wa.c)0
-rw-r--r--firmware/zpu/lib/memset_wa.h (renamed from firmware/microblaze/lib/memset_wa.h)0
-rw-r--r--firmware/zpu/lib/net/eth_mac_addr.h (renamed from firmware/microblaze/lib/net/eth_mac_addr.h)0
-rw-r--r--firmware/zpu/lib/net/padded_eth_hdr.h (renamed from firmware/microblaze/lib/net/padded_eth_hdr.h)0
-rw-r--r--firmware/zpu/lib/net/socket_address.h (renamed from firmware/microblaze/lib/net/socket_address.h)0
-rw-r--r--firmware/zpu/lib/net_common.c (renamed from firmware/microblaze/lib/net_common.c)101
-rw-r--r--firmware/zpu/lib/net_common.h (renamed from firmware/microblaze/lib/net_common.h)19
-rw-r--r--firmware/zpu/lib/nonstdio.c (renamed from firmware/microblaze/lib/nonstdio.c)0
-rw-r--r--firmware/zpu/lib/nonstdio.h (renamed from firmware/microblaze/lib/nonstdio.h)2
-rw-r--r--firmware/zpu/lib/pic.c (renamed from firmware/microblaze/lib/pic.c)21
-rw-r--r--firmware/zpu/lib/pic.h (renamed from firmware/microblaze/lib/pic.h)3
-rw-r--r--firmware/zpu/lib/pkt_ctrl.c64
-rw-r--r--firmware/zpu/lib/pkt_ctrl.h63
-rw-r--r--firmware/zpu/lib/print_addrs.c (renamed from firmware/microblaze/lib/print_mac_addr.c)4
-rw-r--r--firmware/zpu/lib/print_buffer.c (renamed from firmware/microblaze/lib/print_buffer.c)0
-rw-r--r--firmware/zpu/lib/print_rmon_regs.c (renamed from firmware/microblaze/lib/print_rmon_regs.c)0
-rw-r--r--firmware/zpu/lib/print_rmon_regs.h (renamed from firmware/microblaze/lib/print_rmon_regs.h)0
-rw-r--r--firmware/zpu/lib/printf.c (renamed from firmware/microblaze/lib/printf.c)0
-rw-r--r--firmware/zpu/lib/printf.c.smaller (renamed from firmware/microblaze/lib/printf.c.smaller)0
-rw-r--r--firmware/zpu/lib/spi.c (renamed from firmware/microblaze/lib/spi.c)6
-rw-r--r--firmware/zpu/lib/spi.h (renamed from firmware/microblaze/lib/spi.h)8
-rw-r--r--firmware/zpu/lib/stdint.h (renamed from firmware/microblaze/lib/stdint.h)0
-rw-r--r--firmware/zpu/lib/stdio.h (renamed from firmware/microblaze/lib/stdio.h)0
-rw-r--r--firmware/zpu/lib/u2_init.c (renamed from firmware/microblaze/lib/u2_init.c)21
-rw-r--r--firmware/zpu/lib/u2_init.h (renamed from firmware/microblaze/lib/u2_init.h)0
-rw-r--r--firmware/zpu/lib/udp_fw_update.h (renamed from firmware/microblaze/lib/udp_fw_update.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/CHANGELOG (renamed from firmware/microblaze/lwip/lwip-1.3.1/CHANGELOG)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/COPYING (renamed from firmware/microblaze/lwip/lwip-1.3.1/COPYING)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/FILES (renamed from firmware/microblaze/lwip/lwip-1.3.1/FILES)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/README (renamed from firmware/microblaze/lwip/lwip-1.3.1/README)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/doc/FILES (renamed from firmware/microblaze/lwip/lwip-1.3.1/doc/FILES)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/doc/contrib.txt (renamed from firmware/microblaze/lwip/lwip-1.3.1/doc/contrib.txt)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/doc/rawapi.txt (renamed from firmware/microblaze/lwip/lwip-1.3.1/doc/rawapi.txt)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/doc/savannah.txt (renamed from firmware/microblaze/lwip/lwip-1.3.1/doc/savannah.txt)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/doc/snmp_agent.txt (renamed from firmware/microblaze/lwip/lwip-1.3.1/doc/snmp_agent.txt)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/doc/sys_arch.txt (renamed from firmware/microblaze/lwip/lwip-1.3.1/doc/sys_arch.txt)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/.hgignore (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/.hgignore)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/FILES (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/FILES)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/api/api_lib.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/api/api_lib.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/api/api_msg.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/api/api_msg.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/api/err.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/api/err.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/api/netbuf.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/api/netbuf.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/api/netdb.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/api/netdb.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/api/netifapi.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/api/netifapi.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/api/sockets.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/api/sockets.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/api/tcpip.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/api/tcpip.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/#tcp_out.c# (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/#tcp_out.c#)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/dhcp.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/dhcp.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/dns.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/dns.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/init.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/init.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/autoip.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/autoip.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/icmp.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/icmp.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/igmp.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/igmp.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/inet.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/inet.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/inet_chksum.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/inet_chksum.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/ip.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/ip.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/ip_addr.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/ip_addr.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/ip_frag.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/ip_frag.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/ipv6/README (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv6/README)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/ipv6/icmp6.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv6/icmp6.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/ipv6/inet6.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv6/inet6.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/ipv6/ip6.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv6/ip6.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/ipv6/ip6_addr.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv6/ip6_addr.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/mem.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/mem.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/memp.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/memp.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/netif.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/netif.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/pbuf.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/pbuf.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/raw.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/raw.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/snmp/asn1_dec.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/snmp/asn1_dec.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/snmp/asn1_enc.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/snmp/asn1_enc.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/snmp/mib2.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/snmp/mib2.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/snmp/mib_structs.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/snmp/mib_structs.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/snmp/msg_in.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/snmp/msg_in.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/snmp/msg_out.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/snmp/msg_out.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/stats.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/stats.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/sys.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/sys.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/tcp.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/tcp.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/tcp_in.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/tcp_in.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/tcp_out.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/tcp_out.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/core/udp.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/core/udp.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/autoip.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/autoip.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/icmp.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/icmp.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/igmp.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/igmp.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/inet.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/inet.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/inet_chksum.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/inet_chksum.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/ip.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/ip.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/ip_addr.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/ip_addr.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/ip_frag.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/ip_frag.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/ipv6/lwip/icmp.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv6/lwip/icmp.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/ipv6/lwip/inet.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv6/lwip/inet.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/ipv6/lwip/ip.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv6/lwip/ip.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/ipv6/lwip/ip_addr.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv6/lwip/ip_addr.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/api.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/api.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/api_msg.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/api_msg.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/arch.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/arch.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/debug.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/debug.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/def.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/def.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/dhcp.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/dhcp.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/dns.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/dns.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/err.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/err.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/init.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/init.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/mem.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/mem.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/memp.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/memp.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/memp_std.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/memp_std.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/netbuf.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/netbuf.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/netdb.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/netdb.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/netif.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/netif.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/netifapi.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/netifapi.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/opt.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/opt.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/pbuf.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/pbuf.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/raw.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/raw.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/sio.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/sio.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/snmp.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/snmp.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/snmp_asn1.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/snmp_asn1.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/snmp_msg.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/snmp_msg.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/snmp_structs.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/snmp_structs.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/sockets.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/sockets.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/stats.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/stats.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/sys.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/sys.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/tcp.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/tcp.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/tcpip.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/tcpip.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/udp.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/udp.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/netif/etharp.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/netif/etharp.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/netif/loopif.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/netif/loopif.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/netif/ppp_oe.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/netif/ppp_oe.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/include/netif/slipif.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/include/netif/slipif.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/FILES (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/FILES)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/etharp.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/etharp.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ethernetif.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ethernetif.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/loopif.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/loopif.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/auth.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/auth.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/auth.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/auth.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/chap.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/chap.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/chap.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/chap.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/chpms.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/chpms.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/chpms.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/chpms.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/fsm.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/fsm.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/fsm.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/fsm.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/ipcp.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/ipcp.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/ipcp.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/ipcp.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/lcp.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/lcp.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/lcp.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/lcp.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/magic.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/magic.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/magic.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/magic.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/md5.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/md5.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/md5.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/md5.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/pap.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/pap.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/pap.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/pap.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/ppp.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/ppp.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/ppp.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/ppp.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/ppp_oe.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/ppp_oe.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/pppdebug.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/pppdebug.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/randm.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/randm.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/randm.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/randm.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/vj.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/vj.c)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/vj.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/vj.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/vjbsdhdr.h (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/vjbsdhdr.h)0
-rw-r--r--firmware/zpu/lwip/lwip-1.3.1/src/netif/slipif.c (renamed from firmware/microblaze/lwip/lwip-1.3.1/src/netif/slipif.c)0
-rw-r--r--firmware/zpu/lwip/lwipopts.h (renamed from firmware/microblaze/lwip/lwipopts.h)0
-rw-r--r--firmware/zpu/lwip/lwippools.h (renamed from firmware/microblaze/lwip/lwippools.h)0
-rw-r--r--firmware/zpu/lwip_port/arch/cc.h (renamed from firmware/microblaze/lwip_port/arch/cc.h)0
-rw-r--r--firmware/zpu/lwip_port/arch/perf.h (renamed from firmware/microblaze/lwip_port/arch/perf.h)0
-rw-r--r--firmware/zpu/lwip_port/netif/eth_driver.c (renamed from firmware/microblaze/lwip_port/netif/eth_driver.c)0
-rw-r--r--firmware/zpu/lwip_port/netif/eth_driver.h (renamed from firmware/microblaze/lwip_port/netif/eth_driver.h)0
-rw-r--r--firmware/zpu/usrp2/CMakeLists.txt (renamed from firmware/microblaze/usrp2/Makefile.am)41
-rw-r--r--firmware/zpu/usrp2/eth_phy.h (renamed from firmware/microblaze/usrp2/eth_phy.h)0
-rw-r--r--firmware/zpu/usrp2/ethernet.c (renamed from firmware/microblaze/usrp2/ethernet.c)0
-rw-r--r--firmware/zpu/usrp2/memory_map.h (renamed from firmware/microblaze/usrp2/memory_map.h)178
-rw-r--r--firmware/zpu/usrp2/sd.c (renamed from firmware/microblaze/usrp2/sd.c)0
-rw-r--r--firmware/zpu/usrp2/sd.h (renamed from firmware/microblaze/usrp2/sd.h)0
-rw-r--r--firmware/zpu/usrp2/udp_fw_update.c (renamed from firmware/microblaze/usrp2/udp_fw_update.c)0
-rw-r--r--firmware/zpu/usrp2p/CMakeLists.txt48
-rw-r--r--firmware/zpu/usrp2p/bootconfig.h (renamed from firmware/microblaze/usrp2p/bootconfig.h)0
-rw-r--r--firmware/zpu/usrp2p/bootloader/CMakeLists.txt39
-rw-r--r--firmware/zpu/usrp2p/bootloader/fpga_bootloader.c (renamed from firmware/microblaze/usrp2p/bootloader/fpga_bootloader.c)0
-rw-r--r--firmware/zpu/usrp2p/bootloader/fw_bootloader.c (renamed from firmware/microblaze/usrp2p/bootloader/fw_bootloader.c)0
-rw-r--r--firmware/zpu/usrp2p/bootloader/icap_test.c (renamed from firmware/microblaze/usrp2p/bootloader/icap_test.c)0
-rw-r--r--firmware/zpu/usrp2p/bootloader/init_bootloader.c (renamed from firmware/microblaze/usrp2p/bootloader/init_bootloader.c)22
-rw-r--r--firmware/zpu/usrp2p/bootloader/serial_loader_burner.c (renamed from firmware/microblaze/usrp2p/bootloader/serial_loader_burner.c)0
-rw-r--r--firmware/zpu/usrp2p/bootloader/spi_bootloader.c (renamed from firmware/microblaze/usrp2p/bootloader/spi_bootloader.c)0
-rw-r--r--firmware/zpu/usrp2p/bootloader/u2p2-rom.ld (renamed from firmware/microblaze/usrp2p/bootloader/u2p2-rom.ld)0
-rw-r--r--firmware/zpu/usrp2p/bootloader_utils.c48
-rw-r--r--firmware/zpu/usrp2p/bootloader_utils.h (renamed from firmware/microblaze/usrp2p/bootloader_utils.h)6
-rw-r--r--firmware/zpu/usrp2p/eth_phy.h (renamed from firmware/microblaze/usrp2p/eth_phy.h)0
-rw-r--r--firmware/zpu/usrp2p/ethernet.c (renamed from firmware/microblaze/usrp2p/ethernet.c)95
-rw-r--r--firmware/zpu/usrp2p/memory_map.h (renamed from firmware/microblaze/usrp2p/memory_map.h)238
-rw-r--r--firmware/zpu/usrp2p/spi_flash.c (renamed from firmware/microblaze/usrp2p/spi_flash.c)0
-rw-r--r--firmware/zpu/usrp2p/spi_flash.h (renamed from firmware/microblaze/usrp2p/spi_flash.h)0
-rw-r--r--firmware/zpu/usrp2p/spi_flash_private.h (renamed from firmware/microblaze/usrp2p/spi_flash_private.h)0
-rw-r--r--firmware/zpu/usrp2p/spi_flash_read.c (renamed from firmware/microblaze/usrp2p/spi_flash_read.c)6
-rw-r--r--firmware/zpu/usrp2p/spif.c (renamed from firmware/microblaze/usrp2p/spif.c)0
-rw-r--r--firmware/zpu/usrp2p/udp_fw_update.c (renamed from firmware/microblaze/usrp2p/udp_fw_update.c)0
-rw-r--r--firmware/zpu/usrp2p/xilinx_s3_icap.c (renamed from firmware/microblaze/usrp2p/xilinx_s3_icap.c)0
-rw-r--r--firmware/zpu/usrp2p/xilinx_s3_icap.h (renamed from firmware/microblaze/usrp2p/xilinx_s3_icap.h)0
321 files changed, 736 insertions, 3543 deletions
diff --git a/firmware/README b/firmware/README
index a010493c8..251486955 100644
--- a/firmware/README
+++ b/firmware/README
@@ -1,4 +1,6 @@
-This is a placeholder for the firmware code (microblaze and 8051).
+########################################################################
+# Firmware for USRP devices
+########################################################################
-The layout should have a common library of source and header files.
-Each usrp-like will have its own device-specific libs and apps.
+fx2 - firmware for USRP1
+zpu - firmware for USRP2 and N Series
diff --git a/firmware/microblaze/.gitignore b/firmware/microblaze/.gitignore
deleted file mode 100644
index e867fe87c..000000000
--- a/firmware/microblaze/.gitignore
+++ /dev/null
@@ -1,46 +0,0 @@
-/*-stamp
-/*.a
-/*.bin
-/*.dump
-/*.log
-/*.rom
-/.deps
-/*.guess
-/*.sub
-/Makefile
-/Makefile.in
-/aclocal.m4
-/autom4te.cache
-/blink_leds
-/blink_leds2
-/build
-/compile
-/config.h
-/config.h.in
-/config.log
-/config.status
-/configure
-/depcomp
-/eth_test
-/gen_eth_packets
-/ibs_rx_test
-/ibs_tx_test
-/install-sh
-/libtool
-/ltmain.sh
-/missing
-/py-compile
-/rcv_eth_packets
-/run_tests.sh
-/stamp-h1
-/test1
-/test_phy_comm
-/timer_test
-/buf_ram_test
-/buf_ram_zero
-/hello
-/configure.lineno
-/configure.guess
-/configure.sub
-*.deps
-*.o
diff --git a/firmware/microblaze/COPYING b/firmware/microblaze/COPYING
deleted file mode 100644
index 94a9ed024..000000000
--- a/firmware/microblaze/COPYING
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- <program> Copyright (C) <year> <name of author>
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/firmware/microblaze/ChangeLog b/firmware/microblaze/ChangeLog
deleted file mode 100644
index 8b1378917..000000000
--- a/firmware/microblaze/ChangeLog
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/firmware/microblaze/INSTALL b/firmware/microblaze/INSTALL
deleted file mode 100644
index 5458714e1..000000000
--- a/firmware/microblaze/INSTALL
+++ /dev/null
@@ -1,234 +0,0 @@
-Installation Instructions
-*************************
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006 Free Software Foundation, Inc.
-
-This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
-
-Basic Installation
-==================
-
-Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package. The following
-more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.
-
- The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation. It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions. Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
- It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
-
- If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release. If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
- The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
-
-The simplest way to compile this package is:
-
- 1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system.
-
- Running `configure' might take a while. While running, it prints
- some messages telling which features it is checking for.
-
- 2. Type `make' to compile the package.
-
- 3. Optionally, type `make check' to run any self-tests that come with
- the package.
-
- 4. Type `make install' to install the programs and any data files and
- documentation.
-
- 5. You can remove the program binaries and object files from the
- source code directory by typing `make clean'. To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'. There is
- also a `make maintainer-clean' target, but that is intended mainly
- for the package's developers. If you use it, you may have to get
- all sorts of other programs in order to regenerate files that came
- with the distribution.
-
-Compilers and Options
-=====================
-
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about. Run `./configure --help' for
-details on some of the pertinent environment variables.
-
- You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment. Here
-is an example:
-
- ./configure CC=c99 CFLAGS=-g LIBS=-lposix
-
- *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
-You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory. To do this, you can use GNU `make'. `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
- With a non-GNU `make', it is safer to compile the package for one
-architecture at a time in the source code directory. After you have
-installed the package for one architecture, use `make distclean' before
-reconfiguring for another architecture.
-
-Installation Names
-==================
-
-By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc. You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
-
- You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files. If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
- In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files. Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
-
- If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-Optional Features
-=================
-
-Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System). The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
- For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-Specifying the System Type
-==========================
-
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
-`--build=TYPE' option. TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
- CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
- OS KERNEL-OS
-
- See the file `config.sub' for the possible values of each field. If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
- If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
- If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists. Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
-Variables not defined in a site shell script can be set in the
-environment passed to `configure'. However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost. In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'. For example:
-
- ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).
-
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf bug. Until the bug is fixed you can use this workaround:
-
- CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-`configure' Invocation
-======================
-
-`configure' recognizes the following options to control how it operates.
-
-`--help'
-`-h'
- Print a summary of the options to `configure', and exit.
-
-`--version'
-`-V'
- Print the version of Autoconf used to generate the `configure'
- script, and exit.
-
-`--cache-file=FILE'
- Enable the cache: use and save the results of the tests in FILE,
- traditionally `config.cache'. FILE defaults to `/dev/null' to
- disable caching.
-
-`--config-cache'
-`-C'
- Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
- Do not print messages saying which checks are being made. To
- suppress all normal output, redirect it to `/dev/null' (any error
- messages will still be shown).
-
-`--srcdir=DIR'
- Look for the package's source code in directory DIR. Usually
- `configure' can determine that directory automatically.
-
-`configure' also accepts some other, not widely useful, options. Run
-`configure --help' for more details.
-
diff --git a/firmware/microblaze/Makefile.am b/firmware/microblaze/Makefile.am
deleted file mode 100644
index 52fa649c2..000000000
--- a/firmware/microblaze/Makefile.am
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright 2010 Ettus Research LLC
-#
-# Copyright 2007,2008 Free Software Foundation, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-include $(top_srcdir)/Makefile.common
-
-EXTRA_DIST = \
- u2_flash_tool
-
-SUBDIRS = \
- usrp2 \
- usrp2p \
- usrp2p/bootloader
-
diff --git a/firmware/microblaze/Makefile.common b/firmware/microblaze/Makefile.common
deleted file mode 100644
index 4e726edab..000000000
--- a/firmware/microblaze/Makefile.common
+++ /dev/null
@@ -1,88 +0,0 @@
-#
-# Copyright 2010 Ettus Research LLC
-#
-# Copyright 2007 Free Software Foundation, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-include $(top_srcdir)/lib/Makefile.inc
-
-########################################################################
-# lwIP header include dirs
-########################################################################
-LWIPDIR = $(top_srcdir)/lwip/lwip-1.3.1
-
-LWIP_INCLUDES = \
- -I$(top_srcdir)/lwip \
- -I$(top_srcdir)/lwip_port \
- -I$(LWIPDIR)/src/include \
- -I$(LWIPDIR)/src/include/ipv4
-
-########################################################################
-# misc flags for the mb-gcc compiler
-########################################################################
-MBGCC_CFLAGS = \
- --std=gnu99 -Wall -Werror-implicit-function-declaration \
- -mxl-soft-div -msoft-float -mxl-soft-mul -mxl-barrel-shift
-
-########################################################################
-# define for the hal io (FIXME move?)
-########################################################################
-#HAL_IO = -DHAL_IO_USES_DBOARD_PINS
-HAL_IO = -DHAL_IO_USES_UART
-
-########################################################################
-# common cflags and ldflags
-########################################################################
-COMMON_CFLAGS = \
- -I$(top_srcdir)/../../host/lib/usrp \
- -I$(top_srcdir)/lib \
- $(MBGCC_CFLAGS) \
- $(LWIP_INCLUDES) \
- $(HAL_IO)
-
-COMMON_LFLAGS = \
- -Wl,-Map -Wl,$(@:.elf=.map)
-
-########################################################################
-# Common stuff for building top level microblaze images
-########################################################################
-#we use COMMON_IHX_ARGS to relocate the reset and interrupt vectors to
-#just below the start of code. upon creating the BIN, any leading padding
-#is thrown out, so the .bin file is valid for uploading to USRP2P. this
-#does not affect USRP2 because the USRP2 already starts at 0x0000, and
-#because the relocate_args are not defined for USRP2's Makefile.am.
-.elf.bin:
- $(MB_OBJCOPY) -O binary $(RELOCATE_ARGS) $< $@
-
-.elf.dump:
- $(MB_OBJDUMP) -DSC $< > $@
-
-.bin.rom:
- $(HEXDUMP) -v -e'1/1 "%.2X\n"' $< > $@
-
-.elf.ihx:
- $(MB_OBJCOPY) -O ihex $(RELOCATE_ARGS) $< $@
-
-_generated_from_elf = \
- $(noinst_PROGRAMS:.elf=.map) \
- $(noinst_PROGRAMS:.elf=.bin) \
- $(noinst_PROGRAMS:.elf=.dump) \
- $(noinst_PROGRAMS:.elf=.rom) \
- $(noinst_PROGRAMS:.elf=.ihx)
-
-noinst_DATA = $(_generated_from_elf)
-
-MOSTLYCLEANFILES = $(_generated_from_elf)
diff --git a/firmware/microblaze/NEWS b/firmware/microblaze/NEWS
deleted file mode 100644
index e69de29bb..000000000
--- a/firmware/microblaze/NEWS
+++ /dev/null
diff --git a/firmware/microblaze/README b/firmware/microblaze/README
deleted file mode 100644
index 1479ffe1f..000000000
--- a/firmware/microblaze/README
+++ /dev/null
@@ -1,3 +0,0 @@
-./bootstrap
-./configure --host=mb
-make
diff --git a/firmware/microblaze/apps/cruft/Makefile.am b/firmware/microblaze/apps/cruft/Makefile.am
deleted file mode 100644
index a4f79935b..000000000
--- a/firmware/microblaze/apps/cruft/Makefile.am
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# Copyright 2010 Ettus Research LLC
-#
-# Copyright 2007,2008 Free Software Foundation, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-include $(top_srcdir)/Makefile.common
-
-LDADD = $(top_srcdir)/lib/libu2fw.a
-
-AM_CFLAGS += -I$(top_srcdir)/../../host/lib/usrp
-
-noinst_PROGRAMS = txrx_uhd.elf
-
-# blink_leds \
-# blink_leds2 \
-# buf_ram_test \
-# burn_dbsrx_eeprom \
-# can_i_sub \
-# echo \
-# hello \
-# read_dbids \
-# set_hw_rev \
-# test1 \
-# test_db_spi \
-# test_i2c \
-# test_sd \
-# test_ram \
-# test_phy_comm \
-# test_lsadc \
-# test_lsdac \
-# timer_test \
-# txrx \
-# burnrev30 \
-# burnrev31 \
-# burnrev40 \
-# sd_gentest \
-# sd_bounce
-#
-
-#nononono = \
-# eth_serdes \
-# gen_eth_packets \
-# rcv_eth_packets \
-# tx_standalone \
-# factory_test \
-# serdes_txrx \
-# mimo_tx \
-# mimo_tx_slave \
-# ibs_rx_test \
-# ibs_tx_test
-
-# tx_drop_SOURCES = tx_drop.c app_common.c
-# tx_drop_rate_limited_SOURCES = tx_drop_rate_limited.c app_common.c
-# tx_drop2_SOURCES = tx_drop2.c app_common.c
-txrx_uhd_elf_SOURCES = txrx_uhd.c
-# app_common_v2.c
-#factory_test_SOURCES = factory_test.c app_common_v2.c
-#eth_serdes_SOURCES = eth_serdes.c app_passthru_v2.c
-#serdes_txrx_SOURCES = serdes_txrx.c app_common_v2.c
-#mimo_tx_SOURCES = mimo_tx.c mimo_app_common_v2.c
-#mimo_tx_slave_SOURCES = mimo_tx_slave.c app_common_v2.c
-
-#noinst_HEADERS = \
-# app_common_v2.h \
-# app_passthru_v2.h \
-# mimo_app_common_v2.h
-#
-
diff --git a/firmware/microblaze/bootstrap b/firmware/microblaze/bootstrap
deleted file mode 100755
index 26987b0ec..000000000
--- a/firmware/microblaze/bootstrap
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-#
-# Copyright 2010 Ettus Research LLC
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-rm -rf *.cache
-rm -rf libusrp2/.deps
-rm -rf libusrp2p/.deps
-
-aclocal
-autoconf
-libtoolize --automake
-automake --add-missing --gnu --warnings=all
diff --git a/firmware/microblaze/configure.ac b/firmware/microblaze/configure.ac
deleted file mode 100644
index f6986f2dd..000000000
--- a/firmware/microblaze/configure.ac
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# Copyright 2010 Ettus Research LLC
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-##################################################
-## Setup Autotools
-##################################################
-AC_PREREQ(2.60)
-AC_INIT
-AM_INIT_AUTOMAKE(uhd-mb, 0)
-
-##################################################
-## Setup Compiler
-##################################################
-dnl Fix 2.64 cross compile detection for AVR and RTEMS
-dnl by not trying to compile fopen.
-m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.64],
- [m4_foreach([_GCC_LANG], [C, C++, Fortran, Fortran 77],
- [m4_define([_AC_LANG_IO_PROGRAM(]_GCC_LANG[)], m4_defn([AC_LANG_PROGRAM(]_GCC_LANG[)]))])])
-
-AC_PROG_CC([mb-gcc])
-AM_PROG_CC_C_O
-LT_INIT
-
-##################################################
-## Setup Tools
-##################################################
-AC_PATH_PROG([MB_OBJCOPY], [mb-objcopy])
-AC_PATH_PROG([MB_OBJDUMP], [mb-objdump])
-AC_PATH_PROG([HEXDUMP], [hexdump])
-
-##################################################
-## Create Files
-##################################################
-AC_CONFIG_FILES([ \
- Makefile \
- usrp2p/bootloader/Makefile \
- usrp2/Makefile \
- usrp2p/Makefile \
-])
-AC_OUTPUT
diff --git a/firmware/microblaze/lib/Makefile.inc b/firmware/microblaze/lib/Makefile.inc
deleted file mode 100644
index 38c630df4..000000000
--- a/firmware/microblaze/lib/Makefile.inc
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# Copyright 2010 Ettus Research LLC
-#
-# Copyright 2007 Free Software Foundation, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-COMMON_SRCS = \
- $(top_srcdir)/lib/u2_init.c \
- $(top_srcdir)/lib/abort.c \
- $(top_srcdir)/lib/ad9510.c \
- $(top_srcdir)/lib/bsm12.c \
- $(top_srcdir)/lib/buffer_pool.c \
- $(top_srcdir)/lib/clocks.c \
- $(top_srcdir)/lib/dbsm.c \
- $(top_srcdir)/lib/eeprom.c \
- $(top_srcdir)/lib/eth_addrs.c \
- $(top_srcdir)/lib/eth_mac.c \
- $(top_srcdir)/lib/_exit.c \
- $(top_srcdir)/lib/exit.c \
- $(top_srcdir)/lib/hal_io.c \
- $(top_srcdir)/lib/hal_uart.c \
- $(top_srcdir)/lib/i2c.c \
- $(top_srcdir)/lib/i2c_async.c \
- $(top_srcdir)/lib/mdelay.c \
- $(top_srcdir)/lib/memcpy_wa.c \
- $(top_srcdir)/lib/memset_wa.c \
- $(top_srcdir)/lib/nonstdio.c \
- $(top_srcdir)/lib/pic.c \
- $(top_srcdir)/lib/print_mac_addr.c \
- $(top_srcdir)/lib/print_rmon_regs.c \
- $(top_srcdir)/lib/print_buffer.c \
- $(top_srcdir)/lib/printf.c \
- $(top_srcdir)/lib/ihex.c \
- $(top_srcdir)/lib/spi.c \
- $(top_srcdir)/lib/net_common.c \
- $(top_srcdir)/lib/arp_cache.c \
- $(top_srcdir)/lib/banal.c
diff --git a/firmware/microblaze/lib/bsm12.c b/firmware/microblaze/lib/bsm12.c
deleted file mode 100644
index 3f17fe42d..000000000
--- a/firmware/microblaze/lib/bsm12.c
+++ /dev/null
@@ -1,319 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 Free Software Foundation, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * buffer state machine: 1 input to two outputs
- *
- * Typically used to read packets from the ethernet and then after inspecting,
- * handle the packet in firmware or pass it on to 1 of the 2 buffer destinations.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "bsm12.h"
-#include "memory_map.h"
-#include "buffer_pool.h"
-#include <stdbool.h>
-#include "nonstdio.h"
-#include <stdlib.h>
-
-typedef enum {
- BS_EMPTY,
- BS_FILLING,
- BS_FULL,
- BS_EMPTYING,
-} buffer_state_t;
-
-static buffer_state_t buffer_state[NBUFFERS];
-static uint32_t last_send_ctrl[NBUFFERS];
-static int8_t buffer_target[NBUFFERS]; // -1, 0 or 1.
-static uint8_t buffer_dst[NBUFFERS]; // 0 or 1. Valid only when BF_EMPTYING
-
-#define ST_IDLE (-1)
-
-void
-bsm12_init(bsm12_t *sm, int buf0,
- const buf_cmd_args_t *recv,
- const buf_cmd_args_t *send0,
- const buf_cmd_args_t *send1,
- bsm12_inspector_t inspect)
-{
- if (buf0 & 0x3) // precondition: buf0 % 4 == 0
- abort();
-
- sm->buf0 = buf0;
- sm->running = false;
- sm->recv_args = *recv;
- sm->send_args[0] = *send0;
- sm->send_args[1] = *send1;
-
- sm->rx_state = ST_IDLE;
- sm->tx_state[0] = ST_IDLE;
- sm->tx_state[1] = ST_IDLE;
-
- sm->inspect = inspect;
-
- sm->bps_error = BPS_ERROR(buf0 + 0) | BPS_ERROR(buf0 + 1) | BPS_ERROR(buf0 + 2);
- sm->bps_done = BPS_DONE(buf0 + 0) | BPS_DONE(buf0 + 1) | BPS_DONE(buf0 + 2);
- sm->bps_error_or_done = sm->bps_error | sm->bps_done;
-
- // How much to adjust the last_line register.
- // It's 1 for everything but the ethernet.
- sm->last_line_adj = recv->port == PORT_ETH ? 3 : 1;
-
- buffer_state[sm->buf0 + 0] = BS_EMPTY;
- buffer_state[sm->buf0 + 1] = BS_EMPTY;
- buffer_state[sm->buf0 + 2] = BS_EMPTY;
-
- buffer_target[sm->buf0 + 0] = -1;
- buffer_target[sm->buf0 + 1] = -1;
- buffer_target[sm->buf0 + 2] = -1;
-
- for (int i = 0; i < NBUFFERS; i++)
- sm->next_buf[i] = buf0;
-
- sm->next_buf[buf0 + 0] = buf0 + 1;
- sm->next_buf[buf0 + 1] = buf0 + 2;
- sm->next_buf[buf0 + 2] = buf0 + 0;
-
- for (int i = 0; i < 3; i++){
- sm->precomputed_receive_to_buf_ctrl_word[i] =
- (BPC_READ
- | BPC_BUFFER(sm->buf0 + i)
- | BPC_PORT(sm->recv_args.port)
- | BPC_STEP(1)
- | BPC_FIRST_LINE(sm->recv_args.first_line)
- | BPC_LAST_LINE(sm->recv_args.last_line));
-
- for (int j = 0; j < 2; j++){
- sm->precomputed_send_from_buf_ctrl_word[i][j] =
- (BPC_WRITE
- | BPC_BUFFER(sm->buf0 + i)
- | BPC_PORT(sm->send_args[j].port)
- | BPC_STEP(1)
- | BPC_FIRST_LINE(sm->send_args[j].first_line)
- | BPC_LAST_LINE(0)); // last line filled in at runtime
- }
- }
-}
-
-static inline void
-bsm12_receive_to_buf(bsm12_t *sm, int bufno)
-{
- buffer_pool_ctrl->ctrl = sm->precomputed_receive_to_buf_ctrl_word[bufno & 0x3];
-}
-
-static inline void
-bsm12_send_from_buf(bsm12_t *sm, int bufno, int dst_idx)
-{
- dst_idx &= 0x1;
-
- uint32_t t =
- (sm->precomputed_send_from_buf_ctrl_word[bufno & 0x3][dst_idx]
- | BPC_LAST_LINE(buffer_pool_status->last_line[bufno] - sm->last_line_adj));
-
- buffer_pool_ctrl->ctrl = t;
- last_send_ctrl[bufno] = t;
- buffer_dst[bufno] = dst_idx;
-}
-
-static inline void
-bsm12_resend_from_buf(bsm12_t *sm, int bufno)
-{
- buffer_pool_ctrl->ctrl = last_send_ctrl[bufno];
-}
-
-void
-bsm12_start(bsm12_t *sm)
-{
- sm->running = true;
-
- buffer_state[sm->buf0 + 0] = BS_EMPTY;
- buffer_state[sm->buf0 + 1] = BS_EMPTY;
- buffer_state[sm->buf0 + 2] = BS_EMPTY;
-
- buffer_target[sm->buf0 + 0] = -1;
- buffer_target[sm->buf0 + 1] = -1;
- buffer_target[sm->buf0 + 2] = -1;
-
- bp_clear_buf(sm->buf0 + 0);
- bp_clear_buf(sm->buf0 + 1);
- bp_clear_buf(sm->buf0 + 2);
-
- sm->rx_state = 0;
- sm->tx_state[0] = ST_IDLE;
- sm->tx_state[1] = ST_IDLE;
- bsm12_receive_to_buf(sm, sm->buf0);
- buffer_state[sm->buf0] = BS_FILLING;
-}
-
-void
-bsm12_stop(bsm12_t *sm)
-{
- sm->running = false;
- bp_clear_buf(sm->buf0 + 0);
- bp_clear_buf(sm->buf0 + 1);
- bp_clear_buf(sm->buf0 + 2);
- buffer_state[sm->buf0 + 0] = BS_EMPTY;
- buffer_state[sm->buf0 + 1] = BS_EMPTY;
- buffer_state[sm->buf0 + 2] = BS_EMPTY;
-}
-
-static void bsm12_process_helper(bsm12_t *sm, int buf_this);
-static void bsm12_error_helper(bsm12_t *sm, int buf_this);
-
-void
-bsm12_process_status(bsm12_t *sm, uint32_t status)
-{
- // anything for us?
- if ((status & sm->bps_error_or_done) == 0 || !sm->running)
- return;
-
- if (status & sm->bps_error){
- // Most likely an ethernet Rx error. We just restart the transfer.
- if (status & (BPS_ERROR(sm->buf0 + 0)))
- bsm12_error_helper(sm, sm->buf0 + 0);
-
- if (status & (BPS_ERROR(sm->buf0 + 1)))
- bsm12_error_helper(sm, sm->buf0 + 1);
-
- if (status & (BPS_ERROR(sm->buf0 + 2)))
- bsm12_error_helper(sm, sm->buf0 + 2);
- }
-
- if (status & BPS_DONE(sm->buf0 + 0))
- bsm12_process_helper(sm, sm->buf0 + 0);
-
- if (status & BPS_DONE(sm->buf0 + 1))
- bsm12_process_helper(sm, sm->buf0 + 1);
-
- if (status & BPS_DONE(sm->buf0 + 2))
- bsm12_process_helper(sm, sm->buf0 + 2);
-}
-
- static void
-bsm12_process_helper(bsm12_t *sm, int buf_this)
-{
- bp_clear_buf(buf_this);
-
- if (buffer_state[buf_this] == BS_FILLING){
-
- buffer_state[buf_this] = BS_FULL;
- buffer_target[buf_this] = -1;
-
- //
- // where does this packet go?
- //
- int dst = sm->inspect(sm, buf_this);
- if (dst == -1){
- //
- // f/w handled the packet; refill the buffer
- //
- bsm12_receive_to_buf(sm, buf_this);
- buffer_state[buf_this] = BS_FILLING;
- buffer_target[buf_this] = -1;
- sm->rx_state = buf_this & 0x3;
- }
- else { // goes to dst 0 or 1
- //
- // If the next buffer is empty, start a receive on it
- //
- int t = sm->next_buf[buf_this];
- if (buffer_state[t] == BS_EMPTY){
- bsm12_receive_to_buf(sm, t);
- buffer_state[t] = BS_FILLING;
- buffer_target[t] = -1;
- sm->rx_state = t & 0x3;
- }
- else
- sm->rx_state = ST_IDLE;
-
- //
- // If the destination is idle, start the xfer, othewise remember it
- //
- if (sm->tx_state[dst] == ST_IDLE){
- bsm12_send_from_buf(sm, buf_this, dst);
- sm->tx_state[dst] = buf_this & 0x3;
- buffer_state[buf_this] = BS_EMPTYING;
- buffer_target[buf_this] = -1;
- }
- else {
- buffer_target[buf_this] = dst;
- }
- }
- }
-
- else { // BS_EMPTYING
-
- buffer_state[buf_this] = BS_EMPTY;
- buffer_target[buf_this] = -1;
-
- if (sm->rx_state == ST_IDLE){ // fire off another receive
- sm->rx_state = buf_this & 0x3;
- bsm12_receive_to_buf(sm, buf_this);
- buffer_state[buf_this] = BS_FILLING;
- buffer_target[buf_this] = -1;
- }
-
- int dst = buffer_dst[buf_this]; // the dst we were emptying into
- // is the next buffer full and for us?
- int t = sm->next_buf[buf_this];
- if (buffer_target[t] == dst){ // yes,
- bsm12_send_from_buf(sm, t, dst); // send it
- buffer_state[t] = BS_EMPTYING;
- buffer_target[t] = -1;
- sm->tx_state[dst] = t & 0x3;
- }
- // how about the one after that?
- else if (buffer_target[t=sm->next_buf[t]] == dst){ // yes,
- bsm12_send_from_buf(sm, t, dst); // send it
- buffer_state[t] = BS_EMPTYING;
- buffer_target[t] = -1;
- sm->tx_state[dst] = t & 0x3;
- }
- else {
- sm->tx_state[dst] = ST_IDLE;
- }
- }
-}
-
-static void
-bsm12_error_helper(bsm12_t *sm, int buf_this)
-{
- bp_clear_buf(buf_this); // clears ERROR flag
-
- if (buffer_state[buf_this] == BS_FILLING){
- bsm12_receive_to_buf(sm, buf_this); // restart the xfer
- }
- else { // buffer was emptying
- bsm12_resend_from_buf(sm, buf_this); // restart the xfer
- }
-}
-
-
-void
-bsm12_handle_tx_underrun(bsm12_t *sm)
-{
-}
-
-void
-bsm12_handle_rx_overrun(bsm12_t *sm)
-{
-}
diff --git a/firmware/microblaze/lib/bsm12.h b/firmware/microblaze/lib/bsm12.h
deleted file mode 100644
index b8e576b79..000000000
--- a/firmware/microblaze/lib/bsm12.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 Free Software Foundation, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef INCLUDED_BSM12_H
-#define INCLUDED_BSM12_H
-
-#include "dbsm.h"
-#include "memory_map.h"
-
-/*!
- * buffer state machine: 1 input to two outputs
- *
- * Typically used to read packets from the ethernet and then after inspecting,
- * handle the packet in firmware or pass it on to 1 of the 2 buffer destinations.
- */
-
-struct _bsm12;
-typedef struct _bsm12 bsm12_t;
-
-/*!
- * Pointer to function that does packet inspection.
- *
- * \param sm the state machine
- * \param buf_this the index of the buffer to inspect and/or pass on
- *
- * Returns -1, 0 or 1. If it returns -1, it means that the s/w
- * handled that packet, and that it should NOT be passed on to one of
- * the buffer endpoints. 0 indicates the first endpoint, 1 the second endpoint.
- */
-typedef int (*bsm12_inspector_t)(bsm12_t *sm, int buf_this);
-
-
-/*!
- * buffer state machine: 1 input to two outputs
- */
-struct _bsm12
-{
- uint8_t buf0; // This machine uses buf0, buf0+1 and buf0+2. buf0 % 4 == 0.
- uint8_t running;
- int8_t rx_state; // -1, 0, 1, 2 which buffer we're receiving into
- int8_t tx_state[2]; // -1, 0, 1, 2 which buffer we're sending from
- buf_cmd_args_t recv_args;
- buf_cmd_args_t send_args[2];
- bsm12_inspector_t inspect;
- int last_line_adj;
- uint32_t bps_error;
- uint32_t bps_done;
- uint32_t bps_error_or_done;
- uint8_t next_buf[NBUFFERS];
- uint32_t precomputed_receive_to_buf_ctrl_word[3];
- uint32_t precomputed_send_from_buf_ctrl_word[4][2]; // really only 3, not 4
- // (easier addr comp)
-};
-
-void bsm12_init(bsm12_t *sm, int buf0,
- const buf_cmd_args_t *recv,
- const buf_cmd_args_t *send0,
- const buf_cmd_args_t *send1,
- bsm12_inspector_t inspect);
-
-void bsm12_start(bsm12_t *sm);
-void bsm12_stop(bsm12_t *sm);
-void bsm12_process_status(bsm12_t *sm, uint32_t status);
-void bsm12_handle_tx_underrun(bsm12_t *sm);
-void bsm12_handle_rx_overrun(bsm12_t *sm);
-
-
-#endif /* INCLUDED_BSM12_H */
diff --git a/firmware/microblaze/lib/buffer_pool.c b/firmware/microblaze/lib/buffer_pool.c
deleted file mode 100644
index 77e7c5213..000000000
--- a/firmware/microblaze/lib/buffer_pool.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "memory_map.h"
-#include "buffer_pool.h"
-#include "hal_io.h"
-
-void
-bp_init(void)
-{
- int i;
- bp_disable_port(PORT_SERDES);
- bp_disable_port(PORT_DSP);
- bp_disable_port(PORT_ETH);
- bp_disable_port(PORT_RAM);
-
- for (i = 0; i < NBUFFERS; i++)
- bp_clear_buf(i);
-}
-
-#ifndef INLINE_BUFFER_POOL
-
-void
-bp_clear_buf(int bufnum)
-{
- buffer_pool_ctrl->ctrl = BPC_BUFFER(bufnum) | BPC_PORT_NIL | BPC_CLR;
-}
-
-void
-bp_disable_port(int portnum)
-{
- // disable buffer connections to this port
- buffer_pool_ctrl->ctrl = BPC_BUFFER_NIL | BPC_PORT(portnum);
-}
-
-void
-bp_receive_to_buf(int bufnum, int port, int step, int fl, int ll)
-{
- buffer_pool_ctrl->ctrl = (BPC_READ
- | BPC_BUFFER(bufnum)
- | BPC_PORT(port)
- | BPC_STEP(step)
- | BPC_FIRST_LINE(fl)
- | BPC_LAST_LINE(ll));
-}
-
-void
-bp_send_from_buf(int bufnum, int port, int step, int fl, int ll)
-{
- buffer_pool_ctrl->ctrl = (BPC_WRITE
- | BPC_BUFFER(bufnum)
- | BPC_PORT(port)
- | BPC_STEP(step)
- | BPC_FIRST_LINE(fl)
- | BPC_LAST_LINE(ll));
-}
-
-#endif
diff --git a/firmware/microblaze/lib/buffer_pool.h b/firmware/microblaze/lib/buffer_pool.h
deleted file mode 100644
index 145b20f8d..000000000
--- a/firmware/microblaze/lib/buffer_pool.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef INCLUDED_BUFFER_POOL_H
-#define INCLUDED_BUFFER_POOL_H
-
-#include "memory_map.h"
-
-// Buffer Pool Management
-
-
-// define to have common buffer operations inlined
-#define INLINE_BUFFER_POOL 1
-
-void bp_init(void);
-
-#ifndef INLINE_BUFFER_POOL
-
-void bp_clear_buf(int bufnum);
-void bp_disable_port(int portnum);
-void bp_receive_to_buf(int bufnum, int port, int step, int fl, int ll);
-void bp_send_from_buf(int bufnum, int port, int step, int fl, int ll);
-
-#else
-
-static inline void
-bp_clear_buf(int bufnum)
-{
- buffer_pool_ctrl->ctrl = BPC_BUFFER(bufnum) | BPC_PORT_NIL | BPC_CLR;
-}
-
-static inline void
-bp_disable_port(int portnum)
-{
- // disable buffer connections to this port
- buffer_pool_ctrl->ctrl = BPC_BUFFER_NIL | BPC_PORT(portnum);
-}
-
-static inline void
-bp_receive_to_buf(int bufnum, int port, int step, int fl, int ll)
-{
- buffer_pool_ctrl->ctrl = (BPC_READ
- | BPC_BUFFER(bufnum)
- | BPC_PORT(port)
- | BPC_STEP(step)
- | BPC_FIRST_LINE(fl)
- | BPC_LAST_LINE(ll));
-}
-
-static inline void
-bp_send_from_buf(int bufnum, int port, int step, int fl, int ll)
-{
- buffer_pool_ctrl->ctrl = (BPC_WRITE
- | BPC_BUFFER(bufnum)
- | BPC_PORT(port)
- | BPC_STEP(step)
- | BPC_FIRST_LINE(fl)
- | BPC_LAST_LINE(ll));
-}
-#endif
-#endif
diff --git a/firmware/microblaze/lib/dbsm.c b/firmware/microblaze/lib/dbsm.c
deleted file mode 100644
index cee343eaa..000000000
--- a/firmware/microblaze/lib/dbsm.c
+++ /dev/null
@@ -1,299 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * Double Buffering State Machine
- */
-
-#include "dbsm.h"
-#include "memory_map.h"
-#include "buffer_pool.h"
-#include <stdbool.h>
-#include "nonstdio.h"
-#include <stdlib.h>
-
-typedef enum {
- BS_EMPTY,
- BS_FILLING,
- BS_FULL,
- BS_EMPTYING,
-} buffer_state_t;
-
-static buffer_state_t buffer_state[NBUFFERS];
-
-bool
-dbsm_nop_inspector(dbsm_t *sm, int buf_this)
-{
- return false;
-}
-
-void
-dbsm_init(dbsm_t *sm, int buf0,
- const buf_cmd_args_t *recv, const buf_cmd_args_t *send,
- inspector_t inspect)
-{
- if (buf0 & 0x1) // must be even
- abort();
-
- sm->buf0 = buf0;
- sm->running = false;
- sm->recv_args = *recv;
- sm->send_args = *send;
-
- sm->rx_idle = true;
- sm->tx_idle = true;
-
- sm->inspect = inspect;
-
- // How much to adjust the last_line register.
- // It's 1 for everything but the ethernet.
- //sm->last_line_adj = recv->port == PORT_ETH ? 3 : 1;
- sm->last_line_adj = 1;
-
- buffer_state[sm->buf0] = BS_EMPTY;
- buffer_state[sm->buf0 ^ 1] = BS_EMPTY;
-
- sm->precomputed_receive_to_buf_ctrl_word[0] =
- (BPC_READ
- | BPC_BUFFER(sm->buf0)
- | BPC_PORT(sm->recv_args.port)
- | BPC_STEP(1)
- | BPC_FIRST_LINE(sm->recv_args.first_line)
- | BPC_LAST_LINE(sm->recv_args.last_line));
-
- sm->precomputed_receive_to_buf_ctrl_word[1] =
- (BPC_READ
- | BPC_BUFFER(sm->buf0 ^ 1)
- | BPC_PORT(sm->recv_args.port)
- | BPC_STEP(1)
- | BPC_FIRST_LINE(sm->recv_args.first_line)
- | BPC_LAST_LINE(sm->recv_args.last_line));
-
- sm->precomputed_send_from_buf_ctrl_word[0] =
- (BPC_WRITE
- | BPC_BUFFER(sm->buf0)
- | BPC_PORT(sm->send_args.port)
- | BPC_STEP(1)
- | BPC_FIRST_LINE(sm->send_args.first_line)
- | BPC_LAST_LINE(0)); // last line filled in at runtime
-
- sm->precomputed_send_from_buf_ctrl_word[1] =
- (BPC_WRITE
- | BPC_BUFFER(sm->buf0 ^ 1)
- | BPC_PORT(sm->send_args.port)
- | BPC_STEP(1)
- | BPC_FIRST_LINE(sm->send_args.first_line)
- | BPC_LAST_LINE(0)); // last line filled in at runtime
-
-}
-
-static inline void
-dbsm_receive_to_buf(dbsm_t *sm, int bufno)
-{
- buffer_pool_ctrl->ctrl = sm->precomputed_receive_to_buf_ctrl_word[bufno & 1];
-}
-
-static inline void
-dbsm_send_from_buf(dbsm_t *sm, int bufno)
-{
- buffer_pool_ctrl->ctrl =
- (sm->precomputed_send_from_buf_ctrl_word[bufno & 1]
- | BPC_LAST_LINE(buffer_pool_status->last_line[bufno] - sm->last_line_adj));
-}
-
-void
-dbsm_start(dbsm_t *sm)
-{
- // printf("dbsm_start: buf0 = %d, recv_port = %d\n", sm->buf0, sm->recv_args.port);
-
- sm->running = true;
-
- buffer_state[sm->buf0] = BS_EMPTY;
- buffer_state[sm->buf0 ^ 1] = BS_EMPTY;
-
- bp_clear_buf(sm->buf0);
- bp_clear_buf(sm->buf0 ^ 1);
-
- sm->tx_idle = true;
- sm->rx_idle = false;
- dbsm_receive_to_buf(sm, sm->buf0);
- buffer_state[sm->buf0] = BS_FILLING;
-
-}
-
-
-void
-dbsm_stop(dbsm_t *sm)
-{
- sm->running = false;
- bp_clear_buf(sm->buf0);
- bp_clear_buf(sm->buf0 ^ 1);
- buffer_state[sm->buf0] = BS_EMPTY;
- buffer_state[sm->buf0 ^ 1] = BS_EMPTY;
-}
-
-static void dbsm_process_helper(dbsm_t *sm, int buf_this);
-static void dbsm_error_helper(dbsm_t *sm, int buf_this);
-
-void
-dbsm_process_status(dbsm_t *sm, uint32_t status)
-{
- if (!sm->running)
- return;
-
- if (status & (BPS_ERROR(sm->buf0) | BPS_ERROR(sm->buf0 ^ 1))){
- putchar('E');
- // Most likely an ethernet Rx error. We just restart the transfer.
- if (status & (BPS_ERROR(sm->buf0)))
- dbsm_error_helper(sm, sm->buf0);
- //dbsm_process_helper(sm, sm->buf0); //forward errors
-
- if (status & (BPS_ERROR(sm->buf0 ^ 1)))
- dbsm_error_helper(sm, sm->buf0 ^ 1);
- //dbsm_process_helper(sm, sm->buf0 ^ 1); //forward errors
- }
-
- if (status & BPS_DONE(sm->buf0))
- dbsm_process_helper(sm, sm->buf0);
-
- if (status & BPS_DONE(sm->buf0 ^ 1))
- dbsm_process_helper(sm, sm->buf0 ^ 1);
-}
-
-static void
-dbsm_process_helper(dbsm_t *sm, int buf_this)
-{
- int buf_other = buf_this ^ 1;
-
- bp_clear_buf(buf_this);
-
- if (buffer_state[buf_this] == BS_FILLING){
- buffer_state[buf_this] = BS_FULL;
- //
- // does s/w handle this packet?
- //
- if (sm->inspect(sm, buf_this)){
- // s/w handled the packet; refill the buffer
- dbsm_receive_to_buf(sm, buf_this);
- buffer_state[buf_this] = BS_FILLING;
- }
-
- else { // s/w didn't handle this; pass it on
-
- if(buffer_state[buf_other] == BS_EMPTY){
- dbsm_receive_to_buf(sm, buf_other);
- buffer_state[buf_other] = BS_FILLING;
- }
- else
- sm->rx_idle = true;
-
- if (sm->tx_idle){
- sm->tx_idle = false;
- dbsm_send_from_buf(sm, buf_this);
- buffer_state[buf_this] = BS_EMPTYING;
- }
- }
- }
- else { // buffer was emptying
- buffer_state[buf_this] = BS_EMPTY;
- if (sm->rx_idle){
- sm->rx_idle = false;
- dbsm_receive_to_buf(sm, buf_this);
- buffer_state[buf_this] = BS_FILLING;
- }
- if (buffer_state[buf_other] == BS_FULL){
- dbsm_send_from_buf(sm, buf_other);
- buffer_state[buf_other] = BS_EMPTYING;
- }
- else
- sm->tx_idle = true;
- }
-}
-
-static void
-dbsm_error_helper(dbsm_t *sm, int buf_this)
-{
- bp_clear_buf(buf_this); // clears ERROR flag
-
- if (buffer_state[buf_this] == BS_FILLING){
- dbsm_receive_to_buf(sm, buf_this); // restart the xfer
- }
- else { // buffer was emptying
- dbsm_send_from_buf(sm, buf_this); // restart the xfer
- }
-}
-
-/*
- * Handle DSP Tx underrun
- */
-void
-dbsm_handle_tx_underrun(dbsm_t *sm)
-{
- // clear the DSP Tx state machine
- sr_tx_ctrl->clear_state = 1;
-
- // If there's a buffer that's empyting, clear it & flush xfer
-
- if (buffer_state[sm->buf0] == BS_EMPTYING){
- bp_clear_buf(sm->buf0);
- sr_tx_ctrl->clear_state = 1; // flush partial packet
- // drop frame in progress on ground. Pretend it finished
- dbsm_process_helper(sm, sm->buf0);
- }
- else if (buffer_state[sm->buf0 ^ 1] == BS_EMPTYING){
- bp_clear_buf(sm->buf0 ^ 1);
- sr_tx_ctrl->clear_state = 1; // flush partial packet
- // drop frame in progress on ground. Pretend it finished
- dbsm_process_helper(sm, sm->buf0 ^ 1);
- }
-}
-
-/*
- * Handle DSP Rx overrun
- */
-void
-dbsm_handle_rx_overrun(dbsm_t *sm)
-{
- sr_rx_ctrl->clear_overrun = 1;
-
- // If there's a buffer that's filling, clear it.
- // Any restart will be the job of the caller.
-
- if (buffer_state[sm->buf0] == BS_FILLING)
- bp_clear_buf(sm->buf0);
-
- if (buffer_state[sm->buf0 ^1] == BS_FILLING)
- bp_clear_buf(sm->buf0 ^ 1);
-}
-
-void
-dbsm_wait_for_opening(dbsm_t *sm)
-{
- if (buffer_state[sm->buf0] == BS_EMPTYING){
- // wait for xfer to complete
- int mask = BPS_DONE(sm->buf0) | BPS_ERROR(sm->buf0) | BPS_IDLE(sm->buf0);
- while ((buffer_pool_status->status & mask) == 0)
- ;
- }
- else if (buffer_state[sm->buf0 ^ 1] == BS_EMPTYING){
- // wait for xfer to complete
- int mask = BPS_DONE(sm->buf0 ^ 1) | BPS_ERROR(sm->buf0 ^ 1) | BPS_IDLE(sm->buf0 ^ 1);
- while ((buffer_pool_status->status & mask) == 0)
- ;
- }
-}
diff --git a/firmware/microblaze/lib/dbsm.h b/firmware/microblaze/lib/dbsm.h
deleted file mode 100644
index cb7e12fc3..000000000
--- a/firmware/microblaze/lib/dbsm.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef INCLUDED_DBSM_H
-#define INCLUDED_DBSM_H
-
-/*
- * Double Buffering State Machine
- */
-
-#include <stdint.h>
-#include <stdbool.h>
-
-struct _dbsm;
-typedef struct _dbsm dbsm_t;
-
-/*
- * pointer to function that does packet inspection.
- *
- * If one of these returns true, it means that the s/w
- * handled that packet, and that it should NOT be passed
- * on to the normal destination port.
- */
-typedef bool (*inspector_t)(dbsm_t *sm, int buf_this);
-
-bool dbsm_nop_inspector(dbsm_t *sm, int buf_this); // returns false
-
-
-typedef struct
-{
- uint16_t port;
- uint16_t first_line;
- uint16_t last_line;
-} buf_cmd_args_t;
-
-/*!
- * double buffer state machine
- */
-struct _dbsm
-{
- uint8_t buf0; // Must be even. This machine uses buf0 and buf0+1
- uint8_t running;
- uint8_t rx_idle;
- uint8_t tx_idle;
- buf_cmd_args_t recv_args;
- buf_cmd_args_t send_args;
- inspector_t inspect;
- uint32_t precomputed_receive_to_buf_ctrl_word[2];
- uint32_t precomputed_send_from_buf_ctrl_word[2];
- int last_line_adj;
-};
-
-void dbsm_init(dbsm_t *sm, int buf0,
- const buf_cmd_args_t *recv, const buf_cmd_args_t *send,
- inspector_t inspect);
-
-void dbsm_start(dbsm_t *sm);
-void dbsm_stop(dbsm_t *sm);
-void dbsm_process_status(dbsm_t *sm, uint32_t status);
-void dbsm_handle_tx_underrun(dbsm_t *sm);
-void dbsm_handle_rx_overrun(dbsm_t *sm);
-
-/*
- * The cpu calls this when it want to ensure that it can send a buffer
- * to the same destination being used by this state machine.
- *
- * If neither buffer is EMPTYING it returns immediately. If a buffer
- * is EMPYTING, it waits for the h/w to transition to the DONE or
- * ERROR state.
- *
- * When this function returns, the caller queues it's buffer and busy
- * waits for it to complete.
- */
-void dbsm_wait_for_opening(dbsm_t *sm);
-
-#endif /* INCLUDED_DBSM_H */
diff --git a/firmware/microblaze/lib/net/.gitignore b/firmware/microblaze/lib/net/.gitignore
deleted file mode 100644
index 282522db0..000000000
--- a/firmware/microblaze/lib/net/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/firmware/microblaze/lib/usrp2_bytesex.h b/firmware/microblaze/lib/usrp2_bytesex.h
deleted file mode 100644
index 2b74f2a0b..000000000
--- a/firmware/microblaze/lib/usrp2_bytesex.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef INCLUDED_USRP2_BYTESEX_H
-#define INCLUDED_USRP2_BYTESEX_H
-
-// The USRP2 speaks big-endian...
-// Use the standard include files or provide substitutions for
-// htons and friends
-
-#if defined(HAVE_ARPA_INET_H)
-#include <arpa/inet.h>
-#elif defined(HAVE_NETINET_IN_H)
-#include <netinet/in.h>
-#else
-#include <stdint.h>
-
-#ifdef WORDS_BIGENDIAN // nothing to do...
-
-static inline uint32_t htonl(uint32_t x){ return x; }
-static inline uint16_t htons(uint16_t x){ return x; }
-static inline uint32_t ntohl(uint32_t x){ return x; }
-static inline uint16_t ntohs(uint16_t x){ return x; }
-
-#else
-
-#ifdef HAVE_BYTESWAP_H
-#include <byteswap.h>
-#else
-
-static inline uint16_t
-bswap_16 (uint16_t x)
-{
- return ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8));
-}
-
-static inline uint32_t
-bswap_32 (uint32_t x)
-{
- return ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) \
- | (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24));
-}
-#endif
-
-static inline uint32_t htonl(uint32_t x){ return bswap_32(x); }
-static inline uint16_t htons(uint16_t x){ return bswap_16(x); }
-static inline uint32_t ntohl(uint32_t x){ return bswap_32(x); }
-static inline uint16_t ntohs(uint16_t x){ return bswap_16(x); }
-
-#endif
-#endif
-#endif /* INCLUDED_USRP2_BYTESEX_H */
diff --git a/firmware/microblaze/lib/wb16550.h b/firmware/microblaze/lib/wb16550.h
deleted file mode 100644
index 7522f4438..000000000
--- a/firmware/microblaze/lib/wb16550.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- c -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-// Wishbone National Semiconductor 16550A compatible UART
-
-#ifndef INCLUDED_WB16550_H
-#define INCLUDED_WB16550_H
-
-#include <stdint.h>
-
-typedef struct {
- volatile uint8_t data; // 0 r/w: r: rx fifo, w: tx fifo (if DLAB: LSB of divisor)
- volatile uint8_t ier; // 1 r/w: Interrupt Enable Register (if DLAB: MSB of divisor)
- volatile uint8_t iir_fcr; // 2 r/w: r: Interrupt ID Register,
- // w: Fifo Control Register
- volatile uint8_t lcr; // 3 r/w: Line Control Register
- volatile uint8_t mcr; // 4 w: Modem Control Register
- volatile uint8_t lsr; // 5 r: Line Status Register
- volatile uint8_t msr; // 6 r: Modem Status Register
-
-} wb16550_reg_t;
-
-#define UART_IER_RDI 0x01 // Enable received data interrupt
-#define UART_IER_THRI 0x02 // Enable transmitter holding reg empty int.
-#define UART_IER_RLSI 0x04 // Enable receiver line status interrupt
-#define UART_IER_MSI 0x08 // Enable modem status interrupt
-
-#define UART_IIR_NO_INT 0x01 // No interrupts pending
-#define UART_IIR_ID_MASK 0x06 // Mask for interrupt ID
-#define UART_IIR_MSI 0x00 // Modem status interrupt
-#define UART_IIR_THRI 0x02 // Tx holding register empty int
-#define UART_IIR_RDI 0x04 // Rx data available int
-#define UART_IIR_RLSI 0x06 // Receiver line status int
-
-#define UART_FCR_ENABLE_FIFO 0x01 // ignore, always enabled
-#define UART_FCR_CLEAR_RCVR 0x02 // Clear the RCVR FIFO
-#define UART_FCR_CLEAR_XMIT 0x04 // Clear the XMIT FIFO
-#define UART_FCR_TRIGGER_MASK 0xC0 // Mask for FIFO trigger range
-#define UART_FCR_TRIGGER_1 0x00 // Rx fifo trigger level: 1 byte
-#define UART_FCR_TRIGGER_4 0x40 // Rx fifo trigger level: 4 bytes
-#define UART_FCR_TRIGGER_8 0x80 // Rx fifo trigger level: 8 bytes
-#define UART_FCR_TRIGGER_14 0xC0 // Rx fifo trigger level: 14 bytes
-
-#define UART_LCR_DLAB 0x80 // Divisor latch access bit
-#define UART_LCR_SBC 0x40 // Set break control
-#define UART_LCR_SPAR 0x20 // Stick parity
-#define UART_LCR_EPAR 0x10 // Even parity select
-#define UART_LCR_PARITY 0x08 // Parity Enable
-#define UART_LCR_STOP 0x04 // Stop bits: 0=1 bit, 1=2 bits
-#define UART_LCR_WLEN5 0x00 // Wordlength: 5 bits
-#define UART_LCR_WLEN6 0x01 // Wordlength: 6 bits
-#define UART_LCR_WLEN7 0x02 // Wordlength: 7 bits
-#define UART_LCR_WLEN8 0x03 // Wordlength: 8 bits
-
-#define UART_MCR_LOOP 0x10 // Enable loopback test mode
-#define UART_MCR_OUT2n 0x08 // Out2 complement (loopback mode)
-#define UART_MCR_OUT1n 0x04 // Out1 complement (loopback mode)
-#define UART_MCR_RTSn 0x02 // RTS complement
-#define UART_MCR_DTRn 0x01 // DTR complement
-
-#define UART_LSR_TEMT 0x40 // Transmitter empty
-#define UART_LSR_THRE 0x20 // Transmit-hold-register empty
-#define UART_LSR_BI 0x10 // Break interrupt indicator
-#define UART_LSR_FE 0x08 // Frame error indicator
-#define UART_LSR_PE 0x04 // Parity error indicator
-#define UART_LSR_OE 0x02 // Overrun error indicator
-#define UART_LSR_DR 0x01 // Receiver data ready
-#define UART_LSR_BRK_ERROR_BITS 0x1E // BI, FE, PE, OE bits
-#define UART_LSR_ERROR 0x80 // At least 1 PE, FE or BI are in the fifo
-
-#define UART_MSR_DCD 0x80 // Data Carrier Detect
-#define UART_MSR_RI 0x40 // Ring Indicator
-#define UART_MSR_DSR 0x20 // Data Set Ready
-#define UART_MSR_CTS 0x10 // Clear to Send
-#define UART_MSR_DDCD 0x08 // Delta DCD
-#define UART_MSR_TERI 0x04 // Trailing edge ring indicator
-#define UART_MSR_DDSR 0x02 // Delta DSR
-#define UART_MSR_DCTS 0x01 // Delta CTS
-#define UART_MSR_ANY_DELTA 0x0F // Any of the delta bits!
-
-
-#endif // INCLUDED_WB16550_H
diff --git a/firmware/microblaze/u2_flash_tool b/firmware/microblaze/u2_flash_tool
deleted file mode 100755
index 2b66a4ac0..000000000
--- a/firmware/microblaze/u2_flash_tool
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/usr/bin/env python
-
-import sys
-from optparse import OptionParser
-
-SECTOR_SIZE = 512 # bytes
-MAX_FILE_SIZE = 1 * (2**20) # maximum number of bytes we'll burn to a slot
-
-FPGA_OFFSET = 0 # offset in flash to fpga image
-FIRMWARE_OFFSET = 1 * (2**20) # offset in flash to firmware image
-
-def read_file_data(filename):
- f = open(filename, "rb")
- file_data = f.read(MAX_FILE_SIZE)
- t = len(file_data) % SECTOR_SIZE
- if t != 0:
- file_data += (SECTOR_SIZE - t)*chr(0) # pad to an even sector size w/ zeros
- return file_data
-
-
-def write_flash(offset, filename, devname):
- file_data = read_file_data(filename)
- dev = open(devname, "wb")
- dev.seek(offset, 0) # seek to absolute byte offset
- dev.write(file_data)
- dev.flush()
- dev.close()
- return True
-
-
-def verify_flash(offset, filename, devname):
- file_data = read_file_data(filename)
- dev = open(devname, "rb")
- dev.seek(offset, 0) # seek to absolute byte offset
- dev_data = dev.read(len(file_data))
- if len(dev_data) != len(file_data):
- sys.stderr.write("short read on device %s\n" % (devname,))
- return False
-
- if file_data == dev_data:
- return True
-
- # doesn't match
- nwrong = 0
- for i in range(len(file_data)):
- if dev_data[i] != file_data[i]:
- sys.stderr.write("mismatch at offset %7d. Expected 0x%02x, got 0x%02x\n" % (
- i, ord(file_data[i]), ord(dev_data[i])))
- nwrong += 1
- if nwrong > 16:
- sys.stderr.write("> 16 errors, stopping comparison\n")
- break
- return False
-
-def read_flash(offset, filename, devname):
- dev = open(devname, "rb")
- dev.seek(offset, 0) # seek to absolute byte offset
- dev_data = dev.read(MAX_FILE_SIZE)
- dev.close()
- open(filename, "wb").write(dev_data)
-
-
-def main():
- parser = OptionParser(usage="%prog: [options] filename")
- parser.add_option("-w", "--write", action="store_const", const="write", dest="mode",
- help="write FILE to TARGET slot")
- parser.add_option("-v", "--verify", action="store_const", const="verify", dest="mode",
- help="verify FILE against TARGET slot")
- parser.add_option("-r", "--read", action="store_const", const="read", dest="mode",
- help="read TARGET slot, write to FILE")
- parser.add_option("-t", "--target", type="choice", choices=("fpga", "s/w"), default="s/w",
- help="select TARGET slot from: fpga, s/w [default=%default]")
- parser.add_option("", "--dev", default=None,
- help="specify flash device file, e.g., /dev/sdb. Be careful!")
- parser.set_defaults(target="s/w", mode=None)
-
- (options, args) = parser.parse_args()
- if len(args) != 1:
- parser.print_help()
- raise SystemExit
-
- filename = args[0]
-
- if options.mode is None:
- sys.stderr.write("specify mode with -w, -v or -r\n")
- parser.print_help()
- raise SystemExit
-
- if options.dev is None:
- sys.stderr.write("specify the device file with --dev\n")
- parser.print_help()
- raise SystemExit
-
- offset = { "fpga" : FPGA_OFFSET, "s/w" : FIRMWARE_OFFSET }[options.target]
-
- if options.mode == "write":
- r = (write_flash(offset, filename, options.dev)
- and verify_flash(offset, filename, options.dev))
- elif options.mode == "verify":
- r = verify_flash(offset, filename, options.dev)
- elif options.mode == "read":
- r = read_flash(offset, filename, options.dev)
- else:
- raise NotImplemented
-
- if not r:
- raise SystemExit, 1
-
-
-if __name__ == "__main__":
- main()
-
-
-
-
-
diff --git a/firmware/microblaze/usrp2/.gitignore b/firmware/microblaze/usrp2/.gitignore
deleted file mode 100644
index 18f715618..000000000
--- a/firmware/microblaze/usrp2/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-/Makefile
-/Makefile.in
-/*.a
-/*.bin
-/*.dump
-/*.ihx
-/*.elf
-/*.rom
-/*.map
diff --git a/firmware/microblaze/usrp2p/.gitignore b/firmware/microblaze/usrp2p/.gitignore
deleted file mode 100644
index 18f715618..000000000
--- a/firmware/microblaze/usrp2p/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-/Makefile
-/Makefile.in
-/*.a
-/*.bin
-/*.dump
-/*.ihx
-/*.elf
-/*.rom
-/*.map
diff --git a/firmware/microblaze/usrp2p/Makefile.am b/firmware/microblaze/usrp2p/Makefile.am
deleted file mode 100644
index 40766b406..000000000
--- a/firmware/microblaze/usrp2p/Makefile.am
+++ /dev/null
@@ -1,71 +0,0 @@
-#
-# Copyright 2010 Ettus Research LLC
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-include $(top_srcdir)/Makefile.common
-
-AM_CFLAGS = \
- $(COMMON_CFLAGS) \
- -DUSRP2P
-
-AM_LDFLAGS = \
- $(COMMON_LFLAGS) \
- -Wl,-defsym -Wl,_TEXT_START_ADDR=0x8050 \
- -Wl,-defsym -Wl,_STACK_SIZE=3072
-
-LDADD = libusrp2p.a
-
-#all of this here is to relocate the hardware vectors to somewhere normal.
-RELOCATE_ARGS = \
- --change-section-address .vectors.sw_exception+0x8000 \
- --change-section-address .vectors.hw_exception+0x8000 \
- --change-section-address .vectors.interrupt+0x8000 \
- --change-section-address .vectors.reset+0x8000
-
-# $(MB_OBJCOPY) -O ihex $< $@
-# the below would work if objcopy weren't written by apes
-# $(MB_OBJCOPY) -O ihex -w --change-section-address .vectors*+0x8000 $< $@
-# using the below will throw away the interrupt vectors when they get relocated below 0x0000.
-# $(MB_OBJCOPY) -O ihex --change-addresses -0x8000 $< $@
-
-########################################################################
-# USRP2P specific library and programs
-########################################################################
-noinst_LIBRARIES = libusrp2p.a
-
-libusrp2p_a_SOURCES = \
- $(COMMON_SRCS) \
- spif.c \
- spi_flash.c \
- spi_flash_read.c \
- bootloader_utils.c \
- ethernet.c \
- xilinx_s3_icap.c \
- udp_fw_update.c
-
-noinst_PROGRAMS = \
- usrp2p_txrx_uhd.elf \
- usrp2p_blinkenlights.elf \
- usrp2p_uart_flash_loader.elf
-
-usrp2p_txrx_uhd_elf_SOURCES = \
- $(top_srcdir)/apps/txrx_uhd.c
-
-usrp2p_blinkenlights_elf_SOURCES = \
- $(top_srcdir)/apps/blinkenlights.c
-
-usrp2p_uart_flash_loader_elf_SOURCES = \
- $(top_srcdir)/apps/uart_flash_loader.c
diff --git a/firmware/microblaze/usrp2p/bootloader/.gitignore b/firmware/microblaze/usrp2p/bootloader/.gitignore
deleted file mode 100644
index 17b0f82f3..000000000
--- a/firmware/microblaze/usrp2p/bootloader/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-/*.ihx
-/*.rmi
-/*_rom
-/*.elf
-/*.bin
-/*.dump
-/*.log
-/*.rom
-/*.map
-/Makefile
-/Makefile.in
diff --git a/firmware/microblaze/usrp2p/bootloader/Makefile.am b/firmware/microblaze/usrp2p/bootloader/Makefile.am
deleted file mode 100644
index 1fc5daf9c..000000000
--- a/firmware/microblaze/usrp2p/bootloader/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright 2007,2008,2009 Free Software Foundation, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-include $(top_srcdir)/Makefile.common
-
-ROM_LINKER_SCRIPT = u2p2-rom.ld
-
-# loads into 8K boot ram located at 0x0000_0000
-AM_CFLAGS = $(COMMON_CFLAGS) -I$(top_srcdir)/usrp2p
-AM_LDFLAGS = -Wl,-T,$(ROM_LINKER_SCRIPT) $(COMMON_LFLAGS) -Wl,-defsym -Wl,_STACK_SIZE=1024
-
-EXTRA_DIST = $(ROM_LINKER_SCRIPT)
-
-LDADD = $(top_srcdir)/usrp2p/libusrp2p.a
-
-noinst_PROGRAMS = \
- init_bootloader.elf
-
-init_bootloader_elf_SOURCES = init_bootloader.c
-
-.bin.rmi:
- $(top_srcdir)/bin/bin_to_ram_macro_init.py $< $@
-
-_generated_from_elf += \
- $(noinst_PROGRAMS:.elf=.rmi)
diff --git a/firmware/microblaze/usrp2p/bootloader_utils.c b/firmware/microblaze/usrp2p/bootloader_utils.c
deleted file mode 100644
index fadd225bb..000000000
--- a/firmware/microblaze/usrp2p/bootloader_utils.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2010 Ettus Research LLC
- *
- */
-
-//contains routines for loading programs from Flash. depends on Flash libraries.
-//also contains routines for reading / writing EEPROM flags for the bootloader
-#include <stdbool.h>
-#include <string.h>
-#include <bootloader_utils.h>
-#include <spi_flash.h>
-
-int is_valid_fpga_image(uint32_t addr) {
- uint8_t imgbuf[64];
- spi_flash_read(addr, 64, imgbuf);
- //we're just looking for leading 0xFF padding, followed by the sync bytes 0xAA 0x99
- int i = 0;
- for(i; i<63; i++) {
- if(imgbuf[i] == 0xFF) continue;
- if(imgbuf[i] == 0xAA && imgbuf[i+1] == 0x99) return 1;
- }
-
- return 0;
-}
-
-int is_valid_fw_image(uint32_t addr) {
- static const uint8_t fwheader[] = {0xB0, 0x00, 0x00, 0x00, 0xB8, 0x08}; //just lookin for a jump to anywhere located at the reset vector
- uint8_t buf[12];
- spi_flash_read(addr, 6, buf);
- return memcmp(buf, fwheader, 6) == 0;
-}
-
-void start_program(uint32_t addr)
-{
- memcpy(0x00000000, addr+0x00000000, 36); //copy the whole vector table, with the reset vector, into boot RAM
- typedef void (*fptr_t)(void);
- (*(fptr_t) 0x00000000)(); // most likely no return
-}
diff --git a/firmware/zpu/.gitignore b/firmware/zpu/.gitignore
new file mode 100644
index 000000000..796b96d1c
--- /dev/null
+++ b/firmware/zpu/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/firmware/microblaze/AUTHORS b/firmware/zpu/AUTHORS
index c365261f8..c230624fb 100644
--- a/firmware/microblaze/AUTHORS
+++ b/firmware/zpu/AUTHORS
@@ -1,3 +1,4 @@
Eric Blossom <eb@comsec.com>
Matt Ettus <matt@ettus.com>
Josh Blum <josh@ettus.com>
+Nick Foster <nick@ettus.com>
diff --git a/firmware/zpu/CMakeLists.txt b/firmware/zpu/CMakeLists.txt
new file mode 100644
index 000000000..6222cc2bf
--- /dev/null
+++ b/firmware/zpu/CMakeLists.txt
@@ -0,0 +1,118 @@
+#
+# Copyright 2010 Ettus Research LLC
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+########################################################################
+# setup project and compiler
+########################################################################
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+SET(CMAKE_C_COMPILER zpu-elf-gcc)
+SET(CMAKE_C_COMPILER_WORKS TRUE)
+SET(CMAKE_C_COMPILER_FORCED TRUE)
+PROJECT(USRP_NXXX_FW C)
+
+########################################################################
+# lwIP header include dirs
+########################################################################
+SET(LWIPDIR ${CMAKE_SOURCE_DIR}/lwip/lwip-1.3.1)
+
+INCLUDE_DIRECTORIES(
+ ${CMAKE_SOURCE_DIR}/lwip
+ ${CMAKE_SOURCE_DIR}/lwip_port
+ ${LWIPDIR}/src/include
+ ${LWIPDIR}/src/include/ipv4
+)
+
+########################################################################
+# misc flags for the gcc compiler
+########################################################################
+SET(CMAKE_C_FLAGS -abel) #always needed compile time and link time
+ADD_DEFINITIONS(-Os --std=gnu99 -Wall -Werror-implicit-function-declaration -ffunction-sections)
+
+MACRO(ADD_LINKER_FLAGS flags)
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${flags}")
+ENDMACRO(ADD_LINKER_FLAGS)
+
+ADD_LINKER_FLAGS("-Wl,--relax -Wl,--gc-sections")
+
+########################################################################
+# define for the hal io (FIXME move?)
+########################################################################
+#ADD_DEFINITIONS(-DHAL_IO_USES_DBOARD_PINS)
+ADD_DEFINITIONS(-DHAL_IO_USES_UART)
+
+########################################################################
+# common cflags and ldflags
+########################################################################
+INCLUDE_DIRECTORIES(
+ ${CMAKE_SOURCE_DIR}/../../host/lib/usrp
+ ${CMAKE_SOURCE_DIR}/lib
+)
+
+########################################################################
+# setup programs for output files
+########################################################################
+FIND_PROGRAM(LINKER zpu-elf-ld)
+FIND_PROGRAM(OBJCOPY zpu-elf-objcopy)
+FIND_PROGRAM(OBJDUMP zpu-elf-objdump)
+FIND_PROGRAM(HEXDUMP hexdump)
+
+########################################################################
+# helper functions to build output formats
+########################################################################
+MACRO(GEN_OUTPUTS target)
+ GET_FILENAME_COMPONENT(name ${target} NAME_WE)
+ #command to create a map from elf
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${name}.map DEPENDS ${target}
+ COMMAND ${LINKER}
+ ARGS -Map ${name}.map ${target}
+ )
+ #command to create a bin from elf
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${name}.bin DEPENDS ${target}
+ COMMAND ${OBJCOPY}
+ ARGS -O binary ${target} ${name}.bin
+ )
+ #command to create a ihx from elf
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${name}.ihx DEPENDS ${target}
+ COMMAND ${OBJCOPY}
+ ARGS -O ihex ${target} ${name}.ihx
+ )
+ #command to create a dump from elf
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${name}.dump DEPENDS ${target}
+ COMMAND ${OBJDUMP}
+ ARGS -DSC ${target} > ${name}.dump
+ )
+ #command to create a rom from bin
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${name}.rom DEPENDS ${name}.bin
+ COMMAND ${HEXDUMP}
+ ARGS -v -e'1/1 \"%.2X\\n\"' ${name}.bin > ${name}.rom
+ )
+ #add a top level target for output files
+ ADD_CUSTOM_TARGET(
+ ${name}_outputs ALL DEPENDS ${name}.map ${name}.bin ${name}.ihx ${name}.dump ${name}.rom
+ )
+ENDMACRO(GEN_OUTPUTS)
+
+########################################################################
+# Add the subdirectories
+########################################################################
+ADD_SUBDIRECTORY(usrp2)
+ADD_SUBDIRECTORY(usrp2p)
diff --git a/firmware/zpu/README b/firmware/zpu/README
new file mode 100644
index 000000000..ba0aa11eb
--- /dev/null
+++ b/firmware/zpu/README
@@ -0,0 +1,16 @@
+########################################################################
+# ZPU firmware code for USRP2 and N Series
+########################################################################
+This code requires the gcc-zpu tool-chain which can be found here:
+
+http://opensource.zylin.com/zpudownload.html
+
+zpu-elf-gcc should be in your $PATH
+
+########################################################################
+# Run the following commands to build
+########################################################################
+mkdir build
+cd build
+cmake ../
+make
diff --git a/firmware/microblaze/apps/bitrot/tx_drop.c b/firmware/zpu/apps/bitrot/tx_drop.c
index 3a336e938..3a336e938 100644
--- a/firmware/microblaze/apps/bitrot/tx_drop.c
+++ b/firmware/zpu/apps/bitrot/tx_drop.c
diff --git a/firmware/microblaze/apps/bitrot/tx_drop2.c b/firmware/zpu/apps/bitrot/tx_drop2.c
index 3afd722e6..3afd722e6 100644
--- a/firmware/microblaze/apps/bitrot/tx_drop2.c
+++ b/firmware/zpu/apps/bitrot/tx_drop2.c
diff --git a/firmware/microblaze/apps/bitrot/tx_drop_rate_limited.c b/firmware/zpu/apps/bitrot/tx_drop_rate_limited.c
index 2b8db7f7d..2b8db7f7d 100644
--- a/firmware/microblaze/apps/bitrot/tx_drop_rate_limited.c
+++ b/firmware/zpu/apps/bitrot/tx_drop_rate_limited.c
diff --git a/firmware/microblaze/apps/blinkenlights.c b/firmware/zpu/apps/blinkenlights.c
index 4cebe5c9d..30cb33a7f 100644
--- a/firmware/microblaze/apps/blinkenlights.c
+++ b/firmware/zpu/apps/blinkenlights.c
@@ -12,9 +12,11 @@ int main(int argc, char *argv[]) {
uint32_t c = 0;
uint8_t i = 0;
+ output_regs->led_src = 0;
+
while(1) {
//delay(5000000);
- for(c=0;c<5000000;c++) asm("NOP");
+ for(c=0;c<50000;c++) asm("NOP");
output_regs->leds = (i++ % 2) ? 0xFF : 0x00; //blink everything on that register
}
diff --git a/firmware/microblaze/apps/cruft/app_passthru_v2.c b/firmware/zpu/apps/cruft/app_passthru_v2.c
index 406c56b3b..406c56b3b 100644
--- a/firmware/microblaze/apps/cruft/app_passthru_v2.c
+++ b/firmware/zpu/apps/cruft/app_passthru_v2.c
diff --git a/firmware/microblaze/apps/cruft/app_passthru_v2.h b/firmware/zpu/apps/cruft/app_passthru_v2.h
index 3904c670f..3904c670f 100644
--- a/firmware/microblaze/apps/cruft/app_passthru_v2.h
+++ b/firmware/zpu/apps/cruft/app_passthru_v2.h
diff --git a/firmware/microblaze/apps/cruft/blink_leds.c b/firmware/zpu/apps/cruft/blink_leds.c
index 682ca8db2..682ca8db2 100644
--- a/firmware/microblaze/apps/cruft/blink_leds.c
+++ b/firmware/zpu/apps/cruft/blink_leds.c
diff --git a/firmware/microblaze/apps/cruft/blink_leds2.c b/firmware/zpu/apps/cruft/blink_leds2.c
index 13e78afb3..13e78afb3 100644
--- a/firmware/microblaze/apps/cruft/blink_leds2.c
+++ b/firmware/zpu/apps/cruft/blink_leds2.c
diff --git a/firmware/microblaze/apps/cruft/buf_ram_test.c b/firmware/zpu/apps/cruft/buf_ram_test.c
index 1aca2aec5..1aca2aec5 100644
--- a/firmware/microblaze/apps/cruft/buf_ram_test.c
+++ b/firmware/zpu/apps/cruft/buf_ram_test.c
diff --git a/firmware/microblaze/apps/cruft/burn_dbsrx_eeprom.c b/firmware/zpu/apps/cruft/burn_dbsrx_eeprom.c
index 116d4d8d0..116d4d8d0 100644
--- a/firmware/microblaze/apps/cruft/burn_dbsrx_eeprom.c
+++ b/firmware/zpu/apps/cruft/burn_dbsrx_eeprom.c
diff --git a/firmware/microblaze/apps/cruft/burnrev30.c b/firmware/zpu/apps/cruft/burnrev30.c
index 40fa53e34..40fa53e34 100644
--- a/firmware/microblaze/apps/cruft/burnrev30.c
+++ b/firmware/zpu/apps/cruft/burnrev30.c
diff --git a/firmware/microblaze/apps/cruft/burnrev31.c b/firmware/zpu/apps/cruft/burnrev31.c
index f6b08d187..f6b08d187 100644
--- a/firmware/microblaze/apps/cruft/burnrev31.c
+++ b/firmware/zpu/apps/cruft/burnrev31.c
diff --git a/firmware/microblaze/apps/cruft/can_i_sub.c b/firmware/zpu/apps/cruft/can_i_sub.c
index ed49791f0..ed49791f0 100644
--- a/firmware/microblaze/apps/cruft/can_i_sub.c
+++ b/firmware/zpu/apps/cruft/can_i_sub.c
diff --git a/firmware/microblaze/apps/cruft/double_buffer_fragment.c b/firmware/zpu/apps/cruft/double_buffer_fragment.c
index cfc061247..cfc061247 100644
--- a/firmware/microblaze/apps/cruft/double_buffer_fragment.c
+++ b/firmware/zpu/apps/cruft/double_buffer_fragment.c
diff --git a/firmware/microblaze/apps/cruft/echo.c b/firmware/zpu/apps/cruft/echo.c
index 89108ee80..89108ee80 100644
--- a/firmware/microblaze/apps/cruft/echo.c
+++ b/firmware/zpu/apps/cruft/echo.c
diff --git a/firmware/microblaze/apps/cruft/eth_serdes.c b/firmware/zpu/apps/cruft/eth_serdes.c
index 2d2ddc1ca..2d2ddc1ca 100644
--- a/firmware/microblaze/apps/cruft/eth_serdes.c
+++ b/firmware/zpu/apps/cruft/eth_serdes.c
diff --git a/firmware/microblaze/apps/cruft/factory_test.c b/firmware/zpu/apps/cruft/factory_test.c
index e1fbb0e40..e1fbb0e40 100644
--- a/firmware/microblaze/apps/cruft/factory_test.c
+++ b/firmware/zpu/apps/cruft/factory_test.c
diff --git a/firmware/microblaze/apps/cruft/gen_eth_packets.c b/firmware/zpu/apps/cruft/gen_eth_packets.c
index 4d521f6bf..4d521f6bf 100644
--- a/firmware/microblaze/apps/cruft/gen_eth_packets.c
+++ b/firmware/zpu/apps/cruft/gen_eth_packets.c
diff --git a/firmware/microblaze/apps/cruft/gen_pause_frames.c b/firmware/zpu/apps/cruft/gen_pause_frames.c
index 0f81dafff..0f81dafff 100644
--- a/firmware/microblaze/apps/cruft/gen_pause_frames.c
+++ b/firmware/zpu/apps/cruft/gen_pause_frames.c
diff --git a/firmware/microblaze/apps/cruft/hello.c b/firmware/zpu/apps/cruft/hello.c
index bce843093..bce843093 100644
--- a/firmware/microblaze/apps/cruft/hello.c
+++ b/firmware/zpu/apps/cruft/hello.c
diff --git a/firmware/microblaze/apps/cruft/ibs_rx_test.c b/firmware/zpu/apps/cruft/ibs_rx_test.c
index bdc04747e..bdc04747e 100644
--- a/firmware/microblaze/apps/cruft/ibs_rx_test.c
+++ b/firmware/zpu/apps/cruft/ibs_rx_test.c
diff --git a/firmware/microblaze/apps/cruft/ibs_tx_test.c b/firmware/zpu/apps/cruft/ibs_tx_test.c
index ff9446d92..ff9446d92 100644
--- a/firmware/microblaze/apps/cruft/ibs_tx_test.c
+++ b/firmware/zpu/apps/cruft/ibs_tx_test.c
diff --git a/firmware/microblaze/apps/cruft/mimo_app_common_v2.c b/firmware/zpu/apps/cruft/mimo_app_common_v2.c
index 5dbecb0d0..5dbecb0d0 100644
--- a/firmware/microblaze/apps/cruft/mimo_app_common_v2.c
+++ b/firmware/zpu/apps/cruft/mimo_app_common_v2.c
diff --git a/firmware/microblaze/apps/cruft/mimo_app_common_v2.h b/firmware/zpu/apps/cruft/mimo_app_common_v2.h
index 1e62ced37..1e62ced37 100644
--- a/firmware/microblaze/apps/cruft/mimo_app_common_v2.h
+++ b/firmware/zpu/apps/cruft/mimo_app_common_v2.h
diff --git a/firmware/microblaze/apps/cruft/mimo_tx.c b/firmware/zpu/apps/cruft/mimo_tx.c
index e0f8aa6fa..e0f8aa6fa 100644
--- a/firmware/microblaze/apps/cruft/mimo_tx.c
+++ b/firmware/zpu/apps/cruft/mimo_tx.c
diff --git a/firmware/microblaze/apps/cruft/mimo_tx_slave.c b/firmware/zpu/apps/cruft/mimo_tx_slave.c
index cdf9c03c2..cdf9c03c2 100644
--- a/firmware/microblaze/apps/cruft/mimo_tx_slave.c
+++ b/firmware/zpu/apps/cruft/mimo_tx_slave.c
diff --git a/firmware/microblaze/apps/cruft/rcv_eth_packets.c b/firmware/zpu/apps/cruft/rcv_eth_packets.c
index 03fc94354..03fc94354 100644
--- a/firmware/microblaze/apps/cruft/rcv_eth_packets.c
+++ b/firmware/zpu/apps/cruft/rcv_eth_packets.c
diff --git a/firmware/microblaze/apps/cruft/read_dbids.c b/firmware/zpu/apps/cruft/read_dbids.c
index 24c6d9ab4..24c6d9ab4 100644
--- a/firmware/microblaze/apps/cruft/read_dbids.c
+++ b/firmware/zpu/apps/cruft/read_dbids.c
diff --git a/firmware/microblaze/apps/cruft/sd_bounce.c b/firmware/zpu/apps/cruft/sd_bounce.c
index c1b48f170..c1b48f170 100644
--- a/firmware/microblaze/apps/cruft/sd_bounce.c
+++ b/firmware/zpu/apps/cruft/sd_bounce.c
diff --git a/firmware/microblaze/apps/cruft/sd_gentest.c b/firmware/zpu/apps/cruft/sd_gentest.c
index 35e912615..35e912615 100644
--- a/firmware/microblaze/apps/cruft/sd_gentest.c
+++ b/firmware/zpu/apps/cruft/sd_gentest.c
diff --git a/firmware/microblaze/apps/cruft/serdes_to_dsp.c b/firmware/zpu/apps/cruft/serdes_to_dsp.c
index 4994e0a69..4994e0a69 100644
--- a/firmware/microblaze/apps/cruft/serdes_to_dsp.c
+++ b/firmware/zpu/apps/cruft/serdes_to_dsp.c
diff --git a/firmware/microblaze/apps/cruft/serdes_txrx.c b/firmware/zpu/apps/cruft/serdes_txrx.c
index 2c47c9628..2c47c9628 100644
--- a/firmware/microblaze/apps/cruft/serdes_txrx.c
+++ b/firmware/zpu/apps/cruft/serdes_txrx.c
diff --git a/firmware/microblaze/apps/cruft/set_hw_rev.c b/firmware/zpu/apps/cruft/set_hw_rev.c
index d4ac8ff81..d4ac8ff81 100644
--- a/firmware/microblaze/apps/cruft/set_hw_rev.c
+++ b/firmware/zpu/apps/cruft/set_hw_rev.c
diff --git a/firmware/microblaze/apps/cruft/test1.c b/firmware/zpu/apps/cruft/test1.c
index c3cc3be56..c3cc3be56 100644
--- a/firmware/microblaze/apps/cruft/test1.c
+++ b/firmware/zpu/apps/cruft/test1.c
diff --git a/firmware/microblaze/apps/cruft/test_db_spi.c b/firmware/zpu/apps/cruft/test_db_spi.c
index f4fa98ef1..f4fa98ef1 100644
--- a/firmware/microblaze/apps/cruft/test_db_spi.c
+++ b/firmware/zpu/apps/cruft/test_db_spi.c
diff --git a/firmware/microblaze/apps/cruft/test_i2c.c b/firmware/zpu/apps/cruft/test_i2c.c
index f349ead88..f349ead88 100644
--- a/firmware/microblaze/apps/cruft/test_i2c.c
+++ b/firmware/zpu/apps/cruft/test_i2c.c
diff --git a/firmware/microblaze/apps/cruft/test_lsadc.c b/firmware/zpu/apps/cruft/test_lsadc.c
index 5fda29cd7..5fda29cd7 100644
--- a/firmware/microblaze/apps/cruft/test_lsadc.c
+++ b/firmware/zpu/apps/cruft/test_lsadc.c
diff --git a/firmware/microblaze/apps/cruft/test_lsdac.c b/firmware/zpu/apps/cruft/test_lsdac.c
index 8c1bf333b..8c1bf333b 100644
--- a/firmware/microblaze/apps/cruft/test_lsdac.c
+++ b/firmware/zpu/apps/cruft/test_lsdac.c
diff --git a/firmware/microblaze/apps/cruft/test_phy_comm.c b/firmware/zpu/apps/cruft/test_phy_comm.c
index d312ca4cc..d312ca4cc 100644
--- a/firmware/microblaze/apps/cruft/test_phy_comm.c
+++ b/firmware/zpu/apps/cruft/test_phy_comm.c
diff --git a/firmware/microblaze/apps/cruft/test_ram.c b/firmware/zpu/apps/cruft/test_ram.c
index 77ee693f6..77ee693f6 100644
--- a/firmware/microblaze/apps/cruft/test_ram.c
+++ b/firmware/zpu/apps/cruft/test_ram.c
diff --git a/firmware/microblaze/apps/cruft/test_sd.c b/firmware/zpu/apps/cruft/test_sd.c
index 494432d7f..494432d7f 100644
--- a/firmware/microblaze/apps/cruft/test_sd.c
+++ b/firmware/zpu/apps/cruft/test_sd.c
diff --git a/firmware/microblaze/apps/cruft/timer_test.c b/firmware/zpu/apps/cruft/timer_test.c
index 44e80b5f1..44e80b5f1 100644
--- a/firmware/microblaze/apps/cruft/timer_test.c
+++ b/firmware/zpu/apps/cruft/timer_test.c
diff --git a/firmware/microblaze/apps/cruft/tx_standalone.c b/firmware/zpu/apps/cruft/tx_standalone.c
index 1645fa8ba..1645fa8ba 100644
--- a/firmware/microblaze/apps/cruft/tx_standalone.c
+++ b/firmware/zpu/apps/cruft/tx_standalone.c
diff --git a/firmware/microblaze/apps/flash_test.c b/firmware/zpu/apps/flash_test.c
index 5b4569030..5b4569030 100644
--- a/firmware/microblaze/apps/flash_test.c
+++ b/firmware/zpu/apps/flash_test.c
diff --git a/firmware/microblaze/apps/hardware_testbed.c b/firmware/zpu/apps/hardware_testbed.c
index e68e68ff7..e68e68ff7 100644
--- a/firmware/microblaze/apps/hardware_testbed.c
+++ b/firmware/zpu/apps/hardware_testbed.c
diff --git a/firmware/microblaze/apps/txrx_uhd.c b/firmware/zpu/apps/txrx_uhd.c
index 9c1873e1c..b16d177d7 100644
--- a/firmware/microblaze/apps/txrx_uhd.c
+++ b/firmware/zpu/apps/txrx_uhd.c
@@ -28,12 +28,10 @@
#include "memory_map.h"
#include "spi.h"
#include "hal_io.h"
-#include "buffer_pool.h"
#include "pic.h"
#include <stdbool.h>
#include "ethernet.h"
#include "nonstdio.h"
-#include "dbsm.h"
#include <net/padded_eth_hdr.h>
#include <net_common.h>
#include "memcpy_wa.h"
@@ -42,87 +40,12 @@
#include <string.h>
#include "clocks.h"
#include "usrp2/fw_common.h"
-#include <i2c_async.h>
#include <i2c.h>
#include <ethertype.h>
#include <arp_cache.h>
#include "udp_fw_update.h"
-
-/*
- * Full duplex Tx and Rx between ethernet and DSP pipelines
- *
- * Buffer 1 is used by the cpu to send frames to the host.
- * Buffers 2 and 3 are used to double-buffer the DSP Rx to eth flow
- * Buffers 4 and 5 are used to double-buffer the eth to DSP Tx eth flow
- */
-//#define CPU_RX_BUF 0 // eth -> cpu
-
-#define DSP_RX_BUF_0 2 // dsp rx -> eth (double buffer)
-#define DSP_RX_BUF_1 3 // dsp rx -> eth
-#define DSP_TX_BUF_0 4 // eth -> dsp tx (double buffer)
-#define DSP_TX_BUF_1 5 // eth -> dsp tx
-
-/*
- * ================================================================
- * configure DSP TX double buffering state machine (eth -> dsp)
- * ================================================================
- */
-
-// DSP Tx reads ethernet header words
-#define DSP_TX_FIRST_LINE ((sizeof(padded_eth_hdr_t) + sizeof(struct ip_hdr) + sizeof(struct udp_hdr))/sizeof(uint32_t))
-
-// Receive from ethernet
-buf_cmd_args_t dsp_tx_recv_args = {
- PORT_ETH,
- 0,
- BP_LAST_LINE
-};
-
-// send to DSP Tx
-buf_cmd_args_t dsp_tx_send_args = {
- PORT_DSP,
- DSP_TX_FIRST_LINE, // starts just past transport header
- 0 // filled in from last_line register
-};
-
-dbsm_t dsp_tx_sm; // the state machine
-
-/*
- * ================================================================
- * configure DSP RX double buffering state machine (dsp -> eth)
- * ================================================================
- */
-
-static const uint32_t rx_ctrl_word = 1 << 16;
-
-// DSP Rx writes ethernet header words
-#define DSP_RX_FIRST_LINE sizeof(rx_ctrl_word)/sizeof(uint32_t)
-
-static bool dbsm_rx_inspector(dbsm_t *sm, int buf_this){
- size_t num_lines = buffer_pool_status->last_line[buf_this]-DSP_RX_FIRST_LINE;
- ((uint32_t*)buffer_ram(buf_this))[0] = (num_lines*sizeof(uint32_t)) | (1 << 16);
- return false;
-}
-
-// receive from DSP
-buf_cmd_args_t dsp_rx_recv_args = {
- PORT_DSP,
- DSP_RX_FIRST_LINE,
- BP_LAST_LINE
-};
-
-// send to ETH
-buf_cmd_args_t dsp_rx_send_args = {
- PORT_ETH,
- 0, // starts with ethernet header in line 0
- 0, // filled in from list_line register
-};
-
-dbsm_t dsp_rx_sm; // the state machine
-
-
-// The mac address of the host we're sending to.
-eth_mac_addr_t host_mac_addr;
+#include "pkt_ctrl.h"
+#include "banal.h"
static void setup_network(void);
@@ -130,26 +53,28 @@ static void setup_network(void);
// the fast-path setup global variables
// ----------------------------------------------------------------
static eth_mac_addr_t fp_mac_addr_src, fp_mac_addr_dst;
-static struct socket_address fp_socket_src, fp_socket_dst;
-
-// ----------------------------------------------------------------
-void start_rx_streaming_cmd(void);
-void stop_rx_cmd(void);
+extern struct socket_address fp_socket_src, fp_socket_dst;
-static void print_ip_addr(const void *t){
- uint8_t *p = (uint8_t *)t;
- printf("%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
+static void handle_udp_err0_packet(
+ struct socket_address src, struct socket_address dst,
+ unsigned char *payload, int payload_len
+){
+ sr_udp_sm->err0_port = (((uint32_t)dst.port) << 16) | src.port;
+ printf("Storing for async error path:\n");
+ printf(" source udp port: %d\n", dst.port);
+ printf(" destination udp port: %d\n", src.port);
+ newline();
}
-void handle_udp_data_packet(
+static void handle_udp_data_packet(
struct socket_address src, struct socket_address dst,
unsigned char *payload, int payload_len
){
- //its a tiny payload, load the fast-path variables
fp_mac_addr_src = *ethernet_mac_addr();
arp_cache_lookup_mac(&src.addr, &fp_mac_addr_dst);
fp_socket_src = dst;
fp_socket_dst = src;
+ sr_udp_sm->dsp0_port = (((uint32_t)dst.port) << 16) | src.port;
printf("Storing for fast path:\n");
printf(" source mac addr: ");
print_mac_addr(fp_mac_addr_src.addr); newline();
@@ -163,45 +88,15 @@ void handle_udp_data_packet(
printf(" destination udp port: %d\n", fp_socket_dst.port);
newline();
- //setup network and vrt
+ //setup network
setup_network();
- // kick off the state machine
- dbsm_start(&dsp_rx_sm);
-
}
#define OTW_GPIO_BANK_TO_NUM(bank) \
(((bank) == USRP2_DIR_RX)? (GPIO_RX_BANK) : (GPIO_TX_BANK))
-//setup the output data
-static usrp2_ctrl_data_t ctrl_data_out;
-static struct socket_address i2c_src;
-static struct socket_address spi_src;
-
-static volatile bool i2c_done = false;
-void i2c_read_done_callback(void) {
- //printf("I2C read done callback\n");
- i2c_async_data_ready(ctrl_data_out.data.i2c_args.data);
- i2c_done = true;
- i2c_register_callback(0);
-}
-
-void i2c_write_done_callback(void) {
- //printf("I2C write done callback\n");
- i2c_done = true;
- i2c_register_callback(0);
-}
-
-static volatile bool spi_done = false;
-static volatile uint32_t spi_readback_data;
-void get_spi_readback_data(void) {
- ctrl_data_out.data.spi_args.data = spi_get_data();
- spi_done = true;
- spi_register_callback(0);
-}
-
-void handle_udp_ctrl_packet(
+static void handle_udp_ctrl_packet(
struct socket_address src, struct socket_address dst,
unsigned char *payload, int payload_len
){
@@ -226,6 +121,7 @@ void handle_udp_ctrl_packet(
}
//setup the output data
+ usrp2_ctrl_data_t ctrl_data_out;
ctrl_data_out.proto_ver = USRP2_FW_COMPAT_NUM;
ctrl_data_out.id=USRP2_CTRL_ID_HUH_WHAT;
ctrl_data_out.seq=ctrl_data_in->seq;
@@ -239,7 +135,6 @@ void handle_udp_ctrl_packet(
case USRP2_CTRL_ID_WAZZUP_BRO:
ctrl_data_out.id = USRP2_CTRL_ID_WAZZUP_DUDE;
memcpy(&ctrl_data_out.data.ip_addr, get_ip_addr(), sizeof(struct ip_addr));
- send_udp_pkt(USRP2_UDP_CTRL_PORT, src, &ctrl_data_out, sizeof(ctrl_data_out));
break;
/*******************************************************************
@@ -247,21 +142,19 @@ void handle_udp_ctrl_packet(
******************************************************************/
case USRP2_CTRL_ID_TRANSACT_ME_SOME_SPI_BRO:{
//transact
- bool success = spi_async_transact(
- //(ctrl_data_in->data.spi_args.readback == 0)? SPI_TXONLY : SPI_TXRX,
+ uint32_t result = spi_transact(
+ (ctrl_data_in->data.spi_args.readback == 0)? SPI_TXONLY : SPI_TXRX,
ctrl_data_in->data.spi_args.dev, //which device
ctrl_data_in->data.spi_args.data, //32 bit data
ctrl_data_in->data.spi_args.num_bits, //length in bits
- (ctrl_data_in->data.spi_args.mosi_edge == USRP2_CLK_EDGE_RISE)? SPIF_PUSH_FALL : SPIF_PUSH_RISE | //flags
- (ctrl_data_in->data.spi_args.miso_edge == USRP2_CLK_EDGE_RISE)? SPIF_LATCH_RISE : SPIF_LATCH_FALL,
- get_spi_readback_data //callback
+ (ctrl_data_in->data.spi_args.mosi_edge == USRP2_CLK_EDGE_RISE)? SPIF_PUSH_FALL : SPIF_PUSH_RISE |
+ (ctrl_data_in->data.spi_args.miso_edge == USRP2_CLK_EDGE_RISE)? SPIF_LATCH_RISE : SPIF_LATCH_FALL
);
//load output
+ ctrl_data_out.data.spi_args.data = result;
ctrl_data_out.id = USRP2_CTRL_ID_OMG_TRANSACTED_SPI_DUDE;
- spi_src = src;
}
-// send_udp_pkt(USRP2_UDP_CTRL_PORT, src, &ctrl_data_out, sizeof(ctrl_data_out));
break;
/*******************************************************************
@@ -269,13 +162,11 @@ void handle_udp_ctrl_packet(
******************************************************************/
case USRP2_CTRL_ID_DO_AN_I2C_READ_FOR_ME_BRO:{
uint8_t num_bytes = ctrl_data_in->data.i2c_args.bytes;
- i2c_register_callback(i2c_read_done_callback);
- i2c_async_read(
+ i2c_read(
ctrl_data_in->data.i2c_args.addr,
+ ctrl_data_out.data.i2c_args.data,
num_bytes
);
- i2c_src = src;
-// i2c_dst = dst;
ctrl_data_out.id = USRP2_CTRL_ID_HERES_THE_I2C_DATA_DUDE;
ctrl_data_out.data.i2c_args.bytes = num_bytes;
}
@@ -283,14 +174,11 @@ void handle_udp_ctrl_packet(
case USRP2_CTRL_ID_WRITE_THESE_I2C_VALUES_BRO:{
uint8_t num_bytes = ctrl_data_in->data.i2c_args.bytes;
- i2c_register_callback(i2c_read_done_callback);
- i2c_async_write(
+ i2c_write(
ctrl_data_in->data.i2c_args.addr,
ctrl_data_in->data.i2c_args.data,
num_bytes
);
- i2c_src = src;
-// i2c_dst = dst;
ctrl_data_out.id = USRP2_CTRL_ID_COOL_IM_DONE_I2C_WRITE_DUDE;
ctrl_data_out.data.i2c_args.bytes = num_bytes;
}
@@ -322,7 +210,6 @@ void handle_udp_ctrl_packet(
}
ctrl_data_out.id = USRP2_CTRL_ID_OMG_POKED_REGISTER_SO_BAD_DUDE;
- send_udp_pkt(USRP2_UDP_CTRL_PORT, src, &ctrl_data_out, sizeof(ctrl_data_out));
break;
case USRP2_CTRL_ID_PEEK_AT_THIS_REGISTER_FOR_ME_BRO:
@@ -345,7 +232,6 @@ void handle_udp_ctrl_packet(
}
ctrl_data_out.id = USRP2_CTRL_ID_WOAH_I_DEFINITELY_PEEKED_IT_DUDE;
- send_udp_pkt(USRP2_UDP_CTRL_PORT, src, &ctrl_data_out, sizeof(ctrl_data_out));
break;
case USRP2_CTRL_ID_SO_LIKE_CAN_YOU_READ_THIS_UART_BRO:{
@@ -372,32 +258,11 @@ void handle_udp_ctrl_packet(
default:
ctrl_data_out.id = USRP2_CTRL_ID_HUH_WHAT;
- send_udp_pkt(USRP2_UDP_CTRL_PORT, src, &ctrl_data_out, sizeof(ctrl_data_out));
}
-
+ send_udp_pkt(USRP2_UDP_CTRL_PORT, src, &ctrl_data_out, sizeof(ctrl_data_out));
}
-/*
- * Called when an ethernet packet is received.
- * Return true if we handled it here, otherwise
- * it'll be passed on to the DSP Tx pipe
- */
-static bool
-eth_pkt_inspector(dbsm_t *sm, int bufno)
-{
- //point me to the ethernet frame
- uint32_t *buff = (uint32_t *)buffer_ram(bufno);
-
- //treat this as fast-path data?
- // We have to do this operation as fast as possible.
- // Therefore, we do not check all the headers,
- // just check that the udp port matches
- // and that the vrt header is non zero.
- // In the future, a hardware state machine will do this...
- if ( //warning! magic numbers approaching....
- (((buff + ((2 + 14 + 20)/sizeof(uint32_t)))[0] & 0xffff) == USRP2_UDP_DATA_PORT) &&
- ((buff + ((2 + 14 + 20 + 8)/sizeof(uint32_t)))[1] != USRP2_INVALID_VRT_HEADER)
- ) return false;
+static void handle_inp_packet(uint32_t *buff, size_t num_lines){
//test if its an ip recovery packet
typedef struct{
@@ -411,42 +276,30 @@ eth_pkt_inspector(dbsm_t *sm, int bufno)
if (recovery_packet->eth_hdr.ethertype == 0xbeee && strncmp(recovery_packet->code, "addr", 4) == 0){
printf("Got ip recovery packet: "); print_ip_addr(&recovery_packet->data.ip_addr); newline();
set_ip_addr(&recovery_packet->data.ip_addr);
- return true;
+ return;
}
//pass it to the slow-path handler
- size_t len = buffer_pool_status->last_line[bufno] - 3;
- handle_eth_packet(buff, len);
- return true;
+ handle_eth_packet(buff, num_lines);
}
-//------------------------------------------------------------------
-/*
- * 1's complement sum for IP and UDP headers
- *
- * init chksum to zero to start.
- */
-static unsigned int
-CHKSUM(unsigned int x, unsigned int *chksum)
-{
- *chksum += x;
- *chksum = (*chksum & 0xffff) + (*chksum>>16);
- *chksum = (*chksum & 0xffff) + (*chksum>>16);
- return x;
-}
+//------------------------------------------------------------------
/*
* Called when eth phy state changes (w/ interrupts disabled)
*/
-volatile bool link_is_up = false; // eth handler sets this
-void
-link_changed_callback(int speed)
-{
- link_is_up = speed != 0;
- hal_set_leds(link_is_up ? LED_RJ45 : 0x0, LED_RJ45);
- printf("\neth link changed: speed = %d\n", speed);
- if (link_is_up) send_gratuitous_arp();
+void link_changed_callback(int speed){
+ printf("\neth link changed: speed = %d\n", speed);
+ if (speed != 0){
+ hal_set_leds(LED_RJ45, LED_RJ45);
+ pkt_ctrl_set_routing_mode(PKT_CTRL_ROUTING_MODE_MASTER);
+ send_gratuitous_arp();
+ }
+ else{
+ hal_set_leds(0x0, LED_RJ45);
+ pkt_ctrl_set_routing_mode(PKT_CTRL_ROUTING_MODE_SLAVE);
+ }
}
static void setup_network(void){
@@ -477,21 +330,12 @@ static void setup_network(void){
sr_udp_sm->ip_hdr.checksum = UDP_SM_INS_IP_HDR_CHKSUM | (chksum & 0xffff);
//setup the udp header machine
- sr_udp_sm->udp_hdr.src_port = fp_socket_src.port;
- sr_udp_sm->udp_hdr.dst_port = fp_socket_dst.port;
+ sr_udp_sm->udp_hdr.src_port = UDP_SM_INS_UDP_SRC_PORT;
+ sr_udp_sm->udp_hdr.dst_port = UDP_SM_INS_UDP_DST_PORT;
sr_udp_sm->udp_hdr.length = UDP_SM_INS_UDP_LEN;
sr_udp_sm->udp_hdr.checksum = UDP_SM_LAST_WORD; // zero UDP checksum
}
-inline static void
-buffer_irq_handler(unsigned irq)
-{
- uint32_t status = buffer_pool_status->status;
-
- dbsm_process_status(&dsp_tx_sm, status);
- dbsm_process_status(&dsp_rx_sm, status);
-}
-
int
main(void)
{
@@ -515,72 +359,43 @@ main(void)
printf("Firmware compatibility number: %d\n", USRP2_FW_COMPAT_NUM);
//1) register the addresses into the network stack
- register_mac_addr(ethernet_mac_addr());
- register_ip_addr(get_ip_addr());
-
+ register_addrs(ethernet_mac_addr(), get_ip_addr());
+ pkt_ctrl_program_inspector(get_ip_addr(), USRP2_UDP_DATA_PORT);
+
//2) register callbacks for udp ports we service
+ init_udp_listeners();
register_udp_listener(USRP2_UDP_CTRL_PORT, handle_udp_ctrl_packet);
register_udp_listener(USRP2_UDP_DATA_PORT, handle_udp_data_packet);
+ register_udp_listener(USRP2_UDP_ERR0_PORT, handle_udp_err0_packet);
register_udp_listener(USRP2_UDP_UPDATE_PORT, handle_udp_fw_update_packet);
- //3) setup ethernet hardware to bring the link up
+ //3) set the routing mode to slave and send a garp
+ pkt_ctrl_set_routing_mode(PKT_CTRL_ROUTING_MODE_SLAVE);
+ send_gratuitous_arp();
+
+ //4) setup ethernet hardware to bring the link up
ethernet_register_link_changed_callback(link_changed_callback);
ethernet_init();
- // initialize double buffering state machine for ethernet -> DSP Tx
-
- dbsm_init(&dsp_tx_sm, DSP_TX_BUF_0,
- &dsp_tx_recv_args, &dsp_tx_send_args,
- eth_pkt_inspector);
-
-
- // initialize double buffering state machine for DSP RX -> Ethernet
-
- dbsm_init(&dsp_rx_sm, DSP_RX_BUF_0,
- &dsp_rx_recv_args, &dsp_rx_send_args,
- dbsm_rx_inspector);
-
- sr_tx_ctrl->clear_state = 1;
- bp_clear_buf(DSP_TX_BUF_0);
- bp_clear_buf(DSP_TX_BUF_1);
+ while(true){
- // kick off the state machine
- dbsm_start(&dsp_tx_sm);
-
- //int which = 0;
-
- while(1){
- // hal_gpio_write(GPIO_TX_BANK, which, 0x8000);
- // which ^= 0x8000;
-
- buffer_irq_handler(0);
-
- if(i2c_done) {
- i2c_done = false;
- send_udp_pkt(USRP2_UDP_CTRL_PORT, i2c_src, &ctrl_data_out, sizeof(ctrl_data_out));
- //printf("Sending UDP packet from main loop for I2C...\n");
- }
-
- if(spi_done) {
- spi_done = false;
- send_udp_pkt(USRP2_UDP_CTRL_PORT, spi_src, &ctrl_data_out, sizeof(ctrl_data_out));
+ size_t num_lines;
+ void *buff = pkt_ctrl_claim_incoming_buffer(&num_lines);
+ if (buff != NULL){
+ handle_inp_packet((uint32_t *)buff, num_lines);
+ pkt_ctrl_release_incoming_buffer();
}
+ pic_interrupt_handler();
int pending = pic_regs->pending; // poll for under or overrun
if (pending & PIC_UNDERRUN_INT){
- //dbsm_handle_tx_underrun(&dsp_tx_sm);
pic_regs->pending = PIC_UNDERRUN_INT; // clear interrupt
putchar('U');
}
if (pending & PIC_OVERRUN_INT){
- //dbsm_handle_rx_overrun(&dsp_rx_sm);
pic_regs->pending = PIC_OVERRUN_INT; // clear pending interrupt
-
- // FIXME Figure out how to handle this robustly.
- // Any buffers that are emptying should be allowed to drain...
-
putchar('O');
}
}
diff --git a/firmware/microblaze/apps/uart_flash_loader.c b/firmware/zpu/apps/uart_flash_loader.c
index d67b84677..4ec89284a 100644
--- a/firmware/microblaze/apps/uart_flash_loader.c
+++ b/firmware/zpu/apps/uart_flash_loader.c
@@ -139,8 +139,8 @@ void delay(uint32_t t) {
}
int main(int argc, char *argv[]) {
- uint8_t buf[32];
- int i = 0;
+ //uint8_t buf[32];
+ //int i = 0;
hal_disable_ints(); // In case we got here via jmp 0x0
diff --git a/firmware/microblaze/bin/bin_to_mif.py b/firmware/zpu/bin/bin_to_mif.py
index cefce4e92..cefce4e92 100755
--- a/firmware/microblaze/bin/bin_to_mif.py
+++ b/firmware/zpu/bin/bin_to_mif.py
diff --git a/firmware/microblaze/bin/bin_to_ram_macro_init.py b/firmware/zpu/bin/bin_to_ram_macro_init.py
index 65cf2dbdf..65cf2dbdf 100755
--- a/firmware/microblaze/bin/bin_to_ram_macro_init.py
+++ b/firmware/zpu/bin/bin_to_ram_macro_init.py
diff --git a/firmware/microblaze/bin/elf_to_sbf b/firmware/zpu/bin/elf_to_sbf
index d1be10c0d..d1be10c0d 100755
--- a/firmware/microblaze/bin/elf_to_sbf
+++ b/firmware/zpu/bin/elf_to_sbf
diff --git a/firmware/microblaze/bin/sbf.py b/firmware/zpu/bin/sbf.py
index 8e2c868a5..8e2c868a5 100644
--- a/firmware/microblaze/bin/sbf.py
+++ b/firmware/zpu/bin/sbf.py
diff --git a/firmware/microblaze/bin/serial_loader b/firmware/zpu/bin/serial_loader
index 9bd5aada7..9bd5aada7 100755
--- a/firmware/microblaze/bin/serial_loader
+++ b/firmware/zpu/bin/serial_loader
diff --git a/firmware/microblaze/bin/uart_ihex_flash_loader.py b/firmware/zpu/bin/uart_ihex_flash_loader.py
index 5a3300f34..5a3300f34 100755
--- a/firmware/microblaze/bin/uart_ihex_flash_loader.py
+++ b/firmware/zpu/bin/uart_ihex_flash_loader.py
diff --git a/firmware/microblaze/bin/uart_ihex_ram_loader.py b/firmware/zpu/bin/uart_ihex_ram_loader.py
index c90fbe1d8..c90fbe1d8 100755
--- a/firmware/microblaze/bin/uart_ihex_ram_loader.py
+++ b/firmware/zpu/bin/uart_ihex_ram_loader.py
diff --git a/firmware/microblaze/divisors.py b/firmware/zpu/divisors.py
index d31bd4dad..d31bd4dad 100755
--- a/firmware/microblaze/divisors.py
+++ b/firmware/zpu/divisors.py
diff --git a/firmware/zpu/lib/CMakeLists.txt b/firmware/zpu/lib/CMakeLists.txt
new file mode 100644
index 000000000..193d63cfa
--- /dev/null
+++ b/firmware/zpu/lib/CMakeLists.txt
@@ -0,0 +1,47 @@
+#
+# Copyright 2010 Ettus Research LLC
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+########################################################################
+SET(COMMON_SRCS
+ ${CMAKE_SOURCE_DIR}/lib/u2_init.c
+ ${CMAKE_SOURCE_DIR}/lib/abort.c
+ ${CMAKE_SOURCE_DIR}/lib/ad9510.c
+ ${CMAKE_SOURCE_DIR}/lib/clocks.c
+ ${CMAKE_SOURCE_DIR}/lib/eeprom.c
+ ${CMAKE_SOURCE_DIR}/lib/eth_addrs.c
+ ${CMAKE_SOURCE_DIR}/lib/eth_mac.c
+ ${CMAKE_SOURCE_DIR}/lib/_exit.c
+ ${CMAKE_SOURCE_DIR}/lib/exit.c
+ ${CMAKE_SOURCE_DIR}/lib/hal_io.c
+ ${CMAKE_SOURCE_DIR}/lib/hal_uart.c
+ ${CMAKE_SOURCE_DIR}/lib/i2c.c
+ ${CMAKE_SOURCE_DIR}/lib/mdelay.c
+ ${CMAKE_SOURCE_DIR}/lib/memcpy_wa.c
+ ${CMAKE_SOURCE_DIR}/lib/memset_wa.c
+ ${CMAKE_SOURCE_DIR}/lib/nonstdio.c
+ ${CMAKE_SOURCE_DIR}/lib/pic.c
+ ${CMAKE_SOURCE_DIR}/lib/pkt_ctrl.c
+ ${CMAKE_SOURCE_DIR}/lib/print_addrs.c
+ ${CMAKE_SOURCE_DIR}/lib/print_rmon_regs.c
+ ${CMAKE_SOURCE_DIR}/lib/print_buffer.c
+ ${CMAKE_SOURCE_DIR}/lib/printf.c
+ ${CMAKE_SOURCE_DIR}/lib/ihex.c
+ ${CMAKE_SOURCE_DIR}/lib/spi.c
+ ${CMAKE_SOURCE_DIR}/lib/net_common.c
+ ${CMAKE_SOURCE_DIR}/lib/arp_cache.c
+ ${CMAKE_SOURCE_DIR}/lib/banal.c
+)
diff --git a/firmware/microblaze/lib/_exit.c b/firmware/zpu/lib/_exit.c
index 9b40ab2ee..9b40ab2ee 100644
--- a/firmware/microblaze/lib/_exit.c
+++ b/firmware/zpu/lib/_exit.c
diff --git a/firmware/microblaze/lib/abort.c b/firmware/zpu/lib/abort.c
index d1d709392..d1d709392 100644
--- a/firmware/microblaze/lib/abort.c
+++ b/firmware/zpu/lib/abort.c
diff --git a/firmware/microblaze/lib/ad9510.c b/firmware/zpu/lib/ad9510.c
index 4d3acb65d..4d3acb65d 100644
--- a/firmware/microblaze/lib/ad9510.c
+++ b/firmware/zpu/lib/ad9510.c
diff --git a/firmware/microblaze/lib/ad9510.h b/firmware/zpu/lib/ad9510.h
index a395e5223..a395e5223 100644
--- a/firmware/microblaze/lib/ad9510.h
+++ b/firmware/zpu/lib/ad9510.h
diff --git a/firmware/microblaze/lib/arp_cache.c b/firmware/zpu/lib/arp_cache.c
index 9c586fa6b..9c586fa6b 100644
--- a/firmware/microblaze/lib/arp_cache.c
+++ b/firmware/zpu/lib/arp_cache.c
diff --git a/firmware/microblaze/lib/arp_cache.h b/firmware/zpu/lib/arp_cache.h
index 8e84a1f94..8e84a1f94 100644
--- a/firmware/microblaze/lib/arp_cache.h
+++ b/firmware/zpu/lib/arp_cache.h
diff --git a/firmware/microblaze/lib/banal.c b/firmware/zpu/lib/banal.c
index 42937957f..42937957f 100644
--- a/firmware/microblaze/lib/banal.c
+++ b/firmware/zpu/lib/banal.c
diff --git a/firmware/microblaze/lib/banal.h b/firmware/zpu/lib/banal.h
index 7b3c71a20..eb7ed509a 100644
--- a/firmware/microblaze/lib/banal.h
+++ b/firmware/zpu/lib/banal.h
@@ -19,24 +19,8 @@
#define INCLUDED_BANAL_H
#include <stdint.h>
-#include <lwip/ip_addr.h>
-/*
- * 1's complement sum for IP and UDP headers
- *
- * init chksum to zero to start.
- */
-static inline unsigned int
-CHKSUM(unsigned int x, unsigned int *chksum)
-{
- *chksum += x;
- *chksum = (*chksum & 0xffff) + (*chksum>>16);
- *chksum = (*chksum & 0xffff) + (*chksum>>16);
- return x;
-}
-
-unsigned int
-chksum_buffer(unsigned short *buf, int nshorts, unsigned int initial_chksum);
+#define dimof(x) (sizeof(x)/sizeof(x[0]))
//-------------- unsigned get_int 8, 16, 32, 64 --------------//
@@ -84,7 +68,4 @@ get_int64(const unsigned char *s)
return get_uint64(s);
}
-void
-print_ip(struct ip_addr ip);
-
#endif /* INCLUDED_BANAL_H */
diff --git a/firmware/microblaze/lib/bootconfig.c b/firmware/zpu/lib/bootconfig.c
index 93adc05c2..93adc05c2 100644
--- a/firmware/microblaze/lib/bootconfig.c
+++ b/firmware/zpu/lib/bootconfig.c
diff --git a/firmware/microblaze/lib/clock_bits.h b/firmware/zpu/lib/clock_bits.h
index d2052e941..d2052e941 100644
--- a/firmware/microblaze/lib/clock_bits.h
+++ b/firmware/zpu/lib/clock_bits.h
diff --git a/firmware/microblaze/lib/clocks.c b/firmware/zpu/lib/clocks.c
index 2b352a385..2b352a385 100644
--- a/firmware/microblaze/lib/clocks.c
+++ b/firmware/zpu/lib/clocks.c
diff --git a/firmware/microblaze/lib/clocks.h b/firmware/zpu/lib/clocks.h
index 28d1d542f..28d1d542f 100644
--- a/firmware/microblaze/lib/clocks.h
+++ b/firmware/zpu/lib/clocks.h
diff --git a/firmware/microblaze/lib/compiler.h b/firmware/zpu/lib/compiler.h
index 4fa9b49f8..f677bdc3b 100644
--- a/firmware/microblaze/lib/compiler.h
+++ b/firmware/zpu/lib/compiler.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2009 Ettus Research LLC
+ * Copyright 2009, 2010 Ettus Research LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,5 +21,6 @@
// FIXME gcc specific.
#define _AL4 __attribute__((aligned (4)))
+#define FORCE_INLINE inline __attribute__((always_inline))
#endif /* INCLUDED_COMPILER_H */
diff --git a/firmware/microblaze/lib/eeprom.c b/firmware/zpu/lib/eeprom.c
index d4e170046..d4e170046 100644
--- a/firmware/microblaze/lib/eeprom.c
+++ b/firmware/zpu/lib/eeprom.c
diff --git a/firmware/microblaze/lib/eth_addrs.c b/firmware/zpu/lib/eth_addrs.c
index ff5d04f4d..ff5d04f4d 100644
--- a/firmware/microblaze/lib/eth_addrs.c
+++ b/firmware/zpu/lib/eth_addrs.c
diff --git a/firmware/microblaze/lib/eth_mac.c b/firmware/zpu/lib/eth_mac.c
index 034a4d494..581a5c69f 100644
--- a/firmware/microblaze/lib/eth_mac.c
+++ b/firmware/zpu/lib/eth_mac.c
@@ -28,6 +28,7 @@
void
eth_mac_set_addr(const eth_mac_addr_t *src)
{
+ /* disable because MAC_SET_PASS_ALL is set below
eth_mac->ucast_hi =
(((unsigned int)src->addr[0])<<8) +
((unsigned int)src->addr[1]);
@@ -36,6 +37,7 @@ eth_mac_set_addr(const eth_mac_addr_t *src)
(((unsigned int)src->addr[3])<<16) +
(((unsigned int)src->addr[4])<<8) +
(((unsigned int)src->addr[5]));
+*/
}
@@ -45,7 +47,7 @@ eth_mac_init(const eth_mac_addr_t *src)
eth_mac->miimoder = 25; // divider from CPU clock (50MHz/25 = 2MHz)
eth_mac_set_addr(src);
- eth_mac->settings = MAC_SET_PAUSE_EN | MAC_SET_PASS_BCAST | MAC_SET_PASS_UCAST | MAC_SET_PAUSE_SEND_EN;
+ eth_mac->settings = MAC_SET_PAUSE_EN | MAC_SET_PASS_BCAST | MAC_SET_PASS_UCAST | MAC_SET_PAUSE_SEND_EN | MAC_SET_PASS_ALL;
eth_mac->pause_time = 38;
eth_mac->pause_thresh = 1200;
diff --git a/firmware/microblaze/lib/eth_mac.h b/firmware/zpu/lib/eth_mac.h
index 73feec955..73feec955 100644
--- a/firmware/microblaze/lib/eth_mac.h
+++ b/firmware/zpu/lib/eth_mac.h
diff --git a/firmware/microblaze/lib/eth_mac_regs.h b/firmware/zpu/lib/eth_mac_regs.h
index d680f8de0..d680f8de0 100644
--- a/firmware/microblaze/lib/eth_mac_regs.h
+++ b/firmware/zpu/lib/eth_mac_regs.h
diff --git a/firmware/microblaze/lib/ethernet.h b/firmware/zpu/lib/ethernet.h
index 52b297349..52b297349 100644
--- a/firmware/microblaze/lib/ethernet.h
+++ b/firmware/zpu/lib/ethernet.h
diff --git a/firmware/microblaze/lib/ethertype.h b/firmware/zpu/lib/ethertype.h
index 11f4bafec..11f4bafec 100644
--- a/firmware/microblaze/lib/ethertype.h
+++ b/firmware/zpu/lib/ethertype.h
diff --git a/firmware/microblaze/lib/exit.c b/firmware/zpu/lib/exit.c
index 95a3bf4de..95a3bf4de 100644
--- a/firmware/microblaze/lib/exit.c
+++ b/firmware/zpu/lib/exit.c
diff --git a/firmware/microblaze/lib/gdbstub2.c b/firmware/zpu/lib/gdbstub2.c
index 4c63dfce2..4c63dfce2 100644
--- a/firmware/microblaze/lib/gdbstub2.c
+++ b/firmware/zpu/lib/gdbstub2.c
diff --git a/firmware/microblaze/lib/gdbstub2.h b/firmware/zpu/lib/gdbstub2.h
index 15cdde939..15cdde939 100644
--- a/firmware/microblaze/lib/gdbstub2.h
+++ b/firmware/zpu/lib/gdbstub2.h
diff --git a/firmware/microblaze/lib/hal_io.c b/firmware/zpu/lib/hal_io.c
index be4c570c7..be4c570c7 100644
--- a/firmware/microblaze/lib/hal_io.c
+++ b/firmware/zpu/lib/hal_io.c
diff --git a/firmware/microblaze/lib/hal_io.h b/firmware/zpu/lib/hal_io.h
index 950f8d591..574df7d3e 100644
--- a/firmware/microblaze/lib/hal_io.h
+++ b/firmware/zpu/lib/hal_io.h
@@ -70,13 +70,7 @@ hal_set_timeout(int delta_ticks)
static inline int
hal_disable_ints(void)
{
- int result, t0;
-
- asm volatile("mfs %0, rmsr \n\
- andni %1, %0, 0x2 \n\
- mts rmsr, %1"
- : "=r" (result), "=r" (t0));
- return result;
+ return 0; /* NOP */
}
/*!
@@ -86,13 +80,7 @@ hal_disable_ints(void)
static inline int
hal_enable_ints(void)
{
- int result, t0;
-
- asm volatile("mfs %0, rmsr \n\
- ori %1, %0, 0x2 \n\
- mts rmsr, %1"
- : "=r" (result), "=r" (t0));
- return result;
+ return 0; /* NOP */
}
/*!
@@ -102,13 +90,7 @@ hal_enable_ints(void)
static inline void
hal_restore_ints(int prev_state)
{
- int t0, t1;
- asm volatile("andi %0, %2, 0x2 \n\
- mfs %1, rmsr \n\
- andni %1, %1, 0x2 \n\
- or %1, %1, %0 \n\
- mts rmsr, %1"
- : "=r" (t0), "=r"(t1) : "r" (prev_state));
+ /* NOP */
}
#endif /* INCLUDED_HAL_IO_H */
diff --git a/firmware/microblaze/lib/hal_uart.c b/firmware/zpu/lib/hal_uart.c
index 7836240fe..f0921f4f0 100644
--- a/firmware/microblaze/lib/hal_uart.c
+++ b/firmware/zpu/lib/hal_uart.c
@@ -113,7 +113,7 @@ hal_uart_getc_timeout(hal_uart_name_t u)
int hal_uart_rx_flush(hal_uart_name_t u)
{
- char x;
+ char x = 0;
while(uart_regs[u].rxlevel) x = uart_regs[u].rxchar;
return x;
}
diff --git a/firmware/microblaze/lib/hal_uart.h b/firmware/zpu/lib/hal_uart.h
index 758c8cb5e..758c8cb5e 100644
--- a/firmware/microblaze/lib/hal_uart.h
+++ b/firmware/zpu/lib/hal_uart.h
diff --git a/firmware/microblaze/lib/i2c.c b/firmware/zpu/lib/i2c.c
index d230f462c..d230f462c 100644
--- a/firmware/microblaze/lib/i2c.c
+++ b/firmware/zpu/lib/i2c.c
diff --git a/firmware/microblaze/lib/i2c.h b/firmware/zpu/lib/i2c.h
index 1af4d72df..1af4d72df 100644
--- a/firmware/microblaze/lib/i2c.h
+++ b/firmware/zpu/lib/i2c.h
diff --git a/firmware/microblaze/lib/i2c_async.c b/firmware/zpu/lib/i2c_async.c
index 05c4c3a09..05c4c3a09 100644
--- a/firmware/microblaze/lib/i2c_async.c
+++ b/firmware/zpu/lib/i2c_async.c
diff --git a/firmware/microblaze/lib/i2c_async.h b/firmware/zpu/lib/i2c_async.h
index e6095fca6..e6095fca6 100644
--- a/firmware/microblaze/lib/i2c_async.h
+++ b/firmware/zpu/lib/i2c_async.h
diff --git a/firmware/microblaze/lib/if_arp.h b/firmware/zpu/lib/if_arp.h
index 63519c4be..63519c4be 100644
--- a/firmware/microblaze/lib/if_arp.h
+++ b/firmware/zpu/lib/if_arp.h
diff --git a/firmware/microblaze/lib/ihex.c b/firmware/zpu/lib/ihex.c
index 97ecf73b6..97ecf73b6 100644
--- a/firmware/microblaze/lib/ihex.c
+++ b/firmware/zpu/lib/ihex.c
diff --git a/firmware/microblaze/lib/ihex.h b/firmware/zpu/lib/ihex.h
index 9f471fbe2..9f471fbe2 100644
--- a/firmware/microblaze/lib/ihex.h
+++ b/firmware/zpu/lib/ihex.h
diff --git a/firmware/microblaze/lib/mdelay.c b/firmware/zpu/lib/mdelay.c
index c8c119b1a..958acf3f5 100644
--- a/firmware/microblaze/lib/mdelay.c
+++ b/firmware/zpu/lib/mdelay.c
@@ -30,7 +30,7 @@
inline static void
delay_1ms(int loop_count)
{
- int i;
+/* int i;
for (i = 0; i < loop_count; i++){
asm volatile ("or r0, r0, r0\n\
or r0, r0, r0\n\
@@ -40,6 +40,7 @@ delay_1ms(int loop_count)
or r0, r0, r0\n\
or r0, r0, r0\n");
}
+*/
}
// delay about ms milliseconds
diff --git a/firmware/microblaze/lib/mdelay.h b/firmware/zpu/lib/mdelay.h
index 226bbb3f7..226bbb3f7 100644
--- a/firmware/microblaze/lib/mdelay.h
+++ b/firmware/zpu/lib/mdelay.h
diff --git a/firmware/microblaze/lib/memcpy_wa.c b/firmware/zpu/lib/memcpy_wa.c
index ef20efaa9..ef20efaa9 100644
--- a/firmware/microblaze/lib/memcpy_wa.c
+++ b/firmware/zpu/lib/memcpy_wa.c
diff --git a/firmware/microblaze/lib/memcpy_wa.h b/firmware/zpu/lib/memcpy_wa.h
index 072fc148f..072fc148f 100644
--- a/firmware/microblaze/lib/memcpy_wa.h
+++ b/firmware/zpu/lib/memcpy_wa.h
diff --git a/firmware/microblaze/lib/memset_wa.c b/firmware/zpu/lib/memset_wa.c
index da5da21ab..da5da21ab 100644
--- a/firmware/microblaze/lib/memset_wa.c
+++ b/firmware/zpu/lib/memset_wa.c
diff --git a/firmware/microblaze/lib/memset_wa.h b/firmware/zpu/lib/memset_wa.h
index 46d903d53..46d903d53 100644
--- a/firmware/microblaze/lib/memset_wa.h
+++ b/firmware/zpu/lib/memset_wa.h
diff --git a/firmware/microblaze/lib/net/eth_mac_addr.h b/firmware/zpu/lib/net/eth_mac_addr.h
index b44fb68f7..b44fb68f7 100644
--- a/firmware/microblaze/lib/net/eth_mac_addr.h
+++ b/firmware/zpu/lib/net/eth_mac_addr.h
diff --git a/firmware/microblaze/lib/net/padded_eth_hdr.h b/firmware/zpu/lib/net/padded_eth_hdr.h
index df816734f..df816734f 100644
--- a/firmware/microblaze/lib/net/padded_eth_hdr.h
+++ b/firmware/zpu/lib/net/padded_eth_hdr.h
diff --git a/firmware/microblaze/lib/net/socket_address.h b/firmware/zpu/lib/net/socket_address.h
index 336f30a0c..336f30a0c 100644
--- a/firmware/microblaze/lib/net/socket_address.h
+++ b/firmware/zpu/lib/net/socket_address.h
diff --git a/firmware/microblaze/lib/net_common.c b/firmware/zpu/lib/net_common.c
index 6305408d6..c1ca280d9 100644
--- a/firmware/microblaze/lib/net_common.c
+++ b/firmware/zpu/lib/net_common.c
@@ -22,7 +22,6 @@
#include "net_common.h"
#include "banal.h"
#include <hal_io.h>
-#include <buffer_pool.h>
#include <memory_map.h>
#include <memcpy_wa.h>
#include <ethernet.h>
@@ -36,28 +35,21 @@
#include "if_arp.h"
#include <ethertype.h>
#include <string.h>
+#include "pkt_ctrl.h"
+static const bool debug = false;
-int cpu_tx_buf_dest_port = PORT_ETH;
+static const eth_mac_addr_t BCAST_MAC_ADDR = {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}};
-// If this is non-zero, this dbsm could be writing to the ethernet
-dbsm_t *ac_could_be_sending_to_eth;
-
-static inline bool
-ip_addr_eq(const struct ip_addr a, const struct ip_addr b)
-{
- return a.addr == b.addr;
-}
+//used in the top level application...
+struct socket_address fp_socket_src, fp_socket_dst;
// ------------------------------------------------------------------------
static eth_mac_addr_t _local_mac_addr;
-void register_mac_addr(const eth_mac_addr_t *mac_addr){
- _local_mac_addr = *mac_addr;
-}
-
static struct ip_addr _local_ip_addr;
-void register_ip_addr(const struct ip_addr *ip_addr){
+void register_addrs(const eth_mac_addr_t *mac_addr, const struct ip_addr *ip_addr){
+ _local_mac_addr = *mac_addr;
_local_ip_addr = *ip_addr;
}
@@ -72,6 +64,12 @@ struct listener_entry {
static struct listener_entry listeners[MAX_UDP_LISTENERS];
+void init_udp_listeners(void){
+ for (int i = 0; i < MAX_UDP_LISTENERS; i++){
+ listeners[i].rcvr = NULL;
+ }
+}
+
static struct listener_entry *
find_listener_by_port(unsigned short port)
{
@@ -86,7 +84,7 @@ static struct listener_entry *
find_free_listener(void)
{
for (int i = 0; i < MAX_UDP_LISTENERS; i++){
- if (listeners[i].rcvr == 0)
+ if (listeners[i].rcvr == NULL)
return &listeners[i];
}
abort();
@@ -126,13 +124,6 @@ send_pkt(eth_mac_addr_t dst, int ethertype,
const void *buf1, size_t len1,
const void *buf2, size_t len2)
{
- // Wait for buffer to become idle
- // FIXME can this ever not be ready?
-
- //hal_set_leds(LED_BUF_BUSY, LED_BUF_BUSY);
- while((buffer_pool_status->status & BPS_IDLE(CPU_TX_BUF)) == 0)
- ;
- //hal_set_leds(0, LED_BUF_BUSY);
// Assemble the header
padded_eth_hdr_t ehdr;
@@ -141,9 +132,10 @@ send_pkt(eth_mac_addr_t dst, int ethertype,
ehdr.src = _local_mac_addr;
ehdr.ethertype = ethertype;
- uint32_t *p = buffer_ram(CPU_TX_BUF);
+ uint32_t *buff = (uint32_t *)pkt_ctrl_claim_outgoing_buffer();
// Copy the pieces into the buffer
+ uint32_t *p = buff;
*p++ = 0x0; // slow path
memcpy_wa(p, &ehdr, sizeof(ehdr)); // 4 lines
p += sizeof(ehdr)/sizeof(uint32_t);
@@ -173,34 +165,23 @@ send_pkt(eth_mac_addr_t dst, int ethertype,
p += len2/sizeof(uint32_t);
}
- size_t total_len = (p - buffer_ram(CPU_TX_BUF)) * sizeof(uint32_t);
+ size_t total_len = (p - buff) * sizeof(uint32_t);
if (total_len < 60) // ensure that we don't try to send a short packet
total_len = 60;
-
- // wait until nobody else is sending to the ethernet
- if (ac_could_be_sending_to_eth){
- //hal_set_leds(LED_ETH_BUSY, LED_ETH_BUSY);
- dbsm_wait_for_opening(ac_could_be_sending_to_eth);
- //hal_set_leds(0x0, LED_ETH_BUSY);
- }
-
- if (0){
- printf("send_pkt to port %d, len = %d\n",
- cpu_tx_buf_dest_port, (int) total_len);
- print_buffer(buffer_ram(CPU_TX_BUF), total_len/4);
- }
- // fire it off
- bp_send_from_buf(CPU_TX_BUF, cpu_tx_buf_dest_port, 1, 0, total_len/4);
-
- // wait for it to complete (not long, it's a small pkt)
- while((buffer_pool_status->status & (BPS_DONE(CPU_TX_BUF) | BPS_ERROR(CPU_TX_BUF))) == 0)
- ;
+ pkt_ctrl_commit_outgoing_buffer(total_len/4);
+ if (debug) printf("sent %d bytes\n", (int)total_len);
+}
- bp_clear_buf(CPU_TX_BUF);
+unsigned int CHKSUM(unsigned int x, unsigned int *chksum)
+{
+ *chksum += x;
+ *chksum = (*chksum & 0xffff) + (*chksum>>16);
+ *chksum = (*chksum & 0xffff) + (*chksum>>16);
+ return x;
}
-unsigned int
+static unsigned int
chksum_buffer(unsigned short *buf, int nshorts, unsigned int initial_chksum)
{
unsigned int chksum = initial_chksum;
@@ -210,7 +191,6 @@ chksum_buffer(unsigned short *buf, int nshorts, unsigned int initial_chksum)
return chksum;
}
-
void
send_ip_pkt(struct ip_addr dst, int protocol,
const void *buf0, size_t len0,
@@ -235,7 +215,7 @@ send_ip_pkt(struct ip_addr dst, int protocol,
bool found = arp_cache_lookup_mac(&ip.dest, &dst_mac);
if (!found){
printf("net_common: failed to hit cache looking for ");
- print_ip(ip.dest);
+ print_ip_addr(&ip.dest);
newline();
return;
}
@@ -294,6 +274,11 @@ handle_icmp_packet(struct ip_addr src, struct ip_addr dst,
if (icmp->code == ICMP_DUR_PORT){ // port unreachable
//handle destination port unreachable (the host ctrl+c'd the app):
+ //filter out non udp data response
+ struct ip_hdr *ip = (struct ip_hdr *)(((uint8_t*)icmp) + sizeof(struct icmp_echo_hdr));
+ struct udp_hdr *udp = (struct udp_hdr *)(((char *)ip) + IP_HLEN);
+ if (IPH_PROTO(ip) != IP_PROTO_UDP || udp->dest != fp_socket_dst.port) return;
+
//end async update packets per second
sr_tx_ctrl->cyc_per_up = 0;
@@ -373,8 +358,7 @@ void send_gratuitous_arp(void){
memcpy(req.ar_tip, get_ip_addr(), sizeof(struct ip_addr));
//send the request with a broadcast ethernet mac address
- eth_mac_addr_t t; memset(&t, 0xff, sizeof(t));
- send_pkt(t, ETHERTYPE_ARP, &req, sizeof(req), 0, 0, 0, 0);
+ send_pkt(BCAST_MAC_ADDR, ETHERTYPE_ARP, &req, sizeof(req), 0, 0, 0, 0);
}
static void
@@ -412,7 +396,7 @@ handle_arp_packet(struct arp_eth_ipv4 *p, size_t size)
sip.addr = get_int32(p->ar_sip);
tip.addr = get_int32(p->ar_tip);
- if (ip_addr_eq(tip, _local_ip_addr)){ // They're looking for us...
+ if (memcmp(&tip, &_local_ip_addr, sizeof(_local_ip_addr)) == 0){ // They're looking for us...
send_arp_reply(p, _local_mac_addr);
}
}
@@ -420,15 +404,17 @@ handle_arp_packet(struct arp_eth_ipv4 *p, size_t size)
void
handle_eth_packet(uint32_t *p, size_t nlines)
{
- //print_buffer(p, nlines);
+ static size_t bcount = 0;
+ if (debug) printf("===> %d\n", (int)bcount++);
+ if (debug) print_buffer(p, nlines);
- int ethertype = p[3] & 0xffff;
+ padded_eth_hdr_t *eth_hdr = (padded_eth_hdr_t *)p;
- if (ethertype == ETHERTYPE_ARP){
+ if (eth_hdr->ethertype == ETHERTYPE_ARP){
struct arp_eth_ipv4 *arp = (struct arp_eth_ipv4 *)(p + 4);
handle_arp_packet(arp, nlines*sizeof(uint32_t) - 14);
}
- else if (ethertype == ETHERTYPE_IPV4){
+ else if (eth_hdr->ethertype == ETHERTYPE_IPV4){
struct ip_hdr *ip = (struct ip_hdr *)(p + 4);
if (IPH_V(ip) != 4 || IPH_HL(ip) != 5) // ignore pkts w/ bad version or options
return;
@@ -436,7 +422,10 @@ handle_eth_packet(uint32_t *p, size_t nlines)
if (IPH_OFFSET(ip) & (IP_MF | IP_OFFMASK)) // ignore fragmented packets
return;
- // FIXME filter on dest ip addr (should be broadcast or for us)
+ // filter on dest ip addr (should be broadcast or for us)
+ bool is_bcast = memcmp(&eth_hdr->dst, &BCAST_MAC_ADDR, sizeof(BCAST_MAC_ADDR)) == 0;
+ bool is_my_ip = memcmp(&ip->dest, &_local_ip_addr, sizeof(_local_ip_addr)) == 0;
+ if (!is_bcast && !is_my_ip) return;
arp_cache_update(&ip->src, (eth_mac_addr_t *)(((char *)p)+8));
diff --git a/firmware/microblaze/lib/net_common.h b/firmware/zpu/lib/net_common.h
index 3040e5ef3..409022352 100644
--- a/firmware/microblaze/lib/net_common.h
+++ b/firmware/zpu/lib/net_common.h
@@ -20,25 +20,22 @@
#include <stdint.h>
#include <stddef.h>
-#include <dbsm.h>
#include <net/socket_address.h>
#include <net/eth_mac_addr.h>
-#define CPU_TX_BUF 7 // cpu -> eth
-
-extern int cpu_tx_buf_dest_port;
-
-// If this is non-zero, this dbsm could be writing to the ethernet
-extern dbsm_t *ac_could_be_sending_to_eth;
-
-void stop_streaming(void);
+/*
+ * 1's complement sum for IP and UDP headers
+ *
+ * init chksum to zero to start.
+ */
+unsigned int CHKSUM(unsigned int x, unsigned int *chksum);
typedef void (*udp_receiver_t)(struct socket_address src, struct socket_address dst,
unsigned char *payload, int payload_len);
-void register_mac_addr(const eth_mac_addr_t *mac_addr);
+void init_udp_listeners(void);
-void register_ip_addr(const struct ip_addr *ip_addr);
+void register_addrs(const eth_mac_addr_t *mac_addr, const struct ip_addr *ip_addr);
void register_udp_listener(int port, udp_receiver_t rcvr);
diff --git a/firmware/microblaze/lib/nonstdio.c b/firmware/zpu/lib/nonstdio.c
index 4b5fa4123..4b5fa4123 100644
--- a/firmware/microblaze/lib/nonstdio.c
+++ b/firmware/zpu/lib/nonstdio.c
diff --git a/firmware/microblaze/lib/nonstdio.h b/firmware/zpu/lib/nonstdio.h
index 62ebfa46d..6aca7ed9a 100644
--- a/firmware/microblaze/lib/nonstdio.h
+++ b/firmware/zpu/lib/nonstdio.h
@@ -45,4 +45,6 @@ void print_buffer(uint32_t *buf, size_t n);
//char *itoa(signed long value, char *result, int base);
//void reverse(char s[]);
+void print_ip_addr(const void *t);
+
#endif /* INCLUDED_NONSTDIO_H */
diff --git a/firmware/microblaze/lib/pic.c b/firmware/zpu/lib/pic.c
index 226da5f85..bd627ce6b 100644
--- a/firmware/microblaze/lib/pic.c
+++ b/firmware/zpu/lib/pic.c
@@ -26,17 +26,7 @@
/*
* Our secondary interrupt vector.
*/
-irq_handler_t pic_vector[NVECTORS] = {
- nop_handler,
- nop_handler,
- nop_handler,
- nop_handler,
- nop_handler,
- nop_handler,
- nop_handler,
- nop_handler
-};
-
+irq_handler_t pic_vector[NVECTORS];
void
pic_init(void)
@@ -47,6 +37,10 @@ pic_init(void)
pic_regs->edge_enable = PIC_ONETIME_INT | PIC_UNDERRUN_INT | PIC_OVERRUN_INT | PIC_PPS_INT;
pic_regs->polarity = ~0 & ~PIC_PHY_INT; // rising edge
pic_regs->pending = ~0; // clear all pending ints
+
+ for (int i = 0; i < NVECTORS; i++){
+ pic_vector[i] = pic_nop_handler;
+ }
}
/*
@@ -54,7 +48,8 @@ pic_init(void)
* system interrupt handler with the appropriate prologue and
* epilogue.
*/
-void pic_interrupt_handler() __attribute__ ((interrupt_handler));
+//FIXME zpu-gcc does not install interrupt_handler like this
+//void pic_interrupt_handler() __attribute__ ((interrupt_handler));
void pic_interrupt_handler()
{
@@ -88,7 +83,7 @@ pic_register_handler(unsigned irq, irq_handler_t handler)
}
void
-nop_handler(unsigned irq)
+pic_nop_handler(unsigned irq)
{
// nop
}
diff --git a/firmware/microblaze/lib/pic.h b/firmware/zpu/lib/pic.h
index 68918f9ad..cfdf721f4 100644
--- a/firmware/microblaze/lib/pic.h
+++ b/firmware/zpu/lib/pic.h
@@ -24,12 +24,13 @@ typedef void (*irq_handler_t)(unsigned irq);
void pic_init(void);
void pic_register_handler(unsigned irq, irq_handler_t handler);
-void nop_handler(unsigned irq); // default handler does nothing
+void pic_nop_handler(unsigned irq); // default handler does nothing
// FIXME inline assembler
int pic_disable_interrupts();
int pic_enable_interrupts();
void pic_restore_interrupts(int prev_status);
+void pic_interrupt_handler();
#endif /* INCLUDED_PIC_H */
diff --git a/firmware/zpu/lib/pkt_ctrl.c b/firmware/zpu/lib/pkt_ctrl.c
new file mode 100644
index 000000000..ebda35049
--- /dev/null
+++ b/firmware/zpu/lib/pkt_ctrl.c
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2010 Ettus Research LLC
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "pkt_ctrl.h"
+#include "memory_map.h"
+#include <nonstdio.h>
+
+void pkt_ctrl_program_inspector(
+ const struct ip_addr *ip_addr, uint16_t data_port
+){
+ router_ctrl->ip_addr = ip_addr->addr;
+ router_ctrl->data_ports = data_port;
+}
+
+void pkt_ctrl_set_routing_mode(pkt_ctrl_routing_mode_t mode){
+ switch(mode){
+ case PKT_CTRL_ROUTING_MODE_SLAVE: router_ctrl->mode_ctrl = 0; break;
+ case PKT_CTRL_ROUTING_MODE_MASTER: router_ctrl->mode_ctrl = 1; break;
+ }
+}
+
+static inline bool is_status_bit_set(int bit){
+ return router_status->status & (1 << bit);
+}
+
+#define CPU_OUT_HS_BIT 0 //from packet router to CPU
+#define CPU_INP_HS_BIT 1 //from CPU to packet router
+
+void *pkt_ctrl_claim_incoming_buffer(size_t *num_lines){
+ if (!is_status_bit_set(CPU_OUT_HS_BIT)) return NULL;
+ *num_lines = (router_status->status >> 16) & 0xffff;
+ return router_ram(0);
+}
+
+void pkt_ctrl_release_incoming_buffer(void){
+ router_ctrl->cpu_out_ctrl = 1;
+ while (is_status_bit_set(CPU_OUT_HS_BIT)){}
+ router_ctrl->cpu_out_ctrl = 0;
+}
+
+void *pkt_ctrl_claim_outgoing_buffer(void){
+ while (!is_status_bit_set(CPU_INP_HS_BIT)){}
+ return router_ram(1);
+}
+
+void pkt_ctrl_commit_outgoing_buffer(size_t num_lines){
+ router_ctrl->cpu_inp_ctrl = ((num_lines & 0xffff) << 16) | 1;
+ while (is_status_bit_set(CPU_INP_HS_BIT)){}
+ router_ctrl->cpu_inp_ctrl = 0;
+}
diff --git a/firmware/zpu/lib/pkt_ctrl.h b/firmware/zpu/lib/pkt_ctrl.h
new file mode 100644
index 000000000..410ffdaa4
--- /dev/null
+++ b/firmware/zpu/lib/pkt_ctrl.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2010 Ettus Research LLC
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef INCLUDED_PKT_CTRL_H
+#define INCLUDED_PKT_CTRL_H
+
+#include <stddef.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <lwip/ip_addr.h>
+
+typedef enum {
+ PKT_CTRL_ROUTING_MODE_SLAVE,
+ PKT_CTRL_ROUTING_MODE_MASTER,
+} pkt_ctrl_routing_mode_t;
+
+//! Program the decision values into the packet inspector
+void pkt_ctrl_program_inspector(
+ const struct ip_addr *ip_addr, uint16_t data_port
+);
+
+//! Set the routing mode for this device
+void pkt_ctrl_set_routing_mode(pkt_ctrl_routing_mode_t mode);
+
+/*!
+ * Try to claim an incomming buffer.
+ * \param num_lines filled with the buffer size
+ * \return a pointer to the buffer memory or NULL
+ */
+void *pkt_ctrl_claim_incoming_buffer(size_t *num_lines);
+
+/*!
+ * Release the incoming buffer. Call when done.
+ */
+void pkt_ctrl_release_incoming_buffer(void);
+
+/*!
+ * Claim an outgoing buffer.
+ * \return a pointer to the buffer
+ */
+void *pkt_ctrl_claim_outgoing_buffer(void);
+
+/*!
+ * Commit the outgoing buffer.
+ * \param num_lines how many lines written.
+ */
+void pkt_ctrl_commit_outgoing_buffer(size_t num_lines);
+
+#endif /* INCLUDED_PKT_CTRL_H */
diff --git a/firmware/microblaze/lib/print_mac_addr.c b/firmware/zpu/lib/print_addrs.c
index 475082325..29601c47c 100644
--- a/firmware/microblaze/lib/print_mac_addr.c
+++ b/firmware/zpu/lib/print_addrs.c
@@ -26,3 +26,7 @@ print_mac_addr(const unsigned char addr[6])
}
}
+void print_ip_addr(const void *t){
+ uint8_t *p = (uint8_t *)t;
+ printf("%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
+}
diff --git a/firmware/microblaze/lib/print_buffer.c b/firmware/zpu/lib/print_buffer.c
index 9f9104bb5..9f9104bb5 100644
--- a/firmware/microblaze/lib/print_buffer.c
+++ b/firmware/zpu/lib/print_buffer.c
diff --git a/firmware/microblaze/lib/print_rmon_regs.c b/firmware/zpu/lib/print_rmon_regs.c
index 6d9986909..6d9986909 100644
--- a/firmware/microblaze/lib/print_rmon_regs.c
+++ b/firmware/zpu/lib/print_rmon_regs.c
diff --git a/firmware/microblaze/lib/print_rmon_regs.h b/firmware/zpu/lib/print_rmon_regs.h
index 44e52da84..44e52da84 100644
--- a/firmware/microblaze/lib/print_rmon_regs.h
+++ b/firmware/zpu/lib/print_rmon_regs.h
diff --git a/firmware/microblaze/lib/printf.c b/firmware/zpu/lib/printf.c
index 45bd57cb9..45bd57cb9 100644
--- a/firmware/microblaze/lib/printf.c
+++ b/firmware/zpu/lib/printf.c
diff --git a/firmware/microblaze/lib/printf.c.smaller b/firmware/zpu/lib/printf.c.smaller
index 4d858648d..4d858648d 100644
--- a/firmware/microblaze/lib/printf.c.smaller
+++ b/firmware/zpu/lib/printf.c.smaller
diff --git a/firmware/microblaze/lib/spi.c b/firmware/zpu/lib/spi.c
index 2a41a1bfa..af0d8a68f 100644
--- a/firmware/microblaze/lib/spi.c
+++ b/firmware/zpu/lib/spi.c
@@ -20,9 +20,9 @@
#include "pic.h"
#include "nonstdio.h"
-void (*volatile spi_callback)(void); //SPI callback when xfer complete.
+//void (*volatile spi_callback)(void); //SPI callback when xfer complete.
-static void spi_irq_handler(unsigned irq);
+//static void spi_irq_handler(unsigned irq);
void
spi_init(void)
@@ -66,6 +66,7 @@ spi_transact(bool readback, int slave, uint32_t data, int length, uint32_t flags
return 0;
}
+/*
void spi_register_callback(void (*volatile callback)(void)) {
spi_callback = callback;
}
@@ -106,3 +107,4 @@ spi_async_transact(int slave, uint32_t data, int length, uint32_t flags, void (*
return true;
}
+*/
diff --git a/firmware/microblaze/lib/spi.h b/firmware/zpu/lib/spi.h
index 54618cedd..71245150a 100644
--- a/firmware/microblaze/lib/spi.h
+++ b/firmware/zpu/lib/spi.h
@@ -48,12 +48,12 @@ void spi_wait(void);
uint32_t
spi_transact(bool readback, int slave, uint32_t data, int length, uint32_t flags);
-uint32_t spi_get_data(void);
+//uint32_t spi_get_data(void);
//static void spi_irq_handler(unsigned irq);
-void spi_register_callback(void (*volatile callback)(void));
+//void spi_register_callback(void (*volatile callback)(void));
-bool
-spi_async_transact(int slave, uint32_t data, int length, uint32_t flags, void (*volatile callback)(void));
+//bool
+//spi_async_transact(int slave, uint32_t data, int length, uint32_t flags, void (*volatile callback)(void));
// ----------------------------------------------------------------
// Routines that manipulate the FLASH SPI BUS
diff --git a/firmware/microblaze/lib/stdint.h b/firmware/zpu/lib/stdint.h
index b5a8611a9..b5a8611a9 100644
--- a/firmware/microblaze/lib/stdint.h
+++ b/firmware/zpu/lib/stdint.h
diff --git a/firmware/microblaze/lib/stdio.h b/firmware/zpu/lib/stdio.h
index 12a7ed0bb..12a7ed0bb 100644
--- a/firmware/microblaze/lib/stdio.h
+++ b/firmware/zpu/lib/stdio.h
diff --git a/firmware/microblaze/lib/u2_init.c b/firmware/zpu/lib/u2_init.c
index 4a553a713..191a0e816 100644
--- a/firmware/microblaze/lib/u2_init.c
+++ b/firmware/zpu/lib/u2_init.c
@@ -20,25 +20,13 @@
#include "spi.h"
#include "pic.h"
#include "hal_io.h"
-#include "buffer_pool.h"
#include "hal_uart.h"
#include "i2c.h"
-#include "i2c_async.h"
#include "mdelay.h"
#include "clocks.h"
#include "usrp2/fw_common.h"
#include "nonstdio.h"
-unsigned char u2_hw_rev_major;
-unsigned char u2_hw_rev_minor;
-
-static inline void
-get_hw_rev(void)
-{
- bool ok = eeprom_read(USRP2_I2C_ADDR_MBOARD, USRP2_EE_MBOARD_REV, &u2_hw_rev_minor, 1);
- ok &= eeprom_read(USRP2_I2C_ADDR_MBOARD, USRP2_EE_MBOARD_REV+1, &u2_hw_rev_major, 1);
-}
-
/*
* We ought to arrange for this to be called before main, but for now,
* we require that the user's main call u2_init as the first thing...
@@ -60,13 +48,8 @@ u2_init(void)
// init i2c so we can read our rev
pic_init(); // progammable interrupt controller
i2c_init();
- i2c_register_handler(); //for using async I2C
hal_enable_ints();
- bp_init(); // buffer pool
-
-
-
// flash all leds to let us know board is alive
hal_set_leds(0x0, 0x1f);
mdelay(100);
@@ -85,6 +68,8 @@ u2_init(void)
printf("ad9510 reg[0x%x] = 0x%x\n", rr, vv);
}
#endif
-
+
+ output_regs->serdes_ctrl = (SERDES_ENABLE | SERDES_RXEN);
+
return true;
}
diff --git a/firmware/microblaze/lib/u2_init.h b/firmware/zpu/lib/u2_init.h
index 848bd88de..848bd88de 100644
--- a/firmware/microblaze/lib/u2_init.h
+++ b/firmware/zpu/lib/u2_init.h
diff --git a/firmware/microblaze/lib/udp_fw_update.h b/firmware/zpu/lib/udp_fw_update.h
index d25525bd2..d25525bd2 100644
--- a/firmware/microblaze/lib/udp_fw_update.h
+++ b/firmware/zpu/lib/udp_fw_update.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/CHANGELOG b/firmware/zpu/lwip/lwip-1.3.1/CHANGELOG
index a45765010..a45765010 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/CHANGELOG
+++ b/firmware/zpu/lwip/lwip-1.3.1/CHANGELOG
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/COPYING b/firmware/zpu/lwip/lwip-1.3.1/COPYING
index e23898b5e..e23898b5e 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/COPYING
+++ b/firmware/zpu/lwip/lwip-1.3.1/COPYING
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/FILES b/firmware/zpu/lwip/lwip-1.3.1/FILES
index 66253196f..66253196f 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/FILES
+++ b/firmware/zpu/lwip/lwip-1.3.1/FILES
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/README b/firmware/zpu/lwip/lwip-1.3.1/README
index 8dda4b468..8dda4b468 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/README
+++ b/firmware/zpu/lwip/lwip-1.3.1/README
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/doc/FILES b/firmware/zpu/lwip/lwip-1.3.1/doc/FILES
index 05d356f4f..05d356f4f 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/doc/FILES
+++ b/firmware/zpu/lwip/lwip-1.3.1/doc/FILES
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/doc/contrib.txt b/firmware/zpu/lwip/lwip-1.3.1/doc/contrib.txt
index 39596fca3..39596fca3 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/doc/contrib.txt
+++ b/firmware/zpu/lwip/lwip-1.3.1/doc/contrib.txt
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/doc/rawapi.txt b/firmware/zpu/lwip/lwip-1.3.1/doc/rawapi.txt
index 8eec6e786..8eec6e786 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/doc/rawapi.txt
+++ b/firmware/zpu/lwip/lwip-1.3.1/doc/rawapi.txt
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/doc/savannah.txt b/firmware/zpu/lwip/lwip-1.3.1/doc/savannah.txt
index 409905b10..409905b10 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/doc/savannah.txt
+++ b/firmware/zpu/lwip/lwip-1.3.1/doc/savannah.txt
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/doc/snmp_agent.txt b/firmware/zpu/lwip/lwip-1.3.1/doc/snmp_agent.txt
index 9b58616a6..9b58616a6 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/doc/snmp_agent.txt
+++ b/firmware/zpu/lwip/lwip-1.3.1/doc/snmp_agent.txt
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/doc/sys_arch.txt b/firmware/zpu/lwip/lwip-1.3.1/doc/sys_arch.txt
index 66310a91e..66310a91e 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/doc/sys_arch.txt
+++ b/firmware/zpu/lwip/lwip-1.3.1/doc/sys_arch.txt
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/.hgignore b/firmware/zpu/lwip/lwip-1.3.1/src/.hgignore
index f88587df3..f88587df3 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/.hgignore
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/.hgignore
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/FILES b/firmware/zpu/lwip/lwip-1.3.1/src/FILES
index 952aeabb4..952aeabb4 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/FILES
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/FILES
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/api/api_lib.c b/firmware/zpu/lwip/lwip-1.3.1/src/api/api_lib.c
index 86df911ea..86df911ea 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/api/api_lib.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/api/api_lib.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/api/api_msg.c b/firmware/zpu/lwip/lwip-1.3.1/src/api/api_msg.c
index 28d101019..28d101019 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/api/api_msg.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/api/api_msg.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/api/err.c b/firmware/zpu/lwip/lwip-1.3.1/src/api/err.c
index a90cb98c8..a90cb98c8 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/api/err.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/api/err.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/api/netbuf.c b/firmware/zpu/lwip/lwip-1.3.1/src/api/netbuf.c
index af44eefc7..af44eefc7 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/api/netbuf.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/api/netbuf.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/api/netdb.c b/firmware/zpu/lwip/lwip-1.3.1/src/api/netdb.c
index 8aa237f4c..8aa237f4c 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/api/netdb.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/api/netdb.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/api/netifapi.c b/firmware/zpu/lwip/lwip-1.3.1/src/api/netifapi.c
index 491837378..491837378 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/api/netifapi.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/api/netifapi.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/api/sockets.c b/firmware/zpu/lwip/lwip-1.3.1/src/api/sockets.c
index f177261e1..f177261e1 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/api/sockets.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/api/sockets.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/api/tcpip.c b/firmware/zpu/lwip/lwip-1.3.1/src/api/tcpip.c
index 002df90b2..002df90b2 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/api/tcpip.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/api/tcpip.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/#tcp_out.c# b/firmware/zpu/lwip/lwip-1.3.1/src/core/#tcp_out.c#
index ca72d9dcc..ca72d9dcc 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/#tcp_out.c#
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/#tcp_out.c#
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/dhcp.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/dhcp.c
index df0f97881..df0f97881 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/dhcp.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/dhcp.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/dns.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/dns.c
index 62a2592e9..62a2592e9 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/dns.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/dns.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/init.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/init.c
index 277811a6a..277811a6a 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/init.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/init.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/autoip.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/autoip.c
index 367adb060..367adb060 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/autoip.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/autoip.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/icmp.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/icmp.c
index b97a587a7..b97a587a7 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/icmp.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/icmp.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/igmp.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/igmp.c
index 7c07bc465..7c07bc465 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/igmp.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/igmp.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/inet.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/inet.c
index 69baf1d50..69baf1d50 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/inet.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/inet.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/inet_chksum.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/inet_chksum.c
index 185881efd..185881efd 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/inet_chksum.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/inet_chksum.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/ip.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/ip.c
index 7e404a9f3..7e404a9f3 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/ip.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/ip.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/ip_addr.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/ip_addr.c
index 94bf4678a..94bf4678a 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/ip_addr.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/ip_addr.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/ip_frag.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/ip_frag.c
index 1939d831b..1939d831b 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv4/ip_frag.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv4/ip_frag.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv6/README b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv6/README
index 362000486..362000486 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv6/README
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv6/README
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv6/icmp6.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv6/icmp6.c
index 4fcc89551..4fcc89551 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv6/icmp6.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv6/icmp6.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv6/inet6.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv6/inet6.c
index c3de85c09..c3de85c09 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv6/inet6.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv6/inet6.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv6/ip6.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv6/ip6.c
index 7e4342001..7e4342001 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv6/ip6.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv6/ip6.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv6/ip6_addr.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv6/ip6_addr.c
index 2da6cea42..2da6cea42 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/ipv6/ip6_addr.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/ipv6/ip6_addr.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/mem.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/mem.c
index b5f13ab3b..b5f13ab3b 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/mem.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/mem.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/memp.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/memp.c
index dfc32213d..dfc32213d 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/memp.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/memp.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/netif.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/netif.c
index c9b6b9b5e..c9b6b9b5e 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/netif.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/netif.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/pbuf.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/pbuf.c
index 50b22c354..50b22c354 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/pbuf.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/pbuf.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/raw.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/raw.c
index 589950e75..589950e75 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/raw.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/raw.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/snmp/asn1_dec.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/snmp/asn1_dec.c
index 650fb4037..650fb4037 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/snmp/asn1_dec.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/snmp/asn1_dec.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/snmp/asn1_enc.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/snmp/asn1_enc.c
index 77af6b4ba..77af6b4ba 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/snmp/asn1_enc.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/snmp/asn1_enc.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/snmp/mib2.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/snmp/mib2.c
index 33eeee66c..33eeee66c 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/snmp/mib2.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/snmp/mib2.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/snmp/mib_structs.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/snmp/mib_structs.c
index af8994ed2..af8994ed2 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/snmp/mib_structs.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/snmp/mib_structs.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/snmp/msg_in.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/snmp/msg_in.c
index d0c3c7534..d0c3c7534 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/snmp/msg_in.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/snmp/msg_in.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/snmp/msg_out.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/snmp/msg_out.c
index b705aaca7..b705aaca7 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/snmp/msg_out.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/snmp/msg_out.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/stats.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/stats.c
index a036d83bb..a036d83bb 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/stats.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/stats.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/sys.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/sys.c
index d1fbda4e6..d1fbda4e6 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/sys.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/sys.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/tcp.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/tcp.c
index 0f3fd41c3..0f3fd41c3 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/tcp.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/tcp.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/tcp_in.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/tcp_in.c
index 362a4a62d..362a4a62d 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/tcp_in.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/tcp_in.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/tcp_out.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/tcp_out.c
index ca72d9dcc..ca72d9dcc 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/tcp_out.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/tcp_out.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/core/udp.c b/firmware/zpu/lwip/lwip-1.3.1/src/core/udp.c
index d8d644d44..d8d644d44 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/core/udp.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/core/udp.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/autoip.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/autoip.h
index 076a2ed23..076a2ed23 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/autoip.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/autoip.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/icmp.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/icmp.h
index ff838f43a..ff838f43a 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/icmp.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/icmp.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/igmp.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/igmp.h
index 59c933f35..59c933f35 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/igmp.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/igmp.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/inet.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/inet.h
index 6f30d0d12..6f30d0d12 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/inet.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/inet.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/inet_chksum.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/inet_chksum.h
index 5cae59cbd..5cae59cbd 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/inet_chksum.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/inet_chksum.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/ip.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/ip.h
index 14eba3ca5..14eba3ca5 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/ip.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/ip.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/ip_addr.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/ip_addr.h
index f2e4c2233..f2e4c2233 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/ip_addr.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/ip_addr.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/ip_frag.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/ip_frag.h
index 380e604dc..380e604dc 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv4/lwip/ip_frag.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv4/lwip/ip_frag.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv6/lwip/icmp.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv6/lwip/icmp.h
index 87e9ffd96..87e9ffd96 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv6/lwip/icmp.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv6/lwip/icmp.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv6/lwip/inet.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv6/lwip/inet.h
index de1a0b636..de1a0b636 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv6/lwip/inet.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv6/lwip/inet.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv6/lwip/ip.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv6/lwip/ip.h
index a01cfc65b..a01cfc65b 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv6/lwip/ip.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv6/lwip/ip.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv6/lwip/ip_addr.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv6/lwip/ip_addr.h
index b2d8ae566..b2d8ae566 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/ipv6/lwip/ip_addr.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/ipv6/lwip/ip_addr.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/api.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/api.h
index f6b1f7434..f6b1f7434 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/api.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/api.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/api_msg.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/api_msg.h
index 4272d77cc..4272d77cc 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/api_msg.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/api_msg.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/arch.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/arch.h
index 3a5a0e4f2..3a5a0e4f2 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/arch.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/arch.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/debug.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/debug.h
index d5c4e4747..d5c4e4747 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/debug.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/debug.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/def.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/def.h
index d2ed251df..d2ed251df 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/def.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/def.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/dhcp.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/dhcp.h
index 825dba6ec..825dba6ec 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/dhcp.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/dhcp.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/dns.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/dns.h
index e5f4b7a3d..e5f4b7a3d 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/dns.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/dns.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/err.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/err.h
index 696764454..696764454 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/err.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/err.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/init.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/init.h
index a4dc0577f..a4dc0577f 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/init.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/init.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/mem.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/mem.h
index 327c2049f..327c2049f 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/mem.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/mem.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/memp.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/memp.h
index f0d073994..f0d073994 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/memp.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/memp.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/memp_std.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/memp_std.h
index 344690328..344690328 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/memp_std.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/memp_std.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/netbuf.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/netbuf.h
index 6d84dd073..6d84dd073 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/netbuf.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/netbuf.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/netdb.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/netdb.h
index 0f7b2ec04..0f7b2ec04 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/netdb.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/netdb.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/netif.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/netif.h
index a32503052..a32503052 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/netif.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/netif.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/netifapi.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/netifapi.h
index 36c6bd0a2..36c6bd0a2 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/netifapi.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/netifapi.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/opt.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/opt.h
index e8bd8b89e..e8bd8b89e 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/opt.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/opt.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/pbuf.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/pbuf.h
index 8380f65da..8380f65da 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/pbuf.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/pbuf.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/raw.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/raw.h
index 20b0a11bb..20b0a11bb 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/raw.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/raw.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/sio.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/sio.h
index 7d9162e49..7d9162e49 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/sio.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/sio.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/snmp.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/snmp.h
index dd03d5d70..dd03d5d70 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/snmp.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/snmp.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/snmp_asn1.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/snmp_asn1.h
index 8a602881f..8a602881f 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/snmp_asn1.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/snmp_asn1.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/snmp_msg.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/snmp_msg.h
index b2f69c4be..b2f69c4be 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/snmp_msg.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/snmp_msg.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/snmp_structs.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/snmp_structs.h
index 9f3f8a94e..9f3f8a94e 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/snmp_structs.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/snmp_structs.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/sockets.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/sockets.h
index 7b52e151c..7b52e151c 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/sockets.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/sockets.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/stats.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/stats.h
index aa179f5c0..aa179f5c0 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/stats.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/stats.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/sys.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/sys.h
index 0cc84ddf1..0cc84ddf1 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/sys.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/sys.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/tcp.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/tcp.h
index 8f6b9d3c1..8f6b9d3c1 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/tcp.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/tcp.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/tcpip.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/tcpip.h
index 75393ee91..75393ee91 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/tcpip.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/tcpip.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/udp.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/udp.h
index d7b2a3820..d7b2a3820 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/lwip/udp.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/lwip/udp.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/netif/etharp.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/netif/etharp.h
index db691d91d..db691d91d 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/netif/etharp.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/netif/etharp.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/netif/loopif.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/netif/loopif.h
index 304af4b39..304af4b39 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/netif/loopif.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/netif/loopif.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/netif/ppp_oe.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/netif/ppp_oe.h
index 3aa55aec7..3aa55aec7 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/netif/ppp_oe.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/netif/ppp_oe.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/include/netif/slipif.h b/firmware/zpu/lwip/lwip-1.3.1/src/include/netif/slipif.h
index aa08ada4a..aa08ada4a 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/include/netif/slipif.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/include/netif/slipif.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/FILES b/firmware/zpu/lwip/lwip-1.3.1/src/netif/FILES
index 1c4f5928d..1c4f5928d 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/FILES
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/FILES
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/etharp.c b/firmware/zpu/lwip/lwip-1.3.1/src/netif/etharp.c
index 73ea21173..73ea21173 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/etharp.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/etharp.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ethernetif.c b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ethernetif.c
index ccd7bd67f..ccd7bd67f 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ethernetif.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ethernetif.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/loopif.c b/firmware/zpu/lwip/lwip-1.3.1/src/netif/loopif.c
index 1e1f28cf1..1e1f28cf1 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/loopif.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/loopif.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/auth.c b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/auth.c
index 4c0ee6a8e..4c0ee6a8e 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/auth.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/auth.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/auth.h b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/auth.h
index 86ff04945..86ff04945 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/auth.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/auth.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/chap.c b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/chap.c
index 6d9c3c3ce..6d9c3c3ce 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/chap.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/chap.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/chap.h b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/chap.h
index 83dafd734..83dafd734 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/chap.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/chap.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/chpms.c b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/chpms.c
index 0c7521f20..0c7521f20 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/chpms.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/chpms.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/chpms.h b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/chpms.h
index df070fb35..df070fb35 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/chpms.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/chpms.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/fsm.c b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/fsm.c
index c073f1e36..c073f1e36 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/fsm.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/fsm.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/fsm.h b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/fsm.h
index 14034ec7f..14034ec7f 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/fsm.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/fsm.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/ipcp.c b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/ipcp.c
index 3a403a0a6..3a403a0a6 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/ipcp.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/ipcp.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/ipcp.h b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/ipcp.h
index dfcf4fba6..dfcf4fba6 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/ipcp.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/ipcp.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/lcp.c b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/lcp.c
index 85a0add95..85a0add95 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/lcp.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/lcp.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/lcp.h b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/lcp.h
index 1a5e5a4c0..1a5e5a4c0 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/lcp.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/lcp.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/magic.c b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/magic.c
index d3922bb56..d3922bb56 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/magic.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/magic.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/magic.h b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/magic.h
index bc5174993..bc5174993 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/magic.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/magic.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/md5.c b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/md5.c
index d65ecedbf..d65ecedbf 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/md5.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/md5.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/md5.h b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/md5.h
index e129533f3..e129533f3 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/md5.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/md5.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/pap.c b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/pap.c
index 7c3fd7e4c..7c3fd7e4c 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/pap.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/pap.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/pap.h b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/pap.h
index 0a09fc841..0a09fc841 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/pap.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/pap.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/ppp.c b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/ppp.c
index 8720c3368..8720c3368 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/ppp.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/ppp.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/ppp.h b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/ppp.h
index d5caa0a7e..d5caa0a7e 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/ppp.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/ppp.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/ppp_oe.c b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/ppp_oe.c
index c34c529b6..c34c529b6 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/ppp_oe.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/ppp_oe.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/pppdebug.h b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/pppdebug.h
index 6253863c9..6253863c9 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/pppdebug.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/pppdebug.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/randm.c b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/randm.c
index 0c622a0b0..0c622a0b0 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/randm.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/randm.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/randm.h b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/randm.h
index a0984b020..a0984b020 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/randm.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/randm.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/vj.c b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/vj.c
index 814ea72c5..814ea72c5 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/vj.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/vj.c
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/vj.h b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/vj.h
index b9617da4d..b9617da4d 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/vj.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/vj.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/vjbsdhdr.h b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/vjbsdhdr.h
index f46267614..f46267614 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/ppp/vjbsdhdr.h
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/ppp/vjbsdhdr.h
diff --git a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/slipif.c b/firmware/zpu/lwip/lwip-1.3.1/src/netif/slipif.c
index 6cb2db442..6cb2db442 100644
--- a/firmware/microblaze/lwip/lwip-1.3.1/src/netif/slipif.c
+++ b/firmware/zpu/lwip/lwip-1.3.1/src/netif/slipif.c
diff --git a/firmware/microblaze/lwip/lwipopts.h b/firmware/zpu/lwip/lwipopts.h
index 3839eea83..3839eea83 100644
--- a/firmware/microblaze/lwip/lwipopts.h
+++ b/firmware/zpu/lwip/lwipopts.h
diff --git a/firmware/microblaze/lwip/lwippools.h b/firmware/zpu/lwip/lwippools.h
index caee23c82..caee23c82 100644
--- a/firmware/microblaze/lwip/lwippools.h
+++ b/firmware/zpu/lwip/lwippools.h
diff --git a/firmware/microblaze/lwip_port/arch/cc.h b/firmware/zpu/lwip_port/arch/cc.h
index d8d53ecf8..d8d53ecf8 100644
--- a/firmware/microblaze/lwip_port/arch/cc.h
+++ b/firmware/zpu/lwip_port/arch/cc.h
diff --git a/firmware/microblaze/lwip_port/arch/perf.h b/firmware/zpu/lwip_port/arch/perf.h
index f0906d03f..f0906d03f 100644
--- a/firmware/microblaze/lwip_port/arch/perf.h
+++ b/firmware/zpu/lwip_port/arch/perf.h
diff --git a/firmware/microblaze/lwip_port/netif/eth_driver.c b/firmware/zpu/lwip_port/netif/eth_driver.c
index 18c6eaf3e..18c6eaf3e 100644
--- a/firmware/microblaze/lwip_port/netif/eth_driver.c
+++ b/firmware/zpu/lwip_port/netif/eth_driver.c
diff --git a/firmware/microblaze/lwip_port/netif/eth_driver.h b/firmware/zpu/lwip_port/netif/eth_driver.h
index 72a212091..72a212091 100644
--- a/firmware/microblaze/lwip_port/netif/eth_driver.h
+++ b/firmware/zpu/lwip_port/netif/eth_driver.h
diff --git a/firmware/microblaze/usrp2/Makefile.am b/firmware/zpu/usrp2/CMakeLists.txt
index 7a58e7253..8ed31b8d4 100644
--- a/firmware/microblaze/usrp2/Makefile.am
+++ b/firmware/zpu/usrp2/CMakeLists.txt
@@ -15,33 +15,22 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-include $(top_srcdir)/Makefile.common
-
-AM_CFLAGS = \
- $(COMMON_CFLAGS)
-
-AM_LDFLAGS = \
- $(COMMON_LFLAGS) \
- -Wl,-defsym -Wl,_TEXT_START_ADDR=0x0050 \
- -Wl,-defsym -Wl,_STACK_SIZE=3072
-
-LDADD = libusrp2.a
-
-LDADD = libusrp2.a
-
-########################################################################
-# USRP2 specific library and programs
########################################################################
-noinst_LIBRARIES = libusrp2.a
+INCLUDE(${CMAKE_SOURCE_DIR}/lib/CMakeLists.txt)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-libusrp2_a_SOURCES = \
- $(COMMON_SRCS) \
- sd.c \
- ethernet.c \
- udp_fw_update.c
+ADD_LIBRARY(libusrp2fw STATIC
+ ${COMMON_SRCS}
+ sd.c
+ ethernet.c
+ udp_fw_update.c
+)
-noinst_PROGRAMS = \
- usrp2_txrx_uhd.elf
+########################################################################
+ADD_EXECUTABLE(usrp2_txrx_uhd.elf ${CMAKE_SOURCE_DIR}/apps/txrx_uhd.c)
+TARGET_LINK_LIBRARIES(usrp2_txrx_uhd.elf libusrp2fw)
+GEN_OUTPUTS(usrp2_txrx_uhd.elf)
-usrp2_txrx_uhd_elf_SOURCES = \
- $(top_srcdir)/apps/txrx_uhd.c
+ADD_EXECUTABLE(usrp2_blinkenlights.elf ${CMAKE_SOURCE_DIR}/apps/blinkenlights.c)
+TARGET_LINK_LIBRARIES(usrp2_blinkenlights.elf libusrp2fw)
+GEN_OUTPUTS(usrp2_blinkenlights.elf)
diff --git a/firmware/microblaze/usrp2/eth_phy.h b/firmware/zpu/usrp2/eth_phy.h
index 6c16f97b7..6c16f97b7 100644
--- a/firmware/microblaze/usrp2/eth_phy.h
+++ b/firmware/zpu/usrp2/eth_phy.h
diff --git a/firmware/microblaze/usrp2/ethernet.c b/firmware/zpu/usrp2/ethernet.c
index 5d4654bda..5d4654bda 100644
--- a/firmware/microblaze/usrp2/ethernet.c
+++ b/firmware/zpu/usrp2/ethernet.c
diff --git a/firmware/microblaze/usrp2/memory_map.h b/firmware/zpu/usrp2/memory_map.h
index eac0c217f..ca7453c24 100644
--- a/firmware/microblaze/usrp2/memory_map.h
+++ b/firmware/zpu/usrp2/memory_map.h
@@ -18,7 +18,7 @@
/* Overall Memory Map
* 0000-7FFF 32K RAM space (16K on 1500, 24K on 2000, 32K on DSP)
- * 8000-BFFF 16K Buffer Pool
+ * 8000-BFFF 16K Packet Router
* C000-FFFF 16K Peripherals
*/
@@ -45,22 +45,18 @@
#define RAM_BASE 0x0000
////////////////////////////////////////////////////////////////
-// Buffer Pool RAM, Slave 1
+// Packet Router RAM, Slave 1
//
-// The buffers themselves are located in Slave 1, Buffer Pool RAM.
-// The status registers are in Slave 5, Buffer Pool Status.
+// The buffers themselves are located in Slave 1, Packet Router RAM.
+// The status registers are in Slave 5, Packet Router Status.
// The control register is in Slave 7, Settings Bus.
-#define BUFFER_POOL_RAM_BASE 0x8000
+#define ROUTER_RAM_BASE 0x8000
-#define NBUFFERS 8
-#define BP_NLINES 0x0200 // number of 32-bit lines in a buffer
-#define BP_LAST_LINE (BP_NLINES - 1) // last line in a buffer
+#define RAM_NLINES 0x0200 // number of 32-bit lines in a buffer
-#define buffer_pool_ram \
- ((uint32_t *) BUFFER_POOL_RAM_BASE)
-
-#define buffer_ram(n) (&buffer_pool_ram[(n) * BP_NLINES])
+#define _router_ram ((uint32_t *) ROUTER_RAM_BASE)
+#define router_ram(n) (&_router_ram[(n) * RAM_NLINES])
/////////////////////////////////////////////////////
@@ -164,93 +160,25 @@ typedef struct {
#define gpio_base ((gpio_regs_t *) GPIO_BASE)
///////////////////////////////////////////////////
-// Buffer Pool Status, Slave 5
+// Packet Router Status, Slave 5
//
-// The buffers themselves are located in Slave 1, Buffer Pool RAM.
-// The status registers are in Slave 5, Buffer Pool Status.
+// The buffers themselves are located in Slave 1, Packet Router RAM.
+// The status registers are in Slave 5, Packet Router Status.
// The control register is in Slave 7, Settings Bus.
-#define BUFFER_POOL_STATUS_BASE 0xCC00
+#define ROUTER_STATUS_BASE 0xCC00
typedef struct {
- volatile uint32_t last_line[NBUFFERS]; // last line xfer'd in buffer
- volatile uint32_t status; // error and done flags
+ volatile uint32_t _padding[8];
+ volatile uint32_t status;
volatile uint32_t hw_config; // see below
volatile uint32_t dummy[3];
volatile uint32_t irqs;
volatile uint32_t pri_enc_bp_status;
volatile uint32_t cycle_count;
-} buffer_pool_status_t;
+} router_status_t;
-#define buffer_pool_status ((buffer_pool_status_t *) BUFFER_POOL_STATUS_BASE)
-
-/*
- * Buffer n's xfer is done.
- * Clear this bit by issuing bp_clear_buf(n)
- */
-#define BPS_DONE(n) (0x00000001 << (n))
-#define BPS_DONE_0 BPS_DONE(0)
-#define BPS_DONE_1 BPS_DONE(1)
-#define BPS_DONE_2 BPS_DONE(2)
-#define BPS_DONE_3 BPS_DONE(3)
-#define BPS_DONE_4 BPS_DONE(4)
-#define BPS_DONE_5 BPS_DONE(5)
-#define BPS_DONE_6 BPS_DONE(6)
-#define BPS_DONE_7 BPS_DONE(7)
-
-/*
- * Buffer n's xfer had an error.
- * Clear this bit by issuing bp_clear_buf(n)
- */
-#define BPS_ERROR(n) (0x00000100 << (n))
-#define BPS_ERROR_0 BPS_ERROR(0)
-#define BPS_ERROR_1 BPS_ERROR(1)
-#define BPS_ERROR_2 BPS_ERROR(2)
-#define BPS_ERROR_3 BPS_ERROR(3)
-#define BPS_ERROR_4 BPS_ERROR(4)
-#define BPS_ERROR_5 BPS_ERROR(5)
-#define BPS_ERROR_6 BPS_ERROR(6)
-#define BPS_ERROR_7 BPS_ERROR(7)
-
-/*
- * Buffer n is idle. A buffer is idle if it's not
- * DONE, ERROR, or processing a transaction. If it's
- * IDLE, it's safe to start a new transaction.
- *
- * Clear this bit by starting a xfer with
- * bp_send_from_buf or bp_receive_to_buf.
- */
-#define BPS_IDLE(n) (0x00010000 << (n))
-#define BPS_IDLE_0 BPS_IDLE(0)
-#define BPS_IDLE_1 BPS_IDLE(1)
-#define BPS_IDLE_2 BPS_IDLE(2)
-#define BPS_IDLE_3 BPS_IDLE(3)
-#define BPS_IDLE_4 BPS_IDLE(4)
-#define BPS_IDLE_5 BPS_IDLE(5)
-#define BPS_IDLE_6 BPS_IDLE(6)
-#define BPS_IDLE_7 BPS_IDLE(7)
-
-/*
- * Buffer n has a "slow path" packet in it.
- * This bit is orthogonal to the bits above and indicates that
- * the FPGA ethernet rx protocol engine has identified this packet
- * as one requiring firmware intervention.
- */
-#define BPS_SLOWPATH(n) (0x01000000 << (n))
-#define BPS_SLOWPATH_0 BPS_SLOWPATH(0)
-#define BPS_SLOWPATH_1 BPS_SLOWPATH(1)
-#define BPS_SLOWPATH_2 BPS_SLOWPATH(2)
-#define BPS_SLOWPATH_3 BPS_SLOWPATH(3)
-#define BPS_SLOWPATH_4 BPS_SLOWPATH(4)
-#define BPS_SLOWPATH_5 BPS_SLOWPATH(5)
-#define BPS_SLOWPATH_6 BPS_SLOWPATH(6)
-#define BPS_SLOWPATH_7 BPS_SLOWPATH(7)
-
-
-#define BPS_DONE_ALL 0x000000ff // mask of all dones
-#define BPS_ERROR_ALL 0x0000ff00 // mask of all errors
-#define BPS_IDLE_ALL 0x00ff0000 // mask of all idles
-#define BPS_SLOWPATH_ALL 0xff000000 // mask of all slowpaths
+#define router_status ((router_status_t *) ROUTER_STATUS_BASE)
// The hw_config register
@@ -263,7 +191,7 @@ typedef struct {
inline static int
hwconfig_simulation_p(void)
{
- return buffer_pool_status->hw_config & HWC_SIMULATION;
+ return router_status->hw_config & HWC_SIMULATION;
}
/*!
@@ -273,7 +201,7 @@ hwconfig_simulation_p(void)
inline static int
hwconfig_wishbone_divisor(void)
{
- return buffer_pool_status->hw_config & HWC_WB_CLK_DIV_MASK;
+ return router_status->hw_config & HWC_WB_CLK_DIV_MASK;
}
///////////////////////////////////////////////////
@@ -295,13 +223,13 @@ hwconfig_wishbone_divisor(void)
#define MISC_OUTPUT_BASE 0xD400
#define TX_PROTOCOL_ENGINE_BASE 0xD480
#define RX_PROTOCOL_ENGINE_BASE 0xD4C0
-#define BUFFER_POOL_CTRL_BASE 0xD500
+#define ROUTER_CTRL_BASE 0xD500
#define LAST_SETTING_REG 0xD7FC // last valid setting register
#define SR_MISC 0
#define SR_TX_PROT_ENG 32
#define SR_RX_PROT_ENG 48
-#define SR_BUFFER_POOL_CTRL 64
+#define SR_ROUTER_CTRL 64
#define SR_UDP_SM 96
#define SR_TX_DSP 208
#define SR_TX_CTRL 224
@@ -313,53 +241,17 @@ hwconfig_wishbone_divisor(void)
#define _SR_ADDR(sr) (MISC_OUTPUT_BASE + (sr) * sizeof(uint32_t))
-// --- buffer pool control regs ---
+// --- packet router control regs ---
typedef struct {
- volatile uint32_t ctrl;
-} buffer_pool_ctrl_t;
-
-// buffer pool ports
-
-#define PORT_SERDES 0 // serial/deserializer
-#define PORT_DSP 1 // DSP tx or rx pipeline
-#define PORT_ETH 2 // ethernet tx or rx
-#define PORT_RAM 3 // RAM tx or rx
-
-// the buffer pool ctrl register fields
-
-#define BPC_BUFFER(n) (((n) & 0xf) << 28)
-#define BPC_BUFFER_MASK BPC_BUFFER(~0)
-#define BPC_BUFFER_0 BPC_BUFFER(0)
-#define BPC_BUFFER_1 BPC_BUFFER(1)
-#define BPC_BUFFER_2 BPC_BUFFER(2)
-#define BPC_BUFFER_3 BPC_BUFFER(3)
-#define BPC_BUFFER_4 BPC_BUFFER(4)
-#define BPC_BUFFER_5 BPC_BUFFER(5)
-#define BPC_BUFFER_6 BPC_BUFFER(6)
-#define BPC_BUFFER_7 BPC_BUFFER(7)
-#define BPC_BUFFER_NIL BPC_BUFFER(0x8) // disable
-
-#define BPC_PORT(n) (((n) & 0x7) << 25)
-#define BPC_PORT_MASK BPC_PORT(~0)
-#define BPC_PORT_SERDES BPC_PORT(PORT_SERDES)
-#define BPC_PORT_DSP BPC_PORT(PORT_DSP)
-#define BPC_PORT_ETH BPC_PORT(PORT_ETH)
-#define BPC_PORT_RAM BPC_PORT(PORT_RAM)
-#define BPC_PORT_NIL BPC_PORT(0x4) // disable
-
-#define BPC_CLR (1 << 24) // mutually excl commands
-#define BPC_READ (1 << 23)
-#define BPC_WRITE (1 << 22)
-
-#define BPC_STEP(step) (((step) & 0xf) << 18)
-#define BPC_STEP_MASK BPC_STEP(~0)
-#define BPC_LAST_LINE(line) (((line) & 0x1ff) << 9)
-#define BPC_LAST_LINE_MASK BPC_LAST_LINE(~0)
-#define BPC_FIRST_LINE(line) (((line) & 0x1ff) << 0)
-#define BPC_FIRST_LINE_MASK BPC_FIRST_LINE(~0)
-
-#define buffer_pool_ctrl ((buffer_pool_ctrl_t *) BUFFER_POOL_CTRL_BASE)
+ volatile uint32_t mode_ctrl;
+ volatile uint32_t ip_addr;
+ volatile uint32_t data_ports; //dsp0 (low 16) dsp1 (high 16)
+ volatile uint32_t cpu_out_ctrl;
+ volatile uint32_t cpu_inp_ctrl;
+} router_ctrl_t;
+
+#define router_ctrl ((router_ctrl_t *) ROUTER_CTRL_BASE)
// --- misc outputs ---
@@ -435,11 +327,21 @@ typedef struct {
uint32_t length;
uint32_t checksum; //word 22
} udp_hdr;
- volatile uint32_t _pad[32-23];
+ volatile uint32_t _pad[1];
+ volatile uint32_t dsp0_port;
+ volatile uint32_t err0_port;
+ volatile uint32_t dsp1_port;
+ volatile uint32_t err1_port;
} sr_udp_sm_t;
// control bits (all expect UDP_SM_LAST_WORD are mutually exclusive)
+// Insert a UDP source port from the table
+#define UDP_SM_INS_UDP_SRC_PORT (1 << 21)
+
+// Insert a UDP dest port from the table
+#define UDP_SM_INS_UDP_DST_PORT (1 << 20)
+
// This is the last word of the header
#define UDP_SM_LAST_WORD (1 << 19)
diff --git a/firmware/microblaze/usrp2/sd.c b/firmware/zpu/usrp2/sd.c
index d000b28ae..d000b28ae 100644
--- a/firmware/microblaze/usrp2/sd.c
+++ b/firmware/zpu/usrp2/sd.c
diff --git a/firmware/microblaze/usrp2/sd.h b/firmware/zpu/usrp2/sd.h
index e2d0ae38e..e2d0ae38e 100644
--- a/firmware/microblaze/usrp2/sd.h
+++ b/firmware/zpu/usrp2/sd.h
diff --git a/firmware/microblaze/usrp2/udp_fw_update.c b/firmware/zpu/usrp2/udp_fw_update.c
index 14eb0b1ee..14eb0b1ee 100644
--- a/firmware/microblaze/usrp2/udp_fw_update.c
+++ b/firmware/zpu/usrp2/udp_fw_update.c
diff --git a/firmware/zpu/usrp2p/CMakeLists.txt b/firmware/zpu/usrp2p/CMakeLists.txt
new file mode 100644
index 000000000..41ef8f1dd
--- /dev/null
+++ b/firmware/zpu/usrp2p/CMakeLists.txt
@@ -0,0 +1,48 @@
+#
+# Copyright 2010 Ettus Research LLC
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+########################################################################
+INCLUDE(${CMAKE_SOURCE_DIR}/lib/CMakeLists.txt)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+
+ADD_DEFINITIONS(-DUSRP2P)
+
+ADD_LIBRARY(libusrp2pfw STATIC
+ ${COMMON_SRCS}
+ spif.c
+ spi_flash.c
+ spi_flash_read.c
+ bootloader_utils.c
+ ethernet.c
+ xilinx_s3_icap.c
+ udp_fw_update.c
+)
+
+ADD_SUBDIRECTORY(bootloader)
+
+########################################################################
+ADD_EXECUTABLE(usrp2p_txrx_uhd.elf ${CMAKE_SOURCE_DIR}/apps/txrx_uhd.c)
+TARGET_LINK_LIBRARIES(usrp2p_txrx_uhd.elf libusrp2pfw)
+GEN_OUTPUTS(usrp2p_txrx_uhd.elf)
+
+ADD_EXECUTABLE(usrp2p_blinkenlights.elf ${CMAKE_SOURCE_DIR}/apps/blinkenlights.c)
+TARGET_LINK_LIBRARIES(usrp2p_blinkenlights.elf libusrp2pfw)
+GEN_OUTPUTS(usrp2p_blinkenlights.elf)
+
+ADD_EXECUTABLE(usrp2p_uart_flash_loader.elf ${CMAKE_SOURCE_DIR}/apps/uart_flash_loader.c)
+TARGET_LINK_LIBRARIES(usrp2p_uart_flash_loader.elf libusrp2pfw)
+GEN_OUTPUTS(usrp2p_uart_flash_loader.elf)
diff --git a/firmware/microblaze/usrp2p/bootconfig.h b/firmware/zpu/usrp2p/bootconfig.h
index 35c2726ed..35c2726ed 100644
--- a/firmware/microblaze/usrp2p/bootconfig.h
+++ b/firmware/zpu/usrp2p/bootconfig.h
diff --git a/firmware/zpu/usrp2p/bootloader/CMakeLists.txt b/firmware/zpu/usrp2p/bootloader/CMakeLists.txt
new file mode 100644
index 000000000..41c86cc9a
--- /dev/null
+++ b/firmware/zpu/usrp2p/bootloader/CMakeLists.txt
@@ -0,0 +1,39 @@
+#
+# Copyright 2010 Ettus Research LLC
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+########################################################################
+INCLUDE(FindPythonInterp)
+
+MACRO(GEN_RMI target)
+ GET_FILENAME_COMPONENT(name ${target} NAME_WE)
+ #command to create a rmi from elf
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${name}.rmi DEPENDS ${name}.bin
+ COMMAND ${PYTHON_EXECUTABLE}
+ ARGS ${CMAKE_SOURCE_DIR}/bin/bin_to_ram_macro_init.py ${name}.bin ${name}.rmi
+ )
+ #add a top level target for output files
+ ADD_CUSTOM_TARGET(
+ ${name}_rmi ALL DEPENDS ${name}.rmi
+ )
+ENDMACRO(GEN_RMI)
+
+########################################################################
+ADD_EXECUTABLE(init_bootloader.elf init_bootloader.c)
+TARGET_LINK_LIBRARIES(init_bootloader.elf libusrp2pfw)
+GEN_OUTPUTS(init_bootloader.elf)
+GEN_RMI(init_bootloader.bin)
diff --git a/firmware/microblaze/usrp2p/bootloader/fpga_bootloader.c b/firmware/zpu/usrp2p/bootloader/fpga_bootloader.c
index 9feff6ecd..9feff6ecd 100644
--- a/firmware/microblaze/usrp2p/bootloader/fpga_bootloader.c
+++ b/firmware/zpu/usrp2p/bootloader/fpga_bootloader.c
diff --git a/firmware/microblaze/usrp2p/bootloader/fw_bootloader.c b/firmware/zpu/usrp2p/bootloader/fw_bootloader.c
index a2c32bf8e..a2c32bf8e 100644
--- a/firmware/microblaze/usrp2p/bootloader/fw_bootloader.c
+++ b/firmware/zpu/usrp2p/bootloader/fw_bootloader.c
diff --git a/firmware/microblaze/usrp2p/bootloader/icap_test.c b/firmware/zpu/usrp2p/bootloader/icap_test.c
index 5feb9d014..5feb9d014 100644
--- a/firmware/microblaze/usrp2p/bootloader/icap_test.c
+++ b/firmware/zpu/usrp2p/bootloader/icap_test.c
diff --git a/firmware/microblaze/usrp2p/bootloader/init_bootloader.c b/firmware/zpu/usrp2p/bootloader/init_bootloader.c
index 1d9d681d7..cfa80ffea 100644
--- a/firmware/microblaze/usrp2p/bootloader/init_bootloader.c
+++ b/firmware/zpu/usrp2p/bootloader/init_bootloader.c
@@ -18,7 +18,7 @@
#include <i2c.h>
#include "usrp2/fw_common.h"
-void pic_interrupt_handler() __attribute__ ((interrupt_handler));
+//void pic_interrupt_handler() __attribute__ ((interrupt_handler));
void pic_interrupt_handler()
{
@@ -42,7 +42,7 @@ void load_ihex(void) { //simple IHEX parser to load proper records into RAM. loa
} else if(ihex_record.type == 1) { //end of record
puts("OK");
//load main firmware
- start_program(RAM_BASE);
+ start_program();
puts("ERROR: main image returned! Back in IHEX load mode.");
} else puts("NOK"); //RAM loads do not support extended segment address records (04) -- upper 16 bits are always "0".
} else puts("NOK");
@@ -56,12 +56,12 @@ void delay(uint32_t t) {
int main(int argc, char *argv[]) {
hal_disable_ints(); // In case we got here via jmp 0x0
output_regs->leds = 0xFF;
- delay(500000);
+ delay(5000);
output_regs->leds = 0x00;
hal_uart_init();
spif_init();
i2c_init(); //for EEPROM
- puts("USRP2+ bootloader\n");
+ puts("USRP2+ bootloader super ultra ZPU edition\n");
bool production_image = find_safe_booted_flag();
set_safe_booted_flag(0); //haven't booted yet
@@ -71,7 +71,7 @@ int main(int argc, char *argv[]) {
if(is_valid_fw_image(SAFE_FW_IMAGE_LOCATION_ADDR)) {
set_safe_booted_flag(1); //let the firmware know it's the safe image
spi_flash_read(SAFE_FW_IMAGE_LOCATION_ADDR, FW_IMAGE_SIZE_BYTES, (void *)RAM_BASE);
- start_program(RAM_BASE);
+ start_program();
puts("ERROR: return from main program! This should never happen!");
icap_reload_fpga(SAFE_FPGA_IMAGE_LOCATION_ADDR);
} else {
@@ -85,7 +85,7 @@ int main(int argc, char *argv[]) {
if(is_valid_fpga_image(PROD_FPGA_IMAGE_LOCATION_ADDR)) {
puts("Valid production FPGA image found. Attempting to boot.");
set_safe_booted_flag(1);
- delay(30000); //so serial output can finish
+ delay(300); //so serial output can finish
icap_reload_fpga(PROD_FPGA_IMAGE_LOCATION_ADDR);
}
puts("No valid production FPGA image found.\nAttempting to load production firmware...");
@@ -93,17 +93,23 @@ int main(int argc, char *argv[]) {
if(is_valid_fw_image(PROD_FW_IMAGE_LOCATION_ADDR)) {
puts("Valid production firmware found. Loading...");
spi_flash_read(PROD_FW_IMAGE_LOCATION_ADDR, FW_IMAGE_SIZE_BYTES, (void *)RAM_BASE);
- start_program(RAM_BASE);
+ puts("Finished loading. Starting image.");
+ delay(300);
+ start_program();
puts("ERROR: Return from main program! This should never happen!");
//if this happens, though, the safest thing to do is reboot the whole FPGA and start over.
+ delay(300);
icap_reload_fpga(SAFE_FPGA_IMAGE_LOCATION_ADDR);
return 1;
}
puts("No valid production firmware found. Trying safe firmware...");
if(is_valid_fw_image(SAFE_FW_IMAGE_LOCATION_ADDR)) {
spi_flash_read(SAFE_FW_IMAGE_LOCATION_ADDR, FW_IMAGE_SIZE_BYTES, (void *)RAM_BASE);
- start_program(RAM_BASE);
+ puts("Finished loading. Starting image.");
+ delay(300);
+ start_program();
puts("ERROR: return from main program! This should never happen!");
+ delay(300);
icap_reload_fpga(SAFE_FPGA_IMAGE_LOCATION_ADDR);
return 1;
}
diff --git a/firmware/microblaze/usrp2p/bootloader/serial_loader_burner.c b/firmware/zpu/usrp2p/bootloader/serial_loader_burner.c
index 4ac4df454..4ac4df454 100644
--- a/firmware/microblaze/usrp2p/bootloader/serial_loader_burner.c
+++ b/firmware/zpu/usrp2p/bootloader/serial_loader_burner.c
diff --git a/firmware/microblaze/usrp2p/bootloader/spi_bootloader.c b/firmware/zpu/usrp2p/bootloader/spi_bootloader.c
index 678e66cf7..678e66cf7 100644
--- a/firmware/microblaze/usrp2p/bootloader/spi_bootloader.c
+++ b/firmware/zpu/usrp2p/bootloader/spi_bootloader.c
diff --git a/firmware/microblaze/usrp2p/bootloader/u2p2-rom.ld b/firmware/zpu/usrp2p/bootloader/u2p2-rom.ld
index 4c9eaa8e5..4c9eaa8e5 100644
--- a/firmware/microblaze/usrp2p/bootloader/u2p2-rom.ld
+++ b/firmware/zpu/usrp2p/bootloader/u2p2-rom.ld
diff --git a/firmware/zpu/usrp2p/bootloader_utils.c b/firmware/zpu/usrp2p/bootloader_utils.c
new file mode 100644
index 000000000..379c5f957
--- /dev/null
+++ b/firmware/zpu/usrp2p/bootloader_utils.c
@@ -0,0 +1,48 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2010 Ettus Research LLC
+ *
+ */
+
+//contains routines for loading programs from Flash. depends on Flash libraries.
+//also contains routines for reading / writing EEPROM flags for the bootloader
+#include <stdbool.h>
+#include <string.h>
+#include <bootloader_utils.h>
+#include <spi_flash.h>
+#include <memory_map.h>
+#include <nonstdio.h>
+
+int is_valid_fpga_image(uint32_t addr) {
+// printf("is_valid_fpga_image(): starting with addr=%x...\n", addr);
+ uint8_t imgbuf[64];
+ spi_flash_read(addr, 64, imgbuf);
+ //we're just looking for leading 0xFF padding, followed by the sync bytes 0xAA 0x99
+ for(size_t i = 0; i<63; i++) {
+ if(imgbuf[i] == 0xFF) continue;
+ if(imgbuf[i] == 0xAA && imgbuf[i+1] == 0x99) {
+ //printf("is_valid_fpga_image(): found valid FPGA image\n");
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+int is_valid_fw_image(uint32_t addr) {
+ static const uint8_t fwheader[] = {0x0b, 0x0b, 0x0b, 0x0b, 0x80, 0x70}; //just lookin for a jump to anywhere located at the reset vector
+ //printf("is_valid_fw_image(): starting with addr=%x...\n", addr);
+ uint8_t buf[12];
+ spi_flash_read(addr, 6, buf);
+ //printf("is_valid_fw_image(): read ");
+ //for(int i = 0; i < 5; i++) printf("%x ", buf[i]);
+ //printf("\n");
+ return memcmp(buf, fwheader, 6) == 0;
+}
+
+void start_program(void)
+{
+ //ignoring the addr now
+ //all this does is tap that register
+ *((volatile uint32_t *) SR_ADDR_BLDRDONE) = 1;
+}
diff --git a/firmware/microblaze/usrp2p/bootloader_utils.h b/firmware/zpu/usrp2p/bootloader_utils.h
index f597c0113..0f49ae6cd 100644
--- a/firmware/microblaze/usrp2p/bootloader_utils.h
+++ b/firmware/zpu/usrp2p/bootloader_utils.h
@@ -9,8 +9,8 @@
//we're working in bytes and byte addresses so we can run the same code with Flash chips of different sector sizes.
//it's really 1463736, but rounded up to 1.5MB
#define FPGA_IMAGE_SIZE_BYTES 1572864
-//instead of 32K, we write 31K because we're using the top 1K for stack space!
-#define FW_IMAGE_SIZE_BYTES 31744
+//16K
+#define FW_IMAGE_SIZE_BYTES 0x3fff
#define SAFE_FPGA_IMAGE_LOCATION_ADDR 0x00000000
#define SAFE_FW_IMAGE_LOCATION_ADDR 0x003F0000
@@ -19,4 +19,4 @@
int is_valid_fpga_image(uint32_t addr);
int is_valid_fw_image(uint32_t addr);
-void start_program(uint32_t addr);
+void start_program(void);
diff --git a/firmware/microblaze/usrp2p/eth_phy.h b/firmware/zpu/usrp2p/eth_phy.h
index d233e96e8..d233e96e8 100644
--- a/firmware/microblaze/usrp2p/eth_phy.h
+++ b/firmware/zpu/usrp2p/eth_phy.h
diff --git a/firmware/microblaze/usrp2p/ethernet.c b/firmware/zpu/usrp2p/ethernet.c
index 36d6a17ca..03891f959 100644
--- a/firmware/microblaze/usrp2p/ethernet.c
+++ b/firmware/zpu/usrp2p/ethernet.c
@@ -279,101 +279,6 @@ ethernet_init(void)
eth_mac_miim_write(PHY_CTRL, t | MII_CR_RESTART_AUTO_NEG);
}
-static bool
-unprogrammed(const void *t, size_t len)
-{
- int i;
- uint8_t *p = (uint8_t *)t;
- bool all_zeros = true;
- bool all_ones = true;
- for (i = 0; i < len; i++){
- all_zeros &= p[i] == 0x00;
- all_ones &= p[i] == 0xff;
- }
- return all_ones | all_zeros;
-}
-
-//////////////////// MAC Addr Stuff ///////////////////////
-/*
-static int8_t src_mac_addr_initialized = false;
-static eth_mac_addr_t src_mac_addr = {{
- 0x00, 0x50, 0xC2, 0x85, 0x3f, 0xff
- }};
-
-const eth_mac_addr_t *
-ethernet_mac_addr(void)
-{
- if (!src_mac_addr_initialized){ // fetch from eeprom
- src_mac_addr_initialized = true;
-
- // if we're simulating, don't read the EEPROM model, it's REALLY slow
- if (hwconfig_simulation_p())
- return &src_mac_addr;
-
- eth_mac_addr_t tmp;
- bool ok = eeprom_read(USRP2_I2C_ADDR_MBOARD, USRP2_EE_MBOARD_MAC_ADDR, &tmp, sizeof(tmp));
- if (!ok || unprogrammed(&tmp, sizeof(tmp))){
- // use the default
- }
- else
- src_mac_addr = tmp;
- }
-
- return &src_mac_addr;
-}
-
-bool
-ethernet_set_mac_addr(const eth_mac_addr_t *t)
-{
- bool ok = eeprom_write(USRP2_I2C_ADDR_MBOARD, USRP2_EE_MBOARD_MAC_ADDR, t, sizeof(eth_mac_addr_t));
- if (ok){
- src_mac_addr = *t;
- src_mac_addr_initialized = true;
- //eth_mac_set_addr(t); //this breaks the link
- }
-
- return ok;
-}
-
-//////////////////// IP Addr Stuff ///////////////////////
-
-static int8_t src_ip_addr_initialized = false;
-static struct ip_addr src_ip_addr = {
- (192 << 24 | 168 << 16 | 10 << 8 | 2 << 0)
-};
-
-
-const struct ip_addr *get_ip_addr(void)
-{
- if (!src_ip_addr_initialized){ // fetch from eeprom
- src_ip_addr_initialized = true;
-
- // if we're simulating, don't read the EEPROM model, it's REALLY slow
- if (hwconfig_simulation_p())
- return &src_ip_addr;
-
- struct ip_addr tmp;
- bool ok = eeprom_read(USRP2_I2C_ADDR_MBOARD, USRP2_EE_MBOARD_IP_ADDR, &tmp, sizeof(tmp));
- if (!ok || unprogrammed(&tmp, sizeof(tmp))){
- // use the default
- }
- else
- src_ip_addr = tmp;
- }
-
- return &src_ip_addr;
-}
-
-bool set_ip_addr(const struct ip_addr *t){
- bool ok = eeprom_write(USRP2_I2C_ADDR_MBOARD, USRP2_EE_MBOARD_IP_ADDR, t, sizeof(struct ip_addr));
- if (ok){
- src_ip_addr = *t;
- src_ip_addr_initialized = true;
- }
-
- return ok;
-}
-*/
int
ethernet_check_errors(void)
{
diff --git a/firmware/microblaze/usrp2p/memory_map.h b/firmware/zpu/usrp2p/memory_map.h
index 3b2dc0057..151c71237 100644
--- a/firmware/microblaze/usrp2p/memory_map.h
+++ b/firmware/zpu/usrp2p/memory_map.h
@@ -16,38 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* Overall Memory Map
- * 0000-FFFF 64K RAM space
- *
- * 0000-1FFF 8K Boot RAM
- * 2000-5FFF 16K Buffer pool
- * 6000-7FFF 8K Peripherals
- * 8000-FFFF 32K Main System RAM
-
-
-From u2plus_core.v:
-wb_1master #(.decode_w(8),
-.s0_addr(8'b0000_0000),.s0_mask(8'b1110_0000), // 0-8K, Boot RAM
-.s1_addr(8'b0100_0000),.s1_mask(8'b1100_0000), // 16K-32K, Buffer Pool
-.s2_addr(8'b0011_0000),.s2_mask(8'b1111_1111), // SPI 0x3000
-.s3_addr(8'b0011_0001),.s3_mask(8'b1111_1111), // I2C 0x3100
-.s4_addr(8'b0011_0010),.s4_mask(8'b1111_1111), // GPIO 0x3200
-.s5_addr(8'b0011_0011),.s5_mask(8'b1111_1111), // Readback 0x3300
-.s6_addr(8'b0011_0100),.s6_mask(8'b1111_1111), // Ethernet MAC 0x3400
-.s7_addr(8'b0010_0000),.s7_mask(8'b1111_0000), // 8-12K, Settings Bus (only uses 1K) 0x2000-0x2FFF
-.s8_addr(8'b0011_0101),.s8_mask(8'b1111_1111), // PIC 0x3500
-.s9_addr(8'b0011_0110),.s9_mask(8'b1111_1111), // Unused 0x3600
-.sa_addr(8'b0011_0111),.sa_mask(8'b1111_1111), // UART 0x3700
-.sb_addr(8'b0011_1000),.sb_mask(8'b1111_1111), // ATR 0x3800
-.sc_addr(8'b0011_1001),.sc_mask(8'b1111_1111), // Unused 0x3900
-.sd_addr(8'b0011_1010),.sd_mask(8'b1111_1111), // ICAP 0x3A00
-.se_addr(8'b0011_1011),.se_mask(8'b1111_1111), // SPI Flash 0x3B00
-.sf_addr(8'b1000_0000),.sf_mask(8'b1000_0000), // 32-64K, Main RAM 0x8000-0xFFFF
- .dw(dw),.aw(aw),.sw(sw)) wb_1master
-
- */
-
-
#ifndef INCLUDED_MEMORY_MAP_H
#define INCLUDED_MEMORY_MAP_H
@@ -70,27 +38,23 @@ wb_1master #(.decode_w(8),
////////////////////////////////////////////////////////////////
-// Buffer Pool RAM, Slave 1
+// Packet Router RAM, Slave 1
//
-// The buffers themselves are located in Slave 1, Buffer Pool RAM.
-// The status registers are in Slave 5, Buffer Pool Status.
+// The buffers themselves are located in Slave 1, Packet Router RAM.
+// The status registers are in Slave 5, Packet Router Status.
// The control register is in Slave 7, Settings Bus.
-#define BUFFER_POOL_RAM_BASE 0x4000
-
-#define NBUFFERS 8
-#define BP_NLINES 0x0200 // number of 32-bit lines in a buffer
-#define BP_LAST_LINE (BP_NLINES - 1) // last line in a buffer
+#define ROUTER_RAM_BASE 0x4000
-#define buffer_pool_ram \
- ((uint32_t *) BUFFER_POOL_RAM_BASE)
+#define RAM_NLINES 0x0200 // number of 32-bit lines in a buffer
-#define buffer_ram(n) (&buffer_pool_ram[(n) * BP_NLINES])
+#define _router_ram ((uint32_t *) ROUTER_RAM_BASE)
+#define router_ram(n) (&_router_ram[(n) * RAM_NLINES])
/////////////////////////////////////////////////////
// SPI Core, Slave 2. See core docs for more info
-#define SPI_BASE 0x3000 // Base address (16-bit) is base peripheral addr
+#define SPI_BASE 0x6000 // Base address (16-bit) is base peripheral addr
typedef struct {
volatile uint32_t txrx0;
@@ -129,7 +93,7 @@ typedef struct {
// I2C, Slave 3
// See Wishbone I2C-Master Core Specification.
-#define I2C_BASE 0x3100
+#define I2C_BASE 0x6100
typedef struct {
volatile uint32_t prescaler_lo; // r/w
@@ -171,7 +135,7 @@ typedef struct {
//
// These go to the daughterboard i/o pins
-#define GPIO_BASE 0x3200
+#define GPIO_BASE 0x6200
typedef struct {
volatile uint32_t io; // tx data in high 16, rx in low 16
@@ -189,95 +153,27 @@ typedef struct {
#define gpio_base ((gpio_regs_t *) GPIO_BASE)
///////////////////////////////////////////////////
-// Buffer Pool Status, Slave 5
+// Packet Router Status, Slave 5
//
-// The buffers themselves are located in Slave 1, Buffer Pool RAM.
-// The status registers are in Slave 5, Buffer Pool Status.
+// The buffers themselves are located in Slave 1, Packet Router RAM.
+// The status registers are in Slave 5, Packet Router Status.
// The control register is in Slave 7, Settings Bus.
-#define BUFFER_POOL_STATUS_BASE 0x3300
+#define ROUTER_STATUS_BASE 0x6300
typedef struct {
- volatile uint32_t last_line[NBUFFERS]; // last line xfer'd in buffer
- volatile uint32_t status; // error and done flags
+ volatile uint32_t _padding[8];
+ volatile uint32_t status;
volatile uint32_t hw_config; // see below
volatile uint32_t dummy[3];
volatile uint32_t irqs;
volatile uint32_t pri_enc_bp_status;
volatile uint32_t cycle_count;
-} buffer_pool_status_t;
+} router_status_t;
-#define buffer_pool_status ((buffer_pool_status_t *) BUFFER_POOL_STATUS_BASE)
+#define router_status ((router_status_t *) ROUTER_STATUS_BASE)
-#define BUTTON_PUSHED ((buffer_pool_status->irqs & PIC_BUTTON) ? 0 : 1)
-
-/*
- * Buffer n's xfer is done.
- * Clear this bit by issuing bp_clear_buf(n)
- */
-#define BPS_DONE(n) (0x00000001 << (n))
-#define BPS_DONE_0 BPS_DONE(0)
-#define BPS_DONE_1 BPS_DONE(1)
-#define BPS_DONE_2 BPS_DONE(2)
-#define BPS_DONE_3 BPS_DONE(3)
-#define BPS_DONE_4 BPS_DONE(4)
-#define BPS_DONE_5 BPS_DONE(5)
-#define BPS_DONE_6 BPS_DONE(6)
-#define BPS_DONE_7 BPS_DONE(7)
-
-/*
- * Buffer n's xfer had an error.
- * Clear this bit by issuing bp_clear_buf(n)
- */
-#define BPS_ERROR(n) (0x00000100 << (n))
-#define BPS_ERROR_0 BPS_ERROR(0)
-#define BPS_ERROR_1 BPS_ERROR(1)
-#define BPS_ERROR_2 BPS_ERROR(2)
-#define BPS_ERROR_3 BPS_ERROR(3)
-#define BPS_ERROR_4 BPS_ERROR(4)
-#define BPS_ERROR_5 BPS_ERROR(5)
-#define BPS_ERROR_6 BPS_ERROR(6)
-#define BPS_ERROR_7 BPS_ERROR(7)
-
-/*
- * Buffer n is idle. A buffer is idle if it's not
- * DONE, ERROR, or processing a transaction. If it's
- * IDLE, it's safe to start a new transaction.
- *
- * Clear this bit by starting a xfer with
- * bp_send_from_buf or bp_receive_to_buf.
- */
-#define BPS_IDLE(n) (0x00010000 << (n))
-#define BPS_IDLE_0 BPS_IDLE(0)
-#define BPS_IDLE_1 BPS_IDLE(1)
-#define BPS_IDLE_2 BPS_IDLE(2)
-#define BPS_IDLE_3 BPS_IDLE(3)
-#define BPS_IDLE_4 BPS_IDLE(4)
-#define BPS_IDLE_5 BPS_IDLE(5)
-#define BPS_IDLE_6 BPS_IDLE(6)
-#define BPS_IDLE_7 BPS_IDLE(7)
-
-/*
- * Buffer n has a "slow path" packet in it.
- * This bit is orthogonal to the bits above and indicates that
- * the FPGA ethernet rx protocol engine has identified this packet
- * as one requiring firmware intervention.
- */
-#define BPS_SLOWPATH(n) (0x01000000 << (n))
-#define BPS_SLOWPATH_0 BPS_SLOWPATH(0)
-#define BPS_SLOWPATH_1 BPS_SLOWPATH(1)
-#define BPS_SLOWPATH_2 BPS_SLOWPATH(2)
-#define BPS_SLOWPATH_3 BPS_SLOWPATH(3)
-#define BPS_SLOWPATH_4 BPS_SLOWPATH(4)
-#define BPS_SLOWPATH_5 BPS_SLOWPATH(5)
-#define BPS_SLOWPATH_6 BPS_SLOWPATH(6)
-#define BPS_SLOWPATH_7 BPS_SLOWPATH(7)
-
-
-#define BPS_DONE_ALL 0x000000ff // mask of all dones
-#define BPS_ERROR_ALL 0x0000ff00 // mask of all errors
-#define BPS_IDLE_ALL 0x00ff0000 // mask of all idles
-#define BPS_SLOWPATH_ALL 0xff000000 // mask of all slowpaths
+#define BUTTON_PUSHED ((router_status->irqs & PIC_BUTTON) ? 0 : 1)
// The hw_config register
@@ -290,7 +186,7 @@ typedef struct {
inline static int
hwconfig_simulation_p(void)
{
- return buffer_pool_status->hw_config & HWC_SIMULATION;
+ return router_status->hw_config & HWC_SIMULATION;
}
/*!
@@ -300,13 +196,13 @@ hwconfig_simulation_p(void)
inline static int
hwconfig_wishbone_divisor(void)
{
- return buffer_pool_status->hw_config & HWC_WB_CLK_DIV_MASK;
+ return router_status->hw_config & HWC_WB_CLK_DIV_MASK;
}
///////////////////////////////////////////////////
// Ethernet Core, Slave 6
-#define ETH_BASE 0x3400
+#define ETH_BASE 0x6400
#include "eth_mac_regs.h"
@@ -319,16 +215,12 @@ hwconfig_wishbone_divisor(void)
// 1KB of address space (== 256 32-bit write-only regs)
-#define MISC_OUTPUT_BASE 0x2000
-#define TX_PROTOCOL_ENGINE_BASE 0x2080
-#define RX_PROTOCOL_ENGINE_BASE 0x20C0
-#define BUFFER_POOL_CTRL_BASE 0x2100
-#define LAST_SETTING_REG 0x23FC // last valid setting register
+#define MISC_OUTPUT_BASE 0x5000
#define SR_MISC 0
#define SR_TX_PROT_ENG 32
#define SR_RX_PROT_ENG 48
-#define SR_BUFFER_POOL_CTRL 64
+#define SR_ROUTER_CTRL 64
#define SR_UDP_SM 96
#define SR_TX_DSP 208
#define SR_TX_CTRL 224
@@ -340,53 +232,19 @@ hwconfig_wishbone_divisor(void)
#define _SR_ADDR(sr) (MISC_OUTPUT_BASE + (sr) * sizeof(uint32_t))
-// --- buffer pool control regs ---
+#define SR_ADDR_BLDRDONE _SR_ADDR(5)
+
+// --- packet router control regs ---
typedef struct {
- volatile uint32_t ctrl;
-} buffer_pool_ctrl_t;
-
-// buffer pool ports
-
-#define PORT_SERDES 0 // serial/deserializer
-#define PORT_DSP 1 // DSP tx or rx pipeline
-#define PORT_ETH 2 // ethernet tx or rx
-#define PORT_RAM 3 // RAM tx or rx
-
-// the buffer pool ctrl register fields
-
-#define BPC_BUFFER(n) (((n) & 0xf) << 28)
-#define BPC_BUFFER_MASK BPC_BUFFER(~0)
-#define BPC_BUFFER_0 BPC_BUFFER(0)
-#define BPC_BUFFER_1 BPC_BUFFER(1)
-#define BPC_BUFFER_2 BPC_BUFFER(2)
-#define BPC_BUFFER_3 BPC_BUFFER(3)
-#define BPC_BUFFER_4 BPC_BUFFER(4)
-#define BPC_BUFFER_5 BPC_BUFFER(5)
-#define BPC_BUFFER_6 BPC_BUFFER(6)
-#define BPC_BUFFER_7 BPC_BUFFER(7)
-#define BPC_BUFFER_NIL BPC_BUFFER(0x8) // disable
-
-#define BPC_PORT(n) (((n) & 0x7) << 25)
-#define BPC_PORT_MASK BPC_PORT(~0)
-#define BPC_PORT_SERDES BPC_PORT(PORT_SERDES)
-#define BPC_PORT_DSP BPC_PORT(PORT_DSP)
-#define BPC_PORT_ETH BPC_PORT(PORT_ETH)
-#define BPC_PORT_RAM BPC_PORT(PORT_RAM)
-#define BPC_PORT_NIL BPC_PORT(0x4) // disable
-
-#define BPC_CLR (1 << 24) // mutually excl commands
-#define BPC_READ (1 << 23)
-#define BPC_WRITE (1 << 22)
-
-#define BPC_STEP(step) (((step) & 0xf) << 18)
-#define BPC_STEP_MASK BPC_STEP(~0)
-#define BPC_LAST_LINE(line) (((line) & 0x1ff) << 9)
-#define BPC_LAST_LINE_MASK BPC_LAST_LINE(~0)
-#define BPC_FIRST_LINE(line) (((line) & 0x1ff) << 0)
-#define BPC_FIRST_LINE_MASK BPC_FIRST_LINE(~0)
-
-#define buffer_pool_ctrl ((buffer_pool_ctrl_t *) BUFFER_POOL_CTRL_BASE)
+ volatile uint32_t mode_ctrl;
+ volatile uint32_t ip_addr;
+ volatile uint32_t data_ports; //dsp0 (low 16) dsp1 (high 16)
+ volatile uint32_t cpu_out_ctrl;
+ volatile uint32_t cpu_inp_ctrl;
+} router_ctrl_t;
+
+#define router_ctrl ((router_ctrl_t *) _SR_ADDR(SR_ROUTER_CTRL))
// --- misc outputs ---
@@ -462,11 +320,21 @@ typedef struct {
uint32_t length;
uint32_t checksum; //word 22
} udp_hdr;
- volatile uint32_t _pad[32-23];
+ volatile uint32_t _pad[1];
+ volatile uint32_t dsp0_port;
+ volatile uint32_t err0_port;
+ volatile uint32_t dsp1_port;
+ volatile uint32_t err1_port;
} sr_udp_sm_t;
// control bits (all expect UDP_SM_LAST_WORD are mutually exclusive)
+// Insert a UDP source port from the table
+#define UDP_SM_INS_UDP_SRC_PORT (1 << 21)
+
+// Insert a UDP dest port from the table
+#define UDP_SM_INS_UDP_DST_PORT (1 << 20)
+
// This is the last word of the header
#define UDP_SM_LAST_WORD (1 << 19)
@@ -679,7 +547,7 @@ typedef struct {
volatile uint32_t seqno; // Write to init seqno. It autoincs on match
} tx_proto_engine_regs_t;
-#define tx_proto_engine ((tx_proto_engine_regs_t *) TX_PROTOCOL_ENGINE_BASE)
+#define tx_proto_engine ((tx_proto_engine_regs_t *) _SR_ADDR(SR_TX_PROT_ENG))
/*
* --- ethernet rx protocol engine regs (write only) ---
@@ -706,14 +574,14 @@ typedef struct {
volatile uint32_t ethertype_pad; // ethertype in high 16-bits
} rx_proto_engine_regs_t;
-#define rx_proto_engine ((rx_proto_engine_regs_t *) RX_PROTOCOL_ENGINE_BASE)
+#define rx_proto_engine ((rx_proto_engine_regs_t *) _SR_ADDR(SR_RX_PROT_ENG))
///////////////////////////////////////////////////
// Simple Programmable Interrupt Controller, Slave 8
-#define PIC_BASE 0x3500
+#define PIC_BASE 0x6500
// Interrupt request lines
// Bit numbers (LSB == 0) that correpond to interrupts into PIC
@@ -773,7 +641,7 @@ typedef struct {
///////////////////////////////////////////////////
// UART, Slave 10
-#define UART_BASE 0x3700
+#define UART_BASE 0x6700
typedef struct {
// All elements are 8 bits except for clkdiv (16), but we use uint32 to make
@@ -791,7 +659,7 @@ typedef struct {
///////////////////////////////////////////////////
// ATR Controller, Slave 11
-#define ATR_BASE 0x3800
+#define ATR_BASE 0x6800
typedef struct {
volatile uint32_t v[16];
@@ -810,7 +678,7 @@ typedef struct {
///////////////////////////////////////////////////
// ICAP, Slave 13
-#define ICAP_BASE 0x3A00
+#define ICAP_BASE 0x6A00
typedef struct {
uint32_t icap; //only the lower 8 bits matter
} icap_regs_t;
@@ -822,7 +690,7 @@ typedef struct {
// Control register definitions are the same as SPI, so use SPI_CTRL_ASS, etc.
// Peripheral mask not needed since bus is dedicated (CE held low)
-#define SPIF_BASE 0x3B00
+#define SPIF_BASE 0x6B00
typedef struct {
volatile uint32_t txrx0;
volatile uint32_t txrx1;
diff --git a/firmware/microblaze/usrp2p/spi_flash.c b/firmware/zpu/usrp2p/spi_flash.c
index 09b74a513..09b74a513 100644
--- a/firmware/microblaze/usrp2p/spi_flash.c
+++ b/firmware/zpu/usrp2p/spi_flash.c
diff --git a/firmware/microblaze/usrp2p/spi_flash.h b/firmware/zpu/usrp2p/spi_flash.h
index bbe7b650d..bbe7b650d 100644
--- a/firmware/microblaze/usrp2p/spi_flash.h
+++ b/firmware/zpu/usrp2p/spi_flash.h
diff --git a/firmware/microblaze/usrp2p/spi_flash_private.h b/firmware/zpu/usrp2p/spi_flash_private.h
index 9a1b8d3e3..9a1b8d3e3 100644
--- a/firmware/microblaze/usrp2p/spi_flash_private.h
+++ b/firmware/zpu/usrp2p/spi_flash_private.h
diff --git a/firmware/microblaze/usrp2p/spi_flash_read.c b/firmware/zpu/usrp2p/spi_flash_read.c
index 4682c5fe6..36c326e96 100644
--- a/firmware/microblaze/usrp2p/spi_flash_read.c
+++ b/firmware/zpu/usrp2p/spi_flash_read.c
@@ -19,6 +19,7 @@
#include "spi_flash_private.h"
#include <stdlib.h> // abort
+#include <nonstdio.h>
static size_t _spi_flash_log2_memory_size;
@@ -100,7 +101,8 @@ spi_flash_read(uint32_t flash_addr, size_t nbytes, void *buf)
*/
unsigned char *dst = (unsigned char *) buf;
size_t m;
- for (size_t n = 0; n < nbytes; n += m, dst += m){
+ for (size_t n = 0; n < nbytes; n += m){
+
spif_regs->ctrl = FLAGS | LEN(16 * 8); // xfer 16 bytes
spif_regs->ctrl = FLAGS | LEN(16 * 8) | SPI_CTRL_GO_BSY;
spif_wait();
@@ -113,7 +115,7 @@ spi_flash_read(uint32_t flash_addr, size_t nbytes, void *buf)
unsigned char *src = (unsigned char *) &w[0];
m = min(nbytes - n, 16);
for (size_t i = 0; i < m; i++)
- dst[i] = src[i];
+ *(dst++) = src[i];
}
spif_regs->ss = 0; // deassert chip select
}
diff --git a/firmware/microblaze/usrp2p/spif.c b/firmware/zpu/usrp2p/spif.c
index 1c1a348f4..1c1a348f4 100644
--- a/firmware/microblaze/usrp2p/spif.c
+++ b/firmware/zpu/usrp2p/spif.c
diff --git a/firmware/microblaze/usrp2p/udp_fw_update.c b/firmware/zpu/usrp2p/udp_fw_update.c
index ead08ad2c..ead08ad2c 100644
--- a/firmware/microblaze/usrp2p/udp_fw_update.c
+++ b/firmware/zpu/usrp2p/udp_fw_update.c
diff --git a/firmware/microblaze/usrp2p/xilinx_s3_icap.c b/firmware/zpu/usrp2p/xilinx_s3_icap.c
index 50c85231c..50c85231c 100644
--- a/firmware/microblaze/usrp2p/xilinx_s3_icap.c
+++ b/firmware/zpu/usrp2p/xilinx_s3_icap.c
diff --git a/firmware/microblaze/usrp2p/xilinx_s3_icap.h b/firmware/zpu/usrp2p/xilinx_s3_icap.h
index 7b7e9eccc..7b7e9eccc 100644
--- a/firmware/microblaze/usrp2p/xilinx_s3_icap.h
+++ b/firmware/zpu/usrp2p/xilinx_s3_icap.h