litex/examples/de0_nano/build.py

29 lines
706 B
Python
Raw Normal View History

#!/usr/bin/env python3
import os
2013-02-28 16:40:35 -05:00
from mibuild.platforms import de0nano
2012-09-09 15:18:09 -04:00
import top
2013-02-28 16:40:35 -05:00
def main():
plat = de0nano.Platform()
soc = top.SoC()
# set pin constraints
plat.request("led", 0, obj=soc.led)
2013-03-18 18:57:51 -04:00
#plat.request("led", 4, obj=soc.uart_rx_event.o)
#plat.request("led", 5, obj=soc.uart_tx_event.o)
#plat.request("led", 7, obj=soc.debug_event.o)
plat.request("serial", 0, obj=soc.uart2csr)
2013-02-28 16:40:35 -05:00
# set extra constraints
plat.add_platform_command("""
set_global_assignment -name FAMILY "Cyclone IV E"
set_global_assignment -name TOP_LEVEL_ENTITY "top"
set_global_assignment -name VERILOG_INPUT_VERSION SYSTEMVERILOG_2005
""")
2012-09-09 15:18:09 -04:00
2013-03-18 16:45:07 -04:00
plat.build_cmdline(soc.get_fragment())
2012-09-09 15:18:09 -04:00
2013-02-28 16:40:35 -05:00
if __name__ == "__main__":
main()