SlideShare a Scribd company logo
1 of 26
CAN CONTROLLER
IMPLEMENTATION
BY: HAGAI GAMLIEL AND SHAHAR GEFEN
SUPERVISOR: SHAHAR GINO
CAN YOU HEAR ME?
PROJECT GOALS
Design and Implementation of a CAN BUS
Controller for a reliable and robust
communication between different nodes
Using can bus protocol by BOSCH company
BACKGROUND AND MOTIVATION
• The can protocol implements
only layers 2 and 3 from
the 7 layers of the OSI model
for communication between
different nodes of a
communication network
BACKGROUND AND MOTIVATION
The Controller Area Network (CAN) is a serial
communication protocol used extensively for high-
speed embedded applications where noise immunity
and robustness is necessary.
• The CAN protocol uses a twisted pair cable to communicate
at speeds up to 1 Mbps (minimum 0.125Mbps).
It is highly fault-tolerant, making it ideal for safety-critical
applications.
• It is used for backbone network as well as the powertrain,
BACKGROUND AND MOTIVATION
• Asynchronous communication
• Any node can access the bus when the bus is quiet
• Non-destructive arbitration, 100% use of the
bandwidth without loss of data
• Automatic error detection, signaling and retries
• All nodes can send a message at any time, when
two nodes access the bus together, arbitration
decides who will continue.
• Bit stuffing is used to maintain synchronization.
HOW DOES A CAN BUS SYSTEM LOOKS LIKE?
COMMONLY USED IN CAR MOBILE SYSTEMS
DESIGN FLOW
BOSCH Can
specification
and AMBA
APB protocol
learning
Architecture
and design
implementati
on
in System
Verilog
Simulation,
Synthesis,
Layout
CAN SPECIFICATION
MESSAGE TRANSFER
• 4 different message-types (“frames”): Data, Remote, Error and Overload.
• Faulty nodes are automatically dropped from the bus, which prevents
any single node from bringing a network down, and ensures that
bandwidth is always available for critical message transmission (“Fault
Confinement”).
CAN
frame
DATA/REMO
TE
9
CAN SPECIFICATION
MESSAGE TRANSFER
CAN SPECIFICATION
ARBITRATION MECHANISM
AMBA APB PROTOCOL
Write transfer with wait stateRead transfer with wait state
ARCHITECTURE AND DESIGN
Node 1
CPU
CAN CONTROLER
CAN Transiver
CAN_H
CAN_L
Node 2
CPU
CAN CONTROLER
CAN Transiver
Node N
CPU
CAN CONTROLER
CAN Transiver
CAN BUS
ARCHITECTURE AND DESIGN
BLOCK DIAGRAM
ARCHITECTURE AND DESIGN
CAN CONTROLLER INTERFACE
• fclk – outer clock. Came from the cpu/mcu
which is connected to the controller.
• APB Interface – A transfer protocol for
communication between the cpu/mcu
and the controller (AMBA APB protocol).
• Interrupt – signal’s that one message
(or more) is received.
• Can Tx – the output signal which sent to the bus
• Can Rx – the input signal which came from the bus
paddr
pwrite
psel
penable
fclk
Rst_n
prdata[31:0]
pready
int
pwdata[31:0]
Can_tx
Can_rx
Canbus
InterruptAPBInterface
CAN Module
ARCHITECTURE AND DESIGN
BIT TIMING
The can bus uses asynchronous communication. Therefore, a
way to synchronize between the different nodes which connected
to the bus is needed.
Synchronization:
• Bit stuffing – If 5 consecutive bits with the same logic value
(‘0’ or ‘1’) occur in a row,
a bit with the opposite logic value (‘1’ or ‘0’) is sent.
• Hard synchronization – Every time that a data(or remote)
frame is sent, there is a transition from a sequence of logic
‘1’s to logic ‘0’, which represents ‘start of frame’ and used
ARCHITECTURE AND DESIGN
BIT TIMING – DEFINES THE BUS CLOCK
 
