I am using Vivado 2023.1 and I am not able to connect the output of RTL module to AXI GPIO output that is connected to LED. Please see attached. RTL is below
module led_blinker (
input wire sysclk,
input wire rst,
output reg led
);
reg [26:0] counter;
reg led_state;
//TO make reset signal work with PS, make sure it is negedge reset
always @(posedge sysclk or negedge rst) begin
if (~rst) begin
counter <= 27'd0;
led_state <= 1'b0;
end else begin
if (counter == 27'd99999999) begin // Adjust for desired blink rate
counter <= 27'd0;
led_state <= ~led_state;
end else begin
counter <= counter + 1'b1;
end
end
end
always @(*)
begin
led = led_state;
end
endmodule
Question
tulamba
I am using Vivado 2023.1 and I am not able to connect the output of RTL module to AXI GPIO output that is connected to LED. Please see attached. RTL is below
module led_blinker ( input wire sysclk, input wire rst, output reg led ); reg [26:0] counter; reg led_state; //TO make reset signal work with PS, make sure it is negedge reset always @(posedge sysclk or negedge rst) begin if (~rst) begin counter <= 27'd0; led_state <= 1'b0; end else begin if (counter == 27'd99999999) begin // Adjust for desired blink rate counter <= 27'd0; led_state <= ~led_state; end else begin counter <= counter + 1'b1; end end end always @(*) begin led = led_state; end endmodule
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now