Report For Low Power Microcontroller Project
Report For Low Power Microcontroller Project
November 2024
Project Team
3 4SO21EC062 Nihal N S
I hereby certify that students have discussed with me and finalized the report.
i
LIST OF TABLES
Table 2.1 An overview of the literature survey to identify the gaps………………………………………..2
Table 3.1 R type instructions……………………………………………………………………………….8
Table 3.2 I type instructions………………………………………………………………………………...9
ii
LIST OF ABBREVIATIONS
Keyword Abbreviations
iii
Department of Electronics & Communication Engineering | 2024-25
CHAPTER 1
INTRODUCTION
In the evolving landscape of embedded systems, power efficiency and flexibility are paramount.
The RISC-V architecture, known for its simplicity and open-source nature, offers a compelling
platform for developing low-power microcontrollers. Unlike traditional architectures, RISC-V
provides a highly customizable and extensible instruction set, allowing designers to tailor the
microcontroller for specific applications while minimising power consumption. Low-power
microcontrollers are essential in numerous applications, from wearable devices and IoT sensors to
energy-harvesting systems. These applications require components that can operate with minimal
energy, extending battery life and enabling long-term deployment in remote locations. The RISC-
V architecture's modularity and streamlined design make it particularly well- suited for these
energy-sensitive environments.
In this project, we will delve into the design and implementation of a low-power microcontroller
based on the RISC-V architecture. By employing a combination of reduced instruction set
computing principles and state-of-the-art power management strategies, we aim to develop a
microcontroller that achieves significant energy efficiency without compromising performance.
Moreover, this project presents a unique learning opportunity.
Engaging with the RISC-V architecture, we will deepen our understanding of modern
microcontroller design and energy-efficient computing. We will explore the intricacies of
hardware description languages, power management techniques, and the nuances of designing for
low-power applications. This knowledge will enrich our skills and broaden our perspectives as
engineers, equipping us with the expertise to tackle future challenges in embedded systems and
beyond.
The project aims to demonstrate the potential of RISC-V in creating next-generation low-power
microcontrollers and to address the critical need for sustainable and efficient embedded systems
in our increasingly connected world.
CHAPTER 2
LITERATURE SURVEY
This survey intends to investigate various aspects of microcontrollers, addressing specific research
questions about their design principles, mechanisms, applications, construction, architecture
choices, and instruction sets. The survey leveraged databases such as Google Scholar, Web of
Science, and EBSCO, alongside registers like Free Patents Online and Lens.org, and websites
including ResearchGate, NDL-IIT Kharagpur, and Grafiati. The search was conducted over the
days, focusing on papers published after 2016 to ensure relevance to current developments in the
field. The literature survey adopted a thematic approach, seeking to identify trends, innovations,
and practical applications of microcontrollers in modern electronic systems. Keywords and
synonyms such as "Microcontroller", "RISC", "FPGA", "Low power", and "Architecture" were
utilized to refine the search scope and capture pertinent literature.
microcontroller designs
for specific applications.
5 AXI Lite Redundant On- Redundant AXI Lite bus Fault Injection Analysis,
Chip Bus Interconnect for interconnect using fault- Reliability Quantification
High Reliability Systems, tolerant and majority
IEEE Transactions on voting mechanisms to
Reliability, 2024 improve SoC reliability
8 Edge Computing: A Survey Survey on design for Does not suggest Security
On the Hardware low power hardware. Hardware for Edge
Requirements in the Devices Hardware
Internet of Things World, Interfaces were not
Future Internet, 2019 standardized
The demand for faster, more energy-efficient computing has driven the development of diverse
computing architectures and design innovations, shaping the landscape of modern computing. The
open-source RISC-V architecture, with its flexibility and applicability across various domains,
presents a promising platform for such advancements.
Significance:
In an era where the Internet of Things (IoT) and machine learning dominate, the need for
processors that are both low-power and high-performance is critical. The RISC-V architecture is
well-suited for this purpose, not only because of its open-source nature but also due to its
adaptability to custom implementations and potential for optimization. This project aims to
contribute to the industry by exploring design avenues within the RISC-V framework, with the
potential to uncover gaps in existing research or industrial practices that may present opportunities
for further exploration.
Scope:
Limitations:
● Scalability: While the design may perform optimally in isolated conditions, scalability for
larger applications or more intensive computational tasks may be limited without further
development.
2.3 Objectives
The primary objectives of the project are to
CHAPTER 3
METHODOLOGY
3.1 Processor Design
3.1.2 Decode
In the Decode state, the fetched instruction is parsed into its smaller, constituent parts, such as
operand addresses, destination register addresses, and opcode. This parsing process is crucial, as
it allows the processor to interpret the specific operation required by the instruction. Once decoded,
the FSM awaits a high clock signal to transition to the Read 1 state else it remains in the same state
Table 3.1 shows the decoding that has to occur in the decoder for the register-to-register type. The
bits [31:25] gives the funct7, [24:20] gives the address of the 2nd operand which is referred to as
rs2, [19:15] gives the address of the 1st operand which is referred to as rs1, [14:12] gives the
address of the funct3, [11:7] gives the address of the destination address which is referred to as rd
and [6:0] gives the opcode. The main speciality of R type is that the operands are stored in the
register set and have to be fetched from the register bank.
Table 3.2 shows the decoding that has to occur in the decoder for the immediate type. The bits
[31:0] gives the immediate value, [19:15] gives the address of the 1st operand, which is referred
to as rs1, [14:12] gives the address of the funct3, [11:7] gives the address of the destination address
which is referred to as rd and [6:0] gives the opcode. The main speciality of I type is that the first
operand is stored in the register bank while the other operand comes to the processor directly from
the instruction.
3.1.4 Execute
The execute state is made up of two modules, one is ALU control and the other being the
Arithmetic and Logic Unit itself. In ALU Control, depending upon the remaining parts of the
instruction like funct7 and funct3 and opcode the ALU select codes are mapped and sent to the
ALU. This mapping aligns with the decoded instruction requirements and sets up the ALU to
perform the necessary calculations. ALU is the stage where the actual computation happens. Using
the inputs from the ALU Control, the ALU performs the arithmetic or logical operation as specified
by the opcode. Once the computation is complete in the next high clock signal the FSM moves to
the store state.
3.1.5 Store
The result computed by the ALU is then prepared for storage, ensuring that the operation is
completed before moving to the next stage. On receiving a high clock signal, the processor stores
the computed result in the register bank in the register address specified by the instruction. This
ensures that all required data and results are saved correctly, maintaining the processor’s data
integrity. Once the write operation is complete, in the next high clock the FSM moves to the PC
Update state else it stays in the same state.
3.1.5 PC Update
Once one whole instruction has been executed the Program Counter value is incremented to
process the next instruction. Wherein, FSM either returns to the Instruction Fetch state or remains
idle, depending on the program’s requirements.
As shown in Figure 3.2.2, we first initialise all the row pins to logic "0" and column pins to logic
"1" (ROW = 0000, COLUMN = 1111). When a key is pressed, the corresponding column pin is
set to "0". Sequentially send logic "1" to each row and detect changes in column logic to identify
the pressed key. Send the key value in the form of bits or ASCII through the row pins.
3.3 Memory
In the microcontroller design, memory plays a crucial role in managing the flow of data between
various processing units, as it provides the temporary storage needed for data manipulation and
retrieval during computations. For this low-power RISC-V microcontroller, memory is essential
for enabling efficient execution of instructions by holding both operational data and intermediate
results. By incorporating memory directly into the microcontroller's architecture, we improve data
accessibility and system responsiveness, which are critical for applications that require real-time
processing.
The Figure 3.3.1 shows how the memory interacts with the other units in the microcontroller.
Memory in this project is implemented using a RAM module that operates as a data buffer,
essential for storing inputs, instructions, and intermediate calculation results. This memory system
supports efficient handling of data between the processor and other peripheral modules, allowing
the microcontroller to function smoothly without external memory dependencies. In particular, the
RAM module is designed with 2048 memory locations, each capable of holding 8 bits of data,
making it compact yet sufficient for the memory needs of lightweight processing tasks typically
seen in low-power applications.
The memory will be integral to microcontroller's operation by managing the following critical
tasks:
1. Instruction Fetching and Execution: During the instruction cycle, memory is used to store
and retrieve instructions that the processor executes sequentially. For instance, in each
cycle, the processor fetches the necessary instruction from memory, decodes it, and then
either stores the result back into memory or prepares it for the next operation. This
continuous access to memory ensures that the microcontroller can handle a sequence of
instructions without delays.
2. Temporary Data Storage: For each operation, intermediate data needs to be temporarily
stored and accessed rapidly. Our RAM module provides this capability, storing values that
will be used in future calculations or passed to peripheral devices. The efficient design of
the memory allows for low-latency access to this data, crucial for maintaining the speed
and reliability of the microcontroller in real-time applications.
3. State Management and Synchronization: The memory’s control signals, such as
busy_mem, full_mem, and empty_mem, allow for real-time state management, ensuring
that read and write operations are coordinated without data overlap or loss. These flags
inform the processor of memory availability, avoiding overwriting data before it has been
read or attempting to read uninitialized data. This capability is particularly valuable in low-
power designs, where idle states help conserve energy while ensuring readiness for active
tasks.
Figure 3.4.16: Block diagram for LCD and the LCD is set to entry mode to
increment the cursor without
shifting the display. A function is created to send commands and data (characters) through the RS
pin, utilizing the D0-D7 pins. Additionally, a function is designed to send strings to the LCD,
iterating through each character in the string and displaying it by switching the RW pin. To control
the cursor position, a function calculates the desired location based on the row and column of the
display matrix and sends the corresponding command to set the cursor position accurately.
Step 1 - Initialization: Define the pins connected to the LCD (RS, RW, E, DO, D1, D2, D3, D4,
D5, D6, D7). Set the LCD to 8-bit mode and the number of display lines and character font using
the enable pin, then turn on the display and cursor settings. Clear the display. Set the LCD to entry
mode (increment cursor, no display shift).
Step 2 - Function to send Data: Setting up function to send commands through the RS pin, send
data (characters) also a function to send a string to the LCD (data is sent through the D0-D7 pins).
Step 3 - Display on the LCD: Create a function to send data to the LCD. Use the data-sending
function to display each character (This is done by switching the RW pin).
Step 4 - Set Cursor Position: Create a function to set the cursor position on the LCD. Calculate
the location of the cursor based on the row and column of the display matrix. Send the appropriate
command to set the cursor position.
CHAPTER 4
From the Figure 4.1.1 we see that fetch, decode, execute cycle was implemented for both R and I
type and was found to obey all the currently designed specifications. However, it was found that
the register bank locations 1 and 2 are being skipped. This must be reviewed and improved.
As illustrated in Figure 4.2.1 the total on-chip power consumption for the keypad matrix is 0.104
W. Most of this power (94%) is static, with only 6% attributed to dynamic power. Within the
dynamic power, the majority (87%) is consumed by I/O functions, which includes input from the
keypad. This low dynamic power consumption aligns with the energy-efficient design of the
keypad, which uses a scanning method to detect key presses while minimizing active power usage.
REFERENCES
[1] I. Yasui and Y. Shimazu, "Microprocessor with Harvard Architecture". United States Patent
5034887, 23 07 1991.
[2] Weng Yew Chang, Richard, Kye Yak See and Eng Kee Chua, Comprehensive Analysis of the
Impact of via Design on High-Speed Signal Integrity, 9th Electronics Packaging Technology
Conference, pp. 262- 267, 2007.
[3] Stephen H. Hall and Howard L. Heck, Advanced Signal Integrity for High Speed Digital
Designs, Wiley Publication, 2009.
[4] S. M. Bhagat and S. U. Bhandari, "Design and Analysis of 16-bit RISC Processor," in 2018
Fourth International Conference on Computing Communication Control and Automation
(ICCUBEA), Pune, 2018.
[5] M. M. Al-Kofahi, M. Y. Al-Shorman and O. M. Al-Kofahi, "Toward energy-efficient
microcontrollers and Internet-of-Things systems," Computers & Electrical Engineering, vol. 79,
no. 1, 2019.
[6] M. Saxena, O. Nimbalkar, V. Jaiswal, V. Pandey and P. Sanjeevi, "The survey of concepts of
architecture in RISC and CISC computers," International Journal of Advance Research, Ideas and
Innovations in Technology, vol. 4, no. 6, 2017.
[7] S. M. Bhagat and S. U. Bhandari, "Design and Analysis of 16-bit RISC Processor," in 2018
Fourth International Conference on Computing Communication Control and Automation
(ICCUBEA), Pune, 2018.
[8] A. Shaik and S. M, "Implementation of RISC-Based Architecture for Low power applications,"
IOSR Journal of Electrical and Electronics Engineering (IOSR-JEEE), vol. 8, no. 4, 2013.
[9] ARM, "AMBA AXI Protocol Specification," ARM Holdings, 2016
[10] Lakshmi Sirisha B, Sambasivarao Nakkala, and Thanmai Vaddavalli, "Design and
Verification of AMBA AXI Protocol," V R Siddhartha Engineering College, Vijayawada, India,
2024
[11] M. Crepaldi, A. Merello and M. Di Salvo, "A Multi-One Instruction Set Computer for
Microcontroller Applications," in IEEE Access, vol. 9, pp. 113454-113474, 2021, doi:
10.1109/ACCESS.2021.3104150.
[12] C. Zhang, H. Sun, S. Li, Y. Wang, H. Chen and H. Liu, "A Survey of Memory-Centric Energy
Efficient Computer Architecture," in IEEE Transactions on Parallel and Distributed Systems, vol.
34, no. 10, pp. 2657-2670, Oct. 2023, doi: 10.1109/TPDS.2023.3297595.
[13] M. Götz, S. Khriji, R. Chéour, W. Arief and O. Kanoun, "Benchmarking-Based Investigation
on Energy Efficiency of Low-Power Microcontrollers," in IEEE Transactions on Instrumentation
and Measurement, vol. 69, no. 10, pp. 7505-7512, Oct. 2020, doi: 10.1109/TIM.2020.2982810.
[14] R. Serrano et al., "A Low-Power Low-Area SoC based in RISC-V Processor for IoT
Applications," 2021 18th International SoC Design Conference (ISOCC), Jeju Island, Korea,
Republic of, 2021, pp. 375-376, doi: 10.1109/ISOCC53507.2021.9613880.