/ /Phase_Seg2 max(PhaseSeg1,InfoProcessingTime) time quanta
1
1 Prop_seg Phase_Seg1+Phase_Seg2
1
1 1 Prop_seg Phase_Seg1+Phase_Seg2
BRP
T
Q f
clk
T T
bus Q
f
clkf
bus BRP



   
 
  
   
ARCHITECTURE AND DESIGN
BIT TIMING
• Nominal bit rate is the number of bits per second transmitted in the
absence of resynchronization by an ideal transmitter.
• SYNC_SEG used to synchronize the various nodes on the bus.
• PROP_SEG used to compensate for the physical delay times within the
network.
• PHASE_SEG1, PHASE_SEG2 used to compensate for edge phase errors.
• Sample point is the point in time at which the bus level is read and
interpreted.
• Time quantum is a the fixed unit of time which can be derived from
the oscillator period.
SIMULATION
VERIFICATION TEST BENCH
• The simulation is built as two Can Controller
DUT units such as DUT2 is the stub and verifier
of DUT1.
• The APB stub is a functional unit that works by
the AMBA APB protocol and represents the
cpu/mcu that communicates with the controller.
The test-suit included a test for every internal
block, and final integration test for the whole
scheme of the controller.
SIMULATION
VERIFICATION TEST BENCH
• Reset Node1 and Node2
• Configure bit timing registers for both Nodes
• Write data to node1 and node 2 to be
transmitted ‘Data Frame’ simultaneously
on bus
initial begin
fclk=0;
rst_n1 = 0;
rst_n2 = 0;
#200
rst_n1 = 1;
rst_n2 = 1;
bit_time_config1;
bit_time_config2;
#10
apb_write_data_frame1;
apb_write_data_frame2;
#400000 $finish;
end
SIMULATION
WAVEFORM DIAGRAM
As can be seen, Node1 and
Node2 tried to send
a Data Frame to the bus.
Node1 has won the
arbitration stage and hence
continued to send his message
while Node2 stopped.
It can be seen that Node2 recieved the data which sent by Node1
and in the end of the frame the interrupt signal rose.
SYNTHESIS
TIMING REPORT – LONGEST PATH
SYNTHESIS
RESULTS SUMMARIES
The synthesis run with fclk=100Mhz which is the maximum frequency
of the controller.
synthesis result:
Total 9 cells
• Time
data required time 9.88 ns
data arrival time -9.79 ns
• Area
Total cell area: 95864.5
Total area: 136792.9
• Power
total power 68.0113 mW
0.5𝜇𝑚2
0.5𝜇𝑚2
LAYOUT
FLOORPLAN - PHYSICAL VIEW
• Tower 0.18u design kit
• Encounter 14.1
𝑇𝑜𝑡𝑎𝑙 𝑠𝑖𝑧𝑒 2074 × 2008 𝜇𝑚2
SUMMARY
•Explanation for the need of a good
communication controller.
•Can BOSCH and APB protocol specifications
•Architecture and design of the controller
•Test bench Simulation, Synthesis and Layout
THANK YOU FOR LISTENING

More Related Content

What's hot

Interfacing with Atmega 16
Interfacing with Atmega 16Interfacing with Atmega 16
Interfacing with Atmega 16Ramadan Ramadan
 
Prerequriment of microcontroller
Prerequriment of microcontrollerPrerequriment of microcontroller
Prerequriment of microcontrollerKshitij Wagle
 
Embedded System Programming on ARM Cortex M3 and M4 Course
Embedded System Programming on ARM Cortex M3 and M4 CourseEmbedded System Programming on ARM Cortex M3 and M4 Course
Embedded System Programming on ARM Cortex M3 and M4 CourseFastBit Embedded Brain Academy
 
Assembler Programming
Assembler ProgrammingAssembler Programming
Assembler ProgrammingOmar Sanchez
 
AVR programming - BASICS
AVR programming - BASICSAVR programming - BASICS
AVR programming - BASICSRobotix 2011
 
