Commit b3c79738 authored by Sebastien Bourdeauducq's avatar Sebastien Bourdeauducq
Browse files

examples/cordic/cordic_impl: do not fail if build dir does not exist

parent dd24fdd3
...@@ -3,13 +3,14 @@ import json ...@@ -3,13 +3,14 @@ import json
from migen.fhdl.std import * from migen.fhdl.std import *
from migen.genlib.cordic import Cordic from migen.genlib.cordic import Cordic
from mibuild.tools import mkdir_noerror
from mibuild.generic_platform import * from mibuild.generic_platform import *
from mibuild.xilinx_ise import XilinxISEPlatform, CRG_SE from mibuild.xilinx_ise import XilinxISEPlatform, CRG_SE
class CordicImpl(Module): class CordicImpl(Module):
def __init__(self, name, **kwargs): def __init__(self, name, **kwargs):
self.name = name self.name = name
mkdir_noerror("build")
json.dump(kwargs, open("build/{}.json".format(name), "w")) json.dump(kwargs, open("build/{}.json".format(name), "w"))
self.platform = platform = Platform() self.platform = platform = Platform()
self.submodules.cordic = Cordic(**kwargs) self.submodules.cordic = Cordic(**kwargs)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment