GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - abhik-ece/4-bit-ALU-RTL-to-GDSII: A 4-bit Verilog ALU implemented through a complete RTL-to-GDSII ASIC physical design flow using Yosys, OpenROAD, and the Nangate45 standard-cell library.

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
docs/images
docs/images
 
 
reports/nangate45/alu/base
reports/nangate45/alu/base
 
 
results/nangate45/alu/base
results/nangate45/alu/base
 
 
rtl
rtl
 
 
synth
synth
 
 
tb
tb
 
 
.gitignore
.gitignore
 
 
Layout.png
Layout.png
 
 
README.md
README.md
 
 
config.mk
config.mk
 
 
constraint.sdc
constraint.sdc
 
 

Repository files navigation

4-Bit ALU Design | RTL-to-GDSII Physical Design Using OpenROAD

A Complete Digital ASIC Implementation Flow
Verilog RTL · Functional Verification · Synthesis · Physical Design · GDSII

4-bit ALU Physical Design

Overview · Architecture · Verification · Physical Design · Results · Gallery

A complete digital ASIC design flow for a 4-bit Arithmetic Logic Unit (ALU), starting from Verilog RTL design and functional verification to synthesis, floorplanning, placement, clock tree synthesis, routing, and final GDSII generation.

This project demonstrates a complete RTL-to-GDSII implementation using OpenROAD, Yosys, and the Nangate45 standard-cell library.


Project Overview

The Arithmetic Logic Unit (ALU) is a fundamental component of a processor. It performs arithmetic and logical operations based on a control signal called an opcode.

In this project, a 4-bit combinational ALU was designed using Verilog HDL and implemented through a complete ASIC physical design flow.

Key Features

  • 4-bit input operands
  • 3-bit operation selection
  • Eight arithmetic and logical operations
  • Carry-out generation
  • Verilog RTL implementation
  • Functional verification using a testbench
  • Logic synthesis using Yosys
  • Physical design using OpenROAD
  • Standard-cell placement and routing
  • Final GDSII generation
  • Layout inspection using KLayout

Architecture

The ALU accepts two 4-bit inputs, A and B, and a 3-bit opcode.

Based on the opcode, the ALU performs the selected operation and generates a 4-bit result along with a carry-out signal.

Block Diagram

          +----------------------+
          |                      |
   A[3:0] |                      |
          |                      |
   B[3:0] |       4-BIT ALU      |----> Result[3:0]
          |                      |
Opcode    |                      |----> Carry_out
[2:0]     |                      |
          +----------------------+

Supported Operations

Opcode Operation Description
000 ADD A + B
001 SUB A - B
010 AND Bitwise AND
011 OR Bitwise OR
100 XOR Bitwise XOR
101 NOT Bitwise NOT of A
110 NAND Bitwise NAND
111 NOR Bitwise NOR

Note: For subtraction, carry_out indicates no borrow.


RTL Design

The ALU was implemented using Verilog HDL.

RTL source file:

rtl/alu.v

The design uses combinational logic and a case-based opcode selection mechanism to perform the required operations.

Design Characteristics

  • Combinational logic design
  • No clock input
  • No sequential elements
  • No flip-flops or memory blocks
  • 4-bit output with carry-out

Functional Verification

Functional verification was performed using a Verilog testbench and Icarus Verilog.

Testbench:

tb/alu_tb.v

All eight operations were tested using the input values:

A = 7
B = 3

Verification Results

Operation Expected Result Observed Result Status
ADD 10 10 PASS
SUB 4 4 PASS
AND 3 3 PASS
OR 7 7 PASS
XOR 4 4 PASS
NOT 8 8 PASS
NAND 12 12 PASS
NOR 8 8 PASS
ALU TEST COMPLETED

All eight operations passed the functional testbench.

Simulation Waveform

The simulation waveform was generated in VCD format and can be inspected using GTKWave.

sim/alu.vcd

Logic Synthesis

Logic synthesis was performed using Yosys.

The RTL design was converted into a gate-level netlist using the Nangate45 standard-cell library.

Synthesis Summary

Parameter Result
Total Cells 120
Synthesized Area 140.448 µm²
Sequential Area 0 µm²
Latches 0

The synthesis process completed without reported synthesis problems.


Physical Design Flow

The physical implementation was performed using OpenROAD.

The design was processed through the major stages of the RTL-to-GDSII flow.

Implementation Flow

       Verilog RTL
            |
            v
     Functional Simulation
            |
            v
         Synthesis
          (Yosys)
            |
            v
        Floorplanning
            |
            v
       Power Planning
            |
            v
     Global Placement
            |
            v
   Clock Tree Synthesis
            |
            v
      Global Routing
            |
            v
     Detailed Routing
            |
            v
       Final GDSII

Physical Design Stages

  1. Floorplanning: Defined the core area and initial physical design parameters.
  2. Power Planning: Generated the power distribution network.
  3. Global Placement: Placed standard cells within the core area.
  4. Clock Tree Synthesis: Executed the CTS stage. Since the ALU is purely combinational, it has no clock network to distribute.
  5. Global Routing: Estimated routing paths and evaluated congestion.
  6. Detailed Routing: Completed detailed signal routing.
  7. Final GDSII: Generated the final layout database.

Physical Design Results

The following results were obtained from the completed OpenROAD flow.

Placement Results

