SlideShare a Scribd company logo
1 of 20
REGISTER TRANSFER LEVEL MODEL
Dr. MURTHY YAYAVARAM Ph.D
Lecture-2 : Digital Design Using Verilog-
For Absolute Beginners
What is RTL?
• Students who are learning the HDLs like Verilog
come across the term RTL modelling regularly.
• Many of them will have a simple doubt . Actually
what is this RTL ?
• What is its relevance in the Verilog Course?
• Let us now try to understand this basic concept.
• I think, many of you have got an idea, about the
meaning of Design and the role of Verilog in Digital
Design.
15 June 2020 2yayavaram@yahoo.com
contd
• To understand this RTL, let us recall that there are
two types of digital circuits and they are
Combinational and Sequential
• When compared to the combinational circuits, the
sequential circuits are little bit complex.
• A Digital systems is a sequential logic system with
flip-flops and Gates.
• Normally these circuits are specified or analysed by
state tables.
15 June 2020 3yayavaram@yahoo.com
contd
• As long as the digital system is simple, there will
not be any problem in the design using state tables.
• But as the digital system becomes complex, the
state table method become cumbersome.(For
example a Microprocessor)
• So, a modular approach is opted. i.e the complex
system is partitioned into modular subsystems,
each of which performs some function.
• These sub-systems also known as modules.
• Modules are constructed using digital devices like
registers, multiplexers , decoders, alu and control
logic.15 June 2020 4yayavaram@yahoo.com
contd
• These various modules are interconnected with
data paths and control signals to form a digital
systems.
• So, a digital system can be best defined by a set of
registers and the operations that are performed on
the binary information stored in them.
• These operations are load, shift,count and clear etc.
• The information flow and processing performed on
the data stored in the registers are referred as
Registered Transfer Operations
15 June 2020 5yayavaram@yahoo.com
Example
15 June 2020 6yayavaram@yahoo.com
contd
• So, a digital system is denoted at the register
Transfer Level and specified by the following
features.
(i).The set of registers in the system.
(ii).The operations that are performed on the data
stored in the registers.
(iii).The control that supervises the sequence of
operations in the system.
15 June 2020 7yayavaram@yahoo.com
What is a Register?
• A register is a set of flip-flops that stores binary
information and has the capability of performing one
or more elementary operations.
• A register can load new information or shift the
information left or right .
• Similarly a ‘counter’ is also a register that
increments a number by a fixed value(say by 1).
• A flip-flop is a one bit register (latch) that can be set,
cleared or complemented.
15 June 2020 8yayavaram@yahoo.com
contd
• Next is the control. In a digital system the
operations discussed earlier are controlled by
‘timing signals’ which sequence the operations in a
prescribed manner.
• Certain conditions that depend on results of previous
operations may determine the sequence of future
operations.
• The output of control logic are binary variables
which initiates the various operations in the systems
registers.
15 June 2020 9yayavaram@yahoo.com
Example
• Let us consider a simple case : R2  R1 .It denotes
the transfer of contents of register R1 into the
register R2. i.e the replacement of the contents of R2
by the contents of R1
• The important point to be noted here is, the
contents of the source are not changed after
transfer i.e it is only copied.
• Now, coming to the control, the controller in digital
system is a finite state machine, whose outputs are
the control signals that governs the register
operations.15 June 2020 10yayavaram@yahoo.com
contd
• There are two types of Finite state machines .One is
Synchronous and the other is Asynchronous.
• In a synchronous machine , the operations are
synchronized by the system clock.
• A statement that specifies a register transfer
operation ,implies that a data path ( a set of circuit
connections) is available from the outputs of the
source register to inputs of the destination register
and that the destination register has a parallel load
capacity.
15 June 2020 11yayavaram@yahoo.com
contd
• Of course , data can be transferred serially also
between registers , by repeatedly shifting their
contents along a single wire one bit at a time.
• Normally the register transfer operations are
expected only under a predetermined condition not
at every clock cycle.
• A conditional statement controlling a register
transfer operation is symbolized with an if..then
statement.
15 June 2020 12yayavaram@yahoo.com
contd
• Ex: If (T1 =1 ) then (R2 ←R1)
where T1 is a control signal generated in the
control section.
• It is to be noted that here the clock is not
included as a variable .
• But it is assumed that all the transfers occur at
clock edge transition.
( a transition from 0 to 1 or from 1 to 0)
15 June 2020 13yayavaram@yahoo.com
contd
• Although a control condition such as T1 may
become true before the clock transition, but the
actual transfer does not occur until the clock
transition does.
• A ‘comma’ may be used to separate two or more
operations that are executed concurrently.(at the
same time).
Ex: If (T3=1) then (R2←R1, R1←R2)
15 June 2020 14yayavaram@yahoo.com
contd
• This statement specifies an operation that exchanges
the contents of two registers and both these registers
are triggered by the same clock edge, provided that
T3=1.
• This simultaneous operation is possible with
registers that have negative edge triggered flip-flops
controlled by a common clock.
• Ex: R1 ← R1 + R2 : Add R1 to R2 and transfer
the contents to R1
15 June 2020 15yayavaram@yahoo.com
contd
• R3 ← R3 + 1 : Increment R3 by 1(Up counter)
• R4 ← shr R4 : Shift R4 right
• R5 ← 0 : clear R5 to 0.
• The type of operations that most commonly used in
Digital systems can be classified into four types.
• Transfer operations ,which transfer (copy)data from
one register to another register.
• Arithmetic operations ,which perform arithmetic on
data in registers.
15 June 2020 16yayavaram@yahoo.com
contd
• Logic operations ,which perform bit manipulations
of nonnumeric data in Registers(Logical AND).
• Shift operations, which shift data between registers.
• The transfer operation does not change the
information content of the data being moved from
the source register to destination register.
• The other three operations change the information
content during the transfer.
15 June 2020 17yayavaram@yahoo.com
RTL Verilog Example
• In Verilog, RTL operations use a combination of
behavioural and data flow constructs and are
employed to specify the register operations and the
combinational logic functions implemented by
hardware.
• Register transfers are specified by means of
procedural assignment statements within an edge –
sensitive cyclic behaviour.
15 June 2020 18yayavaram@yahoo.com
contd
• Combinational circuit functions are specified at RTL
level by means continuous assignment statements or
by procedural assignment statements within a level –
sensitive cyclic behaviour.
• The symbol used to designate a register transfer is
either an equal sign(=) or an arrow(<=).
• The “always” keyword is used to indicate the
execution of associated block statements repeatedly
for the time of simulation.
15 June 2020 19yayavaram@yahoo.com
contd
• The @ operator and the event control expression
preceding the block of statements , synchronize the
execution of the statements to the clock event.
• Ex: (i). assign S = A+B ;//continuous assignment
(ii).always @(A,B) //level sensitive cyclic
S= A+B;// combinational logic for addition.
(iii). always @ (negedge clock)
begin
R1 = R1+ R2;//blocking procedural
R3 = R1; //register transfer operation
end
15 June 2020 20yayavaram@yahoo.com

