Jump to content
  • 0

Question about LED output on Basys3 board


tpg56

Question

Hi,

I have a question about LEDs on the basys3 board. I'm using Verilog, and in my code I have a top level module which has other sub-modules within it. Like this:

module top (); 
    
    sub_module m1 (some_inputs, some_outputs);
    
endmodule

If I want to have the sub-module with an LED output, how would I go about doing it? I already tried having "output [15:0] led" in the definition of the top level module and also having it as an output of the sub level module, but that did not work. I also tried to simply declare led as a register within the sub_module, but that also didn't work.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

You have to define all signals going in and out of a module - One of the output signals of 'm1' has to be connected to a wire in the 'top'  module, and that wire needs to connect to one of the output signals of 'top'. In addition, the output signals of 'top' have to be assigned to the correct pin using the appropriate location constraint in the project's constraints file.

There are some example at http://www.fpga4fun.com/Opto0.html that might help, however they don't mention how to set your constraints.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...