Kiran Dash
Agenda
• Bus drivers and Bus contention
• Different signal strength
• Modelling equivalence with actual analog
model
• Practical example of modelling
Bus Driver
Bus Contention
• Basic four kinds of drivers
BUF I/O BUS
STRONG1 I/P BUF I/O BUS
PULL0
EN
EN
RpdEN
RpuEN
BUF BUF
I/O BUS STRONG 0 I/P PULL1
I/P I/O BUS
EN EN
I/P
Rpd
RPU
Vcc
• Contention
Driver1 Driver2 Bus value
PULL1/PULL0 Strong1/Strong0 Strong1/Strong0
PULL1/PULL0 PULL0/PULL1 X
PULL1/PULL0 PULL1/PULL0 PULL1/PULL0
Strong1/Strong0 Strong0/Strong1 X
Strong1/Strong0 Strong1/Strong0 Strong1/Strong0
Different Signal Strength
• Different Strength that can be modeled.
STRENGTH LEVEL
Supply 7
Strong 6
Pull 5
Large capacitance 4
Weak 3
Medium capacitance 2
Small capacitance 1
High Impedance 0
Analog Models
• Supply Strength:
Diagram Syntax in Verilog
BUF I/O BUS supply1 pwr_on
ip(Supply) supply0 pwr_off
EN
Analog Models
• Strong Strength:
Diagram Syntax in Verilog
BUF I/O BUS strong1 sig_a
i/p strong0 sig_b
(Strong)
EN
Analog Models
• Weak Strength:
Diagram Syntax in Verilog
BUF I/O BUS weak1 sig_a
i/p weak0 sig_b
(weak)
EN
Analog Models
• Pull Strength:
Diagram Syntax in Verilog
BUF i/o BUS Pull1 sig_a
i/p Pull0 sig_b
EN
RpdEN
Rpd
Signal Modeling Rules
• Same strength but opposite logic value leads
to bus contention in bus i.e. x
• Higher strength always override the lower
strength
Examples:
Pull0 Pull0 Pull0 X
Weak1 Pull1
Example
• USB2 Remote Wakeup
What is USB2 Remote wakeup ??
-- If there are no transfers/bus is idle then usb2 device/host can go to sleep mode
-- If device starts the host wakeup then that’s called Remote wakeup
Protocol of Remote wakeup:
-- Host drives Bus to idle Dp = 0 , Dm = 0.
-- Device drive Dp = 0 and Dm = 1 for 15 ms
-- Host will detect for 1 ms and drive Dp = 0 and Dm = 1 for 20 ms
Chance of contention:
-- If you see initially Dm = 0 and after that device needs to drive Dm = 1
-- If strength of Dm is same for host and device will same , it will lead to Bus
contention on Dm line
Solution
• Solution
-- Host will drive Dm = 0 with strength weak0
-- Device will drive Dm = 1 with strength pull1
Syntax:
Host –
assign (weak0,weak1) dm = (if_remote_wakeup) ? If_dm : `bz;
Device –
assign (Pull0,Pull1) dm = (if_remote_wakeup) ? If_dm : `bz;
Thank You!

Bidirectional Bus Modelling

  • 1.
  • 2.
    Agenda • Bus driversand Bus contention • Different signal strength • Modelling equivalence with actual analog model • Practical example of modelling
  • 3.
  • 4.
  • 5.
    • Basic fourkinds of drivers BUF I/O BUS STRONG1 I/P BUF I/O BUS PULL0 EN EN RpdEN RpuEN BUF BUF I/O BUS STRONG 0 I/P PULL1 I/P I/O BUS EN EN I/P Rpd RPU Vcc
  • 6.
    • Contention Driver1 Driver2Bus value PULL1/PULL0 Strong1/Strong0 Strong1/Strong0 PULL1/PULL0 PULL0/PULL1 X PULL1/PULL0 PULL1/PULL0 PULL1/PULL0 Strong1/Strong0 Strong0/Strong1 X Strong1/Strong0 Strong1/Strong0 Strong1/Strong0
  • 7.
    Different Signal Strength •Different Strength that can be modeled. STRENGTH LEVEL Supply 7 Strong 6 Pull 5 Large capacitance 4 Weak 3 Medium capacitance 2 Small capacitance 1 High Impedance 0
  • 8.
    Analog Models • SupplyStrength: Diagram Syntax in Verilog BUF I/O BUS supply1 pwr_on ip(Supply) supply0 pwr_off EN
  • 9.
    Analog Models • StrongStrength: Diagram Syntax in Verilog BUF I/O BUS strong1 sig_a i/p strong0 sig_b (Strong) EN
  • 10.
    Analog Models • WeakStrength: Diagram Syntax in Verilog BUF I/O BUS weak1 sig_a i/p weak0 sig_b (weak) EN
  • 11.
    Analog Models • PullStrength: Diagram Syntax in Verilog BUF i/o BUS Pull1 sig_a i/p Pull0 sig_b EN RpdEN Rpd
  • 12.
    Signal Modeling Rules •Same strength but opposite logic value leads to bus contention in bus i.e. x • Higher strength always override the lower strength Examples: Pull0 Pull0 Pull0 X Weak1 Pull1
  • 13.
    Example • USB2 RemoteWakeup What is USB2 Remote wakeup ?? -- If there are no transfers/bus is idle then usb2 device/host can go to sleep mode -- If device starts the host wakeup then that’s called Remote wakeup Protocol of Remote wakeup: -- Host drives Bus to idle Dp = 0 , Dm = 0. -- Device drive Dp = 0 and Dm = 1 for 15 ms -- Host will detect for 1 ms and drive Dp = 0 and Dm = 1 for 20 ms Chance of contention: -- If you see initially Dm = 0 and after that device needs to drive Dm = 1 -- If strength of Dm is same for host and device will same , it will lead to Bus contention on Dm line
  • 14.
    Solution • Solution -- Hostwill drive Dm = 0 with strength weak0 -- Device will drive Dm = 1 with strength pull1 Syntax: Host – assign (weak0,weak1) dm = (if_remote_wakeup) ? If_dm : `bz; Device – assign (Pull0,Pull1) dm = (if_remote_wakeup) ? If_dm : `bz;
  • 15.