AXIOM Alpha

From apertus wiki
(Redirected from Axiom Alpha Prototype)
Jump to: navigation, search

1 About

The AXIOM Alpha was a proof of concept camera that was built prior to development on the AXIOM Beta commencing.

Project overview on apertus° website: http://axiom.apertus.org/index.php?site=alpha

Software wiki page moved to: Axiom Alpha Software




2 Tests and Measurements

Darkframe Tests




3 Zedboard related Notes

3.1 Zedboard Development on Ubuntu 12.04 LTS with ISE 14.5 (Currently running in Virtual Box on a Mac)

Plug in two micro USB cables (one is provided with the Zedboard) to Zedboard ports J13 and J17 (UART and PROG) respectively. Set jumpers JP7-JP11 as described in tutorial for Helloworld. Plug USB cables into computer.

Turn on Zedboard. In Virtual Box open the machine settings that Ubuntu is installed in. Select the Ports tab, and the USB tab. Add a USB Device Filter (plus sign) for 2012 Cyprus Semiconductor Cypress - USB2UART-Ver1.0G, and also Digilent USB Device. This automatically connects the USB ports for Ubuntu whenever the Zedboard is connected.

In Ubuntu:

Note: To extract files use: tar -xvf filename


1) Install libusb: sudo apt-get install libusb-dev

2) Work around for arm toolchain install: sudo dpkg-reconfigure -plow dash (Select NO when prompted)

3) Download ISE 14.5

4) Install: ./xsetup (do not install cable drivers). Select System Edition

5) Work around for arm toolchain install: sudo dpkg-reconfigure -plow dash (Select YES when prompted)

6) Download Digilent Runtime and Utilities: [1]

7) Install both using: sudo ./install.sh (note install can be for all users or the user installing, see README for instructions)

8) Download Digilent Plugin: [2]

9) Install plugin per instructions included in PDF.


Note: There are several terminal emulator options. Minicom can be run in a shell. A google search will show how to use it. Alternatively in SDK you can use the terminal emulator that is included.




3.2 Getting JTAG working with the Zedboard

From http://www.digilentinc.com/Products/Detail.cfm?NavPath=2%2C66%2C828&Prod=ADEPT2 download the following packages (these are for 64bit so for x86 you will want the 32bit versions):

digilent.adept.runtime_2.13.1-x86_64.tar.gz
digilent.adept.utilities_2.1.1-x86_64.tar.gz
libCseDigilent_2.4.3-x86_64.tar.gz


then install the runtime:

tar xzf digilent.adept.runtime_2.13.1-x86_64.tar.gz; cd digilent.adept.runtime_2.13.1-x86_64; ./install.sh


... and here is the important part: AND the ftdi driver

cd ftdi.drivers_1.0.4-x86_64; ./install.sh


Then the utilities

same method as runtime above


At this point the following command

djtgcfg enum


... should show board details:

Found 1 device(s)

Device: Zed
   Product Name:   Digilent Zed
   User Name:      Zed
   Serial Number:  XXXXXXXXXXXX

Note: You need to fix the udev rules, restart udev and unplug/replug the usb-jtag to get the driver (ftdi_sio) unloaded and the permissions for the usb device changed.

The libCseDigilent_2.4.3-x86_64.tar.gz contains two files in ISE14x/plugin:

libCseDigilent.so  
libCseDigilent.xml


... which need to be copied to the ISE plugin directory.

After that, the following should work:

xmd


... and should show something like:

Xilinx Microprocessor Debugger (XMD) Engine
Xilinx EDK 14.5 Build EDK_P.58f
Copyright (c) 1995-2012 Xilinx, Inc.  All rights reserved.


Then typing:

connect mb mdm -cable type xilinx_plugin modulename digilent_plugin


Should show:

XMD%
XMD% connect mb mdm -cable type xilinx_plugin modulename digilent_plugin

JTAG chain configuration
--------------------------------------------------
Device   ID Code        IR Length    Part Name
 1       4ba00477           4        Cortex-A9
 2       03727093           6        XC7Z020
ERROR: Could not detect MDM peripheral on hardware. Please check:
        1. If FPGA is configured correctly
        2. MDM Core is instantiated in the design
        3. If the correct FPGA is referred, in case of multiple FPGAs
        4. If the correct MDM is referred, in case of a multiple MDM system

Note: The default image has no mdm IP




3.3 Booting the Zedboard via JTAG

You want to get the ZedBoard_CTT_v14.3_121017.zip for some files from: http://www.zedboard.org/sites/default/files/design/ZedBoard_CTT_v14.3_121017.zip namely: ps7_init.tcl and stub.tcl

Then you also need the following from your design:

  • system.bit [PL bitstream]
  • u-boot.elf or some other elf binary [PS 2nd stage]
  • optionally (Linux Boot): zImage, ramdisk*.gz and devicetree.dtb


start xmd (the Xilinx® Microprocessor Debugger console as part of ISE), then in the xmd prompt do:

connect arm hw
fpga -f system.bit
source ps7_init.tcl
ps7_init
init_user
source stub.tcl
target 64
dow u-boot.elf
con


