4

I have designed an M2 adapter which converts from KeyE to KeyM.

Practically this means my board can be inserted into a KeyE slot, and it can host a KeyM SSD.

Gray rectangle is the KeyM socket on my board:

enter image description here

Design involves 10uF caps on 3.3V on both sides of the socket to have proper buffering for the NVMe SSD.

Design also breaks out USB (2.0) from the KeyE pins.

I tried to length-match the diffpairs as much as I can:

USB (97.2% : 100%):

enter image description here

PCIe RX (100% : 100%):

enter image description here

PCIe TX (100% : 100%):

enter image description here

PCIe Clk (100% : 99.2%):

enter image description here

Although I haven't done any impedance matching (yet) on this desing, I have a few concerns I need to address:

1. PCB stackup

As these wires are all differential coplanars (with a few vias):

enter image description here

I'm curious if I need to use 4-layer PCB or 2-layer is sufficient. Impedance matching can be done, as due to differential coplanar structure of diffpairs trace width and spacing is very well managable.

However, for traces on the bottom (especially PCIe RX): this board will be inserted into a motherboard. So for bottom traces there will be massive high-frequency signals underneath them on the motherboard within 1-2mm distance. Shall I take this into consideration and design a 4-layer stackup, or motherboards are usually don't make any harm with diffpairs routed on the bottom layer of an M2 card?

Moreover, there will be an FPC cable soldered onto the USB breakout pads on the bottom, which will be effectively very close to the bottom layer's traces:

enter image description here

Is this need to be considered during stackup decision, or as there is air in between the FPC and the bottom layer traces, there will be no (or just tiny) effect?

If I need/better to use 4-layer stackup, shall I add the current bottom traces to 2nd, or 3rd layer? 3rd layer seems better for having vias with shorter stubs. Manufacturer might be able to do backdrill, but I wish to keep things as simple as possible.

2. Designing layer-change with vias:

Can I make it better (not speaking of impedance managing, but better for signal propagation):

PCIe RX:

enter image description here

enter image description here

USB:

enter image description here

3. Length matching with meander:

Shall I finetune these (they look quite weird to me - if so, how?):

enter image description here

enter image description here

PCB manufacturer will do impedance control on these selected lines, and they will also validate the required impedance on the final unit.

So the goal of this question is to fine-tune my design to be suitable for high-frequency operation and further impedance-controlling (by the manufacturer).

Update

When defining the 4 layer stackup is this below structure suitable for my goals?

enter image description here

Update2 - final design

I have redesigned my board with 4-layers.

Stackup is the following:

1. Signal    - 38um
2. Prepreg   - 0.1mm (RO4450B)
3. GND       - 38um
4. Substrate - 0.406mm (RG4003C)
5. GND       - 38um
6. Prepreg   - 0.1mm (RO4450B)
7. Signal    - 38um

Prepreg has a nice solid 3.54±0.05 Dk value.

I wired the differential traces of USB and PCIe with 0.2mm trace and 0.254 spacing. Further impedance tuning will take place at the manufacturer's side.

I wish you to review my board layout, I tried recreating it based on all recommendations below.

This is the TOP (Layer1, signal):

enter image description here

Layer2 (GND):

enter image description here

Layer3 (GND):

enter image description here

BOTTOM (Layer4, signal):

enter image description here

Can you please review this layout? Can you spot any bad design?

Daniel
  • 937
  • 9
  • 19
  • 1
    Length matching with meanders and differential coplanar transmission line don't go together well. Use a 4 layer board (with GND vias when going through the board). – tobalt May 17 '23 at 11:12
  • 1
    It's going to be really difficult to control the impedances on a 2-layer board, especially if it's thick (e.g. thicker than 1mm such as 1.6mm). This means that you may end up with really thick (or wide) tracks for, say, USB's 90 Ohm differential impedance. It's better to switch to 4 layer, make one internal layer ground, and run the controlled impedances (e.g. differential pairs) on the layer adjacent to internal GND layer (e.g. top: signal for controlled impedances, 2nd: GND, 3rd: power, bottom: remaining signal). – Rohat Kılıç May 17 '23 at 11:42
  • @daniel Work with your FAB to arrive at an appropriate stackup. Or, if your FAB is a self-service affair, look at their controlled impedance pages, choose a stackup, and make your eda tool match one of those. – pgvoorhees May 17 '23 at 17:58

3 Answers3

4

Not providing an answer, but rather a formatted comment.

Tagging on to @tobalt answer, use at least a 4L board, your stackup should be

1 - Sig/PWR
2 - GND
3 - Sig/PWR
4 - GND 

All equal-voltage power rails should be VIA'd together at every 1/10 wavelength of the max operating frequency, and there should be a Ground-stitching via every 1/10 wavelength of the max operating frequency.

The max operating frequency is calculated by using

f.Max = 0.5 / Tr

where Tr is the rise time of the driving device. I don't know what it is for PCIe off hand.

Any time a signal changes layers, drop GND VIAs as close as possible to the layer change VIAs. Make your signal layer-change VIA annular-rings the same diameter as the track width, or the minimum required for your fabricator. Tear-drop your layer-change VIAs if you can.

The reason for the prescription here is that your signals need a few things to be happy:

  1. A closely spaced (in the Z-axis) continuous reference plane. This accounts for the 4L stackup, and the ordering of that stackup. Layers are going to be pared up as (1,2) and (3,4). Layers (1,2), (3,4) will only have 0.004-0.006 inch spacing, between them, but layer pair (2,3) will have something like 0.030 inch spacing. That means that there will be a good, constant capacitor formed between layer-pairs (1,2) and (3,4). This makes impedance control possible.
  2. The GND reference planes need to be an effective short at all interesting frequencies. GND stitching VIAs @ 1/10 f.max's wavelength will aid this.
  3. GND vias next to the signal layer-transition VIAs. This allows the return currents flowing on the reference planes to change layers with the signal. Even though PCIe is fully differential, they are not galvanically isolated, they still reference the GND Reference plane, so whatever return current if in the GND plane has to change layers too. Placing GND vias next to the signal layer-change vias accomplishes that.
  4. Teardropping VIAs is only necessary if the annular rings can't be the same width as your tracks. The reason for the teardrop is to "ease" the change in impedance over a larger area to reduce reflections that occur at a discontinuous width change.

The last comment I'll make is keeping the PWR and signal coplanar allows the POWER traces to have a good capacitive coupling to the GND plane, this will ensure the POWER rails have as good-as-possible power delivery to whatever device you're attaching.

