examples/cordic/cordic_impl: do not fail if build dir does not exist
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 2 Dec 2013 12:03:26 +0000 (13:03 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 2 Dec 2013 12:03:26 +0000 (13:03 +0100)
examples/cordic/cordic_impl.py

index d7ac084fafb5741b192b8db6e82011f5dcd20f77..9cc79194eacecc7472d2030d7b63648443fe20c7 100644 (file)
@@ -3,13 +3,14 @@ import json
 
 from migen.fhdl.std import *
 from migen.genlib.cordic import Cordic
+from mibuild.tools import mkdir_noerror
 from mibuild.generic_platform import *
 from mibuild.xilinx_ise import XilinxISEPlatform, CRG_SE
 
-
 class CordicImpl(Module):
        def __init__(self, name, **kwargs):
                self.name = name
+               mkdir_noerror("build")
                json.dump(kwargs, open("build/{}.json".format(name), "w"))
                self.platform = platform = Platform()
                self.submodules.cordic = Cordic(**kwargs)