Fix endianness and padding issues
This commit is contained in:
parent
2e89bebfe6
commit
83ff5b450c
@ -24,11 +24,11 @@ void Vcd::tick()
|
||||
for (const auto& [name, entry] : variables)
|
||||
{
|
||||
stream << "b";
|
||||
for (int i = 0; i < entry.size; i++)
|
||||
for (int i = entry.size - 1; i >= 0; i--)
|
||||
{
|
||||
uint8_t byte;
|
||||
memcpy(&byte, static_cast<const uint8_t*>(entry.ref) + i, 1);
|
||||
stream << std::format("{0:b}", byte);
|
||||
stream << std::format("{:0>8b}", byte);
|
||||
}
|
||||
stream << " " << name << std::endl;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user