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