• 0
Sign in to follow this  
youngpark

How to connect RTL module and IP blocks?

Question

Hello everyone.

I am learning UART communication with Nexys video board. Using only IP integrator, I succeed to 'turn on the LEDs with SWs'

image.png.e05f09f81487c508cf6453109a952737.png

and now, I tried to use custom counter module by Verilog.


module clock_divider(
    input clk,
    input [4:0]key,
    output reg [7:0]led
    );
      //we will need one register to keep the clock count number;
  reg [22:0] count;
      
      
         always @(posedge clk)        // judge the clk rise edge;
            if (key) begin            // if the key has been pressed,
               if(count==0) begin     // then count value flip over to zero, then make led on or off
                  led <= ~led;        // in the always loop, it needs to use registers
               end
               count <= count +1;     // add the count value until it flips over to zero
            end 
            else 
               begin            // if there is no key to be pressed, init the led to off state;
               led <=0;
               count <=1;
               end


endmodule

and I included this module in IP design.

image.thumb.png.c6f01e7aa78d4ac13ff6edf92d03044a.png

and the errors were like below.

image.thumb.png.12329fc516b3bb4d756c19ec9bb19084.png

before this errors, I connected slight different module~IP wiring , and the result was ' synthesis & implement succeed, Bitstream failed'

I'm looking for some information on google, but hard to find out my problem. can you give me some hints or solution? 

Thank you for your kind answers,

...

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi @youngpark

Looks like the AXI GPIO (axi_gpio_0) connected to the module's key input is set to input only. This should be changed to output only.

the connection between led and axi_gpio_1 is also a potential issue. When you connect only some pins of an interface to a module, it disables the board interface's version of those pins. What this means in your design is that clock_divider_0's output is not going to be reflected on the LEDs. From the point of view of the processor, when it reads from the GPIO, it will see the clock_divider module's output, and when it writes, it writes directly to the board's LEDs. If the intended behavior is to have the counter output to the LEDs and for the processor to be able to read the state of the LEDs, then you would probably need to use a port that is not from the board file and an XDC file to constrain it. See the images below (microblaze etc. not included).

EDIT: I missed that the push buttons were also connected. They also have the same issue that the LEDs do. I have changed my screenshots to reflect how to solve the issue for both.

Thanks

-Arthur

image.thumb.png.717eddd15896de66a9e40c7fc678955b.png

 

 

image.thumb.png.7f0b8f1c57c4504424e6e8bcc09a032e.png

Edited by artvvb
Missed something

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this