AN 1010: System Console Getting Started Tutorial

ID 826921
Date 12/02/2024
Public

2.4.2. Using the Default Slave Peripheral

You can use the following steps to exercise the default slave peripheral that receives read and write transactions with unmapped addresses. In the design example system, the default slave is a small RAM. The peripheral in the design example map to addresses 0x0000_0000 thru 0x0001_0038. By reading an address outside that range, you can read from the default slave peripheral (which initializes at device configuration to 0x0000_0000).
  1. To read from an unmapped address, run the following command:
    master_read_32 $c_path 0x01000000 4

    The read operation returns this data:

    0x00000000 0x00000000 0x00000000 0x00000000
  2. To write four words to a different unmapped address, run the following command:
    master_write_32 $c_path 0x02000000 \
    [list 0x0badf00d 0x1badf00d 0x2badf00d 0x3badf00d]
  3. To repeat the read operation from another unmapped address, run the following command. The contents now contain data written in the previous write operation (to an unmapped address).
    % master_read_32 $c_path 0x03000000 4 \
    0x0badf00d 0x1badf00d 0x2badf00d 0x3badf00d
  4. To write to a slave that has no write interface, like the system ID peripheral, run the following command. No slave in the system decodes this write, and the writer is directed instead to the default slave.
    master_write_32 $c_path $sysid 0xfacecafe
  5. To verify that this write operation was sent to the default slave by reading from an unmapped address, run the following command:
    master_read_32 $c_path 0x01000000 4 
    0xfacecafe 0x1badf00d 0x2badf00d 0x3badf00d

    The read operation returns the data shown. Since only a single word is written (0xfacecafe), only the first word of the default slave changes.

  6. To close the master service, type the following command:
    close_service master $c_path