Altera_Forum
Honored Contributor
14 years agoDEII GPIO Bidirectional setting
1.
Hi, I am working on a project involving nand flash, and the nand flash has 8 bit bidirectional data bus. I am testing it on a DE2 board, so my question is how to make the GPIO_0 work as a bidirectional bus. my current idea is to declare pins as inout in the top level, and make it tri-state. is that correct? or there are other ways to do it. inout wire [32:21]GPIO_0; then: .nand_data_inout({GPIO_0[21:25],GPIO_0[30:32]}), btw, is this the correct way to combine pins together? 2. In addition, I have some GPIO pins work as output only, so when i implement as the following, output wire [35:30]GPIO_0; inout wire [32:21]GPIO_0; i will get the error message"Error : port "GPIO_0" is declared more than once" how should i solve this problem? Thanks