There is some shared code between add_tdb.py and generate_full.py. To
solve this I have added a util script containing shared code.
Moreover, in the case a block has to be overwritten, the add_tile_bits
function now checks if the two version of the block contain the same
information. If this does not happend the script fails.
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>