I'm guessing you're trying to find
such that
with
.
I'm not quite sure as to how your algorithm is supposed to work since
you're neither properly naming your signals nor giving any comments as
to their functionality. However you're instantiating at least 2 190 bit
modulo operators which should be a dead giveaway as to where the
resources are going. You're also going to see some ridiculous timing
violations on these paths.
Each of these is going to have in the order of
LUTs since it's basically doing a test-subtraction of a shifted value
of p for every bit.
At least the solution is simple, get a bigger FPGA or write a better
algorithm. Your choice.