Digistu01
Newbie
Hi ,
I am working in verilog.
I have an incoming signal to my fpga and one out signal. when this incoming goes high, I want the output signal to go low and stay low for 1000 clk cycles, irrespective of if the incoming signal goes low/ high. The code synthesises correctly but gives me multiple driver error when I implement it, which I clearly see . I know I cannot drive the reg “ temp” in two different always blocks . But how can I resolve this issue.
Following is the code :
I am working in verilog.
I have an incoming signal to my fpga and one out signal. when this incoming goes high, I want the output signal to go low and stay low for 1000 clk cycles, irrespective of if the incoming signal goes low/ high. The code synthesises correctly but gives me multiple driver error when I implement it, which I clearly see . I know I cannot drive the reg “ temp” in two different always blocks . But how can I resolve this issue.
Following is the code :
Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 module driver_low input en, output wire reg_out_pin ); reg [9:0] count; reg temp; reg reg_out; assign reg_out_pin = reg_out; always @( posedge en) begin temp <= 1’b1; end always @( posedge clk) begin If( temp) begin If ( count <= 10’d1000) reg_out <= 1’b0; else begin reg_out <= 1’b1; temp <= 1’b0; count <= 10’d0; end end reg_out <= 1’b1; end
Last edited by a moderator: