Author Topic: Are GreenPack SPLDs logic prone to glitches?  (Read 4663 times)

0 Members and 1 Guest are viewing this topic.

Offline zaptaTopic starter

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Are GreenPack SPLDs logic prone to glitches?
« on: November 24, 2023, 06:15:46 pm »
When using GreenPak SPLD such as SLG46824, can the LUT generate glitches?  For example, if use a 3 input LUT as an AND gate and the input changes from 110 to 101, can the output have a short '1' during the transition?

I couldn't find any mentioning in the datasheet, compare for example to


« Last Edit: February 07, 2024, 03:37:46 am by zapta »
 

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: us
Re: Does GreenPack SPLDs logic prone to glitches?
« Reply #1 on: November 25, 2023, 03:08:17 pm »
Yes, but this isn't specific to these devices. Any asynchronous logic and especially programmable logic can have this. That is why we use flip flops, to only register stable values.

 
The following users thanked this post: zapta

Offline zaptaTopic starter

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: Does GreenPack SPLDs logic prone to glitches?
« Reply #2 on: December 04, 2023, 08:11:03 pm »
Yes, but this isn't specific to these devices. Any asynchronous logic and especially programmable logic can have this.

Is it?  Take for example the circuit below where a clock passes through a gate to a ripple counter. If the OR gate is implemented with a 74HC32, can a transition on the clock input induce multiple transitions?

In my case, I am asking for the SLG46826 GreenPAK/SPLD, where this schematic is taken from. Is this circuit is safe or can the LUT which implements the OR gate creates more than one transition on a clock transition?
 
 

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: us
Re: Does GreenPack SPLDs logic prone to glitches?
« Reply #3 on: December 04, 2023, 11:22:36 pm »
That depends on clk1 and clk2?  Do they change at the same time?  If so consider if clk1 can transition 0->1 "at the same time" that clk2 transition 1->0.  If clk1 is delayed relative to clk2 the output of the OR gate can go low transiently.  You can fix this by delaying clk2 relative to clk1 but then the reverse transition is a problem.  Or you can fix it for both by making the falling edge slower than the rising edge, but now you have made a problem for AND gates.  You can work around the problem for a specific case you care about but there is no universal solution.  Since synthesis tools use logical equivalences to map your requested circuit onto the available primitives, it's much harder to solve this by hand for programmable logic.

 

Offline zaptaTopic starter

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: Does GreenPack SPLDs logic prone to glitches?
« Reply #4 on: December 04, 2023, 11:56:36 pm »
My question is for the case where clk2 is permanently grounded.

Also, in the case of greenpaks there are no degrees of freedom in the synthesis. The user dictates all the details including which lut instance to use.
« Last Edit: December 05, 2023, 12:00:21 am by zapta »
 

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: us
Re: Does GreenPack SPLDs logic prone to glitches?
« Reply #5 on: December 05, 2023, 05:21:07 pm »
In that case I would expect no glitches, or at least for your logic vendor to tell you how to implement it to have no glitches.  That's not the case for your original question which involved two inputs changing at the same time.  In your original question, any asynchronous logic type can have glitches. 

It's not automatic, a LUT is not identical to the logic gate it replaces.  It's actually a multiplexer, and multiplexers can have switching transients. So it is certainly possible for a LUT implementation to have glitches even when a single input changes, but FPGA chip makers should try to prevent that because it's important for a many important FPGA primitives.  For instance it's common to implement clock domain crossing of e.g., FIFO pointers using grey codes so that only one bit changes at a time.  The LUT architecture needs to support that without creating glitches. 
 

Offline zaptaTopic starter

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: Does GreenPack SPLDs logic prone to glitches?
« Reply #6 on: December 05, 2023, 08:01:18 pm »
You are right, my original question was AND gate input transition from 110 to 101.  In both cases the output is supposed to state 0. Is that case, do you expect the SPLD to have a glitch (or is it called an hazard?) ?

(I also posted a question at the vendor site and am waiting for an authoritative answer).
 

Offline Harjit

  • Regular Contributor
  • *
  • Posts: 141
  • Country: us
Re: Does GreenPack SPLDs logic prone to glitches?
« Reply #7 on: December 31, 2023, 07:21:29 pm »
As @ejeffrey mentioned when you have inputs changing into a gate, glitches are absolutely possible.

If you want to run async logic without glitches, a scheme people have used is to convert the state vectors to gray codes where only only one bit changes at a time. Take a look at asynchronous circuit design or dynamic circuits <- fascinating field.
 

Offline zaptaTopic starter

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: Does GreenPack SPLDs logic prone to glitches?
« Reply #8 on: December 31, 2023, 09:19:18 pm »
@harjit, in the context of gray code,  let's say that I use a GreenPak LUT as a three input OR gate and its input change from 001 to 011, can this create a glitch at the output of the LUT?
 

Offline Harjit

  • Regular Contributor
  • *
  • Posts: 141
  • Country: us
Re: Does GreenPack SPLDs logic prone to glitches?
« Reply #9 on: January 05, 2024, 04:25:02 am »
I cannot say with certainty and do not want to mislead you. You might try it as an experiment. If you do, please do share your findings.
 

Offline zaptaTopic starter

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: Does GreenPack SPLDs logic prone to glitches?
« Reply #10 on: January 05, 2024, 09:51:10 pm »
This is the official answer I got from Renesas. If I understand them correctly, they say to use synchronous design.

"Digital has the competition and risk, refer to your design, used the same CLK to trigger the internal states, and the CLK be generated by the falling edge of SCLK_IN, will help to avoid these"

https://community.renesas.com/analog-products/f/greenpak-greenfet/32638/are-slg46826-luts-glitch-free/115464#115464

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf