mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-01-11 23:53:21 +00:00
Adressed PR comments
This commit is contained in:
parent
1209c011c2
commit
1df1ae07a0
@ -11,6 +11,8 @@ Python scripting is defined that allows the user to describe a semi-flattened ro
|
||||
|
||||
Most of what's written in the [viaduct docs](./viaduct.md) also applies to bootstrapping a Himbächel arch - this also provides a migration path for an existing Viaduct architecture. Just replace `viaduct` with `himbaechel` and `ViaductAPI` with `HimbaechelAPI` - the set of validity checking and custom flow "hooks" that you have access to is designed to be otherwise as close as possible.
|
||||
|
||||
Additionally Himbächel API defines `getUArchOptions` enabling specifying additional command line parameters for given architecture only.
|
||||
|
||||
However, the key difference is that you will need to generate a "binary blob" chip database. `himbaechel_dbgen/bba.py` provides a framework for this. The typical steps for using this API would be as follows:
|
||||
- Create a `Chip` instance
|
||||
- For each unique "tile type" in the design (e.g. logic, BRAM, IO - in some cases multiple variants of these may be multiple tile types):
|
||||
|
||||
@ -59,7 +59,7 @@ Arch::Arch(ArchArgs args) : args(args)
|
||||
|
||||
static void print_vopt_help(const po::options_description &vopt_desc)
|
||||
{
|
||||
std::cout << "Allowed --vopt options:\n";
|
||||
std::cerr << "Allowed --vopt options:\n";
|
||||
size_t maxlen = 0;
|
||||
std::vector<std::pair<std::string, std::string>> lines;
|
||||
|
||||
@ -76,13 +76,13 @@ static void print_vopt_help(const po::options_description &vopt_desc)
|
||||
}
|
||||
|
||||
for (auto &[text, desc] : lines)
|
||||
std::cout << " " << std::left << std::setw(static_cast<int>(maxlen) + 2) << text << desc << "\n";
|
||||
std::cerr << " " << std::left << std::setw(static_cast<int>(maxlen) + 2) << text << desc << "\n";
|
||||
}
|
||||
|
||||
void Arch::parse_vopt()
|
||||
{
|
||||
namespace po = boost::program_options;
|
||||
auto vopt_desc = uarch->getUarchOptions();
|
||||
auto vopt_desc = uarch->getUArchOptions();
|
||||
vopt_desc.add_options()("help,h", "show help");
|
||||
|
||||
std::vector<const char *> argv;
|
||||
|
||||
@ -68,7 +68,7 @@ struct HimbaechelAPI
|
||||
// then it is responsible for loading the db blob with arch->load_chipdb()
|
||||
virtual void init_database(Arch *arch) = 0;
|
||||
// Return uarch specific options description
|
||||
virtual po::options_description getUarchOptions() = 0;
|
||||
virtual po::options_description getUArchOptions() = 0;
|
||||
Context *ctx;
|
||||
bool with_gui = false;
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ struct ExampleImpl : HimbaechelAPI
|
||||
|
||||
~ExampleImpl() {};
|
||||
|
||||
po::options_description getUarchOptions()
|
||||
po::options_description getUArchOptions()
|
||||
{
|
||||
po::options_description specific("Example specific options");
|
||||
return specific;
|
||||
|
||||
@ -32,7 +32,7 @@ NEXTPNR_NAMESPACE_BEGIN
|
||||
|
||||
GateMateImpl::~GateMateImpl() {};
|
||||
|
||||
po::options_description GateMateImpl::getUarchOptions()
|
||||
po::options_description GateMateImpl::getUArchOptions()
|
||||
{
|
||||
po::options_description specific("GateMate specific options");
|
||||
specific.add_options()("out", po::value<std::string>(), "textual configuration bitstream output file");
|
||||
|
||||
@ -40,7 +40,7 @@ enum MultiDieStrategy
|
||||
struct GateMateImpl : HimbaechelAPI
|
||||
{
|
||||
~GateMateImpl();
|
||||
po::options_description getUarchOptions() override;
|
||||
po::options_description getUArchOptions() override;
|
||||
void init_database(Arch *arch) override;
|
||||
|
||||
void init(Context *ctx) override;
|
||||
|
||||
@ -23,7 +23,7 @@ struct GowinImpl : HimbaechelAPI
|
||||
{
|
||||
|
||||
~GowinImpl() {};
|
||||
po::options_description getUarchOptions() override;
|
||||
po::options_description getUArchOptions() override;
|
||||
void init_database(Arch *arch) override;
|
||||
void init(Context *ctx) override;
|
||||
|
||||
@ -114,7 +114,7 @@ struct GowinArch : HimbaechelArch
|
||||
std::unique_ptr<HimbaechelAPI> create(const std::string &device) override { return std::make_unique<GowinImpl>(); }
|
||||
} gowinArch;
|
||||
|
||||
po::options_description GowinImpl::getUarchOptions()
|
||||
po::options_description GowinImpl::getUArchOptions()
|
||||
{
|
||||
po::options_description specific("Gowin specific options");
|
||||
specific.add_options()("family", po::value<std::string>(), "GOWIN chip family");
|
||||
|
||||
@ -43,7 +43,7 @@ NEXTPNR_NAMESPACE_BEGIN
|
||||
|
||||
NgUltraImpl::~NgUltraImpl() {};
|
||||
|
||||
po::options_description NgUltraImpl::getUarchOptions()
|
||||
po::options_description NgUltraImpl::getUArchOptions()
|
||||
{
|
||||
po::options_description specific("NG-Ultra specific options");
|
||||
specific.add_options()("bit", po::value<std::string>(), "textual configuration bitstream output file");
|
||||
|
||||
@ -40,7 +40,7 @@ NEXTPNR_NAMESPACE_BEGIN
|
||||
struct NgUltraImpl : HimbaechelAPI
|
||||
{
|
||||
~NgUltraImpl();
|
||||
po::options_description getUarchOptions() override;
|
||||
po::options_description getUArchOptions() override;
|
||||
void init_database(Arch *arch) override;
|
||||
|
||||
void init(Context *ctx) override;
|
||||
|
||||
@ -39,7 +39,7 @@ NEXTPNR_NAMESPACE_BEGIN
|
||||
|
||||
XilinxImpl::~XilinxImpl() {};
|
||||
|
||||
po::options_description XilinxImpl::getUarchOptions()
|
||||
po::options_description XilinxImpl::getUArchOptions()
|
||||
{
|
||||
po::options_description specific("Xilinx specific options");
|
||||
specific.add_options()("fasm", po::value<std::string>(), "fasm bitstream output file");
|
||||
|
||||
@ -109,7 +109,7 @@ struct XilinxImpl : HimbaechelAPI
|
||||
};
|
||||
|
||||
~XilinxImpl();
|
||||
po::options_description getUarchOptions() override;
|
||||
po::options_description getUArchOptions() override;
|
||||
void init_database(Arch *arch) override;
|
||||
|
||||
void init(Context *ctx) override;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user