This will connect to the target, upload the fpga bitstream (PL), initialize memory and MIO devices (ps7_init/init_user) and load the second level bootloader (PS) the 'con' already starts the bootloader.


optionally, you can also upload the Linux kernel, initramfs and the devicetree like this:

dow -data zImage 0x8000
dow -data ramdisk8M.image.gz 0x800000
dow -data devicetree.dtb 0x1000000


... and boot the kernel/linux with:

con 0x8000




3.4 Booting the Zedboard via TFTP

Booting the Zedboard via TFTP is a lot faster than the JTAG boot method and doesn't have the drawbacks of SD card shuffling. It basically boots the Zedboard over the network, a DHCP server directs the Zedboard to the right place to read the required files via TFTP.




3.4.1 DHCP Server Setup Ubuntu 12.04 LTS

Connect the Zedboard via Ethernet to a PC running Ubuntu 12.04. Make sure the router in this set up does not contain DHCP records for the Zedboard otherwise the DHCP server running on the PC will have no effects on the Zedboard. The DHCP server on the router and the DHCP server on the PC even if they are on the same network do not interfere normally.

To install the required packages run:

sudo apt-get install dhcp3-server dhcpd isc-dhcp-server


If there is more than one network card(s) in your Ubuntu PC, then you have to select the network card on which your server will be listen for dhcp request. (By default, it listens on eth0):

sudo gedit /etc/default/isc-dhcp-server


Then edit the config file:

sudo gedit /etc/dhcp/dhcpd.conf

In this case the network is set up in the 192.168.10.X range and the dhcpd.conf looks like this (AAA = Ubuntu PC, BBB = Zedboard)

subnet 192.168.10.0 netmask 255.255.255.0 {
       # default gateway
       option routers 192.168.10.254;
       option subnet-mask 255.255.255.0;
         
       always-reply-rfc1048 true;
       next-server 192.168.10.AAA;

       host zedboard {
               hardware ethernet 00:0A:35:00:01:22;
               fixed-address 192.168.10.BBB;
               filename "/ZED/u-boot.scr";
       }

}

Note: All Zedboards have the same MAC address hardcoded into our bootloader currently:

00:0A:35:00:01:22

After making changes to the file restart the dhcp server with:

sudo service isc-dhcp-server restart


... or start it manually if it has not been started yet:

sudo service isc-dhcp-server start


When you look at the syslog on your Ubuntu PC with:

sudo tail -f /var/log/syslog


You should see lines like the following when the DHCP server is started and Zedboard is making requests to the DHCP server (AAA = Ubuntu PC, BBB = Zedboard):

Oct  3 20:23:40 Ubuntu-PC dhcpd: Internet Systems Consortium DHCP Server 4.1-ESV-R4
Oct  3 20:23:40 Ubuntu-PC dhcpd: Copyright 2004-2011 Internet Systems Consortium.
Oct  3 20:23:40 Ubuntu-PC dhcpd: All rights reserved.
Oct  3 20:23:40 Ubuntu-PC dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Oct  3 20:23:40 Ubuntu-PC dhcpd: Wrote 0 deleted host decls to leases file.
Oct  3 20:23:40 Ubuntu-PC dhcpd: Wrote 0 new dynamic host decls to leases file.
Oct  3 20:23:40 Ubuntu-PC dhcpd: Wrote 0 leases to leases file.
Oct  3 20:23:54 Ubuntu-PC dhcpd: BOOTREQUEST from 00:0a:35:00:01:22 via eth0
Oct  3 20:23:54 Ubuntu-PC dhcpd: BOOTREPLY for 192.168.10.BBB to zedboard (00:0a:35:00:01:22) via eth0

On the Zedboards UART you should see something like this (AAA = Ubuntu PC, BBB = Zedboard):

U-Boot 2012.04.01-dirty (Jun 23 2013 - 19:36:00)
DRAM:  512 MiB
WARNING: Caches not enabled
MMC:   SDHCI: 0
Using default environment
In:    serial
Out:   serial
Err:   serial
Net:   zynq_gem
Hit any key to stop autoboot:  3 ��� 2 ��� 1 ��� 0 
Scripted Boot via TFTP...
Xilinx Device
Descriptor @ 0x1ffb8a64
Family:        	Zynq PL
Interface type:	Device configuration interface (Zynq)
Device Size:   	4045564 bytes
Cookie:        	0x0 (0)
No Device Function Table.
Requesting Boot Script via TFTP...
Trying to set up GEM link...
Phy ID: 01410DD1
Resetting PHY... 
PHY reset complete.
Waiting for PHY to complete auto-negotiation...
Link is now at 1000Mbps!
BOOTP broadcast 1
Using zynq_gem device
TFTP from server 192.168.10.AAA; our IP address is 192.168.10.BBB
Filename '/ZED/u-boot.scr'.
Load address: 0xf00000
Loading: *�#
done
Bytes transferred = 303 (12f hex)
Executing Boot Script...
## Executing script at 00f00000
Using zynq_gem device
TFTP from server 192.168.10.AAA; our IP address is 192.168.10.BBB
Filename 'ZED/system.bin'.
Load address: 0x1000000
Loading: *�############################




