Livt packages
Livt.Collections
Version 1.4.5
Fixed-capacity FIFOs, queues, stacks, circular buffers, lists, and bit sets for Livt hardware.
Published files (69)
tests/fifo/SlowClockFifoStorage.lvt
namespace Livt.Collections.Tests
using Livt.Collections
/**
* Writes a stable payload in an externally assigned slow test context.
* Exposes the active edge count alongside the asynchronous read tap.
*/
component SlowClockFifoStorage
{
// Payload storage and observations in the inherited write context.
storage: AsyncFifoArray<byte, 4>
public data: out byte
public edges: out uint
count: uint
/**
* Owns storage in the context assigned by the test.
*/
new()
{
storage = new AsyncFifoArray<byte, 4>()
}
/**
* Holds the write payload stable and keeps the read tap live between edges.
*/
process Connect[]()
{
storage.writeEnable = true
storage.writeAddress = 0
storage.writeData = 0xA5
storage.readAddress = 0
data = storage.readData
edges = count
}
/**
* Lets the fast test verify that no second active edge has occurred.
*/
process CountEdges()
{
state {
count = count + 1
}
}
}