--- Quote Start ---
That might work. Would you suggest a certain type of memory that comes with a Megafunction that is easy to use?
--- Quote End ---
Look at the altsyncram component.
However, it would be worthwhile if you could explain what you are trying to do. There are many people on this list who can offer advice. However, your current description is pretty vague.
You say you want to look at the state of some pins? But what are you looking for, a state change, or the current value? If you want to capture the pin state when anything changes, you could write a small state machine to detect the change and write a timestamp and the pins to a register, and then generate an interrupt. If you were going to get lots of these events, then you could use a RAM or FIFO instead of a register, so that you could capture multiple events.
Cheers,
Dave