Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@util.command
def build(self, args):
var, board = process_arguments(args, self.resources)
return self.run('build', var, board, packages=['scons', 'icestorm'])
@util.command
def clean(self):
return self.run('-c', packages=['scons'])
@util.command
def time(self, args):
var, board = process_arguments(args, self.resources)
return self.run('time', var, board, packages=['scons', 'icestorm'])
@util.command
def sim(self):
return self.run('sim', packages=['scons', 'iverilog', 'gtkwave'])
@util.command
def upload(self, args, serial_port, ftdi_id, sram):
var, board = process_arguments(args, self.resources)
programmer = self.get_programmer(board, serial_port, ftdi_id, sram)
var += ['prog={0}'.format(programmer)]
return self.run('upload', var, board, packages=['scons', 'icestorm'])
@util.command
def verify(self):
return self.run('verify', packages=['scons', 'iverilog'])
@util.command
def lint(self, args):
var = format_vars({
'all': args.get('all'),
'top': args.get('top'),
'nowarn': args.get('nowarn'),
'warn': args.get('warn'),
'nostyle': args.get('nostyle')
})
return self.run('lint', var, packages=['scons', 'verilator'])