I am using code posted here
to get family, model and stepping of CPU. My CPU is:
AMD Athlon(tm) 64 Processor 3200+

The code returns for CPU above:
Family 15, Model 15, Stepping 0

When I check using WMIC (wmic cpu get caption), I get:
Family 15 Model 31 Stepping 0

The CPU model is different. I have found an another article to get CPU info here:
This tool has three different methods to get CPU info and my results are:
Registry: Family: 15 Model: 31 Stepping: 0
SDK: Family: 15 Model: 31 Stepping: 0
Assembly: Family 15, Model 15, Stepping 0

As you can see that results of Registry and SDK methods are same but Assembly method is returning incorrect model.

It seems when value of model or family is 15, then you have to check for extended model & extended family also. After adding few extra lines at code posted here:

cpu_extended_model = 0xf &(cpuid_registers.eax >> 16);
cpu_extended_family = 0xf &(cpuid_registers.eax >> 20);

I am getting:
extended family : 0
extended model : 1

My question is how do you get correct model, family and stepping of a CPU?