Skip to content

Router

Router.

RoutePath

Bases: LightObject

Routing Path.

Parameters:

Name Type Description Default
expr

Expression

required

Other Parameters:

Name Type Description
path

Module Path

create

Create signal/port referenced by expr

cast

True (required), None (optional) or False (forbidden) type casting.

parts property

parts

Path Parts.

parse_routepath

parse_routepath(value, basepath=None)

Parse Path.

parse_routepath('clk_i') RoutePath(expr='clk_i') parse_routepath('u_sub/u_bar/clk_i') RoutePath(expr='clk_i', path='u_sub/u_bar') parse_routepath('create(port_i)') RoutePath(expr='port_i', create=True) parse_routepath('cast(port_i)') RoutePath(expr='port_i', cast=True) parse_routepath('optcast(port_i)') RoutePath(expr='port_i', cast=None) parse_routepath('u_sub/u_bar/port_i') RoutePath(expr='port_i', path='u_sub/u_bar') parse_routepath('../port_i') RoutePath(expr='port_i', path='..')

parse_routepath('') Traceback (most recent call last): ... ValueError: Invalid route path '' parse_routepath('/') Traceback (most recent call last): ... ValueError: Invalid route path '/' parse_routepath('u_sub/u_bar/') Traceback (most recent call last): ... ValueError: Invalid route path 'u_sub/u_bar/' parse_routepath('.../') Traceback (most recent call last): .. ValueError: Invalid route path '.../'

parse_routepaths

parse_routepaths(routepaths, basepath=None)

Parse routepaths.

parse_routepaths('clk_i') (RoutePath(expr='clk_i'),) parse_routepaths((RoutePath(expr='clk_i'),)) (RoutePath(expr='clk_i'),) parse_routepaths(RoutePath(expr='clk_i')) (RoutePath(expr='clk_i'),) parse_routepaths('clk_i; rst_an_i') (RoutePath(expr='clk_i'), RoutePath(expr='rst_an_i')) parse_routepaths('clk_i, rst_an_i') (RoutePath(expr='clk_i, rst_an_i'),)