Cyclone5-FPGA-ARM

From DaqWiki
Jump to navigation Jump to search

Links

Serial port setup

  • use micro-usb -> USB cable
  • minicom settings:
┌───────────────────────────────────────────────────────────────────────┐
│ A -    Serial Device      : /dev/ttyUSB1                              │                                                                                 
│ B - Lockfile Location     : /var/lock                                 │                                    
│ C -   Callin Program      :                                           │                                    
│ D -  Callout Program      :                                           │                                    
│ E -    Bps/Par/Bits       : 57600 8N1                                 │                                    
│ F - Hardware Flow Control : No                                        │                                    
│ G - Software Flow Control : No                                        │                                    
│                                                                       │                                    
│    Change which setting?                                              │
└───────────────────────────────────────────────────────────────────────┘ 

CPU info

root@socfpga_cyclone5:~# cat /proc/cpuinfo 
Processor       : ARMv7 Processor rev 0 (v7l)
processor       : 0
BogoMIPS        : 1594.16

processor       : 1
BogoMIPS        : 1594.16

Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0

Hardware        : Altera SOCFPGA
Revision        : 0000
Serial          : 0000000000000000
root@socfpga_cyclone5:~# 

Benchmarks

  • linux
root@socfpga_cyclone5:~# uname -a
Linux socfpga_cyclone5 3.7.0 #1 SMP Fri Feb 15 10:15:57 CST 2013 armv7l GNU/Linux
  • memcpy
root@socfpga_cyclone5:~# ./memcpy 
memcpy       1 KiBytes:    815 MB/sec
memcpy       2 KiBytes:   1310 MB/sec
memcpy       4 KiBytes:   1786 MB/sec
memcpy       8 KiBytes:   2192 MB/sec
memcpy      16 KiBytes:   2464 MB/sec
memcpy      32 KiBytes:   2116 MB/sec
memcpy      64 KiBytes:   1694 MB/sec
memcpy     128 KiBytes:   1538 MB/sec
memcpy     256 KiBytes:    919 MB/sec
memcpy     512 KiBytes:    509 MB/sec
memcpy    1024 KiBytes:    453 MB/sec
memcpy    2048 KiBytes:    433 MB/sec
memcpy    4096 KiBytes:    404 MB/sec
memcpy    8192 KiBytes:    409 MB/sec
memcpy   16384 KiBytes:    398 MB/sec
memcpy   32768 KiBytes:    389 MB/sec
memcpy   65536 KiBytes:    400 MB/sec
memcpy  131072 KiBytes:    373 MB/sec
root@socfpga_cyclone5:~# 
  • ttcp receive: 94 Mbytes/sec
root@socfpga_cyclone5:~# ./ttcp -r -s
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: accept from 142.90.119.144
ttcp-r: 409600000 bytes in 4.26 real seconds = 93819.70 KB/sec +++
ttcp-r: 61641 I/O calls, msec/call = 0.07, calls/sec = 14457.85
ttcp-r: 0.0user 0.0sys 0:04real 0% 0i+0d 272maxrss 0+2pf 17795+11csw
root@socfpga_cyclone5:~# 
  • ttcp transmit: 55 Mbytes/sec
root@socfpga_cyclone5:~# ./ttcp -n 20000 -t -s ladd14
ttcp-t: buflen=8192, nbuf=20000, align=16384/0, port=5001  tcp  -> ladd14
ttcp-t: socket
ttcp-t: connect
ttcp-t: 163840000 bytes in 2.90 real seconds = 55175.02 KB/sec +++
ttcp-t: 20000 I/O calls, msec/call = 0.15, calls/sec = 6896.88
ttcp-t: 0.0user 0.0sys 0:02real 0% 0i+0d 336maxrss 0+2pf 21+6csw
root@socfpga_cyclone5:~# 

Boot messages

Port /dev/ttyUSB1

                 Press CTRL-A Z for help on special keys

 0 
reading uImage

2693576 bytes read
reading socfpga.dtb

7970 bytes read
## Booting kernel from Legacy Image at 00007fc0 ...
   Image Name:   Linux-3.7.0
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2693512 Bytes = 2.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
## Flattened Device Tree blob at 00000100
   Booting using the fdt blob at 0x00000100
   XIP Kernel Image ... OK
OK
   Loading Device Tree to 0fffa000, end 0fffef21 ... OK

Starting kernel ...

