Enable user to override setupArchContext in Himbaechel arch

This commit is contained in:
Miodrag Milanovic 2024-04-17 08:00:45 +02:00 committed by myrtle
parent 7dd4a8c1d5
commit 6b5b21e165
2 changed files with 4 additions and 1 deletions

View File

@ -58,6 +58,7 @@ struct PlacerHeapCfg;
struct HimbaechelAPI
{
virtual void init(Context *ctx);
virtual void setupArchContext() {}
// If constids are being used, this is used to set them up early
// then it is responsible for loading the db blob with arch->load_chipdb()
virtual void init_database(Arch *arch) = 0;

View File

@ -33,7 +33,7 @@ class HimbaechelCommandHandler : public CommandHandler
HimbaechelCommandHandler(int argc, char **argv);
virtual ~HimbaechelCommandHandler(){};
std::unique_ptr<Context> createContext(dict<std::string, Property> &values) override;
void setupArchContext(Context *ctx) override{};
void setupArchContext(Context *ctx) override;
void customBitstream(Context *ctx) override;
protected:
@ -58,6 +58,8 @@ po::options_description HimbaechelCommandHandler::getArchOptions()
return specific;
}
void HimbaechelCommandHandler::setupArchContext(Context *ctx) { ctx->uarch->setupArchContext(); }
void HimbaechelCommandHandler::customBitstream(Context *ctx) {}
std::unique_ptr<Context> HimbaechelCommandHandler::createContext(dict<std::string, Property> &values)