microcontroller basics
microcontroller basicsmicrocontroller basics
microcontroller basicssagar Ramdev
 
Chp3 designing bus system, memory & io copy
Chp3 designing bus system, memory & io   copyChp3 designing bus system, memory & io   copy
Chp3 designing bus system, memory & io copymkazree
 
Pic microcontroller [autosaved] [autosaved]
Pic microcontroller [autosaved] [autosaved]Pic microcontroller [autosaved] [autosaved]
Pic microcontroller [autosaved] [autosaved]gauravholani
 
Interrupts at AVR
Interrupts at AVRInterrupts at AVR
Interrupts at AVRHamdy Fouad
 
L9 understanding-atmega328 p-2
L9 understanding-atmega328 p-2L9 understanding-atmega328 p-2
L9 understanding-atmega328 p-2rsamurti
 
Chp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copyChp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copymkazree
 
Synthesis & FPGA Implementation of UART IP Soft Core
Synthesis & FPGA Implementation of UART IP Soft CoreSynthesis & FPGA Implementation of UART IP Soft Core
Synthesis & FPGA Implementation of UART IP Soft Coreijsrd.com
 
AVR Micro controller Interfacing
AVR Micro controller Interfacing AVR Micro controller Interfacing
AVR Micro controller Interfacing Raghav Shetty
 

What's hot (19)

Interfacing with Atmega 16
Interfacing with Atmega 16Interfacing with Atmega 16
Interfacing with Atmega 16
 
Prerequriment of microcontroller
Prerequriment of microcontrollerPrerequriment of microcontroller
Prerequriment of microcontroller
 
Embedded System Programming on ARM Cortex M3 and M4 Course
Embedded System Programming on ARM Cortex M3 and M4 CourseEmbedded System Programming on ARM Cortex M3 and M4 Course
Embedded System Programming on ARM Cortex M3 and M4 Course
 
Assembler Programming
Assembler ProgrammingAssembler Programming
Assembler Programming
 
STM32 MCU Family
STM32 MCU FamilySTM32 MCU Family
STM32 MCU Family
 
Introduction to Microcontrollers
Introduction to MicrocontrollersIntroduction to Microcontrollers
Introduction to Microcontrollers
 
A tmega8 basics
A tmega8 basicsA tmega8 basics
A tmega8 basics
 
Presentation
PresentationPresentation
Presentation
 
AT mega8 basics
AT mega8 basicsAT mega8 basics
AT mega8 basics
 
AVR programming - BASICS
AVR programming - BASICSAVR programming - BASICS
AVR programming - BASICS
 
microcontroller basics
microcontroller basicsmicrocontroller basics
microcontroller basics
 
89c5131datasheet
89c5131datasheet89c5131datasheet
89c5131datasheet
 
Chp3 designing bus system, memory & io copy
Chp3 designing bus system, memory & io   copyChp3 designing bus system, memory & io   copy
Chp3 designing bus system, memory & io copy
 
Pic microcontroller [autosaved] [autosaved]
Pic microcontroller [autosaved] [autosaved]Pic microcontroller [autosaved] [autosaved]
Pic microcontroller [autosaved] [autosaved]
 
Interrupts at AVR
Interrupts at AVRInterrupts at AVR
Interrupts at AVR
 
L9 understanding-atmega328 p-2
L9 understanding-atmega328 p-2L9 understanding-atmega328 p-2
L9 understanding-atmega328 p-2
 
Chp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copyChp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copy
 
Synthesis & FPGA Implementation of UART IP Soft Core
Synthesis & FPGA Implementation of UART IP Soft CoreSynthesis & FPGA Implementation of UART IP Soft Core
Synthesis & FPGA Implementation of UART IP Soft Core
 
AVR Micro controller Interfacing
AVR Micro controller Interfacing AVR Micro controller Interfacing
AVR Micro controller Interfacing
 

Viewers also liked

rh-demand-skilled-talent-report-us
rh-demand-skilled-talent-report-usrh-demand-skilled-talent-report-us
rh-demand-skilled-talent-report-usZack Wepfer (he/his)
 
