naveenkumarmadala
Newbie level 3
- Joined
- Mar 16, 2015
- Messages
- 4
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 47
hi,
i am trying to write a verilog code to generate TPG's.while i simulating the code it is showing the error as "Instantiation is not allowed in sequential area except checker instantiation".here i am attaching my code.please give me suggestion to remove the error.
if i remove always block it is not showing any error but i am not getting proper output( debug problem).please help me.
thanks and regards
naveen
i am trying to write a verilog code to generate TPG's.while i simulating the code it is showing the error as "Instantiation is not allowed in sequential area except checker instantiation".here i am attaching my code.please give me suggestion to remove the error.
Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 module mnk(clk,rst,in,out); input clk,rst; input [7:0]in; output reg[7:0]out; wire [7:0]w1; wire [7:0]w2; wire [7:0]w3; wire [7:0]w4; wire [7:0]w5; wire [7:0]w6; wire [7:0]w7; always@(posedge clk or rst) begin if(rst) begin out[7:0]<=8'b0; end else begin ca90 dut0(clk,rst,in,w1); ca90 dut1(clk,rst,w1,w2); ca90 dut2(clk,rst,w2,w3); ca90 dut3(clk,rst,w3,w4); ca90 dut4(clk,rst,w4,w5); ca90 dut5(clk,rst,w5,w6); ca90 dut6(clk,rst,w6,w7); ca90 dut7(clk,rst,w7,out); end end endmodule module ca90(clk,rst,s,q); input clk,rst; input [7:0]s; output reg[7:0]q; always@(posedge clk or rst) begin if(rst) begin q[7:0] =8'b0; end else begin q[0]=0^s[1]; q[1]=s[0]^s[2]; q[2]=s[1]^s[3]; q[3]=s[2]^s[4]; q[4]=s[3]^s[5]; q[5]=s[4]^s[6]; q[6]=s[5]^s[7]; q[7]=s[6]^0; end end endmodule
if i remove always block it is not showing any error but i am not getting proper output( debug problem).please help me.
thanks and regards
naveen
Last edited by a moderator: