2013-03-18 18:03:52 -04:00
|
|
|
#!/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
|
2013-03-18 18:03:52 -04:00
|
|
|
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)
|
2013-03-18 18:03:52 -04:00
|
|
|
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()
|