CIRCT 23.0.0git
Loading...
Searching...
No Matches
__init__.py
Go to the documentation of this file.
1# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
2# See https://llvm.org/LICENSE.txt for license information.
3# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
5from typing import Callable, Optional, Type
6
7from .cosim import CosimBSP, CosimBSP_DMA
8from .xrt import XrtBSP
9
10from pycde.module import Module
11
12
13def get_bsp(name: Optional[str] = None) -> Callable[[Module], Module]:
14 if name is None or name == "cosim":
15 return CosimBSP
16 elif name == "cosim_dma":
17 return CosimBSP_DMA
18 elif name == "xrt":
19 return XrtBSP
20 else:
21 raise ValueError(f"Unknown bsp type: {name}")