chipflow_lib.platforms ====================== .. py:module:: chipflow_lib.platforms .. autoapi-nested-parse:: Platform definititions ---------------------- This module defines the functionality you use in you code to target the ChipFlow platform Classes ------- .. autoapisummary:: chipflow_lib.platforms.SiliconPlatformPort chipflow_lib.platforms.IOSignature chipflow_lib.platforms.IOModel chipflow_lib.platforms.Process chipflow_lib.platforms.GAPackageDef chipflow_lib.platforms.QuadPackageDef chipflow_lib.platforms.BareDiePackageDef chipflow_lib.platforms.JTAGPins chipflow_lib.platforms.PowerPins Functions --------- .. autoapisummary:: chipflow_lib.platforms.OutputIOSignature chipflow_lib.platforms.InputIOSignature chipflow_lib.platforms.BidirIOSignature Package Contents ---------------- .. py:class:: SiliconPlatformPort(component, name, port, *, invert = False) Bases: :py:obj:`amaranth.lib.io.PortLike` Represents an abstract library I/O port that can be passed to a buffer. The port types supported by most platforms are :class:`SingleEndedPort` and :class:`DifferentialPort`. Platforms may define additional port types where appropriate. .. note:: :class:`amaranth.hdl.IOPort` is not an instance of :class:`amaranth.lib.io.PortLike`. .. py:property:: direction Direction of the port. :rtype: :class:`Direction` .. py:class:: IOSignature(**kwargs) Bases: :py:obj:`amaranth.lib.wiring.Signature` An :py:obj:`Amaranth Signature ` used to decorate wires that would usually be brought out onto a port on the package. This class is generally not directly used. Instead, you would typically utilize the more specific :py:obj:`InputIOSignature`, :py:obj:`OutputIOSignature`, or :py:obj:`BidirIOSignature` for defining pin interfaces. .. py:property:: direction :type: amaranth.lib.io.Direction The direction of the IO port .. py:property:: width :type: int The width of the IO port, in wires .. py:property:: invert :type: collections.abc.Iterable[bool] A tuple as wide as the IO port, with a bool for the polarity inversion for each wire .. py:property:: options :type: IOModelOptions Options set on the io port at construction .. py:method:: annotations(*args) Annotate an interface object. Subclasses of :class:`Signature` may override this method to provide annotations for a corresponding interface object. The default implementation provides none. See :mod:`amaranth.lib.meta` for details. :returns: :py:`tuple()` :rtype: iterable of :class:`~.meta.Annotation` .. py:class:: IOModel Bases: :py:obj:`IOModelOptions` Options for IO Ports :Attributes: * **direction** -- `io.Direction.Input`, `io.Direction.Output` or `io.Direction.Bidir` * **width** -- width of port, default is 1 * **all_have_oe** -- controls whether each output wire is associated with an individual Output Enable bit or a single OE bit will be used for entire port, the default value is False, indicating that a single OE bit controls the entire port. * **invert** -- Polarity inversion. If the value is a simple :class:`bool`, it specifies inversion for the entire port. If the value is an iterable of :class:`bool`, the iterable must have the same length as the width of :py:`io`, and the inversion is specified for individual wires. * **allocate_power** -- Whether a io power domain should be set on this interface. NB there is only one of these, so IO with multiple IO power domains must be split up. * **interface_power_domains** -- the name of the available power domains on the interface * **clock_domain** -- the name of the `Amaranth.ClockDomain` for this port. NB there is only one of these, so IO with multiple input clocks must be split up. * **init** -- a :ref:`Const` value for the initial values of the port .. py:function:: OutputIOSignature(width, **kwargs) This creates an :py:obj:`Amaranth Signature ` which is then used to decorate package output signals intended for connection to the physical pads of the integrated circuit package. :param width: specifies the number of individual output wires within this port, each of which will correspond to a separate physical pad on the integrated circuit package. .. py:function:: InputIOSignature(width, **kwargs) This creates an :py:obj:`Amaranth Signature ` which is then used to decorate package input signals intended for connection to the physical pads of the integrated circuit package. :param width: specifies the number of individual input wires within this port, each of which will correspond to a separate physical pad on the integrated circuit package. .. py:function:: BidirIOSignature(width, **kwargs) This creates an :py:obj:`Amaranth Signature ` which is then used to decorate package bi-directional signals intended for connection to the physical pads of the integrated circuit package. :param width: specifies the number of individual input/output wires within this port. Each pair of input/output wires will correspond to a separate physical pad on the integrated circuit package. .. py:class:: Process(*args, **kwds) Bases: :py:obj:`enum.Enum` IC manufacturing process .. py:class:: GAPackageDef(/, **data) Bases: :py:obj:`BasePackageDef` Definiton of a grid array package, with pins or pads in a regular array of 'width' by 'height' pins on the left and right The pins are identified by a 2-tuple of row and column, counting from the bottom left hand corner when looking at the underside of the package. Rows are identfied by letter (A-Z), and columns are identified by number. The grid may be complete (i.e. width * height pins) or there may be pins/pads missing (Often a square in the middle of the package (AKA P, but this model doesn't require this). The missing pins from the grid are identified either by the `missing_pins` field or the `perimeter` field :Attributes: * **width** -- The number of pins across on the top and bottom edges * **hieght** -- The number of pins high on the left and right edges * **layout_type** (*GALayoutType*) -- Pin layout type * **channel_width** -- For `GALayoutType.PERIMETER`, `GALayoutType.CHANNEL`, `GALayoutType.ISLAND` the number of initial rows before a gap * **island_width** -- for `GALayoutType.ISLAND`, the width and height of the inner island * **missing_pins** -- Used for more exotic types instead of channel_width & island_width. Can be used in conjection with the above. * **additional_pins** -- Adds pins on top of any of the configuration above This includes the following types of package: .. csv-table: :header: Package, Description CPGA, Ceramic Pin Grid Array OPGA, Organic Pin Grid Array SPGA, Staggared Pin Grid Array CABGA: chip array ball grid array CBGA and PBGA denote the ceramic or plastic substrate material to which the array is attached. CTBGA, thin chip array ball grid array CVBGA, very thin chip array ball grid array DSBGA, die-size ball grid array FBGA, fine ball grid array / fine pitch ball grid array (JEDEC-Standard[9]) or FCmBGA, flip chip molded ball grid array LBGA, low-profile ball grid array LFBGA, low-profile fine-pitch ball grid array MBGA, micro ball grid array MCM-PBGA, multi-chip module plastic ball grid array nFBGA, New Fine Ball Grid Array PBGA, plastic ball grid array SuperBGA (SBGA), super ball grid array TABGA, tape array BGA TBGA, thin BGA TEPBGA, thermally enhanced plastic ball grid array TFBGA or thin and fine ball grid array UFBGA and UBGA and ultra fine ball grid array based on pitch ball grid array. VFBGA, very fine pitch ball grid array WFBGA, very very thin profile fine pitch ball grid array wWLB, Embedded wafer level ball grid array .. py:method:: model_post_init(__context) Override this method to perform additional initialization after `__init__` and `model_construct`. This is useful if you want to do some validation that requires the entire model to be initialized. .. py:property:: bringup_pins :type: BringupPins To aid bringup, these are always in the same place for each package type. Should include core power, clock and reset. Power, clocks and resets needed for non-core are allocated with the port. .. py:class:: QuadPackageDef(/, **data) Bases: :py:obj:`BasePackageDef` Definiton of a package a row of 'width* pins on the top and bottom of the package and 'height' pins on the left and right The pins are numbered anti-clockwise from the top left hand pin. This includes the following types of package: .. csv-table: :header: "Package", "Description" "QFN", "quad flat no-leads package. It's assumed the bottom pad is connected to substrate." "BQFP", "bumpered quad flat package" "BQFPH", "bumpered quad flat package with heat spreader" "CQFP", "ceramic quad flat package" "EQFP", "plastic enhanced quad flat package" "FQFP", "fine pitch quad flat package" "LQFP", "low profile quad flat package" "MQFP", "metric quad flat package" "NQFP", "near chip-scale quad flat package." "SQFP", "small quad flat package" "TQFP", "thin quad flat package" "VQFP", "very small quad flat package" "VTQFP", "very thin quad flat package" "TDFN", "thin dual flat no-lead package." "CERQUAD", "low-cost CQFP" :Attributes: * **width** -- The number of pins across on the top and bottom edges * **hight** -- The number of pins high on the left and right edges .. py:method:: model_post_init(__context) Override this method to perform additional initialization after `__init__` and `model_construct`. This is useful if you want to do some validation that requires the entire model to be initialized. .. py:property:: bringup_pins :type: BringupPins To aid bringup, these are always in the same place for each package type. Should include core power, clock and reset. Power, clocks and resets needed for non-core are allocated with the port. .. py:class:: BareDiePackageDef(/, **data) Bases: :py:obj:`BasePackageDef` Definition of a package with pins on four sides, labelled north, south, east, west with an integer identifier within each side, indicating pads across or down from top-left corner :Attributes: * **width** (*int*) -- Number of die pads on top and bottom sides * **height** (*int*) -- Number of die pads on left and right sides .. py:method:: model_post_init(__context) Override this method to perform additional initialization after `__init__` and `model_construct`. This is useful if you want to do some validation that requires the entire model to be initialized. .. py:property:: bringup_pins :type: BringupPins To aid bringup, these are always in the same place for each package type. Should include core power, clock and reset. Power, clocks and resets needed for non-core are allocated with the port. .. py:class:: JTAGPins Pins for a JTAG interface .. py:class:: PowerPins A matched pair of power pins, with optional notation of the voltage range