Architecture Constructors
Mapper2.MapperCore.add_port — Function.add_port(component, name, class, [number]; metadata = emptymeta())Add number ports with the given name and class. Ports names will be the provided suffix with bracket-vector notation. If number is not given, the port will be added directly.
For example, the function call add_port(component, "test", "input", 3) should add 3 input ports to component c with names: test[2], test[1], test[0].
If metadata is given, it will be assigned to each instantiated port. If metadata is a vector with length(metadata) == number, than entries of metadata will be sequentially assigned to each instantiated port.
Mapper2.MapperCore.add_child — Function.add_child(component, child::Component, name, [number])Add a deepcopy child component with the given instance name to a component. If number is provided, vectorize instantiation names. Throw error if name is already used as an instance name for a child.
Mapper2.MapperCore.add_link — Function.add_link(component, src, dest; metadata = emptymeta(), linkname = "")Construct a link with the given metadata from the source ports to the destination ports.
Arguments src and dst may of type String, Vector{String}, PortPath, or Vector{PortPath}. If keyword argument linkname is given, the instantiated link will be assigned that name. Otherwise, a unique name for the link will be generated.
An error is raised if:
- Port classes are incorrect for the direction of the link.
- Ports in
srcordestare already assigned to a link. - A link with the given name already exists in
c.
Mapper2.MapperCore.build_mux — Function.build_mux(inputs, outputs; metadata = Dict{String,Any}())Build a mux with the specified number of inputs and outputs. Inputs and outputs will be named in[0], in[1], … , in[inputs-1] and outputs will be named out[0], out[1], … , out[outputs-1].
If metdata is supplied, the dictionary will be attached to the mux component itself as well as all ports and links in the mux component.
Creating Links at the TopLevel
Mapper2.MapperCore.Offset — Type.struct OffsetFields
offsetOffset to add to a source address to reach a destination address
source_portName of the source port to start a link at.
dest_portName of the destination port to end a link at.
Documentation
Single rule for connecting ports at the TopLevel
Method List
Offset(offset, source_port, dest_port)defined at /home/travis/build/hildebrandmw/Mapper2.jl/src/Architecture/Constructors.jl:183.
Offset(A, B, C)defined at /home/travis/build/hildebrandmw/Mapper2.jl/src/Architecture/Constructors.jl:192.
struct ConnectionRuleFields
offsetsVector{Offset}- Collection of [Offset] rules to be applied to all source addresses that pass the filtering stage.
address_filterFunction- Filter for source addresses. Default:truesource_filterFunction- Filter for source components. Default:truedest_filterFunction- Filter for destination components. Default:true
Documentation
Global connection rule for connecting ports at the TopLevel
Method List
ConnectionRule(offsets, address_filter, source_filter, dest_filter)
ConnectionRule(offsets, address_filter, source_filter, dest_filter)defined at /home/travis/build/hildebrandmw/Mapper2.jl/src/Architecture/Constructors.jl:198.
ConnectionRule(offsets; address_filter, source_filter, dest_filter)defined at /home/travis/build/hildebrandmw/Mapper2.jl/src/Architecture/Constructors.jl:220.
Mapper2.MapperCore.connection_rule — Function.connection_rule(toplevel, rule::ConnectionRule; metadata = emptymeta())Apply rule::ConnectionRule to toplevel. Source addresses will first be filtered by rule.address_filter. Then, for each filtered address, the [Component] at that address will be passed to rule.source_filter.
If the component passes, all elements in rule.offsets will be applied, assuming the component at destination address passes rule.dest_filter. A new link will then be created provided it is safe to do so.
Method List
connection_rule(toplevel, rule; kwargs...)defined at /home/travis/build/hildebrandmw/Mapper2.jl/src/Architecture/Constructors.jl:246.
connection_rule(toplevel, rule; metadata)defined at /home/travis/build/hildebrandmw/Mapper2.jl/src/Architecture/Constructors.jl:255.