[SOLVED] Pins mess in TinyFPGA Bx Pins(software != hardware)


Hello everybody,
I started a few months in the FPGAs world with the TinyFPGAs.
Get my first Ax - GREAT !!!
Get my first Bx - MESS !!!
In Verilog file, I send a signal output on pin21, but gets out in FPGAs pi 18 !!!
Best regards


Looks like you might have the wrong pin constraint file. Make sure you are using the BX files and not the B2. You can follow this guide: https://tinyfpga.com/bx/guide.html


Thanks Luke, I’ll try tomorrow.


Hello Luke,
Yes, I’m using the BX files … And to check, I downloaded again, and the same happened


Verry strange, but … as customs (taxes… taxes … taxes…) released the other BX I ordered, after soldering the pins, I’ll try again with the new one … I’ll say something in a few minutes …

Best regards,


Hello Luke,

Not good, again the same … This is my constrain file:

and the new BX …

Hoppe you can help. Meanwhile I’ll work wit the Ax.

Thanks for your help,
Best regards,


That’s the B2 pin constraint file. Can you post the exact link you got the pin constraint file from?

This is the one you should be using: https://github.com/tinyfpga/TinyFPGA-BX/blob/master/apio_template/pins.pcf


Hello Luke,
I’m out of my desk, having my bedtime reading (Portugal now in deep night).
I noticed your response, so a quick tablet answer:
I’m using IceCube2, not Atom, and I get it from:
from the link:
“2. Copy the template project from the TinyFPGA BX Repository”

Thanks verry much for your attention,
best regards,


Hello Luke,

Here are more details:

  1. https://tinyfpga.com/ and chose the “BX Guide”:

  2. Chose “TinyFPGA BX Repository”:

And I used the pinconstrain file, on IceCube. I think that the problem was using the file in the IceCube template, on a APIO guide. Tonight I’ll use the one that you point me.

Thanks in advanced,
Bets regards,


Hi @RodolfoSousa I don’t know why but there are two directories with pcf files.
Take the one in the icestorm_template perhaps this icecube directory needs to be removed @lukevalenty?


Hello keesj,
Thanks for the help,
I’ll try latter, and will then, say something
Best regards,


I’ll take a look at the repo and see what pin constraint files there are. There must be an old B2 version in the BX repo somewhere.


The icecube2-template directory in the BX repo has a B2 constraint file instead of a BX constraint file.


Uooooo… not verry nice … the same Constrain pin file, that you and Luke told me to use…


Hi @RodolfoSousa I don’t know about icecube2 itself. The sample in icestorm_template mostly works. One of the differences I see is that the icecube verilog and constraint pins names are lower case while the pins in the icestorm template are upper case. But this is all kind of stuff you might enjoy figuring out yourself! Don’t want to spoil the fun.

Learning to make the constraint files yourself is also nice. I did just that a few days ago and happened to had documented that part here for the LED (but the same is applies to the header) https://github.com/keesj/fpga-hdl/tree/master/TinyFPGA-BX-1pad/01_led_blink


Hello keesj,

That looks cool, I’ll se It, thanks.

Best regards,


Hello everybody,

I was “out of the grid” a few day, as I have a full-day job, so I can pay my PhD.

Things with the Bx is kind of messy:

  • The pins.pcf file in the “icecube2_template” is the same as the “icestorm_template”. I tryed the last one as @keesj sugested, but nothing.

So i find a good pin, and put I2C signal, to drive another pin, on the negative edge, and and started to get the stange response:

  • pin 23 (verilog file) -> pin 22 (Bx board)
  • pin 22 (verilog file) -> pin 20 (Bx board)
  • pin 21 (verilog file) -> pin 18 (Bx board)

What a mess … so I looked the pins.pcf in the “apio_template”, and had response for the strange behavior.

  • pin 23 A7 (“icecube2_template” is the same as the “icestorm_template”) -> pin 22 A7 (“apio_template”)
  • pin 22 A8 (“icecube2_template” is the same as the “icestorm_template”) -> pin 20 A8 (“apio_template”)
  • pin 21 A9 (“icecube2_template” is the same as the “icestorm_template”) -> pin 18 A9 (“apio_template”)

Ok, something starting to make sense … but … nobody uses the IceCube or the Icestrom?
I’ts late now in Portugal, and spend to mutch time to figure what is happening. Tomorrow will copy the “apio_template” to the “icecube2_template”.

Best regards,


Could not sleep … had to try…
YES, it works.
Must use the “apio_template” pins.pcf file!
The “icecube2_template”and the “icestorm_template” are wrong!
@lukevalenty it is solved, I did it :slight_smile: !


I guess it would be good to fix the problem for future users… I will try and create a patch