Systems
A collection of devices and harnesses that satisfies a set of functionality requirements for some external purpose.
How system data is stored
System data is stored in the following file formats.
Instances List
Interacting with Instances Lists
An instances list is a list of every physical or notional item, idea, note, part, instruction, circuit, drawing element, thing, concept literally anything that describes how to build that harness or system.
Instances lists are the single comprehensive source of truth for the product you are working on. Other documents like the Feature Tree, etc, build this list, and all output documentation are derived from it.
Columns
Columns are automatically generated when instances_list.new() is called. Additional columns for this kind of list may be added by the user.
| Column | Description |
|---|---|
net |
the physical harness (represented by a net in Kicad) that this instance is part of |
instance_name |
the unique name of this instance |
print_name |
the non-unique, human-readable name of this instance, used for printing on output documents |
bom_line_number |
if this instance represents a physical procurable good, it gets assigned a line number on a bill of materials |
mfg |
manufacturer of this instance |
mpn |
manufacturer part number |
item_type |
connector, backshell, whatever |
parent_instance |
general purpose reference |
location_type |
each instance is either better represented by one or ther other |
segment_group |
the group of segments that this instance is part of |
segment_order |
the sequential id of this item in its segment group |
connector_group |
a group of co-located parts (connectors, backshells, nodes) |
channel_group |
other instances associated with this one because they are part of the same channel will share this value |
circuit_id |
which signal this component is electrically connected to |
circuit_port_number |
the sequential id of this item in its signal chain |
node_at_end_a |
derived from formboard definition |
node_at_end_b |
derived from formboard definition |
print_name_at_end_a |
human-readable name of this instance if needed, associated with 'node_at_end_a' |
print_name_at_end_b |
human-readable name of this instance if needed, associated with 'node_at_end_b' |
parent_csys_instance_name |
the other instance upon which this instance's location is based |
parent_csys_outputcsys_name |
the specific output coordinate system of the parent that this instance's location is based |
translate_x |
derived from parent_csys and parent_csys_name |
translate_y |
derived from parent_csys and parent_csys_name |
rotate_csys |
derived from parent_csys and parent_csys_name |
absolute_rotation |
manual add, not nominally used unless it's a flagnote, segment, or node |
csys_children |
imported csys children from library attributes file |
cable_group |
other instances associated with this one because they are part of the same cable will share this value |
cable_container |
which cable is this instance physically bundled inside of |
cable_identifier |
cable unique identifier |
length |
derived from formboard definition, the length of a segment |
length_tolerance |
derived from formboard definition, the tolerance on the length of a segment |
diameter |
apparent diameter of a segment <---------- change to print_diameter |
appearance |
see harnice.utils.appearance for details |
note_type |
build_note, rev_note, etc |
note_number |
if there is a counter involved (rev, bom, build_note, etc) |
note_parent |
the instance the note applies to. typically don't use this in the instances list, just note_utils |
note_text |
the content of the note |
note_affected_instances |
list of instances that are affected by the note |
lib_repo |
publically-traceable URL of the library this instance is from |
lib_subpath |
path to the instance within the library (directories between the product type and the part number) |
lib_desc |
description of the instance per the library's revision history |
lib_latest_rev |
the latest revision of the instance that exists in the remote library |
lib_rev_used_here |
the revision of the instance that is currently used in this project |
lib_status |
the status of the instance per the library's revision history |
lib_releaseticket |
documentation needed |
lib_datestarted |
the date this instance was first added to the library |
lib_datemodified |
the date this instance was last modified in the library |
lib_datereleased |
the date this instance was released in the library, if applicable, per the library's revision history |
lib_drawnby |
the name of the person who drew the instance, per the library's revision history |
lib_checkedby |
the name of the person who checked the instance, per the library's revision history |
project_editable_lib_modified |
a flag to indicate if the imported contents do not match the library's version (it's been locally modified) |
lib_build_notes |
recommended build notes that come with the instance from the library |
lib_tools |
recommended tools that come with the instance from the library |
attributes_json |
if an instance is imported with an attributes json attached, it's added here |
this_instance_mating_device_refdes |
if connector, refdes of the device it plugs into |
this_instance_mating_device_connector |
if connector, name of the connector it plugs into |
this_instance_mating_device_connector_mpn |
if connector, mpn of the connector it plugs into |
this_net_from_device_refdes |
if this instance is a channel, circuit, conductor, etc, the refdes of the device it interfaces with, just within this net |
this_net_from_device_channel_id |
if this instance is a channel, circuit, conductor, etc, the channel id in the device it interfaces with, just within this net |
this_net_from_device_connector_name |
if this instance is a channel, circuit, conductor, etc, the name of the connector it interfaces with, just within this net |
this_net_to_device_refdes |
if this instance is a channel, circuit, conductor, etc, the refdes of the device it plugs into just within this net |
this_net_to_device_channel_id |
if this instance is a channel, circuit, conductor, etc, the channel id in the device it plugs into, just within this net |
this_net_to_device_connector_name |
if this instance is a channel, circuit, conductor, etc, the name of the connector it plugs into, just within this net |
this_channel_from_device_refdes |
if this instance is a channel, circuit, conductor, etc, the refdes of the device it interfaces with, at the very end of the channel |
this_channel_from_device_channel_id |
if this instance is a channel, circuit, conductor, etc, the channel id in the device it interfaces with, at the very end of the channel |
this_channel_to_device_refdes |
if this instance is a channel, circuit, conductor, etc, the refdes of the device it plugs into, at the very end of the channel |
this_channel_to_device_channel_id |
if this instance is a channel, circuit, conductor, etc, the channel id in the device it plugs into, at the very end of the channel |
this_channel_from_channel_type |
if this instance is a channel, circuit, conductor, etc, the type of the channel it interfaces with, at the very end of the channel |
this_channel_to_channel_type |
if this instance is a channel, circuit, conductor, etc, the type of the channel it plugs into, at the very end of the channel |
signal_of_channel_type |
if this instance is a channel, circuit, conductor, etc, the signal of the channel it interfaces with, at the very end of the channel |
debug |
the call chain of the function that last modified this instance row |
debug_cutoff |
blank cell to visually cut off the previous column |
Commands:
Use the following functions by first importing the module in your script like this: then use as written.
instances_list.new_instance(instance_name, instance_data, ignore_duplicates=False)
Add a new instance to the instances list.
Usage
new_instance(instance_name, instance_data, ignore_duplicates=False)
Args
instance_name: String; must be unique within the list.instance_data: Dict of column names to values. May includeinstance_name; if present it must match theinstance_nameargument or the code will fail.ignore_duplicates: If True, does nothing when an instance with the sameinstance_namealready exists. If False (default), raises an error on duplicate.
Returns
-1 on success. Raises on invalid input or duplicate (when ignore_duplicates is False).
instances_list.modify(instance_name, instance_data)
Update columns for an existing instance by name.
Args
instance_name: The unique name of the instance to modify.instance_data: Dict of column names to new values. Only provided keys are updated; others are unchanged.
Raises
ValueError if no instance with instance_name exists.
instances_list.remove_instance(instance_to_delete)
Remove one instance from the instances list.
Args
instance_to_delete: Instance row dict (or any dict) whoseinstance_namekey identifies the instance to remove. Matching is done byinstance_nameonly.
instances_list.new()
Create a new empty instances list file with only the standard header (COLUMNS). Overwrites existing file if present.
instances_list.assign_bom_line_numbers()
Assign sequential BOM line numbers to instances that have bom_line_number set to "True".
Groups by MPN and assigns the same line number to all instances sharing an MPN. Requires every such instance to have a non-empty mpn. Line numbers are assigned in order of first occurrence of each MPN.
Raises
ValueError if any instance marked for BOM has an empty mpn.
instances_list.attribute_of(target_instance, attribute)
Return the value of one column for a single instance.
String values that look like Python literals (list or dict, e.g. starting with `[` or `{`) are parsed with `ast.literal_eval` and the parsed value is returned; otherwise the raw string is returned.
Args
target_instance: Theinstance_nameof the instance to look up.attribute: The column name to read (e.g."mpn","net").
Returns
The value of that column for the matching instance, or None if not found or attribute missing. List/dict-like strings are returned as list/dict.
instances_list.instance_in_connector_group_with_item_type(connector_group, item_type)
Return the single instance in a connector group with the given item type.
Args
connector_group: Theconnector_groupvalue to match.item_type: Theitem_typevalue to match (e.g. connector, backshell).
Returns
The matching instance row dict, or 0 if no match.
Raises
ValueError if connector_group or item_type is blank, or if more than one instance matches.
instances_list.list_of_uniques(attribute)
Return a list of unique non-empty values for one column across all instances.
Args
attribute: The column name to collect (e.g."net","item_type").
Returns
List of unique values; blanks and None are omitted. Order follows first occurrence in the instances list.
Library Import History
Interacting with Library History
A report of what was imported during the most recent render of the current product
Columns
Columns are automatically generated when library_history.new() is called. Additional columns are not supported and may result in an error when parsing.
| Column | Description |
|---|---|
instance_name |
documentation needed |
mpn |
documentation needed |
item_type |
documentation needed |
lib_repo |
documentation needed |
lib_subpath |
documentation needed |
lib_desc |
documentation needed |
lib_latest_rev |
documentation needed |
lib_rev_used_here |
documentation needed |
lib_status |
documentation needed |
lib_releaseticket |
documentation needed |
lib_datestarted |
documentation needed |
lib_datemodified |
documentation needed |
lib_datereleased |
documentation needed |
lib_drawnby |
documentation needed |
lib_checkedby |
documentation needed |
project_editable_lib_modified |
documentation needed |
Commands:
Use the following functions by first importing the module in your script like this: then use as written.
library_history.new()
Documentation needed.
library_history.append(instance_name, instance_data)
Documentation needed.
Channel Map
Interacting with Channel Maps
A list of channels on devices within merged_nets that are either mapped to other channels or are unmapped.
Columns
Columns are automatically generated when channel_map.new() is called. Additional columns are not supported and may result in an error when parsing.
| Column | Description |
|---|---|
merged_net |
documentation needed |
from_device_refdes |
documentation needed |
from_device_channel_id |
documentation needed |
from_channel_type |
documentation needed |
to_device_refdes |
documentation needed |
to_device_channel_id |
documentation needed |
to_channel_type |
documentation needed |
multi_ch_junction_id |
documentation needed |
disconnect_refdes_requirement |
documentation needed |
chain_of_connectors |
documentation needed |
chain_of_nets |
documentation needed |
manual_map_channel_python_equiv |
documentation needed |
Commands:
Use the following functions by first importing the module in your script like this: then use as written.
channel_map.new()
Makes a new blank channel map. Overwrites existing channel map.
Args: none
Returns: none
channel_map.map(from_key, to_key=None, multi_ch_junction_key='')
Documentation needed.
channel_map.already_mapped_set_append(key)
Documentation needed.
channel_map.already_mapped_set()
Documentation needed.
channel_map.already_mapped(key)
Documentation needed.
Circuits List
Interacting with Circuits Lists
A list of every individual electrical connection that must be present in your system or harness to satisfy your channel and disconnect maps.
Columns
Columns are automatically generated when circuits_list.new() is called. Additional columns are not supported and may result in an error when parsing.
| Column | Description |
|---|---|
net |
documentation needed |
circuit_id |
documentation needed |
signal |
documentation needed |
net_from_refdes |
documentation needed |
net_from_channel_id |
documentation needed |
net_from_connector_name |
documentation needed |
net_from_cavity |
documentation needed |
net_to_refdes |
documentation needed |
net_to_channel_id |
documentation needed |
net_to_connector_name |
documentation needed |
net_to_cavity |
documentation needed |
from_side_device_refdes |
documentation needed |
from_side_device_chname |
documentation needed |
to_side_device_refdes |
documentation needed |
to_side_device_chname |
documentation needed |
from_channel_type |
documentation needed |
to_channel_type |
documentation needed |
Commands:
Use the following functions by first importing the module in your script like this: then use as written.
circuits_list.new()
Makes a new blank circuits list. Overwrites existing circuits list.
Args: none
Returns: none
Disconnect Map
Interacting with Disconnect Maps
A list of every available channel on a every disconnect, and every channel that may or may not pass through it
Columns
Columns are automatically generated when disconnect_map.new() is called. Additional columns are not supported and may result in an error when parsing.
| Column | Description |
|---|---|
A-side_device_refdes |
documentation needed |
A-side_device_channel_id |
documentation needed |
A-side_device_channel_type |
documentation needed |
B-side_device_refdes |
documentation needed |
B-side_device_channel_id |
documentation needed |
B-side_device_channel_type |
documentation needed |
disconnect_refdes |
documentation needed |
disconnect_channel_id |
documentation needed |
A-port_channel_type |
documentation needed |
B-port_channel_type |
documentation needed |
manual_map_channel_python_equiv |
documentation needed |
Commands:
Use the following functions by first importing the module in your script like this: then use as written.
disconnect_map.new()
Documentation needed.
disconnect_map.assign(a_side_key, disconnect_key)
Documentation needed.
disconnect_map.already_assigned_channels_through_disconnects_set_append(key, disconnect_refdes)
Documentation needed.
disconnect_map.already_assigned_disconnects_set_append(key)
Documentation needed.
disconnect_map.already_assigned_channels_through_disconnects_set()
Documentation needed.
disconnect_map.already_assigned_disconnects_set()
Documentation needed.
disconnect_map.channel_is_already_assigned_through_disconnect(key, disconnect_refdes)
Documentation needed.
disconnect_map.disconnect_is_already_assigned(key)
Documentation needed.
disconnect_map.ensure_requirements_met()
Documentation needed.
Netlist
Interacting with Netlists
Post-Harness Instances List
Interacting with Post Harness Instances Lists
A list of every physical or notional thing, drawing element, or concept that includes instances added at the harness level, that represents a system
Commands:
Use the following functions by first importing the module in your script like this: then use as written.
library_history.rebuild()
Build the 'post harness instances list' by merging instance data from: - Each harness's instances list if the harness_pn is defined and file exists - Otherwise, fall back to the system-level instances list for matching nets
Writes a clean TSV with INSTANCES_LIST_COLUMNS.
library_history.push(path_to_system_rev, system_pn_rev)
Documentation needed.
Signals List
Interacting with Signals Lists
A Signals List is an exhaustive list of every signal is going into or out of a thing. Signals Lists are the primary way Harnice stores information about devices, and act as the source of truth for devices and disconnects.
Signals List Validation Checks:
(These are automatically validated when you render the device or disconnect that owns the list.)
General Signals List Rules
-
Every signal in the Signals List must be contained by a pre-defined channel type
Channel Types
Channel Types
How are channels mapped?
How to define a new channel type
- In a repository of your choice (or start with harnice_library_public on your own branch), navigate to
library_repo/channel_types/channel_types.csv - If you want channel definitions to be private and are therefore working in a private repository, ensure the repo's path is listed in file
library_locations.csv(located at root of your harnice source code repo). The first column is the URL or traceable path, and the second column is your local path. - If you find the channel_type you're looking for, temporarily note it as a touple in a notepad somewhere with format
(ch_type_id, universal_library_repository). - If you don't find it, make a new one. It's important to try and reduce the number of channel_types in here to reduce complexity, but it's also important that you adhere to strict and true rules about what is allowed to be mapped to what. Modifications and additions to this document should be taken and reviewed very seriously.
chtype.path(channel_type)Resolve the on-disk path to the
channel_types.tsvfile for a given channel type.Args
channel_type: Channel type identifier in standard tuple format(channel_type_id, lib_repo)or any string representation thatparsecan understand (for example"(5, 'https://github.com/harnice/harnice')").
Returns
str: Absolute path to thechannel_types/channel_types.tsvfile inside the library repository that owns the given channel type.
Notes
- This does not filter rows; it only locates the TSV file that defines
all channel types for the given
lib_repo.
chtype.parse(val)Convert stored string into a tuple (chid:int, lib_repo:str). Handles both single tuples and extracts first tuple from lists.
chtype.compatibles(channel_type)Look up other channel types that are declared as compatible with the given channel type.
Args
channel_type: Channel type identifier in standard tuple format(channel_type_id, lib_repo)or any string representation thatparsecan understand.
Returns
list[tuple[int, str]]: List of(channel_type_id, lib_repo)tuples taken directly from thecompatible_channel_typescolumn ofchannel_types.tsv. Returns an empty list if no compatibles are defined or if the channel type cannot be found.
Data format
- The
compatible_channel_typescolumn must be an AST-parseable Python value:- Single tuple:
(1, "library_repo") - List of tuples:
[(1, "library_repo"), (2, "library_repo")]
- Single tuple:
chtype.attribute(channel_type, attribute)Read any additional column from
channel_types.tsvfor a given channel type.Args
channel_type: Channel type identifier in standard tuple format(channel_type_id, lib_repo)or any string representation thatparsecan understand.attribute: Column header name inchannel_types.tsvfor the value you want to read (for example"description","notes","voltage_rating").
Returns
Any: Value stored in the requestedattributecolumn for the matchingchannel_type_id. Returns an empty list[]if the channel type cannot be found.
Notes
- Use this for any per-channel-type metadata you've added as extra columns
beyond the core ones like
channel_type_id,signals, andcompatible_channel_types.
chtype.signals(channel_type)Return the list of signal names associated with a specific channel type.
Args
channel_type: Channel type identifier in standard tuple format(channel_type_id, lib_repo)or any string representation thatparsecan understand.
Returns
list[str]: List of signal names from thesignalscolumn ofchannel_types.tsvfor the matchingchannel_type_id. If the column is blank or the channel type cannot be found, returns an empty list.
Data format
- The
signalscolumn is expected to be a comma-separated string, for example:"CAN_H, CAN_L, SHIELD".
chtype.is_or_is_compatible_with(channel_type)Return the given channel type plus all channel types declared as compatible with it.
Args
channel_type: Channel type identifier in standard tuple format(channel_type_id, lib_repo)or any string representation thatparsecan understand.
Returns
list[tuple[int, str]]: List of(channel_type_id, lib_repo)tuples where the first entry is the parsedchannel_typeitself and the remaining entries are the compatibles returned bycompatibles(channel_type).
Typical use
- Use this when validating or mapping channels and you want to treat a channel type as valid if it is either exactly the requested type or explicitly listed as compatible with it.
- In a repository of your choice (or start with harnice_library_public on your own branch), navigate to
-
Each signal in the signals list must have every other signal defined by its channel type also present in the list.
- you can't just define 'positive' if the channel type requires 'positive' and 'negative'
-
Each signal defined in the list is contained by one or more cavities of connectors.
- you can't "cap off" or not populate one of the signals within a channel because that changes the channel type.
-
Every combination of (channel_id, signal) must be unique within the signals list
- you can’t have two i.e. “ch1, pos” signals on the same device
- if you need to break one signal out onto multiple conductors, you'll need to change the channel type to one that defines multiple conductors (i.e. named "ch1, pos-1")
-
You can’t put signals of the same channel on different connectors
-
this is because doing so breaks a lot of internal assumptions Harnice is making while mapping channels.
-
the following two options are recommended work-arounds:
-
Most correct but confusing: Define one channel type per signal, then manually chmap your channels or write a macro for mapping the channels to their respective destinations.
-
Janky but easiest to understand: Define a connector part number that actually represents multiple connectors, while using cavities to reference each connector.
-
-
Configurable Device Signals List Rules
It is often useful to be able to change the signals list based on how you're using the device.
-
Each possible configuration of a device must define the same number of conductors throughout the device
- Changing a configuration must not alter physical build, form, fit, or function, and thus there shall be no conductors that are added or taken away. Maybe some signals are 'unused', but they have to at least be counted for across all configurations.
-
There can be an unlimited number of configuration variables
- Sometimes just one variable is useful: an SM58 microphone can produce output signals in either balanced vs unbalanced format, depending on how you want to use it.
- Sometimes there are many variables: suppose you have a mixing console with 32 inputs, and each input can accept either mic or line level inputs depending on the configuration, and each accept either in balanced or unbalanced format signals. Because there's a channel-type defined for each of those options, this would imply 64 configuration variables of the mixing console, each mapping to a unique configuration. This allows the auto channel mapper to find compatibles, and also helps the user track how to set up their device.
Disconnect Signals List Rules
-
“A” and “B” channels of the same disconnect must be compatible with each other
- this is to ensure when you actually mate the disconnect that the channels inside will be compatible.
Columns
Columns are automatically generated when signals_list.new() is called. Additional columns are not supported and may result in an error when parsing.
Columns of Signals Lists for Devices
| Column | Description |
|---|---|
channel_id |
Unique identifier for the channel. |
signal |
Name of the electrical function of that signal, as it pertains to its channel type defition. i.e. "positive" |
connector_name |
Unique identifier for the connector that this signal and channel is a part of. |
cavity |
Identifier of the pin, socket, stud, etc, that this signal is internally electrically routed to within its connector. |
connector_mpn |
MPN of the connector in this device (NOT the mating connector). |
channel_type |
The channel type of this signal. Touple (x, y) where x is the channel id within a library repo and y is the traceable name or url where that channel type library is defined |
config_variable |
Change header or add more headers as needed. Blank: row is true across all values of this field. Otherwise, row is only true when configuration matches the value of this field. |
Columns of Signals Lists for Disconnects
| Column | Description |
|---|---|
channel_id |
Unique identifier for the channel. |
signal |
Name of the electrical function of that signal, as it pertains to its channel type defition. i.e. "positive" |
A_cavity |
Identifier of the pin, socket, stud, etc, that this signal is internally electrically routed to within that side of the connector. ??? question "Why are A and B different here?" Sometimes it's possible to have connectors that have cavities that may mate electrically, but have different names. For example, suppose two connectors physically mate, but are made by different manufacturers. One manufacturer used lowercase (a, b, c) to reference the cavities but the other used uppercase (A, B, C), or numbers (1, 2, 3), or colors (red, green, blue), etc. |
B_cavity |
Identifier of the pin, socket, stud, etc, that this signal is internally electrically routed to within that side of the connector. ??? question "Why are A and B different here?" Sometimes it's possible to have connectors that have cavities that may mate electrically, but have different names. For example, suppose two connectors physically mate, but are made by different manufacturers. One manufacturer used lowercase (a, b, c) to reference the cavities but the other used uppercase (A, B, C), or numbers (1, 2, 3), or colors (red, green, blue), etc. |
A_connector_mpn |
MPN of the connector of the harness on this side of the disconnect |
A_channel_type |
The channel type of this side of the discconect. ??? question "Why are A and B different here?" It's important to keep track of which side has which channel type so that you cannot accidentally flip pins and sockets, for example, by mapping the wrong channel type to the wrong pin gender. Careful validation should be done when mapping channels through disconnects to ensure the disconnects have channels that pass through them in the correct direction. |
B_connector_mpn |
MPN of the connector of the harness on this side of the disconnect |
B_channel_type |
The channel type of this side of the discconect. ??? question "Why are A and B different here?" It's important to keep track of which side has which channel type so that you cannot accidentally flip pins and sockets, for example, by mapping the wrong channel type to the wrong pin gender. Careful validation should be done when mapping channels through disconnects to ensure the disconnects have channels that pass through them in the correct direction. |
Commands:
Use the following functions by first importing the module in your script like this: then use as written.
signals_list.set_list_type(x)
Documentation needed.
signals_list.new()
Creates a new signals TSV file at fileio.path("signals list") with only the header row. Overwrites any existing file.
signals_list.append(**kwargs)
Appends a new row to the signals TSV file. Missing optional fields will be written as empty strings. Raises ValueError if required fields are missing.
Required kwargs: For 'device': channel_id, signal, connector_name, cavity, connector_mpn, channel_type For 'disconnect': A_channel_id, A_signal, A_connector_name, A_cavity, A_connector_mpn, A_channel_type, B_channel_id, B_signal, B_connector_name, B_cavity, B_connector_mpn, B_channel_type
signals_list.cavity_of_signal(channel_id, signal, path_to_signals_list)
Documentation needed.
signals_list.connector_name_of_channel(channel_id, path_to_signals_list)
Documentation needed.
Manifests
Interacting with System Manifests
A table that relates reference designator to part number(s), and may contain other information indexed to the reference designator
Columns
Columns are automatically generated when manifest.new() is called. Additional columns are not supported and may result in an error when parsing.
| Column | Description |
|---|---|
net |
documentation needed |
harness_pn |
documentation needed |
Commands:
Use the following functions by first importing the module in your script like this: then use as written.
manifest.new()
Synchronize the system harness manifest with the system connector list: - Remove nets that no longer exist in the connector list - Add nets that appear in the connector list but not yet in the manifest - Preserve all other column data for nets that still exist
manifest.update_upstream(path_to_system_rev, system_pn_rev, manifest_nets, harness_pn)
Documentation needed.
manifest.new()
Synchronize the system harness manifest with the system connector list: - Remove nets that no longer exist in the connector list - Add nets that appear in the connector list but not yet in the manifest - Preserve all other column data for nets that still exist
manifest.update_upstream(path_to_system_rev, system_pn_rev, manifest_nets, harness_pn)
Documentation needed.
Rendering a system
-
Harnice runs the feature tree if it's found in the system directory.
-
The system is validated and verified.
-
A KiCad symbol that can be used represent this system in a block diagram is generated or updated based on the system.
File Structure
Reference the files in your product by calling fileio.path("file key") from your script. They'll automatically use this structure:
fileio.dirpath("part_directory") |-- yourpn/
|-- earlier revs/
fileio.path("revision history") |-- revhistory.csv
fileio.dirpath("rev_directory") L-- your rev/
fileio.path("feature tree") |-- yourpn-revX-feature_tree.py
fileio.path("instances list") |-- yourpn-revX-instances_list.tsv
fileio.path("library history") |-- yourpn-revX-library_import_history.tsv
fileio.dirpath("instance_data") |-- instance_data/
fileio.dirpath("features_for_relatives") |-- features_for_relatives/
fileio.dirpath("harnesses") |-- harnesses/
fileio.dirpath("lists") |-- lists/
fileio.path("bom") | |-- yourpn-revX-bom.tsv
fileio.path("circuits list") | |-- yourpn-revX-circuits_list.tsv
fileio.path("post harness instances list") | |-- yourpn-revX-post_harness_instances_list.tsv
fileio.path("harness manifest") | |-- yourpn-revX-harness_manifest.tsv
fileio.path("system connector list") | |-- yourpn-revX-system_connector_list.tsv
fileio.path("mapped channels set") | |-- yourpn-revX-mapped_channels_set.tsv
fileio.path("mapped disconnects set") | |-- yourpn-revX-mapped_disconnect_channels_set.tsv
fileio.path("mapped A-side channels through disconnects set") | L-- yourpn-revX-mapped_a_channels_through_disconnects_set.tsv
fileio.dirpath("maps") L-- maps/
fileio.path("channel map") |-- yourpn-revX-channel_map.tsv
fileio.path("disconnect map") L-- yourpn-revX-disconnect_map.tsv
How to define a new system
-
Make a folder for the part number of your system somewhere on your computer. Run Harnice Render, which will generate an example system that you can then edit.
Rendering a Product
-
Navigate to your device folder (
cdin command line). You don't need to make a rev folder yet, just make sure your command line is in a folder you want to represent the device you're working on. -
Harnice render it (
harnice -r). It should walk you through the following steps then render an example:-
No valid Harnice file structure detected in 'your_part_number'. Create new PN here? [y]:hit enter -
Enter revision number [1]:hit enter for rev1 or type "A" or whatever you want your first rev to be called -
What product type are you working on? (harness, system, device, etc.):type "device" -
Enter a description of this device [DEVICE, FUNCTION, ATTRIBUTES, etc.]:self-explanatory -
Enter a description for this revision [INITIAL RELEASE]:hit enter, otherwise type the goal of the first revision
-
Note
It will probably fail with
FileNotFoundError: Schematic not found. Check your kicad sch exists at this name and location:. This is included with the default system feature tree. -
-
Make a new Kicad project located at the path from the above error. Make a schematic in the same directory.
-
Add Harnice devices from a validated device repo as symbols in your kicad_sch. Save and harnice-render it often.
Designing your block diagram in Kicad
Device symbols can be added to your KiCad schematic.
KiCad wires can be drawn that represent entire harnesses.
KiCad is agnostic to the individual conductors, channels, or signals of a harness, just that there are certain connectors that are connected to each other via a harness.
To add disconnects in between harnesses in your system, add an official Harnice disconnect part to your project and route nets to it. Add the following info to the properties of the disconnect symbol:
-
in
MPNwrite the part number of the disconnect convention -
in
lib_repowrite the traceable path to the repo that contains the disconnect convention part number -
in
lib_subpathadd the path in between the item_type and the part number, if it exists, for your disconnect, in your library. for example, if your part number is at{fileio.get_path_to_project(traceable_key)}/disconnect/audio/tascam-db25/tascam-db25-rev1/, chooseaudio/ -
in
revadd the rev you want to use in this system. Optionally, leave it blank.