pgvoorhees
  • 2,496
  • 16
  • 14
  • I didn't see @lordteddy response while writing mine, there is a small difference in the stackup between our answers, which will probably not be operative. – pgvoorhees May 17 '23 at 12:22
  • Based on @justme's comment (under his answer), it's not recommended ("bad idea") to have SGSG stackup. Can you accept his points against it? Thank you – Daniel May 17 '23 at 15:02
  • 1
    In short: yes, I think the SGGS stack would work fine. Stubs are be a concern if they are "electrically long" compared to the wavelength -- and if the bandwidth covers in to the multiGHZ, it very well might. If you calculate your shortest wavelength, you can determine, for sure, if it's an issue. As far as the having two reference gnd planes, you would need a field solver to tell you if thats an issue -- i have serious doubts it would be a problem. – pgvoorhees May 17 '23 at 15:26
  • Regarding layers: on signal layers, shall I "pour" GND? Or just leave them empty? – Daniel May 18 '23 at 09:06
  • Fill with GND around the signaling traces -- otherwise with power. The idea is to keep the signaling environment consistent on the one hand, and get as much shape-plane capacitance on the powers otherwise. – pgvoorhees May 18 '23 at 11:38
  • When is the "otherwise" case? So shall I fill with GND or PWR? For example for top signal layer. There is a massive GND plane underneath it on layer2. – Daniel May 18 '23 at 12:54
  • This is what I would do: Top: https://i.imgur.com/O8Z5Jh4.png, Bot: https://i.imgur.com/Tjv1seG.png . But, boards are cheap, try out a couple of different stackups and pour arrangements. As long as you assign your nets correctly, the opportunity to damage your PC is limited. – pgvoorhees May 18 '23 at 13:26
  • Makes much more sense now, thank you. Doing this addresses and fixes the problem for the return paths? I.e. with this arrangement of planes, I'll have solid return paths? – Daniel May 18 '23 at 13:34
  • 1
    Do not break your planes and you will have a return path. Watch all of this: https://www.youtube.com/watch?v=icRzEZF3eZo (and any other video where Robert interviews either Rick Hartley, or Eric Bogatin). – pgvoorhees May 18 '23 at 13:45
  • As I'm gonna have that USB FFC underneath the bottom of the PCB (very close to the PCB), isn't it a better idea to have GND plane (pouring) at the bottom? In that case and *displacement current* would be flown to that GND plane (from the FFC). If however I pour PWR, displacement current shall have to find its way, and there are many components on the motherboard which I think wouldn't like to absorb this displacement current. What do you think/suggest? – Daniel May 20 '23 at 06:38
  • 1
    "isn't it a better idea to have GND plane (pouring) at the bottom?" -- it's how I would stack the board. As far as the displacement currents, USB is diff-signaled, their displacement currents should cancel. That said, if you can route them on either side of the flex, and maintain their impedance, they will couple to each other better than in a side-by-side arrangement. That should essentially eliminate any displacement current issues. – pgvoorhees May 20 '23 at 19:34
  • I made an update to the question, please review my design, I'm pretty satisfied with it, but you might spot some bad things still. Thx – Daniel May 21 '23 at 09:05
  • 1
    The only thing Im not totally clear on is the 1L GND shape at the top, I don't see how it connects. Now that you have a specified stack, go back and check your trace widths for impedance controlled lines. Other than that, I would certainly be willing to pull the trigger at this point. Another tip here, is to use a sign-off checklist, Aaron Zonenberg has a good that you can start with: https://github.com/azonenberg/pcb-checklist/blob/master/layout-checklist.md – pgvoorhees May 21 '23 at 10:49
  • Yeah, I'm sorry, here is my full layout for L1 and L4 (GND highlighted on both): https://imgur.com/a/dyW7LjY. There are 2 huge VIAs, which connects all layers: L1,L2,L3,L4. L2 and L3 are fully filled with GND. – Daniel May 21 '23 at 11:10
  • Is this still suitable for *pulling the trigger*? Impedance matching and controlling will be done in the factory (I've already negotiated with them: they just need to have a *good enough* base design, and they will finetune for impedance-matching). – Daniel May 21 '23 at 11:16
  • w.r.t the "L1 GND shape at the top" ok, thats clear. With that clear, I would life the L1/L2 pair of tracks all the way over to the left that don't strictly need to do a layer change. The tracks start and end on L1, and don't seem to gain anything from dropping them to L4. -- that said, it's also a nit I'm picking at this point. Again, i would feel comfortable ordering this board. Just keep in mind, i'm only commenting on the geometry itself, I haven't looked at your pinouts and nets at all. – pgvoorhees May 21 '23 at 20:06
  • I'm not exactly sure on what are you referring to, but tried to reduce those extra L1 <-> L4 changes: https://imgur.com/a/IEpqN5B. Did you meant this change? I have a little fear of having EMI problems due to wiring a signal out from a GND plane (image attached also). Here is the video about it: https://www.youtube.com/watch?v=LdEHJXs5xpw. This was exactly my reason of transferring layers. I think this is the last piece before sending it for further analysis and manufacture. – Daniel May 21 '23 at 20:59
  • You got the exact tracks I was referring to. Don't worry about the EMI thing though, in the video, they are talking about tracks on L1 crossing a split in L2, it's just tough to see clearly in the video. The very last thing I would do, is drop a small via just to the right of those tracks on the 3.3V net, or remove that dead copper. https://postimg.cc/NyFNsTMJ – pgvoorhees May 22 '23 at 01:28
1

A few reasons to go 4 layers. 1st, you'll never get 100 Ohm differential impedance at a sensible size on 2 layers. enter image description here Note I'm assuming you need 1.6mm board thickness for the M.2, but I could be wrong. Even at 0.8mm it works out as 0.4mm width, which I is still too wide for 0.5mm pitch.

You also want 4 layers so you can have an uninterrupted ground plane under all your signals, in your current design they have to cross lots of splits which is bad.

It's also a recipe for cross-talk. Consider that REF_CLK0_N and SUSCLK run parallel, on top of each other for a part of the board. Pretty much-guaranteeing cross-talk between these two.

Use a 4 layer board
Top layer - RF signals
In1 - GND
In2 - GND
Bottom Layer - other signals

And respect that at much as possible. You might have to borrow one of the inner layers for a signal but do not break the GND plane under an RF signal, or under anything for that matter. Even your 3v3 power trace, which you might consider as DC, still needs a return path, ideally directly underneath it. You might think that it doesn't matter for a DC connection, but the current still has to flow back somewhere, and if you dont give it a nice path, it'll have to flow around to find a path. If this current flows underneath another signal trace, it can potentially couple into it. Remember that In1 and In2 are far apart, so In2 won't work well as your GND plane for your top layer, and the same with In1 and the bottom layer.

Particularly if this board is sitting above high-speed signals, I'd keep the bottom layer as devoid of high-speed signals as possible, it really depends on their speed as to wether you need to completely keep all traces off this layer.

It depends on the USB speed, whether I'd be worried about this, but you can always not run any traces on the bottom layer where you expect this cable to be. Air doesn't provide any shielding, so it could cross-talk. Equally, you can ensure that any traces cross this at a right angle to reduce this. Presumably there's a GND in the USB bus, so this could start to mess with your impedances a bit.

LordTeddy
  • 1,742
  • 18
  • So in case of that USB FPC, I have to avoid traces on bottom. But then where shall I wire them? On which layer? I can't route all RF on top layer. But then it seems better to have solid GND bottom, no? And bring RF traces from top to in2. – Daniel May 17 '23 at 13:12
  • 1
    Regarding layers: on signal layers, shall I "pour" GND? Or just leave them empty? – Daniel May 17 '23 at 13:13
  • Regarding the USB FPC, and unisng in2 - I'm not sure I can really comment. I dont have a good enough idea for how badly the USB would interfere with the RF traces, so I dont know if you need to move them. Could you use a two layer FPC with GND on the bottom? Regarding GND Pouring, I'd poor on signal layers, just be sure to leave enough space so as to not affect your signal impedances. – LordTeddy May 18 '23 at 16:35
1
  1. I think you must switch to 4 or more layers. The two layers can't provide good controlled impedance matching, the ground planes have slots that the lanes cross, etc. For such a simple (?) board you would use e.g. SGGS order so stubs are not a problem and each signal layer has a ground layer right under it.

  2. Yes, you could add ground stitch vias for the data lanes when they change layer. And make sure vias also exhibit the same characteristic impedance.

  3. Length matching may not be that important compared to proper impedance. The meanders are an impedance discontinuity even if the length matching is perfect.

Justme
  • 127,425
  • 3
  • 97
  • 261
  • 1
    So technically, impedance matching is more important than length matching? I.e. leave the traces with 95%-100% length, and do proper impedance matching to have better signal transmissions? – Daniel May 17 '23 at 14:23
  • In my point 1, I described having an FPC cable very close to the board. In this case is really SGGS the correct stackup? Isn't SGSG providing better resistance to crosstalk and other stuff? – Daniel May 17 '23 at 14:29
  • How much is 95% of 100% in length units? Most guides allow 5 mils of length mismatch. Having SGSG is a bad idea. The middle signal layer has two reference ground planes, manufacturing the PCB to control impdance over the bulk material in addition to the two layers is something you likely don't want to pay for, and it will introduce small via stubs. The FPC won't likely have much crosstalk, but the FPC itself with 4 random wires won't necessarily have good impedance control for USB. – Justme May 17 '23 at 14:47
  • Those diffs (without meander) are definitely longer now than 5mils. When redesigning the layout to 4-stacks, I'll try to route these pairs without meander to have very similar lengths. FPC is a must to use, but I don't really care about USB's performance. It's only for very slow and basic usage (9600baud serial port). I know it's not good to have unmatched impedance, but for USB in this case it doesn't matter. What I really wish to optimize is the PCIe lanes. So if crosstalk is not an issue, I can use SGGS structure for sure. – Daniel May 17 '23 at 15:00
  • @Daniel USB might matter. Even if you have USB serial chip there, it communicates over USB at 480 Mbps or 12 Mbps. The fact that the UART has 9600 bps only makes no difference. – Justme May 17 '23 at 15:38