From 6b5b21e1655d04ee1e7cf2f6c76545bc68026ed6 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Wed, 17 Apr 2024 08:00:45 +0200 Subject: [PATCH] Enable user to override setupArchContext in Himbaechel arch --- himbaechel/himbaechel_api.h | 1 + himbaechel/main.cc | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/himbaechel/himbaechel_api.h b/himbaechel/himbaechel_api.h index d68caea83f..b1c50c5aa0 100644 --- a/himbaechel/himbaechel_api.h +++ b/himbaechel/himbaechel_api.h @@ -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; diff --git a/himbaechel/main.cc b/himbaechel/main.cc index 26686f8370..dccad722f9 100644 --- a/himbaechel/main.cc +++ b/himbaechel/main.cc @@ -33,7 +33,7 @@ class HimbaechelCommandHandler : public CommandHandler HimbaechelCommandHandler(int argc, char **argv); virtual ~HimbaechelCommandHandler(){}; std::unique_ptr createContext(dict &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 HimbaechelCommandHandler::createContext(dict &values)