Ejemplo n.º 1
0
	# merge in defaults
	project_config = dict(target_project.PARAMETERS, **project_config)

	# load all dependencies
	core_dependencies = target_project.CORES + target_board.CORES

	while len(core_dependencies):
		core = core_dependencies.pop()
		try:
			if core not in target_cores:
				target_cores[core] = LoadCore(core)
		except ImportError:
			raise Exception("dependency '%s' for project '%s' not found" % (core, project))
		core_dependencies += target_cores[core].CORES

	p = XilinxProject()

	p.set_synth_target(target_board.TARGET)
	p.set_top(target_board.TOP_MODULE)

	for d in [target_project, target_board] + target_cores.values():
		for f in d.FILES:
			p.add(ProjectFile(f.type, os.path.join(d.ROOT, f.filename)))

	open("wrap.vhd", "w").write(build_wrapper(target_board.PROJECT, [(target_project.TOP_MODULE, project_config)]))
	p.add(ProjectFile(ProjectFile.VHDL, "wrap.vhd"))
	
	p.run()

build_bitstream(sys.argv[1], sys.argv[2], parse_project_config(sys.argv[3]))
Ejemplo n.º 2
0
parser.add_argument('platform', help = "platform")
parser.add_argument('url', help = "url of project workunit server")
parser.add_argument('username', help = "username")
parser.add_argument('password', help = "password", default = "pass0")
parser.add_argument('--instances', help = "nr of instances", type=int, default = 1)
parser.add_argument('--bitstream', help = "bitstream to program", default = None)
parser.add_argument('--cable', help = "jtag cable", default = "ftdi")
parser.add_argument('--productid', help = "jtag cable product id (for ftdi/fx2)", default = "6110")
parser.add_argument('--vendorid', help = "jtag cable vendor id (for ftdi/fx2)", default = "ffff")
from crunchy.core.projectconfig import parse_project_config

args = parser.parse_args()

workunit_provider = setup_provider(args.project, args.url, args.username, args.password)

project_config = parse_project_config(args.projectconfig)

project_meta = workunit_provider.get_meta()

jtag, chain = setup_jtag(args)

# HAXX HAXX (uh oh, this is really bad.)
platform = eval(args.platform)()

projects = [CreateProject(i, jtag, chain[i], platform, project_config, args.bitstream, project_meta) for i in range(args.instances)]

from crunchy.client.run import run_loop

run_loop(projects, workunit_provider)

print "finished"
Ejemplo n.º 3
0
    core_dependencies = target_project.CORES + target_board.CORES

    while len(core_dependencies):
        core = core_dependencies.pop()
        try:
            if core not in target_cores:
                target_cores[core] = LoadCore(core)
        except ImportError:
            raise Exception("dependency '%s' for project '%s' not found" %
                            (core, project))
        core_dependencies += target_cores[core].CORES

    p = XilinxProject()

    p.set_synth_target(target_board.TARGET)
    p.set_top(target_board.TOP_MODULE)

    for d in [target_project, target_board] + target_cores.values():
        for f in d.FILES:
            p.add(ProjectFile(f.type, os.path.join(d.ROOT, f.filename)))

    open("wrap.vhd", "w").write(
        build_wrapper(target_board.PROJECT,
                      [(target_project.TOP_MODULE, project_config)]))
    p.add(ProjectFile(ProjectFile.VHDL, "wrap.vhd"))

    p.run()


build_bitstream(sys.argv[1], sys.argv[2], parse_project_config(sys.argv[3]))
Ejemplo n.º 4
0
parser.add_argument('password', help="password", default="pass0")
parser.add_argument('--instances', help="nr of instances", type=int, default=1)
parser.add_argument('--bitstream', help="bitstream to program", default=None)
parser.add_argument('--cable', help="jtag cable", default="ftdi")
parser.add_argument('--productid',
                    help="jtag cable product id (for ftdi)",
                    default="6110")

from crunchy.core.projectconfig import parse_project_config

args = parser.parse_args()

workunit_provider = setup_provider(args.project, args.url, args.username,
                                   args.password)

project_config = parse_project_config(args.projectconfig)

project_meta = workunit_provider.get_meta()

jtag, chain = setup_jtag(args)

# HAXX HAXX (uh oh, this is really bad.)
platform = eval(args.platform)()

projects = [
    CreateProject(i, jtag, chain[i], platform, project_config, args.bitstream,
                  project_meta) for i in range(args.instances)
]

from crunchy.client.run import run_loop
Ejemplo n.º 5
0
def cli_init(args, project):
	project.initialize(args.type, parse_project_config(args.config))