Seo wedding-catering-milwaukee
Seo wedding-catering-milwaukeeSeo wedding-catering-milwaukee
Seo wedding-catering-milwaukeeSakara Johnson
 
Operadores basicos de Google
Operadores basicos de GoogleOperadores basicos de Google
Operadores basicos de Googlereyser2017
 
Engranajes de dientes rectos
Engranajes de dientes rectosEngranajes de dientes rectos
Engranajes de dientes rectosjorgeheberto
 
Workbook reference material
Workbook reference material Workbook reference material
Workbook reference material adrian corrales
 
7 26-16-organic-search-engine-rankings-catering-2
7 26-16-organic-search-engine-rankings-catering-27 26-16-organic-search-engine-rankings-catering-2
7 26-16-organic-search-engine-rankings-catering-2Sakara Johnson
 
Success report-dec 01, 2015 - dec 31, 2015
Success report-dec 01, 2015 - dec 31, 2015Success report-dec 01, 2015 - dec 31, 2015
Success report-dec 01, 2015 - dec 31, 2015Sakara Johnson
 
June july-catering-organic-search-engine-rankings-pt1
June july-catering-organic-search-engine-rankings-pt1June july-catering-organic-search-engine-rankings-pt1
June july-catering-organic-search-engine-rankings-pt1Sakara Johnson
 
About Chef Michael Feker
About Chef Michael FekerAbout Chef Michael Feker
About Chef Michael FekerSakara Johnson
 
Busqueda avanzada Google
Busqueda avanzada GoogleBusqueda avanzada Google
Busqueda avanzada Googlereyser2017
 
Seo catering-milwaukee-4
Seo catering-milwaukee-4Seo catering-milwaukee-4
Seo catering-milwaukee-4Sakara Johnson
 
Seo catering-milwaukee-6
Seo catering-milwaukee-6Seo catering-milwaukee-6
Seo catering-milwaukee-6Sakara Johnson
 
Herramienta scoopit
Herramienta scoopitHerramienta scoopit
Herramienta scoopitreyser2017
 
Seo catering-milwaukee-2
Seo catering-milwaukee-2Seo catering-milwaukee-2
Seo catering-milwaukee-2Sakara Johnson
 
Graduate Certificate & Transcripts
Graduate Certificate & TranscriptsGraduate Certificate & Transcripts
Graduate Certificate & TranscriptsShahar Gefen
 
Catalogo de imagenes obras de arquitectura del renacimiento
Catalogo de imagenes obras de arquitectura del renacimientoCatalogo de imagenes obras de arquitectura del renacimiento
Catalogo de imagenes obras de arquitectura del renacimientoDavid Moises Carrasquero Pino
 

Viewers also liked (20)

Virgin Media Profile
Virgin Media ProfileVirgin Media Profile
Virgin Media Profile
 
rh-demand-skilled-talent-report-us
rh-demand-skilled-talent-report-usrh-demand-skilled-talent-report-us
rh-demand-skilled-talent-report-us
 
Seo wedding-catering-milwaukee
Seo wedding-catering-milwaukeeSeo wedding-catering-milwaukee
Seo wedding-catering-milwaukee
 
Operadores basicos de Google
Operadores basicos de GoogleOperadores basicos de Google
Operadores basicos de Google
 
Engranajes de dientes rectos
Engranajes de dientes rectosEngranajes de dientes rectos
Engranajes de dientes rectos
 
Workbook reference material
Workbook reference material Workbook reference material
Workbook reference material
 
7 26-16-organic-search-engine-rankings-catering-2
7 26-16-organic-search-engine-rankings-catering-27 26-16-organic-search-engine-rankings-catering-2
7 26-16-organic-search-engine-rankings-catering-2
 
Success report-dec 01, 2015 - dec 31, 2015
Success report-dec 01, 2015 - dec 31, 2015Success report-dec 01, 2015 - dec 31, 2015
Success report-dec 01, 2015 - dec 31, 2015
 
