Altera_Forum
Honored Contributor
16 years agoif condition for modules? (verilog question)
Hello there!
I don't know if this is a simple question or not. Basically I want to switch view of my lcd panel input from software and hardware (camera input) by using a switch. The thing is, i want to switch the use of modules with an if statement, but it doesn't seem to work like that: always @ (posedge iCLK_50) begin if(iSW[1]) begin touch_panel tp1 ( //<---module declaration .iCLK(ltm_nclk), .iRST_n(DLY_RST_2), // sdram side .iREAD_DATA1(Read_DATA1), .iREAD_DATA2(Read_DATA2), .oREAD_SDRAM_EN(Read), // lcd side .oLCD_R(ltm_r), .oLCD_G(ltm_g), .oLCD_B(ltm_b), .oHD(ltm_hd), .oVD(ltm_vd), .oDEN(ltm_den) ); end else begin //different module for touch panel end end so this definitely doesn't work. Any tips on how to implement this? Thanks in advance!!!!