Micah Dowty Test-Driven Development of a new Critical Decoder.

Slides:



Advertisements
Similar presentations
SMART TEMPERATURE SENSOR digital temperature sensor
Advertisements

1 ECE 372 – Microcontroller Design Parallel IO Ports - Outputs Parallel IO Ports E.g. Port T, Port AD Used to interface with many devices Switches LEDs.
Chapter 2Test Specification Process. n Device Specification Sheet – Purpose n Design Specification – Determine functionality of design n Test List Generation.
Autonomous Sensor and Control Platform Rover Tae Lee Josh Reitsema Scott Zhong Mike Chao Mark Winter.
Arecibo Telescope Servo & Drive System Technical Meeting May 2004 VERTEX ANTENNENTECHNIK GmbH Arecibo Telescope Servo Drive System Ideas For Computer.
Prototyping of Real-time Component Based Systems by the use of Timed Automata Trevor Jones Lancaster University, UK
PH4705 ET4305 Interface Standards A number of standard digital data interfaces are used in measurement systems to connect instruments and computers for.
Motor Control Lab Using Altera Nano FPGA
DEBUGGING TECHNIQUES. Wiring Type of wire to use Solid core for breadboard Multiple-strand for flying leads and connections to power supply unit (PSU)
Wearable Wireless Physiological Sensors Daniel Bishop Rosy Logioia Josh Handley Gouri Shintri Phillip Hay Clay Smith Christina Hernandez Adam Stevenson.
1: Operating Systems Overview
Testing HCI Usability Testing. Chronological order of testing Individual program units are built and tested (white-box testing / unit testing) Units are.
New Human Computer Interfaces Amnon Dekel HUJI – CSE, Spring 2007 Class 3 March
Students: Nir Engelberg Ezequiel Hadid Supervisor: Mony Orbach In association with: January 3, Winter 2005.
EE694v-Verification-Lect5-1- Lecture 5 - Verification Tools Automation improves the efficiency and reliability of the verification process Some tools,
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
By Andrew Gliga Cs 147. What are Embedded Systems? Similar to real computers  They have CPU, memory, I/O Though they have limited tasks  Can only do.
Wireless Data Acquisition for SAE Car Project by: J.P. Haberkorn & Jon Trainor Advised by: Mr. Steven Gutschlag.
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Embedded Systems Design
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
Basic Concepts of Computer Networks
Baseboard Aavikkomursu 7.2. Aavikkomursu Micro- controller Extension port for programming microcontroller and sensor input Resistor RS485 interface chip.
The 6713 DSP Starter Kit (DSK) is a low-cost platform which lets customers evaluate and develop applications for the Texas Instruments C67X DSP family.
Group Members: Brad Cox Kevin Burkett Tera Cline Arthur Perkins CS10 Battery Management System.
Test Driven Development TDD. Testing ”Testing can never demonstrate the absence of errors in software, only their presence” Edsger W. Dijkstra (but it.
System Testing There are several steps in testing the system: –Function testing –Performance testing –Acceptance testing –Installation testing.
Basic Input Output System
Electronics for PS and LHC transformers Grzegorz Kasprowicz Supervisor: David Belohrad AB-BDI-PI Technical student report.
LOGO OPERATING SYSTEM Dalia AL-Dabbagh
Operating System Review September 10, 2012Introduction to Computer Security ©2004 Matt Bishop Slide #1-1.
Chapter 4: Overview of Preventive Maintenance
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
J. Christiansen, CERN - EP/MIC
Dr. Tom WayCSC Testing and Test-Driven Development CSC 4700 Software Engineering Based on Sommerville slides.
Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.
Automated Testing Presentation to EPICS Collaboration Meeting DESY Paul Gibbons PhD Diamond Light Source Ltd.
25 April 2000 SEESCOASEESCOA STWW - Programma Evaluation of on-chip debugging techniques Deliverable D5.1 Michiel Ronsse.
Michael Lisoski Leblanc Meneses Jason Schaer Bryan Staton.
1 Extending FPGA Verification Through The PLI Charles Howard Senior Research Engineer Southwest Research Institute San Antonio, Texas (210)
Bonitron A\C Demand Scheduler Alex Brown Cory Haugh Ajmer Dwivedi.
CSCI1600: Embedded and Real Time Software Lecture 9: Input Output Concepts Steven Reiss, Fall 2015.
Apollo Guidance Computer Using a Programmable System on a Chip Shane Whalen Advisor: Dr.Andrezj Rucinski.
CSC 480 Software Engineering Test Planning. Test Cases and Test Plans A test case is an explicit set of instructions designed to detect a particular class.
Integration testing Integrate two or more module.i.e. communicate between the modules. Follow a white box testing (Testing the code)
What is a Microprocessor ? A microprocessor consists of an ALU to perform arithmetic and logic manipulations, registers, and a control unit Its has some.
(1) Test Driven Development Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii Honolulu.
HardSSH Cryptographic Hardware Key Team May07-20: Steven Schulteis (Cpr E) Joseph Sloan (EE, Cpr E, Com S) Michael Ekstrand (Cpr E) Taylor Schreck (Cpr.
LIGO-G9900XX-00-M LIGO II1 Why are we here and what are we trying to accomplish? The existing system of cross connects based on terminal blocks and discrete.
Slides created by: Professor Ian G. Harris Embedded Systems  Embedded systems are computer-based systems which are embedded inside another device (car,
I/O Software CS 537 – Introduction to Operating Systems.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 4: Overview of Preventive Maintenance IT Essentials 5.0.
Embedded C- Language Lets Learn fundamentals !!. An Embedded system is combination of computer hardware and software, and perhaps additional mechanical.
Programming and Debugging with the Dragon and JTAG Many thanks to Dr. James Hawthorne for evaluating the Dragon system and providing the core content for.
COMPUTER COMPONENTS Ms Jennifer Computer Components.
Lets Learn fundamentals !!
Chip Config & Drivers – Required Drivers:
Programming and Debugging with the Dragon and JTAG
SCADA for Remote Industrial Plant
Microcontroller Based Digital Code Lock
Introduction to Electronics
How to avoid catching things on fire.
Presented by: ANDREW COOK, Chief Engineer, CEO
Testing and Test-Driven Development CSC 4700 Software Engineering
CS 501: Software Engineering Fall 1999
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Hardware-less Testing for RAS Software
Universal Serial Bus (USB)
Command and Data Handling
Chapter 13: I/O Systems.
Presentation transcript:

Micah Dowty Test-Driven Development of a new Critical Decoder

The Citizen Explorer's Critical Decoder ● Microcontroller board located in the C&DH box, responsible for: – Controlling power to the other microcontrollers and the flight computer – Command routing in “critical mode” when the flight computer is unavailable – Reading critical analog and digital sensors – Controlling the radio transmit power – Watchdog and power-on timers

The Old CD ● Many problems, hidden until recently ● Very little correct documentation ● The one working board was physically damaged

Hidden Problems ● Relay drivers underspecified ● Software locks up under heavy load – Overuse of buffers – Not fully async ● Data corruption in critical mode ● Watchdog used ineffectively, SEUs could still cause unrecoverable failure

The Last Straw ● The one working board was damaged: – Bad IC sockets – Many IC failures due to power supply overvoltage – Too many wires, many of which were failing ● No documentation on building a replacement

The Biggest Design Flaw... ● There was no good way to test the Critical Decoder, so these problems were only discovered long after the design was “done”

Replacing the CD ● Several relatively obvious design changes could be made: – Simplify by removing unused features – Simplify by rethinking the design – Robust fully-asynchronous software with real- time constraints – SEU robustness and extra layers of protection (supervisor chip) – All on one simple PCB, no wires

Not Quite Enough... ● Starting with an improved design doesn't prevent the same problems from occurring again ● Other satellite testing will be happening concurrently, so we need a usable prototype as quickly as possible ● Comprehensive testing is imperative, to prevent hidden problems

A Different Development Methodology ● We adopted Test Driven Development from the software world to work on embedded systems with custom hardware and software ● Popularized by Extreme Programming ● Write failing test cases for necessary functionality, then make the simplest software that passes 100% of the tests

Advantages of Test Driven Development ● The prototype is always fully integrated and working, with a subset of its final functionality ● Comprehensive tests protect against regression and provide an easy way to verify completed hardware ● Encourages simple designs with refactoring when necessary ● Developers don't have to worry about refactoring causing hidden problems ● The test harness acts as an executable test procedure, and should always be up to date

Compared to Traditional Testing ● It is common to test each component of an embedded system with a specialized tool: – PCB electrical testing – Firmware debuggers and simulators – VHDL/Verilog simulation ● These tools are still useful when available, but are often expensive and don't test a fully integrated device

Software Encapsulation Method ● The entire embedded system under test is wrapped in a software layer ● This software layer is then tested with existing methods

Special Concerns with Software Encapsulation ● The software encapsulation must preserve all of the hardware's likely failure modes ● Hardware contains similar failure modes to those in software, plus some only seen in hardware: bus timing errors, loose wires, faulty components, etc.

Applying Software Encapsulation to the CD ● Requirements for DAQ/control board: – Speed isn't very important – Digital I/O, analog I/O, RS-232, RS-485 ● Rather than an expensive commercial DAQ/control solution, a simple and cheap “RCPOD” board was developed ● Encapsulation layer written in Python ● PyUnit test framework

The RCPOD RS-485 USB Digital I/O Analog Input

RCPOD Advantages ● Cheaper than an equivalent commercial solution ● Convenient USB interface ● Easy Python and C software interfaces ● More reliable RS-485 than the old “blue box” adaptor since timing is controlled by the RCPOD's microcontroller ● The RCPOD would also be used to run other Citizen Explorer tests using the same Micronet RS-485 bus used to test the CD

RCPOD Disadvantages ● No analog outputs ● Only one RS-232/RS-485 serial port ● Relatively slow

RCPOD Workarounds ● Used USB to Serial adaptors for the two RS-232 ports ● In place of analog outputs, six digital outputs and resistors were used to present test patterns to the CD's analog inputs ● The RCPOD could not simulate the TX power DAC in software, so a hardware simulation had to be built

Future Work on the DAQ/Control Layer ● The RCPOD worked well for the CD, but an ideal DAQ/Control layer would: – Eliminate the breadboarded adaptor by including a built-in way to route signals using an FPGA or multiplexers – Provide a way to compile timing-sensitive test cases into a form that could be executed on the DAQ/Control board – Include more I/O

CD Software Encapsulation ● On top of the Python interface to the RCPOD, a Python interface for manipulating and sending Micronet commands was built ● This interface was shared by a PyUnit test suite for the CD, and by other graphical and command line tools for testing Citizen Explorer's microcontrollers

Development Results ● Time savings: a fully automated test suite elimiated the tedious manual testing used on most other CX components ● The firmware and hardware are routinely tested in corner cases that would never show up in normal integration testing, such as processing packets as fast as they can be received, from all ports. ● Test driven development was a natural way to gradually extend the feature set of the CD while remaining a reliable part of other satellite tests

Development Results, cont. ● The test suite quickly identified simple problems like broken wires or loose cables that would be tedious to identify by hand ● Once the test suite identified a software regression, traditional simulation and debugging tools were still useful to debug the problem further