June july-catering-organic-search-engine-rankings-pt1
June july-catering-organic-search-engine-rankings-pt1June july-catering-organic-search-engine-rankings-pt1
June july-catering-organic-search-engine-rankings-pt1
 
About Chef Michael Feker
About Chef Michael FekerAbout Chef Michael Feker
About Chef Michael Feker
 
Seo caterer
Seo catererSeo caterer
Seo caterer
 
CVDFWILSON
CVDFWILSONCVDFWILSON
CVDFWILSON
 
Busqueda avanzada Google
Busqueda avanzada GoogleBusqueda avanzada Google
Busqueda avanzada Google
 
Seo catering-milwaukee-4
Seo catering-milwaukee-4Seo catering-milwaukee-4
Seo catering-milwaukee-4
 
Seo catering-milwaukee-6
Seo catering-milwaukee-6Seo catering-milwaukee-6
Seo catering-milwaukee-6
 
Cheffeker partial
Cheffeker partialCheffeker partial
Cheffeker partial
 
Herramienta scoopit
Herramienta scoopitHerramienta scoopit
Herramienta scoopit
 
Seo catering-milwaukee-2
Seo catering-milwaukee-2Seo catering-milwaukee-2
Seo catering-milwaukee-2
 
Graduate Certificate & Transcripts
Graduate Certificate & TranscriptsGraduate Certificate & Transcripts
Graduate Certificate & Transcripts
 
Catalogo de imagenes obras de arquitectura del renacimiento
Catalogo de imagenes obras de arquitectura del renacimientoCatalogo de imagenes obras de arquitectura del renacimiento
Catalogo de imagenes obras de arquitectura del renacimiento
 

Similar to final

Design and Implementation of AMBA ASB apb bridge
Design and Implementation of AMBA ASB apb bridgeDesign and Implementation of AMBA ASB apb bridge
Design and Implementation of AMBA ASB apb bridgeManu BN
 
Thesis Presentation on Renewal theory based 802.15.6 latest.pptx
Thesis Presentation on Renewal theory based 802.15.6 latest.pptxThesis Presentation on Renewal theory based 802.15.6 latest.pptx
Thesis Presentation on Renewal theory based 802.15.6 latest.pptxssuserc02c1f
 
Ultra sonic sensor network communicating using NRF 24L01 radio
Ultra sonic sensor network communicating using NRF 24L01 radioUltra sonic sensor network communicating using NRF 24L01 radio
Ultra sonic sensor network communicating using NRF 24L01 radioAshok Raj
 
Design And Verification of AMBA APB Protocol
Design And Verification of AMBA APB ProtocolDesign And Verification of AMBA APB Protocol
Design And Verification of AMBA APB ProtocolIJERA Editor
 
Wireless Sensor Network
Wireless Sensor Network Wireless Sensor Network
Wireless Sensor Network Dr Praveen Jain
 
Expl sw chapter_02_switches_part_1
Expl sw chapter_02_switches_part_1Expl sw chapter_02_switches_part_1
Expl sw chapter_02_switches_part_1aghacrom
 
Unit II Study of Onchip Peripherals
Unit II Study of Onchip PeripheralsUnit II Study of Onchip Peripherals
Unit II Study of Onchip PeripheralsDr. Pankaj Zope
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentIJERD Editor
 
Mp So C 18 Apr
Mp So C 18 AprMp So C 18 Apr
Mp So C 18 AprFNian
 
Asynchronous Transfer Mode ATM
Asynchronous Transfer Mode  ATMAsynchronous Transfer Mode  ATM
Asynchronous Transfer Mode ATMMadhumita Tamhane
 
AHB To APB BRIDGE.pptx
AHB To APB BRIDGE.pptxAHB To APB BRIDGE.pptx
AHB To APB BRIDGE.pptxGuckChick
 
