4
\$\begingroup\$

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?

\$\endgroup\$
3
  • 1
    \$\begingroup\$ 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). \$\endgroup\$
    – tobalt
    May 17, 2023 at 11:12
  • 1
    \$\begingroup\$ 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). \$\endgroup\$ May 17, 2023 at 11:42
  • \$\begingroup\$ @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. \$\endgroup\$
    – pgvoorhees
    May 17, 2023 at 17:58

3 Answers 3

4
\$\begingroup\$

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.

\$\endgroup\$
18
  • \$\begingroup\$ 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. \$\endgroup\$
    – pgvoorhees
    May 17, 2023 at 12:22
  • 1
    \$\begingroup\$ 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. \$\endgroup\$
    – pgvoorhees
    May 17, 2023 at 15:26
  • 1
    \$\begingroup\$ Do not break your planes and you will have a return path. Watch all of this: youtube.com/watch?v=icRzEZF3eZo (and any other video where Robert interviews either Rick Hartley, or Eric Bogatin). \$\endgroup\$
    – pgvoorhees
    May 18, 2023 at 13:45
  • 1
    \$\begingroup\$ "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. \$\endgroup\$
    – pgvoorhees
    May 20, 2023 at 19:34
  • 1
    \$\begingroup\$ 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: github.com/azonenberg/pcb-checklist/blob/master/… \$\endgroup\$
    – pgvoorhees
    May 21, 2023 at 10:49
1
\$\begingroup\$

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.

\$\endgroup\$
3
  • \$\begingroup\$ 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. \$\endgroup\$
    – Daniel
    May 17, 2023 at 13:12
  • 1
    \$\begingroup\$ Regarding layers: on signal layers, shall I "pour" GND? Or just leave them empty? \$\endgroup\$
    – Daniel
    May 17, 2023 at 13:13
  • \$\begingroup\$ 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. \$\endgroup\$
    – LordTeddy
    May 18, 2023 at 16:35
1
\$\begingroup\$
  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.

\$\endgroup\$
5
  • 1
    \$\begingroup\$ 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? \$\endgroup\$
    – Daniel
    May 17, 2023 at 14:23
  • \$\begingroup\$ 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? \$\endgroup\$
    – Daniel
    May 17, 2023 at 14:29
  • \$\begingroup\$ 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. \$\endgroup\$
    – Justme
    May 17, 2023 at 14:47
  • \$\begingroup\$ 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. \$\endgroup\$
    – Daniel
    May 17, 2023 at 15:00
  • \$\begingroup\$ @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. \$\endgroup\$
    – Justme
    May 17, 2023 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.