errors · bitdewfpga sim / bit, before anything runs
blink.sv:1: ERROR [utf8-bom]: blink.sv starts with a byte-order mark (saved as 'UTF-8 with BOM'), and yosys stops at its first token. Fix: save it as plain UTF-8, or remove it: LC_ALL=C sed -i '' $'1s/^\xEF\xBB\xBF//' blink.sv
blink.sv:1: ERROR [utf8-bom]: blink.sv starts with a byte-order mark (saved as 'UTF-8 with BOM'), and yosys stops at its first token. Fix: save it as plain UTF-8, or remove it: LC_ALL=C sed -i '' $'1s/^\xEF\xBB\xBF//' blink.sv https://nosey-dewdrop.github.io/dewfpga/errors/utf8-bom/
Why does it happen?
Windows Notepad's "UTF-8 with BOM" and some Word exports put a byte-order mark before the first character. Vivado skips it; yosys does not, and would stop with syntax error, unexpected TOK_ID at line 1, so the CLI names the real cause first.
What is the fix?
Save the file as plain UTF-8 (VS Code: the encoding in the status bar), or strip the bytes:
LC_ALL=C sed -i '' $'1s/^\xEF\xBB\xBF//' blink.sv