1
0
mirror of https://github.com/YosysHQ/nextpnr.git synced 2026-04-24 19:40:12 +00:00

Add trivially copyable invariant for ID types

Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
gatecat
2024-01-04 16:42:53 +01:00
committed by myrtle
parent 6a9ad61051
commit 5013392841

View File

@@ -23,8 +23,15 @@
#include "nextpnr_namespaces.h"
#include <type_traits>
NEXTPNR_NAMESPACE_BEGIN
// Invariant: architecture ID types must all be trivially copyable
static_assert(std::is_trivially_copyable<BelId>::value == true);
static_assert(std::is_trivially_copyable<WireId>::value == true);
static_assert(std::is_trivially_copyable<PipId>::value == true);
void CellInfo::addInput(IdString name)
{
ports[name].name = name;