So my project will involve me taking logic inputs and mapping them in any configuration I want to 40 5V logic outputs. I know a CPLD can do this but I don't think any exist with 40 inputs and outputs. I'd also level shifters as most fpga's/cpld's are now 3.3V and not 5V. Would this be the best way to do this? Are there any CPLD's out there that can take 40 inputs and also has 40 outputs? Re-programming it I would like to rely on USB so I'd need a USB controller as well I suppose. I'd like to avoid muxers and the like to allow to reduce the input/output requirements on the CPLD as I'd like the board to be as small as possible as well with as few parts as possible since the concept is extremely simple.
Am I going about this the wrong way or am I on the right track here? Thank you for any help and/or advice you can supply!