Altera_Forum
Honored Contributor
12 years agoshift register structural modeling error with port
Im a beginner in this verilog programing....
i tried to run the shift register with inserted module but there is port missing error... still couldn't identify the problem and need some help... need help correctting the codes if there is a problem with it... thanks.:confused: [DFF MODULE STRUCTURAL] module dffstrct(d,clk,q1,q2,w1,w2,w0); input d; input clk; output q1,q2,w1,w2,w0; not (w0,d); nand (w1,d,clk); nand (w2,w0,clk); nand (q1,w1,q2); nand (q2,w2,q1); endmodule [SHIFT REGISTER INSERTED MODULE] module shftstrct(c1,c2,c3,c4,d,clk); input d; input clk; output c1,c2,c3,c4; dffstrct m1(.c1(c1),.c2(c2),.d(d),.clk(clk)); dffstrct m2(.c3(c3),.c4(c4),.d(c1),.clk(clk)); endmodule [[TESTBENCH]] module shftstrct_tb(); reg d; reg clk; wire c1,c2,c3,c4; initial begin d = 0; clk = 0; end always# 50 clk=~clk; always# 100 d=~d; initial # 1000 $stop; shftstrct uut (.c1(c1),.c2(c2),.c3(c3),.c4(c4),.d(d),.clk(clk)); endmodule [ERROR FOUND] Loading work.dffstrct# ** Warning: (vsim-3017) C:/altera/91/modelsim_ase/examples/sfhtstrct_tb.v(22): [TFMPC] - Too few port connections. Expected 6, found 4.# Region: /sfhtstrct_tb/uut# ** Error: (vsim-3063) C:/altera/91/modelsim_ase/examples/sfhtstrct_tb.v(22): Port 'q1' not found in the connected module (1st connection).# Region: /sfhtstrct_tb/uut# ** Error: (vsim-3063) C:/altera/91/modelsim_ase/examples/sfhtstrct_tb.v(22): Port 'q2' not found in the connected module (2nd connection).# Region: /sfhtstrct_tb/uut# ** Warning: (vsim-3722) C:/altera/91/modelsim_ase/examples/sfhtstrct_tb.v(22): [TFMPC] - Missing connection for port 'c1'.# ** Warning: (vsim-3722) C:/altera/91/modelsim_ase/examples/sfhtstrct_tb.v(22): [TFMPC] - Missing connection for port 'c2'.# ** Warning: (vsim-3722) C:/altera/91/modelsim_ase/examples/sfhtstrct_tb.v(22): [TFMPC] - Missing connection for port 'c3'.# ** Warning: (vsim-3722) C:/altera/91/modelsim_ase/examples/sfhtstrct_tb.v(22): [TFMPC] - Missing connection for port 'c4'.# ** Warning: (vsim-3017) C:/altera/91/modelsim_ase/examples/sfhtstrct.v(8): [TFMPC] - Too few port connections. Expected 7, found 4.# Region: /sfhtstrct_tb/uut/m1# ** Error: (vsim-3063) C:/altera/91/modelsim_ase/examples/sfhtstrct.v(8): Port 'c1' not found in the connected module (1st connection).# Region: /sfhtstrct_tb/uut/m1# ** Error: (vsim-3063) C:/altera/91/modelsim_ase/examples/sfhtstrct.v(8): Port 'c2' not found in the connected module (2nd connection).# Region: /sfhtstrct_tb/uut/m1# ** Warning: (vsim-3722) C:/altera/91/modelsim_ase/examples/sfhtstrct.v(8): [TFMPC] - Missing connection for port 'q1'.# ** Warning: (vsim-3722) C:/altera/91/modelsim_ase/examples/sfhtstrct.v(8): [TFMPC] - Missing connection for port 'q2'.# ** Warning: (vsim-3722) C:/altera/91/modelsim_ase/examples/sfhtstrct.v(8): [TFMPC] - Missing connection for port 'w1'.# ** Warning: (vsim-3722) C:/altera/91/modelsim_ase/examples/sfhtstrct.v(8): [TFMPC] - Missing connection for port 'w2'.# ** Warning: (vsim-3722) C:/altera/91/modelsim_ase/examples/sfhtstrct.v(8): [TFMPC] - Missing connection for port 'w0'.# ** Warning: (vsim-3017) C:/altera/91/modelsim_ase/examples/sfhtstrct.v(9): [TFMPC] - Too few port connections. Expected 7, found 4.# Region: /sfhtstrct_tb/uut/m2# ** Error: (vsim-3063) C:/altera/91/modelsim_ase/examples/sfhtstrct.v(9): Port 'c3' not found in the connected module (1st connection).# Region: /sfhtstrct_tb/uut/m2# ** Error: (vsim-3063) C:/altera/91/modelsim_ase/examples/sfhtstrct.v(9): Port 'c4' not found in the connected module (2nd connection).# Region: /sfhtstrct_tb/uut/m2# ** Warning: (vsim-3722) C:/altera/91/modelsim_ase/examples/sfhtstrct.v(9): [TFMPC] - Missing connection for port 'q1'.# ** Warning: (vsim-3722) C:/altera/91/modelsim_ase/examples/sfhtstrct.v(9): [TFMPC] - Missing connection for port 'q2'.# ** Warning: (vsim-3722) C:/altera/91/modelsim_ase/examples/sfhtstrct.v(9): [TFMPC] - Missing connection for port 'w1'.# ** Warning: (vsim-3722) C:/altera/91/modelsim_ase/examples/sfhtstrct.v(9): [TFMPC] - Missing connection for port 'w2'.# ** Warning: (vsim-3722) C:/altera/91/modelsim_ase/examples/sfhtstrct.v(9): [TFMPC] - Missing connection for port 'w0'.# Error loading design