Livt packages

Livt.Bus

Version 2.0.1

Configurable Avalon, AXI4-Lite, and Wishbone memory-mapped masters, interfaces, bridges, and test components.

Published files (67)

tests/axi4lite/Axi4LiteTimeoutBoundaryTest.lvt

namespace Livt.Bus.Tests.Axi4Lite

using Livt.Bus.Axi4Lite
using Livt.Bus.Axi4Lite.Testing

/**
 * Verifies the exact AXI4-Lite handshake-stage timeout boundary.
 */
@Test
component Axi4LiteTimeoutBoundaryTest
{
	master: Axi4LiteMaster32
	target: Axi4LiteTestSlave32

	/**
	 * Creates a fresh fixture for the successful boundary.
	 */
	new()
	{
		this.master = new Axi4LiteMaster32()
		this.target = new Axi4LiteTestSlave32(this.master)
	}

	/**
	 * Verifies success when readiness arrives on the seventh evaluation.
	 */
	@Test
	fn CountsTheConfiguredDeadlineExactly()
	{
		target.Clear()
		target.ConfigureDelays(0, 0, 0, 0, 0)
		master.SetTimeoutTicks(7 as uint)
		assert master.TryRead32(0x00 as uint) == true
		assert master.LastTimedOut() == false
	}
}