aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/chipdb.py
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2020-06-25 15:11:47 +0000
committerwhitequark <whitequark@whitequark.org>2020-06-26 08:36:07 +0000
commit89e0cc8078ecbb57ca450cc6c8a40f6b634b8c9c (patch)
treee34454964eff6bf4d14f40b4f1c271cadea6d1fa /ice40/chipdb.py
parentdc209f6344545196de8bf4de7abff2fcbd55732e (diff)
downloadnextpnr-89e0cc8078ecbb57ca450cc6c8a40f6b634b8c9c.tar.gz
nextpnr-89e0cc8078ecbb57ca450cc6c8a40f6b634b8c9c.tar.bz2
nextpnr-89e0cc8078ecbb57ca450cc6c8a40f6b634b8c9c.zip
Simplify and improve chipdb embedding/loading.
Diffstat (limited to 'ice40/chipdb.py')
-rw-r--r--ice40/chipdb.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ice40/chipdb.py b/ice40/chipdb.py
index 195c08ae..7b3ad999 100644
--- a/ice40/chipdb.py
+++ b/ice40/chipdb.py
@@ -1113,7 +1113,9 @@ class BinaryBlobAssembler:
bba = BinaryBlobAssembler()
bba.pre('#include "nextpnr.h"')
+bba.pre('#include "embed.h"')
bba.pre('NEXTPNR_NAMESPACE_BEGIN')
+bba.post('EmbeddedFile chipdb_file_%s("ice40/chipdb-%s.bin", chipdb_blob_%s);' % (dev_name, dev_name, dev_name))
bba.post('NEXTPNR_NAMESPACE_END')
bba.push("chipdb_blob_%s" % dev_name)
bba.r("chip_info_%s" % dev_name, "chip_info")