I haven't used actual carpet, but I did have my ramps covered in woven rugs that I got for 1.00 each. It worked great for a short time, but it got really dingy and yuck after a few weeks not only from them running up and down them, but they loved he rugs so I started catching them actually sleeping on the ramps (and where they sleep they are going to pee!) Then I started noticing the pigs chewing on them as well. I don't know how much if any they were able to actually ingest--I never found any "bites" out of it, but they were fascinated with the little loops in the weave and would tug and tug at them.
I wound up ditching the rugs.
My ramps now are made up of grids bent in half, and then a piece of coroplast running the length of the floor of the ramp. I used a rubbery type shelf liner and tape to make a snug fitting cover for the coroplast so that they can grip to walk up and down. It has worked out well so far. I can easily clean off the "rubber", and there is nothing loose for the pigs to try and tug at.