P
poldi
Guest
Hi all!
I am new to verilog and I have a little problem with it. I am using
Quartus WebII-Edition from Altera. My problem is: I dont know how to
execute commands sequenced inside an always@(trigger)-block. I've searched
the web but found only the #-operator. but this operator has no effect
according to the simulation runs.
example:
input nWRITE;
output dac_nWR;
wire dac_nWR;
reg dacr_nWR;
assign dac_nWR = dacr_nWR;
always@(posedge nWRITE) begin
#10 dacr_nWR = 1;
#10 dacr_nWR = 0;
end
I know of the possebility of using a finite state machine (FSM) for this
purpose but I am lazy and thougt there is another "smart" way of doing it.
In this example the compiler displays the warning: "dacr_nWR tied to GND"
which means he "thinks" there is no delay between these commands and
"optimizes" it to dacr_nWR=0 ...
So, is there a better way instead using FSMs?
sorry for the weird english and thank you in advance,
Martin.
I am new to verilog and I have a little problem with it. I am using
Quartus WebII-Edition from Altera. My problem is: I dont know how to
execute commands sequenced inside an always@(trigger)-block. I've searched
the web but found only the #-operator. but this operator has no effect
according to the simulation runs.
example:
input nWRITE;
output dac_nWR;
wire dac_nWR;
reg dacr_nWR;
assign dac_nWR = dacr_nWR;
always@(posedge nWRITE) begin
#10 dacr_nWR = 1;
#10 dacr_nWR = 0;
end
I know of the possebility of using a finite state machine (FSM) for this
purpose but I am lazy and thougt there is another "smart" way of doing it.
In this example the compiler displays the warning: "dacr_nWR tied to GND"
which means he "thinks" there is no delay between these commands and
"optimizes" it to dacr_nWR=0 ...
So, is there a better way instead using FSMs?
sorry for the weird english and thank you in advance,
Martin.