More Related Content

What's hot

8051 Timers / Counters
8051 Timers / Counters8051 Timers / Counters
8051 Timers / Counters
Patricio Lima
 

What's hot (20)

UNIT-II CPLD & FPGA Architectures and Applications
UNIT-II CPLD & FPGA  Architectures   and ApplicationsUNIT-II CPLD & FPGA  Architectures   and Applications
UNIT-II CPLD & FPGA Architectures and Applications
 
verification_planning_systemverilog_uvm_2020
verification_planning_systemverilog_uvm_2020verification_planning_systemverilog_uvm_2020
verification_planning_systemverilog_uvm_2020
 
Level sensitive scan design(LSSD) and Boundry scan(BS)
Level sensitive scan design(LSSD) and Boundry scan(BS)Level sensitive scan design(LSSD) and Boundry scan(BS)
Level sensitive scan design(LSSD) and Boundry scan(BS)
 
Low Power VLSI Design
Low Power VLSI DesignLow Power VLSI Design
Low Power VLSI Design
 
Uvm dac2011 final_color
Uvm dac2011 final_colorUvm dac2011 final_color
Uvm dac2011 final_color
 
Divide by N clock
Divide by N clockDivide by N clock
Divide by N clock
 
ADC - Analog to Digital Conversion on AVR microcontroller Atmega16
ADC - Analog to Digital  Conversion on AVR microcontroller Atmega16ADC - Analog to Digital  Conversion on AVR microcontroller Atmega16
ADC - Analog to Digital Conversion on AVR microcontroller Atmega16
 
