Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21602 Discussions

inout ports for multiple modules

Altera_Forum
Honored Contributor II
1,196 Views

I'm working on a design based on an existing system designed in AHDL. Currently the design has quite a few modules in AHDL connected with a block diagram at the top level. 

 

The product has an external uP with the processor buses connected to the FPGA. Each of the modules has configuration and/or data registers interconnected with the processor bus. In the current design each of the modules has BIDIR pins for the data lines and the block diagram interconnects all of the BIDIR data lines together and to the FPGA pins for the uP data bus. 

 

I'm going to be adding more modules to add features to the product. I'd like to do the new modules in verilog and create a verilog top level to replace the block diagram. 

 

INOUT or BIDIR pins can not be connected together in anything other than a block diagram file, correct? Usually the way I've done this is to have data in and data out as separate ports of a module with an output enable from the module. At the top level I'd interconnect the data inputs, data outputs and data port pins.  

 

To replace the top level with a verilog design I'd have to edit the AHDL modules to separate the data bus. Not a big deal, but I was wondering if there is another way to do this?
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
504 Views

 

--- Quote Start ---  

INOUT or BIDIR pins can not be connected together in anything other than a block diagram file, correct? 

--- Quote End ---  

 

They can be connected in HDL as well. But you should consider, that multiplexers are inferred for the output data direction and that a mutual exclusive selection condition for the individual module's output enables must exist. But that's the same in schematic entry, I think.
0 Kudos
Altera_Forum
Honored Contributor II
504 Views

I'll have to try again. I was getting an error when I tried to do that before.

0 Kudos
Reply