OpenCores
URL https://opencores.org/ocsvn/rio/rio/trunk

Subversion Repositories rio

[/] [rio/] [branches/] [2.0.0-development/] [bench/] [vhdl/] [TestRioSwitch.vhd] - Diff between revs 47 and 48

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 47 Rev 48
Line 7... Line 7...
-- 
-- 
-- Description
-- Description
-- Contains automatic simulation test code to verify a RioSwitch implementation.
-- Contains automatic simulation test code to verify a RioSwitch implementation.
-- 
-- 
-- To Do:
-- To Do:
-- - Use the Wishbone port as a test port on the implementation defined config-space.
 
-- - Test all sizes of packets that go through the maintenance port.
-- - Test all sizes of packets that go through the maintenance port.
-- 
-- 
-- Author(s): 
-- Author(s): 
-- - Magnus Rosenius, magro732@opencores.org 
-- - Magnus Rosenius, magro732@opencores.org 
-- 
-- 
Line 565... Line 564...
    ReadConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
    ReadConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
                 tid=>x"00", address=>x"000068", data=>x"0000ffff");
                 tid=>x"00", address=>x"000068", data=>x"0000ffff");
 
 
    -- Try to accuire the lock.
    -- Try to accuire the lock.
    WriteConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
    WriteConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
                  tid=>x"00", address=>x"000068", data=>x"00000002");
                  tid=>x"01", address=>x"000068", data=>x"00000002");
 
 
    -- Check that the lock has been accuired.
    -- Check that the lock has been accuired.
    ReadConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
    ReadConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
                 tid=>x"00", address=>x"000068", data=>x"00000002");
                 tid=>x"02", address=>x"000068", data=>x"00000002");
 
 
    -- Try to accuire the lock from another source.
    -- Try to accuire the lock from another source.
    WriteConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
    WriteConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
                  tid=>x"00", address=>x"000068", data=>x"00000003");
                  tid=>x"03", address=>x"000068", data=>x"00000003");
 
 
    -- Check that the lock refuses the new access.
    -- Check that the lock refuses the new access.
    ReadConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
    ReadConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
                 tid=>x"00", address=>x"000068", data=>x"00000002");
                 tid=>x"04", address=>x"000068", data=>x"00000002");
 
 
    -- Release the lock.
    -- Release the lock.
    WriteConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
    WriteConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
                  tid=>x"00", address=>x"000068", data=>x"00000002");
                  tid=>x"05", address=>x"000068", data=>x"00000002");
 
 
    -- Check that the lock is released.
    -- Check that the lock is released.
    ReadConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
    ReadConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
                 tid=>x"00", address=>x"000068", data=>x"0000ffff");
                 tid=>x"06", address=>x"000068", data=>x"0000ffff");
 
 
    -- Check that the lock can be accuired from another source once unlocked.
    -- Check that the lock can be accuired from another source once unlocked.
    WriteConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
    WriteConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
                  tid=>x"00", address=>x"000068", data=>x"00000003");
                  tid=>x"07", address=>x"000068", data=>x"00000003");
 
 
    -- Check that the lock is released.
    -- Check that the lock is released.
    ReadConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
    ReadConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
                 tid=>x"00", address=>x"000068", data=>x"00000003");
                 tid=>x"08", address=>x"000068", data=>x"00000003");
 
 
    -- Release the lock again.
    -- Release the lock again.
    WriteConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
    WriteConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
                  tid=>x"00", address=>x"000068", data=>x"00000003");
                  tid=>x"09", address=>x"000068", data=>x"00000003");
 
 
    -- Check that the lock is released.
    -- Check that the lock is released.
    ReadConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
    ReadConfig32(portIndex=>0, destinationId=>x"0000", sourceId=>x"0002", hop=>x"00",
                 tid=>x"00", address=>x"000068", data=>x"0000ffff");
                 tid=>x"0a", address=>x"000068", data=>x"0000ffff");
 
 
    ExchangeFrames;
    ExchangeFrames;
 
 
    ---------------------------------------------------------------------------
    ---------------------------------------------------------------------------
    PrintS("-----------------------------------------------------------------");
    PrintS("-----------------------------------------------------------------");
Line 872... Line 871...
                                                           wdptr=>'0',
                                                           wdptr=>'0',
                                                           dataLength=>0,
                                                           dataLength=>0,
                                                           data=>maintData)));
                                                           data=>maintData)));
 
 
    ExchangeFrames;
    ExchangeFrames;
    TestWait(messageEmpty, '1', "config read");
    TestWait(messageEmpty, '1', "config write");
 
 
    ---------------------------------------------------------------------------
    ---------------------------------------------------------------------------
    PrintS("-----------------------------------------------------------------");
    PrintS("-----------------------------------------------------------------");
    PrintS("TG_RioSwitch-TC2");
    PrintS("TG_RioSwitch-TC2");
    PrintS("Description: Test the configuration of the routing table and the ");
    PrintS("Description: Test the configuration of the routing table and the ");

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.