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

plz help......Seqence recognizer error

Altera_Forum
Honored Contributor II
2,002 Views

`timescale 1ns/ 1ps 

 

 

module tb_seqrec; 

reg rnRESET, rCLK, rX;  

wire wZ; 

 

seqrec seqrec0(.nRESET(rnRESET), .CLK(rCLK), .X(rX), .Z(wZ)); 

 

 

always 

begin 

# 500 rCLK <= ~rCLK; 

end 

 

initial 

begin 

rnRESET <= 1'b0; 

rX <= 1'b0; 

19#100 rnRESET <= 1'bl; 

20#1000 rX <= 1'bl; 

21#1000 rX <= 1'bl; 

22#1000 rX <= 1'b0; 

23#1000 rX <= 1'b0; 

24#1000 rX <= 1'bl; 

25#1000 rX <= 1'bl; 

26#1000 rX <= 1'b0; 

27#1000 rX <= 1'bl; // Z=1 

28#1000 rX <= 1'bl; 

29#1000 rX <= 1'b0; 

30#1000 rX <= 1'bl; // Z=1 

31#1000 rX <= 1'b0; 

32#1000 rX <= 1'bl; 

end 

 

 

endmodule 

 

 

I made it. l thought there is no error.  

but 

:/Test/seqrec2/tb_seqrec.v(19): Expecting numeric digits. 

** Error: C:/Test/seqrec2/tb_seqrec.v(19): near "1": syntax error, unexpected "IDENTIFIER", expecting ';' 

** Error: C:/Test/seqrec2/tb_seqrec.v(20): Expecting numeric digits. 

** Error: C:/Test/seqrec2/tb_seqrec.v(20): near "1": syntax error, unexpected "IDENTIFIER", expecting ';' 

** Error: C:/Test/seqrec2/tb_seqrec.v(21): Expecting numeric digits. 

** Error: C:/Test/seqrec2/tb_seqrec.v(21): near "1": syntax error, unexpected "IDENTIFIER", expecting ';' 

** Error: C:/Test/seqrec2/tb_seqrec.v(24): Expecting numeric digits. 

** Error: C:/Test/seqrec2/tb_seqrec.v(24): near "1": syntax error, unexpected "IDENTIFIER", expecting ';' 

** Error: C:/Test/seqrec2/tb_seqrec.v(25): Expecting numeric digits. 

** Error: C:/Test/seqrec2/tb_seqrec.v(25): near "1": syntax error, unexpected "IDENTIFIER", expecting ';' 

** Error: C:/Test/seqrec2/tb_seqrec.v(27): Expecting numeric digits. 

** Error: C:/Test/seqrec2/tb_seqrec.v(27): near "1": syntax error, unexpected "IDENTIFIER", expecting ';' 

** Error: C:/Test/seqrec2/tb_seqrec.v(28): Expecting numeric digits. 

** Error: C:/Test/seqrec2/tb_seqrec.v(28): near "1": syntax error, unexpected "IDENTIFIER", expecting ';' 

** Error: C:/Test/seqrec2/tb_seqrec.v(30): Expecting numeric digits. 

** Error: C:/Test/seqrec2/tb_seqrec.v(30): near "1": syntax error, unexpected "IDENTIFIER", expecting ';' 

** Error: C:/Test/seqrec2/tb_seqrec.v(32): Expecting numeric digits. 

** Error: C:/Test/seqrec2/tb_seqrec.v(32): near "1": syntax error, unexpected "IDENTIFIER", expecting ';' 

 

 

what's wrong?
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
1,078 Views
0 Kudos
Altera_Forum
Honored Contributor II
1,078 Views

 

--- Quote Start ---  

`timescale 1ns/ 1ps 

 

