Add VL_CACHE_LINE_BYTES and use 64 as defult.
This commit is contained in:
parent
ee7da1e690
commit
a8ad97eef2
|
|
@ -340,6 +340,7 @@ typedef unsigned long long vluint64_t; ///< 64-bit unsigned type
|
||||||
#define VL_QUADSIZE 64 ///< Bits in a QData / quadword
|
#define VL_QUADSIZE 64 ///< Bits in a QData / quadword
|
||||||
#define VL_EDATASIZE 32 ///< Bits in a EData (WData entry)
|
#define VL_EDATASIZE 32 ///< Bits in a EData (WData entry)
|
||||||
#define VL_EDATASIZE_LOG2 5 ///< log2(VL_EDATASIZE)
|
#define VL_EDATASIZE_LOG2 5 ///< log2(VL_EDATASIZE)
|
||||||
|
#define VL_CACHE_LINE_BYTES 64 ///< Bytes in a cache line (for alignment)
|
||||||
|
|
||||||
/// Bytes this number of bits needs (1 bit=1 byte)
|
/// Bytes this number of bits needs (1 bit=1 byte)
|
||||||
#define VL_BYTES_I(nbits) (((nbits) + (VL_BYTESIZE - 1)) / VL_BYTESIZE)
|
#define VL_BYTES_I(nbits) (((nbits) + (VL_BYTESIZE - 1)) / VL_BYTESIZE)
|
||||||
|
|
|
||||||
|
|
@ -2778,7 +2778,7 @@ void EmitCImp::emitInt(AstNodeModule* modp) {
|
||||||
}
|
}
|
||||||
|
|
||||||
puts("}");
|
puts("}");
|
||||||
if (!VN_IS(modp, Class)) puts(" VL_ATTR_ALIGNED(128)");
|
if (!VN_IS(modp, Class)) puts(" VL_ATTR_ALIGNED(VL_CACHE_LINE_BYTES)");
|
||||||
puts(";\n");
|
puts(";\n");
|
||||||
|
|
||||||
emitIntFuncDecls(modp, false);
|
emitIntFuncDecls(modp, false);
|
||||||
|
|
|
||||||
|
|
@ -475,7 +475,7 @@ void EmitCSyms::emitSymHdr() {
|
||||||
puts("void "+protect("__Vdeserialize")+"(VerilatedDeserialize& os);\n");
|
puts("void "+protect("__Vdeserialize")+"(VerilatedDeserialize& os);\n");
|
||||||
}
|
}
|
||||||
puts("\n");
|
puts("\n");
|
||||||
puts("} VL_ATTR_ALIGNED(64);\n");
|
puts("} VL_ATTR_ALIGNED(VL_CACHE_LINE_BYTES);\n");
|
||||||
|
|
||||||
ofp()->putsEndGuard();
|
ofp()->putsEndGuard();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -466,6 +466,7 @@ static void process() {
|
||||||
&& !v3Global.opt.xmlOnly()
|
&& !v3Global.opt.xmlOnly()
|
||||||
&& !v3Global.opt.dpiHdrOnly()) {
|
&& !v3Global.opt.dpiHdrOnly()) {
|
||||||
// Create AstCUse to determine what class forward declarations/#includes needed in C
|
// Create AstCUse to determine what class forward declarations/#includes needed in C
|
||||||
|
// Must be before V3EmitC
|
||||||
V3CUse::cUseAll(v3Global.rootp());
|
V3CUse::cUseAll(v3Global.rootp());
|
||||||
|
|
||||||
// emitcInlines is first, as it may set needHInlines which other emitters read
|
// emitcInlines is first, as it may set needHInlines which other emitters read
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue