Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
learn:software:tutorials:verilog-project-1:start [2017/01/11 20:30] James Colvinlearn:software:tutorials:verilog-project-1:start [2022/09/12 15:38] (current) – changed forum.digilentinc.com to forum.digilent.com Jeffrey
Line 9: Line 9:
 A list of the all of the Verilog projects can be found [[learn/software/tutorials/verilog-projects/start|here]]. A list of the all of the Verilog projects can be found [[learn/software/tutorials/verilog-projects/start|here]].
  
-//Remember that we won't be adding any files or creating a bitstream for this first project; that'll all start in [[learn/software/tutorials/verilog-project-2/start|Project 2]]. If you have any questions after reading through the project, please feel free to post them on the [[https://forum.digilentinc.com/|Digilent Forum]] where an engineer will be happy to assist you.//+//Remember that we won't be adding any files or creating a bitstream for this first project; that'll all start in [[learn/software/tutorials/verilog-project-2/start|Project 2]]. If you have any questions after reading through the project, please feel free to post them on the [[https://forum.digilent.com/|Digilent Forum]] where an engineer will be happy to assist you.//
  
 ===== What is a Verilog® Module? =====  ===== What is a Verilog® Module? ===== 
Line 41: Line 41:
 ==== Input, Output, and Bus ==== ==== Input, Output, and Bus ====
 Whenever you are writing a Verilog module, the first thing to do is to define the input and output signals. In the example in Fig. 1, there is one input signal “sw” coming from the onboard switch SW0, and one output signal “led” connected to LED0. How did we choose the names "sw" and "led"?  Whenever you are writing a Verilog module, the first thing to do is to define the input and output signals. In the example in Fig. 1, there is one input signal “sw” coming from the onboard switch SW0, and one output signal “led” connected to LED0. How did we choose the names "sw" and "led"? 
-They came from the XDC file. __//need link to XDC file page description//__+They came from the [[programmable-logic:guides:vivado-xdc-file|XDC file]]
  
 Note, however, that input and output can be a group of wires as well. We call these groupings a bus. To declare the input or output as a bus, we need to provide the CAD tools with the index of the most significant bit (MSB) of the bus and the index of the least significant bit (LSB) of the bus. For example, the following code defines an 8-bit wide bus “sw”, where the left-most bit (MSB) has the index 7 and the right-most bit (LSB) has the index 0, with a colon '':'' separating the two numbers. Note, however, that input and output can be a group of wires as well. We call these groupings a bus. To declare the input or output as a bus, we need to provide the CAD tools with the index of the most significant bit (MSB) of the bus and the index of the least significant bit (LSB) of the bus. For example, the following code defines an 8-bit wide bus “sw”, where the left-most bit (MSB) has the index 7 and the right-most bit (LSB) has the index 0, with a colon '':'' separating the two numbers.