1#
2# Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
3#
4# SPDX-License-Identifier: BSD-2-Clause
5#
6
7from __future__ import absolute_import, division, print_function, \
8    unicode_literals
9
10# Add the root directory of this repository to your PYTHONPATH environment
11# variable to enable the following import.
12import capdl
13
14# Create an address space with two regions, one R and one RW.
15pc = capdl.create_address_space([
16    {'start': 0x00010000, 'end': 0x00015000, 'read': True},
17    {'start': 0x00017000, 'end': 0x00020000, 'read': True, 'write': True},
18])
19
20# Print a CapDL spec for all the virtual address space objects.
21print(pc.get_spec())
22