move standalone core generation to litedram package and make it usable externally

When LiteDRAM is installed, standalone core can now be generated with "litedram_gen config.yml"
This commit is contained in:
Florent Kermarrec 2019-08-28 07:19:30 +02:00
parent 0dde125740
commit 2bdeda021b
3 changed files with 6 additions and 1 deletions

0
examples/litedram_gen.py → litedram/gen.py Executable file → Normal file
View File

View File

@ -33,4 +33,9 @@ setup(
], ],
packages=find_packages(exclude=("test*", "sim*", "doc*", "examples*")), packages=find_packages(exclude=("test*", "sim*", "doc*", "examples*")),
include_package_data=True, include_package_data=True,
entry_points={
"console_scripts": [
"litedram_gen=litedram.gen:main",
],
},
) )

View File

@ -8,7 +8,7 @@ import os
def build_config(name): def build_config(name):
errors = 0 errors = 0
os.system("rm -rf examples/build") os.system("rm -rf examples/build")
os.system("cd examples && python3 litedram_gen.py {}.yml".format(name)) os.system("cd examples && litedram_gen {}.yml".format(name))
errors += not os.path.isfile("examples/build/gateware/litedram_core.v") errors += not os.path.isfile("examples/build/gateware/litedram_core.v")
os.system("rm -rf examples/build") os.system("rm -rf examples/build")
return errors return errors