VLSI DESIGN OF AMBA BASED AHB2APB BRIDGE
VLSI DESIGN OF AMBA BASED AHB2APB BRIDGEVLSI DESIGN OF AMBA BASED AHB2APB BRIDGE
VLSI DESIGN OF AMBA BASED AHB2APB BRIDGEVLSICS Design
 
VLSI DESIGN OF AMBA BASED AHB2APB BRIDGE
VLSI DESIGN OF AMBA BASED AHB2APB BRIDGEVLSI DESIGN OF AMBA BASED AHB2APB BRIDGE
VLSI DESIGN OF AMBA BASED AHB2APB BRIDGEVLSICS Design
 
3 phase energy meter on Zigbee1
3 phase energy meter on Zigbee13 phase energy meter on Zigbee1
3 phase energy meter on Zigbee1Sumit Vyas
 
Implementation of CAN on FPGA for Security Evaluation Purpose
Implementation of CAN on FPGA for Security Evaluation PurposeImplementation of CAN on FPGA for Security Evaluation Purpose
Implementation of CAN on FPGA for Security Evaluation PurposeIRJET Journal
 

Similar to final (20)

Design and Implementation of AMBA ASB apb bridge
Design and Implementation of AMBA ASB apb bridgeDesign and Implementation of AMBA ASB apb bridge
Design and Implementation of AMBA ASB apb bridge
 
Thesis Presentation on Renewal theory based 802.15.6 latest.pptx
Thesis Presentation on Renewal theory based 802.15.6 latest.pptxThesis Presentation on Renewal theory based 802.15.6 latest.pptx
Thesis Presentation on Renewal theory based 802.15.6 latest.pptx
 
final14-4
final14-4final14-4
final14-4
 
Ultra sonic sensor network communicating using NRF 24L01 radio
Ultra sonic sensor network communicating using NRF 24L01 radioUltra sonic sensor network communicating using NRF 24L01 radio
Ultra sonic sensor network communicating using NRF 24L01 radio
 
Design And Verification of AMBA APB Protocol
Design And Verification of AMBA APB ProtocolDesign And Verification of AMBA APB Protocol
Design And Verification of AMBA APB Protocol
 
Wireless Sensor Network
Wireless Sensor Network Wireless Sensor Network
Wireless Sensor Network
 
Chapter 3 esy
Chapter 3 esy Chapter 3 esy
Chapter 3 esy
 
Expl sw chapter_02_switches_part_1
Expl sw chapter_02_switches_part_1Expl sw chapter_02_switches_part_1
Expl sw chapter_02_switches_part_1
 
Unit II Study of Onchip Peripherals
Unit II Study of Onchip PeripheralsUnit II Study of Onchip Peripherals
Unit II Study of Onchip Peripherals
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 
Zigbee 802-15-4
Zigbee 802-15-4Zigbee 802-15-4
Zigbee 802-15-4
 
Mp So C 18 Apr
Mp So C 18 AprMp So C 18 Apr
Mp So C 18 Apr
 
Asynchronous Transfer Mode ATM
Asynchronous Transfer Mode  ATMAsynchronous Transfer Mode  ATM
Asynchronous Transfer Mode ATM
 
AHB To APB BRIDGE.pptx
AHB To APB BRIDGE.pptxAHB To APB BRIDGE.pptx
AHB To APB BRIDGE.pptx
 
VLSI DESIGN OF AMBA BASED AHB2APB BRIDGE
VLSI DESIGN OF AMBA BASED AHB2APB BRIDGEVLSI DESIGN OF AMBA BASED AHB2APB BRIDGE
VLSI DESIGN OF AMBA BASED AHB2APB BRIDGE
 
VLSI DESIGN OF AMBA BASED AHB2APB BRIDGE
VLSI DESIGN OF AMBA BASED AHB2APB BRIDGEVLSI DESIGN OF AMBA BASED AHB2APB BRIDGE
VLSI DESIGN OF AMBA BASED AHB2APB BRIDGE
 
3 phase energy meter on Zigbee1
3 phase energy meter on Zigbee13 phase energy meter on Zigbee1
3 phase energy meter on Zigbee1
 
