Professional Documents
Culture Documents
CPS Qa
CPS Qa
What is RISC-V?
Now we have an understanding of the differences between RISC and CISC architecture, let’s
complicate things by introducing RISC-V. The electronics industry seems to have gone crazy for
RISC-V (pronounced ‘risk-five’), but why?
RISC-V, like RISC and CISC, is an instruction set architecture (ISA). However, it is an open and free
ISA. That means anyone can contribute to its development and it doesn’t cost a penny to use.
This is significant because it allows smaller device manufacturers to build hardware without
having to pay royalties.
RICS-V has been designed to have a small, fixed-based ISA along with modular, fixed standard
extensions that work well with the majority of code. That leaves plenty of room for application-
specific extensions to create custom processors for specific workloads.
The benefits of RICS-V over conventional RICS and CISC architecture include:
1. Flexibility - The ability to customise the processor allows engineers to configure chipsets to be
big, small, powerful or lightweight, depending on the specific requirements of a device.
2. Innovation - Companies can implement the minimal instruction set and use custom extensions
and defined extensions to create processors for cutting-edge tools.
3. Reduced costs and faster to market - The reuse of open-source intellectual property helps to
reduce the cost of development and enables companies to get their design to market more
quickly.
Levels of memory:
• Level 1 or Register –
It is a type of memory in which data is stored and accepted that are
immediately stored in CPU. Most commonly used register is accumulator,
Program counter, address register etc.
• Level 2 or Cache memory –
It is the fastest memory which has faster access time where data is temporarily
stored for faster access.
• Level 3 or Main Memory –
It is memory on which computer works currently. It is small in size and once
power is off data no longer stays in this memory.
• Level 4 or Secondary Memory –
It is external memory which is not as fast as main memory but data stays
permanently in this memory.
Cache Performance:
When the processor needs to read or write a location in main memory, it first checks for
a corresponding entry in the cache.
• If the processor finds that the memory location is in the cache, a cache hit has
occurred and data is read from cache
• If the processor does not find the memory location in the cache, a cache
miss has occurred. For a cache miss, the cache allocates a new entry and
copies in data from main memory, then the request is fulfilled from the
contents of the cache.
The performance of cache memory is frequently measured in terms of a quantity
called Hit ratio.
Hit ratio = hit / (hit + miss) = no. of hits/total accesses
We can improve Cache performance using higher cache block size, higher associativity,
reduce miss rate, reduce miss penalty, and reduce the time to hit in the cache.
Cache Mapping:
There are three different types of mapping used for the purpose of cache memory which
are as follows: Direct mapping, Associative mapping, and Set-Associative mapping. These
are explained below.
1. Direct Mapping –
The simplest technique, known as direct mapping, maps each block of main
memory into only one possible cache line. or
In Direct mapping, assign each memory block to a specific line in the cache. If a
line is previously taken up by a memory block when a new block needs to be
loaded, the old block is trashed. An address space is split into two parts index
field and a tag field. The cache is used to store the tag field whereas the rest is
stored in the main memory. Direct mapping`s performance is directly
proportional to the Hit ratio.
2. i = j modulo m
3. where
4. i=cache line number
5. j= main memory block number
m=number of lines in the cache
For purposes of cache access, each main memory address can be viewed as
consisting of three fields. The least significant w bits identify a unique word or
byte within a block of main memory. In most contemporary machines, the
address is at the byte level. The remaining s bits specify one of the 2s blocks of
main memory. The cache logic interprets these s bits as a tag of s-r bits (most
significant portion) and a line field of r bits. This latter field identifies one of the
m=2r lines of the cache.
6. Associative Mapping –
In this type of mapping, the associative memory is used to store content and
addresses of the memory word. Any block can go into any line of the cache.
This means that the word id bits are used to identify which word in the block is
needed, but the tag becomes all of the remaining bits. This enables the
placement of any word at any place in the cache memory. It is considered to
be the fastest and the most flexible mapping form.
7. Set-associative Mapping –
This form of mapping is an enhanced form of direct mapping where the
drawbacks of direct mapping are removed. Set associative addresses the
problem of possible thrashing in the direct mapping method. It does this by
saying that instead of having exactly one line that a block can map to in the
cache, we will group a few lines together creating a set. Then a block in
memory can map to any one of the lines of a specific set..Set-associative
mapping allows that each word that is present in the cache can have two or
more words in the main memory for the same index address. Set associative
cache mapping combines the best of direct and associative cache mapping
techniques.
In this case, the cache consists of a number of sets, each of which consists of a
number of lines. The relationships are
m=v*k
i= j mod v
where
i=cache set number
j=main memory block number
v=number of sets
m=number of lines in the cache number of sets
k=number of lines in each set
Application of Cache Memory –
1. Usually, the cache memory can store a reasonable number of blocks
at any given time, but this number is small compared to the total
number of blocks in the main memory.
2. The correspondence between the main memory blocks and those in
the cache is specified by a mapping function.
Types of Cache –
3. Primary Cache –
A primary cache is always located on the processor chip. This cache
is small and its access time is comparable to that of processor
registers.
4. Secondary Cache –
Secondary cache is placed between the primary cache and the rest
of the memory. It is referred to as the level 2 (L2) cache. Often, the
Level 2 cache is also housed on the processor chip.
Locality of reference –
Since size of cache memory is less as compared to main memory. So to check
which part of main memory should be given priority and loaded in cache is
decided based on locality of reference.
Types of Locality of reference
5. Spatial Locality of reference
This says that there is a chance that element will be present in the
close proximity to the reference point and next time if again
searched then more close proximity to the point of reference.
6. Temporal Locality of reference
In this Least recently used algorithm will be used. Whenever there is
page fault occurs within a word will not only load word in main
memory but complete page fault will be loaded because spatial
locality of reference rule says that if you are referring any word next
word will be referred in its register that’s why we load complete
page table so the complete block will be loaded.
1. SRAM
2. DRAM
3. Masked ROM
4. PROM
5. EPROM
6. EEPROM
7. flash memory and
8. NVRAM
SoC Advantages
• Essentially the great benefits of using an SoC are: power saving, space saving and cost reduction
• SoCs are also much more efficient as systems as their performance is maximized per watt
• Systems on chip also tend to minimize the latency provided the various elements are strategically
placed on the motherboard in order to minimize interference and interconnection delays as well
as speed up the data transmission process
SoC Vs CPU
Gone are the days where the CPU used to be the primary and most significant part of
the entire computing system. Now, the CPU is only part of the equation that
ultimately adds up to being a system on chip. An SoC combines the power of the CPU
with several other components that it needs to perform and execute its functions.
The reason why SoCs are increasingly being preferred over simple CPU systems is
because despite being almost the same side in regards to the motherboard, an SoC
packs twice the power and capability. The CPU will still rely on several other external
hardware whereas an SoC has space for all you want to add on its negligible chip.
Compared to CPUs, SoCs also use shorter wiring and subsequently expends less
power, making it much more efficient and energy smart. The only problem that you
can argue against the SoC is the fact that compared to a CPU system, it is rather
upgrading and repairing. Where you can easily replace and use new components such
as a RAM or a GPU with a CPU, doing so is much more complicated a process with an
SoC. In fact, it is near impossible to make changes to a system on chip once it has
been manufactured, meaning if it is damaged or needs to be updated, you are better
off making a new one rather than even attempting to repair or upgrade it.
important applications of the Internet
of Things (IoT)
1. Wearables.
Virtual glasses, fitness bands to monitor for example calorie expenditure and heart
beats, or GPS tracking belts, are just some examples of wearable devices that we have
been using for some time now. Companies such as Google, Apple, Samsung and
others have developed and introduced the Internet of Things and the application
thereof into our daily lives.
These are small and energy efficient devices, which are equipped with sensors, with
the necessary hardware for measurements and readings, and with software to collect
and organize data and information about users.
2. Health.
The Internet of things can be very useful in the management of vehicular traffic in
large cities, contributing to the concept of smart cities.
When we use our mobile phones as sensors, which collect and share data from our
vehicles through applications such as Waze or Google Maps, we are using the Internet
of Things to inform us and at the same time contribute to traffic monitoring, showing
the conditions of the different routes, and feeding and improving the information on
the different routes to the same destination, distance, estimated time of arrival.
4. Fleet management.
5. Agriculture.
Smart farms are a fact. The quality of soil is crucial to produce good crops, and the
Internet of Things offers farmers the possibility to access detailed knowledge and
valuable information of their soil condition.
Through the implementation of IoT sensors, a significant amount of data can be
obtained on the state and stages of the soil. Information such as soil moisture, level of
acidity, the presence of certain nutrients, temperature and many other chemical
characteristics, helps farmers control irrigation, make water use more efficient,
specify the best times to start sowing, and even discover the presence of diseases in
plants and soil.
6. Hospitality.
The application of the IoT to the hotel industry brings with it interesting
improvements in the quality of the service. With the implementation of electronic
keys, which are sent directly to the mobile devices of each guest, it is possible to
automate various interactions.
Thus, the location of the guests, the sending of offers or information on activities of
interest, the realization of orders to the room or room service , the automatic charge
of accounts to the room or the request of personal hygiene supplies, are activities
that can be easily managed through integrated applications using the Internet of
Things technology.
With the use of electronic keys, the check-out process is automated, disabling the
operation of doors, offering information about the rooms immediately available, and
even assigning housekeeping tasks to maintenance personnel.
The progressive use of intelligent energy meters, or meters equipped with sensors,
and the installation of sensors in different strategic points that go from the
production plants to the different distribution points, allows better monitoring and
control of the electrical network.
By establishing a bidirectional communication between the service provider company
and the end user, information of enormous value can be obtained for the detection of
faults, decision making and repair thereof.
It also allows offering valuable information to the end user about their consumption
patterns and about the best ways to reduce or adjust their energy expenditure.
8. Water supply.
9. Maintenance management.
One of the areas where the application of IoT technology is most extensive is precisely
maintenance management. Through the combination of sensors
and software specialized in CMMS/ EAM maintenance management, a multifunctional
tool is obtained whose use can be applied to a multiplicity of disciplines and
practices, with the purpose of extending the useful life of physical assets, while
guaranteeing asset reliability and availability.
When the characteristics of the software in charge of processing and arranging the
data collected by the sensors are designed to specifically address the maintenance
management needs of physical assets, their application is almost unlimited.
The real-time monitoring of physical assets allows determining when a measurement
is out of range and it is necessary to perform condition-based maintenance (CBM), or
even applying Artificial Intelligence (AI) algorithms such as Machine Learning or Deep
Learning to predict the failure before it happens.
IoT Design Essentials
he real measure of success for IoT design is to pack these previously
discussed technologies into a single compact device. This device should be
cost-effective and might even need additional capabilities for digital signal
processing, natural user interface processing, control operations, or analog
sensing.
There is a constant push to make IoT devices with improved performance,
power efficiency, higher range, and reduced size. A device may contain a
CPU, memory, graphics, processing, and wireless circuitry. In order to create
the smallest device possible, many of these elements can be put onto a single
system on chip (SoC)–but not all.
Due to the need for space-saving, the critical difference for IoT design is
having the entire product or board designed as a single unit, as opposed to
many smaller individual boards like in the past. This will require working
closely with mechanical designers to ensure that signal integrity, thermal
management, and size are all accounted for.
When designing IoT, keep in mind that sensors and ICs are rapidly evolving.
The chips used on a product might become out-of-date faster than you think.
For this reason, compartmentalize the design with sub-circuits, which allows
for a systematic approach and makes updating parts on the circuit easier.
Consider each sub-circuit input and output and how they integrate into the
larger device as a whole.
Battery Power
One of the best ways to conserve battery power is to turn off portions of
your device when not in use. To do this, divide the PCB into functional blocks,
and for each block, allocate an appropriate power consumption budget.
Choose power regulating ICs that meet your specs and ensure that each
block of your design stays within its allocated budget.
Memory
The memory module of your IoT device will also consume power–choosing
the right memory is important in staying within the power budget. For
example, in using direct memory access (DMA), you’ll have better power
savings but lose some latency and throughput compared to dynamic random
access memory (DRAM).
Avoid energy wastage from long PCB traces or numerous vias. Going from
one plane to another can contribute to unnecessary losses on your board.
Precise power budget calculations and efficient power delivery networks will
increase the longevity of your device. Use a precise power network analysis
tool to get an accurate picture of your device's efficiency before
manufacturing and testing.
Wireless Design for IoT
Your device will be connected to the rest of the world wirelessly, likely
through WiFi, Bluetooth, or some of the other previously mentioned
modalities. Therefore, it’s important to familiarize yourself with
various wireless network protocols.
Keep in mind that governments regulate the usage of the radio frequency
spectrum, and certain frequency bands are allocated for specific purposes.
WiFi operates most commonly at the 2.4 GHz frequency, NFC at 13.56 MHz,
and other RF protocols at their own frequency. For this reason, utilizing an
off-the-shelf wireless module that already meets government and industry
regulations can be purchased and incorporated into your design.
Antenna design is also another crucial aspect–when designing your PCB,
consider the orientation, gain, and directivity of your antenna, then select an
antenna that matches the desired form factor. The Z-Wave mesh network
topology can support hundreds of devices; for example, Sigfox uses the new
ultra-narrow band (UNB) for radio message exchange
IoT Protocols
IoT protcols help to establish Communication between IoT Device (Node Device) and Cloud
based Server over the Internet. It help to sent commands to IoT Device and received data from
an IoT device over the Internet. An image is given below. By this image you can understand
which protocols used.
Noise
Your device will be operating among all the other devices using their own
wireless communication standards. For this reason, noise can become a
larger factor. Devices will spend most of their time in idle or standby modes
and only briefly turn communications on for transmission and reception for
short bursts. Familiarize yourself with methods of dealing with RF EMI and
incorporate them into your design.
Temperature
Connectivity
Connectivity is the one absolutely necessary component of any IoT
development effort. And, on a very basic level, an IoT platform can be as
simple as a software infrastructure enabling and overseeing the
connectivity between objects in the physical world.
Within today’s complex connectivity environment, solid connectivity
management will allow the secure and effortless incorporation of
diverse IoT devices as well as the administration of multi-protocol &
multi-network connections.
Other than that, every IoT platform has a connectivity layer that enables
a variety of services. These include but are not limited to data collection,
monitoring & control, as well as the management of assets.
Application development
A recent thing in the world of IoT platforms is the ability to code directly
in a cloud IDE fully integrated into the platform environment. Platforms
such as Portainer.io, Particle.io, and Record Evolution make it possible to
write apps and deploy them in seconds while getting live feedback from
the device and observing app performance. Over-the-air development
(OTA) is currently offered by the fewest IoT platforms and is especially
well received in the developer community.
• Raspberry Architecture
The ARMv8-A architecture, which encompas s es the 64-bit AArch64
architecture and as s ociated A64 ins truction s et, was firs t introduced into the
Ras pberry Pi line with Ras pberry Pi 3 in 2016. From that point on, it has been
pos s ible to run a full 64-bit operating s ys tem on our flags hip products , and
many third-party operating s ys tems are available. However, we have
continued to build our Ras pberry Pi OS releas es on the 32-bit Ras pbian
platform, aiming to maximis e compatibility between devices and to avoid
cus tomer confus ion.
About BME688 - gas scanner with AI, air quality sensor, temp., hum. and pres.
sensor
BME688 ( manufactured by Bosch Sensortec) is the first gas sensor with Artificial Intelligence
(AI) and integrated high-linearity and high-accuracy humidity and temperature sensors. The
integrated gas sensor it's able to detect Volatile Organic Compounds (VOCs), Volatile Sulfur
Compounds (VSCs) and other gases as carbon monoxide (CO) and hydrogen in the ppb (part per
billion) range.
The new BME 688 sensor its backward compatible with BME680. Additionally, to all features of the
BME680, the BME688 has a gas scanner function. In standard configuration, the presence of VSCs is
detected as indicator for e.g. bacteria growth. The gas scanner can be customized with respect to
sensitivity, selectivity, data rate and power consumption as well. The BME AI-Studio tool enables
customers to train the BME688 gas scanner on their specific application, like in home appliances, IoT
products or Smart Home.
The gas sensor in the BM688 has a broad sensitivity and reacts to most volatile compounds as well as
many other gases polluting indoor air. The intensity of the signal typically scales with the chemical
reactivity of the gases. In contrast to sensors selective for one specific component, the BME688 is
capable of measuring the sum of VOCs/contaminants in the surrounding air. This enables the BME688
to detect e.g. out-gassing from paint, furniture and/or garbage, high VOC levels due to cooking, food
consumption, exhaled breath and/or sweating.
The BME688 I2C sensor breakout it's shipped in default auto 3-5V compliant configuration. In a nut
shell, wire as bellow:
1. Wireless network systems are easy to set up, cheaper to install and also
maintain.
2. Information (data, videos, etc.) is transferred quickly and faster.
3. Low maintenance and installation cost compared to wired networks.
4. Advanced coverage. You can access the wireless technologies
anywhere at any time.
5. They are no more carrying wires and cables to get the connection.
6. Enables professionals to work anywhere remotely.
7. Emergencies can now be sorted out quickly with wireless
communication. Immediate support is rendered via cellular networks.
8. You can carry and re-install anywhere, anytime.
9. Wireless technologies are more adaptable to new environments than
wired networks.
Disadvantages
1. It’s less secure. This is because communication is practiced via open
space.
2. Unreliability/undependable. Wireless technologies are prone to signal
interference, radiation, etc.
3. They have an increased chance of jamming.
4. Speed varies to the user’s location in relation to the network.
5. Radio signals have a limited range.
• The transmitter
It has an encoder that receives information from the source and converts it
into a readable signal. The info is then encrypted by an Encryption standard
then transferred to an Encoder. The Encoder minimizes faults in the
information like noise to get a modulated signal. It’s then multiplexed and sent
to the channel.
• The Channel
• The Receiver
It’s work is to reproduce the source information signal after receiving it from
channel. The receiver undoes what the transmitter did, and that’s why the
receiver path has the demultiplexing, demodulation, channel decoding,
decryption, and source decoding.
Difference between COAP and MQTT protocols
CoAP, MQTT, AMQP, XMPP & DDS: Which Prot ocol Should You
Choose for IoT?
Th e g e n e ra l fo rm u la fo r h o w t e le c o m m u n ic a t io n s a re e st a b lish e d is
re p re se n t e d g lo b a lly b y t h e O SI (O p e n Syst e m s In t e rc o n n e c t io n ) Mo d e l.
Th e m o d e l d ivid e s t h e st ru c t u re in t o 7 d iffe re n t la ye rs, a s sh o w n in t h e
fig u re b e lo w .
Th e a p p lic a t io n la ye r c o m m o n ly u se d fo r Io T a p p lic a t io n s in c lu d e :
• Co AP
• MQ TT
• AMQ P
• XMP P
• DDS
An o t h e r a p p lic a t io n la ye r t h a t ’s c o m m o n ly u se d in t e le c o m m u n ic a t io n
syst e m s is HTTP o r Hyp e rTe xt Tra n sp o rt P ro t o c o l. Ho w e ve r, it is
a rg u a b ly n o t su it a b le fo r Io T a p p lic a t io n s d u e t o it s c h a ra c t e rist ic s:
• O n ly a b le t o su p p o rt o n e -t o -o n e c o m m u n ic a t io n i.e . w o u ld o n ly
se rve o n e c lie n t t o o n e b ro ke r/se rve r.
• Hig h p o w e r c o n su m p t io n , fo r e ve ry o n e -t o -o n e c o n n e c t io n
e st a b lish e d , a n u n d e rlyin g TCP c o n n e c t io n sh o u ld b e o p e n a s
w e ll. Th is w ill p u t a h e a vy lo a d o n t h e se rve r a n d h e n c e , c o n su m e
m o re p o w e r t h a n a n e d g e d e vic e c a n su st a in .
• O p e ra t e s o n a re q u e st -b a se d re sp o n se . Se n so rs, w h ic h a c t a s a
c o n t in u o u sly re p o rt in g c lie n t (su b sc rib e r) in a n Io T syst e m
t yp ic a lly d o n ’t h a ve a n y c o m p u t a t io n a l fe a t u re im p le m e n t e d
t o g e t h e r w it h it .
Communication
Type It uses Request-Response model. It uses Publish-Subscribe model
Transport layer This mainly uses User Datagram This mainly uses Transmission
protocol protocol(UDP) Control protocol(TCP)
Header size It has 4 bytes sized header It has 2 bytes sized header