Parameter Result
Total Instances 185
Movable Instances 133
Fixed Instances 52
Placement Utilization 12.301%
Design Area Approximately 163 µm²
Core Area 1355.536 µm²
Placement Violations 0

Routing Results

Parameter Result
Global Routing Congestion 3.19%
Estimated Wirelength 1265 µm
Routed Nets 154
Detailed Routing Wirelength 717 µm
Number of Vias 774
Detailed Routing DRC Violations 0
Antenna Net/Pin Violations 0

Timing and Power

Parameter Result
WNS 0.00
TNS 0.00
Estimated Total Power 11.4 µW
Internal Power 3.62 µW
Switching Power 3.97 µW
Leakage Power 3.79 µW

Important: Power values are tool-based estimates, not measurements from fabricated silicon. Timing results should be interpreted in the context of the project's constraints and combinational design.


Physical Design Visualization

The following images show different stages of the physical implementation.

1. Overall Physical Design

This visualization presents the overall physical layout of the 4-bit ALU.

Overall Physical Design

2. Standard Cell Placement

This view shows the placement of standard cells inside the core area.

Standard Cell Placement

3. Detailed Routing

This visualization shows the detailed signal routing between standard cells.

Detailed Routing

4. Routing Congestion

This view represents the routing congestion analysis from the physical design flow.

Routing Congestion


Final GDSII Layout

The final GDSII file was generated successfully using the OpenROAD physical design flow.

Final GDSII file:

results/nangate45/alu/base/6_final.gds

The generated layout can be opened and inspected using KLayout.

Final Design Files

File Description
6_final.gds Final GDSII layout
6_final.def Final design exchange format
6_final.odb OpenROAD database
6_final.spef Parasitic extraction data
6_finish.rpt Final physical design report

Project Directory Structure

4-bit-ALU/
│
├── rtl/
│   └── alu.v
│
├── tb/
│   └── alu_tb.v
│
├── sim/
│   └── alu.vcd
│
├── synth/
│   ├── alu_netlist.v
│   └── alu_nangate45.v
│
├── config.mk
├── constraint.sdc
├── docs/
│   └── images/
│       ├── final_all.webp
│       ├── final_placement.webp
│       ├── final_routing.webp
│       └── final_congestion.webp
│
├── results/
│   └── nangate45/
│       └── alu/
│           └── base/
│               └── 6_final.gds
│
└── README.md

Note: Generated simulation and physical design files may be excluded from Git using .gitignore. The directory structure above highlights the important project files.


Tools and Technologies

Tool / Technology Purpose
Verilog HDL RTL Design
Icarus Verilog Functional Simulation
GTKWave Waveform Analysis
Yosys Logic Synthesis
OpenROAD Physical Design
Nangate45 Standard Cell Library
KLayout GDSII Layout Inspection
Linux / WSL Development Environment
Git & GitHub Version Control

How to Run

1. Clone the Repository

git clone https://github.com/abhik-ece/4-bit-ALU-RTL-to-GDSII.git
cd 4-bit-ALU-RTL-to-GDSII

2. Run Functional Simulation

iverilog -o alu_sim rtl/alu.v tb/alu_tb.v
vvp alu_sim

3. View the Waveform

gtkwave sim/alu.vcd

The waveform file is generated by the testbench. If it is not present in the repository, run the simulation first.

4. Run the Physical Design Flow

The OpenROAD flow requires a correctly configured OpenROAD-flow-scripts environment and the Nangate45 platform.

After setting up the environment, configure the design using the project's config.mk and run the flow through the OpenROAD-flow-scripts Makefile.


Learning Outcomes

Through this project, I gained practical experience in:

  • Writing synthesizable Verilog RTL.
  • Designing combinational digital circuits.
  • Creating testbenches and verifying RTL functionality.
  • Understanding logic synthesis and gate-level netlists.
  • Working with standard-cell libraries.
  • Understanding floorplanning and power planning.
  • Performing standard-cell placement.
  • Understanding clock tree synthesis in an ASIC flow.
  • Analyzing routing congestion.
  • Performing detailed routing.
  • Generating and inspecting GDSII layouts.
  • Understanding the complete RTL-to-GDSII design process.

Limitations and Future Improvements

This project is an educational implementation of a small combinational ALU.

Possible future improvements include:

  • Parameterized ALU design.
  • Wider ALU architectures such as 8-bit and 16-bit.
  • More extensive constrained-random verification.
  • Formal equivalence checking.
  • Design optimization for power, performance, and area (PPA).
  • Implementation using additional standard-cell libraries.
  • Further timing analysis with suitable design constraints.

The generated GDSII is a physical design output. It does not mean the design has been fabricated or passed foundry signoff.


Author

Abhik Bhunia

B.Tech in Electronics and Communication Engineering

Interests: VLSI Design, RTL Design, Digital Electronics, ASIC Design and Microelectronics.

GitHub: abhik-ece

Project Repository: 4-bit-ALU-RTL-to-GDSII


This project was developed as part of my learning journey in digital VLSI design and ASIC physical implementation.

About

A 4-bit Verilog ALU implemented through a complete RTL-to-GDSII ASIC physical design flow using Yosys, OpenROAD, and the Nangate45 standard-cell library.

Topics

asic-designdigital-designgdsiimicroelectronicsopenroadphysical-designrtl-designverilogvlsivlsi-designvlsi-physical-designyosys

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.