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/Axi4LiteTimeoutBeforeBoundaryTest.lvt

namespace Livt.Bus.Tests.Axi4Lite

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

/**
 * Verifies AXI4-Lite timeout immediately before the acceptance boundary.
 */
@Test
component Axi4LiteTimeoutBeforeBoundaryTest
{
	master: Axi4LiteMaster32
	target: Axi4LiteTestSlave32

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

	/**
	 * Verifies timeout after six stalls, one evaluation before readiness.
	 */
	@Test
	fn TimesOutImmediatelyBeforeAcceptance()
	{
		target.Clear()
		target.ConfigureDelays(0, 0, 0, 0, 0)
		master.SetTimeoutTicks(6 as uint)
		assert master.TryRead32(0x00 as uint) == false
		assert master.LastTimedOut() == true
	}
}