示例#1
0
def main():
    args = parse_args()

    code = None
    if args.binary:
        with open(args.binary, 'rb') as f:
            code = list(f.read())

    platform = SimPlatform("sim", _io, toolchain="verilator")
    soc = SimFX2(platform, clk_freq=48e6, code=code)
    config = SimConfig(default_clk='sys_clk')
    platform.build(soc, sim_config=config, build=True, run=True, trace=True)
 def __init__(self, toolchain="verilator"):
     SimPlatform.__init__(self, "sim", _io, _connectors,
                          toolchain="verilator")