May 9, 2016 1
Solutions for Hardware/Software
co-design
Zvika RozensheinEngineeringIQ
May 9, 2016 2
Introduction/Embedded Systems
• Uses a computer to perform certain functions • Conceived with specific application in mind
• examples: dash controller in automobiles, remote controller for robots, answering machines, etc.
• IoT, Control type of applications• Design consists of hardware components and
software programs that execute on the hardware platforms.
• Hardware-Software Co-Design ?
May 9, 2016 3
Why Co-Design?
• Reduce time to market• Achieve better design
• Explore alternative designs• Good design can be found by balancing the HW/SW
• To meet strict design constraint• power, size, timing, and performance trade-offs• safety and reliability• system on chip
May 9, 2016 4
Concurrent designTraditional design
HW SW
start
Designed by independent groups of experts
Concurrent (Co-Design)
start
HW SW
Designed by Same group of experts with cooperation
May 9, 2016 5
Basic Design Systems• Must-have components:
– Schematic entry– Spice simulation for passive and active components– Most systems also include PCB design capabilities
• Popular products:
May 9, 2016 6
Common CapabilitiesSchematic Capture Measurement & Analysis
Digital LogicBasic Electricity
Analog Electronics
Simulation
Connectivity
3D Models
PCB Layout Visualization & MCAD
PCB DesignConstraint Driven LayoutDesign for ManufactureEnd-to-End Engineering
May 9, 2016 7
What about Embedded? Schematic Capture Measurement & Analysis
Simulation
Connectivity
3D Models
PCB Layout Visualization & MCADTraditional SPICE Simulators don’t
support micro-controllers !
May 9, 2016 8
Possible Solutions
• Use a Bus Functional Model (BFM) of the MCU– Encapsulates the bus functionality of a processor
• Can execute bus transactions on the processor bus (cycle accurate)• Cannot execute any instructions
– BFM is an abstract model of processor that can be used to verify how a processor interacts with its peripherals
SWSW HWHWHWSWC/C++ BFM
May 9, 2016 9
Possible Solutions
• Use an Instruction-Set Simulator (ISS)– Processor model capable of simulating the execution of
instructions– Different types of ISS for different purposes
• Usage 1: Verification of applications written in assembly-code– For fastest speed: translate target assembly instructions into host processor
instructions» Is not cycle-accurate. Specially for pipelined and superscalar
architectures
May 9, 2016 10
Possible Solutions
• Use an Instruction-Set Simulator (ISS)– Usage 2: Verification of timing and interface between
system components• Used in conjunction with a BFM• ISS should be timing-accurate in this usage
– ISS often works as an emulator– For performance estimation usage, ISS is to provide accurate
cycle-counting
May 9, 2016 11
Possible Solutions• What is a Carbon Model?
– A high performance software object– Generated by proprietary compiler
from synthesizable RTL design files– Contains cycle-accurate & register-
accurate description of hardware design
• Using a Carbon Model– Linked with gcc (or Microsoft VC++)– Libcarbon5.so & carbon_capi.h are part of
installation on Linux– Simulator communicates with hardware
model through sockets using carbon_capi.h
• However – execution speed is a major problem!
May 9, 2016 12
Proteus VSM is the AnswerSchematic with MCU Firmware Design
Measurement & Analysis Debugging & Diagnostics
Mixed Mode ProSPICE Simulation
May 9, 2016 13
+ Strong PCB Design Capability
10-15 db Gain, ~4k Cut-off Frequency
To analyze the circuit we’ll want to : Provide an input signal. Plot the output waveform. Change component values to tune the filter.
Simple Filter Breakout Board
May 9, 2016 14
Supported MCU Families
Freescale MC68HC11 family.
Atmel® ATTINY, ATMEGA and Cortex™-M3 families. Includes full Arduino support !
NXP ARM® LPC2000 family, ARM7TDMI, Cortex™-M0 and Cortex™-M3 models.
Microchip Technologies™ PIC10, PIC12, PIC16, PIC18, PIC24 & dsPIC33 families.
Generic 8051, 8052, NXP (P87C51xxx) and Atmel® (AT89Cxxx) families.
Proteus VSM Supports:
Texas Instruments™ MSP430® Family, Cortex™-M3/LM3S and PICCOLO™ TMS320.
May 9, 2016 15
Microcontroller ModelsProteus VSM Microcontroller Models:
Instruction Set Simulated All pin and I/O operations
All Timers in all modes UART/USART/EUSART
Interrupts and priorities (inc. VIC)
SPI / SSI in all modes
PSP or PMP in all modes MSSP in all modes
ADC inc. Voltage Ref. pins CCP/ECCP in all modes
I2C/TWI as master/slave Analog Comparator in all modes
External Memory Real Time Clock in all modes
Memory Accelerator Module PWM Module in all modes USB Device module CTMU, CLC, PPS and others.
May 9, 2016 16
The Peripheral Models Thousands of TTL, CMOS,
passives etc. Interactive models for POTs, switches, ...
Ethernet Controller Models OptoElectronic Models (LED, LCD, TFT, …)
Motor Control Models Memory Models
Temperature Control Models Real Time Clocks and Timekeeping
I2C / SPI Protocol peripherals 1-Wire Protocol peripheral models
RS232/RS485/RS422 Protocol ADC / DAC Converter Models
Pulse Width Control Models Power Management Models
Laplace Primitive Models Many, Many more…
May 9, 2016 17
Examples (1)Arduino AVR writing bitmap to TFT Display
May 9, 2016 18
Examples (2)
May 9, 2016 19
Examples (3)
May 9, 2016 20
Visual Designer Module – Firmware design with Flow-Chart!
Example - PIR Night Light
10uF1k
A2 21
43
Grove Luminance Sensor
2,3
1
APDS-9002
Grove LED
LED-GREEN
330
D3 21
43 A0 2
1
43 21.0
VO1 VCC3
GND2
GP2Y0A21YK0F
Grove Infrared Proximity Sensor
May 9, 2016 21
Example - TFT Display & SD Card
IM0IM1IM2IM3
RESCS
WR/D/CRD
TE
SDI/SDASDO
HSYNCVSYNCDOTCLK
DE
EXTC
D0D1D2D3D4D5D6D7D8D9D10D11D12D13D14D15D16D17
D/C/SCL
LEDKLEDA
LCD1
ILI9341
IO9
IO10SCK
MOSIMISO
IL9341 TFT Display
SD
Card
CS
DIDOCLK
SD1
SD
SCKMISOMOSI
IO4
SD Card
May 9, 2016 22
References
Dr. Rabi Mahapatra - Professor in the Department of Computer Science and Engineering at Texas A&M.
Labcenter Electronics Ltd:• www.labcenter.com• [email protected]
EngineeringIQ Israel – עצה הנדסית• Zvika Rozenshein צביקה רוזנשיין• www.eng-iq.com• [email protected]• (M) +972-52-6132275