mirror of
https://github.com/verilator/verilator.git
synced 2026-09-02 10:48:27 +02:00
+2
-1
@@ -173,7 +173,8 @@ class RandomizeVisitor final : public VNVisitor {
|
||||
|
||||
AstCDType* findVlRandCDType(FileLine* fl, uint64_t items) {
|
||||
// For 8 items we need to have a 9 item LFSR so items is max count
|
||||
const std::string type = AstCDType::typeToHold(items);
|
||||
// width(items) = log2(items) + 1
|
||||
const std::string type = AstCDType::typeToHold(V3Number::log2bQuad(items) + 1);
|
||||
const std::string name = "VlRandC<" + type + ", " + cvtToStr(items) + "ULL>";
|
||||
// Create or reuse (to avoid duplicates) randomization object dtype
|
||||
const auto pair = m_randcDtypes.emplace(name, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user