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;


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?

  • 2
    \$\begingroup\$ "the FPGA board isn't detected when I try to program it" sounds more like a problem with your hardware/software installation. But you need to go into more details about your setup and what happens (for example error messages). \$\endgroup\$
    – starblue
    Oct 2, 2011 at 21:15
  • 1
    \$\begingroup\$ There is no error message. When I add the .sof file and on selecting the program/configure tick box, isnt the start button supposed to be activated? Right now nothing is activated. \$\endgroup\$
    – Sii
    Oct 2, 2011 at 21:19

1 Answer 1

  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

  • 1
    \$\begingroup\$ The only drop down on selecting 'Hardware Setup' is "EthernetBlaster"even though I have connected using the USB? I am using Quatrus II web edition. \$\endgroup\$
    – Sii
    Oct 2, 2011 at 21:43
  • 1
    \$\begingroup\$ Sounds like you don't have the USB driver installed. Are you using a 'USB-Blaster' programmer or board with on-board programmer (like a DE2 board)? \$\endgroup\$
    – Craig
    Oct 2, 2011 at 21:45
  • 1
    \$\begingroup\$ Its a DE2 board. The 7 segement display is glowing and status blue, green and red LEDs are glowing so I am not sure if it a issue with board not detecting or something else. \$\endgroup\$
    – Sii
    Oct 2, 2011 at 21:50
  • 1
    \$\begingroup\$ You should be able to find the USB-Blaster driver in your C:\altera\<version>\quartus\drivers\usb-blaster folder (assuming you've installed Quartus in the default location). \$\endgroup\$
    – Craig
    Oct 2, 2011 at 21:54
  • 1
    \$\begingroup\$ Another thing I thought of, make sure you're plugged into the usb port next to the DC jack on the DE2. It should be labeled 'BLASTER'. \$\endgroup\$
    – Craig
    Oct 3, 2011 at 0:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.