Booting Linux on physical CPU 0
Initializing cgroup subsys cpuset
Linux version 3.7.0 (build@atull-linux1) (gcc version 4.7.3 20121106 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2012.11-20121123 - Linaro GCC 2012.11) ) #13
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Altera SOCFPGA, model: Altera SOCFPGA Cyclone V
Memory policy: ECC disabled, Data cache writealloc
BUG: mapping for 0xfffec000 at 0xfffec000 out of vmalloc space
PERCPU: Embedded 8 pages/cpu @80d58000 s10816 r8192 d13760 u32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260096
Kernel command line: console=ttyS0,57600 root=/dev/mmcblk0p2 rw rootwait
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1024MB = 1024MB total
Memory: 1034040k/1034040k available, 14536k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xc0800000 - 0xff000000   (1000 MB)
    lowmem  : 0x80000000 - 0xc0000000   (1024 MB)
    modules : 0x7f000000 - 0x80000000   (  16 MB)
      .text : 0x80008000 - 0x804bcb2c   (4819 kB)
      .init : 0x804bd000 - 0x804e7a40   ( 171 kB)
      .data : 0x804e8000 - 0x80516e60   ( 188 kB)
       .bss : 0x80516e84 - 0x8054e664   ( 222 kB)
SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:16 nr_irqs:512 512
sched_clock: 32 bits at 100MHz, resolution 10ns, wraps every 42949ms
Console: colour dummy device 80x30
Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x38eab8 - 0x38eb10
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (3188.32 BogoMIPS).
devtmpfs: initialized
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
L310 cache controller enabled
l2x0: 8 ways, CACHE_ID 0x410030c9, AUX_CTRL 0x32060000, Cache size: 524288 B
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource timer3
NET: Registered protocol family 2
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP: reno registered
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
NTFS driver 2.1.30 [Flags: R/W].
jffs2: version 2.2. (NAND) �� 2001-2006 Red Hat, Inc.
msgmni has been set to 2019
io scheduler noop registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
ffc02000.serial0: ttyS0 at MMIO 0xffc02000 (irq = 690) is a 8250
console [ttyS0] enabled
ffc03000.serial1: ttyS1 at MMIO 0xffc03000 (irq = 691) is a 8250
brd: module loaded
at24 0-0051: 4096 byte 24c32 EEPROM, writable, 32 bytes/write
cadence-qspi ff705000.spi: master is unqueued, this is deprecated
m25p80 spi2.0: unrecognized JEDEC id 905d10
m25p80 spi2.1: unrecognized JEDEC id ffffff
cadence-qspi ff705000.spi: Cadence QSPI controller driver
dw_spi_mmio fff00000.spi: master is unqueued, this is deprecated
dw_spi_mmio fff01000.spi: master is unqueued, this is deprecated
stmmac - user ID: 0x10, Synopsys ID: 0x37
 DMA HW capability register supported
 Enhanced/Alternate descriptors
 RX Checksum Offload Engine supported (type 2)
 TX Checksum insertion supported
libphy: stmmac: probed
eth0: PHY ID 00221611 at 1 IRQ 0 (stmmac-0:01) active
socfpga_phy_reset_mii writing extended registers to phyaddr 1
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
Dedicated Tx FIFOs mode
Using DMA mode
dwc_otg ffb40000.usb: DWC OTG Controller
dwc_otg ffb40000.usb: new USB bus registered, assigned bus number 1
dwc_otg ffb40000.usb: irq 656, io mem 0xffb40000
Init: Port Power? op_state=b_peripheral
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
Synopsys Designware Multimedia Card Interface Driver
dw_mmc ff704000.dwmmc0: couldn't determine pwr-en, assuming pwr-en = 0
dw_mmc ff704000.dwmmc0: Using internal DMA controller.
dw_mmc ff704000.dwmmc0: DW MMC controller at irq 667, 32 bit host data width, 1024 deep fifo
mmc_host mmc0: Bus speed (slot 0) = 12500000Hz (slot req 400000Hz, actual 390625HZ div = 16)
dw_mmc ff704000.dwmmc0: 1 slots initialized
dw_mmc ff704000.dwmmc0: Version ID is 240a
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
oprofile: no performance counters
oprofile: using timer interrupt.
TCP: cubic registered
NET: Registered protocol family 17
NET: Registered protocol family 15
Key type dns_resolver registered
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
ThumbEE CPU extension supported.
Registering SWP/SWPB emulation handler
Waiting for root device /dev/mmcblk0p2...
mmc_host mmc0: Bus speed (slot 0) = 12500000Hz (slot req 12500000Hz, actual 12500000HZ div = 0)
mmc0: new high speed SDHC card at address b368
mmcblk0: mmc0:b368       29.8 GiB 
 mmcblk0: p1 p2 p3
kjournald starting.  Commit interval 5 seconds
EXT3-fs (mmcblk0p2): using internal journal
EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
VFS: Mounted root (ext3 filesystem) on device 179:2.
devtmpfs: mounted
Freeing init memory: 168K
INIT: version 2.88 booting
Starting Bootlog daemon: bootlogd.
Configuring network interfaces... done.
Starting portmap daemon...
INIT: Entering runlevel: 5
Starting OpenBSD Secure Shell server: sshd
NET: Registered protocol family 10
done.
Starting syslogd/klogd: done
Starting Lighttpd Web Server: lighttpd.
Stopping Bootlog daemon: bootlogd.

Poky 8.0 (Yocto Project 1.3 Reference Distro) 1.3 socfpga_cyclone5 ttyS0

socfpga_cyclone5 login: 

AAA

aaa