Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What is the reason for this error in ModelSim for my Verilog code? (string_literal.v(3): near ";": Syntax error.)

module string_l();

string a;

initial
begin
a="Hello";
$display ("@%gns a=%s", $time, a);
end
endmodule

>Solution :

Your problem is a string is a SystemVerilog datatype and you compiled with a Verilog .v file extension. Change the file extension to .sv.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading