I have been fantasizing about getting into FPGAs for a couple years and once I found out about the TinyFPGA my fate was sealed. I purchased the BX and got it up and running.
I am attaching very simple verilog code I wrote that turns on the LED when voltage is applied at PIN_1. Also attached is my circuit diagram. I feel this board is a great intro board for FPGAs, but it is really hard for me to find noob level projects and examples. I’d love any pointers or links to good instructions.
// look in pins.pcf for all the pin names on the TinyFPGA BX board
module top (
input CLK, // 16MHz clock input PIN_1, // First PIN on board output LED, // User/boot LED next to power LED output USBPU // USB pull-up resistor
// drive USB pull-up resistor to '0' to disable USB assign USBPU = 0; reg ledon; //register ledon always @(posedge CLK) //whenever clock goes from 0 to 1 if (PIN_1) begin ledon <= 1; end else begin ledon <= 0; end
assign LED = ledon; //light up the led with state of register