J
JeffC
Guest
I'm a Verilog newbie of about a week (I know, they are everywhere). I'm
trying to generate four synchronized periodic digital waveforms (they
are not square or PWM) for output from my Spartan 3 FPGA. I'm wondering
the best way to go about this. In the past I used sequential vectors of
digital values to represent how the logic levels progress in time (with
an 8 port PIC micro controller). Now I need more flexibility and
features which is why I'm up to FPGAs. I thought perhaps an always
block along these lines (for a simple square wave)...
module waveforms(clk, linesout);
input clk;
output [3:0] linesout;
reg [3:0] lines;
assign linesout = lines;
initial lines = 4'b0000;
always begin
#10 lines = 4'b1111;
#10 lines = 4'b0000;
end
endmodule
Perhaps?
I'm wondering how to trigger the always block, and also the Xilinx ISE
warning; 'Delay is ignored for synthesis.'
One waveform looks something like
__|--|__|---------|__|--|__|---------|__|--|__|---------|__|--|__|---------|
Thanks for any help.
trying to generate four synchronized periodic digital waveforms (they
are not square or PWM) for output from my Spartan 3 FPGA. I'm wondering
the best way to go about this. In the past I used sequential vectors of
digital values to represent how the logic levels progress in time (with
an 8 port PIC micro controller). Now I need more flexibility and
features which is why I'm up to FPGAs. I thought perhaps an always
block along these lines (for a simple square wave)...
module waveforms(clk, linesout);
input clk;
output [3:0] linesout;
reg [3:0] lines;
assign linesout = lines;
initial lines = 4'b0000;
always begin
#10 lines = 4'b1111;
#10 lines = 4'b0000;
end
endmodule
Perhaps?
I'm wondering how to trigger the always block, and also the Xilinx ISE
warning; 'Delay is ignored for synthesis.'
One waveform looks something like
__|--|__|---------|__|--|__|---------|__|--|__|---------|__|--|__|---------|
Thanks for any help.