Hardware/Software Co-Hardware/Software Co-Design Design
T S PRADEEPKUMART S PRADEEPKUMAR
SCS, VITSCS, VIT
T S PT S P 22
OutlineOutline
Embedded Hardware Embedded Hardware Embedded SoftwareEmbedded Software Issues in Embedded System DesignIssues in Embedded System Design Hardware/ Software PartioningHardware/ Software Partioning Designing Embedded SystemsDesigning Embedded Systems Co-DesignCo-Design
T S PT S P 33
Embedded SystemsEmbedded Systems
An embedded system An embedded system uses a computer to perform some function, butuses a computer to perform some function, but is not used (nor perceived) as a computeris not used (nor perceived) as a computer
Software is used for features and flexibilitySoftware is used for features and flexibility Hardware is used for performanceHardware is used for performance Typical characteristics:Typical characteristics:
it performs a single functionit performs a single function it is part of a larger (controlled) systemit is part of a larger (controlled) system cost and reliability are often the most cost and reliability are often the most
significant aspectssignificant aspects
T S PT S P 44
Embedded SystemsEmbedded Systems
Satellite
Macro-Cell Micro-Cell
Zone 2: UrbanZone 1: In-Building
Pico-Cell
Zone 4: Global
Zone 3: Suburban
Firmware
CORE
SOC IPBased Design
Software
SOC
µP/CAnalog
Embedded Software
Memory
Embedded System Design
SystemEnvironment
PCB Design
T S PT S P 55
Embedded HardwareEmbedded Hardware
InputInput SensorsSensors Sample and Hold CircuitSample and Hold Circuit A/D ConvertersA/D Converters
CommunicationCommunication UARTUART
Processing UnitsProcessing Units ASICASIC ProcessorsProcessors Reconfigurable processorsReconfigurable processors
T S PT S P 66
Embedded HardwareEmbedded Hardware
MemoriesMemories RAM, ROM, Flash, CacheRAM, ROM, Flash, Cache
OutputOutput D/A Converters,D/A Converters, ActuatorsActuators
T S PT S P 77
Embedded SoftwareEmbedded Software
Real Time Operating SystemsReal Time Operating Systems General RequirementsGeneral Requirements
Scheduling in RTOSScheduling in RTOS AperiodicAperiodic PeriodicPeriodic
Real Time DatabasesReal Time Databases Other Software ArchitecturesOther Software Architectures
Function Queue SchedulingFunction Queue Scheduling Round Robin (with Interrupts)Round Robin (with Interrupts)
T S PT S P 88
Issues while Designing ESIssues while Designing ES
Choosing Right platformChoosing Right platform Memory and I/O RequirementsMemory and I/O Requirements
WDT, Cache, Flash memory, etcWDT, Cache, Flash memory, etc Processors ChoiceProcessors Choice
PLCPLC Micro Controller or DSPMicro Controller or DSP ASIC or FPGAASIC or FPGA
T S PT S P 99
Issues…Issues…
Hardware Software TradeoffHardware Software Tradeoff Porting Issues of OS in the Target Porting Issues of OS in the Target
BoardBoard
T S PT S P 1010
Hardware /Software Hardware /Software PartitioningPartitioning
DefinitionDefinition A HW/SW partitioning algorithm A HW/SW partitioning algorithm
implements a implements a specificationspecification on some on some sort of sort of multiprocessor architecturemultiprocessor architecture
UsuallyUsually Multiprocessor architecture = one CPU Multiprocessor architecture = one CPU
+ some ASICs on CPU bus+ some ASICs on CPU bus
T S PT S P 1111
Hardware /Software Hardware /Software PartitioningPartitioning
TerminologyTerminology AllocationAllocation
Synthesis methods which design the Synthesis methods which design the multiprocessor topology along with the multiprocessor topology along with the Process Elements and SW architectureProcess Elements and SW architecture
SchedulingScheduling The process of assigning Process Element The process of assigning Process Element
(CPU and/or ASICs) time to processes to get (CPU and/or ASICs) time to processes to get executedexecuted
T S PT S P 1212
Hardware /Software Hardware /Software PartitioningPartitioning
Hw/Sw partitioning can speedup Hw/Sw partitioning can speedup softwaresoftware
Can reduce energy tooCan reduce energy too
In most partitioning algorithmsIn most partitioning algorithms Type of CPU is fixed and givenType of CPU is fixed and given ASICs must be synthesizedASICs must be synthesized
T S PT S P 1313
Designing of Embedded Designing of Embedded SystemsSystems
There are five stages of development of There are five stages of development of Embedded SystemsEmbedded Systems
• Requirement AnalysisRequirement Analysis• DesignDesign
• Data Structures, Software Architecture, Data Structures, Software Architecture, Interfaces and algorithmsInterfaces and algorithms
• CodingCoding• TestingTesting• MaintenanceMaintenance
T S PT S P 1414
Designing of Embedded Designing of Embedded SystemsSystems
There are three Design FlowsThere are three Design Flows• Waterfall ModelWaterfall Model• Spiral ModelSpiral Model• Successive refinementSuccessive refinement
For Designing, Unified Modeling For Designing, Unified Modeling Language (UML) is usedLanguage (UML) is used
T S PT S P 1515
Embedded System DesignEmbedded System DesignTraditional MethodologyTraditional Methodology
HW Design& Build
Hardware/SoftwarePartitioning and Allocation
SW Design& Code
InterfaceDesign
HW/SWIntegration
T S PT S P 1616
Problems with Past Design Problems with Past Design MethodMethod
Lack of unified system-level representationLack of unified system-level representation Can't verify the entire HW-SW systemCan't verify the entire HW-SW system Hard to find incompatibilities across HW-SW boundaryHard to find incompatibilities across HW-SW boundary
(often found only when prototype is built) (often found only when prototype is built)
Architecture is defined Architecture is defined a prioria priori, based on expert , based on expert evaluation of the functionality and constraintsevaluation of the functionality and constraints
Lack of well-defined design flowLack of well-defined design flow Time-to-market problemsTime-to-market problems Specification revision becomes difficultSpecification revision becomes difficult
T S PT S P 1717
Embedded System DesignEmbedded System DesignHW/SW Co-Design MethodologyHW/SW Co-Design Methodology
HW Design& Build
Hardware/SoftwarePartitioning and Allocation
SW Design& Code
InterfaceDesign
HW/SWIntegration
T S PT S P 1818
Co-Design FrameworkCo-Design Framework
T S PT S P 1919
Co-DesignCo-Design
The software functionality should be The software functionality should be partitioned in such a fashion that partitioned in such a fashion that processors in the system do not get processors in the system do not get overloaded when the system is overloaded when the system is operating at peak capacity. operating at peak capacity.
This involves simulating the system This involves simulating the system with the proposed software and with the proposed software and hardware architecture. hardware architecture.
T S PT S P 2020
Co-DesignCo-Design
The system should be designed for The system should be designed for future growth by considering a scalable future growth by considering a scalable architecture, i.e. system capacity can architecture, i.e. system capacity can be increased by adding new hardware be increased by adding new hardware modules. The system will not scale modules. The system will not scale very well if some hardware or software very well if some hardware or software module becomes a bottleneck in module becomes a bottleneck in increasing system capacity. increasing system capacity.
T S PT S P 2121
Co-DesignCo-Design
Software modules that interact very Software modules that interact very closely with each other should be closely with each other should be placed on the same processor, this placed on the same processor, this will reduce delays in the system.will reduce delays in the system.
Higher system performance can be Higher system performance can be achieved by this approach by inter-achieved by this approach by inter-processor message communication.processor message communication.
T S PT S P 2222
Embedded Controller Example:Embedded Controller Example:Engine Control Unit (ECU)Engine Control Unit (ECU)
Task: control the torque produced by the engine
by timing fuel injection and spark
Major constraints:Major constraints:
Low fuel consumptionLow fuel consumption
Low exhaust emissionLow exhaust emission
T S PT S P 2323
ECU ECU Task: control injection time (3 sub-tasks)
computeair flow compute
injectiontime drive
actuators
airflow
injectiontime
air temperature
engine temperature
engine speed
throttle position
look-up table
PWM signalsair pressure
T S PT S P 2424
32 bit CPU
A/DActuations (PWM)
Analog inputs
Digital inputs
ECU- Option 1ECU- Option 1
computeair flow
computeinjection
timedrive
actuators
airflow
injectiontime
air temperature
engine temperature
engine speed
throttle position
look-up table
PWM signalsair pressure
T S PT S P 2525
16 bit CPU
A/D
Actuations (PWM)
Analog inputs
Digital inputs
FPGA
ECU- Option 2ECU- Option 2
computeair flow
computeinjection
timedrive
actuators
airflow
injectiontime
air temperature
engine temperature
engine speed
throttle position
look-up table
PWM signalsair pressure
T S PT S P 2626
8 bit CPUDSP
Actuations (PWM)
Analog inputs
Digital inputs
FPGAA/D
ECU- Option 3ECU- Option 3
computeair flow
computeinjection
timedrive
actuators
airflow
injectiontime
air temperature
engine temperature
engine speed
throttle position
look-up table
PWM signalsair pressure
T S PT S P 2727
Thank YouThank You
Top Related