ethernet: use context manager to read generated LiteEth Verilog
This commit is contained in:
parent
5d614127cf
commit
8d319e9e76
|
|
@ -664,8 +664,5 @@ def main(core_config):
|
||||||
builder = Builder(soc, compile_gateware=False, output_dir=path)
|
builder = Builder(soc, compile_gateware=False, output_dir=path)
|
||||||
builder.build(build_name="liteeth_core")
|
builder.build(build_name="liteeth_core")
|
||||||
|
|
||||||
file = open(path + "/gateware/liteeth_core.v")
|
with open(path + "/gateware/liteeth_core.v") as f:
|
||||||
data = file.read()
|
return f.read()
|
||||||
file.close()
|
|
||||||
|
|
||||||
return data
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue