Altera_Forum
Honored Contributor
14 years agoVerilog code errors???
Hi,
I have this piece of code which when compiled with Quartus II web free resulting in errors (follow comment //). Please advise how to fix them. Thanks. 1) assign Sclk = SCLKout; assign CS_1 = (posedge Clk26mhz) ? CS1reg : ; // Error (10170): Verilog HDL syntax error at spi_intf.v(55) near text "posedge"; expecting an operand assign CS_2 = (posedge Clk26mhz) ? CS2reg : ; //Error (10170): Verilog HDL syntax error at spi_intf.v(55) near text "posedge"; expecting an operand Declaration: Sclk, Clk26mhz, CS_1, CS_2 as output type; SCLKout, CS1reg, CS2reg as reg type 2) assign# 500 rstb = 1'b0; 1'b1; // Error (10170): Verilog HDL syntax error at tb_pcm.v(35) near text "1"; expecting "endmodule" Declaration: rstb as wire Note: the equivalent VHDL code (no error) is: rstb <= '0', '1' after 500ns;