Skip to content

apoorvaaaa5/pes_uarxtxp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 

Repository files navigation

pes_uarxtxp=> UNIVERSAL ASYNCHRONOUS TRANSMITTER RECEIVER PROTOCOL

This project simulates the designed UART Transmitter module which is used to transmit a data packet between devices using Asynchronous and Serial communication.The data length can vary from 5 bit to 8 bit but it must be decided before the communication begins along with the baud rate(in this case the baud rate is 115200).

INTRODUCTION

##What is UARTP? UART stands for universal asynchronous receiver / transmitter and defines a protocol, or set of rules, for exchanging serial data between two devices. UART is very simple and only uses two wires between transmitter and receiver to transmit and receive in both directions. Both ends also have a ground connection. Communication in UART can be simplex (data is sent in one direction only), half-duplex (each side speaks but only one at a time), or full-duplex (both sides can transmit simultaneously). Data in UART is transmitted in the form of frames. The format and content of these frames is briefly described and explained.

  • UART stands for universal asynchronous receiver / transmitter and is a simple, two-wire protocol for exchanging serial data.
  • Asynchronous means no shared clock, so for UART to work, the same bit or baud rate must be configured on both sides of the connection.
  • Start and stop bits are used to indicate where user data begins and ends, or to “frame” the data.
  • An optional parity bit can be used to detect single bit errors.
  • UART is still a widely used serial data protocol but has been replaced in some applications by technologies such as SPI, I2C, USB, and Ethernet in recent years.

Where is UARTP used?

UART was one of the earliest serial protocols. The once ubiquitous serial ports are almost always UART-based, and devices using RS-232 interfaces, external modems, etc. are common examples of where UART is used. In recent years, the popularity of UART has decreased: protocols like SPI and I2C have been replacing UART between chips and components. Instead of communicating over a serial port, most modern computers and peripherals now use technologies like Ethernet and USB. However, UART is still used for lower-speed and lower-throughput applications, because it is very simple, low-cost and easy to implement.

Block/State diagram of UART Transmitter

download

The data packets are arranged with necessary bits like start bit, stop bit, parity checker etc to optimise the error, such an arrangement is known as data frame.This data frame is shared serially through the transmitter.

images

The transmiter is an Finite State Machine with 4 stable state which are IDLE, START, DATA and STOP.Initially the sequential circuit is in the IDLE state and when the transmission is enabled than the system goes to the START state where it sends an High to Low pulse on the Rx pin and it switches to DATA state , in this state the data stored in the buffered is send one by one with LSB as the first bit and MSB as the last bit.Once the data is transmitted serially at a predetermined baud rate than the system moves to the STOP state where it mantains the Rx line to HIGH state which indicates the end of the operation

Iverilog and yosys Installation

  • To install iverilog and gtkwave we type the following
- sudo apt-get update
- sudo apt-get install iverilog gtkwave
  • To install yosys we type the following
- git clone https://github.com/YosysHQ/yosys.git
- sudo apt install make
- sudo apt-get install build-essential clang bison flex \
   libreadline-dev gawk tcl-dev libffi-dev git \
   graphviz xdot pkg-config python3 libboost-system-dev \
   libboost-python-dev libboost-filesystem-dev zlib1g-dev
  • Now we type cd yosys and go into the yosys folder.
  • Now we type
sudo make install

Simulation

cd vsd
cd VLSI
cd sky130RTLDesignAndSynthesisWorkshop
cd verilog_files
iverilog -o uart_tb.vvp uart_tb.v
vvp uart_tb.vvp
gtkwave dump.vcd

4c5d1bf5-4010-411f-a433-d42f6397c8d4

5d481715-25ec-493a-b81e-916c19fa57d6

#Synthesis Invoke yosys

read_liberty -lib ../lib/sky130_fd_sc_hd__tt_025C_1v80.lib
read_verilog UART_TX.v
synth -top UART_TX
dfflibmap -liberty lib/sky130_fd_sc_hd__tt_025C_1v80.lib
abc -liberty lib/sky130_fd_sc_hd__tt_025C_1v80.lib
stat
show
write_verilog uart_net.v
iverilog -DFUNCTIONAL -DUNIT_DELAY=#1 my_lib/verilog_model/primitives.v my_lib/verilog_model/sky130_fd_sc_hd.v uart_net.v uart_tb.v
./a.out
gtkwave dump.vcd

ef0c7975-3ac5-495c-947c-3ceef0393e22

30d065fe-61fa-4260-bbdd-1c9cb9670d8a

18432b16-2110-492d-a6af-97cb23533aed

950497a2-89dd-425a-9907-fc5bd8348da7

019b2dd9-7a97-4f32-833b-9f243899dcb4

79cc09b9-f84e-431a-ad22-646add92e15a

9719d9db-62f2-458f-9421-98a658cfd5fb

Physical Design

Installation of ngspice magic and OpenLANE

ngspice

cd $HOME
sudo apt-get install libxaw7-dev
tar -zxvf ngspice-41.tar.gz
cd ngspice-41
mkdir release
cd release
../configure  --with-x --with-readline=yes --disable-debug
sudo make
sudo make install

magic

sudo apt-get install m4
sudo apt-get install tcsh
sudo apt-get install csh
sudo apt-get install libx11-dev
sudo apt-get install tcl-dev tk-dev
sudo apt-get install libcairo2-dev
sudo apt-get install mesa-common-dev libglu1-mesa-dev
sudo apt-get install libncurses-dev
git clone https://github.com/RTimothyEdwards/magic
cd magic
./configure
sudo make
sudo make install

OpenLANE

sudo apt-get update
sudo apt-get upgrade
sudo apt install -y build-essential python3 python3-venv python3-pip make git

sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io
sudo docker run hello-world
sudo groupadd docker
sudo usermod -aG docker $USER
sudo reboot 
# After reboot
docker run hello-world (should show you the output under 'Example Output' in https://hub.docker.com/_/hello-world)

- To install the PDKs and Tools
cd $HOME
git clone https://github.com/The-OpenROAD-Project/OpenLane
cd OpenLane
make
make test

Steps to follow

make the directory as shown below and upload all the required files along with verilog code

ee2d88a6-0ba7-4f45-9053-319f4dd585cd 2e988de3-d3f1-40aa-b062-6e71216ecdca

Openlane flow

  • Type make mount in the main Openlane folder.
  • Then type ./flow.tcl -interactive.
  • To prep the design type
prep -design UART_TX

83ea922b-ae4e-4d28-9208-103c2dbb142d

Synthesis

  • Type
run_synthesis

9c7095de-bf8d-4cd5-a944-f32ea7499167 aee51d42-a8a2-4037-8cfd-1bd6dfae23c8

Flop ratio=25/112

Floorplan

  • Now to run the floorplan we type
run_floorplan

20a7fb7f-4f23-4b24-a582-f3ad9e5f9d78

  • To view the design we type
magic -T /home/apoorva/.volare/sky130A/libs.tech/magic/sky130A.tech lef read ../../tmp/merged.nom.lef def UART_TX.def &

bc6ec8b3-faaa-4724-af07-523d9257c9c7 be36db5e-1d65-4dd4-9e68-ab0d77fcb8ad

Placement

  • Now to run the placement we type
run_placement
  • To view the design we type
magic -T /home/apoorva/.volare/sky130A/libs.tech/magic/sky130A.tech lef read ../../tmp/merged.nom.lef def UART_TX.def &

6318ed8e-097a-4110-b3e3-31305a9eaf21

CTS(Clock Tree Synthesis)

  • Now to run cts we type
run_cts

499fd0d5-df3e-4aa1-ba64-7a1da4edc124

Power Report

51bb70da-2fd4-4a10-a43c-def355a3860f

8bfac8f2-3cc9-4b86-9045-5b7debd339f2 04b87e02-d874-4e79-ba62-59443d14faa7 34b84ed1-d3b5-42fb-ac3f-72c442b1ccc6 e330a2a3-e955-44fc-9702-f9ef53d901ef 1dff4f35-54df-457a-a008-9f3dc24a80ad

Skew report

As it is an asynchronous digital system you get below report

e1056ab6-becc-41ad-9e34-9ba9998c7925

Area report

faa1921f-acfd-4fbd-8800-98575450424f

Power Distribution Network

gen_pdn

52b05c5f-55ac-4bea-815e-6672d16a6b25

Routing

  • Now to run routing we type
run_routing
  • To view the design we type
magic -T /home/apoorva/.volare/sky130A/libs.tech/magic/sky130A.tech lef read ../../tmp/merged.nom.lef def UART_TX.def &

275cb3e2-583f-45af-9123-41806e530ada 116c1a41-1a15-4a55-80ae-c3d89841dcab 47e93a79-e6a2-4627-a538-f5109f8915a9

Power report

d20a125c-c8d8-44c5-8e26-2e3e639ef692

Congestion report

d5ffffe1-6ab8-436b-8631-9501aed8d03a

Area report

faa1921f-acfd-4fbd-8800-98575450424f

Summary report

0c9daf09-e7e0-4176-ab5e-0d203391f091

Statistics

  • Area= 1256 u^2
  • Total power= 1.42 e^04 watts
  • Internal power= 8.38 e^05 watts
  • Switching power=5.84 e^05 watts
  • Leakage power= 6.42 e^10 watts

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published