??? 01/11/07 18:35 Read: times |
#130683 - Verilog bites like C Responding to: ???'s previous message |
Suresh R said:
assign bf_out = (ctr0_slect = 1'b1 && ctr0_RW = 1'b0)?(rd_bk = 1'b1 && ctrl_data[4] = 1'b0? status_latch:[5:4]ctrl_data = 2'b01?OLl:[5:4]ctrl_data = 2'b10?OLm:[5:4]ctrl_data = 2'b11??... The equality operator in Verilog is the same as it is in C, which is to say assign foo = (foosel == FOOBAR)? bar : bletch;Note two equal signs, not one, between foosel and FOOBAR. And, like C, it'll bite you in the ass if you mistake one for the other (although some tools may throw out a helpful warning). Then there's the case equality, which is THREE equal signs... -a |