2014年2月9日 星期日

raspberry pi + microcontroller


  • RAM size 256/512 
    • http://openenergymonitor.blogspot.tw/2013/10/raspberry-pi-new-type-of-ram.html
  • FTDI USB 2 UART adaptor (JTAG) shared with GPIO
    • http://www.ftdichip.com/Products/Modules/RPi.htm
    • FT232 JTAG
      • https://github.com/progranism/FT232R-JTAG
      • https://github.com/dwelch67/raspberrypi/tree/master/armjtag
  • openOCD
    • JTAG driver
    • USB or the Parallel Printer Port (USB to rs232)
    • arm instruction disassembly
    • http://visualgdb.com/tutorials/arm/openocd/
    • http://openenergymonitor.blogspot.tw/2013/10/raspberry-pi-new-type-of-ram.html
  • mount JTAG with GDB(Eclipse)
    • http://www.ethernut.de/en/tools/eclipse/confdebug.html
  • convert arm assembly to c
    • Hex-Rays
    • https://www.hex-rays.com/products/decompiler/compare_arm0.shtml
  • bootloader

  • adafruit (extend hardware models,such as motor, led, mcu)
    • GPIO export
    • http://www.adafruit.com/
    • http://learn.adafruit.com/category/learn-raspberry-pi


  • 開發板教學
    • http://ruten-proteus.blogspot.tw/

xbus UVM example

purpose

a sample bus UVM/SV verification env that contains direct pattern, random pattern, trx replay pattern

pattern definition

  1. direct pattern : normal read/write test, like read after write test, the expected and answer had already known
  2. random pattern : random test based on it's constrain rule set
  3. trx replay pattern : replay trx via DPI interface supported

how to run it?

1.you can check our testsuites first, we provide three kinds of test at path ./sv/pat
1.1. for direct pattern +UVM_TESTNAME=test_xbus_normal_rw_seq_lib
1.2. for random pattern +UVM_TESTNAME=test_xbus_random_rw_seq_lib
1.3. for trx replay pattern +UVM_TESTNAME=test_xbus_adaptor_seq_lib
2.setup irun env please make sure your irun version is > 12.x
3.% irun -f run.f

carCV

purpose

car and lane detection example
ScreenShot

method

-lane detection
  • houghlines
  • houghlinesP
  • fitlines
-car detection
  • haar cascades

how to run it?

step1. get video source %python get_video.py
step2. lane detection %python detect_lane.py
step3. car detection %python detect_car.py
Ref

remote openCV with raspberry pi




this is an example about how to use remote object detection based on openCV and zeromq framework.

requirements

  • opencv(python) as cv(opencv) and cv2(numpy)
  • zeromq(python)
  • gevent(light weight switch)
  • knowledge about img process
  • profile, logging each stage mem and cpu time

method

  • Server
    • capture img
    • send img to clinet
    • wait for next command from client
    • update status by new command
  • Client
    • receive img
    • run all detection
    • build up a new command based on detection results

detections

  • face detect
  • circle detect
  • line detect
  • find attribute obj

how to run it?

  • python poll_camera.py (using cv to capture/show img via remote protocol)
  • python poll_camera2.py (using cv2 to capture/show img ...)
  • python poll_thread_run2.py (using cv2 to run all thread detection based on CPU num)
  • python poll_series_run2.py (using cv2 to run all series detection ...)