RISC-V SoC Physical Implementation in 180 NM CMOS With A Quark Core Based On FemtoRV32
RISC-V SoC Physical Implementation in 180 NM CMOS With A Quark Core Based On FemtoRV32
net/publication/375567884
RISC-V SoC Physical Implementation in 180 nm CMOS with a Quark Core Based
on FemtoRV32
CITATIONS READS
0 86
10 authors, including:
All content following this page was uploaded by Marcus Victor on 16 May 2024.
Luiz C. Moreira
Electronic Engineer Division IEEA
Aeronautics Institute of Technology
São José dos Campos, Brazil
[email protected]
Abstract—This article presents the first known physical imple- applications [3]. After the release of the RISC-V ISA, many
mentation of a RISC-V core based on the FemtoRV32 project, processor implementations were developed in both industry
using the Quark core to implement the RV32I instruction set. and academia. One example is the Raven processor [4], which
Our primary goal is to validate the micro-architecture for ASIC
development. Implemented using 180 nm CMOS technology, utilizes the PicoRV32 [5] core, a very popular 32-bit RISC-V
the core demonstrates functionality at frequencies as high as core developed by Clifford Wolf, one of the major contributors
120 MHz, which represents a 150% improvement over FPGA to the open-hardware community. Another example is the
implementations. Power dissipation tests estimate a range of 68 PolarFire SoC [6], developed by Microchip. Both of them are
to 108 mW, under different PVT corners, and slack margins of 0.5 available for sale on the market. On the academic side, we
and 2 ps, respectively. The core also passed standard regression
tests for RISC-V ISA compliance, executed within an automated have the example of the Steel ASIC [7] developed by UFRGS
verification environment. Additionally, our paper outlines the and the PreDrac [8] processor, the first developed by a Spanish
ASIC implementation tools and methodologies employed, adding institution. Both followed the development process to obtain a
to its viability as a foundation for developing low-cost micropro- physical implementation in silicon, listing the methodologies
cessors or custom ASICs for specific applications. used in their works.
Keywords—SoC, RISC-V, VLSI, CMOS, ASIC
Don et al. [9] proposed an automated validation framework
while addressing the development of a RISC-V processor.
I. I NTRODUCTION
However, their work focuses on an FPGA implementation
RISC-V architecture [1] and Open ISA allow the imple- rather than an ASIC implementation, which prevents the
mentation of micro-architectures suitable for specific applica- evaluation of the micro-architecture for its suitability for this
tions [2]. Large manufacturers use the architecture to develop type of project. On the other hand, the work of Roberto et
their products, protecting intellectual property rights under al. [10] presents the post-silicon validation process for RISC-
their implementation and non-standard instruction subsets, V microcontroller-based projects, although their work only
which encourages investment in research and development, focuses on the testing stages.
such as the creation of FireSim focused on high-performance Our paper brings the design flow of a RISC-V SoC in 180
Authorized licensed use limited to: Harvard Library. Downloaded on May 16,2024 at 12:14:38 UTC from IEEE Xplore. Restrictions apply.
Fig. 2. Compliance verification of RISC-V. XOR instruction simulation.
scription is necessary for the specified project, which will later 100, considering 4-byte addresses. This value can be seen in
be used in the back-end process, avoiding any problems that the last waveform, “RAM[25]”, in Fig. 3, which shows the
may arise in this cycle. value in hexadecimal (0x19) written at address 100.
In the back-end process, the Genus tool with a cell library in To validate the correct operation of the SPI, UART, and
the 180 nm CMOS technology from Foundry UMC is used for PWM peripherals in the project, a test-bench is developed. It
synthesis. In that stage, the presence of latches were detected is capable of simulating the behavior of FLASH memory and
by the synthesis tool, and with some small modifications in communicating with the processor through the SPI protocol.
the RTL, the inferred latches were fixed. After that stage, logic This test-bench is able to verify if the system is operating
equivalence tests (LEC) is performed. as expected and can be used to validate test algorithms in C
For the implementation phase, the Innovus tool is used, or assembly, both in the simulation environment and in the
going through the floor-planning, placement, routing, and FPGA.
verification analysis processes. Gate-level simulation is a step Simulations are carried out for gate-level simulation to
in the project flow to ensure that the design meets function- validate the core and mentioned peripherals. Fig. 4 shows
ality after synthesis or after placement and routing activities. the test performed for the PWM peripheral, illustrating the
Through simulation, expected results were obtained for the simulation at five distinct time stages and the clk and D1
core used. signals. It is possible to observe the pulse width variation over
time in the D1 output signal. Fig. 5 shows the simulation of
IV. R ESULTS & D ISCUSSION the UART peripheral, displaying the transmission of the “a”
The Icarus Verilog software operates as a compiler for the character in the TXD output signal, using the RS-232 protocol,
RTL written in Verilog (IEEE-1364). For batch simulation, the for a baud rate of 115200 bps and a sampling time close to
compiler generates an intermediate form called vvp assembly. 8.63 us.
It is also possible to generate an executable file “.vcd”, Fig. 6 shows a diagram with the previously described
naturally interpreted by the Gtkwave software, thus obtaining phases. The testing environment for our project unfolds across
waveforms for circuit analysis. seven stages. Initially, it identifies and manages test files
Fig. 2 shows the result of a compliance test simulation for distributed across five distinct repositories, two for RISC-
the xor instruction. Four waveforms are displayed: the first V [15] and lowRISC [16] compliance tests, and the others
refers to the executed instruction; the second indicates the for peripheral and communication tests, unit tests, and general
program counter value; the third displays the accessed memory programs.
address; and the fourth shows the value written to the address.
In that test, the characters “xor” are written to the specified
address in the test file, observed approximately between 1
us and 5 us intervals. Then, “OK” is written approximately
between 119 us and 120 us intervals, as observed in the orange
waveform. Otherwise, “ERROR” will be written, indicating a
failure.
The algorithm presented in [14] is capable of testing the
RV32I instruction set base. Fig. 3 shows the behavior of this
simulated algorithm on the processor, where eight signals can
be observed in the image. The first four are clk and SPI
communication signals. At the end of the test, it is expected
that the decimal value of 25 is written to memory address Fig. 3. Core simulation. Running tests on the processor.
Authorized licensed use limited to: Harvard Library. Downloaded on May 16,2024 at 12:14:38 UTC from IEEE Xplore. Restrictions apply.
Fig. 4. PWM simulation.
Authorized licensed use limited to: Harvard Library. Downloaded on May 16,2024 at 12:14:38 UTC from IEEE Xplore. Restrictions apply.
Fig. 7. Physical implementation steps.
Authorized licensed use limited to: Harvard Library. Downloaded on May 16,2024 at 12:14:38 UTC from IEEE Xplore. Restrictions apply.
a comprehensive approach for creating RISC-V-based SoCs, [7] R. d. O. Calçada and R. Reis, “Design of steel: a risc-v core,” p. 1–83,
serving as a reference for future digital chip projects. The 2020.
[8] J. Abella, C. Bulla, G. Cabo, F. J. Cazorla, A. Cristal, M. Doblas,
detailed descriptions of the stages and methodologies required R. Figueras, A. González, C. Hernández, C. Hernández, V. Jiménez,
for the creation of SoCs provide valuable insights and guidance L. Kosmidis, V. Kostalabros, R. Langarita, N. Leyva, G. López-Paradı́s,
for future implementations. The contribution of this work J. Marimon, R. Martı́nez, J. Mendoza, F. Moll, M. Moretó, J. Pavón,
C. Ramı́rez, M. A. Ramı́rez, C. Rojas, A. Rubio, A. Ruiz, N. Sonmez,
lies in demonstrating the high potential and efficiency of the V. Soria, L. Terés, O. Unsal, M. Valero, I. Vargas, L. Villa, and
Quark core and offering valuable resources for future SoC C. Ramı́ı́ez, “An academic risc-v silicon implementation based on open-
implementations. source components,” in 2020 XXXV Conference on Design of Circuits
and Integrated Systems (DCIS), 2020, pp. 1–6.
Finally, with the chip available, energy categorization tests [9] D. K. Dennis, A. Priyam, S. S. Virk, S. Agrawal, T. Sharma, A. Mondal,
and other analyses will be conducted to identify the advantages and K. C. Ray, “Single cycle risc-v micro architecture processor and its
and disadvantages of the SoC and, consequently, identify fpga prototype,” in 2017 7th International Symposium on Embedded
Computing and System Design (ISED), 2017, pp. 1–5.
possible opportunities for improvement. [10] R. Molina-Robles, R. Garcı́a-Ramı́rez, A. Chacón-Rodrı́guez,
R. Rimolo-Donadio, and A. Arnaud, “An affordable post-silicon
R EFERENCES testing framework applied to a risc-v based microcontroller,” in 2021
[1] A. Waterman, Y. Lee, D. A. Patterson, and K. Asanović, IEEE Latin America Electron Devices Conference (LAEDC), 2021, pp.
“The risc-v instruction set manual, volume i: Base user- 1–5.
level isa,” EECS Department, University of California, [11] B. , “Github - BrunoLevy/learn-fpga: Learning FPGA, yosys, nextpnr,
Berkeley, Tech. Rep. UCB/EECS-2011-62, May 2011. [Online]. and RISC-V,” https://github.com/BrunoLevy/learn-fpga, jan 8 2023.
Available: http://www2.eecs.berkeley.edu/Pubs/TechRpts/2011/EECS- [12] W. , “Github - wuxx/icesugar-nano: icesugar-nano FPGA board (base
2011-62.html on iCE40LP1K),” https://github.com/wuxx/icesugar-nano.
[2] M. D. Hill, D. Christie, D. Patterson, J. J. Yi, D. Chiou, and R. Sendag, [13] J. Qiu, F. Ye, and H. Zhou, “Automatic verification platform based on
“Proprietary versus open instruction sets,” IEEE Micro, vol. 36, no. 4, risc-v architecture microprocessor,” in 2021 International Conference on
pp. 58–68, 2016. Networking Systems of AI (INSAI), 2021, pp. 157–160.
[3] S. Karandikar, H. Mao, D. Kim, D. Biancolin, A. Amid, D. Lee, [14] M. Kaufmann, DIGITAL Design and Computer Architecture, New York,
N. Pemberton, E. Amaro, C. Schmidt, A. Chopra, Q. Huang, K. Kovacs, NY, 2005.
B. Nikolic, R. Katz, J. Bachrach, and K. Asanovic, “Firesim: Fpga- [15] RISC-V, “Risc-v software source code,” 2023, accessed: 2022-12-02.
accelerated cycle-exact scale-out system simulation in the public cloud,” [Online]. Available: https://github.com/riscv-software-src
in 2018 ACM/IEEE 45th Annual International Symposium on Computer [16] LowRISC, “Lowrisc github repository,” 2023, accessed: 2022-12-02.
Architecture (ISCA), 2018, pp. 29–42. [Online]. Available: https://github.com/lowRISC
[4] “Raven - RISC-V Microcontroller based on PicoRV32 Core,” [17] R. Wuerdig, L. Franco, R. Scroferneker, C. Metzler, and R. Reis,
https://www.hackster.io/ef/raven-risc-v-microcontroller-based-on- “Logical and physical synthesis of an hf-riscv core for x-fab 180 nm
picorv32-core-f2f53d. technology,” ICCEEg, vol. 1, p. 16, 06 2020.
[5] Y. , “Github - YosysHQ/picorv32: Picorv32 - A Size-Optimized RISC-V [18] S. Shukla, P. K. Jha, and K. C. Ray, “An energy-efficient
CPU,” https://github.com/YosysHQ/picorv32, jan 3 2022. single-cycle rv32i microprocessor for edge computing applications,”
[6] “Polarfire® SoC FPGAs | Microchip Technology,” Integration, vol. 88, pp. 233–240, 2023. [Online]. Available:
https://www.microchip.com/en-us/products/fpgas-and-plds/system- https://www.sciencedirect.com/science/article/pii/S0167926022001195
on-chip-fpgas/polarfire-soc-fpgas.
Authorized licensed use limited to: Harvard Library. Downloaded on May 16,2024 at 12:14:38 UTC from IEEE Xplore. Restrictions apply.