3.4.2 TFTP Server Setup Ubuntu 12.04 LTS

Install required packages:

apt-get install tftpd-hpa tftp-hpa xinetd


Create a text file if it does not exist yet called tftp under /etc/xinetd.d/

sudo gedit /etc/xinetd.d/tftp

The tftp file should look like this:

service tftp
{
protocol        = udp
port            = 69
socket_type     = dgram
wait            = yes
user            = root
server          = /usr/sbin/in.tftpd
server_args     = -c -s /var/lib/tftpboot --verbose
disable         = no
}


The files that are served via tftp are located in

/var/lib/tftpboot


Download the 'ZED' folder to your /var/lib/tftpboot folder by typing:

wget -m -nv -np -c -nH --cut-dirs=3 -R 'index.html*' http://vserver.13thfloor.at/Stuff/AXIOM/TFTP/ZED/


Download the

boot.bin

from http://vserver.13thfloor.at/Stuff/AXIOM/TFTP/ to your /var/lib/tftpboot/ directory

Then create some symlinks inside the ZED folder in the root TFTP folder (/var/lib/tftpboot/ZED/)

cd /var/lib/tftpboot/ZED/
ln -s BERTL.xilinx/zImage zImage
ln -s BERTL.PL/cmv_io.bin system.bin
ln -s ZedBoard_OOB_Design/ramdisk8M.image.gz ramdisk.image.gz
ln -s BERTL.xilinx/devicetree_ramdisk.dtb devicetree_ramdisk.dtb


Then make sure that all the files can be acessed by TFTP:

sudo chmod -R 777 /var/lib/tftpboot/*


Start the TFTP server with:

sudo service xinetd start


Monitor your Ubuntu-PC's syslog by typing:

sudo tail -f /var/log/syslog


When the Zedboard is correctly booting via TFTP you should see something like the following in syslog (AAA = Ubuntu PC, BBB = Zedboard):

Oct  3 20:24:52 Ubuntu-PC in.tftpd[2859]: RRQ from 192.168.10.BBB filename /ZED/u-boot.scr
Oct  3 20:24:52 Ubuntu-PC in.tftpd[2860]: RRQ from 192.168.10.BBB filename ZED/system.bin
Oct  3 20:24:54 Ubuntu-PC in.tftpd[2861]: RRQ from 192.168.10.BBB filename ZED/zImage
Oct  3 20:24:55 Ubuntu-PC in.tftpd[2862]: RRQ from 192.168.10.BBB filename ZED/devicetree_ramdisk.dtb
Oct  3 20:24:55 Ubuntu-PC in.tftpd[2863]: RRQ from 192.168.10.BBB filename ZED/ramdisk.image.gz




3.4.3 SD Card Preparations

Download boot.bin (as BOOT.BIN) and copy it the to the SD card that is plugged into the Zedboard:


The boot.bin will request an IP via DHCP and then start loading the advertised boot file, which is an u-boot script that is then executed, and can be used to customize the setup steps. An example script is provided to boot into the demo ZedBoard_OOB design.




3.4.4 Boot Process

Boot time from power on till Linux prompt is 29 seconds

5 seconds till boot.bin is booted, 3 seconds wait to interrupt the bootloader, 3 seconds kernel boot, rest is bootp/tftp and stuff

  1. Autoboot (from boot.bin) will first request an IP via BOOTP
  2. Then request the file ZED/u-boot.scr (the script)
  3. Then execute that script, which contains:
  4. tftp 0x1000000 ZED/system.bin
  5. fpga load 0 0x${fileaddr} 0x${filesize}
  6. tftp 0x8000 ZED/zImage
  7. tftp 0x1000000 ZED/devicetree_ramdisk.dtb
  8. tftp 0x800000 ZED/ramdisk.image.gz
  9. bootz 0x8000 0x${fileaddr}:0x${filesize} 0x1000000
  10. go 0x8000 so it first fetches the PL code and uploads it to the FPGA
  11. then it requests the kernel, devicetree and initrd
  12. then it tries to boot the new style




4 Sensor Front End

4.1 Parts



4.1.1 Image Sensor

CMV12000 from Cmosis

http://www.cmosis.com/products/standard_products/cmv12000

Price: 1265.00 €




4.1.2 FMC connector

Samtec Vita 57

http://www.samtec.com/standards/vita.aspx

Part Number: ASP-134604-01

Price: $19.70




4.1.3 HDR Cable

300mm FMC extension cable (HDR⁃169473⁃01)

http://www.samtec.com/standards/vita.aspx

Price: $180.54




4.1.4 Image Sensor Socket

Socket for CMV12000 from Andon:

Partnumber | Prices: 10-30-07-237-414T4-R27-L14 - 87.00 €

10-30-07-237-400T4-R27-L14 - 88.15 €

10-30-07-237-RB501T4-R27-L14 - 102.30 €