Electronic – Trying to program an FPGA. (Altera Cyclone II)

fpgaintel-fpgaverilog

I have got FPGA development board (Cyclone II EP2C20F484C7) and am trying to implement a simple counter program as shown below (and maybe link it to the LEDs).

module counter (clk, reset, enable, count);
input clk, reset, enable;
output [3:0] count;
reg [3:0] count;                                   

always @ (posedge clk)
if (reset == 1'b1) begin
  count <= 0;
end else if ( enable == 1'b1) begin
  count <= count + 1'b1;
end

endmodule  

I have simulated it on ModelSim and it works fine but complied and Synthesized it using Quatrus II for some reason the FPGA board isnt detected when I try to program it.

Any suggestions on changes I might have to make in the code above inorder to get the required output? Or is there something i am doing wrong here?

Best Answer

  1. Make sure you have selected the proper programming hardware by clicking 'Hardware Setup...' (e.g. 'USB-Blaster').

  2. Select the proper 'Mode' from the dropdown based on what your target board supports.

  3. For Active Serial Programming, click 'Add File...' and select the .pof file (I think the dialog forces this). JTAG and Passive Serial modes use .sof files.

  4. For Active Serial Programming, click 'Add Device...' to select the EPCS configuration device you're using (e.g. EPCS4).

  5. Finally, check 'Program/Configure' checkbox and should now be able to click 'Start'.

UPDATE: Verify the USB-Blaster driver is installed; should show up as 'Altera USB-Blaster' in Device Manager when the DE2 board is on and plugged in:

Altera USB-Blaster listed in Device Manager