-
Notifications
You must be signed in to change notification settings - Fork 790
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
[opentitantool] Introduce JSON config for teacup shield #20902
Conversation
"alias_of": "CN7_10" | ||
}, | ||
{ | ||
"name": "SW_STRAP0_WEAK", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there a _WEAK
suffix for the SW straps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SW straps are designed to have four different values per pin. Either strongly driven high or low, or weakly (~1MOhm) pulled up or down. On production hardware this will be achieve through physical resistors to a power rail. For simulation when connected to HyperDebug, the each SW strap pin of OpenTitan is simultaneously connected to two HyperDebug pins, one of them through a 1M resistor. That is, SW_STRAP0 and SW_STRAP0_WEAK are two separate pins on HyperDebug, and the former will be configured as either PushPull/true
, PushPull/false
or Input
, with the last option allowing the pulling the SW strap weakly, by setting `SW_STRAP0_WEAK' either high or low.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be consistent with the existing names hyper310
and hyper340
we could call the new target hyperteacup
.
"alias_of": "CN10_20" | ||
}, | ||
{ | ||
// Controls if CS signal from OT QSPI device is propagated to onboard SPI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
json does not support comments really, should we change the file extension to json5?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds as a reasonable refactoring. I am not familiar with the various supersets of json, or what extension would be the most appropriate. If there is general agreement that json5 is the extension that matches what our parser accepts, then by all means.
opentitan_verilator.json
already uses //
for comments, so I was hoping to merge this as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, it should be a future refactoring.
My stance is that there is conceptual difference between "interface", which is kind of the debugger hardware, and then the configuration for the combined setup of debugger and device under test. Until now, it has been a bit conflated, since the "debugger hardware" included both HyperDebug and Sam3X on either CW310 or CW340, which also fully described the device under test. The "pure" hyperdebug debugger hardware, however, can be connected to a variety of devices to be tested. The Teacup board is the first OpenTitan test board to use the pure "hyperdebug" debugger. I foresee that the OpenTitan project in the future will have other test boards, which may feature newer revisions of the OT chip, but could also feature additional current sensors, mux'es, LEDs, connectors and other things, that require slight variations in the JSON configuration file. The Google hardware security team already uses two other teacup-like boards on top of a pure HyperDebug, one for each of two previous generations of legacy Titan chips. We have a configuration file for each of them, but use the generic interface "hyperdebug". In short, there will be a one-to-many relationship between interfaces and configuration files, and this Teacup-specific file should not be called "hyperdebug.json", neither do I think that we should have an interface called "hyperteacup", which would use the same exact driver as "hyperdebug", the only difference being that the default configuration file is this new hyperdebug_teacup.json. I would rather work towards build scripts that explicitly pass a |
The HyperDebug "shield" has a number of MUX'es, buffers and other ICs (current sensors), which can be controlled through some signals in addition to what is used when e.g. simulating OpenTitan on an FPGA. This PR introduces a new `hyperdebug_teacup.json` file, to be used with `--interface=hyperdebug` (not `hyper310`). Both this file and existing FPGA-specific files refer to a common `opentitan.json`. Change-Id: I15390cd3ac93a149ea65635c3c3f298e7a08cea0 Signed-off-by: Jes B. Klinke <[email protected]>
Thanks for explaining that. |
I agree that calling the interface |
Yes exactly. It is a bit of shame that for some reason both terms "interface" and "transport" are used in the source, meaning the same thing. If done again, we should probably have called it
The new file in this PR has a line |
Successfully created backport PR for |
The HyperDebug "shield" has a number of MUX'es, buffers and other ICs (current sensors), which can be controlled through some signals in addition to what is used when e.g. simulating OpenTitan on an FPGA.
This PR introduces a new
hyperdebug_teacup.json
file, to be used with--interface=hyperdebug
(nothyper310
). Both this file and existing FPGA-specific files refer to a commonopentitan.json
.