Search code examples
verilogsystem-verilogcarriage-return

Verilog Parameter & using \r\n


How do you enter a carriage-return and new-line? I can't see to find anything online that suggests this needs something unique. For example, if I do...

parameter [x:x] myString = "Hello \r\n world";

What actually ends up being put into myString is something like "Hello r\n world"

Does SystemVerilog need a special notation to handle something like this?


Solution

  • Table 5-1 in the SystemVerilog 1800-2017 LRM does not list \r (carriage return) as one of the available special characters. This character is ignored by most display clients, but if you really need it you can use the hex code \x0d instead.