Tsfpga
TsfpgaTsfpga
Tsfpga
 
USART
USARTUSART
USART
 
Implementation of CAN on FPGA for Security Evaluation Purpose
Implementation of CAN on FPGA for Security Evaluation PurposeImplementation of CAN on FPGA for Security Evaluation Purpose
Implementation of CAN on FPGA for Security Evaluation Purpose
 

final

  • 1. CAN CONTROLLER IMPLEMENTATION BY: HAGAI GAMLIEL AND SHAHAR GEFEN SUPERVISOR: SHAHAR GINO
  • 3. PROJECT GOALS Design and Implementation of a CAN BUS Controller for a reliable and robust communication between different nodes Using can bus protocol by BOSCH company
  • 4. BACKGROUND AND MOTIVATION • The can protocol implements only layers 2 and 3 from the 7 layers of the OSI model for communication between different nodes of a communication network
  • 5. BACKGROUND AND MOTIVATION The Controller Area Network (CAN) is a serial communication protocol used extensively for high- speed embedded applications where noise immunity and robustness is necessary. • The CAN protocol uses a twisted pair cable to communicate at speeds up to 1 Mbps (minimum 0.125Mbps). It is highly fault-tolerant, making it ideal for safety-critical applications. • It is used for backbone network as well as the powertrain,
  • 6. BACKGROUND AND MOTIVATION • Asynchronous communication • Any node can access the bus when the bus is quiet • Non-destructive arbitration, 100% use of the bandwidth without loss of data • Automatic error detection, signaling and retries • All nodes can send a message at any time, when two nodes access the bus together, arbitration decides who will continue. • Bit stuffing is used to maintain synchronization.
  • 7. HOW DOES A CAN BUS SYSTEM LOOKS LIKE? COMMONLY USED IN CAR MOBILE SYSTEMS
  • 8. DESIGN FLOW BOSCH Can specification and AMBA APB protocol learning Architecture and design implementati on in System Verilog Simulation, Synthesis, Layout
  • 9. CAN SPECIFICATION MESSAGE TRANSFER • 4 different message-types (“frames”): Data, Remote, Error and Overload. • Faulty nodes are automatically dropped from the bus, which prevents any single node from bringing a network down, and ensures that bandwidth is always available for critical message transmission (“Fault Confinement”). CAN frame DATA/REMO TE 9
  • 12. AMBA APB PROTOCOL Write transfer with wait stateRead transfer with wait state
  • 13. ARCHITECTURE AND DESIGN Node 1 CPU CAN CONTROLER CAN Transiver CAN_H CAN_L Node 2 CPU CAN CONTROLER CAN Transiver Node N CPU CAN CONTROLER CAN Transiver CAN BUS
  • 15. ARCHITECTURE AND DESIGN CAN CONTROLLER INTERFACE • fclk – outer clock. Came from the cpu/mcu which is connected to the controller. • APB Interface – A transfer protocol for communication between the cpu/mcu and the controller (AMBA APB protocol). • Interrupt – signal’s that one message (or more) is received. • Can Tx – the output signal which sent to the bus • Can Rx – the input signal which came from the bus paddr pwrite psel penable fclk Rst_n prdata[31:0] pready int pwdata[31:0] Can_tx Can_rx Canbus InterruptAPBInterface CAN Module
  • 16. ARCHITECTURE AND DESIGN BIT TIMING The can bus uses asynchronous communication. Therefore, a way to synchronize between the different nodes which connected to the bus is needed. Synchronization: • Bit stuffing – If 5 consecutive bits with the same logic value (‘0’ or ‘1’) occur in a row, a bit with the opposite logic value (‘1’ or ‘0’) is sent. • Hard synchronization – Every time that a data(or remote) frame is sent, there is a transition from a sequence of logic ‘1’s to logic ‘0’, which represents ‘start of frame’ and used
  • 17. ARCHITECTURE AND DESIGN BIT TIMING – DEFINES THE BUS CLOCK   / /Phase_Seg2 max(PhaseSeg1,InfoProcessingTime) time quanta 1 1 Prop_seg Phase_Seg1+Phase_Seg2 1 1 1 Prop_seg Phase_Seg1+Phase_Seg2 BRP T Q f clk T T bus Q f clkf bus BRP                
  • 18. ARCHITECTURE AND DESIGN BIT TIMING • Nominal bit rate is the number of bits per second transmitted in the absence of resynchronization by an ideal transmitter. • SYNC_SEG used to synchronize the various nodes on the bus. • PROP_SEG used to compensate for the physical delay times within the network. • PHASE_SEG1, PHASE_SEG2 used to compensate for edge phase errors. • Sample point is the point in time at which the bus level is read and interpreted. • Time quantum is a the fixed unit of time which can be derived from the oscillator period.
  • 19. SIMULATION VERIFICATION TEST BENCH • The simulation is built as two Can Controller DUT units such as DUT2 is the stub and verifier of DUT1. • The APB stub is a functional unit that works by the AMBA APB protocol and represents the cpu/mcu that communicates with the controller. The test-suit included a test for every internal block, and final integration test for the whole scheme of the controller.
  • 20. SIMULATION VERIFICATION TEST BENCH • Reset Node1 and Node2 • Configure bit timing registers for both Nodes • Write data to node1 and node 2 to be transmitted ‘Data Frame’ simultaneously on bus initial begin fclk=0; rst_n1 = 0; rst_n2 = 0; #200 rst_n1 = 1; rst_n2 = 1; bit_time_config1; bit_time_config2; #10 apb_write_data_frame1; apb_write_data_frame2; #400000 $finish; end
  • 21. SIMULATION WAVEFORM DIAGRAM As can be seen, Node1 and Node2 tried to send a Data Frame to the bus. Node1 has won the arbitration stage and hence continued to send his message while Node2 stopped. It can be seen that Node2 recieved the data which sent by Node1 and in the end of the frame the interrupt signal rose.
  • 23. SYNTHESIS RESULTS SUMMARIES The synthesis run with fclk=100Mhz which is the maximum frequency of the controller. synthesis result: Total 9 cells • Time data required time 9.88 ns data arrival time -9.79 ns • Area Total cell area: 95864.5 Total area: 136792.9 • Power total power 68.0113 mW 0.5𝜇𝑚2 0.5𝜇𝑚2
  • 24. LAYOUT FLOORPLAN - PHYSICAL VIEW • Tower 0.18u design kit • Encounter 14.1 𝑇𝑜𝑡𝑎𝑙 𝑠𝑖𝑧𝑒 2074 × 2008 𝜇𝑚2
  • 25. SUMMARY •Explanation for the need of a good communication controller. •Can BOSCH and APB protocol specifications •Architecture and design of the controller •Test bench Simulation, Synthesis and Layout
  • 26. THANK YOU FOR LISTENING

Editor's Notes

  1. חגי
  2. חגי
  3. חגי
  4. שחר
  5. שחר
  6. שחר
  7. חגי
  8. חגי
  9. חגי ide – 1 עבור הרחבה ל 29 ביט identifier Crc-15 +1 delimeter 18+99+9=126 max length
  10. שחר
  11. שחר
  12. שחר
  13. חגי
  14. חגי
  15. חגי
  16. שחר
  17. שחר
  18. שחר
  19. חגי
  20. חגי
  21. חגי
  22. Data Arrival Time This is the time required for data to travel through data path. Data Required Time This is the time taken for the clock to traverse through clock path. Setup and hold slack is defined as the difference between data required time and data arrival time. setup slack= Data Required Time- Data Arrival Time hold slack= Data Arrival Time- Data Required Time A +ve setup slack means design is working at the specified frequency and it has some more margin as well. Zero setup slack specifies design is exactly working at the specified frequency and there is no margin available.
  23. שחר
  24. שחר
  25. שחר
  26. שחר