I am a novice in digital design and are learning things using "Advanced Digital Design with the Verilog HDL" along with a Spartan-6 LX9 board by Xilinx. So far I have managed to blink few leds on the board by starting with an example from Xilinx's web site. The code can be found here. I couldn't fully figure out DCM part of the example, though. As I understand, this is some vendor-specific module that is used to shift clock phase etc. Basically, a module that adjusts the raw clock input. I couldn't find a documentation for that module for my LX9 board, and the closest one I found is for Spartan-3A (here). So I have few questions:
- Is there any documentation for that is generic or covers Spartan-6 LX9 board?
- Is using this module is absolutely necessary in this example? Is that possible to do the same thing easily w/o using that module?
- How people usually go about vendor specific things like clock? For example, if one wants to target both Altera FPGAs and Xilinx ones. What is the process to achieve that? Is it similar to ordinary C pre-processor typedefs etc?
Also, why is it now allowed to move assign LED[3:0] = led_count[26:23];
inside the always @
block? Is it because LED is a not a register variable? And how often that "code line" is getting executed then? In the book I am reading, everything usually goes into the always @
scope (but they don't work with specific output ports though).
Thank you very much for your help.