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

how to combine two modules into one?

Altera_Forum
Honored Contributor II
3,493 Views

hi guys  

i'm trying to combine two modules into one main module.  

that will connect both of them and create signals to go to one of them  

(like c in module 2 in the example)  

in the first the inputs and outputs should be connected to the second module, and the same in the second module in which has inputs not from the first one.  

for example:  

module 1:  

input a;//from module 2  

output b;//to module 2  

 

module 2  

input b;//from module 1  

output a;//to module 1  

input c;  

 

i tried to do it in different ways but i get errors all the time..  

what's the right way or syntax to do it?  

thanx
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
2,379 Views

If you use VHDL, searh for Component and port map. 

 

You can also try to use a schematic, you create a bloc of your modules and you link theme with cables...
0 Kudos
Altera_Forum
Honored Contributor II
2,379 Views

i'm using verilog. 

i know the schematic but my problem is that i don't know how to write the connections right.
0 Kudos
Altera_Forum
Honored Contributor II
2,379 Views

 

--- Quote Start ---  

i'm using verilog. 

i know the schematic but my problem is that i don't know how to write the connections right. 

--- Quote End ---  

 

 

Hi, 

 

I have a small Ouartus Project attached.  

 

Kind regards 

 

GPK
0 Kudos
Altera_Forum
Honored Contributor II
2,379 Views

well.. 

that's exactly what i needed and a lot more 

thank you very much for your help
0 Kudos
Reply