Skip to content

Commit

Permalink
Enable user to override setupArchContext in Himbaechel arch
Browse files Browse the repository at this point in the history
  • Loading branch information
mmicko authored and gatecat committed Jul 8, 2024
1 parent 7dd4a8c commit 6b5b21e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions himbaechel/himbaechel_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion himbaechel/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
Expand Down

0 comments on commit 6b5b21e

Please sign in to comment.