title: Using switches to change frequency of square wave in Verilog
body: <p>I am trying to use the 8 switches on my <code>basys2</code> board to control the frequency of a square wave, yet I'm having trouble with the input part of it, as I do not know how to divide the clock using the binary value of the register that I have collected the states of the switches in.</p>
  
  <p>I know that I need to divide <code>25000000/[input value]</code> in order to get the correct value for the counter. My question is:</p>
  
  <p><strong>how can I divide <code>25000000</code> by the register which has the switch states stored inside of it such, as <code>input [7:0] SW</code>?</strong></p>