+ Post New Thread
Results 1 to 7 of 7
  1. #1
    Newbie level 5
    Points: 48, Level: 1

    Join Date
    Mar 2018
    Posts
    8
    Helped
    0 / 0
    Points
    48
    Level
    1

    [Moved]: XOR output problem in hspice

    Hello guys.
    I am using Hspice to simulate 2-input xor gate., but for some reasons the output is not as neat as I expected. I will be very thankful if someone explain me the reason.
    Here is the code:

    Code:
    #xor 
    
    .option nomod
    .include ./22nm_lp.pm.txt
    .include ./inverter.sp
    
    X_invertera 1 a ab inverter
    X_inverterb 1 b bb inverter
    
    M1 2 a  1 1 pmos l=22n w=33n 
    M2 c bb 2 2 pmos l=22n w=33n  
    M3 3 ab 1 1 pmos l=22n w=33n 
    M4 c b  3 3 pmos l=22n w=33n  
    
    
    M5 c a  4 4 nmos l=22n w=33n 
    M6 4 b  0 0 nmos l=22n w=33n 
    M7 c ab 5 5 nmos l=22n w=33n 
    M8 5 bb 0 0 nmos l=22n w=33n 
    
    vdd 1 0 dc 0.95V
    vinb b 0 pulse(0.95 0 0 10p 10p 95p 200p)
    vina a 0 pulse(0.95 0 50p 10p 10p 95p 200p)
    .tran 200p 600p
    
    .end
    
    
    
    .subckt inverter 1 a b
    
    .option post accurate nomod
    .include ./22nm_lp.pm.txt
    
    M1 b a 1 1 pmos l=22n w=33n *Ap
    
    M2 b a 0 0 nmos l=22n w=33n *An
    
    .ends

    •   Alt13th March 2018, 01:22

      advertising

        
       

  2. #2
    Newbie level 5
    Points: 48, Level: 1

    Join Date
    Mar 2018
    Posts
    8
    Helped
    0 / 0
    Points
    48
    Level
    1

    Re: XOR output problem in hspice

    here is the wave:
    Click image for larger version. 

Name:	xor.png 
Views:	12 
Size:	52.3 KB 
ID:	145319



  3. #3
    Super Moderator
    Points: 60,340, Level: 59
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    12,318
    Helped
    2851 / 2851
    Points
    60,340
    Level
    59

    Re: XOR output problem in hspice

    Hi,

    It seems the output is not like expected.
    But what did you expect?
    Delays?
    Rise/fall times?

    Klaus
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   Alt13th March 2018, 06:54

      advertising

        
       

  4. #4
    Super Moderator
    Points: 244,774, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    42,518
    Helped
    12955 / 12955
    Points
    244,774
    Level
    100

    Re: XOR output problem in hspice

    The XOR logic function seems correct.

    Apparently you have unrealistic expectations regarding circuit speed or signal levels. How do you know that the circuit can work at GHz speed?


    1 members found this post helpful.

  5. #5
    Super Moderator
    Points: 47,668, Level: 53

    Join Date
    Apr 2011
    Location
    Minneapolis, Minnesota, USA
    Posts
    11,855
    Helped
    2339 / 2339
    Points
    47,668
    Level
    53

    Re: XOR output problem in hspice

    Your netlist appears to contain mosfets. If you were to use transistors then they may give you better 'snap action'.

    The webpage below has several logic schematics made from discrete devices, including Exclusive-Or gates.

    http://www.4qdtec.com/dlc.html



  6. #6
    Super Moderator
    Points: 244,774, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    42,518
    Helped
    12955 / 12955
    Points
    244,774
    Level
    100

    Re: XOR output problem in hspice

    The webpage below has several logic schematics made from discrete devices
    I doubt that the simple diode transistor logic is going to work above e.g. 10 MHz switching frequency. Using CMOS at multiple GHz should be possible, but there are some requirements for transistor technology.


    1 members found this post helpful.

    •   Alt13th March 2018, 09:06

      advertising

        
       

  7. #7
    Newbie level 5
    Points: 48, Level: 1

    Join Date
    Mar 2018
    Posts
    8
    Helped
    0 / 0
    Points
    48
    Level
    1

    Re: XOR output problem in hspice

    I'm so new to the topic but thanks to your replies, I now understand that frequency I set was not a good idea.
    One main problem I have with this and many other gates as well, is the spikes of voltage before rise and fall. I want to know why there are spikes and how can I decrease them.

    - - - Updated - - -

    Thanks for your reply. You are right. I don't have good knowledge on topic.
    Can you explain signal levels a little more.
    Last edited by discover93; 13th March 2018 at 16:55.



--[[ ]]--