module tb_seqrec; reg rnRESET, rCLK, rX; wire wZ; seqrec seqrec0(.nRESET(rnRESET), .CLK(rCLK), .X(rX), .Z(wZ)); always begin # 500 rCLK <= ~rCLK; end initial begin rnRESET <= 1'b0; rX <= 1'b0; 19#100 rnRESET <= 1'bl; 20#1000 rX <= 1'bl; 21#1000 rX <= 1'bl; 22#1000 rX <= 1'b0; 23#1000 rX <= 1'b0; 24#1000 rX <= 1'bl; 25#1000 rX <= 1'bl; 26#1000 rX <= 1'b0; 27#1000 rX <= 1'bl; // Z=1 28#1000 rX <= 1'bl; 29#1000 rX <= 1'b0; 30#1000 rX <= 1'bl; // Z=1 31#1000 rX <= 1'b0; 32#1000 rX <= 1'bl; end endmodule 

 

I made it. l thought there is no error.  

but 

:/Test/seqrec2/tb_seqrec.v(19): Expecting numeric digits. 

** Error: C:/Test/seqrec2/tb_seqrec.v(19): near "1": syntax error, unexpected "IDENTIFIER", expecting ';' 

** Error: C:/Test/seqrec2/tb_seqrec.v(20): Expecting numeric digits. 

** Error: C:/Test/seqrec2/tb_seqrec.v(20): near "1": syntax error, unexpected "IDENTIFIER", expecting ';' 

** Error: C:/Test/seqrec2/tb_seqrec.v(21): Expecting numeric digits. 

** Error: C:/Test/seqrec2/tb_seqrec.v(21): near "1": syntax error, unexpected "IDENTIFIER", expecting ';' 

** Error: C:/Test/seqrec2/tb_seqrec.v(24): Expecting numeric digits. 

** Error: C:/Test/seqrec2/tb_seqrec.v(24): near "1": syntax error, unexpected "IDENTIFIER", expecting ';' 

** Error: C:/Test/seqrec2/tb_seqrec.v(25): Expecting numeric digits. 

** Error: C:/Test/seqrec2/tb_seqrec.v(25): near "1": syntax error, unexpected "IDENTIFIER", expecting ';' 

** Error: C:/Test/seqrec2/tb_seqrec.v(27): Expecting numeric digits. 

** Error: C:/Test/seqrec2/tb_seqrec.v(27): near "1": syntax error, unexpected "IDENTIFIER", expecting ';' 

** Error: C:/Test/seqrec2/tb_seqrec.v(28): Expecting numeric digits. 

** Error: C:/Test/seqrec2/tb_seqrec.v(28): near "1": syntax error, unexpected "IDENTIFIER", expecting ';' 

** Error: C:/Test/seqrec2/tb_seqrec.v(30): Expecting numeric digits. 

** Error: C:/Test/seqrec2/tb_seqrec.v(30): near "1": syntax error, unexpected "IDENTIFIER", expecting ';' 

** Error: C:/Test/seqrec2/tb_seqrec.v(32): Expecting numeric digits. 

** Error: C:/Test/seqrec2/tb_seqrec.v(32): near "1": syntax error, unexpected "IDENTIFIER", expecting ';' 

 

what's wrong? 

--- Quote End ---  

 

 

The text flagged in red is extraneous junk that does not belong there. What are you trying to do?
0 Kudos
Altera_Forum
Honored Contributor II
1,078 Views

 

--- Quote Start ---  

The text flagged in red is extraneous junk that does not belong there. What are you trying to do? 

--- Quote End ---  

 

 

 

oh. l just let you know verilog sentence sequence...https://alteraforum.com/forum/attachment.php?attachmentid=15536&stc=1 https://alteraforum.com/forum/attachment.php?attachmentid=15536&stc=1  

 

in modelsim, l wrote this
0 Kudos
Altera_Forum
Honored Contributor II
1,078 Views

oh l deleted one

0 Kudos
Altera_Forum
Honored Contributor II
1,078 Views

I'm sorry. l don't know how to delete anoter.

0 Kudos
Altera_Forum
Honored Contributor II
1,078 Views

Hi, 

 

--- Quote Start ---  

#100 rnRESET <= 1'bl; /////////////////////////# 100 rnRESET <= 1'b1; ---- use digit "1" not "l" character "L". 

--- Quote End ---  

 

It`s typo mistake use “1” (one digit) instead of “L” character. 

 

Let me know if this has helped resolve the issue you are facing or if you need any further assistance. 

 

Best Regards 

Vikas Jathar  

(This message was posted on behalf of Intel Corporation)
0 Kudos
Reply