Verilog HDL
Verilog HDLVerilog HDL
Verilog HDL
 
UNIT-III-DIGITAL SYSTEM DESIGN
UNIT-III-DIGITAL SYSTEM DESIGNUNIT-III-DIGITAL SYSTEM DESIGN
UNIT-III-DIGITAL SYSTEM DESIGN
 
Verilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesVerilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with Examples
 
Delays in verilog
Delays in verilogDelays in verilog
Delays in verilog
 
Pipelining approach
Pipelining approachPipelining approach
Pipelining approach
 
Functional verification techniques EW16 session
Functional verification techniques  EW16 sessionFunctional verification techniques  EW16 session
Functional verification techniques EW16 session
 
Embedded c program and programming structure for beginners
Embedded c program and programming structure for beginnersEmbedded c program and programming structure for beginners
Embedded c program and programming structure for beginners
 
CMOS LOGIC STRUCTURES
CMOS LOGIC STRUCTURESCMOS LOGIC STRUCTURES
CMOS LOGIC STRUCTURES
 
Digital Integrated Circuit (IC) Design
Digital Integrated Circuit (IC) DesignDigital Integrated Circuit (IC) Design
Digital Integrated Circuit (IC) Design
 
VLSI Fresher Resume
VLSI Fresher ResumeVLSI Fresher Resume
VLSI Fresher Resume
 
8051 Timers / Counters
8051 Timers / Counters8051 Timers / Counters
8051 Timers / Counters
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architecture
 
Driving large capacitive loads
Driving large capacitive loadsDriving large capacitive loads
Driving large capacitive loads
 

Similar to RTL-Design for beginners

computer-system-architecture-morris-mano-220720124304-fefd641d.pdf
computer-system-architecture-morris-mano-220720124304-fefd641d.pdfcomputer-system-architecture-morris-mano-220720124304-fefd641d.pdf
computer-system-architecture-morris-mano-220720124304-fefd641d.pdf
KunalSahu180994
 
Computer organiztion4
Computer organiztion4Computer organiztion4
Computer organiztion4
Umang Gupta
 
PPT in register and micro operations in electronic
PPT in register and micro operations in electronicPPT in register and micro operations in electronic
PPT in register and micro operations in electronic
aaravjamela
 
arithmeticmicrooperations-180130061637.pptx
arithmeticmicrooperations-180130061637.pptxarithmeticmicrooperations-180130061637.pptx
arithmeticmicrooperations-180130061637.pptx
AshokRachapalli1
 

Similar to RTL-Design for beginners (20)

COMP.CE.200_2022_11.pdf
COMP.CE.200_2022_11.pdfCOMP.CE.200_2022_11.pdf
COMP.CE.200_2022_11.pdf
 
transaction_processing.ppt
transaction_processing.ppttransaction_processing.ppt
transaction_processing.ppt
 
Transactions
TransactionsTransactions
Transactions
 
Concepts of Data Base Management Systems
Concepts of Data Base Management SystemsConcepts of Data Base Management Systems
Concepts of Data Base Management Systems
 
mano.ppt
mano.pptmano.ppt
mano.ppt
 
computer-system-architecture-morris-mano-220720124304-fefd641d.pdf
computer-system-architecture-morris-mano-220720124304-fefd641d.pdfcomputer-system-architecture-morris-mano-220720124304-fefd641d.pdf
computer-system-architecture-morris-mano-220720124304-fefd641d.pdf
 
Chapter-10 Transaction Processing and Error Recovery
Chapter-10 Transaction Processing and Error RecoveryChapter-10 Transaction Processing and Error Recovery
Chapter-10 Transaction Processing and Error Recovery
 
Transaction and serializability
Transaction and serializabilityTransaction and serializability
Transaction and serializability
 
Computer organiztion4
Computer organiztion4Computer organiztion4
Computer organiztion4
 
unit06-dbms-new.ppt
unit06-dbms-new.pptunit06-dbms-new.ppt
unit06-dbms-new.ppt
 
Unit 4 dbms
Unit 4 dbmsUnit 4 dbms
Unit 4 dbms
 
PPT in register and micro operations in electronic
PPT in register and micro operations in electronicPPT in register and micro operations in electronic
PPT in register and micro operations in electronic
 
Transaction processing
Transaction processingTransaction processing
Transaction processing
 
REGISTER TRANSFER AND MICROOPERATIONS
REGISTER  TRANSFER  AND  MICROOPERATIONSREGISTER  TRANSFER  AND  MICROOPERATIONS
REGISTER TRANSFER AND MICROOPERATIONS
 
unit1COA Computer Organisation and Architecture
unit1COA Computer Organisation and Architectureunit1COA Computer Organisation and Architecture
unit1COA Computer Organisation and Architecture
 
Arithmetic micro operations
Arithmetic micro operationsArithmetic micro operations
Arithmetic micro operations
 
CS304PC:Computer Organization and Architecture Session 2 Registers .pptx
CS304PC:Computer Organization and Architecture Session 2 Registers .pptxCS304PC:Computer Organization and Architecture Session 2 Registers .pptx
CS304PC:Computer Organization and Architecture Session 2 Registers .pptx
 
Circuitrix@Pragyan 2015 NITT
Circuitrix@Pragyan 2015 NITTCircuitrix@Pragyan 2015 NITT
Circuitrix@Pragyan 2015 NITT
 
Unit 06 dbms
Unit 06 dbmsUnit 06 dbms
Unit 06 dbms
 
arithmeticmicrooperations-180130061637.pptx
arithmeticmicrooperations-180130061637.pptxarithmeticmicrooperations-180130061637.pptx
arithmeticmicrooperations-180130061637.pptx
 

More from Dr.YNM

More from Dr.YNM (20)

Introduction to DSP.ppt
Introduction to DSP.pptIntroduction to DSP.ppt
Introduction to DSP.ppt
 
Atmel.ppt
Atmel.pptAtmel.ppt
Atmel.ppt
 
PIC Microcontrollers.ppt
PIC Microcontrollers.pptPIC Microcontrollers.ppt
PIC Microcontrollers.ppt
 
Crystalstructure-.ppt
Crystalstructure-.pptCrystalstructure-.ppt
Crystalstructure-.ppt
 
Basics of OS & RTOS.ppt
Basics of OS & RTOS.pptBasics of OS & RTOS.ppt
Basics of OS & RTOS.ppt
 
Introducion to MSP430 Microcontroller.pptx
Introducion to MSP430 Microcontroller.pptxIntroducion to MSP430 Microcontroller.pptx
Introducion to MSP430 Microcontroller.pptx
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.ppt
 
Introduction to ASICs.pptx
Introduction to ASICs.pptxIntroduction to ASICs.pptx
Introduction to ASICs.pptx
 
Basics of data communications.pptx
Basics of data communications.pptxBasics of data communications.pptx
Basics of data communications.pptx
 
CPLD & FPGA Architectures and applictionsplications.pptx
CPLD & FPGA Architectures and applictionsplications.pptxCPLD & FPGA Architectures and applictionsplications.pptx
CPLD & FPGA Architectures and applictionsplications.pptx
 
Transient response of RC , RL circuits with step input
Transient response of RC , RL circuits  with step inputTransient response of RC , RL circuits  with step input
Transient response of RC , RL circuits with step input
 
CISC & RISC ARCHITECTURES
CISC & RISC ARCHITECTURESCISC & RISC ARCHITECTURES
CISC & RISC ARCHITECTURES
 
Lect 4 ARM PROCESSOR ARCHITECTURE
Lect 4 ARM PROCESSOR ARCHITECTURELect 4 ARM PROCESSOR ARCHITECTURE
Lect 4 ARM PROCESSOR ARCHITECTURE
 
Lect 3 ARM PROCESSOR ARCHITECTURE
Lect 3  ARM PROCESSOR ARCHITECTURE Lect 3  ARM PROCESSOR ARCHITECTURE
Lect 3 ARM PROCESSOR ARCHITECTURE
 
Microprocessor Architecture 4
Microprocessor Architecture  4Microprocessor Architecture  4
Microprocessor Architecture 4
 
Lect 2 ARM processor architecture
Lect 2 ARM processor architectureLect 2 ARM processor architecture
Lect 2 ARM processor architecture
 
Microprocessor Architecture-III
Microprocessor Architecture-IIIMicroprocessor Architecture-III
Microprocessor Architecture-III
 
LECT 1: ARM PROCESSORS
LECT 1: ARM PROCESSORSLECT 1: ARM PROCESSORS
LECT 1: ARM PROCESSORS
 
Microprocessor architecture II
Microprocessor architecture   IIMicroprocessor architecture   II
Microprocessor architecture II
 
Verilog Test Bench
Verilog Test BenchVerilog Test Bench
Verilog Test Bench
 

Recently uploaded

notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
HenryBriggs2
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 

Recently uploaded (20)

Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 

RTL-Design for beginners

  • 1. REGISTER TRANSFER LEVEL MODEL Dr. MURTHY YAYAVARAM Ph.D Lecture-2 : Digital Design Using Verilog- For Absolute Beginners
  • 2. What is RTL? • Students who are learning the HDLs like Verilog come across the term RTL modelling regularly. • Many of them will have a simple doubt . Actually what is this RTL ? • What is its relevance in the Verilog Course? • Let us now try to understand this basic concept. • I think, many of you have got an idea, about the meaning of Design and the role of Verilog in Digital Design. 15 June 2020 2yayavaram@yahoo.com
  • 3. contd • To understand this RTL, let us recall that there are two types of digital circuits and they are Combinational and Sequential • When compared to the combinational circuits, the sequential circuits are little bit complex. • A Digital systems is a sequential logic system with flip-flops and Gates. • Normally these circuits are specified or analysed by state tables. 15 June 2020 3yayavaram@yahoo.com
  • 4. contd • As long as the digital system is simple, there will not be any problem in the design using state tables. • But as the digital system becomes complex, the state table method become cumbersome.(For example a Microprocessor) • So, a modular approach is opted. i.e the complex system is partitioned into modular subsystems, each of which performs some function. • These sub-systems also known as modules. • Modules are constructed using digital devices like registers, multiplexers , decoders, alu and control logic.15 June 2020 4yayavaram@yahoo.com
  • 5. contd • These various modules are interconnected with data paths and control signals to form a digital systems. • So, a digital system can be best defined by a set of registers and the operations that are performed on the binary information stored in them. • These operations are load, shift,count and clear etc. • The information flow and processing performed on the data stored in the registers are referred as Registered Transfer Operations 15 June 2020 5yayavaram@yahoo.com
  • 6. Example 15 June 2020 6yayavaram@yahoo.com
  • 7. contd • So, a digital system is denoted at the register Transfer Level and specified by the following features. (i).The set of registers in the system. (ii).The operations that are performed on the data stored in the registers. (iii).The control that supervises the sequence of operations in the system. 15 June 2020 7yayavaram@yahoo.com
  • 8. What is a Register? • A register is a set of flip-flops that stores binary information and has the capability of performing one or more elementary operations. • A register can load new information or shift the information left or right . • Similarly a ‘counter’ is also a register that increments a number by a fixed value(say by 1). • A flip-flop is a one bit register (latch) that can be set, cleared or complemented. 15 June 2020 8yayavaram@yahoo.com
  • 9. contd • Next is the control. In a digital system the operations discussed earlier are controlled by ‘timing signals’ which sequence the operations in a prescribed manner. • Certain conditions that depend on results of previous operations may determine the sequence of future operations. • The output of control logic are binary variables which initiates the various operations in the systems registers. 15 June 2020 9yayavaram@yahoo.com
  • 10. Example • Let us consider a simple case : R2  R1 .It denotes the transfer of contents of register R1 into the register R2. i.e the replacement of the contents of R2 by the contents of R1 • The important point to be noted here is, the contents of the source are not changed after transfer i.e it is only copied. • Now, coming to the control, the controller in digital system is a finite state machine, whose outputs are the control signals that governs the register operations.15 June 2020 10yayavaram@yahoo.com
  • 11. contd • There are two types of Finite state machines .One is Synchronous and the other is Asynchronous. • In a synchronous machine , the operations are synchronized by the system clock. • A statement that specifies a register transfer operation ,implies that a data path ( a set of circuit connections) is available from the outputs of the source register to inputs of the destination register and that the destination register has a parallel load capacity. 15 June 2020 11yayavaram@yahoo.com
  • 12. contd • Of course , data can be transferred serially also between registers , by repeatedly shifting their contents along a single wire one bit at a time. • Normally the register transfer operations are expected only under a predetermined condition not at every clock cycle. • A conditional statement controlling a register transfer operation is symbolized with an if..then statement. 15 June 2020 12yayavaram@yahoo.com
  • 13. contd • Ex: If (T1 =1 ) then (R2 ←R1) where T1 is a control signal generated in the control section. • It is to be noted that here the clock is not included as a variable . • But it is assumed that all the transfers occur at clock edge transition. ( a transition from 0 to 1 or from 1 to 0) 15 June 2020 13yayavaram@yahoo.com
  • 14. contd • Although a control condition such as T1 may become true before the clock transition, but the actual transfer does not occur until the clock transition does. • A ‘comma’ may be used to separate two or more operations that are executed concurrently.(at the same time). Ex: If (T3=1) then (R2←R1, R1←R2) 15 June 2020 14yayavaram@yahoo.com
  • 15. contd • This statement specifies an operation that exchanges the contents of two registers and both these registers are triggered by the same clock edge, provided that T3=1. • This simultaneous operation is possible with registers that have negative edge triggered flip-flops controlled by a common clock. • Ex: R1 ← R1 + R2 : Add R1 to R2 and transfer the contents to R1 15 June 2020 15yayavaram@yahoo.com
  • 16. contd • R3 ← R3 + 1 : Increment R3 by 1(Up counter) • R4 ← shr R4 : Shift R4 right • R5 ← 0 : clear R5 to 0. • The type of operations that most commonly used in Digital systems can be classified into four types. • Transfer operations ,which transfer (copy)data from one register to another register. • Arithmetic operations ,which perform arithmetic on data in registers. 15 June 2020 16yayavaram@yahoo.com
  • 17. contd • Logic operations ,which perform bit manipulations of nonnumeric data in Registers(Logical AND). • Shift operations, which shift data between registers. • The transfer operation does not change the information content of the data being moved from the source register to destination register. • The other three operations change the information content during the transfer. 15 June 2020 17yayavaram@yahoo.com
  • 18. RTL Verilog Example • In Verilog, RTL operations use a combination of behavioural and data flow constructs and are employed to specify the register operations and the combinational logic functions implemented by hardware. • Register transfers are specified by means of procedural assignment statements within an edge – sensitive cyclic behaviour. 15 June 2020 18yayavaram@yahoo.com
  • 19. contd • Combinational circuit functions are specified at RTL level by means continuous assignment statements or by procedural assignment statements within a level – sensitive cyclic behaviour. • The symbol used to designate a register transfer is either an equal sign(=) or an arrow(<=). • The “always” keyword is used to indicate the execution of associated block statements repeatedly for the time of simulation. 15 June 2020 19yayavaram@yahoo.com
  • 20. contd • The @ operator and the event control expression preceding the block of statements , synchronize the execution of the statements to the clock event. • Ex: (i). assign S = A+B ;//continuous assignment (ii).always @(A,B) //level sensitive cyclic S= A+B;// combinational logic for addition. (iii). always @ (negedge clock) begin R1 = R1+ R2;//blocking procedural R3 = R1; //register transfer operation end 15 June 2020 20yayavaram@yahoo.com