mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Internals: Deprecate VL_ATTR_ALIGNED, use alignas instead.
This commit is contained in:
@@ -300,6 +300,7 @@ class EmitCHeader final : public EmitCConstInit {
|
||||
|
||||
// Open class body {{{
|
||||
puts("\nclass ");
|
||||
if (!VN_IS(modp, Class)) puts("alignas(VL_CACHE_LINE_BYTES) ");
|
||||
puts(prefixNameProtect(modp));
|
||||
if (const AstClass* const classp = VN_CAST(modp, Class)) {
|
||||
puts(" : public ");
|
||||
@@ -329,11 +330,7 @@ class EmitCHeader final : public EmitCConstInit {
|
||||
emitTextSection(modp, VNType::atScInt);
|
||||
|
||||
// Close class body
|
||||
if (!VN_IS(modp, Class)) {
|
||||
puts("} VL_ATTR_ALIGNED(VL_CACHE_LINE_BYTES);\n");
|
||||
} else {
|
||||
puts("};\n");
|
||||
}
|
||||
puts("};\n");
|
||||
// }}}
|
||||
|
||||
// Emit out of class function declarations
|
||||
|
||||
@@ -89,7 +89,7 @@ class EmitCModel final : public EmitCFunc {
|
||||
puts("\n");
|
||||
|
||||
puts("// This class is the main interface to the Verilated model\n");
|
||||
puts("class " + topClassName() + " VL_NOT_FINAL : ");
|
||||
puts("class alignas(VL_CACHE_LINE_BYTES) " + topClassName() + " VL_NOT_FINAL : ");
|
||||
if (optSystemC()) {
|
||||
// SC_MODULE, but with multiple-inheritance of VerilatedModel
|
||||
puts("public ::sc_core::sc_module, ");
|
||||
@@ -238,7 +238,7 @@ class EmitCModel final : public EmitCFunc {
|
||||
puts("std::unique_ptr<VerilatedTraceConfig> traceConfig() const override final;\n");
|
||||
}
|
||||
|
||||
puts("} VL_ATTR_ALIGNED(VL_CACHE_LINE_BYTES);\n");
|
||||
puts("};\n");
|
||||
|
||||
ofp()->putsEndGuard();
|
||||
|
||||
|
||||
+3
-2
@@ -440,7 +440,8 @@ void EmitCSyms::emitSymHdr() {
|
||||
}
|
||||
|
||||
puts("\n// SYMS CLASS (contains all model state)\n");
|
||||
puts("class " + symClassName() + " final : public VerilatedSyms {\n");
|
||||
puts("class alignas(VL_CACHE_LINE_BYTES)" + symClassName()
|
||||
+ " final : public VerilatedSyms {\n");
|
||||
ofp()->putsPrivate(false); // public:
|
||||
|
||||
puts("// INTERNAL STATE\n");
|
||||
@@ -554,7 +555,7 @@ void EmitCSyms::emitSymHdr() {
|
||||
puts("void " + protect("__Vserialize") + "(VerilatedSerialize& os);\n");
|
||||
puts("void " + protect("__Vdeserialize") + "(VerilatedDeserialize& os);\n");
|
||||
}
|
||||
puts("} VL_ATTR_ALIGNED(VL_CACHE_LINE_BYTES);\n");
|
||||
puts("};\n");
|
||||
|
||||
ofp()->putsEndGuard();
|
||||
VL_DO_CLEAR(delete m_ofp, m_ofp = nullptr);
|
||||
|
||||
Reference in New Issue
Block a user