getChipName() should be const

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2018-07-31 17:01:38 +02:00
parent bf78c05595
commit 41726087b7
5 changed files with 5 additions and 6 deletions

View File

@ -141,9 +141,8 @@ Arch::Arch(ArchArgs args) : args(args)
// -----------------------------------------------------------------------
std::string Arch::getChipName()
std::string Arch::getChipName() const
{
if (args.type == ArchArgs::LFE5U_25F) {
return "LFE5U-25F";
} else if (args.type == ArchArgs::LFE5U_45F) {

View File

@ -399,7 +399,7 @@ struct Arch : BaseCtx
ArchArgs args;
Arch(ArchArgs args);
std::string getChipName();
std::string getChipName() const;
IdString archId() const { return id("ecp5"); }
IdString archArgsToId(ArchArgs args) const;

View File

@ -122,7 +122,7 @@ struct Arch : BaseCtx
Arch(ArchArgs args);
std::string getChipName() { return chipName; }
std::string getChipName() const { return chipName; }
IdString archId() const { return id("generic"); }
IdString archArgsToId(ArchArgs args) const { return id("none"); }

View File

@ -204,7 +204,7 @@ Arch::Arch(ArchArgs args) : args(args)
// -----------------------------------------------------------------------
std::string Arch::getChipName()
std::string Arch::getChipName() const
{
#ifdef ICE40_HX1K_ONLY
if (args.type == ArchArgs::HX1K) {

View File

@ -365,7 +365,7 @@ struct Arch : BaseCtx
ArchArgs args;
Arch(ArchArgs args);
std::string getChipName();
std::string getChipName() const;
IdString archId() const { return id("ice40"); }
IdString archArgsToId(ArchArgs args) const;