Chapter2 Design Architecture
Chapter2 Design Architecture
and Architecture
Tien Pham Van, Dr. rer. nat.
Hanoi University of Science and Technology
Compiled with reference to other presentations
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Outlines
• Specification
• System architecture
• Co-design
• Hardware components
• Modeling languages and tools
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Parts of an Embedded System
I/O
MEMORY PROCESSOR
HARDWIRED UNIT
• Application-specific logic
• Timers
• A/D and D/A conversion
ENVIRONMENT
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Design flow: inside a tool
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Co-design: Complex Systems
• Abstraction
– Reduce the number of objects managed by a
design task, e.g., by grouping objects using
hierarchy
– Computer-aided design (CAD) example
• Logic level: transistors grouped into gates
• Register transfer level (RTL): gates grouped into
registers, ALUs, and other RTL components
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Generic Co-Design Methodology
Synthesis model
• Specification Analysis
• Allocation task &
• Partitioning Validation
• Scheduling
Note: design
models may
• Communication be captured
synthesis in the same
language
Implementation
• Software synthesis
• Hardware synthesis
• Interface synthesis
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
• Hardware and Software Co Design - System
Integration - Embedded System & RTOS -
YouTube
https://www.youtube.com/watch?v=w-KHW7ZxMW8
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
System Specification
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
System Specification Example
B0: top
shared sync
behavior
• integer read child
write
variable behavior
• boolean
variable
sync
Graphical
representation:
• Hierarchy
• Concurrency Behaviors
• Transitions • Sequential: B1, B2, B3
between • Concurrent: B4, B5
behaviors • Atomic: B1
Embedded Networking Research Group
• Composite: B2
School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
System Specification Example (cont.)
• B6 computes a
value
• B4 consumes the
value sync
• Synchronization
is needed: B4
waits until B6
produces the
value
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
System Specification Example
• Atomic behaviors
B1( ) B3( ) B7( )
{ { {
stmt; stmt; stmt;
... ... ...
} } }
B6( ) B4( )
{ {
int local; int local;
… wait(sync);
shared = local + 1; local = shared - 1;
signal(sync); ...
} }
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Allocation
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Allocation Example
PE1 PE2
system bus
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Partitioning
PE0 PE1
controlling Child (B1)
B1_start
behavior B1_ctrl assigned to
B1_done different PE
than
B4_start parent (B0)
B4_ctrl
B4_done
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Scheduling
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Scheduling
• Ordering information
– Known at compile time
• Static scheduling
• Higher inter-PE synchronization overhead if inaccurate
performance estimation, i.e., longer wait times and
lower CPU utilization
– Unknown until runtime (e.g., data-, event-
dependent)
• Dynamic scheduling
• Higher context-switching overhead (running task
blocked, new task scheduled)
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Scheduling Example
Scheduling
decision:
• Sequential
B6_start
ordering of
behaviors
sync
on PE0, PE1
• Synchronization
B3_start
to maintain
partial order
across PEs
• Optimization - no
control behaviors
System model after static scheduling
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Scheduling Example (cont.)
• Atomic behaviors
B1( ) B3( ) B7( )
{ { {
… wait(B3_start); stmt;
signal(B6_start); ... ...
} } }
B6( ) B4( )
{ {
int local; int local;
wait(B6_start); wait(sync);
… local = shared - 1;
shared = local + 1; …
signal(sync); signal(B3_start);
} }
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Communication Synthesis
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Communication example
decision:
PE0 PE1
• Put all
global B6
Shared_mem
B1
variables
Arbiter
into B7
Shared_mem
B4
• New global B3
variables in Top
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Communication Example (cont.)
• Atomic behaviors
B1( ) B3( ) B7( )
{ { {
… wait(*B3_start_addr); stmt;
signal ... ...
(*B6_start_addr); }
}
}
B6( ) B4( )
{ {
int local; int local;
wait (*B6_start_addr); wait (*sync_addr);
… local = *shared_addr - 1;
*shared_addr = local + 1; …
signal(*sync_addr); signal (*B3_start_addr);
} }
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Communication Example (cont.)
• Atomic behaviors
IF0( ) IF1( ) IF2( ) Arbiter( )
{ { { {
stmt; stmt; stmt; stmt;
... ... ... ...
} } } }
Shared_mem( )
{
int shared;
bool sync;
bool B3_start;
bool B6_start;
}
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Implementations
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
RTL
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
High level synthesis
• https://youtu.be/gTuWkoOq1k0?t=481
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Case study – Xilinx HLS
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Hardware Component Design
Reference to “Embedded System Design”, by
Peter Marwedel
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Overview
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Block diagram
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Inputs
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Processing unit – hardware tech
• ASIC: high energy-efficient, high cost of designing
and manufacturing, less flexible
– MPW (multi-project wafer) may decrease a bit, but hard
to correct errors
• Reconfigurable logic: FPGA, CLPD
• Processors and controllers
– ARM, MIPS, x86/ATOM
– Multi-core
– DSP
– VLIW
– GPU
– MPSoC
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Processors
• Flexibly programmable
• Less energy-efficiency than ASIC
• Off-the-shelf (COTS)
• Diverse (as presented earlier) to meet various
applications
• Well-know families: X86/ATOM, ARM, MIPS,
PowerPC, DSP
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
• Types of Processor, Units of Processor,
Classifications of Processor, Embedded
System - YouTube
https://www.youtube.com/watch?v=obknO3gA92E
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
ARM case study
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Energy efficiency
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Code size efficiency - compression
• ARM design:
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Execution time efficiency
• To reduce execution time without increasing clock speed.
Output element xs corresponds to a weighted average over the last n signal
elements of w and can be computed iteratively, adding one product at a time.
Processors for DSP are designed such that each iteration can be encoded as a
single instruction.
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Very long instruction word – VLIW processors
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Multi-core
• Multiple cores are integrated into a single die
• Cache: L1 is private, L2 is shared
• Cores can be homo- or heterogeneous
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Graphics Processing Unit - GPU
• To run a large number of computations concurrently in order to achieve
the desired performance.
• GPU runs many fine-grained threads at the same time. If some thread
gets blocked, e.g., due to waiting for memory, the core will execute some
other thread.
• The instructions contained in a thread can also be executed concurrently,
e.g., by using multiple pipelines.
SIMD: single instruction
multiple data
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
MPSoC (multiprocessor SoC)
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Microcontrollers
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Microcontrollers - components
• central processing unit: 4-bit processors to complex 32-bit or 64-bit
• volatile memory (RAM) for data storage
• ROM, EPROM, EEPROM or Flash memory for program and operating
parameter storage
• discrete input and output bits, allowing control or detection of the logic
state of an individual package pin
• serial input/output such as serial ports (UARTs)
• other serial communications interfaces like I²C, Serial Peripheral
Interface and Controller Area Network for system interconnect
• peripherals such as timers, event counters, PWM generators, and
watchdog
• clock generator – often an oscillator for a quartz timing crystal, resonator
or RC circuit
• many include analog-to-digital converters, some include digital-to-analog
converters
• in-circuit programming and in-circuit debugging support
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Reconfigurable logic
• Harmonized between slow software solutions and expensive
ASIC
• FPGA is the most popular, beside CPLD
• Be suitable for:
– Fast prototyping
– Low-volume apps
– Real-time systems
– Enhanced level of parallel processing
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
A close-up view
CLB
Switchbox Routing
Channel
IOB
Channel
Routing
Configuration
Bit
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Configurable logic
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Memory
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Memory - cache
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Cache
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Communication
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Typical communication means
• Sensor/actuator bus
• Field bus:
– Controller Area Network (CAN): inexpensive connectivity between
controllers and peripherals; widely used in automotive industry and
later in smart home; based on differential signaling and arbitration
using CSMA/CA (hence starvation possibly occurs)
– Time-Triggered Protocol (TTP): This is a protocol for fault-tolerant
safety systems like airbags in cars
– FlexRay™: a TDMA protocol developed by the FlexRay consortium
(BMW, Daimler AG, GM, Ford, Bosch, Motorola, and Philips)
– LIN (Local Interconnect Network): This is a low-cost communication
standard for connecting sensors and actuators in the automotive
domain
– MAP: MAP is a bus designed for car factories
– EIB: The European Installation Bus (EIB) is a bus designed for smart
homes.
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Typical communication means
• The Inter-Integrated Circuit (I2C) Bus : This is a simple low-
cost bus designed to communicate at short distances (meter
range) with relatively low data rates. The bus needs only four
wires: ground, SCL (clock), SDA (data), and a voltage supply
line
• Wired multimedia communication: For wired multimedia
communication, larger data rates are required. For example,
MOST (Media Oriented Systems Transport) is a
communication standard for multimedia and infotainment
equipment in the automotive domain. Standards like IEEE
1394 (FireWire) may be used for the same purpose
• Wireless communication: This kind of communication is
becoming more popular. Popular interfaces include cellular,
LoRA, Bluetooth, ZigBee, etc
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Outputs
• Display: Organic displays are emitting light
and can be fabricated with very high
densities. In contrast to LCDs, they do not
need backlight and polarizing filters. Major
changes are therefore expected in these
markets
• Electro-mechanical devices: These influence
the environment through motors and other
electro-mechanical equipment
– Actuators can be a huge motors to microsystems
• Key techniques:
– DAC: not easy to integrate into digital chips
– PWM: output voltage depends on values stored in
registers
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Energy matters
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Embedded Modeling: tools
and languages
Reference to “Embedded System Design”,
by Peter Marwedel
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Model concept
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Required capabilities of modeling languages
• Behavioral and structural hierarchy
• Component-based design
• Concurrency
• Synchronization and communication
• Timing behaviors
• State/exception-oriented behavior von Neumann MoC is
composed of tasks,
• Presence of programming elements process and threads
• Executability with communications,
which has no timing
• Portability and flexibility description
• Termination
• Support for the design of dependable systems (e.g. formal
verification)
• Appropriate model of computation (MoC) – not von Neumann MoC
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
MoC
• MoC defines:
– components and their organization of computations, e.g. procedures,
processes, functions, and finite state machines
– communication protocols: describe methods for communication between
components, e.g. asynchronous message passing and rendezvous-based
communication
• Relations between components are represented in task graphs
and process networks
– Nodes represent computations
– Edges represent relations between components: causal dependence,
timing, information exchange, etc
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
MoC - what task graph includes
• Timing information: arrival time, execution time, deadline…
• Types of relations between computations: precedence, I/O, etc
• Exclusive access to resources
• Periodic schedules, e.g. DSP
• Hierarchical graph nodes
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
MoC – communication fashions
• Shared memory
– Fast but difficult in multiprocessor system without common physical
memory
– Critical sections must be identified
• Message passing
– Loosely coupled processors
– Three kinds: blocking, non-blocking, and extended rendezvous/remote
invocation
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
MoCs and languages
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Early phase design – Use Case
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Early phase design – Sequence Charts and
Time/Distance Diagrams
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Early phase design – Differential Equation
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Communicating Finite State Machines (CFSMs) -
StateCharts – for shared mem. comm.
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Communicating Finite State Machines (CFSMs) -
SDL for message-based com.
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Data Flow – Kahn Process Network
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Data Flow – SDF (static data flow)
• A directed graph that facilitates scheduling and buffer calculation
– Node: actor
– Edge: token
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Data Flow –Simulink
• Computational graph structures are also frequently used in
control engineering.
– An approach of model-based design
– Analog blocks included
– Ideal timing (fast) model is assumed
– Code generation for various language implementation: C, VHDL...
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Control Flow – Petri Nets
• Very comprehensive descriptions of control flow. Conditions,
events, and a flow relation are the key elements. An event is
associated with pre- and post-condition
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Activity Diagram
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Discrete event-based languages - TLM
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Discrete event-based languages - TLM
• A: untimed model/specification model; B: component assembly model
• C: bus arbitration model; D: bus functional model
• E: cycle-accurate computation model; F: implementation model
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
TLM – Spec C
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
TLM – SystemC
• TLM modeling and the separation
between communication and
computation are also available in
SystemC™. Similar to SpecC, SystemC
provides channels, ports, and
interfaces as abstract components for
communication
• System C comprises a notion of
processes executed concurrently.
P&R: Place & Route
Their execution is controlled by calls to
wait primitives and sensitivity lists
(lists of signals for which value
changes start a re-execution of code)
• Hardware synthesis starting from
SystemC has become available
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
SystemC
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Discrete Event-Based Languages – VHDL
• VHDL is another HDL which is based on the discrete event paradigm.
Unfortunately, it does not support a clear distinction between
communication and computation, and reusing components is more
difficult
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Discrete Event-Based Languages – [System]Verilog
• Much like VHDL. Verilog versions 3.0 and 3.1 are also known as
SystemVerilog. They include numerous extensions to Verilog 2.0:
– additional language elements for modeling behavior,
– C data types such as int and type definition facilities such as typedef and
struct,
– definition of interfaces of hardware components as separate entities,
– standardized mechanism for calling C/C++ functions and, to some extent, to
call built-in Verilog functions from C,
– significantly enhanced features for describing an environment (called test
bench) for the hardware circuit under design (called CUD), and for using the
test bench to validate the CUD by simulation,
– classes known from object-oriented programming for use within test
benches,
– dynamic process creation, standardized interprocess communication and
synchronization, including semaphores,
– automatic memory allocation and deallocation,
– language features that provide a standardized interface to formal
verification
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
von Neumann languages
• CSP (communicating sequential processes) is one of the first languages
comprising mechanisms for interprocess communication
• ADA is the language to address dependability and maintainability, with
all software written in the same real-time programming
• Communication libraries:
– MPI (message passing interface)
– OpenMP
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Levels of Hardware Modeling
• System-level models: represents both embedded system and the
environment. Examples are VHDL-AMS, Verilog-AMS SystemC-AMS, etc
• Algorithmic level: simulates algorithms run on the system, e.g. H26x
• Instruction set level: works on compiled algorithm, counts instructions
execution time
• RTL level: models all the RTL components, including arithmetic/logic units
(ALUs), registers, memories, multiplexers, and decoders
• Gate level: provides more accurate information about signal transition
probabilities, power estimations and delay
• Circuit model: works on circuit theory and its components e.g. current and
voltage sources, resistors, capacitances, inductances, etc. Simulations
involve partial differential equations
• Layout models: reflects the actual circuit layout. Such models include
geometric information
• Process and device models: represents model fabrication process
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Comparison of languages and tools
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Combination of multiple languages and tools
Embedded Networking Research Group School of Elec. and Telecom - Hanoi University of Science and Technology
Email: [email protected] C9-411, Dai Co Viet str. 1, HBT, Hanoi Tel: +84-243-8693596
Unified Modeling Language - UML
• A language includes diagrams representing many models of
computations