Read ports from the .resources instead .data.
Support multiple ports.