Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add specific cases to device specification #94

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

aacuevas
Copy link
Contributor

@aacuevas aacuevas commented Mar 5, 2025

- Add the specific special case of the NULL device
- Add a specification for detachable devices
@aacuevas aacuevas requested a review from jonnew March 5, 2025 03:23
Copy link
Member

@jonnew jonnew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some pending text changes, but ill wait for the responses to my comments before committing them.

(e.g.: a circuit driving an active probe that can be swapped).
In these cases:

- The driver MUST check for the presence of all required hardware elements
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When must it check?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on reset? Detect when its detacted?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. On soft reset (as defined in #91), before sending the device table. I'll clarify this.

@@ -22,3 +22,11 @@ Device ID. Devices sharing an ID are assumed to be the same and share the same
optionally be divided in two 8-bit values so long as the resulting 16-bit
integer is unique within a particular “Company” (there is no need for unary
or monotonic increments when new devices are introduced).


.. _null-dev-id:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this go into special devices?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very good point. I did not think of it as this is not really a device per se, but an indicator of a lack of device.
But on the register map file I mentioned that null devices are the sole exception to devices requiring a register interface.

So maybe it would be better to add all the requirements as a "special device". I would still mention here the special meaning of devid = 0, as it is important enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After reading the current text, I am not so sure right now. The special devices page starts with "There are ... devices that are required to exist". The page defines a couple of things that MUST be present.
However, the null device is a special case to declare a non-device. but it might not necessarily appear.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe its just "special" should be replaced with "required" then.

Copy link
Member

@jonnew jonnew Mar 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we should change "Special Devices" to "Required Devices". I think there should be a short page called Null Device with this description in it. In addition, the text from the Device descriptor page can be moved there as well:

Null Devices

In the special case of :ref:null devices <null-dev-id>, represented by a device_id
of 0, all other fields MUST be 0 as these devices MUST NOT produce or consume any kind
of data.

The information on the registers page

.. _null-dev-reg:

Null Devices


An exception to the previously stated register map are :ref:`null devices<null-dev-desc>`,
those with a ``device_id`` of :ref:`all zeros <null-dev-id>`. A null device MUST NOT
implement any register interface. Any attempt to access a null device MUST return 
the same error as accessing a non-existing register.

Can be turned into an admonition that references this new null device page.

@jonnew
Copy link
Member

jonnew commented Mar 7, 2025

I made some edits the the detachable devices page, please review and change as you wish.

@aacuevas
Copy link
Contributor Author

aacuevas commented Mar 8, 2025

Ok, I think it should be done now. Please review the last changes, I followed the earlier comments.

On the detachable devices page, I do reference the soft reset, we need to link it to the appropriate tag once #91 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create spec for "detachable devices"
2 participants