Forum Discussion
Altera_Forum
Honored Contributor
12 years agoError (10170): Verilog HDL syntax error at CMD_FSM3.sv(109) near text "~&"; expectin
hi all, i'm trying to write FSM that check few commands out of about 10 available command and i get this error message when trying to use nand with if can you please tell me what do i do wrong?...
Altera_Forum
Honored Contributor
12 years ago~& is not a valid operator in Verilog. For a NAND, you should write it as:
(~((!data_in_valid) && (data_in==GET_CONFIGURATION))) or (~((!data_in_valid) & (data_in==GET_CONFIGURATION))) In this case a long as data_in_valid is a single bit expression both will give the same answer. Pete